Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » XML Schema Definition (XSD) » representation of empty entensions
representation of empty entensions [message #13506] Wed, 05 March 2003 11:03 Go to next message
Eclipse User
Originally posted by: Michael.Hartmeier.softwareag.com

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?
Re: representation of empty entensions [message #13529 is a reply to message #13506] Wed, 05 March 2003 13:02 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

Michael,

You ask such good questions! The XSD model definitely has this wrong; the
empty particles should be removed and the particle tree should reflect that.
Please consider opening a bugzilla defect to track this.

The root particle is "synthetic" so it doesn't correspond to any DOM element
and the value is therefore null.


Michael Hartmeier wrote:

> 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?
Re: representation of empty entensions [message #13740 is a reply to message #13506] Tue, 11 March 2003 11:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

Michael,

This will be fixed in the next drop of version 1.0.2; it's not fixed yet in
the current drop of version 1.0.2.

Michael Hartmeier wrote:

> 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?
Re: representation of empty entensions [message #13761 is a reply to message #13740] Wed, 12 March 2003 05:55 Go to previous message
Eclipse User
Originally posted by: Michael.Hartmeier.softwareag.com

Thank you. The speed you fix bug is quite impressive!

Michael

Ed Merks wrote:

> Michael,

> This will be fixed in the next drop of version 1.0.2; it's not fixed yet in
> the current drop of version 1.0.2.

> Michael Hartmeier wrote:

> > 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?
Re: representation of empty entensions [message #565895 is a reply to message #13506] Wed, 05 March 2003 13:02 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Michael,

You ask such good questions! The XSD model definitely has this wrong; the
empty particles should be removed and the particle tree should reflect that.
Please consider opening a bugzilla defect to track this.

The root particle is "synthetic" so it doesn't correspond to any DOM element
and the value is therefore null.


Michael Hartmeier wrote:

> 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?
Re: representation of empty entensions [message #566238 is a reply to message #13506] Tue, 11 March 2003 11:30 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 25999
Registered: July 2009
Senior Member
Michael,

This will be fixed in the next drop of version 1.0.2; it's not fixed yet in
the current drop of version 1.0.2.

Michael Hartmeier wrote:

> 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?
Re: representation of empty entensions [message #566281 is a reply to message #13740] Wed, 12 March 2003 05:55 Go to previous message
Michael Hartmeier is currently offline Michael Hartmeier
Messages: 21
Registered: July 2009
Junior Member
Thank you. The speed you fix bug is quite impressive!

Michael

Ed Merks wrote:

> Michael,

> This will be fixed in the next drop of version 1.0.2; it's not fixed yet in
> the current drop of version 1.0.2.

> Michael Hartmeier wrote:

> > 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:Detecting errors in XSD Parsing
Next Topic:Help: Simple example of parsing a ComplexType?
Goto Forum:
  


Current Time: Thu Aug 21 20:06:22 EDT 2014

Powered by FUDForum. Page generated in 0.01803 seconds