auto-split EMF model in several files [message #1066288] |
Mon, 01 July 2013 18:21  |
Eclipse User |
|
|
|
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.
|
|
|
Re: auto-split EMF model in several files [message #1066300 is a reply to message #1066288] |
Tue, 02 July 2013 01:27   |
Eclipse User |
|
|
|
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.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03389 seconds