W3C home > Mailing lists > Public > xmlschema-dev@w3.org > March 2001

Is this valid schema??

From: Ayalew Kassahun <A.Kassahun@InfoRay.NL>
Date: Tue, 20 Mar 2001 15:06:16 +0100
Message-ID: <7FAFD1931B62D411B2890050BAB19FB1453B02@ms1.inforay.nl>
To: xmlschema-dev@w3.org
hi list:


xmlspy allows me to make (it validates) the following schema snipet, but i
am suspecious about it. Is it allowed to have more than one "PART" element
that vary only on a value of an attribute in the element RESULT. 

can someone enlighten me.

regards,
ayalew

	<xsd:complexType name="RESPONSE">
		<xsd:choice>
			<xsd:element name="RESULT">
				<xsd:complexType>
					<xsd:sequence>
						<xsd:element name="PART">
							<xsd:complexType>
	
<xsd:attribute name="NAME" type="xsd:string" use="fixed" value="HEADER"/>
							</xsd:complexType>
						</xsd:element>
						<xsd:element name="PART">
							<xsd:complexType>
	
<xsd:attribute name="NAME" type="xsd:string" use="fixed" value="CONTENT"/>
							</xsd:complexType>
						</xsd:element>
					</xsd:sequence>
				</xsd:complexType>
			</xsd:element>
			<xsd:element name="EXTRA"/>
		</xsd:choice>
		<xsd:attribute name="NAME"/>
	</xsd:complexType>
Received on Tuesday, 20 March 2001 08:52:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:20 GMT