This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl problem
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] xsl problem
- From: "Gitanjali" <narsu at gitanjali dot com>
- Date: Sun, 18 Mar 2001 11:12:43 -0500
- References: <CPEMJEHKCEGNBHDPMJDJIECNDCAA.brent@kobayashi.ca>
- Reply-To: xsl-list at lists dot mulberrytech dot com
The following xsl file I created, but the problem I'm facing here is that,
in the function
showPageNumbers(node). Actually I want to dislay the hyper links (page
numbers 1 , 2, 3)
when I'm trying to use this, it displays < and >
Could you please tell me what's the problem
Thanks
Narsu
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<body>
<xsl:variable name="PageNumbers" select="sony"/>
<table width="600" cellpadding="0" cellspacing="0" border="0"
align="center">
<tr bgcolor="Navy">
<td height = "17" colspan="3" align="right" valign="middle" width="100%">
<font color="White"><xsl:eval>showPageNumbers();</xsl:eval></font>
</td>
</tr>
</table>
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr bgcolor="#CCCCFF">
<td id="ColumnHeading" valign="bottom" wrap = "nowrap" >Sq</td>
<td id="ColumnHeading" valign="bottom" align="center">DoctorID</td>
<td id="ColumnHeading" valign="bottom"
align="right">Files<br></br>Dictated</td>
<td id="ColumnHeading" valign="bottom"
align="right">Files<br></br>Pending</td>
<td id="ColumnHeading" valign="bottom" align="right">Est. Lns.</td>
<td id="ColumnHeading" valign="bottom" align="right">Act. Lns.</td>
<td id="ColumnHeading" valign="bottom" align="center">Trans. Company</td>
</tr>
<xsl:for-each select="SummaryReport/Record" order-by="+ DoctorID">
<tr>
<td valign="top" ><xsl:value-of select="RecordNo"/></td>
<td valign="top" align="center"><xsl:value-of select="DoctorID"/></td>
<td valign="top" align="right"><xsl:value-of select="FilesDictated"/></td>
<td valign="top" align="right"><xsl:value-of select="FilesPending"/></td>
<td valign="top" align="right"><xsl:value-of select="EstimatedLines"/></td>
<td valign="top" align="right"><xsl:value-of select="ActualLines"/></td>
<td valign="top" align="center"><xsl:value-of select="TransCompany"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
<xsl:script><![CDATA[
function countRecords(node)
{
Records = node.selectNodes("/SummaryReport/Record");
return(Records.length);
}
function showPageNumbers(node)
{
Records = node.selectNodes("/SummaryReport/Record");
NoOfRecords = Records.length;
RECORDS_PER_PAGE = 20;
NoOfPages = NoOfRecords/RECORDS_PER_PAGE;
PageNumbers = "";
for(i=1;i<=NoOfPages;i++)
PageNumbers = PageNumbers + "<a href=" + i + ">" + i + "</a>";
return PageNumbers;
}
]]></xsl:script>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list