Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » GMT (Generative Modeling Technologies) » Unexpected output
Unexpected output [message #552638] Fri, 13 August 2010 01:43 Go to next message
Transformed is currently offline TransformedFriend
Messages: 21
Registered: June 2010
Junior Member
Hi all,
I am having problem with output format of the XML file.

The xml.km3 file is like this
package PrimitiveTypes {
datatype Boolean;
datatype Integer;
datatype String;
package XML {
abstract class Node {
reference parent[0-1] : Element oppositeOf children;
attribute startLine[0-1] : Integer;
attribute startColumn[0-1] : Integer;
attribute endLine[0-1] : Integer;
attribute endColumn[0-1] : Integer;
attribute name : String;
attribute value : String;
class Attribute extends Node {
class Text extends Node {
class Element extends Node {
reference children[*] ordered container : Node oppositeOf parent;
class Root extends Element {

here is my XMI input file for the ATL code presented below.
sample XMI (IN:BPEL) file
<?xml version="1.0" encoding="ISO-8859-1"?>
<BPEL:Process xmi:version="2.0" xmlns:xmi="" xmlns:xsi="" xmlns:BPEL="uri:BPEL.ecore" name="ManRoleType" targetNameSpace="http://example .org/build2order">

This is my ATL file with the rule.
--******************ATL FILE ************
module BPEL2XML;
create OUT : XML from IN : BPEL;
rule Process2Root{
s : BPEL!Process( ]
t : XML!Root(
name <- 'process',
children <- Sequence{xmlns, name}
xmlns : XML!Attribute(
name <- 'xmlns',
value <- ''

name : XML!Attribute(
name <- 'name',
value <-
************************************************** *******

This is my output which is not as I had expected.
<?xml version="1.0" encoding="ISO-8859-1"?>
<Root xmi:version="2.0" xmlns:xmi="" xmlns:xsi="" xmlns="XML" name="process">
  <children xsi:type="Attribute" name="xmlns" value=""/>
  <children xsi:type="Attribute" name="name" value="ManRoleType"/>

This is my expected output.
-----------> Expected output <---------------------
Expected Output
<?xml version="1.0" encoding="ISO-8859-1"?>
<process name="ManRoleType xmlns="">

What sort of changes should I make in ATL rule so that I will get the expected output of BPEL file.

Thanking in advance!

[Updated on: Fri, 13 August 2010 02:23]

Report message to a moderator

Re: Unexpected output [message #552748 is a reply to message #552638] Fri, 13 August 2010 11:28 Go to previous message
Transformed is currently offline TransformedFriend
Messages: 21
Registered: June 2010
Junior Member

I wanted to used AM3 for the above case but I just tried the above mentioned ATL transformation with out installing AM3.

Does this also make difference?

Previous Topic:Generate code SQL in Eclipse
Next Topic:MOFScript Java execution failing with PackageNotFoundException
Goto Forum:

Current Time: Mon Nov 19 12:10:14 GMT 2018

Powered by FUDForum. Page generated in 0.03331 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top