Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Aggregate Concat with a jet function
Aggregate Concat with a jet function [message #30415] Wed, 08 August 2007 07:42 Go to next message
Eclipse User
Originally posted by: evaandoli.dodo.com.au

Hi,

Im looking at doing a aggregate concat with the new value passed to a jet
function first.
Now for some reason I thought you might not understand what I meant by that
so here is an example :-)
<c:setVariable var="csvImportList"
select=" '{$csvImportList},'surroundInDoubleQuotes('{$tempCompoundNod e/@leftOperand}.csv') "/>

all is ok if I take out the function and just have one set of '

<c:setVariable var="csvImportList"
select="'{$csvImportList},{$tempCompoundNode/@leftOperand}.csv' "/>

I dont want to have to write another jet function just for this :-)

Any clues,

Stu
Re: Aggregate Concat with a jet function [message #30557 is a reply to message #30415] Wed, 08 August 2007 11:50 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Stu:

The following should work:

<c:setVariable var="csvImportList" select="concat($csvImportList, ',' ,
surroundInDoubleQuotes($tempCompoundNode/@leftOperand), '.csv')" />

In general, I think you should be suspicious of embedding dynamic XPath
expressions (Xpath expressions in {...}) within an XPath expression - these
may always be rewritten with them.

Paul

"Stu" <evaandoli@dodo.com.au> wrote in message
news:f9ca70$uf8$1@build.eclipse.org...
> Hi,
>
> Im looking at doing a aggregate concat with the new value passed to a jet
> function first.
> Now for some reason I thought you might not understand what I meant by
> that so here is an example :-)
> <c:setVariable var="csvImportList"
> select=" '{$csvImportList},'surroundInDoubleQuotes('{$tempCompoundNod e/@leftOperand}.csv') "/>
>
> all is ok if I take out the function and just have one set of '
>
> <c:setVariable var="csvImportList"
> select="'{$csvImportList},{$tempCompoundNode/@leftOperand}.csv' "/>
>
> I dont want to have to write another jet function just for this :-)
>
> Any clues,
>
> Stu
>
>
Previous Topic:Getting Double Quotes in a string
Next Topic:[JET] How modular should JET be?
Goto Forum:
  


Current Time: Tue Jul 29 02:46:12 EDT 2014

Powered by FUDForum. Page generated in 0.02488 seconds