XPath axes: following, preceding, and attributes

short long means try it!
[none] following::item all the <item>s that come after me find all the <title> elements that occur after the <titleStmt>
[none] following-sibling::l the <l> children of my parent that come after me (i.e., the rest of the stanza) find all the children of <titleStmt> that follow <author>
[none] preceding::pb the <pb>s that come before me find all the <ab> elements that occur before To be, or not to be:
[none] preceding-sibling::head the <head> children of my parent that come before me do any elements ever occur before the <speaker> within a speech?
@rend attribute::rend my @rend attribute list all the @who attributes
@* attribute::* all of my attributes do any of the <stage> elements have attributes at all?

Kay, chapter 9

Navigating the XML Tree slide 14 of 18
© 2011 Syd Bauman, Martin Holmes, and the Women Writers Project This TEI-encoded XML file is available under the terms of the Creative Commons Attribution-ShareAlike 3.0 (Unported) license.