Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » concatenation in JET2 in get default function
concatenation in JET2 in get default function [message #6517] Fri, 23 March 2007 15:37 Go to next message
Eclipse User
Originally posted by: evaandoli.dodo.com.au

Hi,

I'd like to perform a concatenation on the default value in the <c:get

Is this possible ?

Something like:

<c:get select="$node/@name" default=("No name entered for "<c:get
select="$node/@tag" />) />
Re: concatenation in JET2 in get default function [message #6619 is a reply to message #6517] Mon, 26 March 2007 12:15 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Stu:

Answer is "yes", but not the way you do it.

You cannot embed one XML tag inside another. Instead, you have to use a
"dynamic XPath" expression - an XPath expression between { and }. So, write:

<c:get select='$node/@name" default="No name entered for '{$node/@tag}'."/>

Paul

"Stu" <evaandoli@dodo.com.au> wrote in message
news:eu0uek$6u7$1@utils.eclipse.org...
> Hi,
>
> I'd like to perform a concatenation on the default value in the <c:get
>
> Is this possible ?
>
> Something like:
>
> <c:get select="$node/@name" default=("No name entered for "<c:get
> select="$node/@tag" />) />
>
>
Re: concatenation in JET2 in get default function [message #6674 is a reply to message #6619] Tue, 27 March 2007 03:30 Go to previous messageGo to next message
Eclipse User
Originally posted by: evaandoli.dodo.com.au

Paul,

Thanks for the two replies - excellent result.
I also assume http://www.w3.org/TR/xpath is a good source for reference
manual for this sort of thing
Thanks again,

Stu

"Paul Elder" <pelder@ca.ibm.com> wrote in message
news:eu8dgq$uqc$1@utils.eclipse.org...
> Stu:
>
> Answer is "yes", but not the way you do it.
>
> You cannot embed one XML tag inside another. Instead, you have to use a
> "dynamic XPath" expression - an XPath expression between { and }. So,
> write:
>
> <c:get select='$node/@name" default="No name entered for
> '{$node/@tag}'."/>
>
> Paul
>
> "Stu" <evaandoli@dodo.com.au> wrote in message
> news:eu0uek$6u7$1@utils.eclipse.org...
>> Hi,
>>
>> I'd like to perform a concatenation on the default value in the <c:get
>>
>> Is this possible ?
>>
>> Something like:
>>
>> <c:get select="$node/@name" default=("No name entered for "<c:get
>> select="$node/@tag" />) />
>>
>>
>
>
Re: concatenation in JET2 in get default function [message #7988 is a reply to message #6674] Tue, 27 March 2007 12:04 Go to previous message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Stu:

I refer to the functions section a lot. The rest of the document is
considerably less reader friendly.

"Stu" <evaandoli@dodo.com.au> wrote in message
news:eua33u$bft$1@utils.eclipse.org...
>
> I also assume http://www.w3.org/TR/xpath is a good source for reference
> manual for this sort of thing
Previous Topic:src directory where code is generated does not appear
Next Topic:Using JET2 <c:stringTokens
Goto Forum:
  


Current Time: Sat Sep 20 16:12:44 GMT 2014

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

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