This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 245541 - XML Not escapted in annotations XML file
Summary: XML Not escapted in annotations XML file
Status: RESOLVED INVALID
Alias: None
Product: Tigerstripe (Archived)
Classification: Technology
Component: Annotations (show other bugs)
Version: 0.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 0.4M0   Edit
Assignee: Steve Jerman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-28 10:47 EDT by Steve Jerman CLA
Modified: 2010-12-06 14:55 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Jerman CLA 2008-08-28 10:47:08 EDT
I have a multiline string property in an annotation. I noticed that when I save it it doesn't look like it gets completely XML encoded..
 
<content xsi:type="org.eclipse.tigerstripe.annotation.ocl:OclConstraint" description="lets see" constraint="context here&#xD;&#xA;inv: here>there"/>

Note the 'here>there',. This doesn't look right. Am I missing something?
Comment 1 Andrey Platov CLA 2008-09-03 03:42:15 EDT
Hi Steve,

'>' symbol is valid and have no special meaning when used in attribute value, so according to XML spec no encoding required.

Did you expected any problems with that?

Kind Regards,
Andrey
Comment 2 Andrey Platov CLA 2008-09-03 03:54:18 EDT
From http://www.w3.org/TR/2006/REC-xml-20060816/#dt-chardata

Quote:
The ampersand character (&) and the left angle bracket (<) MUST NOT appear in their literal form, except when used as markup delimiters, or within a comment, a processing instruction, or a CDATA section. If they are needed elsewhere, they MUST be escaped using either numeric character references or the strings "&amp;" and "&lt;" respectively. 

The right angle bracket (>) MAY be represented using the string "&gt;", and MUST, for compatibility, be escaped using either "&gt;" or a character reference when it appears in the string "]]>" in content, when that string is not marking the end of a CDATA section.
*** End Of Quote

They mean compatibility with SGML, so I think EMF authors prefered to avoid optional substitutions in favour of performance and space.

Thank you,
Andrey
Comment 3 Navid Mehregani CLA 2010-12-06 14:55:27 EST
Marking as invalid.  Please reopen if you disagree.