Skip to main content


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 12:27 Go to next message
Eszter Hofmann is currently offline Eszter HofmannFriend
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 16:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
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 09:15 Go to previous message
Eszter Hofmann is currently offline Eszter HofmannFriend
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: Thu Apr 18 20:47:02 GMT 2024

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

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

Back to the top