Hi,
when a model (in this case, generated by an ATL transformation directly assigning the __xmiID__ attribute) is serialized, "xmi:id" are missing in containment references.
An example:
<?xml version="1.0" encoding="ISO-8859-1"?>
<SM:StateMachine xmi:version="2.0" xmlns:xmi="htp://www.omg.org/XMI" xmlns:SM="urn:SimpleStateMachine.ecore" xmi:id="270">
<ownedState name="Begin Installation"/>
<ownedState name="Memory Low"/>
<ownedState name="Disk Error"/>
<ownedState name="Install Software"/>
</SM:StateMachine>
As you can see, "xmi:id" is correctly serialized for the StateMachine element but not for State elements nested by means of the ownedState reference.
When the very same State elements are added to the model without referencing them, the result is what I expect:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xmi:XMI xmi:version="2.0" xmlns:xmi="htp://www.omg.org/XMI" xmlns:SM="urn:SimpleStateMachine.ecore">
<SM:State xmi:id="256" name="Memory Low"/>
<SM:State xmi:id="239" name="Disk Error"/>
<SM:State xmi:id="225" name="Install Software"/>
<SM:State xmi:id="1" name="Begin Installation"/>
<SM:StateMachine xmi:id="270"/>
</xmi:XMI>
When I override the useUUIDs() method of XMIResourceImpl to return true, nothing changes.
Is there a reason why "xmi:id" are missing from containment references?
Is there a way to change this behavior?
Thanks.