W3C home > Mailing lists > Public > public-html@w3.org > November 2009

Re: XML namespaces on the Web

From: Krzysztof Maczyński <1981km@gmail.com>
Date: Tue, 17 Nov 2009 19:02:54 +0100
Message-ID: <0D420B3B15FF42A295B2AB1C2AFA0880@kmPC>
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>
Cc: <public-html@w3.org>
> 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.
(<?xml parse="lax"?> doesn't include the mandatory version pseudo-attribute.)
Indeed, this seems to be a good reason for the other mechanism I suggested - namely a MIME type parameter. This is the only reasonable way that comes to my mind of retrofitting the mechanism into XML 1.0 and 1.1 while keeping current XML stacks conformant (and for that reason also remove the initial word from:
> Perhaps processors supporting only strict still MAY attempt to parse a document with parse="lax" - all strict documents would be lax with the same meaning after all, except for that pseudo-attribute.

>> 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 already process XML documents related to security or privacy (e.g. P3P, APPEL, XACML, XML Signature). For them I'd find strict parsing definitely more suitable. And in the future more support for these is likely. Besides, anything can be inside XHTML when namespaces are used.

> 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).
Unlike previous attempts, what I propose is author-optional and by default the processor gets to decide (as we both wrote, taking user's preference into account would be nice). While parse="lax" serves just as a hint (valuable especially in the MIME variant), parse="strict" would be used by few authors (e.g. a banking site which displayed uploadable users' photographs from data: URIs). How about:
> Authors are RECOMMENDED not to specify strict parsing unless the criticality of the data warrants it.

Best regards,

Krzysztof Maczyński
Received on Tuesday, 17 November 2009 18:10:56 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:03 UTC