W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2004

Re: WD-xslt-xquery-serialization-20030502 omit-xml-declaration

From: Henry Zongaro <zongaro@ca.ibm.com>
Date: Tue, 21 Sep 2004 15:12:16 -0400
To: davidc@nag.co.uk
Cc: public-qt-comments@w3.org
Message-ID: <OF6647867A.C75EDBB1-ON85256F16.005C920C-85256F16.00697DCB@ca.ibm.com>

David,

     In [1], you submitted the following comment on the Last Call Working 
Draft of XSLT 2.0 and XQuery 1.0 Serialization:

<<
According to 
http://www.w3.org/TR/2003/WD-xslt-xquery-serialization-20030502/#N400318


   The omit-xml-declaration parameter should be ignored if the standalone
   parameter is present, or if the encoding parameter specifies a value
   other than UTF-8 or UTF-16.

There is one other case where it would be very useful to omit the
declaration (or at least to use a value of utf-8) namely
iso-646 (aka ASCII aka US-ASCII).

It may be politically incorrect to say that ascii characters are still
more interoperable than non-ascii characters, but in practice this is
still the case. Especially in XML which specifies that a charset
specified in the mime headers takes precedence it is hard to give (say) a
utf8 file to someone to serve from their website without first finding
out what http server they use, and how to make sure it won't serve the
thing as latin 1 resulting in a non-well formed document.
(See current discussion on W3C'S TAG list about this).

One style of producing XML files that avoids these problems is to
produce files that don't have an xml declaration (or have one that
specifies utf-8) but to encode all non-ascii characters as numeric
character references.

Currently in an XSLT 1 usage in production I use
<xsl:output encoding="US-ASCII"/>
with saxon and post process with sed to remove the US-ASCII
encoding declaration (which stops the file being parsed on several XML
systems I have locally) I think that it would be very desirable if

<xsl:output encoding="iso-646" omit-xml-declaration="yes"/>

was defined to work, and produce files of the form described above.

Failing that it would be good if it would be allowed by the
specification if the system understood that encoding.
>>

     The XSL and XML Query Working Groups discussed your comment, and 
initially responded in [2], indicating that Serialization would respect 
the setting of the omit-xml-declaration whenever the encoding was UTF-8, 
UTF-16 or some "subset" encoding of those two encodings.

     However, subsequent to making that decision, the working groups 
decided that the setting of the omit-xml-declaration parameter should be 
respected always, regardless of the setting of the encoding parameter. The 
23 July working draft of Serialization [3] reflects that decision.

     Thank you once again for your comment.  May I ask you to confirm that 
the revised response is acceptable to you?

Thanks,

Henry [On behalf of the XSL and XML Query Working Groups]
[1] 
http://lists.w3.org/Archives/Public/public-qt-comments/2003Nov/0050.html
[2] 
http://lists.w3.org/Archives/Public/public-qt-comments/2004Feb/1235.html
[3] http://www.w3.org/TR/2004/WD-xslt-xquery-serialization-20040723/
------------------------------------------------------------------
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com
Received on Tuesday, 21 September 2004 19:12:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:34 GMT