Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » 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
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: Fri Apr 26 03:49:30 GMT 2024

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

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

Back to the top