XML technologies / XSLT / XSLT and XPath functions

(Excerpt from "XSLT 2.0 & XPath 2.0" by Frank Bongers, Chapter 5.)

The existing node tests from XPath 1.0 are retained in XPath 2.0. In XPath 2.0, the tests item() and empty() extend the repertoire for testing sequences. Derived from the general node test node() further specialized tests are introduced in the form of attribute(), document-node(), element() and schema-element().

   

Name

Origin

Usage

attribute()

XPath 2.0

Test for attribute nodes

comment()

XPath 1.0

Test for comment nodes

document-node()

XPath 2.0

Test for document nodes

element()

XPath 2.0

Test for element nodes

item()

XPath 2.0

Test for Item (of a sequence)

node()

XPath 1.0

Test for any node type

processing-instruction()

XPath 1.0

Test for processing instructions

schema-element()

XPath 2.0

Test for typed element nodes

text()

XPath 1.0

Test for text nodes

Table: node tests in XPath 2.0 (not classified as functions).

   

back to top