|
Re: Problems with complexType [message #1062673 is a reply to message #1062668] |
Mon, 10 June 2013 06:37   |
Eclipse User |
|
|
|
Arjan,
Comments below.
On 10/06/2013 12:14 PM, Arjan Kok wrote:
> Hi,
>
> I am working on a project that extends the org.eclipse.xsd module. There seem to be two problems regarding the handling of complexType.
>
>
> 1. The attributes of the complexContent element are lost when loading an xsd schema into the ecore model, and then deriving the xsd from the model again.
> For example, when running XSDMainExample::loadAndPrint (in org.eclipse.xsd.example) for the xsd file example 1 (is attached), then the attributes of the complexContent element are lost. It looks like the attributes are not loaded into the model.
For me that prints out
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:xl="http://www.xbrl.org/2003/XLink">
<import namespace="http://www.xbrl.org/2003/XLink"
schemaLocation="http://www.xbrl.org/2003/xl-2003-12-31.xsd"/>
<import namespace="http://www.xbrl.org/2003/linkbase"
schemaLocation="http://www.xbrl.org/2003/xbrl-linkbase-2003-12-31.xsd"/>
<element name="reference" substitutionGroup="xl:resource">
<complexType mixed="true">
<complexContent>
<extension base="xl:resourceType">
<sequence>
<element maxOccurs="unbounded" minOccurs="0" ref="link:part"/>
</sequence>
</extension>
</complexContent>
</complexType>
</element>
</schema>
So you're specifically referring to the id attribute? I've not looked
closely, but the DOM itself should preserve that. They're not recorded
in the model. Are you discarding the DOM and regenerating it?
>
> 2. The complexContent element and restriction element are lost when the attribute base of the contained restriction element has value 'anyType'. See example 2.
The same issue here. What's serialized is semantically equivalent to
what's read in, so if you discard the DOM, you should expect this type
of thing.
>
> Are these bugs or features? Should I enter a bugzilla, or is there a workaround?
Are you discarding the DOM?
>
> Kind Regards,
>
> Arjan Kok.
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.52606 seconds