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

RE: Root node vs element root?

Subject: RE: Root node vs element root?
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Wed, 16 May 2001 17:26:38 +0100
xml node vs element
> I'm trying to figure out the content of the root node. In my
> XML example
> I know the element root is <book>, but is the root node <?xml
> version="1.0" encoding="UTF-8"?> ???

No, the root node is best thought of as being the document itself - like the
document node in the DOM model. If you think of an element as being the
stuff between <a> and </a> tags, think of the root as being the stuff
between start-of-file and end-of-file.

The text '<?xml version="1.0" encoding="UTF-8"?>'

is an XML declaration, and it is not represented by a node in the XPath
tree, because the information is used only by the XML parser when
constructing the tree, and is of no interest thereafter.


> Also, does the XSLT processor even see/read the xml declaration?

No, it's dealt with by the XML parser.

Mike Kay


 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.