Re: XML namespaces on the Web

Shelley Powers scripsit:

> As for the non-draconian bits...I've looked through the XML
> specifications, but perhaps not as thoroughly as I could. Where is
> there mention that error handling with XML must be draconian in
> nature? I'm surprised at this, as normally W3C specifications are
> rather dry, and the word "draconian" has so much flare to it.

The word itself does not appear.  However, the XML 1.0 and 1.1 Recs
define the notion of "fatal error", and say:

    After encountering a fatal error, the processor MAY continue
    processing the data to search for further errors and MAY report
    such errors to the application. In order to support correction of
    errors, the processor MAY make unprocessed data from the document
    (with intermingled character data and markup) available to the
    application. Once a fatal error is detected, however, the processor
    MUST NOT continue normal processing (i.e., it MUST NOT continue to
    pass character data and information about the document's logical
    structure to the application in the normal way).

Specifically, it is a fatal error if the input does not match the
BNF grammar, or violates one of the 12 well-formedness constraints.
There are also 9 other fatal errors specified by XML 1.x, mostly having
to do with bad encoding.

In addition to the notion of "fatal error", there is also the notion of
"error"; it is not easy to count the number of these.  The processing of
a document with an error produces undefined results, which may include
ignoring the error, reporting the error, reporting the error and aborting,
or correcting the error.  All XML parsers that I know of treat all
errors they detect as fatal.  (It is also possible for a parser to have
"an error" in the sense of the Rec, which means that it's not a proper
XML parser: the only error recovery is to fix the program(mer).)

-- 
John Cowan            http://www.ccil.org/~cowan     cowan@ccil.org
                if if = then then then = else else else = if;

Received on Wednesday, 18 November 2009 16:13:47 UTC