W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2002

Treatment of ^ in regexes

From: James Clark <jjc@jclark.com>
Date: Fri, 5 Apr 2002 11:25:44 +0700
Message-ID: <010b01c1dc59$f4106600$3500a8c0@bkk.thaiopensource.com>
To: "XML Schema Comments" <www-xml-schema-comments@w3.org>
Appendix F says: "All XML characters are valid character ranges, except as
follows:...
The ^ character is only valid at the beginning of a Ěpositive character
groupĚ if it is part of a Ěnegative character groupĚ; ...".  However, the
EBNF doesn't seem consistent with this. Consider

  [^X]

This is ambiguous wrt the EBNF, since "^" is an XmlCharIncDash and thus a
charRange: according to the EBNF it could be a powCharGroup containing "^"
and "X" or a negCharGroup containing "X".  Consider also

  [^]

According to the EBNF, this is unambiguously a posCharGroup containing "^",
but this is inconsistent with the prose.

There are similar problems with "-", but I understand the WG is already
aware of these.  I would suggest you need to resolve the issues with "-" and
"^" consistently.

James
Received on Thursday, 4 April 2002 23:26:10 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:13:00 GMT