Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » representation of empty entensions
representation of empty entensions [message #565857] Wed, 05 March 2003 16:03
Michael Hartmeier is currently offline Michael HartmeierFriend
Messages: 21
Registered: July 2009
Junior Member
I noticed that eclipse and xerces (2.1) create different representations
for the following Schema:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="child">
<xs:sequence>
<xs:element name="foo" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="parent">
<xs:complexContent>
<xs:extension base="child"/>
</xs:complexContent>
</xs:complexType>
</xs:schema>

Eclipse represents the type "parent" like this:
type "parent"
particle (1,1)
modelgroup
particle (*)
modelgroup (the sequence)
particle (1,1)
element "foo"
And particle (*) is referenced by type "child".

In contrast, Xerces represents type "parent" like this:
type "parent"
particle (*)
modelgroup (the sequence)
particle (1,1)
element "foo"
And particle (*) is referenced by type "child".

In xerces, both types share the same particle whereas eclipse creates a
new top-level particle for type parent.

I don't understand the XSD spec at this point, does it specify a correct
representation of can you choose wether to introduce a particle for empty
extension?

Michael

I also notices the the DOM element for parent's particle is null, is this
intended?
Previous Topic:"xmlns" in the <schema> element
Next Topic:Unmarshalling Problem in eclipse
Goto Forum:
  


Current Time: Thu Apr 25 05:29:50 GMT 2024

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

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

Back to the top