OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: Schema question

[ Lists Home | Date Index | Thread Index ]

Hi Nada,
Let me know if this solution good for you.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified" attributeFormDefault="unqualified">
	<xs:element name="demo">
		<xs:complexType>
			<xs:choice maxOccurs="5">
				<xs:element name="a" type="x.type"/>
				<xs:element name="b" type="x.type"/>
				<xs:element name="c" type="x.type"/>
				<xs:element name="d" type="x.type"/>
				<xs:element name="y" type="y.type"/>
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="x.type"/>
	<xs:complexType name="y.type">
		<xs:complexContent>
			<xs:extension base="x.type"/>
		</xs:complexContent>
	</xs:complexType>
</xs:schema>

-----------------

<demo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:noNamespaceSchemaLocation="D:\SemanticProgrammer\XML-chat\demo.xsd">
	<a/>
	<b/>
	<d/>
	<y/>
	<c/>
</demo>

Good luck,
Vladimir





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS