W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2003

xmlStandalone, xmlEncoding, xmlVersion (was RE: L3 Core Document comments)

From: Curt Arnold <carnold@houston.rr.com>
Date: Sat, 30 Aug 2003 12:09:39 -0500
Message-ID: <3F50DA53.5000304@houston.rr.com>
To: www-dom@w3.org

Phillipe wrote:

>>>> xmlEncoding has been changed to read-only, in order to simplify the
>>>> computation of the encoding used at save time (i.e. only
>>>> DOMOutput.encoding could be changed). Save defines an
>>>> "unsupported-encoding" error if the encoding is not supported. 

After rereading the spec, it is had to explain why I didn't grasp that 
xmlEncoding was based on the XML declaration.  I must have obsessed on 
setting xmlEncoding to influence the encoding that would be used when 
saving the document.

I agree that with making xmlEncoding read-only.  It should reflect the 
encoding (if any) that was  specified in the XML declaration when the 
document was initially loaded.  Subsequent changes to the document may 
result in the document may not being able to be saved in the encoding, 
but that is something to deal with in Load/Save.  I assume that 
actualEncoding and xmlEncoding would be null on a document created using 

Was xmlStandalone also made read-only and strictly based on the value in 
the XML declaration present when the document was loaded?  However, 
there should be something in L/S that allows you to specify that you 
want to document serialized with standalone="yes" which would either 
place everything in the internal subset or expand entity references and 
explicitly serialize default attribute values.

I can see a case for making xmlVersion read/write, but it would be 
better if it could be symmetric with xmlEncoding and xmlStandalone so 
that it only reflects what version, if any, was stated in an XML 
declaration.  Having it read-write and influencing the allowable names, 
is like having xmlEncoding read-write and throwing an exception if a 
tagname was specified that could not be serialized in that encoding.

Could not an XML 1.1 aware implementation accept legal 1.1 name at any 
time, but an attempt to save a document containing XML 1.1 (only) names 
as XML 1.0 would throw an exception?

Is there a method to determine whether an implementation supports XML 1.1?
Received on Saturday, 30 August 2003 13:12:47 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 20 October 2015 10:46:11 UTC