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

Re: Part 2: problems with 'pattern' spec

From: <zongaro@ca.ibm.com>
Date: Wed, 6 Feb 2002 15:23:58 -0500
To: www-xml-schema-comments@w3.org, rthompson@contivo.com
Message-ID: <OF6BBFDDFE.CDA33F88-ON85256B58.006CBF59@torolab.ibm.com>
Hi Ross,

     In [3], you wrote:

I found two problems, I think, with the specification of the pattern

1) The type of the 'value' attribute of pattern is 'anySimpleType.' [1]
   Should it not be 'string'?

2) The definition of 'atom' in the BNF for regular expressions [2]

        atom ::= Char | charClass | ( '(' regExp ')' )

   'Char' says

        Char ::= [^.\?*+()|#x5B#x5D]

    Since '()' is included in 'Char', the status of these characters
    is, strictly speaking, ambiguous w.r.t. parsing an atom.

- Roß

[1] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#element-pattern
[2] http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#nt-atom


     Regarding your second point, the caret (^) at the beginning of the 
regular expression that defines "Char" indicates that that's a 
"negCharGroup", which means roughly "match anything except these 
characters."  So parentheses are actually excluded from Char, and I 
believe there's no ambiguity in parsing "atom".

     I'll leave it for someone else to respond to your first point.


Henry Zongaro      XML Parsers development
IBM SWS Toronto Lab   Tie Line 969-6044;  Phone (905) 413-6044
Received on Wednesday, 6 February 2002 15:24:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:57 UTC