[ http://issues.apache.org/jira/browse/XALANC-597?page=comments#action_12365628 ]
Henry Zongaro commented on XALANC-597: -------------------------------------- Dave, in <http://issues.apache.org/jira/browse/XALANC-597#action_12365594> you wrote, "I don't know how you can read it that way." It seems like a reasonable reading to me. Section 4.3.2 of XML 1.0 3e, reads: An external general parsed entity is well-formed if it matches the production labeled extParsedEnt. All external parameter entities are well-formed by definition. Well-Formed External Parsed Entity [78] extParsedEnt ::= TextDecl? content Then the third paragraph of 4.3.3 states, "In the absence of external character encoding information (such as MIME headers), parsed entities which are stored in an encoding other than UTF-8 or UTF-16 MUST begin with a text declaration," and the penultimate paragraph states, "Unless an encoding is determined by a higher-level protocol, it is also a fatal error if an XML entity contains no encoding declaration and its content is not legal UTF-8 or UTF-16." So it's clearly a fatal error, but it's not described as a well-formedness error - presumably because the XML processor cannot tell one way or the other. Similary, if the entity is in an encoding that is not supported by the XML processor, that's a fatal error, but not a well-formedness error - again, presumably because the XML processor cannot tell one way or the other. So I'm asserting that the entity is well-formed, even without the TextDecl, because 4.3.2 says that it is, but that an XML processor can't make use of the entity without being handed external encoding information. If the XML Core WG told me that that's an incorrect intrepretation on my part, and that an entity is not well-formed if it is not encoded in UTF-8 or UTF-16, has no text declaration, and external encoding information is not provided, I would accept that; right now I believe it's a perfectly reasonable interpretation of the text to say that it might be well-formed, but the processor cannot tell. > Serializers for encodings other than UTF-8 and UTF-16 should not omit the XML > declaration > ----------------------------------------------------------------------------------------- > > Key: XALANC-597 > URL: http://issues.apache.org/jira/browse/XALANC-597 > Project: XalanC > Type: Bug > Versions: CurrentCVS > Reporter: David Bertoni > Assignee: David Bertoni > Attachments: patch.diff > > Our new serializer for encodings other than UTF-8 and UTF-16 will omit the > XML declaration if the xsl:output element attribute omit-xml-declaration is > equal to "yes." This is contrary to what the XSLT recommendation states, as > it can create XML that is not well-formed. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
