[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Root Node does not contain prolog?

Subject: Re: Root Node does not contain prolog?
From: James Clark <jjc@xxxxxxxxxx>
Date: Sun, 25 Apr 1999 07:19:19 +0700
prolog tree root
Elliotte Rusty Harold wrote:
> 
> Section 4.1 of the new XSLT spec, Root Node, states:
> 
> "The root node is the root of the tree. It does not occur anywhere else
> in the tree. It has a single child which is the element node for the
> document element of the document.

That last sentence is a bug.  Comments and PIs before and after the
document element would also be children of the root.

> The value of the root node is the value of the document element."

That's defining the term "value" for the root node.  It means that
<xsl:value-of select="/"/> gives you the same as <xsl:value-of
select="doc"/> if doc is the document element.

> This would seem to imply that an XSL processor can never access any part
> of the prolog including the XML declaration, the xml-stylesheet PI, or
> the DTD since these are not children of the root.

The xml-stylesheet PI is accessible; the XML declaration and DTD are
not.

> Furthermore, this
> makes an identity transformation impossible.  Is this indeed the intent,
> here?

It depends what you mean by identity transformation.  You can do a
transformation which gives you the same abstract tree before and after.
You cannot do a transformation which gives you a byte for byte identical
XML document.  That is indeed the intent.

James



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.