|
Re: tranisent reference [message #501078 is a reply to message #501074] |
Mon, 30 November 2009 22:25 |
Ed Merks Messages: 33142 Registered: July 2009 |
Senior Member |
|
|
Grace,
Comments below.
gracehylo@yahoo.com wrote:
> Hi,
>
> I have an xsd with choice like this:
>
> <xsd:complexType name="RootType" >
> <xsd:complexContent>
> <xsd:extension base="ns:SomeBaseType">
> <xsd:choice minOccurs="0" maxOccurs="unbounded">
> <xsd:element name="child" type="ns:ChildType"/>
> </xsd:choice>
> </xsd:extension>
> </xsd:complexContent>
> </xsd:complexType>
> The generated EMF model has the new xxPackageImpl class with
> initializePackageContents() method. It would
> initialize the EClass for RootType. But the "child" becomes an
> EReference which is transient (with IS_TRANSIENT).
>
> I checked that only if the XSD element under <choice> which is
> unbounded would be like that. If the XSD element is under a sequence
> or the choice is not unbounded, it would be !IS_TRANSIENT.
Yes, I expect a repeating sequence or choice to result in a feature map,
which is non-transient and all other features to delegate to that
feature map and hence be transient.
>
> Is it as designed? Or is there any flag that I should use to avoid it?
The repeating choice with only one element is pointless even in the XML
Schema so I'd avoid that.
>
> Thanks.
>
>
> Grace
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02861 seconds