Changeset 37155


Ignore:
Timestamp:
2023-01-18T23:44:58+13:00 (9 days ago)
Author:
davidb
Message:

Reworking of template so it doesn't need as much copy-and-paste syntax

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-installations/intermuse/trunk/sites/intermuse/collect/programmes-and-performers/transform/pages/document.xsl

    r37126 r37155  
    203203  </xsl:template>
    204204     
    205   <xsl:template name="documentNodeText">
     205  <xsl:template name="documentNodeTextIntermuse">
    206206      <xsl:param name="force">0</xsl:param>
    207207      <xsl:variable name="im_programme"><gsf:metadata name="im.Programme" select="root"/></xsl:variable>
    208       im_programme = <xsl:value-of select="$im_programme"/><br/>
    209208      <xsl:choose>
    210209    <xsl:when test="$im_programme != 'true'">
     
    240239      <!-- The following is directly from default/transform/page/document.xsl -->
    241240      <!-- **** consider replacing with <gsf:text> ???? ... or change the name of this outer template so it can still call the default inner one -->
    242 
    243         <!-- Hides the "This document has no text." message -->
    244         <xsl:variable name="noText"><gsf:metadata name="NoText"/></xsl:variable>
    245         <xsl:choose>
    246           <xsl:when test="$force = '1' or not($noText = '1')">
    247 
    248             <!-- Section text -->
    249             <xsl:for-each select="nodeContent">
    250               <xsl:call-template name="displayMarkedUpTextAndAnnotations"/>
    251             </xsl:for-each>
    252                   </xsl:when>
    253           <xsl:when test="$noText = '1' and not(metadataList/metadata[@name='ImageType'])">
    254             <gsf:link type="source"><gsf:metadata name="Source"/></gsf:link>
    255                   </xsl:when>
    256         </xsl:choose>
    257         <xsl:text> </xsl:text>
     241        <xsl:call-template name="documentNodeText">
     242          <xsl:with-param name="force" select="$force"/>
     243            </xsl:call-template>
    258244
    259245       </xsl:otherwise>
     
    290276      <xsl:call-template name="wrappedSectionImage"/>
    291277      <div id="gs-document-text">
    292         <xsl:call-template name="documentNodeText"/>
     278        <xsl:call-template name="documentNodeTextIntermuse"/>
    293279      </div>
    294280      <xsl:call-template name="documentPost"/>
Note: See TracChangeset for help on using the changeset viewer.