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

Attribute uses of complexType complexContent restriction

From: Lemmin, Harald <Harald.Lemmin@softwareag.com>
Date: Thu, 13 Dec 2001 10:10:44 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E6210601E3A853@softwareag.com>
To: xmlschema-dev@w3.org

I'm confused about the attribute uses of complexType complexContent
The primer states in "4.4 Deriving Complex Types by Restriction":
"Notice that types derived by restriction must repeat all the components of
the base type definition that are to be included in the derived type:"
My question: Does this hold true for the attribute declarations, too?
	<xs:complexType name="baseType">
		<xs:attribute name = "att1" type = "xs:string" use =
		<xs:attribute name = "att2" type = "xs:string" use =
		<xs:attribute name = "att3" type = "xs:string" use =
		<xs:attribute name = "att4" type = "xs:string" use =

	<xs:complexType name="restrictedType">
			<xs:restriction base = "target:baseType">
				<xs:attribute name = "att1" type =
"xs:string" use = "required"/>
				<xs:attribute name = "att2" type =
"xs:string" use = "prohibited"/>
				<xs:attribute name = "att3" type =
"xs:string" use = "optional"/>

That means:
att1 -> restricted by putting from optional to required.
att2 -> restricted by putting from optional to prohibited.
att3 -> mentioned again, because it should be still there.
att4 -> not mentioned, because "restrictedType" should not have this

Am I right? I know that the definition in the structures specification  is
more difficult, but I'm not able to understand it.

Kind regards,
Received on Thursday, 13 December 2001 04:10:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:54 UTC