On 09/01/13 22:16, Martin Holmes wrote:
> On 13-01-09 01:51 PM, Dave N wrote:
>> Simple question -- consider this fragment:
>> <quote xml:id="q41" next="#q42">Why,</quote>
>> she said,
>> <quote xml:id="q42">are we?</quote>
>> When the first <quote/> element is the context item, what is an
>> idiomatic XPath expression to select the second <quote/> element by its
> You can use substring-after(@next, '#') to get the id without the hash.
>> "id(@next)" doesn't work because of the hash character, and
>> "id(substring(@next, 2))" seems kludgy. The first option would work if I
>> could do away with the hash character, but the hash character is
>> mandated by the TEI.
what Martin said.
And it's not mandated by the TEI btw -- this is URI syntax. And don't
forget that there might well be something in front of the #...