Home » Archived » Tigerstripe » Generate XMI instead of UML
|
Re: Generate XMI instead of UML [message #11214 is a reply to message #10149] |
Fri, 13 June 2008 11:41 |
Eclipse User |
|
|
|
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 |
Eric Dillon 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 #11323 is a reply to message #11286] |
Mon, 16 June 2008 09:42 |
Eclipse User |
|
|
|
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 #563336 is a reply to message #10149] |
Fri, 13 June 2008 11:41 |
Ed Merks Messages: 33142 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 |
Eric Dillon 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 #563404 is a reply to message #11286] |
Mon, 16 June 2008 09:42 |
Ed Merks Messages: 33142 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/
|
|
| | | | |
Goto Forum:
Current Time: Fri Apr 26 14:18:19 GMT 2024
Powered by FUDForum. Page generated in 0.04232 seconds
|