C
calestar
Hi !
I'm kinda beginning with XML and I've got this fairly complex schema
(±108 KB on 9 files ... ). I need to do some restriction in it.
The structure is something like :
--------------------------------------------------------------------
<xs:complexType name="myElem">
<xs:sequence>
<xs:element name="title" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="myContainer">
<xs:sequence>
<xs:element name="myList" type="myElem" minOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="myObj">
<xs:sequence>
<xs:element name="myContainerList" type="myContainer"
minOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:element name="myBase">
<xs:complexType>
<xs:sequence>
<xs:element name="myObjList" type="myObj" minOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
--------------------------------------------------------------------
Now, what I need to do is to make sure that a "myElem" element with
a specific title is present somewhere, in at least one container in
any object from the list.
I know I can make it appear at only one place with the <key> or
<unique> directive, but it can be at 2-3 places.
Any help is appreciated !
I'm kinda beginning with XML and I've got this fairly complex schema
(±108 KB on 9 files ... ). I need to do some restriction in it.
The structure is something like :
--------------------------------------------------------------------
<xs:complexType name="myElem">
<xs:sequence>
<xs:element name="title" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="myContainer">
<xs:sequence>
<xs:element name="myList" type="myElem" minOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="myObj">
<xs:sequence>
<xs:element name="myContainerList" type="myContainer"
minOccurs="1" />
</xs:sequence>
</xs:complexType>
<xs:element name="myBase">
<xs:complexType>
<xs:sequence>
<xs:element name="myObjList" type="myObj" minOccurs="1" />
</xs:sequence>
</xs:complexType>
</xs:element>
--------------------------------------------------------------------
Now, what I need to do is to make sure that a "myElem" element with
a specific title is present somewhere, in at least one container in
any object from the list.
I know I can make it appear at only one place with the <key> or
<unique> directive, but it can be at 2-3 places.
Any help is appreciated !