[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Root Node does not contain prolog?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|