Re: ORA-SE-326-B: XML declaration is mandatory if the version is not 1.0


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

> SECTION 4.5: XML output method: the omit-xml-declaration parameter
> The last sentence says "The omit-xml-declaration parameter must
> be ignored if the standlone parameter is present, or if the 
> encoding parameter specifies a value other than UTF-8 or UTF-16."
> That is, if standalone is specified, then an XML declaration is 
> mandatory in the output.  Isn't an XML declaration also mandatory
> if the version is not 1.0?  That should probably be added to 
> the list in this sentence.

     Thank you for your comment.

     The XSL and XQuery working groups discussed your comment, and 
concluded that, although XML 1.1 requires a document entity to have an XML 
declaration, it does not require an external general parsed entity to have 
a text declaration.

     However, prompted by your comment, the working groups decided to 
formulate their requirements for the omit-xml-declaration parameter to fit 
with the requirements of XML 1.0 and XML 1.1.  The specification will 
require the setting of the omit-xml-declaration parameter to be obeyed 
always, and to require conflicts between the settings of that parameter 
and other parameters to be considered a serialization error.  A host 
language would, of course, have the option of ensuring such conflicts 
never arise through whatever language-specific mechanism it uses to 
specify serialization parameters.

     In particular, the working groups decided that if the serialized 
result could be considered to be the text declaration of an external 
general parsed entity, the omit-xml-declaration parameter could have the 
value yes or the value no, and the parameter's setting would take effect. 
They further decided that if the serialized result could only be 
considered to be a document entity because

  o the standalone parameter had the value yes or no; or
  o the version parameter had a value other than 1.0 and the
    doctype-system parameter was supplied

the omit-xml-declaration parameter must have the value no.  Otherwise, a 
serialization error results.

     As you were present when this decision was made, I will take it that 
the decision is acceptable to you.


Henry [On behalf of the XSL and XQuery Working Groups.]
Henry Zongaro      Xalan development
IBM SWS Toronto Lab   T/L 969-6044;  Phone +1 905 413-6044

Received on Tuesday, 13 April 2004 10:46:06 UTC