ws:file in JET2 [message #115476] |
Sun, 23 March 2008 11:28  |
Eclipse User |
|
|
|
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 #115566 is a reply to message #115503] |
Mon, 24 March 2008 07:33  |
Eclipse User |
|
|
|
>> 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
|
|
|
Re: ws:file in JET2 [message #615961 is a reply to message #115476] |
Sun, 23 March 2008 14:16  |
Eclipse User |
|
|
|
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 #615966 is a reply to message #115503] |
Mon, 24 March 2008 07:33  |
Eclipse User |
|
|
|
>> 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
|
|
|
Powered by
FUDForum. Page generated in 0.04034 seconds