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

Re: XML namespaces on the Web

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 17 Nov 2009 18:09:54 +0100
Message-ID: <4B02D8E2.4020000@lachy.id.au>
To: Krzysztof Maczyński <1981km@gmail.com>
Cc: public-html@w3.org, public-xml-core-wg@w3.org
Krzysztof Maczyński wrote:
> Both on the Web and elsewhere there are circumstances warranting
> strict or lax parsing. This was already a highly debated point when XML
> was designed. Already then we knew that for dissenting opinions usually
> a good solution is to include both ways things can work and a switch.
> Having the experience of over 10 years, it's clear that the needs of
> both sides are valid and not going away [1]. Therefore I'd like to
> propose XML 1.2 with a pseudo-attribute parse accepting values strict
> and lax added to the XML and text declaration. strict would do what
> parsers currently do (unifying XML 1.0 Fifth Edition with XML 1.1 Second
> Edition in some sensible way) and lax would use an algorithm based on
> Anne van Kesteren's draft, but returning an Infoset.

This would have the unfortunate side effect of causing existing XML 1.0 
parsers encountering <?xml parse="lax"?> to throw a well-formedness 
error, thus losing all the benefits of backwards compatibility that the 
original XML5 proposal has.

> I think authoring (generating) content is the time at which the
> knowledge of which parsing algorithm will be desirable is usually
> best. When the pseudo-attribute is absent though, the processor can
> choose (possibly following a setting > of the user).

No, the parsing algorithm should be determined at parse time depending 
on the needs of the application.  A web browser, for example, would 
typically always want to use graceful error recovery for web content, 
like XHTML, SVG, etc.

Some browsers might choose to offer some sort of debug mode intended for 
authors that allows them to enable strict error handling, but such a 
feature should be controlled entirely by user preference, rather than 
something tied directly to the document itself.

Otherwise, we're likely to see some authors include the parse="strict" 
pseudo-attribute in their documents, and inadvertently leave it in 
there, potentially subjecting end users to otherwise avoidable YSoD 
errors (particularly in cases involving generated XML, as opposed to 
static, hand-authored XML files).

-- 
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
Received on Tuesday, 17 November 2009 17:10:35 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:40:40 UTC