Changeset 3765


Ignore:
Timestamp:
2003-02-25T15:14:27+13:00 (21 years ago)
Author:
mdewsnip
Message:

Changed to support new query results format, with "numDocsMatched" and query term information.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl3/interfaces/default/transform/basicquery.xsl

    r3752 r3765  
    106106  <!-- If query term information is available, display it -->
    107107  <br/>
    108   <xsl:if test="count(content/metadataList/metadata[@type='term']) > 0">
     108  <xsl:if test="count(content/termList/term) > 0">
    109109    <small>
    110110    Word count:
    111     <xsl:for-each select="content/metadataList/metadata[@type='term']">
     111    <xsl:for-each select="content/termList/term">
    112112      <xsl:if test="position() > 1">, </xsl:if>
    113       <xsl:value-of select="@name"/>: <xsl:value-of select="@value"/>
     113      <xsl:value-of select="@name"/>: <xsl:value-of select="@count"/>
    114114    </xsl:for-each>
    115115    </small><br/>
     
    117117
    118118  <!-- 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">
     119  <xsl:variable name="numDocsMatched" select="metadataList/metadata[@name='numDocsMatched']/@value"/>
     120  <xsl:if test="$numDocsMatched">
    121121    <xsl:choose>
    122       <xsl:when test="$numMatchingDocs='0'">
     122      <xsl:when test="$numDocsMatched='0'">
    123123        No documents matched the query.
    124124      </xsl:when>
    125       <xsl:when test="$numMatchingDocs='1'">
     125      <xsl:when test="$numDocsMatched='1'">
    126126        1 document matched the query.
    127127      </xsl:when>
    128128      <xsl:otherwise>
    129         <xsl:value-of select="$numMatchingDocs"/> documents matched the query.
     129        <xsl:value-of select="$numDocsMatched"/> documents matched the query.
    130130      </xsl:otherwise>
    131131    </xsl:choose>
Note: See TracChangeset for help on using the changeset viewer.