Changeset 32601

Show
Ignore:
Timestamp:
14.11.2018 10:02:08 (4 weeks ago)
Author:
davidb
Message:

Introduction of double-quote gsf element to make writing JS within XSLT less cumbersome to write

Files:
1 modified

Legend:

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

    r32503 r32601  
    127127        </xsl:for-each> 
    128128            <xsl:apply-templates/> 
    129         <xslt:value-of select="''" /> 
     129        <xslt:value-of select="''" /> <!-- to ensure that the div tag does not collapse into one of the form <div/> --> 
    130130      </div> 
    131131    </xsl:template> 
    132132 
     133    <xsl:template match="gsf:dquote"><xslt:text disable-output-escaping="yes">"</xslt:text></xsl:template> 
     134    <!-- 
     135        While double-quotes do map to entities in HTML, technically single quotes don't need to go through 
     136        this process: they can just be typed literally, and so this means there isn't strictly a need 
     137        for the following rule, but included for completeness.  A long time ago it might have been that IE 
     138        did need the character to be entity-mapped --> 
     139    <xsl:template match="gsf:squote"><xslt:text disable-output-escaping="yes">'</xslt:text></xsl:template>   
     140     
    133141    <xsl:template match="gsf:image"> 
    134142        <xslt:variable name="metaName"> 
     
    334342                <!-- a document link --> 
    335343                <xslt:variable name="bookswitch"> 
    336                     <xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/> 
     344                  <xslt:value-of select="/page/pageRequest/paramList/param[@name='book']/@value"/> 
    337345                </xslt:variable> 
     346                   
    338347                <a> 
    339348                        <xsl:if test="@target">