Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » XSD » XSD2EcoreBuilder: prevent suffixes
XSD2EcoreBuilder: prevent suffixes [message #1281062] Mon, 31 March 2014 09:56
Mathias K is currently offline Mathias KFriend
Messages: 16
Registered: March 2014
Junior Member
Hello,

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) ?

Context:

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.

Regards,


Previous Topic:Validate XML file using XSD Schema and parsing in DOM parser
Next Topic:an exact schema for children of a sequence
Goto Forum:
  


Current Time: Fri Apr 26 23:12:24 GMT 2024

Powered by FUDForum. Page generated in 0.03517 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top