Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL]Problem setting element value
[ATL]Problem setting element value [message #496102] Sun, 08 November 2009 16:41 Go to next message
mag  is currently offline mag Friend
Messages: 3
Registered: November 2009
Junior Member
I have a problem setting a value of the element name in my output model. Metamodel looks something like this:

Class:
LocationType
Atribute:
x:AnySimpleType
y:AnySimpleType
name : NameType

Class:
NameType
Atribute:
mixed: EFeatureMapEntry
x:AnySimpleType
y:AnySimpleType

The output xml code should look like this:
<name x="2" y ="3">MyName</name>
I have no problem setting x and y, but the problem is value: MyName

With this code:
	name_type: MMB!NameType(
		x <- '5',
		y <- '1'
	)

I get <name x="2" y ="3"/> , but i cant get desired code, if I try to write something like:
	location_type: MMB!LocationType (
		name <- 'MyName'
	)

I get an error: java.lang.String cannot be cast to org.eclipse.emf.ecore.InternalEObject
Re: [ATL]Problem setting element value [message #497763 is a reply to message #496102] Fri, 13 November 2009 11:58 Go to previous message
mag  is currently offline mag Friend
Messages: 3
Registered: November 2009
Junior Member
This works:

xml_mixed: MMB!XMLTypeDocumentRoot(
text <- Sequence{'MyName'}
),
name_type: MMB!NameType(
x <- '5',
y <- '9',
mixed <- xml_mixed.mixed
)
Previous Topic:[QVTO] Runtime error : QvtEvaluator: failed to evaluate oclOperationCall
Next Topic:[ATL] Two virtual machines, two transformations results
Goto Forum:
  


Current Time: Tue Apr 23 15:14:42 GMT 2024

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

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

Back to the top