W3C home > Mailing lists > Public > xmlschema-dev@w3.org > September 2005

overwrite the attribute definition in derived type

From: Lingzhi Zhang <lzzhang@gmail.com>
Date: Wed, 31 Aug 2005 09:58:14 -0700
Message-ID: <6b0d0f8f05083109582aedcec3@mail.gmail.com>
To: xmlschema-dev@w3.org
Hi,
 I want to overwrite an attribute definition in a derived type in xml 
schema. 
 The base type is
 < xs:complexType name = "base"> 
 < xs:complexContent >
 <xs:restriction base ="xs:anyType" >
 <xs:attribute name ="att" type ="xs:int" use ="optional" default ="1000" />
 </xs:restriction >
 </xs:complexContent >
</xs:complexType >
 The derived type is:
  
<xs:complexType name="type">
<xs:complexContent> 
<xs:extension base="base">
<xs:sequence>
<xs:element name="e" type="xs:string"/>
</xs:sequence>
<xs:attribute name="att" type="xs:int" use="optional" default="1"/> 
</xs:extension>
</xs:complexContent>
</xs:complexType>

Basically, "type" is drived from "base", in type, I want to overwrite the 
attribute "att" to set the default value from "1000" to "1". Is it a valid 
operation? My schema validator always complains about it (I use XMLSpy). Is 
there way to do this? 

Thanks.

Steve
Received on Thursday, 1 September 2005 07:37:53 GMT

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