Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » Inherited attributes
Inherited attributes [message #588013] Thu, 03 June 2004 09:57
Mike Lischke is currently offline Mike Lischke
Messages: 78
Registered: July 2009
Member
Hi group,

Currently I'm trying to collect all attributes from a given type in my
schemas. Essentially, this is my code for this task:

EList xsdAttributes = complexType.getAttributeContents();
iterator = xsdAttributes.iterator();
while (iterator.hasNext())
{
XSDAttributeUse attributeContent = (XSDAttributeUse) iterator.next();
XMLAttribute attribute = new XMLAttribute(this, attributeContent);
attributes.add(attribute);
}

Here is an element I'm trying to analyze:

<xs:element name="page" substitutionGroup="odie:tableGroup">
<xs:complexType>
<xs:complexContent>
<xs:extension base="odie:tableType">
<xs:attribute name="cols" type="xs:positiveInteger"
default="80"/>
<xs:attribute name="rows" type="xs:positiveInteger"
default="20"/>
<xs:attribute name="id" type="xs:positiveInteger"
use="required"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>

My problem is that only the 3 here declared attributes are returned by the
above code. In the base type there are more attributes, which I also need.
Is there a single call to get all effective attributes of a given type?

Mike
--
www.soft-gems.net
Previous Topic:xsd plugin directory structure
Next Topic:maxLength not permitted in string
Goto Forum:
  


Current Time: Fri Sep 19 12:02:16 GMT 2014

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

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