on 2007 Oct 23 11:23 AM
It is not clear for me how to interpet attribute elements minOccurs/maxOccurs into <choice> element having sub-elements that also have minOccurs/maxOccurs attributes as for example
Schema 1:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="document">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="2">
<xs:element name="A" minOccurs="1" maxOccurs="1"/>
<xs:element name="B" minOccurs="1" maxOccurs="1" />
<xs:element name="C" minOccurs="1" maxOccurs="1"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Schema 2:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="document">
<xs:complexType>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="A" minOccurs="0" maxOccurs="1"/>
<xs:element name="B" minOccurs="0" maxOccurs="1" />
<xs:element name="C" minOccurs="0" maxOccurs="1"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Schema 3:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="document">
<xs:complexType>
<xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="A" minOccurs="1" maxOccurs="1"/>
<xs:element name="B" minOccurs="0" maxOccurs="3" />
<xs:element name="C" minOccurs="0" maxOccurs="1"/>
</xs:choice>
</xs:complexType>
</xs:element>
</xs:schema>
Can somebody give me more information about how to interpret schema 1,
schema 2 and schema 3 ?
Thanks for your help.
Hi,
If i am not wrong,
Schema 1can may occur or may not but should be not more than 2.
Schema 2 should occur atleast once and a maximum of unlimited times
Schema 3 should occur atleast once and a maximum of unlimited times
You can test this easly in the mapping program. (test)
Hope this helps.
Prasad Babu.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
68 | |
9 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.