Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Part 4: XSLT and XPath > XPath Operators and Expressions

Chapter 14. XPath Operators and Expressions

XSL Transformations (XSLT) uses XML Path (XPath) to access and refer to parts of an input document. XPath locates various document structures by representing those structures as node trees that can be navigated using location paths. The location paths have a very specific syntax that includes operators and expressions used to locate parts of a document according to the type of structure they represent. The seven basic structures that location paths allow you to access are

  • Root nodes Represent the root element in XML documents

  • Element nodes Represent all elements in XML documents, including root nodes

  • Attribute nodes Represent attributes in XML documents, including default and inherited attributes (but excluding xmlns attributes)

  • Text nodes Represent the text contents of elements including any CDATA sections that elements might contain

  • Comment nodes Represent the text components of comments that are inserted into XML documents

  • Processing instruction nodes Represent processing instructions in XML documents by name and string value

  • Namespace nodes Represent namespaces declared in XSLT stylesheets as defined in xmlns attributes


You are currently reading a PREVIEW of this book.


Get instant access to over $1 million worth of books and videos.


Start a Free 10-Day Trial

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint