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

using xsl:with-param in apply-templates problem

Subject: using xsl:with-param in apply-templates problem
From: "Niki Dinsey" <niki.dinsey@xxxxxxxxx>
Date: Tue, 27 Aug 2002 11:02:20 +0100
apply templates problem
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


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.