auto-split EMF model in several files [message #1066288] |
Mon, 01 July 2013 22:21 |
Victor Pavon Messages: 50 Registered: April 2012 Location: Spain |
Member |
|
|
Hello,
I have created an EMF metamodel from an xsd file and it works fine. But now I'd like to split the model in several files. I'd like have in one file the root element of xml file and for each child of root element generate automatically a new file with subtree content. I search a lot but I didn't any solution, it is possible?
Thank you for your time and attention.
Best regards,
Victor.
Víctor Pavón,
Research at Quercus Software Engineering Group
University of Extremadura, Spain.
|
|
|
Re: auto-split EMF model in several files [message #1066300 is a reply to message #1066288] |
Tue, 02 July 2013 05:27 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Victor,
If you want the serialization to conform to the schema, that's probably
not possible. The root element of each document must be specified as a
global element in the schema and the cross document references from the
one root element you already have would need to specify what cross
document references look like, e.g., using elements of type anyURI. EMF
does in general support cross document references, even for containment
references; the containment reference must have resolveProxies true and
the GenModel Containment Proxies must be set to true.
In terms of "auto-splitting", you need to create the Resource instances
yourself and decide each of their URIs and then save each of them.
On 02/07/2013 12:21 AM, Victor Pavon wrote:
> Hello,
>
> I have created an EMF metamodel from an xsd file and it works fine.
> But now I'd like to split the model in several files. I'd like have in
> one file the root element of xml file and for each child of root
> element generate automatically a new file with subtree content. I
> search a lot but I didn't any solution, it is possible?
>
> Thank you for your time and attention.
>
> Best regards,
> Victor.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Powered by
FUDForum. Page generated in 0.02747 seconds