This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > September 2005 > xslt: How to I simulate SringA = StringA + Stringb?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
xslt: How to I simulate SringA = StringA + Stringb?
|
|
|
|
I am using an xslt to create a text document. This is working find, except
for one thing. As I go through each iteration of one of the templates, I
need to create a variable and keep adding text to it each time I enter the
template. This variable is basically a list of certain attributes which I
want to do some string manipulation at the very end of the document, then I
would like to output the string. I have everything working, except for
this. Do you have any ideas???
I hope this all makes sense. Thanks in advance for your response!
--
Steve
| |
| Martin Honnen 2005-09-13, 7:46 pm |
|
Steve wrote:
> I am using an xslt to create a text document. This is working find, except
> for one thing. As I go through each iteration of one of the templates, I
> need to create a variable and keep adding text to it each time I enter the
> template. This variable is basically a list of certain attributes which I
> want to do some string manipulation at the very end of the document, then I
> would like to output the string. I have everything working, except for
> this. Do you have any ideas???
It is often a good idea to provide a small XML input sample and the
corresponding output sample you want.
In general if you want to loop and store stuff in variables then within
XSLT often a recursive template helps.
--
Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
| |
| Marvin Smit 2005-09-19, 7:20 am |
| Hi,
all variables within XSLT are immutable as of creation. The only way
you can 'generate' this kind of functionality is by using a recursive
algorithm.
Hope this helps,
Marvin Smit.
On Tue, 13 Sep 2005 09:45:00 -0700, "Steve"
<smsinger3@newsgroup.nospam> wrote:
>
>I am using an xslt to create a text document. This is working find, except
>for one thing. As I go through each iteration of one of the templates, I
>need to create a variable and keep adding text to it each time I enter the
>template. This variable is basically a list of certain attributes which I
>want to do some string manipulation at the very end of the document, then I
>would like to output the string. I have everything working, except for
>this. Do you have any ideas???
>
>I hope this all makes sense. Thanks in advance for your response!
| |
| Gadrin@gmail.com 2005-09-20, 4:23 am |
| Look at "call template with parameter"
It'll look something like this...
<xsl:template name="msg23" match="msg23">
<xsl:call-template name="localized-message">
<xsl:with-param name="msgcode">msg23</xsl:with-param>
</xsl:call-template>
</xsl:template>
which you can pass a parameter to another Template.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|