|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.
|Re: Problems with complexType [message #1062687 is a reply to message #1062673]
||Mon, 10 June 2013 11:43
| Arjan Kok
Registered: July 2009
1) The complexContent element misses the attribute mixed = "true". Yes, I am discarding the DOM and regenerating the DOM from the model (that is what XSDMainExample::loadAndPrint does).
2) Yes, I am discarding the DOM. If the results are semantically equivalent then I am OK with it.
The goal is to work on the model level. Discarding the DOM reassures me that I don't miss information in the model.
[Updated on: Mon, 10 June 2013 11:47]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.02140 seconds