|
|
|
Re: Some duvids about GMF model format [message #791434 is a reply to message #791041] |
Sun, 05 February 2012 20:30 |
Ed Merks Messages: 33113 Registered: July 2009 |
Senior Member |
|
|
Did you see the the part where I explained when and why there is an
xsi:type?
On 05/02/2012 8:00 AM, Ed Merks wrote:
> Comments below.
>
> On 05/02/2012 5:04 AM, Missing name Mising name wrote:
>> I have two diferents GMF editor but the format of the generated model
>> are diferents,
>> for example, with the GMF editor 1 the format generated is:
>>
>>
>> <contents xsi:type="XXX" name="NAME_X" id="ID" .../>
> So this is an instance of XXX contained by something that has a
> "contents" containment reference.
>> <contents xsi:type="YYY" name="NAME_Y" ...>
>> <xxxs xxx_name="X" xxxType="//@contents.0/>
>> </contents>
>> [...]
>>
>>
>> and the GMF editor 2 the format generated is like:
>>
>>
>> <XXX name="NAME_X" id="ID" .../>
> This is an instance of XXX right at the root of the resource.
>> <YYY name="NAME_Y" ...>
>> <xxxs xxx_name="X">
>> </YYY>
>> [...]
>>
>>
>> The first editor was made by a third person e the second was made by
>> myself. My duvid is why in the first appear <contents xsi:type ... >
>> and in the second not?
> At the root, the type name is used as an element name. Anywhere below
> that, the name of the containment reference is used as the element
> name and if the object is not of the type of the containment reference
> but rather a derived type, then that information needs to be in the
> XML as well, via the xsi:/xmi:type.
>> Another duvid is, how I can change the references in the second
>> format to became as the first (using //@contents.0 .. and not just a
>> inner node)?
> Embed the objects in whatever has that "contents" reference or
> something else with such a "contents" reference.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02132 seconds