Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » ws:file in JET2
ws:file in JET2 [message #115476] Sun, 23 March 2008 15:28 Go to next message
Kamesh Sampath is currently offline Kamesh SampathFriend
Messages: 213
Registered: July 2009
Senior Member
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 #115503 is a reply to message #115476] Sun, 23 March 2008 18:16 Go to previous messageGo 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 #115566 is a reply to message #115503] 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
Re: ws:file in JET2 [message #615961 is a reply to message #115476] Sun, 23 March 2008 18:16 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
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
>
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: ws:file in JET2 [message #615966 is a reply to message #115503] 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:Update database schema with Teneo/Hibernate
Next Topic:installation problem on 3.3.1.1
Goto Forum:
  


Current Time: Thu Apr 25 02:30:01 GMT 2024

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

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

Back to the top