Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Tigerstripe » Generate XMI instead of UML
Generate XMI instead of UML [message #10149] Fri, 13 June 2008 06:59 Go to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Hello,

Today, Tigerstripe is able to import UML2 files and to generate UML2 model
files, but a lot of UML tools are only accepting XMI files and not UML
files.

RSM is accepting both, but ArgoUML and Borland Together are only accepting
XMI.

So it would make more sense for Tigerstripe to be able to import and
export XMI in addition to just UML.

Strangely, the uml files generated by Tigerstripe starts with an xmi tag,
but they are not xmi files.

I know that there are multiple variations of xmi per vendor, but it would
be easier to use.

Best regards,

Marc
Re: Generate XMI instead of UML [message #11214 is a reply to message #10149] Fri, 13 June 2008 11:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Marc,

The UML project itself does support importing from or exporting to
standard UML XMI rather than the Eclipse UML2 variant of it so it
shouldn't be difficult to support this; I think XMI2UMLResource is used
for this...

Given how loosely XMI is defined, I think starting with an XMI tag and
using the XMI namespace is just about all you need to be XMI. Whether
that XMI conforms precisely to any specific model is a separate issue.


Marc Flauw wrote:
> Hello,
>
> Today, Tigerstripe is able to import UML2 files and to generate UML2
> model files, but a lot of UML tools are only accepting XMI files and
> not UML files.
>
> RSM is accepting both, but ArgoUML and Borland Together are only
> accepting XMI.
> So it would make more sense for Tigerstripe to be able to import and
> export XMI in addition to just UML.
> Strangely, the uml files generated by Tigerstripe starts with an xmi
> tag, but they are not xmi files.
>
> I know that there are multiple variations of xmi per vendor, but it
> would be easier to use.
>
> Best regards,
>
> Marc
>
Re: Generate XMI instead of UML [message #11249 is a reply to message #11214] Sun, 15 June 2008 01:06 Go to previous messageGo to next message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Hi Ed,

Thanks for the hint. It looks like an easy thing to add indeed.

Eric


On 6/13/08 4:41 AM, in article g2tm9o$gm3$1@build.eclipse.org, "Ed Merks"
<merks@ca.ibm.com> wrote:

> Marc,
>
> The UML project itself does support importing from or exporting to
> standard UML XMI rather than the Eclipse UML2 variant of it so it
> shouldn't be difficult to support this; I think XMI2UMLResource is used
> for this...
>
> Given how loosely XMI is defined, I think starting with an XMI tag and
> using the XMI namespace is just about all you need to be XMI. Whether
> that XMI conforms precisely to any specific model is a separate issue.
>
>
> Marc Flauw wrote:
>> Hello,
>>
>> Today, Tigerstripe is able to import UML2 files and to generate UML2
>> model files, but a lot of UML tools are only accepting XMI files and
>> not UML files.
>>
>> RSM is accepting both, but ArgoUML and Borland Together are only
>> accepting XMI.
>> So it would make more sense for Tigerstripe to be able to import and
>> export XMI in addition to just UML.
>> Strangely, the uml files generated by Tigerstripe starts with an xmi
>> tag, but they are not xmi files.
>>
>> I know that there are multiple variations of xmi per vendor, but it
>> would be easier to use.
>>
>> Best regards,
>>
>> Marc
>>
Re: Generate XMI instead of UML [message #11286 is a reply to message #11249] Mon, 16 June 2008 06:54 Go to previous messageGo to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
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"

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.

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'

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.

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>

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>

8) I have also generated xmi from RSM if you are interested.

All the above should give you enough ideas to generate compatible xmi :-)

Best regards,

Marc
Re: Generate XMI instead of UML [message #11323 is a reply to message #11286] Mon, 16 June 2008 09:42 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

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
>
Re: Generate XMI instead of UML [message #11360 is a reply to message #11323] 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 #11397 is a reply to message #11323] 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 #11433 is a reply to message #11397] 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 #11470 is a reply to message #11323] 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 #563336 is a reply to message #10149] Fri, 13 June 2008 11:41 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
Marc,

The UML project itself does support importing from or exporting to
standard UML XMI rather than the Eclipse UML2 variant of it so it
shouldn't be difficult to support this; I think XMI2UMLResource is used
for this...

Given how loosely XMI is defined, I think starting with an XMI tag and
using the XMI namespace is just about all you need to be XMI. Whether
that XMI conforms precisely to any specific model is a separate issue.


Marc Flauw wrote:
> Hello,
>
> Today, Tigerstripe is able to import UML2 files and to generate UML2
> model files, but a lot of UML tools are only accepting XMI files and
> not UML files.
>
> RSM is accepting both, but ArgoUML and Borland Together are only
> accepting XMI.
> So it would make more sense for Tigerstripe to be able to import and
> export XMI in addition to just UML.
> Strangely, the uml files generated by Tigerstripe starts with an xmi
> tag, but they are not xmi files.
>
> I know that there are multiple variations of xmi per vendor, but it
> would be easier to use.
>
> Best regards,
>
> Marc
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Generate XMI instead of UML [message #563357 is a reply to message #11214] Sun, 15 June 2008 01:06 Go to previous message
Eric Dillon is currently offline Eric DillonFriend
Messages: 103
Registered: July 2009
Senior Member
Hi Ed,

Thanks for the hint. It looks like an easy thing to add indeed.

Eric


On 6/13/08 4:41 AM, in article g2tm9o$gm3$1@build.eclipse.org, "Ed Merks"
<merks@ca.ibm.com> wrote:

> Marc,
>
> The UML project itself does support importing from or exporting to
> standard UML XMI rather than the Eclipse UML2 variant of it so it
> shouldn't be difficult to support this; I think XMI2UMLResource is used
> for this...
>
> Given how loosely XMI is defined, I think starting with an XMI tag and
> using the XMI namespace is just about all you need to be XMI. Whether
> that XMI conforms precisely to any specific model is a separate issue.
>
>
> Marc Flauw wrote:
>> Hello,
>>
>> Today, Tigerstripe is able to import UML2 files and to generate UML2
>> model files, but a lot of UML tools are only accepting XMI files and
>> not UML files.
>>
>> RSM is accepting both, but ArgoUML and Borland Together are only
>> accepting XMI.
>> So it would make more sense for Tigerstripe to be able to import and
>> export XMI in addition to just UML.
>> Strangely, the uml files generated by Tigerstripe starts with an xmi
>> tag, but they are not xmi files.
>>
>> I know that there are multiple variations of xmi per vendor, but it
>> would be easier to use.
>>
>> Best regards,
>>
>> Marc
>>
Re: Generate XMI instead of UML [message #563380 is a reply to message #11249] Mon, 16 June 2008 06:54 Go to previous message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
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"

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.

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'

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.

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>

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>

8) I have also generated xmi from RSM if you are interested.

All the above should give you enough ideas to generate compatible xmi :-)

Best regards,

Marc
Re: Generate XMI instead of UML [message #563404 is a reply to message #11286] Mon, 16 June 2008 09:42 Go to previous 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 #563426 is a reply to message #11323] 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 #563447 is a reply to message #11323] 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 #563469 is a reply to message #11397] 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 #563489 is a reply to message #11323] 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:Generate XMI instead of UML
Next Topic:Refactoring
Goto Forum:
  


Current Time: Thu Apr 18 03:12:51 GMT 2024

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

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

Back to the top