xsl-list
[Top] [All Lists]

[xsl] Xsl:param from PHP to html

2007-04-13 08:07:17
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
 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>