Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Referenced attributes
Referenced attributes [message #599147] Thu, 23 November 2006 10:02
Alexander Koezle is currently offline Alexander KoezleFriend
Messages: 13
Registered: July 2009
Junior Member
Hi,

i have a little problem by retrieving of top-level attributes referenced
in <xsd:attribute/> by "ref".

E.g. we have the following schema:

<!-- top level attribute -->
<xsd:attribute name="attr1" type="xsd:string"/>

<!-- complex type that reference that attribute -->
<xsd:complexType name="complexType1">
<xsd:attribute ref="attr1"/>
</xsd:complexType>

<!-- complex type that extends defined above complex type -->
<xsd:complexType name="extComplexType1">
<xsd:complexContent>
<xsd:extension base="complexType1">
<xsd:attribute name="extAttr1" type="xsd:string" />
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>

1. I can reach the attribute "attr1" on the complex type "complexType1" by
calling of XSDComplexTypeDefinition#getAttributeContents instead of
XSDComplexTypeDefinition#getAttributeUses

2. XSDComplexTypeDefinition#getAttributeContents on the extension
"extComplexType1" doesn't return the "attr1" in the list, so i should
check all my base types recursive to find all "ref"-attributes that i
missing.

So here is my first question - how can i distinguish those
"ref"-attributes from the "normal"? - it seems to be also the instance of
XSDAttributeUse in the list, returned by
XSDComplexTypeDefinition#getAttributeContents

And why don't return the "ref"-attributes in
XSDComplexTypeDefinition#getAttributeUses like by referencing of an
attribute group? What is the difference?

thanks and warm regards,
Alexander
Previous Topic:MinFacet, MaxFacet of xs:int with values 2147483647
Next Topic:Referenced attributes
Goto Forum:
  


Current Time: Thu Apr 25 22:45:20 GMT 2024

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

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

Back to the top