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

XT, call-template, parameters, default values

Subject: XT, call-template, parameters, default values
From: "Jon Smirl" <jonsmirl@xxxxxxxxxxxx>
Date: Wed, 8 Dec 1999 18:08:37 -0500
call template parameters
The output from the following example is $$22$ not $22$22$ like I expected.
At the intermediate stage VALUE is not specified but I need to select it in
order to pass it on to the next stage. It appears that selecting it binds it
so that I don't pick up the default in the final stage.

I can move my defaults up to the second level but this will make me copy
them a hundred times. Is there a better way?

<kTaxItem type="vendTaxEnum">22</kTaxItem>

<xsl:apply-templates select="kTaxItem"/>

<xsl:template match="*[@type='vendTaxEnum']">
   <xsl:param name="value"/>
   <xsl:call-template name="buildEnum">
      <xsl:with-param name="value" select="$value"/>
      <xsl:with-param name="enums"
select="document('../common/enum.xml')/enums/taxEnum"/>
   </xsl:call-template>
</xsl:template>

<xsl:template name="buildEnum">
   <xsl:param name="value" select="."/>
   <xsl:param name="enum"/>
    value is $<xsl:value-of select="$value"/>$<xsl:value-of select="."/>$
</xsl:template>

These templates have been simplified for the example. I'm using XT for my
XSL processor.

Jon Smirl
jonsmirl@xxxxxxxxxxxx



 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.