Community
Participate
Working Groups
I've just tried to edit a 3.0.0 CMOF so that it became a 4.0.0 CMOF although referenced from a still 3.0.0 CMOF. My standalone build scripts no longer work because I was using a *.cmof factory registration. In trying to fix this, I've explained a number of recent problems, but have yet to find a clear solution. *.ecore2xml must be registered globally since it is used from transiently created ResourceSets. Registering content handlers globally is pointless since delegation does not use the global URIConverter. Content handlers must be registered on a local ResourceSet. There must be no local registration of *.cmof, *.uml, *.xmi if reading is to be content type sensitive. There must be a registration of *.cmof, *.uml, *.xmi if writing of default content is to succeed. There must be no local registration of the extension * or the content type * if the reference to http://schema.omg.org/spec/XMI/2.1 is to successfully fall through to a demand created package. If a default XMIResourceFactory is in use you get org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (http://schema.omg.org/spec/XMI/2.1, 1, 7) for 'http://schema.omg.org/spec/XMI/2.1' org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'html' is not found or is abstract. (http://schema.omg.org/spec/XMI/2.1, 1, 7) for 'http://schema.omg.org/spec/XMI/2.1' org.eclipse.emf.ecore.xmi.XMIException: org.xml.sax.SAXParseException: The element type "link" must be terminated by the matching end-tag "</link>". (http://schema.omg.org/spec/XMI/2.1, 9, 3) for 'http://schema.omg.org/spec/XMI/2.1' since there is an HTML OMG web page at http://schema.omg.org/spec/XMI/2.1.
There is a solution. The version of /org.eclipse.ocl.examples.pivot/src/org/eclipse/ocl/examples/pivot/uml/UMLUtils.java just committed to MDT/OCL branch bug/318092 applies distinct initialization for local and global contexts satisfying all the constraints.
So I can close this bug, then?
Yet another duplicate of 364419.
*** This bug has been marked as a duplicate of bug 364419 ***
(In reply to comment #0) > Registering content handlers globally is pointless since delegation does not > use the global URIConverter. Content handlers must be registered on a local > ResourceSet. No. global content handlers can be initialized on ContentHandler.Registry.INSTANCE. It is using URIConverter.INSTANCE.getContentHandlers() that is pointless.