A question on "Restriction"

If I have a complextType A containing two sub elements B and C.

<complexType name="A">
	<complexContent>
		<element name="B" type="string"/>
		<element name="C" type="string"/>
	</complexContent>
</ComplexType>

Now I wish to define an element E, which is inherited from A. Also, E can
only have B in its content model. Can I do it by using restriction as
following?

<element name="E">
	<complexType>
			<xsd:complexContent>
				<xsd:restriction base="A">
					<xsd:all>
						<xsd:element name="B"
type="xsd:string"/>
					</xsd:all>
				</xsd:restriction>
			</xsd:complexContent>
	</complexType>
</element>


Thanks,

Yimin Zhu
Citadon, Inc.

Received on Thursday, 14 December 2000 19:17:31 UTC