Subject: Re: [xsl] passing variable through to document() call. From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Wed, 13 Aug 2003 16:33:24 -0400 |
I have a parent document with code like: <doc> <render2web/> <!-- this sets the variable --> <lookup about="consumer"/> </doc>
And in the xsl:
<xsl:apply-templates select="document('/home/eric/lookup.xml')/doc/topic[@about=$about]"/>
Problem is that when applying the templates in this call above, the variable set
in the xml above is not seen.
How do I implement this
<xsl:template match="lookup"> <xsl:variable name="about" select="@about"/> <xsl:apply-templates select="document('/home/eric/lookup.xml')/doc/topic[@about=$about]"> <xsl:with-param name="webSignal" select="../render2web"/> </xsl:apply-templates/> </xsl:template>
<xsl:template match="topic"> <xsl:param name="webSignal"/> <xsl:if test="$webSignal"> <!--do something here-->
-- Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide; please contact us for the details; Next public European delivery: 3-day XSLT/2-day XSL-FO 2003-09-22
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 (F:-0995) ISBN 0-13-065196-6 Definitive XSLT and XPath ISBN 0-13-140374-5 Definitive XSL-FO ISBN 1-894049-08-X Practical Transformation Using XSLT and XPath ISBN 1-894049-11-X Practical Formatting Using XSL-FO Member of the XML Guild of Practitioners: http://XMLGuild.info Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] passing variable through to d, Eric Smith | Thread | Re: [xsl] passing variable through , Eric Smith |
[xsl] xsl-resource, xsl_chatr | Date | RE: [xsl] passing variable through , cknell |
Month |