Ignore:
Timestamp:
2012-05-31T11:57:46+12:00 (12 years ago)
Author:
sjm84
Message:

Fixing missing annotations from searching

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r25711 r25720  
    9090                <xsl:choose>
    9191                    <xsl:when test="not(/page/pageRequest/paramList/param[@name = 'dmd']) or /page/pageRequest/paramList/param[@name = 'dmd']/@value = 'false'">
    92                         <xsl:call-template name="sectionTitleFormat"/><!--<xsl:apply-templates select="." mode="sectionTitleFormat"/>-->
     92                        <xsl:call-template name="sectionTitleFormat"/>
    9393                    </xsl:when>
    9494                    <xsl:otherwise>
    95                         <xsl:call-template name="sectionTitle"/><!--<xsl:apply-templates select="." mode="sectionTitle"/>-->
     95                        <xsl:call-template name="sectionTitle"/>
    9696                    </xsl:otherwise>
    9797                </xsl:choose>
     
    177177                </xsl:attribute>
    178178                <!-- Get the section content from the document template -->
    179                 <xsl:call-template name="documentNodeContent"/><!--xxx<xsl:apply-templates select="." mode="document"/>-->
     179                <xsl:call-template name="documentNodeContent"/>
    180180            </div>
    181181            <xsl:if test="documentNode">
     
    242242            </xsl:when>
    243243            <xsl:when test="$bookswitch = 'flashxml'">
    244                 <xsl:call-template name="documentNodeFlashXML"/><!--xxx<xsl:apply-templates mode="flashxml"/>-->
     244                <xsl:call-template name="documentNodeFlashXML"/>
    245245            </xsl:when>
    246246            <xsl:when test="$bookswitch = 'on'">
     
    338338            </td>
    339339        </tr></table>
    340         <gslib:langfrag name="dse"/><!--<xsl:call-template name="document-editor-language-fragments"/>-->
     340        <gslib:langfrag name="dse"/>
    341341    </xsl:template>
    342342   
    343343    <!-- Highlight annotations if requested -->
    344     <xsl:template match="annotation">
     344    <xsl:template name="displayAnnotation">
    345345        <xsl:choose>
    346             <xsl:when test="/page/pageRequest/paramList/param[@name='hl' and @value='on']">
     346            <xsl:when test="/page/pageRequest/paramList/param[@name = 'hl']/@value = 'on'">
    347347                <span class="termHighlight"><xsl:value-of select="."/></span>
    348348            </xsl:when>
     
    353353    </xsl:template>
    354354   
    355     <xsl:template name="sectionTitleFormat"><!--xxx<xsl:template match="documentNode" mode="sectionTitleFormat">-->
     355    <xsl:template name="sectionTitleFormat">
    356356        <p>
    357357            <xsl:attribute name="class"><xsl:value-of select="util:hashToDepthClass(@nodeID)"/> sectionHeader</xsl:attribute>
     
    364364            </xsl:if>
    365365            <!-- Display the title for the section regardless of whether automatic section numbering is turned on -->
    366             <span><xsl:call-template name="sectionTitle"/><!--xxx<xsl:apply-templates select="." mode="sectionTitle"/>--></span>
     366            <span><xsl:call-template name="sectionTitle"/></span>
    367367        </p>
    368368    </xsl:template>
     
    370370       
    371371    <!-- The default template for displaying section titles -->
    372     <xsl:template name="sectionTitle"><!--xxx<xsl:template match="documentNode" mode="sectionTitle">-->
     372    <xsl:template name="sectionTitle">
    373373        <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Title']"/>
    374374    </xsl:template>
     
    439439   
    440440    <!-- The default template for displaying the document content -->
    441     <xsl:template name="documentNodeContent"><!--xxx<xsl:template match="documentNode" mode="document">-->
     441    <xsl:template name="documentNodeContent">
    442442        <!-- Hides the "This document has no text." message -->
    443443        <xsl:variable name="noText"><gsf:metadata name="NoText"/></xsl:variable>
     
    452452                        </xsl:if>
    453453                    </xsl:when>
     454                    <xsl:when test="name() = 'annotation'">
     455                        <xsl:call-template name="displayAnnotation"/>
     456                    </xsl:when>
     457                    <xsl:when test="name() = 'nodeContent'">
     458                        <xsl:call-template name="documentNodeContent"/>
     459                    </xsl:when>
    454460                    <xsl:otherwise>
    455                         <xsl:for-each select="nodeContent"><!--xxx<xsl:apply-templates select="."/>-->
    456                             <xsl:call-template name="documentNodeContent"/>
    457                         </xsl:for-each>
     461                        <xsl:apply-templates/>
    458462                    </xsl:otherwise>
    459463                </xsl:choose>
     
    463467   
    464468    <!-- Used to produce a version of the page in a format that can be read by the realistic books plugin -->
    465     <xsl:template name="documentNodeFlashXML"><!--xxx<xsl:template match="documentNode" mode="flashxml">-->
     469    <xsl:template name="documentNodeFlashXML">
    466470        <xsl:text disable-output-escaping="yes">
    467471            &lt;Section&gt;
     
    478482               
    479483        <xsl:for-each select="documentNode">
    480             <xsl:call-template name="documentNodeFlashXML"/><!--<xsl:apply-templates select="documentNode" mode="flashxml"/>-->
     484            <xsl:call-template name="documentNodeFlashXML"/>
    481485        </xsl:for-each>
    482486               
Note: See TracChangeset for help on using the changeset viewer.