xsl-list
[Top] [All Lists]

Re: [xsl] Diagram of XPath axes

2012-05-24 08:05:45
At 2012-05-24 08:58 -0400, you wrote:
One additional question, please:

Preceding nodes do not include ancestors, which I've thought is odd. It includes siblings, but not parent or grand-parent, etc.

When looking at an XML file in an editor, ancestors surely seem to be preceding where I am in the document.

But perhaps "preceding" means nodes before "me" but not including anything that contains "me".

Is that a useful way to look at "preceding"?

When I talk about my diagram in the classroom, I also use the "me" approach and I use the following distinctions:

- the self axis is me
- the preceding nodes are all those nodes that start and end before I start
- the following nodes are all those nodes that start and end after I end
- the ancestor nodes are all those nodes that have started before me but not yet ended - the descendent nodes are all those nodes that start after I've started and end before I end

... and that covers off all of the nodes in the document. I cite the bizarre XML document above the diagram so that students can see the starting and the ending as I quote above.

I hope this helps.

. . . . . . . . . . Ken

--
Public XSLT, XSL-FO, UBL and code list classes in Europe -- Oct 2012
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/s/
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>