PROBLEM WITH MAXOCCURS ATTRIBUTE -
06-20-2006
, 05:17 PM
Hello,
Please see the following schema:
**********************
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified">
<xs:element name="persons">
<xs:complexType>
<xs:sequence>
<xs:element name="person" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="full_name" type="xs:string"/>
<xs:element name="child_name" type="UserService"
minOccurs="0" maxOccurs="5"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="UserService">
<xs:restriction base="xs:string">
<xs:enumeration value="Alternate Numbers" />
<xs:enumeration value="Anonymous Call Rejection" />
<xs:enumeration value="Attendant Console" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
**********************
If I load this schema to a dataset and then load the following XML data, my
child elements C2 and C3 do not show up in the XML string that I retrieve
back from the dataset.. Can someone help?
**************
<?xml version="1.0" encoding="ISO-8859-1"?>
<persons>
<person>
<full_name>Ganesh Muthuvelu</full_name>
<child_name>C1</child_name>
<child_name>C2</child_name>
<child_name>C3</child_name>
</person>
</persons>
**************
Thanks,
Ganesh |