The XSL Pattern syntax supports collection methods to access the various types of nodes in a document. Any of these collections can be constrained and indexed. The collections return the set of children of the reference node meeting the particular restriction.
Collection Methods
attribute * Returns the collection of all attribute nodes. Synonymous with @*. cdata * Returns the collection of CDATA nodes. comment Returns the collection of comment nodes. element * Returns the collection of all element nodes. Synonymous with *. node * Returns the collection of all nodes except attributes and the root node of the document. Synonymous with "* | pi() | comment() | text()" pi Returns the collection of processing instruction nodes. text Returns the collection of nodes representing text strings. Synonymous with "textnode() | cdata()" textnode * Returns the collection of text nodes. * Extended XSL Pattern method described in the XQL Proposal .
Remarks
Note that the XML Document Object Model (DOM) defines a document object that contains comments, processing instructions, and declarations, as well as what is termed the "root element." The XML working drafts use the term "document entity" for the root of the DOM treethe document objectinstead of the "root element." This allows access to nodes at the document entity level, such as comments.