DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5085>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5085

Reporting of externally specified encodings

           Summary: Reporting of externally specified encodings
           Product: Xerces2-J
           Version: 2.0.0 [beta 2]
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XNI
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


XMLDocumentHandler reports encodings in two stages: firstly the
autodetected encoding is reported in startDocument or startEntity, and
secondly the encoding specified in the XML or text declaration is
reported in xmlDecl or textDecl.  It is not clear to me how these work
in the case where the encoding of an entity is specified not by
anything in the entity itself but by an external transport protocol
such as HTTP where the encoding can be specified by a charset
parameter in the MIME header (see 4.3.3 of the XML Rec). The infoset
defines the [character encoding scheme] of the document entity as "The
name of the character encoding scheme in which the document entity is
expressed". I don't see how I can compute this using XNI so that it
works regardless of whether the encoding was specified externally.
The encoding reported by the textDecl or xmlDecl methods presumably
refers to the encoding declared in the XML or text declaration which
may be wrong if the encoding was externally specified.  On the other
hand, when the encoding is not externally specified then the encoding
reported by textDecl or xmlDecl must be used. It seems to me that
startDocument and startEntity need an additional parameter saying
whether the encoding is externally specified; when it is the encoding
parameter would report the externally specified parameter rather than
the autodetected parameter.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to