Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 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: Sun Nov 23 00:09:02 GMT 2014

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

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