Subject: Re: recursive passing parameter From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 07 Sep 1999 13:05:35 -0400 |
I want the following stylesheet to produce an output like this:...
The variable value before passing is:: init value ... The variable value after passing is :: A1 The variable value before passing is:: A1 The variable value after passing is :: B1 The variable value before passing is:: B1
...<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"> <xsl:variable name="var" select="'init value ...'" /> <!-- process the children recursively --> <xsl:template match="*"> The variable value before passing is:: <xsl:value-of select="$var"/> <xsl:param name="var" select="name(.)"/> The variable value after passing is :: <xsl:value-of select="$var"/> <xsl:apply-templates/> </xsl:template>
But the actually output is that every before passing value is 'init value ...". What's wrong with my stylesheet?
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Website: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-01-2 Next instructor-led training: 1999-09-24, 1999-11-08, 1999-12-05/06, 1999-12-07, 2000-02-27/28, 2000-05-11/12
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
recursive passing parameter, Honglin Su | Thread | Examples of XSLT/XPath, Stefano POGLIANI |
RE: Crazy idea, Maxime Levesque | Date | Re: Crazy idea, Oren Ben-Kiki |
Month |