[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.amalgam] Re: Is there any way to generate an indefinite number of target models in a qvto m2m transformation?


As far as I understood, they are two alternative ways of solving the problem, aren't they?


Sergey Boyko escribió:
Hi Toñi ,

There's no direct way to express arbitrary number of output models in qvto engine.

Described scenario can be archived like follows:
- using Ant script. First invocation of qvto engine would create output model with root objects each for separate entity. Then this model can be processed with Xpand template to save each entity to physical file.
- using Java black-box library with qvto script. Such library can take same model produced by qvto script (with arbitrary number of root objects) and then save each object as system file.


Regards,
  Sergey

Toñi Reina Quintero wrote:
Hi all,

my question is related to the mindmap2xhtml (included in the book Eclipse Modeling Project: A Domain-Specific Language (DSL) Toolkit) or the Uml2Xhtml example that Sergey has mentioned in his answer to my previous question ('org.eclipse.m2m/org.eclipse.m2m.qvt.oml/examples/org.eclipse.m2m.qvt.oml.econ2009.tutorial').


In both cases a unique xhtml file is generated that contains all the mindmap information, in the first example, and all the uml model information in the second one. But what if I want to generate different xhtml files, one for each topic, in the first example, and one for each class in the second one.


In both cases the number of instances of the output metamodel is variable, because it depends on the number of topics in the first example, and on the number of classes in the second one. My question is: is there any way of specifying this in qvto?

Best regards,
  Toñi