Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XPath data model and the XML Declaration

From: David Carlisle <davidc@---.--.-->
To: NULL
Date: 12/2/2004 12:42:00 PM
  Does the XML Declaration map to a Xpath node type or not.
  If yes - what type of node?

No, it affects the parser (eg telling it what encoding has been used),
and so affects  the construction of the node tree, but no record of the
declaration is left in the node set.

That's (normally) what you want. If you have a file in latin1 that
starts
<?xml version="1.0" encoding="iso-8859-1"?>
..

and the same data encoded in utf-8 that starts 

<?xml version="1.0" encoding="utf-8"?>

Then you want these two to be equivalent. The actual data in the nodes
are just logical unicode characters, the encoding used to store them
originally in a file shouldn't be relevant to the logical view of the
XML tree (and isn't available to XPath/XSLT).

Of course in many cases it's not unrreasonable to want to output a file
with the same encoding as was used for input, but that information has
gone, along with information about whether " or ' was used for
attributes, or where CDATA sections were, etc.

David


transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent