Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Tansformation a XML Document to another XML
[ATL] Tansformation a XML Document to another XML [message #36800] Thu, 10 May 2007 12:21 Go to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hi all,

I'm new to ATL and confronted with the problem to transform a XML
Document (source model) which specifies a process model and is defined
by a DTD to another XML document (target model) that specifies the
process in XPDL.

As far as I understood I need for a model transformation - besides the
transformation module - the a source and a target model and their
meta-models.
The source model respective its document is the result of an export form
a process modeling tool (ARIS Business Architect) and defined by an DTD.
The target model shall be imported to a BPM system an must there be an
valid XPDL (see http://wfmc.org/standards/xpdl.htm) document.
Now my questions:
1) Is is possible to transform XML document which are only defined by an
DTD with ATL? Or ist it necessary to have the document / model to
transform in XMI format?
2) Is there a comfortable way to get a meta model from a DTD?
3) Is there a possibility to integrate / use ATL form an application /
program and if yes what are the requirements (libraries, programs etc.)?

Thanks and regards

Erik
Re: [ATL] Tansformation a XML Document to another XML [message #36868 is a reply to message #36800] Thu, 10 May 2007 13:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Hugo.Bruneliere.univ-nantes.fr

Hi Erik,

Erik Becker a écrit :
> Hi all,
>
> I'm new to ATL and confronted with the problem to transform a XML
> Document (source model) which specifies a process model and is defined
> by a DTD to another XML document (target model) that specifies the
> process in XPDL.
>

Have you already installed ATL? Which version?

If you installed the latest release of ATL, you also have AM3 and its
"AM3 Resource Navigator" view which provides very useful facilities (I
will refer to some of these facilities in the remainder of my answer).
You can open this view within Eclipse by doing "Window->Show
View->Other->ATL/AM3 Resource Navigator". It's better to have this view
opened when working with ATL.

> As far as I understood I need for a model transformation - besides the
> transformation module - the a source and a target model and their
> meta-models.
> The source model respective its document is the result of an export form
> a process modeling tool (ARIS Business Architect) and defined by an DTD.
> The target model shall be imported to a BPM system an must there be an
> valid XPDL (see http://wfmc.org/standards/xpdl.htm) document.
> Now my questions:
> 1) Is is possible to transform XML document which are only defined by an
> DTD with ATL? Or ist it necessary to have the document / model to
> transform in XMI format?

An ATL transformation takes models as inputs and produces models as outputs.

So, the first step in your process is to inject the content of your
input XML file into an XML model (i.e. a model that conforms to the XML
metamodel). To do that: right-click on your input XML file and "Inject
XML file to XML model (Ecore based)". Note that the XML metamodel is
freely available from http://www.eclipse.org/gmt/am3/zoos/atlanticZoo/#XML.
Then you have to transform your XML model to a BPEL model by writing an
ATL transformation.

The next (and most important) step is to transform your BPEL model to a
XPDL model by another ATL transformation.

After that, you have to transform the XPDL model to an XML model by
another ATL transformation. Finally you can extract your XML model to an
XML file in the XPDL format. To do that: right-click on your output XML
model and "Extract XML model to XML file".

> 2) Is there a comfortable way to get a meta model from a DTD?

We do not provide generic means for automatically building metamodels
from DTDs.
Currently, we define our own metamodels manually using KM3 (which is our
DSL for defining metamodels) and convert them to Ecore by right-clicking
on the KM3 files and "Inject KM3 to Ecore metamodel".

> 3) Is there a possibility to integrate / use ATL form an application /
> program and if yes what are the requirements (libraries, programs etc.)?
>

Yes, you can launch an ATL transformation programmatically. See
http://wiki.eclipse.org/index.php/ATL_Howtos#How_do_I_launch _transformations_programmatically.3F
for getting more information on this point.

A simpler and easier way is to use ANT scripts calling AM3 tasks for
performing the overall process (and why not call this script from a Java
program).
See http://wiki.eclipse.org/index.php/AM3_Ant_Tasks for getting
information on this point.

> Thanks and regards
>
> Erik

Best regards,

Hugo

