Re: [XSLT/newbie]value-of attributes of the root node

Subject: Re: [XSLT/newbie]value-of attributes of the root node
From: AndrewWatt2000@xxxxxxx
Date: Wed, 20 Sep 2000 09:33:05 EDT
In a message dated 20/09/00 11:02:33 GMT Daylight Time, davidc@xxxxxxxxx 
writes:

> > Within XSLT and XPATH, what, if any, purpose does this 
>  > seperation of root node and document element serve?
>  
>  It gives access to items that may not be children of the document node.
>  Such as comments and processing instructions.

David,

It seems to me that what you have just stated contradicts the XPath 
Recommendation.

In Section 5.1 it states, "The root node also has as children processing 
instruction and comment nodes for processing instructions and comments that 
occur in the prolog and after the end of the document element.".

Thus processing instructions and comments are children of the root node (aka, 
informally, document node), contrary to your statement.

> Also the xpath tree model works with trees that need not have a 
>  single top level document node at all (xsl variables, rtf-node set
>  coercions, etc)

Also the term "top level" seems to me to introduce, in this context, 
unnecessary confusion. "Top -level" (with a hyphen) is used in quite a 
different way within the XSLT Recommendation. Whether that usage is or is not 
appropriate is a separate issue.

Andrew Watt


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread