Search code examples
xmlcode-generationemfxmiecore

xmi:id attributes not being exported


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?


Solution

  • Sounds like you want to do data interchange using xmi? The eclipse team frowns upon that. While it is POSSIBLE with lots of kludges, it is "the wrong way." I've been stuck in a situation where someone started doing it that way and tried to recreate the document using generated classes and it simply is too much of a hassle. We ended up using a completely different format and scrapped the old project completely.

    I know that's not what you wanted to hear but its the truth. Sorry.