How to handle XInclude in existing model instances ? [message #1837858] |
Mon, 08 February 2021 14:53  |
Eclipse User |
|
|
|
Hi,
my company is evaluating Sirius as dsl-editor tooling.
Metamodels and models
Currently our models are defined in xsd schemata and our model instances are defined in xml. See the attachment for an simplified example and the description of the example at the end.
Sirius Proof of concept
As a proof of concept I converted the xsd schema to an ecore metamodel and for a part of our models I implemented visualization examples with sirius.
In our proof of concept I instanciated new model instances and created elements via the sirius editor. So far so good - everything works fine.
What does not work
I tried to open (*1) our productive model instances in Sirius, but had problems with XIncludes in the xml files.
(*1: First I renamed the file extensions of the existing productive model xml files to the corresponding model file extension).
For exception stacktrace see next post.
What does work
When I replace the XIncludes in the existing xml model instances with the actual content of that include, it works!
Question
- How can I solve this problem without gluing the model instances into one big model?
- Our models are separated into multiple schemata and corresponding model instances.
-- As far as I can see this is just a logical and physical fragmentation of the model into several files, but they are all glued together in one (big) model file again, which xincludes all other models.
- During our evaluation phase of Sirius I wan't to stay compatible to the existing xsd schemata and xml model instances of our productive code. So it would be nice if I could tweak something on the sirius side instead
Information about provided example
- BigModel: includes all other (root) models (A and C); is the one we use at the end
- ModelA: some root model; includes ModelB
- ModelB: provides some more context to ModelA
- ModelC: another root model
[Updated on: Mon, 08 February 2021 15:03] by Moderator
|
|
|
|
|
|
|
|
Re: How to handle XInclude in existing model instances ? [message #1837987 is a reply to message #1837930] |
Fri, 12 February 2021 02:53  |
Eclipse User |
|
|
|
Hi
If you're happy with Xerces stick with it. Something else will just be irritatingly different.
If you're not happy, move to something else but don't expect something else to be identical to Xerces. Presumably it will on balance be better.
EMF uses XMI for which the href's can be regarded as accesses to remote elements, which is fine for referenced content.
If you need Xinclude to remote a singly contained content, then EMF supports containment references that refer to external Resources.
If you need Xinclude for a multiply shared content then that violates the UML/Ecore single containment principle. You need to think really hard as to whether/why you need it.
Regards
Ed Willink
|
|
|
Powered by
FUDForum. Page generated in 0.06499 seconds