<style type="text/css"> BODY, TD {font-family:Tahoma,sans-serif; font-size: 12px; color:#606060; padding-left:10; padding-right:10 } .hiliter {background:FFFF00;} .current {background:CCCCFF;} </style> <script language="JavaScript"> function popUp(URL) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=1,menubar=0,resizable=1,width=400,height=500');"); } </script> </head> <body> <xsl:call-template name="searchform" /> <xsl:call-template name="suggest" /> <xsl:call-template name="status" /> <xsl:call-template name="sort" /> <xsl:call-template name="links" /> <xsl:call-template name="results" /> <xsl:call-template name="links" /> <xsl:call-template name="status" /> </body> </html> </xsl:template> <xsl:template name="links"> <table cellSpacing="0" align="center" width="80%" border="0" cellPadding="0"> <tr> <td align="center"> <xsl:for-each select="//link"> <xsl:choose> <xsl:when test="@page='next'"> <a href="{@url}"> <img src="../images/nextblue.jpg" border="0" /> </a> </xsl:when> <xsl:when test="@page='prev'"> <a href="{@url}"> <img src="../images/prevblue.jpg" border="0" /> </a> </xsl:when> <xsl:when test="@page='date'" /> <xsl:when test="@page='relevance'" /> <xsl:when test="@page='alpha'" /> <xsl:otherwise> <xsl:variable name="cpage" select="//results/@currentpage" /> <a href="{@url}"> <xsl:if test="@page=$cpage"> <span class="current"> <b> <xsl:value-of select="@page" /> </b> </span> </xsl:if> <xsl:if test="not(@page=$cpage)"> <xsl:value-of select="@page" /> </xsl:if> </a> </xsl:otherwise> </xsl:choose> <xsl:text> <![CDATA[ ]]> </xsl:text> </xsl:for-each> </td> </tr> <tr> <td> <br /> </td> </tr> </table> </xsl:template> <xsl:template name="searchform"> <xsl:if test="//searchform"> <xsl:variable name="targeturl" select="//searchform/@url" /> <form method="get"> <table cellSpacing="0" align="center" width="80%" border="0" cellPadding="0"> <tr> <td align="center" colSpan="2"> <img src="../images/logo.jpg" border="0" height="90" /> </td> </tr> <tr> <td bgColor="#999999" colSpan="2"> <img width="1" src="../images/spacer.gif" border="0" height="1" /> </td> </tr> <tr> <td bgColor="#dedede" align="center" width="80%"> <br /> <xsl:for-each select="//collection"> <xsl:if test="@checked='true'"> <input name="col" value="{@id}" type="checkbox" checked="true" /> </xsl:if> <xsl:if test="@checked='false'"> <input name="col" value="{@id}" type="checkbox" /> </xsl:if> <font size="2" face="Verdana"> <xsl:value-of select="@name" /> </font> </xsl:for-each> <br /> <br /> <xsl:variable name="query" select="//searchform/@query" /> <input name="query" style="WIDTH: 355px; HEIGHT: 22px" value="" length="100" /> <br /> <br /> <input name="search" src="../images/search.gif" alt="[Search]" value="Search" type="image" /> <br /> <br /> </td> <td bgColor="#dedede" align="center" width="20%" vAlign="middle"> <a href="../adv_search.jsp"> <font size="1" face="Verdana"> Advanced Search </font> </a> <br /> <a href="javascript:popUp('../tips.html')"> <font size="1" face="Verdana"> Tips on Searching </font> </a> </td> </tr> <tr> <td bgColor="#999999" colSpan="2"> <img width="1" src="../images/spacer.gif" border="0" height="1" /> </td> </tr> </table> </form> </xsl:if> </xsl:template> <xsl:template name="status"> <xsl:if test="//results/@hits>0"> <table cellSpacing="0" align="center" height="5" width="80%" border="0" cellPadding="0"> <tr bgColor="#dedede"> <td align="left"> Documents for <b> <xsl:value-of select="//results/@query" /> </b> sorted by Date </td> <td align="right"> Documents <xsl:value-of select="//results/@start" /> to <xsl:value-of select="//results/@end" /> of <b> <xsl:value-of select="//results/@hits" /> </b>   </td> </tr> </table> </xsl:if> </xsl:template> <xsl:template name="suggest"> <xsl:variable name="suggest" select="//results/@suggest" /> <xsl:if test="string-length($suggest) > 0"> <xsl:variable name="searchurl" select="//searchform/@url" /> <xsl:variable name="targeturl" select="concat($searchurl, '?query=')" /> <xsl:variable name="suggesturl" select="concat($targeturl, $suggest)" /> <table cellSpacing="0" align="center" width="80%" border="0" cellPadding="0"> <tr> <td align="left"> <b> <i> Did you mean <a href='{$suggesturl}'> <xsl:value-of select="$suggest" /> </a> ? </i> </b> </td> </tr> <tr> <td> <br /> </td> </tr> </table> </xsl:if> </xsl:template> <xsl:template name="results"> <table cellSpacing="0" align="center" width="80%" border="0" cellPadding="0"> <xsl:if test="//results/@hits=0"> <tr> <td> <br /> Your search for <b> <xsl:value-of select="//results/@query" /> </b> did not match any documents. <br /> <br /> Suggestions: <br /> - Make sure all words are spelled correctly. <br /> - Use similar words or synonyms. <br /> - Try more general keywords. <br /> <br /> </td> </tr> </xsl:if> <xsl:for-each select="//result"> <tr> <td> <xsl:if test="not(starts-with(url, 'http://'))"> <xsl:variable name="fileurl" select="concat('FileServlet?url=', url)" /> <xsl:variable name="fileurlcol" select="concat($fileurl, '&col=')" /> <xsl:variable name="fileurlcolid" select="concat($fileurlcol, col)" /> <a href="{$fileurlcolid}"> <xsl:apply-templates select="title" /> </a> </xsl:if> <xsl:if test="starts-with(url, 'http://')"> <a href="{url}"> <xsl:apply-templates select="title" /> </a> </xsl:if> <br /> <xsl:apply-templates select="description" /> <br /> <br /> </td> <td width="15%" valign="top"> <br /> <xsl:value-of select="lastmodified" /> </td> </tr> </xsl:for-each> </table> </xsl:template> <xsl:template name="sort"> <table cellSpacing="0" align="center" width="80%" border="0" cellPadding="0"> <tr bgColor="#dedede"> <td align="right" /> <td align="right"> <xsl:if test="//results/@sort='date'"> <xsl:for-each select="//link"> <xsl:choose> <xsl:when test="@page='alpha'"> <xsl:text>|</xsl:text> <a href="{@url}"> Sort Alphabetically </a> <xsl:text>|</xsl:text> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:text /> </xsl:for-each> </xsl:if> <xsl:if test="//results/@sort='alpha'"> <xsl:for-each select="//link"> <xsl:choose> <xsl:when test="@page='date'"> <xsl:text>|</xsl:text> <a href="{@url}">Sort by Date</a> <xsl:text>|</xsl:text> </xsl:when> <xsl:otherwise /> </xsl:choose> <xsl:text /> </xsl:for-each> </xsl:if> </td> </tr> <tr> <td> <br /> </td> </tr> </table> </xsl:template> <xsl:template match="title"> <xsl:apply-templates /> </xsl:template> <xsl:template match="description"> <xsl:apply-templates /> </xsl:template> <xsl:template match="category"> <xsl:apply-templates /> </xsl:template> <xsl:template match="highlight"> <span class="hiliter"> <b> <xsl:value-of select="." /> </b> </span> </xsl:template> </xsl:stylesheet>