I am passing a parameter from an asp file to my xsl file. I know the parameter is being passed. Below is my stylesheet. For some reason it is not getting past the line <xsl:if test="book_id='$param1'"> If I take out this line it works fine and outputs all the records. I am passing the parameter to output only the records that match. I know the parameter is being passed in. Any thoughts would be appreciated.
Tom
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
utput method="html"/>
<xsl
aram name="param1"/>
<xsl:template match="/">
<html>
<body>
<br/><xsl:value-of select="$param1"/>
<xsl:for-each select="/datatable/jmmain_nmmain_jfacilty_archrg">
<xsl:if test="book_id='$param1'">
<table cellpadding="1" width="85%">
<xsl:if test="book_id=book_id[not(.=preceding::book_id)]">
<tr>
<th width="15%" align="right">Inmate:</th>
<td colspan="4"><xsl:value-of select="concat(last,suffix,',',first,middle)"/></td>
</tr>
<tr>
<th align="right">Age:</th><td colspan="4"><xsl:value-of select="age"/></td>
</tr>
<tr>
<th align="right">Race/Sex:</th><td colspan="4"><xsl:value-of select="concat(race,'/',sex)"/></td>
</tr>
<tr>
<th align="right">Booking Date:</th><td colspan="4"><xsl:value-of select="bookdate"/></td>
</tr>
<tr>
<th align="right">Booking Number:</th><td colspan="4"><xsl:value-of select="book_id"/></td>
</tr>
<tr>
<th width="15%">Cause Number</th>
<th width="10%">Fel/Misd</th>
<th>Charge</th>
<th width="10%">Bond Amount</th>
<th width="10%">Bond Type</th>
</tr>
</xsl:if>
<xsl:call-template name="booknumber"/>
</table>
</xsl:if>
</xsl:for-each>
<xsl:value-of select="book_id"/>
</body>
</html>
</xsl:template>
<xsl:template name="booknumber">
<tr>
<td width="15%"><xsl:value-of select="docketno"/> </td>
<td width="10%"><xsl:value-of select="fel_misd"/> </td>
<td><xsl:value-of select="chrgdesc"/> </td>
<td width="10%"><xsl:value-of select="bondamt"/> </td>
<td width="10%"><xsl:value-of select="bondtype"/> </td>
</tr>
</xsl:template>
</xsl:stylesheet>
Tom
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="<xsl
<xsl
<xsl:template match="/">
<html>
<body>
<br/><xsl:value-of select="$param1"/>
<xsl:for-each select="/datatable/jmmain_nmmain_jfacilty_archrg">
<xsl:if test="book_id='$param1'">
<table cellpadding="1" width="85%">
<xsl:if test="book_id=book_id[not(.=preceding::book_id)]">
<tr>
<th width="15%" align="right">Inmate:</th>
<td colspan="4"><xsl:value-of select="concat(last,suffix,',',first,middle)"/></td>
</tr>
<tr>
<th align="right">Age:</th><td colspan="4"><xsl:value-of select="age"/></td>
</tr>
<tr>
<th align="right">Race/Sex:</th><td colspan="4"><xsl:value-of select="concat(race,'/',sex)"/></td>
</tr>
<tr>
<th align="right">Booking Date:</th><td colspan="4"><xsl:value-of select="bookdate"/></td>
</tr>
<tr>
<th align="right">Booking Number:</th><td colspan="4"><xsl:value-of select="book_id"/></td>
</tr>
<tr>
<th width="15%">Cause Number</th>
<th width="10%">Fel/Misd</th>
<th>Charge</th>
<th width="10%">Bond Amount</th>
<th width="10%">Bond Type</th>
</tr>
</xsl:if>
<xsl:call-template name="booknumber"/>
</table>
</xsl:if>
</xsl:for-each>
<xsl:value-of select="book_id"/>
</body>
</html>
</xsl:template>
<xsl:template name="booknumber">
<tr>
<td width="15%"><xsl:value-of select="docketno"/> </td>
<td width="10%"><xsl:value-of select="fel_misd"/> </td>
<td><xsl:value-of select="chrgdesc"/> </td>
<td width="10%"><xsl:value-of select="bondamt"/> </td>
<td width="10%"><xsl:value-of select="bondtype"/> </td>
</tr>
</xsl:template>
</xsl:stylesheet>