[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

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


  XQuery and id()/idref();
	Controlling the children of nodes in the result sequence
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
@a:span.

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

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

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

  Regards,

--drkm






















__________________________________________________
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 



Purchase Stylus Studio Online Today!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.