[xquery-talk] retrieving node depending on its context

Christian Wittern wittern at kanji.zinbun.kyoto-u.ac.jp
Mon May 9 08:59:37 PDT 2005

"Michael Kay" <mhk at mhk.me.uk> writes:

> if (tokenize(../node()[. >> $n][1][self::text()], '\s')[1] eq 'and')

I guess I am just too dense for this:-)  Where does the $n come from?
Is it something like

$x := <p>His name was <name>Christian</name> and he lived in
<place>Kyoto</place>. Another <name>Name</name> here.</p>

for $n in $x/name


but then I am lost.  I'd love to put all of this in a xpath predicate,
but this does not seem to work.  

Could you please explain what you meant?

All the best,



 Christian Wittern 
 Institute for Research in Humanities, Kyoto University
 47 Higashiogura-cho, Kitashirakawa, Sakyo-ku, Kyoto 606-8265, JAPAN

More information about the talk mailing list