prohibiting attributes in extension [message #564440] |
Wed, 08 January 2003 10:02 |
Michael Hartmeier Messages: 21 Registered: July 2009 |
Junior Member |
|
|
Eclipse allows to create a schema where a derived type prohibites an
attribute of the base type. Is this correct, is the attached schema valid
according the the XML schema spec? I'd expect to see some kind of XSD
diagnostics, but there are none (with XSD 20021023_1900TL).
Michael
<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema'>
<xs:complexType name='base'>
<xs:sequence>
<xs:element name='a' type='xs:string'/>
</xs:sequence>
<xs:attribute name='a' type='xs:string' use='required'/>
<xs:attribute name='b' type='xs:string' use='required'/>
</xs:complexType>
<xs:complexType name='derived' >
<xs:complexContent>
<xs:extension base='base'>
<xs:sequence>
<xs:element name='b' type='xs:string'/>
</xs:sequence>
<xs:attribute name='b' type='xs:string' use='prohibited'/>
<xs:attribute name='c' type='xs:string' use='required'/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
|
|
|
Powered by
FUDForum. Page generated in 0.03000 seconds