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

Xsl:param from PHP to html

Subject: Xsl:param from PHP to html
From: "Alan Hale" <alan.hale@xxxxxxxxxxx>
Date: Fri, 13 Apr 2007 16:03:18 +0100
 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

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.