T
Th.-Fischer
hi,
i have this xml structure
<users>
<user id="root"/> <!-- mandatory! -->
<user id="a"/> <!-- optional -->
<user id="b"/> <!-- optional -->
<user id="c"/> <!-- optional -->
</users>
what i like to define in schema is, that users
MUST HAVE 1 user element with id="root" and
CAN HAVE any other user elements.
My (not working) attempt (userRootType is derived
from userType with restriction pattern="root" for id):
<xsd:element name="users">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="user" type="fcms:userRootType"/>
<xsd:element name="user" type="fcms:userType"
minOccurs="0" maxOccurs="unbounded"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Is it possible, or need I different named elements?
Any Ideas?
i have this xml structure
<users>
<user id="root"/> <!-- mandatory! -->
<user id="a"/> <!-- optional -->
<user id="b"/> <!-- optional -->
<user id="c"/> <!-- optional -->
</users>
what i like to define in schema is, that users
MUST HAVE 1 user element with id="root" and
CAN HAVE any other user elements.
My (not working) attempt (userRootType is derived
from userType with restriction pattern="root" for id):
<xsd:element name="users">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="user" type="fcms:userRootType"/>
<xsd:element name="user" type="fcms:userType"
minOccurs="0" maxOccurs="unbounded"
/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
Is it possible, or need I different named elements?
Any Ideas?