Hi
I have successfully passed in the variable sortorder from my PHP program to an XSL stylesheet.
However I cannot display it within the following:
I've tried using:
{sortorder}
{@sortorder}
and had a go with:
but no luck.
I'm sure this must be straightforward. I would like the HREF to be ouput as HTML thus:
I have successfully passed in the variable sortorder from my PHP program to an XSL stylesheet.
However I cannot display it within the following:
Code:
<xsl:stylesheet version = '1.0'
xmlns:xsl='[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform'>[/URL]
<xsl:output method="html" indent="yes"/>
<xsl:param name="sortorder" />
<xsl:template match="events">
<table border="0">
<a href="showevents.html?sortorder={sortorder}">
<xsl:apply-templates>
<xsl:sort order="$sortorder" select="concat(substring(startdate, 7,2),substring(startdate, 4,2),substring(startdate, 1,2))" data-type="numeric" />
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="event">
<tr>
<td><a href="showevents.php?eventID={@eventID}"><em class="sm"><xsl:value-of select="name" /></em></a></td><td><em class="gr"><xsl:value-of select="startdate" /></em></td>
</tr>
</xsl:template>
</xsl:stylesheet>
I've tried using:
{sortorder}
{@sortorder}
and had a go with:
Code:
<xsl:template match="sorting">
<A HREF="showevents.php?sortorder={sortorder}">
<em class="sm">[recent 1st]</em>
</A></xsl:template>
but no luck.
I'm sure this must be straightforward. I would like the HREF to be ouput as HTML thus:
Code:
<a href="showevents.php?sortorder=1">