77.1. List of element names or node types

A list of element names or node types may be specified in order to conditionally perform a node selection.

Without this list, the specified selectNode command would select a node. Let's call it the candidate node.

The candidate node is tested against all items in the list, one after the other. If the candidate node matches any of these items, the candidate node is actually selected.

Element name

Candidate node must be an element having the same name.

#text

Candidate node must be a text node.

#comment

Candidate node must be a comment node.

#processing-instruction

Candidate node must be a processing instruction node.

Example 1: selectNode child[implicitElement] para selects first child of explicitly or implicitly selected element only if this child is a para.

Example 2: selectNode.ancestor.itemizedlist orderedlist variablelist selects first ancestor of explicitly selected element which is a list.