Most of the time the node test part of the basis is simply an
element name like
However, there are seven other possibilities:
<CITATION CLASS="TURING" ID="C2"> <AUTHOR>Turing, Alan M.</AUTHOR> "<TITLE>On Computable Numbers, With an Application to the Entscheidungs-problem</TITLE>" <JOURNAL> Proceedings of the London Mathematical Society</JOURNAL>, <SERIES>Series 2</SERIES>, <VOLUME>42</VOLUME> (<YEAR>1936</YEAR>): <PAGES>230-65</PAGES>. </CITATION>
The following XPointer refers to the quotation mark before
The first text node in this fragment is the whitespace
<CITATION CLASS="TURING" ID="C2"> and
<AUTHOR>. Technically, this XPointer refers
to all text between
<TITLE>, including the whitespace and not
just the quotation mark.
Because character data does not contain any child nodes, most
relative location steps may not be attached to an XPointer that
selects a text node. The exception is the
point() node test
which will be discussed later.
comment() node test specifically refers to
comments. For example, this XPointer points to the third comment
in the document:
Because comments do not contain attributes or elements, you
cannot add an additional
location step after the first term that selects a comment.
processing-instruction() node test
selects any processing instructions that occur along the chosen
axis. You can use it without any arguments to select any
processing instructions, or with arguments to specify the
particular processing instruction targets you want to select.
selects all processing instructions in the document. However,
only finds processing instructions that begin
/descendant::processing-instruction(php) only finds
processing instructions intended for PHP. As with comments,
because processing instructions do not contain attributes or
elements, you cannot add an additional
location term after the first term that selects a processing
range() mode tests refer
to new ways of dividing an XML document.
They will be discussed below.
Although the other node tests all end with parentheses, none
of them except
take any arguments.