OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] chunker.output.omit-xml-declaration Ineffective


Interesting.  This appears to be a "feature" of Saxon's saxon:output extension.  When the output encoding is set to the default XML encoding of UTF-8, Saxon works and omits the declaration.  When the output encoding is set to anything else, it outputs the xml declaration. 
 
I think Saxon is second guessing the user in this case, assuming that an XML file must have a declaration of its encoding if it is not the default XML encoding.  In other words, it is preventing you from generating XML output that has an incorrect encoding, since an XML file without an XML encoding declaration is interpreted as UTF-8, but in this case the actual character encoding is ISO-8859-1.  In one sense, this is the correct behavior, although a bit paternalistic.  8^)   xsltproc doesn't have this behavior. 
 
But I have to ask if you really want to generate incorrectly encoded files? I don't think browsers would be happy with them.
 
Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net
 
 
----- Original Message -----
Sent: Thursday, February 15, 2007 7:44 AM
Subject: RE: [docbook-apps] chunker.output.omit-xml-declaration Ineffective

>> I can't duplicate this problem.  It works for me outside of Oxygen, using a customization that only imports that stylesheet, includes your parameter setting, and processing a version 5 document. None of the chunks have a declaration.  Any other details? <<

 

Additional testing indicates

 

<xsl:param name="chunker.output.encoding" select="'ISO-8859-1'"/>

 

invalidates

 

<xsl:param name="chunker.output.omit-xml-declaration" select="'yes'"/>

 

Ray

 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]