Re: L3 Core Document comments

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 UTC