Diaz Manuel wrote:
Thanks David for your answer.
I will nevertheless close the thread on the Dev's list if you don't
mind.


 Setting the XSLTResultTarget.setEncoding(xmlencoding) solved my
problem!

Now, as I am using the xalan-c 1.9 version, the ommit-xml-declaration in
the stylesheet has no effect whenever "xmlencoding" is set to something
different than UTF-8.
This was a big debate when the issue came up. Technically, the processor should never generate markup that's not well-formed. If an entity is not encoded in UTF-8 or UTF-16, then it requires an XML declaration (or text declaration) with the proper encoding:

http://www.w3.org/TR/REC-xml/#charencoding

As a result, the request to omit the XML declaration was ignored in older versions of Xalan-C. However, there were requests to change this behavior, under the assumption that a user might want to specify the actual encoding through some other mechanism. I was opposed to this, but was out-voted by the Xalan-J team.

As a result, I get multiple <?xml.. Entries in my
output file.
This should never happen. If you get more than one XML declaration, it's a bug, and you should file a Jira issue so we can investigate.


I can see that this has been fixed in the 1.10 version (XALANC-557), but
just by curiosity...is there any workoround for this in 1.9?
This is a different bug, from what I remember. Unfortunately, the old Bugzilla database is gone, so the diffs are not available, so I can't verify it.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to