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 #477522] Mon, 16 June 2008 09:42 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generate XMI instead of UML [message #477524 is a reply to message #477522] Mon, 16 June 2008 14:27 Go to previous messageGo to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Dear all,

Having good integration in both directions to and from RSM would be key
for Tigerstripe success in TIP.

Best regards,

Marc
Re: Generate XMI instead of UML [message #477542 is a reply to message #477522] Wed, 18 June 2008 23:07 Go to previous messageGo to next message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
All,

the whitespace problem was in fact only in the newsgroup rendering - the
actual code doesn't have any problems in that regard.

I have narrowed the RSM import problem down to an invalid xmi reference
that is getting generated in my export - I am just trying to work out why!

The UML file has this in it :

<profileApplication xmi:id="_5d3rXD1_Ed2ZA6N50b--bQ">
<eAnnotations xmi:id="_5d3rXT1_Ed2ZA6N50b--bQ"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="umlProfile/Simple.Profile.uml#_5bCZwj1_Ed2ZA6N50b--bQ "/>
</eAnnotations>
<appliedProfile
href="umlProfile/Simple.Profile.uml#_5a5P0D1_Ed2ZA6N50b--bQ "/>
</profileApplication>

But my profile does not have a corresponding reference
"_5bCZwj1_Ed2ZA6N50b--bQ" - in fact it contains no packages at all.

Regards,

Richard
Re: Generate XMI instead of UML [message #477545 is a reply to message #477542] Fri, 20 June 2008 16:06 Go to previous messageGo to next message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
OK...

I have found the error in my code, and now everything imports into RSM7
without problem.

I'm slightly ashamed to admit that the code saved the profile before the
"define" step. Swapping these two lines over sorted it out.

Richard
Re: Generate XMI instead of UML [message #477560 is a reply to message #477522] Mon, 30 June 2008 20:26 Go to previous message
Tom Morris is currently offline Tom MorrisFriend
Messages: 89
Registered: July 2009
Member
Apologies for the late followup. I think this is tangential to the
thrust of the original thread, but just to set the record straight.

Ed Merks wrote:

> Marc Flauw wrote:
>
>> 4) I compared the headers generated by TS and the headers generated by
>> ArgoUML:
>>
>> 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>
>
> 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?

ArgoUML supports reading XMI 1.0/UML 1.3 and reading/writing XMI 1.2/UML
1.4. Considering how recently a usable version of UML 2.x got
standardized by the OMG, I'm not sure that counts as "antiquated." We
did begin implementation of UML 2.1.1 support last summer. It's just
not ready for release yet. The initial implementation uses UML2 (the
Eclipse plugin, not the similarly named OMG standard).

Tom
Re: Generate XMI instead of UML [message #626714 is a reply to message #477522] Mon, 16 June 2008 14:27 Go to previous message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Dear all,

Having good integration in both directions to and from RSM would be key
for Tigerstripe success in TIP.

Best regards,

Marc
Re: Generate XMI instead of UML [message #626732 is a reply to message #477522] Wed, 18 June 2008 23:07 Go to previous message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
All,

the whitespace problem was in fact only in the newsgroup rendering - the
actual code doesn't have any problems in that regard.

I have narrowed the RSM import problem down to an invalid xmi reference
that is getting generated in my export - I am just trying to work out why!

The UML file has this in it :

<profileApplication xmi:id="_5d3rXD1_Ed2ZA6N50b--bQ">
<eAnnotations xmi:id="_5d3rXT1_Ed2ZA6N50b--bQ"
source="http://www.eclipse.org/uml2/2.0.0/UML">
<references xmi:type="ecore:EPackage"
href="umlProfile/Simple.Profile.uml#_5bCZwj1_Ed2ZA6N50b--bQ "/>
</eAnnotations>
<appliedProfile
href="umlProfile/Simple.Profile.uml#_5a5P0D1_Ed2ZA6N50b--bQ "/>
</profileApplication>

But my profile does not have a corresponding reference
"_5bCZwj1_Ed2ZA6N50b--bQ" - in fact it contains no packages at all.

Regards,

Richard
Re: Generate XMI instead of UML [message #626735 is a reply to message #477542] Fri, 20 June 2008 16:06 Go to previous message
Richard Craddock is currently offline Richard CraddockFriend
Messages: 31
Registered: July 2009
Member
OK...

I have found the error in my code, and now everything imports into RSM7
without problem.

I'm slightly ashamed to admit that the code saved the profile before the
"define" step. Swapping these two lines over sorted it out.

Richard
Re: Generate XMI instead of UML [message #626751 is a reply to message #477522] Mon, 30 June 2008 20:26 Go to previous message
Tom Morris is currently offline Tom MorrisFriend
Messages: 89
Registered: July 2009
Member
Apologies for the late followup. I think this is tangential to the
thrust of the original thread, but just to set the record straight.

Ed Merks wrote:

> Marc Flauw wrote:
>
>> 4) I compared the headers generated by TS and the headers generated by
>> ArgoUML:
>>
>> 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>
>
> 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?

ArgoUML supports reading XMI 1.0/UML 1.3 and reading/writing XMI 1.2/UML
1.4. Considering how recently a usable version of UML 2.x got
standardized by the OMG, I'm not sure that counts as "antiquated." We
did begin implementation of UML 2.1.1 support last summer. It's just
not ready for release yet. The initial implementation uses UML2 (the
Eclipse plugin, not the similarly named OMG standard).

Tom
Previous Topic:Usage of StateMachine or ProtocolStateMachine
Next Topic:UML2 examples
Goto Forum:
  


Current Time: Thu Apr 18 11:00:36 GMT 2024

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

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

Back to the top