|
Re: xs:any as EList<EObject> [message #418245 is a reply to message #418244] |
Tue, 08 April 2008 14:27 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Ricker,
Comments below.
Jeffrey Ricker wrote:
> Is it possible to avoid feature maps and get xs:any as a list of EObject?
No. In fact there's no guarantee that all the values in the feature map
will be EObjects. They could just as easily be strings or other simple
values.
>
> Take the SOAP schema, for instance.
>
> <xs:complexType name="Body" >
> <xs:sequence>
> <xs:any namespace="##any" processContents="lax" minOccurs="0"
> maxOccurs="unbounded" ecore:instanceClass="EObject"
> ecore:name="elements"/>
> </xs:sequence>
> <xs:anyAttribute namespace="##other" processContents="lax"
> ecore:instanceClass="EObject"
> ecore:name="attributes"/>
> </xs:complexType>
>
> I would like to see:
>
> public interface Body extends EObject {
>
> public EList<EObject> getElements();
>
> }
>
> Is that possible?
Also, given an EObject, which is an instance of a complex type, you'd
have no information about what element it should be serialized under...
So perhaps what your wanting isn't consistent with the underlying
reality of the information (XML crap) being represented...
>
> - Ricker
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03044 seconds