Changeset 7760


Ignore:
Timestamp:
2004-07-19T16:13:07+12:00 (20 years ago)
Author:
kjdon
Message:

slightly better documentContent template

File:
1 edited

Legend:

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

    r7632 r7760  
    233233  </xsl:template>
    234234 
    235   <!-- default content is to process any nodeContent elements and print out their text -->
     235  <!-- default content is to print the title and content of any documentNodes that have nodeContent -->
    236236  <xsl:template name="documentContent">
    237     <xsl:apply-templates select="descendant-or-self::node()/nodeContent"/>
    238   </xsl:template>
    239  
     237    <xsl:apply-templates select="descendant-or-self::node()/documentNode" mode="content"/>
     238  </xsl:template>
     239 
     240  <xsl:template match="documentNode" mode="content">
     241    <xsl:if test="nodeContent">
     242      <xsl:if test="metadataList/metadata[@name='Title']">
     243    <h3><xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name='Title']"/></h3>
     244      </xsl:if>
     245      <xsl:apply-templates select="nodeContent"/>
     246    </xsl:if>
     247  </xsl:template>
    240248
    241249  <!-- the actual text/content -->
Note: See TracChangeset for help on using the changeset viewer.