XML-Technologien / XSLT / XSLT- und XPath-Funktionen

(Auszug aus "XSLT 2.0 & XPath 2.0" von Frank Bongers, Kapitel 5.)

Die bestehenden Nodetests aus XPath 1.0 werden in XPath 2.0 beibehalten. In XPath 2.0 erweitern die Tests item() und empty() das Repertoire für den Test von Sequenzen. Abgeleitet vom allgemeinen Knotentest node() werden in Form von attribute(), document-node(), element() und schema-element() weitere spezialisierte Tests eingeführt.

   

Name

Origin

Usage

attribute()

XPath 2.0

Test auf Attributknoten

comment()

XPath 1.0

Test auf Kommentarknoten

document-node()

XPath 2.0

Test auf Dokumentknoten

element()

XPath 2.0

Test auf Elementknoten

item()

XPath 2.0

Test auf Item (einer Sequenz)

node()

XPath 1.0

Test auf beliebigen Knotentyp

processing-instruction()

XPath 1.0

Test auf PI

schema-element()

XPath 2.0

Test typisierter Elementknoten

text()

XPath 1.0

Test auf Textknoten

Tabelle: Nodetests in XPath 2.0 (nicht zu den Funktionen zu rechnen).

   

nach oben