[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.m2m] Re: [QVT] its output model is in only XMI?

Hi David,

You are right, the output will not be XMI and EMF involves exactly the mechanism I have decribed.
There is XSDResourceImpl with custom serialization and is applied to *.xsd.


The following code snippet loads a schema file into QVT transf as a XSD model.
--
modeltype XSD uses "http://www.eclipse.org/xsd/2002/XSD";;


 transformation FooXSD(inout inOutModel : XSD);

main() {
var schemas : Collection(XSDSchema) := inOutModel.rootObjects()[XSDSchema];
}
--
As for validation, in case you can deserialize xsd file as a XSD model,
it conforms to XSD.ecore metamodel.
But I'm not sure this way is what you are looking for ;-).


You can also build a XSD model instance as the output of the transf and save it as
myOut.xsd.


I have just explained a bit what you can do with QVTO in this case,
so about XSD Schema and XMI specific questions I suggest you to ask in EMF newsgroup.


Regards,
/Radek



On Mon, 02 Jun 2008 21:10:00 +0200, David <David-392.Li@xxxxxxxxxxxxxxxxx> wrote:

Thanks Radek. Can I have further clarification?

Assume that I just want to use default serialization format (no customized implementation as you suggested).

If I want to transform a model A which conforms to a intermediateModel.ecore into a XSD model which conform to XSD.ecore model (org.eclipse.xsd), in this case, what is the serialization format for the outout XSD model? Because xsd package does not use XMI serialization format, can I understand that I will get a xsd schema, not XMI formated output file? If I get a xsd schema file, how can I validate that it conforms to the XSD.ecore model? Too many questions, because I am new to EMF and m2m/QVT.

Thanks again.




-- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/