EMF and XML: list serialization [message #1080994] |
Tue, 06 August 2013 17:01 |
|
I notice this behavior when I try to persist an EList into XML file:
if ALL contents are in the same resource, I'll see something like:
<myClass myList="uuid1 uuid2" />
if one or more contents are from antoher resource, I'll see:
<myClass>
<myList href="#uuid1" />
<myList href="#uuid1" />
<myList href="myprotocoluri/#uuid3" />
</myClass>
Is there an option to serialize lists always with node element and href?
Very thanks.
|
|
|
|
|
|
Re: EMF and XML: list serialization [message #1081484 is a reply to message #1081447] |
Wed, 07 August 2013 09:30 |
|
Ed Merks wrote on Wed, 07 August 2013 10:36Tommaso,
Yes, I would expect that. In general it will use QName/URI pairs (where
the QName is optional and is needed only if the feature's type is
abstract in which case it must specify the non-abstract type of the
proxy that will be created).
I expected something like this, so the only solution that I could find is override
saveFeatures() of XMLSaveImpl to exclude case "SAME_DOC".
Thanks Merks for your time, but do you never go on holiday?
|
|
|
Re: EMF and XML: list serialization [message #1081518 is a reply to message #1081484] |
Wed, 07 August 2013 10:19 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Tommaso,
Comments below.
On 07/08/2013 11:30 AM, Tommaso De Sica wrote:
> Ed Merks wrote on Wed, 07 August 2013 10:36
>> Tommaso,
>>
>> Yes, I would expect that. In general it will use QName/URI pairs
>> (where the QName is optional and is needed only if the feature's type
>> is abstract in which case it must specify the non-abstract type of
>> the proxy that will be created).
>
>
> I expected something like this, so the only solution that I could find
> is override
> saveFeatures() of XMLSaveImpl to exclude case "SAME_DOC".
You have to be careful with that... I'm not sure it's okay to call that
(without additional specialization) if there really are cross document
references...
>
> Thanks Merks for your time, but do you never go on holiday? :)
Not often enough without my computer. :-P
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.05328 seconds