file XMI export breaks XML reserved character escaping rules

3 months 3 weeks ago #6401 by umltutor
I am using Modelio 4.1 and am exporting models to XMI. Sometimes, the exporter generates files that are incompatible with XML readers. The specific fault occurs during the body of ownedComment (inside ownedEnd, inside packagedElement @ xmi:type="uml:Association"):

<ownedComment xmi:id="_AtWjeLpEEeuwCe0bR_egFw">
<body><Enter note text here></body>
</ownedComment>

where the default body-text contains literal '<' and '>' symbols, of which only the first is properly escaped (these are special characters in XML, reserved for markup). If both of these symbols were properly escaped according to XML entity rules, the body should look like this:

<body><Enter note text here></body>

using ">" to escape the reserved character '>'. I think the XMI exporter should be fixed to escape all reserved characters properly.

Another kind of fix would be to ensure that Modelio does not generate the problematic default text "<Enter note text here>" inside the comment editor. It may be that this case is the last of several that were fixed earlier, since elsewhere, other ownedComment occurrences have a body for which the default text is not problematic: "<body>...</body>", but just an ellipsis.

All the best,

UML Tutor

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #6402 by umltutor
Oh dear, my post makes less sense because the &gt; and &lt; symbols were converted back to '<' and '>' characters! I will try again:

The current body looks like: <body>&lt;Enter note text here></body>
It should look like this: <body>&lt;Enter note text here&gt;</body>

if XML escaping is done properly.

All the best,
UML Tutor

Please Log in or Create an account to join the conversation.

3 months 3 weeks ago #6403 by ebr
Dear UMLTutor,

Many thanks for the feedback.
We will look at it.

EBR

Please Log in or Create an account to join the conversation.

Moderators: tmaaabcde
Time to create page: 0.046 seconds
^ Back to Top