Community
Participate
Working Groups
When loading /org.eclipse.ocl.examples.uml25/model/DI.xmi (the UML 2.5 underpinning for UMLDI) it contains <xmi:XMI xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.omg.org/spec/UML/20131001" xmlns:mofext="http://www.omg.org/spec/MOF/20131001"> <uml:Package xmi:type="uml:Package" xmi:id="_0" name="DI" URI="http://www.omg.org/spec/DD/20131001/DI"> .... </uml:Package> <mofext:Tag xmi:type="mofext:Tag" xmi:id="_6" name="org.omg.xmi.nsPrefix" value="di" element="_0"/> </xmi:XMI> The known org.omg.xmi.nsPrefix mofext:Tag is converted to an Ecore Profile in the loaded UML. Ok When saved again (using a ResourceEntityHandler to compress idrefs) we get <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE xmi:XMI [ <!ENTITY _0 "http://www.omg.org/spec/DD/20131001/DC.xmi"> <!ENTITY _1 "http://www.omg.org/spec/UML/20131001/UML.xmi"> <!ENTITY _2 "http://www.omg.org/spec/UML/20131001/PrimitiveTypes.xmi"> <!ENTITY _3 "pathmap://UML_PROFILES/Ecore.profile.uml"> ]> <xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.omg.org/spec/UML/20131001"> <uml:Package xmi:id="_0" name="DI" URI="http://www.omg.org/spec/DD/20131001/DI"> ... <profileApplication xsi:type="uml:ProfileApplication" applyingPackage="_0"> <xmi:Extension extender="http://www.eclipse.org/emf/2002/Ecore"> <eAnnotations xsi:type="ecore:EAnnotation" source="http://www.eclipse.org/uml2/2.0.0/UML"> <references xsi:type="ecore:EPackage" href="&_3;#_z1OFcHjqEdy8S4Cr8Rc_NA"/> </eAnnotations> </xmi:Extension> <appliedProfile xsi:type="uml:Profile" href="&_3;#_0"/> </profileApplication> </uml:Package> <Ecore:EPackage base_Package="_0" nsPrefix="di"/> </xmi:XMI> The save correctly uses xmlns:uml="http://www.omg.org/spec/UML/20131001" but fails to reverse the Ecore Profile back into a org.omg.xmi.nsPrefix Tag and fails to remove the unwanted profile application. The OMG namespaces are therefore polluted by Eclipse UML namespaces.