Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » XML Schema Definition (XSD) » Dynamic Instance of XSD.ecore
Dynamic Instance of XSD.ecore [message #75197] Tue, 05 August 2008 08:56 Go to next message
Tim Brömme is currently offline Tim BrömmeFriend
Messages: 19
Registered: July 2009
Junior Member
Hi,

I was just trying to use the EMF feature to create dynamic instances of
an ecore file (right click on elment in ecore file -> create dynamic
instance).
If u use this feature on the root element of your model, you are able to
create
an instance of your metamodel without generating an editor.
as I said, I tried this with the XSD.ecore file, but there seems to be a
problem.

These are my steps:

1. Open XSD.ecore with "Sample Ecore Model Editor"
2. Right Click on "XSD Schema -> XSD Scope"
3. "Create Dynamic Instance"
4. Open resulting file with "Sample Reflective Ecore Model Editor"
5. Right Click on "XSD Schmema" -> "new Child" -> "Contents XSD Element
Declaration"
6. Save Model, Close File
7. Open File again -> Several Errors raise ("Value #null is not legal")


These same steps I do with other *.ecore files and it works perfectly.
Most of these are handmade by me / us at TU Berlin, the XSD.ecore is one
of the few which came from "outside".
The first guess is, that "XSD Schema" is not the root element of the XSD
Metamodel, but I have no idea which other element could be the root.
Maybe the problem is somewhere else. Do you have an idea ?


Thanks in adavance,
Tim
Re: Dynamic Instance of XSD.ecore [message #75234 is a reply to message #75197] Tue, 05 August 2008 13:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090109030604020301030607
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Tim,

Because the XSD model wasn't carefully designed to support an XMI
serialization your approach won't work:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=166638

Note that the model wasn't built by using XSD -> Ecore mapping on the
XML schema for schemas, so it doesn't have a document root or all the
extended metadata annotations for serializing in a way to conform to the
schema; that's all hand code stuff.


Tim Br


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Dynamic Instance of XSD.ecore [message #603208 is a reply to message #75197] Tue, 05 August 2008 13:10 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------090109030604020301030607
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 8bit

Tim,

Because the XSD model wasn't carefully designed to support an XMI
serialization your approach won't work:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=166638

Note that the model wasn't built by using XSD -> Ecore mapping on the
XML schema for schemas, so it doesn't have a document root or all the
extended metadata annotations for serializing in a way to conform to the
schema; that's all hand code stuff.


Tim Br


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:XSD to Ecore order attributes
Next Topic:XML and XSD models from string
Goto Forum:
  


Current Time: Fri Apr 19 11:43:12 GMT 2024

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

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

Back to the top