Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] Apply rules recursively to children
[ATL] Apply rules recursively to children [message #69824] Mon, 17 December 2007 18:35
Eclipse UserFriend
Originally posted by:


I am a bit of a newbie to ATL, so please bear with me. I am trying to
Transform particular aspects of a RDFS XML document into ECore classes.
The ATL code is below. What I want is to create an RDFS!Graph which
contains all rdfs:Classes, but this only creates one RDFS:Class. I have
looked through the XMI and it seems that the rest of the RDFS:Class
definition are deeper in the children heirarchy (i.e. not direct children
of r) Is there anyway to recursivly look not only at the children of r,
but its children etc?

If you have any questions regarding my problem please ask. Thanks for your


rule Model2Graph {
r: XML!Root (

rdfs : RDFS!Graph (
graphName <- r.children->select(


lazy rule Class2Class {
pt: XML!Element( = 'rdfs:Class'

c : RDFS!Class(uriRef <-uri),
uri : RDFS!URIReference ( uri <- u_r_i ),
u_r_i : RDFS!UniformResourceIdentifier ( name <- pt.children->select( e
| = 'rdf:ID')->first().value)
thisModule.tag<- pt.children->select( e | =
thisModule.getBaseNSSchema().toString().println();--.concat( ':').concat(thisModule.tag).println();

Previous Topic:[ATL]Problem running an ant file
Next Topic:[ATL] *Important* CVS changes
Goto Forum:

Current Time: Fri Aug 12 09:29:37 GMT 2022

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

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

Back to the top