W3C home > Mailing lists > Public > public-xml-core-wg@w3.org > November 2009

Re: XML namespaces on the Web

From: Henri Sivonen <hsivonen@iki.fi>
Date: Thu, 19 Nov 2009 12:47:15 +0000
Cc: Lachlan Hunt <lachlan.hunt@lachy.id.au>, Liam Quin <liam@w3.org>, public-html@w3.org, public-xml-core-wg@w3.org
Message-Id: <AB815580-E8B7-47CA-A757-819A6B36007B@iki.fi>
To: John Cowan <cowan@ccil.org>
On Nov 18, 2009, at 23:55, John Cowan wrote:

> This turns out not to be the case: the algorithm doesn't come close to
> XML 1.0 conformance.  For example, it accepts
> 
>        <root less="<">
>        </root>
> 
> without reporting a parse error, but this is not well-formed XML because
> it violates a well-formedness constraint.  In order to be an XML parser,
> it has to accept what an XML parser accepts, reject what an XML parser
> MUST reject, and report what an XML parser MUST report.  

Previously, XML advocates have been trying to explain away the Draconianness by saying that the *Application* is free to perform additional processing with the rest of the document text after the XML Processor has reported a fatal error to the Application (or that additional processing is OK if the input isn't claimed to have been XML).[1,2,3]

Consider an XML5 Parser that's an amalgamation of an XML 1.0 Processor and an Application as follows:
 1) XML 1.0 Processor parser part of the XML5 Parser parses until the first fatal error and reports it to the application part of the XML5 Parser.
 2) The Application part of the XML5 parser intercepts the fatal error reported by the the XML 1.0 Processor and doesn't further echo it anywhere.
 3) The Application part of the XML5 parser obtains the remainder of the unparsed byte stream from the XML 1.0 Processor.
 4) The Application part of the XML5 parser obtains the internal buffers and variables of the XML 1.0 Processor.
 5) Having initialized its own state based on the data obtained, the Application part of the XML5 parser parses the rest of the stream roughly as outlined by Anne.

Now, let's optimize away the boundaries within the XML5 box that aren't black-box-testably distinguishable from the outside. The result: an XML5 parser that reports no errors, that parses any byte stream to completion and that black-box-testably contains a conforming XML 1.0 Processor and a pre-canned part of the Application.

I believe this construction completely subverts the intent of the XML 1.0 spec and the vote that the group that defined XML took[4].

Now, I'd like to ask from everyone who has argued the position that the Application may continue processing the stream after the XML 1.0 Processor has signaled a fatal error:
 * Do you believe the above construction black-box-testably constitutes an XML 1.0 Processor and (a part of) an Application? (If not, why not?)
 * Do you believe the construction subverts the intent of the XML 1.0 spec? (If not, why not?)

[1] http://lists.w3.org/Archives/Public/public-html/2008Dec/0250.html
[2] http://lists.w3.org/Archives/Public/www-tag/2008Dec/0048.html
[3] http://www.balisage.net/Proceedings/vol3/html/Quin01/BalisageVol3-Quin01.html
[4] http://lists.w3.org/Archives/Public/w3c-sgml-wg/1997May/0079.html

-- 
Henri Sivonen
hsivonen@iki.fi
http://hsivonen.iki.fi/
Received on Thursday, 19 November 2009 12:54:01 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:41 UTC