This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 4010 - Regex tests using a{,2}
Summary: Regex tests using a{,2}
Status: RESOLVED FIXED
Alias: None
Product: XML Schema Test Suite
Classification: Unclassified
Component: Microsoft tests (show other bugs)
Version: 2006-11-06
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Henry S. Thompson
QA Contact: XML Schema Test Suite mailing list
URL:
Whiteboard: metadata update and schema fix confir...
Keywords:
: 4055 4145 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-11-24 16:31 UTC by Michael Kay
Modified: 2010-02-02 15:12 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2006-11-24 16:31:18 UTC
The following four tests use the regex syntax "a{,2}". This syntax is not valid in XML Schema, but the tests are described as valid.

test-set  MS-Regex2006-07-15
tests     reC65 reC66 reC67 reC68
Comment 1 Arthur De Magalhaes 2007-01-15 21:26:34 UTC
This bug is also present in the following files:

msData/element/elemE001.xsd
msData/element/elemE002.xsd
msData/element/elemE003.xsd
msData/element/elemE004.xsd
msData/element/elemE005.xsd
Comment 2 Michael Kay 2008-06-20 14:48:57 UTC
Noted that in 1.0 there is actually a parse for this expression because "{" is a valid Char. (PCRE will try to interpret a quantifier as such if it can, and will treat it as an ordinary string otherwise.) But this would create an unacceptable incompatibility, and is not what the spec intended. This is confirmed by the Note:

Note:  The regular expression language in the Perl Programming Language [Perl] does not include a quantifier of the form S{,m}, since it is logically equivalent to S{0,m}. We have, therefore, left this logical possibility out of the regular expression language defined by this specification.

It may be necessary to fix the spec. Raised bug #5778.
Comment 3 Michael Kay 2008-06-20 15:00:42 UTC
*** Bug 4055 has been marked as a duplicate of this bug. ***
Comment 4 Michael Kay 2008-06-20 15:09:41 UTC
For the re tests, decided to change the metadata to indicate that the schema is invalid. For the element tests, decided to change the schema documents to use a valid regex (change {,5} to {0,5}) as this retains the intent of the tests.
Comment 5 Henry S. Thompson 2010-02-02 15:12:25 UTC
*** Bug 4145 has been marked as a duplicate of this bug. ***