Skip to main content



      Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » XML comments missed
XML comments missed [message #621563] Mon, 09 November 2009 01:38 Go to next message
Eclipse UserFriend
Hi all,

There is a problem feazes me:

When I save the EMF model to XML text , the original comments of XML file were missed.

I change the metadata (which is "elementOnly" type) of some EMF model in ***PackageImpl to be "mixed" , the original comments can be saved , but their positions were changed...

e,g. :

Original XML :
<!-- comments NO1 -->
<element /></element>
<!-- comments NO2 -->
<element/></element>

Generated by EMF model:
<!-- comments NO1 -->
<!-- comments NO2 -->
<element /></element>
<element/></element>

Please help me , thank you !

- Dart
Re: XML comments missed [message #621567 is a reply to message #621563] Mon, 09 November 2009 03:53 Go to previous message
Eclipse UserFriend
Dart,

Comments below.

DartPeng wrote:
> Hi all,
>
> There is a problem feazes me:
>
> When I save the EMF model to XML text , the original comments of XML
> file were missed.
>
> I change the metadata (which is "elementOnly" type) of some EMF model
> in ***PackageImpl to be "mixed" , the original comments can be saved ,
> but their positions were changed...
How much of the metadata did you change? Specifically are the element
feature marked derived so they are delegating their storage to the
feature map? Try changing the schema itself to use mixed="true" so you
can be sure you're getting the correct annotations.
>
> e,g. :
>
> Original XML :
> <!-- comments NO1 -->
> <element /></element>
> <!-- comments NO2 -->
> <element/></element>
>
> Generated by EMF model: <!-- comments NO1 -->
> <!-- comments NO2 -->
> <element /></element>
> <element/></element>
>
> Please help me , thank you !
>
> - Dart
Previous Topic:[MWE] Core requiring earlier version of apache commons?
Next Topic:Eclipse Modeling Days
Goto Forum:
  


Current Time: Tue Jul 15 06:28:06 EDT 2025

Powered by FUDForum. Page generated in 0.02939 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top