Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » How to set the transformation output file path?
How to set the transformation output file path? [message #47554] Thu, 10 July 2008 15:17 Go to next message
Eclipse UserFriend
Originally posted by:

Hello everyone,

I would like my JET transformation output file name to be based on some
variables values.

The current JET code is:

<ws:file template="templates/flow_template.jet"

I have changed it to:

<ws:file template="templates/flow_template.jet"
select="/Flow/@flowName"/>"."<c:get select="/Flow/@flowCategory"/>".xml"/>

where Flow is an Ecore element with flowName and flowCategory attributes.

I would like the output file name to be

When I run my transformation, I get the following error message:
org.eclipse.jet.taglib.JET2TagException: Path must include project and
resource name: /FlowEditor/

Could you please help me to fix this?

Thanks a lot in advance for your time,

Re: How to set the transformation output file path? [message #47587 is a reply to message #47554] Fri, 11 July 2008 11:51 Go to previous message
Paul Elder is currently offline Paul ElderFriend
Messages: 849
Registered: July 2009
Senior Member

You wrote:
> I would like the output file name to be
> <flowName_value>.<flowCategory_value>.xml


<ws:file template="templates/flow_template.jet"
path=" {$}/{/Flow/@flowName}.{ /Flow/@flowCategory}.xml "/>

In general, any JET tag's attribute value can be composed of multiple
'dynamic XPath' expressions between { and }. So, the above ws:file tag has
three expressions in the path attribute:
* $ gives name of the project of the
input model
* /Flow/@flowName and /Flow/@flowCategory give components of the file

Previous Topic:Xpand Ganymede Roadmap
Next Topic:iteration over an iterable object not a select
Goto Forum:

Current Time: Wed Oct 07 13:00:51 GMT 2015

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

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