Skip to main content


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 18:16 Go to next message
Eclipse UserFriend
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 11:33 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 676
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: Fri Apr 26 20:53:58 GMT 2024

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

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

Back to the top