Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » how to get ALL element declarations ?
how to get ALL element declarations ? [message #602669] Wed, 24 October 2007 10:28
Tommaso is currently offline TommasoFriend
Messages: 6
Registered: July 2009
Junior Member

how can I get ALL and not only top-level element declarations from a
schema ?

Using XSDSchema.getElementDeclarations()

for the example below

only returns the element named "sizes"

and not the ones defined inside the following complex type definitions


<xs:schema xmlns:xs="">

<xs:element name="sizes" type="SizesType"/>

<xs:complexType name="SizesType">
<xs:choice maxOccurs="unbounded">
<xs:element name="dressSize" type="DressSizeType"/>
<xs:element name="mediumDressSize" type="MediumDressSizeType"/>

<xs:simpleType name="DressSizeType">
<xs:restriction base="xs:integer">
<xs:minInclusive value="2"/>
<xs:maxInclusive value="18"/>
<xs:pattern value="\d{1,2}"/>

<xs:simpleType name="MediumDressSizeType">
<xs:restriction base="DressSizeType">
<xs:minInclusive value="8"/>
<xs:maxInclusive value="12"/>

Previous Topic:Validation of annotations
Next Topic:Importing old version XSD model to new emf .ecore
Goto Forum:

Current Time: Sun May 20 21:45:19 GMT 2018

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

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

Back to the top