Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Re: ws:file in JET2
Re: ws:file in JET2 [message #43489] Sun, 23 March 2008 14:16 Go to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

Kamesh,

It's best to ask on the M2T newsgroup, so I've added that to the "to"
list of the reply.


Kamesh Sampath wrote:
> Hi,
>
> Can anyone let me know how to use an xpath expression within JET2 ? I am
> trying to prefix my file names of the ws:file tag with an value evaluting to
> xPath
>
> Regards,
> Kamesh
>
>
>
Re: ws:file in JET2 [message #43517 is a reply to message #43489] Mon, 24 March 2008 07:33 Go to previous message
Felix Dorner is currently offline Felix Dorner
Messages: 675
Registered: July 2009
Senior Member
>> Can anyone let me know how to use an xpath expression within JET2 ? I
>> am trying to prefix my file names of the ws:file tag with an value
>> evaluting to xPath

Depends on the context.

If the attribute expects an XPath expression you can enter it directly
like that:

<c:iterate select="//Dog" ..> // select all dogs.

If you'd like to set an attribute to be the _value_ of an XPath
Expression, you have to put it in curly braces, just like in XSLT.

Look at this example:

<java:class name="{className($_enum/@__qname)}"
package="{packageName($_enum/@__qname)}"
srcFolder="{$genpath}"
template="templates/enumeration.jet"/>

the name, package and srcFolder attributes are all Xpath expressions.

It works the same way in the file tag.


Felix
Previous Topic:Re: Jet Editor and Argument variable
Next Topic:Issue with JMerge
Goto Forum:
  


Current Time: Mon Sep 01 09:57:51 EDT 2014

Powered by FUDForum. Page generated in 0.13597 seconds