Bug 123159 - xmi, unrecognized xml elements are not preserved
Summary: xmi, unrecognized xml elements are not preserved
Status: RESOLVED UNMAINTAINED
Alias: None
Product: umbrello
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Umbrello Development Group
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-06 11:23 UTC by Marcos Mayorga
Modified: 2022-02-15 15:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcos Mayorga 2006-03-06 11:23:30 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources

I've tried to write extra information (xml tags of another namespace) in an Umbrello xmi file .

The problem is that Umbrello simply remove them when updating the xmi file, so my extra information about traceability is lost

Umbrello must preserve any extern information it finds in the xmi file.
Comment 1 Oliver Kellogg 2006-03-06 13:32:21 UTC
Are you talking about <XMI.extensions> ?
Please attach a sample file.
Comment 2 Marcos Mayorga 2006-03-06 14:58:00 UTC
umbrello writes:

<?xml version="1.0"?>
<XMI xmlns:UML="http://...UML/1.3">
...
<UML Class name="new_class"/>
...
</XMI>

then I change it to:

<?xml version="1.0"?>
<XMI xmlns:UML="http://...UML/1.3" xmlns:rel="http://.....">
...
<UML:Class name="new_class">
  <rel:trace><rel:requirement href="1"/></rel:trace>
</UML:Class>
...
</XMI>

umbrello destroy this manually (or 3rdparty program) added information.

Comment 3 Oliver Kellogg 2006-03-06 20:14:38 UTC
Be aware that interspersing such extensions in the non
<XMI.extensions> part violates the XMI standard and may
entail loss of interoperability.
Comment 4 Marcus Alanen 2006-03-06 20:18:25 UTC
> <UML:Class name="new_class">
>   <rel:trace><rel:requirement href="1"/></rel:trace>
> </UML:Class>

To be valid XMI, this should be

<UML:Class name="new_class">
  <XMI.extension xmi.extender="your_tool_name">
    <rel:trace><rel:requirement href="1"/></rel:trace>
  </XMI.extension>
</UML:Class>

I don't know how umbrello deals with it, though. Also note it's called "XMI.extension" when inside an element, and "XMI.extensions" (note the extra "s") for the file-scope extension node.
Comment 5 Marcos Mayorga 2006-03-06 23:16:34 UTC
I dont think so,
XML specification allow mixture of languajes, through namespaces.

so, a program which reads XMI should not be affected with element belonging to other namespaces.
Comment 6 Oliver Kellogg 2006-03-07 06:49:24 UTC
> XML specification allow mixture of languages, through namespaces. 

XML yes but XMI no.
Comment 7 Marcos Mayorga 2006-03-07 12:57:30 UTC
XMI is XML.

XMI is an spec for information model transportation, that's why inside xmi.content can be storer elements from the namespace UML, and it can allocate other namespaces. 

xmi.extension should be used to extend the XMI spec, so, IMHO, elements that actually umbrello allocates inside xmi.extension, like those which characterizes a particular class, sould be written inside the <uml:class> element , example:
<XMI.CONTENT>
...
<uml:class ...>
  <umbrello:defaul_fill_color value="66"/>  <!--(is an invented property)-->
</uml:class>

</XMI.CONTENT>
Comment 8 Oliver Kellogg 2006-03-07 16:29:45 UTC
See comment #4 from Marcus Alanen - you need to embed your extension in the XMI.extension tag.
I am not making this up - various XMI readers will fail or even crash if you don't.