Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » XMI id attributes not being exported
XMI id attributes not being exported [message #1393226] Thu, 03 July 2014 13:01 Go to next message
David Carver is currently offline David CarverFriend
Messages: 174
Registered: July 2009
Senior Member
We have an Ecore model that we needed to generate an XSD for so that other non-EMF tools can read and produce the related XML model. The problem is that none of the XMI specific attributes are being exported as part of the model. There are several items that require XMI's referential integrity support, and this is referenced by XMI as an xmi:id, however when the mode is exported the XMI namespace isn't referenced in any of the schemas and there is no xmi.xsd generated or referenced from the generated xsds.

Is there something that we missed when exporting the XSD from Ecore?

Re: XMI id attributes not being exported [message #1393235 is a reply to message #1393226] Thu, 03 July 2014 13:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
David,

Comments below.

On 03/07/2014 3:01 PM, David Carver wrote:
> We have an Ecore model that we needed to generate an XSD for so that
> other non-EMF tools can read and produce the related XML model. The
> problem is that none of the XMI specific attributes are being exported
> as part of the model.
XMI is not a good interchange format for tools that are not model aware.
> There are several items that require XMI's referential integrity
> support, and this is referenced by XMI as an xmi:id, however when the
> mode is exported the XMI namespace isn't referenced in any of the
> schemas and there is no xmi.xsd generated or referenced from the
> generated xsds.
Yes, technically an xmi:id isn't part of the model. It's managed by the
resource and the model knows nothing about it.
>
> Is there something that we missed when exporting the XSD from Ecore?
If interchange is important, you'd be better to use a XML serialization
and model things like ID in your model. And in general you'll have to
avoid things not supported by XML Schema, most notably multiple inheritance.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: XMI id attributes not being exported [message #1393318 is a reply to message #1393235] Thu, 03 July 2014 15:57 Go to previous messageGo to next message
Gabriel Seibert is currently offline Gabriel SeibertFriend
Messages: 1
Registered: July 2014
Junior Member
Ed, thanks for the quick response.

The document we are creating is opened from 3rd party software which relies on the xmi:id attributes. So simply using another method is not an option here.
Re: XMI id attributes not being exported [message #1393643 is a reply to message #1393318] Fri, 04 July 2014 04:12 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
This sounds a little like the discussion in this thread.

https://www.eclipse.org/forums/index.php/t/653779/

It is still possible to serialize a modeled ID as xmi:id using extended
metadata annotations.

On 03/07/2014 6:27 PM, Gabriel Seibert wrote:
> Ed, thanks for the quick response.
>
> The document we are creating is opened from 3rd party software which
> relies on the xmi:id attributes. So simply using another method is
> not an option here.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[code-gen] How to make EMF to add extra comments to the generated code
Next Topic:[XCORE] The required library 'org.eclipse.emf.xcore.lib' isn't on the classpath
Goto Forum:
  


Current Time: Thu Mar 28 20:46:15 GMT 2024

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

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

Back to the top