|XSDEcoreBuilder, Validation [message #905456]
||Thu, 30 August 2012 12:18
I'm using XSDEcoreBuilder load an XSD schema as Ecore meta model.
In the schema there is the following type:
<xs:element name="e1" type="e1" minOccurs="1" maxOccurs="1"/>
<xs:element name="e2" type="e2" minOccurs="1" maxOccurs="1"/>
By some automated process I create a model according to this meta model.
A flaw in that generation caused an object of myType to be created which
does neither contain an e1 or e2 element. I should say this is a model
status = Diagnostician.INSTANCE.validate(o);
did not complain but returned Diagnostic.OK! Why is that? I tried to
apply the information in "XML Schema to Ecore Mapping" (2004) but could
not find the "exclusion" annotation in the generated model. I'm on
After saving the resource, the XML output looked like this:
<myType/> <------ invalid!
An external XSD validator emitted a warning about this.
|Re: XSDEcoreBuilder, Validation [message #905467 is a reply to message #905460]
||Thu, 30 August 2012 12:37
thanks for the quick response. Seems like I was hunting a ghost.
On 30.08.2012 14:24, Ed Merks wrote:
>> I tried to
>> apply the information in "XML Schema to Ecore Mapping" (2004) but could
>> not find the "exclusion" annotation in the generated model.
> There isn't one.
I think I missed the little hint "Note: implementation of this is
> At this point, the best you can do declare a constraint on the EClass
> and implement it by hand.
All right then. For now we run a full blown XSD validator on the XML
output, so I think we're fine.
Powered by FUDForum
. Page generated in 0.01736 seconds