Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: serialize ecore references into container
Re: serialize ecore references into container [message #639714] Wed, 17 November 2010 14:58
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Florian,

Please use the EMF newsgroup (eclipse.tools.emf) for future questions
about EMF. More comments below.

Florian Marienfeld wrote:
> Hi,
>
> suppose I have this metamodel:
>
> class Chair has a reference named "parts" of type "Part". Part is
> superclass to classes Leg and Arm.
>
> by default a model instance gets serialized to this:
>
> <chair:Chair xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:chair="chair.de">
> <parts xsi:type="chair:Arm"/>
> <parts xsi:type="chair:Leg"/>
> </chair:Chair>
>
> What I would like is:
>
> <Chair>
> <Parts>
> <Arm/>
> <Leg/>
> </Parts>
> </Chair>
>
> What is the way to go?
>
Best is to write a schema with substitution groups and follow the steps
outlined in http://ed-merks.blogspot.com/2007/12/winters-icy-grip.html
to avoid ending up with a horrible API.
> Best regards, thanks in advance,
>
> FLO
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Using a Resource (URI) direct for M2M Transformation with ATL
Next Topic:CDO Sybase Datastore
Goto Forum:
  


Current Time: Sat Apr 27 00:17:02 GMT 2024

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

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

Back to the top