Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Ecore mapping discussion
Ecore mapping discussion [message #28973] Wed, 10 September 2003 15:45 Go to next message
Eclipse UserFriend
Originally posted by: ihc.sas-glas.mottmac.com

I'd be interested in rationale and future plans in two areas where the xsd
ecore mapping loses information present in the XML Schema

1) mixed content (mixed = true)
Although I dislike the idea of mixed content, I don't have control over
the schemas that we will encounter. I sympathise with the the XSD approach
of simply having Object "contents". However, this mapping is not very
descriptive of the original XML Schema. Given that XSD 2.0 will have wider
schema-ecore mapping support I wonder if this implementation will
remain...?

2) Enumerations
Only XML Schema enumerations based on NCName become ecore enumerations.
For enumerations based on xsd:string, the XML Schema enumeration info
appears to be lost in the ecore mapping. What's the rationale here - is it
because only NCName is guaranteed to be implementable as an enum in Java?
And as above, does the expansion of ecore mapping in XSD 2.0 mean that a
change in the mapping rules is possible here?

Ian
Re: Ecore mapping discussion [message #29210 is a reply to message #28973] Wed, 10 September 2003 19:13 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Ian,

In 2.0 there will be support for mixed that's much nicer. All the normal
features that you expect would still be generated, but their "backing store"
will delegate onto a single "mixed" feature that will consist of feature-value
pairs and this mixed feature will also be able to capture the mixed text
itself.

JAX generated enums only for NCName restrictions. In 2.0 we will generalize
this to produce an EEnum whether all the enumeration values are valid Java
identifiers.


Ian Cornwell wrote:

> I'd be interested in rationale and future plans in two areas where the xsd
> ecore mapping loses information present in the XML Schema
>
> 1) mixed content (mixed = true)
> Although I dislike the idea of mixed content, I don't have control over
> the schemas that we will encounter. I sympathise with the the XSD approach
> of simply having Object "contents". However, this mapping is not very
> descriptive of the original XML Schema. Given that XSD 2.0 will have wider
> schema-ecore mapping support I wonder if this implementation will
> remain...?
>
> 2) Enumerations
> Only XML Schema enumerations based on NCName become ecore enumerations.
> For enumerations based on xsd:string, the XML Schema enumeration info
> appears to be lost in the ecore mapping. What's the rationale here - is it
> because only NCName is guaranteed to be implementable as an enum in Java?
> And as above, does the expansion of ecore mapping in XSD 2.0 mean that a
> change in the mapping rules is possible here?
>
> Ian
Re: Ecore mapping discussion [message #577771 is a reply to message #28973] Wed, 10 September 2003 19:13 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Ian,

In 2.0 there will be support for mixed that's much nicer. All the normal
features that you expect would still be generated, but their "backing store"
will delegate onto a single "mixed" feature that will consist of feature-value
pairs and this mixed feature will also be able to capture the mixed text
itself.

JAX generated enums only for NCName restrictions. In 2.0 we will generalize
this to produce an EEnum whether all the enumeration values are valid Java
identifiers.


Ian Cornwell wrote:

> I'd be interested in rationale and future plans in two areas where the xsd
> ecore mapping loses information present in the XML Schema
>
> 1) mixed content (mixed = true)
> Although I dislike the idea of mixed content, I don't have control over
> the schemas that we will encounter. I sympathise with the the XSD approach
> of simply having Object "contents". However, this mapping is not very
> descriptive of the original XML Schema. Given that XSD 2.0 will have wider
> schema-ecore mapping support I wonder if this implementation will
> remain...?
>
> 2) Enumerations
> Only XML Schema enumerations based on NCName become ecore enumerations.
> For enumerations based on xsd:string, the XML Schema enumeration info
> appears to be lost in the ecore mapping. What's the rationale here - is it
> because only NCName is guaranteed to be implementable as an enum in Java?
> And as above, does the expansion of ecore mapping in XSD 2.0 mean that a
> change in the mapping rules is possible here?
>
> Ian


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:unexpected differences with/without target namespace
Next Topic:Ecore mapping of simple types
Goto Forum:
  


Current Time: Fri Apr 19 10:56:08 GMT 2024

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

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

Back to the top