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 06:28
Tommaso is currently offline Tommaso
Messages: 6
Registered: July 2009
Junior Member
Hi,

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

Thanks.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

<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:choice>
</xs:complexType>

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

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


</xs:schema>
Previous Topic:Validation of annotations
Next Topic:Importing old version XSD model to new emf .ecore
Goto Forum:
  


Current Time: Sun Apr 20 06:52:01 EDT 2014

Powered by FUDForum. Page generated in 0.02099 seconds