- From: <zongaro@ca.ibm.com>
- Date: Wed, 3 Oct 2001 11:43:11 -0400
- To: www-xml-schema-comments@w3.org
- Message-ID: <OFA0E6C1CB.C1866452-ON85256ADA.0054D6F7@torolab.ibm.com>
Hi Tim, You wrote (in part) However, it does appear that the use of the Kleene Operator in the XML Schema document is incorrect. I don't believe it is valid to define "conditions" that change the definition of the "*" operator. Since the "*" operator is _defined_ to mean "zero or more occurrences of", it is erroneous to then (verbally) qualify the operator in other sections of the document. This is similar to changing the meaning of the mathematical "+" operator. I believe the production rule for the definition of the <restriction> statement is invalid and the editors should correct it. (Reference: XML Schema Part 1: Structures - 3.4.2 XML Representation of Complex Type Definitions http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#element-simpleContent::restriction) Although you are correct, I don't think it's not very practical to express this any other way. For example, consider a regular set of strings consisting of any number of the letters a and b, but at most one instance of each of the letters c and d. One way of specifying this is as follows: (a|b)*((c?(a|b)*d?)|(d?(a|b)*c?))(a|b)* It's much easier to express by saying it has the following form: (a|b|c|d)* with the added restriction that that there is at most one instance of each of c and d. We (meaning humans) abuse notation to simplify things in many other situations. For instance, the syntax of a programming language is often described using a context-free grammar, but few programming languages are actually context-free languages. For instance, there are often requirements that the use of a name be preceded by a declaration of the name (as a variable, say). That can't be expressed using a context-free grammar, but we do it anyway, with a prose or semantic description of the added restriction. Thanks, Henry ------------------------------------------------------------------------ Henry Zongaro XML Parsers development IBM SWS Toronto Lab Tie Line 969-6044; Phone (905) 413-6044 mailto:zongaro@ca.ibm.com
Received on Wednesday, 3 October 2001 11:43:25 UTC