This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
using xsl:with-param in apply-templates problem
- From: "Niki Dinsey" <niki dot dinsey at csw dot co dot uk>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Tue, 27 Aug 2002 11:02:20 +0100
- Subject: [xsl] using xsl:with-param in apply-templates problem
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hi there everyone,
I was just wondering if you could answer me this quick question as it
has me a bit baffled.
I have a stylesheet where I'm trying to pass the filename along as a
parameter. Problem is I can't seem to pickup the parameter using
xsl:apply-templates..
Please see the code:
<xsl:template match="//file">
<xsl:variable select="@name" name="filename"/>
<xsl:apply-templates select="document($filename)" mode="file">
<xsl:with-param name="filename"><xsl:value-of
select="$filename"/></xsl:with-param>
</xsl:apply-templates>
</xsl:template>
This looks pretty standard to me, the template which picks this up is
below:
<xsl:template match="//title" mode="file">
<xsl:param name="filename"/>
<xsl:if test="not(parent::citation|parent::figgrp)">
<title>
<xsl:attribute name="filename"><xsl:value-of
select="$filename"/></xsl:attribute>
<xsl:attribute name="chapID"><xsl:value-of
select="ancestor::*[last()]/attribute::id"/></xsl:attribute>
...etc...
For some reason the parameter is not being picked up, has anybody got
any ideas why?
I've tested this with a call-template and it works fine.
Any help gratefully appreciated
Niki Dinsey
Telephone: 01865 337427
Mobile: 07974 214718
***********************************************
CSW Group Ltd
4240 Nash Court
Oxford Business Park South
Oxford
OX4 2RU
Tel: +44/0 1865 337400
Fax: +44/0 1865 337433
Web: http://www.csw.co.uk
Delivering value to our customers by
deploying innovative, web-based,
products and solutions for the
integration of processes, data and
knowledge
***********************************************
Legal Disclaimer:
http://www.csw.co.uk/disclaimer.htm
***********************************************
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list