This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Use of Parameters ...Help! :)
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: Use of Parameters ...Help! :)
- From: Bill Shaw - EBCX <BillShaw at mail dot maricopa dot gov>
- Date: Wed, 16 Aug 2000 13:26:34 -0700
- Reply-To: xsl-list at mulberrytech dot com
I'm still very new to this so excuse my ignorance. I got some excellent
help in my last question on passing cookies into the stylesheet. Using an
example I was directed to from Michael Kay in an article he wrote at MSDN, I
can now get my cookie passed but into the PARAM but my stylesheet breaks
when I try to use the pram in various places within the stylesheet. I
figure it must be syntax on how I'm using it, or you cannot use it where I
want to. I need to use it in the SORT statement, template match and
apply-templates (see below). My cookie is outputting correctly, I can call
<xsl:value-of "$myCookie"/> and I get my cookie I set.
Again, all help is greatly appreciated! Thanks, Bill
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:param name="myParm" select="'myCookie'"/>
<xsl:template match="/">
<xsl:for-each select="//agency//">
<xsl:sort order="ascending" select="$myParm"/>
<xsl:apply-templates select="$myParm"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="$myParm">
<b> <xsl:value-of select="."/> </b> <br/>
</xsl:template>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list