Am 12.06.2015 um 11:21 schrieb Kristian Kankainen:
I don't have any TEI documents at hand, but maybe something like:

     /tei:TEI/tei:text/tei:body
       //*[starts-with(@xml:lang, "san")]
         //(tei:entry | tei:re)
[./tei:form/tei:orth = "arci"]

That would select (I believe) all elements with @xml:lang starting with
"san" that have as a descendant either a tei:entry or tei:re who's
tei:form/tei:orth is "arci".

Thank you for your suggestion, sadly this would incorrectly select this entry

<tei:entry xml:lang="san-Latn">
   <tei:re xml:lang="it">
      <tei:form><tei:orth>arci</tei:orth></tei:form>
   </tei:re>
</tei:entry>

I guess you could do the other way around as well, to first select
everything that has it's tei:orth = "arci", and limit it with you
specified language.

I think I already do that, don't I?

I read this as "of all the elements with tei:orth = 'arci', select those with @xml:lang..."

>>     /tei:TEI/tei:text/tei:body//
>>       *[self::tei:entry or self::tei:re]
>>       [./tei:form/tei:orth[. = "arci"]
>>         [ancestor-or-self::*
>>           [@xml:lang][1]
>>           [(starts-with(@xml:lang, "san"))]
>>         ]
>>       ]

Regards,

--
Gioele <[email protected]>

Reply via email to