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

Re: L3 Core Document comments

From: Philippe Le Hegaret <plh@w3.org>
Date: 10 Sep 2003 15:34:22 -0400
To: Curt Arnold <carnold@houston.rr.com>
Cc: WWW DOM <www-dom@w3.org>
Message-Id: <1063222462.2045.120.camel@jfouffa.w3.org>

On Sat, 2003-08-30 at 01:54, Curt Arnold wrote:
> AHA.  I wasn't making the connection that xmlEncoding is the encoding 
> specified in the XML declaration (seems pretty obvious now) and is 
> orthogonal to the encoding of the initial source document and then 
> encoding used in any subsequent saves.



> Would this be null if there were no XML declaration or no encoding 
> specified in the declaration?

The current description says
"This is null when unspecified."

> Some implementations allow parsing from a string where the declared 
> encoding is ignored.  Would the xmlEncoding retain the value from the 
> declaration (say UTF-8 or ISO-8859-1) when the source string was 
> UTF-16?  What would actualEncoding be in this case?

As you realized, the xmlEncoding is the encoding from the XML
declaration so xmlEncoding retain the value from the declaration. I
don't think I can do better than saying "An attribute specifying, as
part of the XML declaration, the encoding of this document." on that one
(with a link from "XML declaration" to
http://www.w3.org/TR/REC-xml#NT-XMLDecl). actualEncoding (soon to be
renamed to inputEncoding) will be UTF-16, since it as parsed from a
source string. If parsed from a character stream, then it depends where
the implementation is able to determine the encoding by the character
stream.

Philippe
Received on Wednesday, 10 September 2003 15:36:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:13:57 GMT