|Re: Problems with complexType [message #1062673 is a reply to message #1062668]
||Mon, 10 June 2013 10:37
| Ed Merks
Registered: July 2009
On 10/06/2013 12:14 PM, Arjan Kok wrote:
> 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"?>
<element name="reference" substitutionGroup="xl:resource">
<element maxOccurs="unbounded" minOccurs="0" ref="link:part"/>
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
> 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.02140 seconds