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

Can you pass a parameter from a stylesheet to the resu

Subject: 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
 Can you pass a parameter from a stylesheet to the resu
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:

<table>
  <tr>
	<td>
	   <ol>
		<li>item 1</li>
		<li>item 2</li>
		<li>item 3</li>
	   </ol>
	</td>
  </tr>

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

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:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xhtml="http://www.w3.org/1999/xhtml"
    version="1.0">

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

TIA,
Kathryn

 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.