XML technologies / XSLT / Introduction to XSLT 2.0 / Getting started with XSLT and XPath / Path expressions – examples / Path expressions on the Child axis
(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 1.)
gruss
This path expression describes elements named<gruss>, which are one level below the context. It is therefore a Location Step on the Child axis, in abbreviated syntax, with a NameTest.hallo/gruss
This path expression consists of two steps on the Child axis. It describes elements<gruss>, which are one level below an element<hallo>that is itself one level below the context./hallo/gruss
This absolute path expression consists of three steps; the initial slash is also considered a separate step. At the beginning, the slash therefore does not act as a separator between Location Steps.
With this basic knowledge, all elements in an XML document can already be addressed, provided their names and positions in the document hierarchy are known.
Copyright © Galileo Press, Bonn 2008
You may print the online version for your private use.
Otherwise, this chapter from "XSLT 2.0 & XPath 2.0 ― Das umfassende Handbuch" is subject to the same terms as the printed edition: the work and all its parts are protected by copyright. All rights are reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
Galileo Press, Rheinwerkallee 4, 53227 Bonn