Bug 562833 - UML 2.5 tooling cannot read the UML 2.5 serialisation of UML 2.5.1
Summary: UML 2.5 tooling cannot read the UML 2.5 serialisation of UML 2.5.1
Status: NEW
Alias: None
Product: MDT.UML2
Classification: Modeling
Component: Core (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: UML2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-05 09:30 EDT by Ed Willink CLA
Modified: 2020-05-06 04:00 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2020-05-05 09:30:44 EDT
Once 20131001 family namespaces are available, separate bug, attempting to load https://www.omg.org/spec/UML/20161101/UML.xmi which is a UML 2.5 serialization fails with (using repro approach below)

org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'null' not found. (platform:/resource/org.eclipse.uml2/model/UML.xmi, 3, 17)

org.eclipse.emf.ecore.xmi.ClassNotFoundException: Class 'documentation' is not found or is abstract. (platform:/resource/org.eclipse.uml2/model/UML.xmi, 3, 17)
	
This is caused by a documentation preamble

<?xml version="1.0" encoding="UTF-8"?>
<xmi:XMI xmlns:uml="http://www.omg.org/spec/UML/20131001"
         xmlns:xmi="http://www.omg.org/spec/XMI/20131001"
         xmlns:mofext="http://www.omg.org/spec/MOF/20131001">
	<documentation>
		<shortDescription>UML.xmi: XMI representation of the metamodel for UML 2.5.1.</shortDescription>
	<documentation>
	<uml:Package xmi:type="uml:Package" xmi:id="_0" name="UML"

At first sight the problem is badly formed XML, since the 'root' documentation element uses an undeclared blank xmlns.

But no, documentation is a valid xmi:XMI element child.

This problem can be reproduced by editing /org.eclipse.uml2/model/UML.xmi to add the root <documentation> and then open with the UML Model Editor.

It appears that child xmi elements are not honored.

(Workaround use xmi:Documentation but OMG didn't do that.)

----

Additional confusion, the spelling of "documentation" has been consistent in the diagrams of the XMI 2.0 and later specification and in http://www.omg.org/spec/XMI/20110701/XMI.xsd, but up until XMI 2.5.1 and https://issues.omg.org/issues/XMI24-178, the spelling is also "Documentation" in the inline exposition of the XSD.

7.5.5 <xsd:element name="Documentation" type="Documentation"/>
Comment 1 Ed Willink CLA 2020-05-05 10:07:29 EDT
(In reply to Ed Willink from comment #0)
> Once 20131001 family namespaces are available, separate bug

No once I get rid of my pre-UML-2.5 prototype declarations, the 20131001 family names seem good.
Comment 2 Ed Willink CLA 2020-05-05 14:46:55 EDT
This all comes from https://www.eclipse.org/forums/index.php?t=msg&th=1103625&goto=1826867&#msg_1826867 where German Vega discovers that XMI 2.5.1 prohibits unqualified "documentation". It looks as if the UML 2.5.1 UML.xmi is illegal.

Have to see how https://issues.omg.org/browse/UMLR-771 fares.