[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] Diagram of XPath axes


Subject: Re: [xsl] Diagram of XPath axes
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 24 May 2012 08:58:05 -0400

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@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


Current Thread
Keywords