[xquery-talk] Collections - family relationships
G. Ken Holman
gkholman at CraneSoftwrights.com
Sun Jan 5 10:24:31 PST 2014
At 2014-01-05 16:50 +0000, Ihe Onwuka wrote:
>If x is the document element of a document in a collection, is it
>the sibling of y that is the document element of another document in
>the same collection?
>
>If not why not?
It doesn't, because the specification says it doesn't:
http://www.w3.org/TR/2007/REC-xpath-functions-20070123/#func-collection
"returns a sequence of nodes"
A sequence of nodes has no sibling inter-relationships.
For my students there is a helpful diagram regarding memory
organization on page 223 of my XSLT book that is available for free
download on a "try and buy" basis at
http://www.CraneSoftwrights.com/training/#ptux ... if you decide not
to pay for the book, please delete the copy that you download for free.
The memory organization in XQuery is the same, and I use a similar
diagram in my XQuery hands-on class that shows the different
declaration syntaxes. But the handouts for that class are not
available publicly, so I can only share with you the XSLT pages.
A tree of nodes is different than a sequence of nodes. In a tree
nodes can have a sibling relationship, but in a sequence, there is no
connection between the nodes.
I hope this helps.
. . . . . . . . . Ken
--
Public XSLT, XSL-FO, UBL & code list classes: Melbourne, AU May 2014 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd. http://www.CraneSoftwrights.com/q/ |
G. Ken Holman mailto:gkholman at CraneSoftwrights.com |
Google+ profile: http://plus.google.com/+GKenHolman-Crane/about |
Legal business disclaimers: http://www.CraneSoftwrights.com/legal |
More information about the talk
mailing list