Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » [ATL] external parameters
[ATL] external parameters [message #660038] Wed, 16 March 2011 11:51
Eclipse UserFriend
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 =
XML!Element.allInstancesFrom('parameters')->select
(m|m.name = '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 a.name = attrName)->asSequence() in
if eltC->notEmpty()
then eltC->first().value
Else ''
endif;

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"/>
</children>

Does anyone know why this Element is undefined?

Any hint will be appreciated,

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


Current Time: Sun Jul 13 19:40:33 EDT 2025

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

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

Back to the top