Changeset 3752 for trunk/gsdl3/interfaces/default/transform/basicquery.xsl
- Timestamp:
- 2003-02-21T11:36:50+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl3/interfaces/default/transform/basicquery.xsl
r3686 r3752 10 10 <xsl:template match="page"> 11 11 12 <xsl:variable name="collName"><xsl:value-of select="request/paramList/param[@name='c']/@value"/></xsl:variable> 12 <xsl:variable name="collName"> 13 <xsl:value-of select="request/paramList/param[@name='c']/@value"/> 14 </xsl:variable> 13 15 14 16 <html> 15 17 <xsl:call-template name="greenstoneHead"/> 16 18 <body xsl:use-attribute-sets="body-style"> 19 20 <table border="0" cellspacing="0" cellpadding="0" width="100%"> 21 <tr/><td valign="top" width="65"><img src="interfaces/default/images/spacer.gif" width="65" height="1" alt="" border="0"></img></td> 22 <td/><center><table width="537"><tr/><td/> 23 17 24 <center> 18 25 <xsl:call-template name="collectionPageBanner"> … … 22 29 <xsl:with-param name="collName" select="$collName"/> 23 30 </xsl:apply-templates> 31 </center> 24 32 <xsl:apply-templates select="response"> 25 33 <xsl:with-param name="collName" select="$collName"/> 26 34 </xsl:apply-templates> 27 < /center>35 <xsl:call-template name="greenBar"/> 28 36 <xsl:call-template name="greenstoneFooter"/> 37 38 </table></center> 39 </table> 29 40 </body> 30 41 </html> … … 45 56 <input type="submit"><xsl:attribute name="value"><xsl:value-of select='display/submit'/></xsl:attribute></input> 46 57 </form> 47 <xsl:call-template name="greenBar"/>48 58 </xsl:template> 49 59 50 60 <xsl:template match="paramList"> 51 <p/><table width="537">52 <xsl:for-each select="param">53 <xsl:choose>54 <xsl:when test="@type='multi'">55 <tr><td colspan='2'>56 <xsl:apply-templates select='.'/></td></tr>57 </xsl:when>58 <xsl:otherwise>59 <xsl:variable name="pname" select="@name"/>60 <tr><td><xsl:value-of select='ancestor::service/display/param[@name=$pname]/name'/></td><td align="right"><xsl:apply-templates select="."/></td></tr>61 </xsl:otherwise>62 </xsl:choose>63 </xsl:for-each>64 </table>61 <p/><table width="537"> 62 <xsl:for-each select="param"> 63 <xsl:choose> 64 <xsl:when test="@type='multi'"> 65 <tr><td colspan='2'> 66 <xsl:apply-templates select='.'/></td></tr> 67 </xsl:when> 68 <xsl:otherwise> 69 <xsl:variable name="pname" select="@name"/> 70 <tr><td><xsl:value-of select='ancestor::service/display/param[@name=$pname]/name'/></td><td align="right"><xsl:apply-templates select="."/></td></tr> 71 </xsl:otherwise> 72 </xsl:choose> 73 </xsl:for-each> 74 </table> 65 75 </xsl:template> 66 76 … … 88 98 --> 89 99 100 101 <!-- Process the query response --> 90 102 <xsl:template match="response"> 91 <xsl:param name="collName">coll-name</xsl:param> 92 <table width="537"> 93 <xsl:for-each select="content/documentList/document"> 94 <tr><xsl:apply-templates select="."><xsl:with-param name="collName" select="$collName"/></xsl:apply-templates></tr> 95 </xsl:for-each> 96 </table> 97 <xsl:call-template name="greenBar"/> 103 <xsl:param name="collName">coll-name</xsl:param> 104 <xsl:call-template name="greenBarResults"/> 105 106 <!-- If query term information is available, display it --> 107 <br/> 108 <xsl:if test="count(content/metadataList/metadata[@type='term']) > 0"> 109 <small> 110 Word count: 111 <xsl:for-each select="content/metadataList/metadata[@type='term']"> 112 <xsl:if test="position() > 1">, </xsl:if> 113 <xsl:value-of select="@name"/>: <xsl:value-of select="@value"/> 114 </xsl:for-each> 115 </small><br/> 116 </xsl:if> 117 118 <!-- If the number of matching documents is known, display it --> 119 <xsl:variable name="numMatchingDocs" select="content/metadataList/metadata[@name='numMatchingDocs']"/> 120 <xsl:if test="$numMatchingDocs"> 121 <xsl:choose> 122 <xsl:when test="$numMatchingDocs='0'"> 123 No documents matched the query. 124 </xsl:when> 125 <xsl:when test="$numMatchingDocs='1'"> 126 1 document matched the query. 127 </xsl:when> 128 <xsl:otherwise> 129 <xsl:value-of select="$numMatchingDocs"/> documents matched the query. 130 </xsl:otherwise> 131 </xsl:choose> 132 </xsl:if> 133 134 <!-- Display the matching documents --> 135 <table> 136 <tr valign="top"> 137 <xsl:for-each select="content/documentList/document"> 138 <tr> 139 <xsl:apply-templates select="."> 140 <xsl:with-param name="collName" select="$collName"/> 141 </xsl:apply-templates> 142 </tr> 143 </xsl:for-each> 144 </tr> 145 </table> 98 146 </xsl:template> 99 147 148 100 149 <xsl:template match="document"> 101 <xsl:param name="collName">coll-name</xsl:param> 102 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 103 <td><a href="{$library}?a=d&c={$collName}&d={@name}">link</a></td><td><xsl:value-of select="metadataList/metadata[@name='Title']"/></td> 150 <xsl:param name="collName">coll-name</xsl:param> 151 <xsl:variable name="library" select="ancestor::page/config/library_name"/> 152 153 <td><a href="{$library}?a=d&c={$collName}&d={@name}">link</a></td> 154 <td><xsl:value-of select="metadataList/metadata[@name='Title']"/></td> 155 </xsl:template> 156 157 158 <xsl:template name="greenBarResults"> 159 <p/> 160 <center> 161 <img src="interfaces/default/images/qryresb.gif" width="537" height="17"/> 162 </center> 104 163 </xsl:template> 105 164 106 165 </xsl:stylesheet> 107 108 109 110 111
Note:
See TracChangeset
for help on using the changeset viewer.