Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [QVTo] Using model elements having as name a QVTo keyword
[QVTo] Using model elements having as name a QVTo keyword [message #696621] Thu, 14 July 2011 08:27 Go to next message
Eszter Hofmann is currently offline Eszter Hofmann
Messages: 16
Registered: July 2011
Junior Member
Hello,
I have an ecore meta model created from an xsd, which I cannot change. The problem is that I have an enumeration containing elements like "enum", "object" (QVTO keywords) and when referencing these in my transformation code I get errors like: "token "enum" is invalid". Is there any solution to handle this situation?
Re: [QVTo] Using model elements having as name a QVTo keyword [message #696710 is a reply to message #696621] Thu, 14 July 2011 12:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed Willink
Messages: 4008
Registered: July 2009
Senior Member
HI

The old solution was to use an underscore prefix: _enum.

The old solution has an ambiguity for underscore prefixed names and so
OCL 2.3 introduced an underscore prefixed string in which standard
backslash sequences could also be used. so _'enum', but I doubt that
QVTo has implemented this.

Regards

Ed Willink

On 14/07/2011 13:27, Eszter Hofmann wrote:
> Hello,
> I have an ecore meta model created from an xsd, which I cannot change.
> The problem is that I have an enumeration containing elements like
> "enum", "object" (QVTO keywords) and when referencing these in my
> transformation code I get errors like: "token "enum" is invalid". Is
> there any solution to handle this situation?
Re: [QVTo] Using model elements having as name a QVTo keyword [message #696987 is a reply to message #696710] Fri, 15 July 2011 05:15 Go to previous message
Eszter Hofmann is currently offline Eszter Hofmann
Messages: 16
Registered: July 2011
Junior Member
Hi,
thanks for the quick answear! Both solutions are working!

Eszter
Previous Topic:[QVTo] Reuse Strategies (inherits, merges, disjuncts)
Next Topic:[ATL] Allow inter-model references programmatically
Goto Forum:
  


Current Time: Mon Jul 28 14:44:49 EDT 2014

Powered by FUDForum. Page generated in 0.01547 seconds