Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Access values between tags via qvto
Access values between tags via qvto [message #1008379] Tue, 12 February 2013 08:54 Go to next message
Andreas Burger is currently offline Andreas Burger
Messages: 14
Registered: June 2011
Junior Member
Hello,

is it possible to access values between tags via qvto?
For example i have something like this in a xml document:
<tag> value </tag>
and the xml is conform to my ecore. In the ecore i marked the element which defines the specific tag as "simple" by the extended metadata.
Nevertheless i can't access the value between the tags.
Does anybody know how i can read out this value using a qvto or an ocl operation?

Best regards,

Andreas
Re: Access values between tags via qvto [message #1008437 is a reply to message #1008379] Tue, 12 February 2013 13:32 Go to previous message
Ed Willink is currently offline Ed Willink
Messages: 4095
Registered: July 2009
Senior Member
Hi

If you used a model as input the tag value should already have been
extracted making access trivial.

OCL (and QVTo) are not primarily designed for text processing, there are
much better languages for that, but if you really must then you need to
look at the functions in the string library. The Juno version added
additional regular expression functions that may help.

Regards

Ed Willink


On 12/02/2013 08:54, Andreas Burger wrote:
> Hello,
>
> is it possible to access values between tags via qvto?
> For example i have something like this in a xml document:
> <tag> value </tag>
> and the xml is conform to my ecore. In the ecore i marked the element
> which defines the specific tag as "simple" by the extended metadata.
> Nevertheless i can't access the value between the tags.
> Does anybody know how i can read out this value using a qvto or an ocl
> operation?
>
> Best regards,
>
> Andreas
Previous Topic:Specifying concrete output model
Next Topic:[Announce] Eclipse QVT Operational 3.2.2 (Juno SR2) is now available
Goto Forum:
  


Current Time: Thu Oct 23 20:02:43 GMT 2014

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

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