Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Re: Generate XMI instead of UML
Re: Generate XMI instead of UML [message #626712] Mon, 16 June 2008 09:42
Ed Merks is currently offline Ed MerksFriend
Messages: 31043
Registered: July 2009
Senior Member
Guys,

Comments below.

Marc Flauw wrote:
> Ed, Eric,
>
> Thanks for the comments
>
> A few things: 1) XMLSpy does not like the xsischema generated by
> tigerstripe:
> xsi:schemaLocation="http:///schemas/TIPProfileProfile/_wl--YDhwEd2w7ILmv08oyg/0
> umlProfile/TIP NGOSS SA.Profile.uml#_wmIIAThwEd2w7ILmv08oyg"
A conforming XML processor is going to split the value into a list of
values using white space as a separator and it's going to expect there
to be pairs of namespace URI to location URI mappings. For this reason,
it's generally important for the URIs of resources to be encoded where
space is represented as %20 and namespaces themselves should not contain
any spaces either (in order to conform to the RCF for URIs).
>
> Looks strange indeed!!
>
> 2)today, the UML generated is already starting with an xmi tag:
> <xmi:XMI xmi:version="2.1"
> 3) I tried renaming the uml file generated by TS to .xmi. ArgoUML
> complains that the XMI version is not present, but the details of the
> error message says that both XMI and UML versions need to be present.
I'm pretty sure if you want Argo to read it, you have to open it in the
UML editor and save it to a file with *.xmi extension and that doing so
will serialize in a specification-conforming way.
> 4) I compared the headers generated by TS and the headers generated by
> ArgoUML:
> TS: <xmi:XMI xmi:version="2.1"
> xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:TIPProfileProfile="http:///schemas/TIPProfileProfile/_wl--YDhwEd2w7ILmv08oyg/0"
> xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
> xmlns:uml="http://www.eclipse.org/uml2/2.1.0/UML"
> xsi:schemaLocation="http:///schemas/TIPProfileProfile/_wl--YDhwEd2w7ILmv08oyg/0
> umlProfile/TIP NGOSS SA.Profile.uml#_wmIIAThwEd2w7ILmv08oyg">
>
> <uml:Model xmi:id="_wxAiUDhwEd2w7ILmv08oyg" name="distrib.core.model">
>
> ArgoUML:
> <XMI xmi.version = '1.2' xmlns:UML = 'org.omg.xmi.namespace.UML'
> timestamp = 'Mon Jun 16 08:27:39 CEST 2008'>
> <XMI.header> <XMI.documentation>
> <XMI.exporter>ArgoUML (using Netbeans XMI Writer version 1.0)
> </XMI.exporter>
> <XMI.exporterVersion>0.24(5) revised on $Date: 2006-11-06
> 19:55:22 +0100 (Mon, 06 Nov 2006) $ </XMI.exporterVersion>
> </XMI.documentation>
> <XMI.metamodel xmi.name="UML" xmi.version="1.4"/></XMI.header>
> <XMI.content>
> <UML:Model xmi.id =
> '-64--88-0-10--2de6bd66:11348b2564b:-8000:00000000000007CF'
> name = 'untitledModel'
This looks like an antiquated version of XMI and and antiquated version
of UML. Doesn't it support XMI 2.x nor UML 2.x?
> Note the ligne <XMI.metamodel xmi.name="UML" xmi.version="1.4"/>
> 5) I tried to load the distrib model as xmi with Together. It
> complains that http://www.eclipse.org/uml2/2.1.0/UML does not exist
> and indeed, it does not seem to exist.
You'll really need to serialize using UML's support for serializing to
XMI, not just renaming a .uml serialization.
> 6)I used Together 2006 from Borland to generate a dummy model and
> export it to UML2. Here is the output: <?xml version="1.0"
> encoding="UTF-8"?>
> <uml:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML"
> xmi:id="_2PWfsDtuEd2VLtmB2rf56Q" name="Test"
> appliedProfile="_2PWfsTtuEd2VLtmB2rf56Q">
> <packageImport xmi:type="uml:ProfileApplication"
> xmi:id="_2PWfsTtuEd2VLtmB2rf56Q">
> <eAnnotations xmi:id="_2PWfsjtuEd2VLtmB2rf56Q" source="attributes">
> <details xmi:id="_2PWfsztuEd2VLtmB2rf56Q" key="version" value="0"/>
> </eAnnotations>
> <importedPackage xmi:type="uml:Profile"
> href="UmlInColor.profile.uml2#_2PNVUDtuEd2VLtmB2rf56Q"/>
> <importedProfile
> href="UmlInColor.profile.uml2#_2PNVUDtuEd2VLtmB2rf56Q"/>
> </packageImport>
> <ownedMember xmi:type="uml:Package" xmi:id="_2PWftDtuEd2VLtmB2rf56Q"
> name="package1"/>
> <ownedMember xmi:type="uml:Class" xmi:id="_2PWftTtuEd2VLtmB2rf56Q"
> name="test1"/>
> </uml:Model>
Notice that's an older version of UML
http://www.eclipse.org/uml2/1.0.0/UML It won't be able to read a
newer version.
>
> 7) Together allows generating an XMI verion compliant with OMG and
> here is the output: <?xml version="1.0" encoding="UTF-8"?>
> <uml:Model xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:uml="http://www.eclipse.org/uml2/1.0.0/UML"
> xmi:id="_MfXlGDtvEd2VLtmB2rf56Q" name="Test"
> appliedProfile="_MfXlGTtvEd2VLtmB2rf56Q">
> <packageImport xmi:type="uml:ProfileApplication"
> xmi:id="_MfXlGTtvEd2VLtmB2rf56Q">
> <importedPackage xmi:type="uml:Profile"
> href="UmlInColor.profile.uml2#_MfXksDtvEd2VLtmB2rf56Q"/>
> <importedProfile
> href="UmlInColor.profile.uml2#_MfXksDtvEd2VLtmB2rf56Q"/>
> </packageImport>
> <ownedMember xmi:type="uml:Package" xmi:id="_MfXlGjtvEd2VLtmB2rf56Q"
> name="package1"/>
> <ownedMember xmi:type="uml:Class" xmi:id="_MfXlGztvEd2VLtmB2rf56Q"
> name="test1"/>
> </uml:Model>
That looks like something UML would be able to read, but again, note
that it's an older version of UML. I don't believe that the latest
version of UML can produce a serialization to conforms to the older version.
>
> 8) I have also generated xmi from RSM if you are interested.
> All the above should give you enough ideas to generate compatible xmi :-)
It looks like there are issues involving which version of UML is being
used as well. I've added the UML2 newsgroup for Kenn or James to
comment. I'm pretty sure both Together and RSM are using open source
UML directly so incompatibilities are likely related to different levels
of UML2 itself. Older tools aren't generally going to be able to read
newer serializations, though you would expect to be able to do the other
direction...
>
> Best regards,
>
> Marc
>
Previous Topic:how to clone a model
Next Topic:isLeaf in UML Class Diagram
Goto Forum:
  


Current Time: Wed Apr 08 19:31:11 GMT 2020

Powered by FUDForum. Page generated in 0.01700 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top