blob: 1c576ecb3e7262be7edae20698ee4288129e82f7 [file] [log] [blame]
<?php require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); $App = new App(); $Nav = new Nav(); $Menu = new Menu(); include($App->getProjectCommon()); # All on the same line to unclutter the user's desktop'
#*****************************************************************************
#
# Keys2Nested_AMW2XSLT_doc.php
#
# Author: Marcos Didonet Del Fabro
# Date: 2005-06-19
#
# Description: Type your page comments here - these are not sent to the browser
#
#
#****************************************************************************
#
# Begin: page-specific settings. Change these.
$pageTitle = "Generating ATL and XSLT from the same weaving model";
$pageKeywords = "";
$pageAuthor = "Marcos Didonet Del Fabro";
# Paste your HTML content between the EOHTML markers!
$html = <<<EOHTML
<!-- Main part -->
<div id="midcolumn">
<table width="100%">
<tr>
<td width="50%">
<h1>$pageTitle</h1>
</td>
</tr>
</table>
<p>
This example generates XSLT and ATL transformations from the same weaving model.
It contains two ATL HOTs (higher-order transformations).
The first HOT transforms a weaving model into an ATL model.
The second HOT transforms a weaving model into an XSLT model.
</p>
<h2>Instructions</h2>
<b>Loading the weaving model into AMW:</b></br>
The weaving model (models/FK2Nested_AMW.ecore) must be loaded using the wizard to be able to
create the metadata file in the workspace. </br>This step does not need to be executed to produce the HOTs.
<br/>
<i>Left metamodel:</i> metamodels/FKMetaSchema.ecore.</br>
<i>Right metamodel:</i> metamodels/NestedMetaSchema.ecore.
<h3>ATL HOT</h3>
<p/>
<b>Executing the HOT:</b></br>
The file hot/AMWtoATL.atl is a higher-order transformation.
There is a launch configuration file with the input and output models.</br>
The transformation produces a transformation model output_atl/ATL-model.ecore.
The output model must be extracted into the ATL technical space (i.e., produce an ATL file).
The model may be extracted by right-clicking in the ecore model in the "AM3 Resource Navigator" view and
by clicking in "Extract ATL-0.2 model into ATL-0.2 file". This action produces the ATL-model.atl file.
</br>
When using ATL versions before "January 13, 2006", use AMWtoATL_old.atl to be compatible with
previous versions of the ATL metamodel.
<p/>
<b>Executing the transformation:</b></br>
The ATL-model.atl transformation transforms the models/libraryFK.ecore model
(conforms to metamodels/FKMetaSchema.ecore) into models/libraryNested.ecore (conforms to
metamodels/NestedMetaSchema.ecore). Use the launch configuration that is provided in the .zip file. </br>
<p/>
<h3>XSLT HOT</h3>
<p/>
<b>Executing the HOT:</b></br>
There is an Ant Script (/generateXSLT.xml) that automatically produces the XSLT file. It executes the following actions:
<ul class="midlist">
<li>
executes the ATL HOT (hot/AMWtoXSLT.atl) that produces an XSLT model (hot/XSLTout.ecore)
conforming to the XSLT metamodel (metamodels/XSLT.ecore),
</li>
<li>
transforms the XSLT model into a XML model (models/XMLModel_XSLT.ecore),
</li>
<li>
extracts the XML model into the XML technical space, i.e., into a XSLT transformation (xslt/FK2Nested.xslt).
<br/>Remark: The 'XML2Text.atl' transformation must be modified to use the local path of the output XSLT.
</li>
</ul>
<p/>
<b>Executing the transformation:</b></br>
The XSLT transformation takes as input a XML file (xslt/libraryFK.ecore) and produces the xslt/output.xml file. <br/>
<i>Remark: </i> We used <a href="http://www.altova.com/products/xmlspy/xml_editor.html">XMLSpy</a> as XSLT engine. <p/>
<p/>
These transformations can be executed separatedly as well.
Each transformartion has a predefined "launch configuration" file.
<p/>
</div>
EOHTML;
# Generate the web page
$App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html);
?>