Skip to Content
Special Edition Using XSLT
book

Special Edition Using XSLT

by Michael Floyd
January 2002
Intermediate to advanced
480 pages
11h 5m
English
Que
Content preview from Special Edition Using XSLT

XPath Axis Types

ancestor

This axis type contains all ancestors of the current context node. This includes parent nodes, grandparents, and so on. Therefore, the ancestor axis always contains the root node unless root is the context node.

Example:

ancestor::chapter/intro 

ancestor-or-self

Like the ancestor axis, this axis selects all ancestors of the context node, including parent nodes, grandparents, and so on. In addition, ancestor-or-self contains the context node itself.

Example:

ancestor-or-self::node() 

attribute

When the context node is an element node, the attribute axis contains the attributes of this node. For all other node types, the axis is empty.

Example:

attribute::href 

child

Selects children of the context node.

Example: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Special Edition Using XML, Second Edition

Special Edition Using XML, Second Edition

- et al. David Gulbransen
XML for Publishers

XML for Publishers

Keith Fahlgren

Publisher Resources

ISBN: 0789725053Purchase book