|
Re: UML to XML Transformation via qvto [message #703464 is a reply to message #703348] |
Wed, 27 July 2011 15:39 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
It sounds likely that you'd need to generate the Ecore model
corresponding to that XSD:<br>
<blockquote><a
href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.emf.doc/tutorials/xlibmod/xlibmod.html">Tutorial:
Generating an EMF Model using XML Schema</a><br>
</blockquote>
<br>
On 27/07/2011 6:29 AM, Andreas Burger wrote:
<blockquote cite="mid:j0p385$u29$1@news.eclipse.org" type="cite">Hello,
<br>
<br>
is it possible to transform an uml model in a xml file with qvto?
<br>
Our problem is to link the xsd metamodel in the qvto script. We
can read in the uml-model but cannot reference to our specific xsd
metamodel. Is it possible to reference to a specific local xsd
metamodel?
<br>
For better appreciation see the example qvto script below.
<br>
<br>
modeltype XML uses 'metamodelfile.xsd';
<br>
<br>
modeltype UML uses '.../uml2/3.0.0/UML';(only short metamodel
reference because of problem with link posting)
<br>
<br>
<br>
<br>
<br>
transformation uml2ecore ( in uml : UML, out xml : XML );
<br>
<br>
main ()
<br>
{
<br>
uml.objectsOfType ( Package ) -> map umlpackage2xml ( ) ;
<br>
<br>
}
<br>
<br>
<br>
mapping Package :: umlpackage2xml() : XML::Element
<br>
when { self.name = 'modelDeploymentView'; }
<br>
{
<br>
<br>
<br>
</blockquote>
</body>
</html>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02687 seconds