RE: [mdr-users] Borland Together, CWM, UML2MOF
"Mike Martin" <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.mdr.user |
|---|---|
| Message-ID | <[email protected]> |
Pete Rivett wrote:
> The following fragment is wrong:
>
> 491 <UML:StructuralFeature.type>
> 492 <UML:Classifier>
> 493 <UML:Namespace.ownedElement>
> 494 <UML:DataType xmi.idref = 'G.42'/>
> 495 </UML:Namespace.ownedElement>
> 496 </UML:Classifier>
> 497 </UML:StructuralFeature.type>
>
> The <UML:Namespace.ownedElement> element is invalid XMI.
> The fragment should be:
>
> 491 <UML:StructuralFeature.type>
> 492 <UML:Classifier>
> 494 <UML:DataType xmi.idref = 'G.42'/>
> 496 </UML:Classifier>
> 497 </UML:StructuralFeature.type>
Thanks, Pete. I tried that and it produces the following:
org.netbeans.lib.jmi.util.DebugException: Invalid sub-element:
UML:DataType
at
org.netbeans.lib.jmi.xmi.XmiElement$Instance.startSubElement(XmiElement.
java:508)
at
org.netbeans.lib.jmi.xmi.XmiSAXReader.startElement(XmiSAXReader.java:219
)
at
org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1674)
After my earlier post I found this message on the andromda-user
list:
http://sourceforge.net/mailarchive/message.php?msg_id=9540467
indicating that even more may be necessary to cleanup Together-
generated UML/XMI. He suggests removing all occurrences of:
UML:Attribute/UML:StructuralFeature.type
UML:Parameter/UML:Parameter.type
UML:Stereotype/UML:Stereotype.extendedElement
and their children. So, I dutifully tried that using his XSL and
UML2MOF finally succeeded. Problem is, it generated an empty model!
<?xml version = '1.0' encoding = 'ISO-8859-1' ?>
<XMI xmi.version = '1.2' xmlns:Model = 'org.omg.xmi.namespace.Model'
timestamp = 'Fri Apr 22 19:28:51 CDT 2005'>
<XMI.header>
<XMI.documentation>
<XMI.exporter>Netbeans XMI Writer</XMI.exporter>
<XMI.exporterVersion>1.0</XMI.exporterVersion>
</XMI.documentation>
</XMI.header>
<XMI.content/>
</XMI>
The input wasn't empty; the transform reduced it from ~81K lines
to ~57K lines but there's still lots of UML there.
Is Together going to be more trouble than it's worth? Is there
a better tool that folks prefer? The thing is, I assume I need
something that can open the CWM UML in order to design a package
that extends from it. Or is there some other more clever way of
referencing CWM objects without them actually being in the UML
I'm working on?
All advice appreciated.
Mike