[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: passing variable through to document() call.

Subject: Re: passing variable through to document() call.
From: Eric Smith <es@xxxxxxxxxxxx>
Date: Thu, 14 Aug 2003 11:47:34 +0200
eric smith
Thanks Ken!

G. Ken Holman said:
> 
>   <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>
> 

Nice way to set the var - I will steal that for future use - thanks.
Also split up the apple-template - YES - I should have though of that
so now I have this:
<xsl:apply-templates select="document('/home/eric/lookup.xml')/doc/topic[@about=$about]">
<xsl:with-param name="render2web" select="yes"/>
</xsl:apply-templates>


>   <xsl:template match="topic">
>     <xsl:param name="webSignal"/>
>     <xsl:if test="$webSignal">
>       <!--do something here-->

Oh, declare your parameter again at this level - I would not have
thought of that.

So in the rendering template:
<xsl:template match="ivory">
  <xsl:param name="render2web"/>
 <xsl:if test="$render2web">
   <xsl:attribute name="font-size">44pt</xsl:attribute>
......

Only if I explicitly use select to give the $render2web a value
in the xsl:param, does the xsl:if trigger.
So the with-param don't seem to be passing the value through.

What could I be missing?

-- 
Eric Smith

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.