--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
Re: [ATL] Tansformation a XML Document to another XML [message #37003 is a reply to message #36868] Fri, 11 May 2007 09:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: erik_becker.gmx.de

Hi Hugo,

thanks for your quick reply. You gave me some good advice.

Hugo Bruneliere schrieb:
> Hi Erik,
>
> Erik Becker a écrit :
>> Hi all,
>>
>> I'm new to ATL and confronted with the problem to transform a XML
>> Document (source model) which specifies a process model and is defined
>> by a DTD to another XML document (target model) that specifies the
>> process in XPDL.
>>
>
> Have you already installed ATL? Which version?

I've installed ATL 1.0.7, the full bundle with eclipse.

> If you installed the latest release of ATL, you also have AM3 and its
> "AM3 Resource Navigator" view which provides very useful facilities (I
> will refer to some of these facilities in the remainder of my answer).
> You can open this view within Eclipse by doing "Window->Show
> View->Other->ATL/AM3 Resource Navigator". It's better to have this view
> opened when working with ATL.
>
>> As far as I understood I need for a model transformation - besides the
>> transformation module - the a source and a target model and their
>> meta-models.
>> The source model respective its document is the result of an export
>> form a process modeling tool (ARIS Business Architect) and defined by
>> an DTD. The target model shall be imported to a BPM system an must
>> there be an valid XPDL (see http://wfmc.org/standards/xpdl.htm) document.
>> Now my questions:
>> 1) Is is possible to transform XML document which are only defined by
>> an DTD with ATL? Or ist it necessary to have the document / model to
>> transform in XMI format?
>
> An ATL transformation takes models as inputs and produces models as
> outputs.
>
> So, the first step in your process is to inject the content of your
> input XML file into an XML model (i.e. a model that conforms to the XML
> metamodel). To do that: right-click on your input XML file and "Inject
> XML file to XML model (Ecore based)". Note that the XML metamodel is
> freely available from http://www.eclipse.org/gmt/am3/zoos/atlanticZoo/#XML.
> Then you have to transform your XML model to a BPEL model by writing an
> ATL transformation.
> The next (and most important) step is to transform your BPEL model to a
> XPDL model by another ATL transformation.

Why do you recommend to transform first the model to BPEL? Couldn't I
directly transform the (ARIS) model to XPDL?


> After that, you have to transform the XPDL model to an XML model by
> another ATL transformation. Finally you can extract your XML model to an
> XML file in the XPDL format. To do that: right-click on your output XML
> model and "Extract XML model to XML file".
>
>> 2) Is there a comfortable way to get a meta model from a DTD?
>
> We do not provide generic means for automatically building metamodels
> from DTDs.
> Currently, we define our own metamodels manually using KM3 (which is our
> DSL for defining metamodels) and convert them to Ecore by right-clicking
> on the KM3 files and "Inject KM3 to Ecore metamodel".
>
>> 3) Is there a possibility to integrate / use ATL form an application
>> / program and if yes what are the requirements (libraries, programs
>> etc.)?
>>
>
> Yes, you can launch an ATL transformation programmatically. See
> http://wiki.eclipse.org/index.php/ATL_Howtos#How_do_I_launch _transformations_programmatically.3F
> for getting more information on this point.
>
> A simpler and easier way is to use ANT scripts calling AM3 tasks for
> performing the overall process (and why not call this script from a Java
> program).
> See http://wiki.eclipse.org/index.php/AM3_Ant_Tasks for getting
> information on this point.

I want to develop a solution which does the whole model transformation
automatically, e.g. by implementing a appropriate java program or ant
script. Is it possible to do all the necessary steps by ant script or
using the Java API of the ATL VM?
What about the model respositories needed? Are only available with the
Eclipse GUI or are the part of the ATL VM?

Greetings

