representation of empty entensions [message #565857] |
Wed, 05 March 2003 16:03 |
Michael Hartmeier 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?
|
|
|
Powered by
FUDForum. Page generated in 0.03823 seconds