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

RE: Question about 3.4.2, <restriction> content

From: Biron,Paul V <Paul.V.Biron@kp.org>
Date: Fri, 22 Apr 2005 10:45:29 -0700
Message-Id: <8E9F0028F5955844899380433C60E39905F8786B@cscrdemsg001.crdc.kp.org>
To: "'Alain Frisch'" <Alain.Frisch@inria.fr>, W3C XML Schema Comments list <www-xml-schema-comments@w3.org>
> -----Original Message-----
> From: Alain Frisch [mailto:Alain.Frisch@inria.fr] 
> Sent: Thursday, April 21, 2005 7:29 PM
> To: W3C XML Schema Comments list
> Subject: Question about 3.4.2, <restriction> content
> 
> In section 3.4.2, we can read:
> 
> =============================================================
> <restriction
>    base = QName
>    id = ID
>    {any attributes with non-schema namespace . . .}>
>    Content: (annotation?, (simpleType?, (minExclusive | 
> minInclusive | 
> maxExclusive | maxInclusive | totalDigits | fractionDigits | length | 
> minLength | maxLength | enumeration | whiteSpace | pattern)*)?, 
> ((attribute | attributeGroup)*, anyAttribute?))
> </restriction> 
> =============================================================
> 
> I'm wondering why the ? after "pattern)*)"  is here, since it 
> does not change the language recognized by the regular expression.

You're right...either the '?' after simpleType or after the entire clause COULD be removed and the language would be the same.  Those regexes are programatically generally from reading the schema-for-schemas and I'm not sure it's worth tracking down how to "simplify" the regex...if it were wrong then it would certainly be worthwhile.  Maybe Henry could comment on the work involved.

pvb
Received on Friday, 22 April 2005 17:58:06 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 23 October 2007 06:13:36 GMT