[xquery-talk] XQuery and id()/idref(); Controlling the children of nodes in the result sequence

Florent Georges lists at fgeorges.org
Thu Apr 24 16:39:14 PDT 2008

Maik Stührenberg wrote:

>  let $e := $d/a:collection/a:entry/a:data//*[@a:span = $s/@xml:id]
>    return
>       $e[not(child::element()[@a:span = $s/@xml:id])]

> [...]

> What I don't get is why the c:word elements are still included
> in the output? They don't share the same value with their
> parent node...

  I didn't look at this in details, but what you say here is not the
same as the expression your wrote above.  The expression select first
elements descendant of a:data whose @a:span has some specific value. 
Then it filters out the elements whose one child has the same value for

  Let say you have in $e the following two elements:

    <elem a:span="ref1"/>
    <elem a:span="ref2">
       <elem a:span="ref2"/>
    <elem a:span="ref3">
       <elem a:span="..."/>

  The last filter will then filter out the second element in this



Do You Yahoo!?
En finir avec le spam? Yahoo! Mail vous offre la meilleure protection possible contre les messages non sollicités 
http://mail.yahoo.fr Yahoo! Mail 

More information about the talk mailing list