|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: encoding issues
> How can you be sure? You can never be sure of anything. An XSLT processor is explictly allowed to ignore the requested output and use an output encoding of its choice. For example MSXML always does this if you output to a string rather than to a file, or equivalently if you output to a DOM tree then there is no output encoding at all (as it's not output in that sense) so if you later serialise that dom you get whatever _that_ serialisation asks for, not what was in the xsl:output. In the html output method this doesn't matter so much because the system adds the <meta element and will specify in there whatever encoding it really used. In the xml output method the best you can do is output a meta element that specifies the output encoding you requested, but if the system chooses a different encoding it will not change the meta element to match, as the xml output method just sees <meta as a normal element that happens to be in the result tree. In practice if you are targeting something specific like msxml you can tell what output encoding will be used: either it obeys the requested one from xsl:output or it always uses utf16, depending how it is called. It would be legal for an XSLT system to change it's behaviour depending on the time of day, but few if any do. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. 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
|

Cart








