[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: ISO-8859-1 encoding and XmlDecl omision (was Re: [xsl] Looking up keys in a separate xml file)


Subject: Re: ISO-8859-1 encoding and XmlDecl omision (was Re: [xsl] Looking up keys in a separate xml file)
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 6 Jan 2004 16:02:12 GMT

  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.

All parsers default to utf8 in the absence of a declaration and
byte-order mark, that is specified by the XMl rec.
However ISO-8859-1 is not a subset of utf8, the first 127 (ASCII) slots
are the same but the upper half of latin 1 is encoded in ISO-8859-1
as single bytes, which will cause fatal errors if interpretted as utf8,
where those characters require two bytes in the encoding.

  I believe the only constraint when using
  the XML output method is that the result must be a general parsed
  entity.

yes, but a general parsed entity in ISO-8859-1 encoding must have an
encoding declaration to be well formed. XSLT does not distinguish
between an xml declaration and a text declaration, the only difference
is the standalone attribute anyway).


David

-- 
http://www.dcarlisle.demon.co.uk/matthew

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords