restricting attributes [message #564501] |
Wed, 08 January 2003 10:19 |
Michael Hartmeier Messages: 21 Registered: July 2009 |
Junior Member |
|
|
I have a schema where a type \"derived\" is a restricting of a type
\"base\"
(see below). If I inspect the attribute uses of type \"derived\" (i.e. I
call XSDComplexTypeDefinition.getAttributeUses), I can\'t find attribute
\"c\"!?
I\'ve checked the XML Schema spec: as far as I understand it,
\"derived\"\'s attribute uses should contain attribute \"c\". Is there
anything wrong with my schema or could this be an XSD problem? I\'m using
build 20021023_1900TL.
Michael
<xs:complexType name=\'base\'>
<xs:sequence>
<xs:element name=\'x\' type=\'xs:string\'/>
</xs:sequence>
<xs:attribute name=\'a\' type=\'xs:string\' use=\'optional\'/>
<xs:attribute name=\'b\' type=\'xs:string\' use=\'optional\'/>
<xs:attribute name=\'c\' type=\'xs:string\' use=\'optional\'/>
</xs:complexType>
<xs:complexType name=\'derived\' >
<xs:complexContent>
<xs:restriction base=\'base\'>
<xs:sequence>
<xs:element name=\'x\' type=\'xs:string\'/>
</xs:sequence>
<xs:attribute name=\'a\' type=\'xs:string\' use=\'required\'/>
<xs:attribute name=\'b\' type=\'xs:string\' use=\'prohibited\'/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
|
|
|
Powered by
FUDForum. Page generated in 0.02729 seconds