[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
Re: Xsl:param from PHP to html
Subject: Re: Xsl:param from PHP to html
From: Steve <subsume@xxxxxxxxx>
Date: Fri, 13 Apr 2007 11:10:26 -0400
|
Seems like a PHP issue to me...
Have you had success passing other variables from script -> stylesheet?
-S
On 4/13/07, Alan Hale <alan.hale@xxxxxxxxxxx> wrote:
I know I am doing something fundamentally wrong here, but I cannot
understand what.
I am trying to pass a parameter to a stylesheet from PHP, and use it to
determine the sort order. I am sure the parameter is being assigned
correctly in the PHP code, but when I run the xsl below, I always get
the default value of $SORTBY.
Many thanks
Alan
<html
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xsl:version='1.0'>
<!--Define parameter name and set default value-->
<xsl:param name = "SORTBY">species_name</xsl:param>
<body>
<xsl:for-each select="/fieldguide/account">
<xsl:sort select = "$SORTBY" order = "ascending"/>
<td align = "center"><xsl:value-of select="species_name"/></td>
<td width = "40" align = "center"><xsl:value-of
select="has_text"/></td>
<td width = "40" align = "center"><xsl:value-of
select="has_photo"/></td>
<td width = "40" align = "center"><xsl:value-of
select="has_drawing"/></td>
<td width = "40" align = "center"><xsl:value-of
select="has_map"/></td>
<td align = "right"><xsl:value-of select="format_date"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 269.4.0/759 - Release Date:
12/04/2007 19:58
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|