<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> <script src="../sorttable.js" /> <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" cellPadding="0" width="80%" align="center" border="0"> <tbody> <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> </tbody> </table> </xsl:template> <xsl:template name="searchform"> <xsl:if test="//searchform"> <xsl:variable name="targeturl" select="//searchform/@url" /> <form method="get"> <table cellSpacing="0" cellPadding="0" width="80%" align="center" border="0"> <tbody> <tr> <td colSpan="2" align="center"> <img height="90" src="../images/logo.jpg" border="0" /> </td> </tr> <tr> <td colSpan="2" bgColor="#999999"> <img height="1" src="../images/spacer.gif" width="1" border="0" /> </td> </tr> <tr> <td align="center" width="80%" bgColor="#dedede"> <br /> <xsl:for-each select="//collection"> <xsl:if test="@checked='true'"> <input type="checkbox" CHECKED="1" value="{@id}" name="col" /> </xsl:if> <xsl:if test="@checked='false'"> <input name="col" value="{@id}" type="checkbox" /> </xsl:if> <font face="Verdana" size="2"> <xsl:value-of select="@name" /> </font> </xsl:for-each> <br /> <br /> <xsl:variable name="query" select="//searchform/@query" /> <xsl:variable name="stylesheet" select="//results/@xsl" /> <input name="xsl" value="{$stylesheet}" type="hidden" /> <input value="{$query}" name="query" length="100" style="width: 355px; height: 22px" /> <br /> <br /> <input type="image" alt="[Search]" src="../images/search.gif" value="Search" name="search" /> <br /> <br /> </td> <td vAlign="middle" align="center" width="20%" bgColor="#dedede"> <a href="../adv_search.jsp"> <font face="Verdana" size="1"> Advanced Search </font> </a> <br /> <a href="javascript:popUp('../tips.html')"> <font face="Verdana" size="1"> Tips on Searching </font> </a> </td> </tr> <tr> <td colSpan="2" bgColor="#999999"> <img height="1" src="../images/spacer.gif" width="1" border="0" /> </td> </tr> </tbody> </table> </form> </xsl:if> </xsl:template> <xsl:template name="status"> <xsl:if test="//results/@hits>0"> <table cellSpacing="0" cellPadding="0" width="80%" align="center" border="0"> <tbody> <tr bgColor="#dedede"> <td align="left"> Search Results for <b> <xsl:value-of select="//results/@query" /> </b> </td> <td align="right"> Results <xsl:value-of select="//results/@start" /> to <xsl:value-of select="//results/@end" /> of <b> <xsl:value-of select="//results/@hits" /> </b>   </td> </tr> </tbody> </table> </xsl:if> </xsl:template> <xsl:template name="results"> <xsl:choose> <xsl:when test="//results/@hits=0"> <table cellSpacing="0" cellPadding="0" width="80%" align="center" border="0"> <tbody> <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> </tbody> </table> </xsl:when> <xsl:otherwise> <div style="position:relative; left:300;"> Click on Date, Type, Title or Score to Sort the results from this page only. </div> <table cellSpacing="0" cellPadding="0" width="80%" align="center" border="0" class="sortable" id="unique_id"> <tbody> <tr height="40"> <td align="center" width="15%"> <b>Date</b> </td> <td align="center"> <b>Type</b> </td> <td align="center"> <b>Title</b> </td> <td align="center"> <b>Score</b> </td> </tr> <xsl:for-each select="//result"> <tr vAlign="top"> <td align="center"> <xsl:value-of select="substring(lastmodified, 3, 5)" /> <xsl:value-of select="substring(lastmodified, 0, 3)" /> <xsl:text>,</xsl:text> <xsl:value-of select="substring(lastmodified, 7, 6)" /> </td> <td align="center"> <img src="../images/{contenttype}.gif" border="0" /> </td> <td align="left"> <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:choose> <xsl:when test="context"> ... <xsl:apply-templates select="context" /> ... </xsl:when> <xsl:otherwise> <xsl:apply-templates select="description" /> </xsl:otherwise> </xsl:choose> <br /> <br /> </td> <td align="center"> <xsl:value-of select="score" /> % </td> </tr> </xsl:for-each> </tbody> </table> </xsl:otherwise> </xsl:choose> </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="sort"> <table cellSpacing="0" align="center" width="80%" border="0" cellPadding="0"> <tr bgColor="#dedede"> <td align="center"> <xsl:if test="//results/@sort='relevance'"> <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: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='date'"> <xsl:for-each select="//link"> <xsl:choose> <xsl:when test="@page='relevance'"> <xsl:text>|</xsl:text> <a href="{@url}"> Sort by Relevance </a> <xsl:text>|</xsl:text> </xsl:when> <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='relevance'"> <xsl:text>|</xsl:text> <a href="{@url}"> Sort by Relevance </a> <xsl:text>|</xsl:text> </xsl:when> <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="contenttype"> <xsl:apply-templates /> </xsl:template> <xsl:template match="highlight"> <span class="hiliter"> <b> <xsl:value-of select="." /> </b> </span> </xsl:template> </xsl:stylesheet>