W3C home > Mailing lists > Public > xmlschema-dev@w3.org > August 2002

error in Sun test case (xsd001)?

From: Stefan Wachter <Stefan.Wachter@gmx.de>
Date: Sat, 3 Aug 2002 11:26:39 -0400 (EDT)
To: xmlschema-dev@w3.org
Message-ID: <14383.1028388365@www6.gmx.net>




Dear all,

the Sun test case "xsd001.xsd" contains the following element declaration
which seems to be invalid because of two reasons:

1. A complex type can not be restricted and having attributes added at the
same time.
2. The base attribute of the restriction element must refer to a complex
type with simple content.

Thanks for your attention,
--Stefan

	<xsd:element name="root">
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element maxOccurs="7" minOccurs="3" name="child">
					<xsd:complexType>
						<xsd:simpleContent>
							<xsd:restriction base="xsd:string">
								<xsd:minLength value="3" />
								<xsd:maxLength value="10" />
								
								<xsd:attribute name="attr" use="optional">
									<xsd:simpleType>
										<xsd:restriction>
											<xsd:simpleType>
												<xsd:restriction base="xsd:string">
													<xsd:minLength value="3" />
												</xsd:restriction>
											</xsd:simpleType>
											<xsd:maxLength value="10" />
											<xsd:minLength value="5" />
										</xsd:restriction>
									</xsd:simpleType>
								</xsd:attribute>
							</xsd:restriction>
						</xsd:simpleContent>
					</xsd:complexType>
				</xsd:element>
			</xsd:sequence>
		</xsd:complexType>
	</xsd:element>
Received on Monday, 5 August 2002 05:25:38 GMT

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