Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » restricting attributes
restricting attributes [message #564501] Wed, 08 January 2003 10:19
Michael Hartmeier is currently offline Michael HartmeierFriend
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>
Previous Topic:xerces version
Next Topic:elementFormDefault="qualified"
Goto Forum:
  


Current Time: Tue Apr 16 18:26:26 GMT 2024

Powered by FUDForum. Page generated in 2.99977 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top