|XSD2EcoreBuilder: prevent suffixes [message #1281062]
||Mon, 31 March 2014 09:56
| Mathias K
Registered: March 2014
Is there an option to prevent the XSD2EcoreBuilder from automatically adding suffixes (Type, Base, etc.) and corresponding metadata when programmatically constructing an Ecore metamodel from an XML schema (XSD) ?
I have an XML schema (XSD). I do not have the possibility to have an XSD2Ecore plugin loaded. I want to programmatically create the ecore metamodel without any suffixes added. My first goal is to be able to serialize an XML instance of the schema as an XMI instance of this generated metamodel with objects having the exact same types names as in the original schema.
I have tried to programatically remove these suffixes in the generated ecore. Works fine until I try to reserialize the XMI instance to XML: the objects end up with types such as "MyClass_._type". I believe this is due to the extended metadata generated by XSD2EcoreBuilder in the ecore. It seems I could just remove these metadata also, but lacking further knowledge about why all these suffixes exist (prevent names collision ?), I would first like to know if this can be prevented from the beginning in a more "supported" way.
Powered by FUDForum
. Page generated in 0.01927 seconds