Erik
Re: [ATL] Tansformation a XML Document to another XML [message #37176 is a reply to message #37003] Fri, 11 May 2007 11:31 Go to previous message
Eclipse UserFriend
Originally posted by: Hugo.Bruneliere.univ-nantes.fr

Hi Erik,

Erik Becker a écrit :
> Hi Hugo,
>
> thanks for your quick reply. You gave me some good advice.
>
> Hugo Bruneliere schrieb:
>> Hi Erik,
>>
>> Erik Becker a écrit :
>>> Hi all,
>>>
>>> I'm new to ATL and confronted with the problem to transform a XML
>>> Document (source model) which specifies a process model and is
>>> defined by a DTD to another XML document (target model) that
>>> specifies the process in XPDL.
>>>
>>
>> Have you already installed ATL? Which version?
>
> I've installed ATL 1.0.7, the full bundle with eclipse.
>
>> If you installed the latest release of ATL, you also have AM3 and its
>> "AM3 Resource Navigator" view which provides very useful facilities (I
>> will refer to some of these facilities in the remainder of my answer).
>> You can open this view within Eclipse by doing "Window->Show
>> View->Other->ATL/AM3 Resource Navigator". It's better to have this
>> view opened when working with ATL.
>>
>>> As far as I understood I need for a model transformation - besides
>>> the transformation module - the a source and a target model and their
>>> meta-models.
>>> The source model respective its document is the result of an export
>>> form a process modeling tool (ARIS Business Architect) and defined by
>>> an DTD. The target model shall be imported to a BPM system an must
>>> there be an valid XPDL (see http://wfmc.org/standards/xpdl.htm)
>>> document.
>>> Now my questions:
>>> 1) Is is possible to transform XML document which are only defined by
>>> an DTD with ATL? Or ist it necessary to have the document / model to
>>> transform in XMI format?
>>
>> An ATL transformation takes models as inputs and produces models as
>> outputs.
>>
>> So, the first step in your process is to inject the content of your
>> input XML file into an XML model (i.e. a model that conforms to the
>> XML metamodel). To do that: right-click on your input XML file and
>> "Inject XML file to XML model (Ecore based)". Note that the XML
>> metamodel is freely available from
>> http://www.eclipse.org/gmt/am3/zoos/atlanticZoo/#XML.
>> Then you have to transform your XML model to a BPEL model by writing
>> an ATL transformation.
>> The next (and most important) step is to transform your BPEL model to
>> a XPDL model by another ATL transformation.
>
> Why do you recommend to transform first the model to BPEL? Couldn't I
> directly transform the (ARIS) model to XPDL?

I saw on your previous mail (04/05/07) that you wanted to implement a
transformation from BPEL to XPDL. That is the reason why I thought the
models generated by the ARIS tool were in the BPEL format. :-)
Of course, if it is not the case you do not need to first transform your
XML model to a BPEL model. You rather have to define an ARIS metamodel
(if it does not already exist), generate an ARIS model and then directly
transform it into a XPDL model.

>
>
>> After that, you have to transform the XPDL model to an XML model by
>> another ATL transformation. Finally you can extract your XML model to
>> an XML file in the XPDL format. To do that: right-click on your output
>> XML model and "Extract XML model to XML file".
>>
>>> 2) Is there a comfortable way to get a meta model from a DTD?
>>
>> We do not provide generic means for automatically building metamodels
>> from DTDs.
>> Currently, we define our own metamodels manually using KM3 (which is
>> our DSL for defining metamodels) and convert them to Ecore by
>> right-clicking on the KM3 files and "Inject KM3 to Ecore metamodel".
>>
>>> 3) Is there a possibility to integrate / use ATL form an application
>>> / program and if yes what are the requirements (libraries, programs
>>> etc.)?
>>>
>>
>> Yes, you can launch an ATL transformation programmatically. See
>> http://wiki.eclipse.org/index.php/ATL_Howtos#How_do_I_launch _transformations_programmatically.3F
>> for getting more information on this point.
>>
>> A simpler and easier way is to use ANT scripts calling AM3 tasks for
>> performing the overall process (and why not call this script from a
>> Java program).
>> See http://wiki.eclipse.org/index.php/AM3_Ant_Tasks for getting
>> information on this point.
>
> I want to develop a solution which does the whole model transformation
> automatically, e.g. by implementing a appropriate java program or ant
> script. Is it possible to do all the necessary steps by ant script or
> using the Java API of the ATL VM?

Yes, you can build quite easily a single ANT script that implement all
the previously described steps from the injection of the input XML file
(into an XML model) to the extraction of the output XML model to an XML
file, passing by the execution of the various model-to-model
transformations.
It is also possible to implement in Java such an overall process.

> What about the model respositories needed? Are only available with the
> Eclipse GUI or are the part of the ATL VM?

Models handled in ATL are managed by the model handler used by the ATL
VM. Currently, we provide EMF and MDR model handler implementation for
ATL. The EMF implementation is most commonly used under Eclipse.

>
> Greetings
>
> Erik
>

Best regards,

Hugo

--
--------------------------------------------------------
Hugo Bruneliere - R&D Engineer
ATLAS Group (INRIA & LINA) - University of Nantes
2, rue de la Houssiniere
44322 Nantes Cedex 3 - France
office +33 2 51 12 58 10 /\ cell.+33 6 07 42 45 30
EMail: Hugo.Bruneliere@univ-nantes.fr
http://www.sciences.univ-nantes.fr/lina/atl/
--------------------------------------------------------
Previous Topic:[ATL] odd transformation behavior
Next Topic:[ATL] Parsing context-free language
Goto Forum:
  


Current Time: Fri Apr 26 21:40:28 GMT 2024

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

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

Back to the top