XPath - Axes and Node Set Functions

| Axes | Node Set Functions |
child
axis contains the children of the context node
|
last()
returns a number equal to the context size from the expression evaluation context
|
descendantaxis contains the descendants of the context node; a descendant is a child or a child of a child and so on
|
position()
function returns a number equal to the context position from the expression evaluation context
|
parentaxis contains the parent of the context node
|
count(node-set)
returns the number of nodes in the argument node-set
|
ancestoraxis contains the ancestors of the context node; the ancestors of the context node consist of the parent of context node and the parent's parent and so on
|
node-set id(object)
selects elements by their unique ID
|
following-siblingaxis contains all the following siblings of the context node
|
string local-name(node-set?)
returns the local part of the expanded-name of the node in the argument node-set that is first in document order
|
preceding-siblingaxis contains all the preceding siblings of the context node
|
string namespace-uri(node-set?)
returns the namespace URI of the expanded-name of the node in the argument node-set that is first indocument order
|
followingaxis contains all nodes in the same document as the context node that are after the context node in document order, excluding any descendants and excluding attribute nodes and namespace nodes
|
string name(node-set?)
returns a string containing a QName representing the expanded-name of the node in the argument node-set that is first in document order
|
precedingaxis contains all nodes in the same document as the context node that are before the context node in document order, excluding any ancestors and excluding attribute nodes and namespace nodes
|
|
attributeaxis contains the attributes of the context node; the axis will be empty unless the context node is an element
|
|
namespaceaxis contains the namespace nodes of the context node; the axis will be empty unless the context node is an element
|
|
selfaxis contains just the context node itself
|
|
descendant-or-selfaxis contains the context node and the descendants of the context node
|
|
ancestor-or-selfaxis contains the context node and the ancestors of the context node; thus, the ancestor axis will always include the root node
|

