Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] external parameters
[ATL] external parameters [message #660038] Wed, 16 March 2011 15:51
Sally  is currently offline Sally Friend
Messages: 16
Registered: March 2011
Junior Member
Hi all,

I'm trying to use external parameters in ATL transformation through XML file, but I got this error

org.eclipse.m2m.atl.engine.emfvm.VMException: Operation not found: OclUndefined.getStringAttrValue(java.lang.String)
at getParameter#36(transPara1.atl[19:1-22:39])

module transPara1;
create OUT : UML from IN : UML, parameters : XML;

helper def : sourceValue : String = thisModule.getParameter('ss:Width');

helper def : getParameter(attributeName : String) : String =
(m| = 'children')->select(a|a.getStringAttrValue('name')= attributeName)->first().getStringAttrValue('value');

helper context XML!Element def: getStringAttrValue(attrName : String) : String =
let eltC : Sequence(XML!Attribute) =
self.children->select(a | a.oclIsTypeOf(XML!Attribute) and = attrName)->asSequence() in
if eltC->notEmpty()
then eltC->first().value
Else ''

Part of the parameters file:
<children xsi:type="Element" startLine="6" startColumn="33" endLine="6" endColumn="33" name="Column">
<children xsi:type="Attribute" name="ss:Width" value="150.0"/>

Does anyone know why this Element is undefined?

Any hint will be appreciated,

Previous Topic:[QVTo] Sending objects to transformation
Next Topic:[ATL] working with the href references of two models
Goto Forum:

Current Time: Wed Mar 03 02:38:07 GMT 2021

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

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

Back to the top