Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » XML comments missed
XML comments missed [message #621563] Mon, 09 November 2009 06:38 Go to next message
DartPeng is currently offline DartPengFriend
Messages: 7
Registered: July 2009
Junior Member
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 08:53 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[MWE] Core requiring earlier version of apache commons?
Next Topic:Eclipse Modeling Days
Goto Forum:
  


Current Time: Fri Mar 29 06:12:11 GMT 2024

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

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

Back to the top