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
 I want to overwrite an attribute definition in a derived type in xml 
 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:extension base="base">
<xs:element name="e" type="xs:string"/>
<xs:attribute name="att" type="xs:int" use="optional" default="1"/> 

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? 


Received on Thursday, 1 September 2005 07:37:53 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:56:08 UTC