[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: ISO-8859-1 encoding and XmlDecl omision (was Re: L
Hi. > John Meyer wrote at 06/01/2004 09:36 a.m.: >I'm not sure I understand why > ><xsl:output method='xml' version='1.0' encoding='iso-8859-1' > omit-xml-declaration="yes" indent="yes"/> > >is invalid. ISO-8859-1 is a subset of UTF-8 and should cause no problems >since most parsers default to UTF-8 if the XML declaration is ommited. For my knowledge, that is incorrect. Latin1 isn't a subset of UTF-8, for the contrary, the opposite is true: UTF-8 is a subset of Latin1. If you want to generate a XML document (result tree) that has *support* for Latin1 characters, like: á,é,í,ü,ë, etc. you have to generated the XML declaration with Latin1 encoding (ISO-8859-1), otherwise the result would not be well formed XML, just like David said: ... >Note however that: > > <xsl:output method='xml' version='1.0' encoding='iso-8859-1' > omit-xml-declaration="yes" indent="yes"/> >has incompatible options: you can't have latin1 output and omit the xml >declaration (otherwise the result would not be well formed XML. >The XSLt engine will be forced to ignore omit-xml-declaration="yes" >here. > >David Cheers, Sergio Rodríguez. 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
|