XML comments missed [message #621563] |
Mon, 09 November 2009 01:38  |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.02939 seconds