[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: Which patterns will select the root node?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Sun, 16 Oct 2005 17:38:49 +0100
> node() matches the root node, for example in the following 
> XPath expression:
> 
>      ancestor::node()

But ancestor::node() is not a valid match pattern.

In XSLT 1.0, the only pattern that matches the root node is "/".

In XSLT 2.0, you can use patterns of the form document-node()[predicate].

Michael Kay
http://www.saxonica.com/

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member