Re: Character ranges in the XSD version XHTML 1.0 Strict

Henri Sivonen <hsivonen@iki.fi> wrote:

> Jing (or presumably Xerces used by it) complains about regexp character  
> ranges of the form '[-+]'. It says '-' must be escaped as '\-'. This  
> makes sense considering the examples at
> http://www.w3.org/TR/xmlschema-0/#regexAppendix
> 
> However, I have trouble deciphering what  
> http://www.w3.org/TR/xmlschema-2/#regexs actually says. It looks like  
> '[-+]' could be allowed.
> 
> Which one is wrong: the validator or the schema?

It was allowed in the original XML Schema (First Edition) REC [1],
then disallowed by XML Schema (First Edition) Errata E2-18 [2] but
later reversed again by E2-67 [3].  So it's still allowed in XML
Schema Second Edition [4], but some XML Schema processors developed
between E2-18 and E2-67 might flag this as an error.

That said, there were problems in that schema document and you might
want to try an updated version [5].

[1] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#regexs
[2] http://www.w3.org/2001/05/xmlschema-errata.html#e2-18
[3] http://www.w3.org/2001/05/xmlschema-errata.html#e2-67
[4] http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#regexs
[5] http://www.w3.org/2004/07/xhtml/xhtml1-strict.xsd

-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Friday, 6 May 2005 06:14:57 UTC