Changeset 32503


Ignore:
Timestamp:
2018-10-09T15:11:25+13:00 (6 years ago)
Author:
kjdon
Message:

2 things. if @highlight attribute set on gsf:metadata, then output the value using displayMarkedUpTextAndAnnotations. only works for document display templates. 2. can put @force=true to gsf:text - this will output 'this document has no text' if that is the value, instead of hiding it.

File:
1 edited

Legend:

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

    r32444 r32503  
    592592                            <xslt:value-of disable-output-escaping='yes' select="util:{@format}(., /page/@lang )"/>
    593593                        </xsl:when>
     594                        <xsl:when test="@highlight"><xslt:call-template name="displayMarkedUpTextAndAnnotations"/>
     595                        </xsl:when>
    594596                        <xsl:otherwise>
    595597                            <xslt:value-of disable-output-escaping='yes' select="."/>
     
    637639  </xsl:template>
    638640
    639     <xsl:template match="gsf:text">
    640         <xslt:call-template name="documentNodeText"/>
     641  <xsl:template match="gsf:text">
     642    <xsl:variable name="force">
     643      <xsl:choose><xsl:when test="@force = 'true'">1</xsl:when><xsl:when test="@force = 'false'">0</xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose>
     644    </xsl:variable>
     645        <xslt:call-template name="documentNodeText"><xslt:with-param name="force"><xsl:value-of select="$force"/></xslt:with-param></xslt:call-template>
    641646    </xsl:template>
    642647
Note: See TracChangeset for help on using the changeset viewer.