Dynamic Instance of XSD.ecore [message #75197] |
Tue, 05 August 2008 08:56  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Re: Dynamic Instance of XSD.ecore [message #603208 is a reply to message #75197] |
Tue, 05 August 2008 13:10  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04150 seconds