Jump to content

Restrictions for extended types?


Guest Moebius

Recommended Posts

Guest Moebius

Hi all,I have a schema with roughly the following structure:

<xs:complexType name="Parent" abstract="true">	<xs:sequence>		...	</xs:sequence></xs:complexType><xs:complexType name="A">	<xs:complexContent>		<xs:extension base="Parent">			<xs:sequence>				...			</xs:sequence>		</xs:extension>	</xs:complexContent></xs:complexType><xs:complexType name="B">	<xs:complexContent>		<xs:extension base="Parent">			<xs:sequence>				...			</xs:sequence>		</xs:extension>	</xs:complexContent></xs:complexType><xs:complexType name="C">	<xs:complexContent>		<xs:extension base="Parent">			<xs:sequence>				...			</xs:sequence>		</xs:extension>	</xs:complexContent></xs:complexType><xs:complexType name="Test">	<xs:sequence>		<xs:element name="X" type="Parent"/>		<xs:element name="Y" type="Parent"/>	</xs:sequence></xs:complexType>

With this schema both attributes "X" and "Y" within type "Test" could be any of the (non-abstract) derived types of type "Parent", namely "A", "B", or "C".Now I need to specify a restriction in the sense of "X may only be of types A or B while Y may only be of types A or C".My problem is that I don't know whether this is even possible with a schema and how it could be done.Any help would be appreciated.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...