RE: [xsl] XPath condition supplied as a parameter

Subject: RE: [xsl] XPath condition supplied as a parameter
From: Maulik Modi <MModi@xxxxxxxxxx>
Date: Wed, 23 Oct 2002 10:09:19 -0500
Look up the extension function evaluate(). I know both Saxon and Xalan
provide this. I am not sure which processor you used.


-----Original Message-----
From: Chris Gill [mailto:chris.gill@xxxxxxxxxxx]
Sent: Wednesday, October 23, 2002 10:03 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [xsl] XPath condition supplied as a parameter 

I am getting the feeling that this is not possible but I would like
someone to confirm for me

I am trying to write a generic template to create a table with the first
column spanned over all rows in HTML. The code below works apart from
the condition is ignored. From reading around, I am getting the
impression that I cannot do this.

Any help much appreciated

data_tag is the name of the XML node to be included in the table
data_condition is the string that should form the condition to subset
the data


	<xsl:template name="table_spanned">
		<xsl:param name="first_col_width"/>
		<xsl:param name="first_col_text"/>
		<xsl:param name="data_tag"/>
		<xsl:param name="data_condition"/>

			<!-- Count rows -->
			<xsl:variable name="numrow"
			<!-- Store first element value -->
			<xsl:variable name="FirstAnswer"
				<!-- First table element with correct
rowspan value -->
				<xsl:element name="td">
name="width"><xsl:value-of select="$first_col_width"/></xsl:attribute>
name="rowspan"><xsl:value-of select="$numrow"/></xsl:attribute>
					<!-- First element -->
			<!-- All elements that are not the first element
select="(child::*[name()=$data_tag][$data_condition])[@ANSWERNAME !=


 XSL-List info and archive:

 XSL-List info and archive:

Current Thread