[xsl] Can you pass a parameter from a stylesheet to the resulting HTML file?

Subject: [xsl] Can you pass a parameter from a stylesheet to the resulting HTML file?
From: Grant-Kathryn@xxxxxxxxxxxxxxxxx
Date: Thu, 30 May 2002 17:56:19 -0700
Hi all,

I sure appreciate everyone's help!  The manual I'm working on is going well
because of it.

I have a more complicated question.  Part of my XHTML file contains a table,
simplified below:

		<li>item 1</li>
		<li>item 2</li>
		<li>item 3</li>

	   <ol start="4">
		<li>item 4</li>
		<li>item 5</li>
		<li>item 6</li>

As you can see, I have a continuous list split across two cells.  Even if I
don't close the </ol> in the first cell, the numbering starts again at 1 in
the next cell unless I use <ol start="4">.

My question is this.  I have two different stylesheets transforming the same
XHTML file.  One stylesheet filters the XHTML file so the number of list
items is less; therefore, the <ol> start attribute needs to be different in
each transformed file.

I understand that I can declare a parameter in my XSL file thus:  
<xsl:param name="startnum" select="3"/>

But is there a way to pass that parameter to the <ol> tag's start attribute
in the transformed file?  I've checked my XSL books and searched on the web,
but I can't find a way to do this.

Below is the XSL file I'm using--it's pretty simple.

----------------------xsl file---------------------------
<?xml version="1.0" encoding="UTF-8"?>

<xsl:output method="xml" encoding="UTF-8"/>
	<xsl:template match="node() | @*">
			<xsl:apply-templates select="node() | @*"/>
--------------------end xsl file---------------------------


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread