Reputation: 10075
EMF has support for XSD through Ecore to XSD import export capability, but I have a use case that requires continuous switch between the two domains.
I have a set of published XSD schemas, and various software that consumes XML that is compatible with this schema. I want to build a tooling layer on top of this using EMF, and I can create Ecore models from the XSD. However, after Ecore based tooling creates outputs, I need to create say new schemas, which use the types from schemas used at the beginning, that is:
XSD -> ECORE -> Modified XSD -> XML
I also need to consume XML that is compatible with these schemas, in my EMF based tools, that is
XML (compatible with original schema) -> ECORE -> XML (again compatible with original schema)
Looking at the discussions around the web, I have a feeling that this route may not be possible, at least not directly. Do you see this overall goal feasible? What kind of modifications etc would be necessary to implement this? I can not move all the modelling to EMF, since the rest of the world is going to stay in XSD domain, but I could really benefit from EMF tooling, and linking that to XSD world.
Upvotes: 1
Views: 1015
Reputation: 10075
I now know that this is possible. Ed Merks has kindly answered this question here: http://www.eclipse.org/forums/index.php/m/825082/#msg_825082
Basically you have to use the right resource factory implementation to make sure that metadata from the xsd is used.
Upvotes: 0