Re: [xml-dev] Another published schema broken by XML Schema errata change

Objection to erratum E2-18:

Henry S. Thompson wrote:
> Are you suggesting the contradiction in the spec. regarding dash as a
> range wasn't an problem?  Or that despite having found the error we
> shouldn't have corrected it?

No. I'm saying in the course of correcting it you made an incompatible 
change to the regular expression grammar, and that this wasn't necessary.

First, there was a genuine error in the spec. The sentence "The - 
character is a valid character range only at the beginning or end of a 
·positive character group·" contradicted the grammar, in which the - 
character was allowed anywhere. This sentence should have been removed 
and you removed it.

Second, the grammar was ambiguous. A range like [a-z] could be 
interpreted as a single 'seRange' or as three 'XmlCharIncDash'. This the 
committee "fixed" incompatibly by not allowing an unescaped - except as 
an seRange separator. A simpler, more compatible fix would have been to 
identify the ambiguity and specify how it was to be resolved, i.e., in 
favor of the seRange. This has the additional advantage of being the 
only interpretation that makes sense. It requires more than one token 
lookahead to parse the grammar in this way, but this is hardly an 
unusual or onerous requirement in computer languages.

> In the case of errors like this, which compromise interop because
> different implementations choose different solutions to the problem
> created by the contradiction, it is inevitable that resolving this
> will mean some existing documents which _some_ existing processors
> were happy with become invalid.  The benefits in improved interop are
> worth the resulting need to upgrade, in my opinion.

Actually, it's not inevitable and I seriously doubt interop was improved 
by forcing implementations to disallow previously valid schemas. Unless 
an implementation was either inconsistent or disallowed seRange 
altogether, it interpreted the grammar as I outlined above in the first 
place. The xhtml and jsp schemas mentioned earlier were not posted to 
the net before being validated.

The good news is, if the committee withdraws the grammar changes, 
implementations that have already changed to conform to the Proposed 
recommendation can change back without breaking schemas that were forced 
to change along with them. That will improve interop.

> In any case, having said all that as my personal opinion.  The
> Proposed Edited Recommendation is just that, proposed, so please
> submit a comment to www-xml-schema-comments@w3.org objecting to
> erratum E2-18, if indeed you think the problem it addresses [1]
> shouldn't have been fixed in this way.

Ok.

Bob

> ht
> 
> [1] http://www.w3.org/2001/05/xmlschema-rec-comments.html#pfiregexcharRange

Received on Wednesday, 24 March 2004 07:23:32 UTC