- From: Torsten Grust <Torsten.Grust@uni-konstanz.de>
- Date: Thu, 12 Feb 2004 10:39:52 +0100
- To: xmlschema-dev@w3.org
G'day all,
I would be very grateful if anybode could enlighten me on the
following ambiguity issue.
The following declaration for element a is clearly ambigious (and XSV
2.6-2 complains accordingly):
<xs:element name="a">
<xs:complexType>
<xs:sequence>
<xs:element name="b" type="xs:integer"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="c" type="xs:integer"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="b" type="xs:integer"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="c" type="xs:integer"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The content model for element a essentially is b*c*b*c*.
If I rephrase the schema as follows, the content model language for
element a does not change and---surprisingly to me---there is no
ambiguity issue anymore according to XSV:
<xs:element name="a">
<xs:complexType>
<xs:sequence minOccurs="2" maxOccurs="2">
<xs:element name="b" type="xs:integer"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="c" type="xs:integer"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
The content model now is (b*c*)^2,2 (where r^n,m represents an n-fold minimum
and m-fold maximum occurence of r).
I fail to see how this reformulation resolves the ambiguity. I would
greatly appreciate any insight on this.
Best wishes and thank you,
--Torsten
--
| Dr. Torsten Grust Torsten.Grust@uni-konstanz.de |
| http://www.inf.uni-konstanz.de/~grust/ |
| Database Research Group, University of Konstanz (Lake Constance/Germany) |
| (Please avoid sending me MS Word or PowerPoint attachments.) |
Received on Thursday, 12 February 2004 04:39:54 UTC