|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Xsl:param from PHP to html
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
|

Cart








