Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Encoding

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <cowan AT mercury.ccil.org>
  • To: Johan Strandberg <johan AT acm.org>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Encoding
  • Date: Fri, 5 Sep 2003 16:46:03 -0400

Johan Strandberg scripsit:

> > You can only return the tentative encoding if
> > it is UTF-8 or UTF-16; otherwise, you have a fatal error.
>
>
> No, according to the paragraph I quoted to from the standard it is an
> error, not a fatal error. Here is the paragraph again:
>
>
> In the absence of information provided by an external transport
> protocol (e.g. HTTP or MIME), it is an error for an entity
> including an encoding declaration to be presented to the XML
> processor in an encoding other than that named in the
> declaration, or for an entity which begins with neither a Byte
> Order Mark nor an encoding declaration to use an encoding other
> than UTF-8. Note that since ASCII is a subset of UTF-8, ordinary
> ASCII entities do not strictly need an encoding declaration.

True, enough, but three paragraphs down appears the following sentence
(the first line of which was added by official erratum 23):

Unless an encoding is determined by a higher-level protocol,
it is also a fatal error if an XML entity contains no encoding
declaration and its content is not legal UTF-8 or UTF-16.

I will attempt to get the Core WG to resolve the conflict in time for
the pending 3rd Edition.

--
Knowledge studies others / Wisdom is self-known; John Cowan
Muscle masters brothers / Self-mastery is bone; jcowan AT reutershealth.com
Content need never borrow / Ambition wanders blind; www.ccil.org/~cowan
Vitality cleaves to the marrow / Leaving death behind. --Tao 33 (Bynner)




Archive powered by MHonArc 2.6.24.

Top of Page