root/main/trunk/model-sites-dev/pei-jones/collect/written-works/transform/pages/document.xsl @ 31796

Revision 31796, 1.5 KB (checked in by kjdon, 3 years ago)

adding the collections' frameworks

  • Property svn:mime-type set to application/xml
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4        xmlns:java="http://xml.apache.org/xslt/java"
5        xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6        xmlns:gslib="http://www.greenstone.org/skinning"
7        xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8        extension-element-prefixes="java util"
9        exclude-result-prefixes="java util gsf">
10
11  <!-- override the documentNodeText template as we want to hide the text unless pj.displayText metadata is set to true. -->
12
13  <!-- The default template for displaying the document node text -->
14  <!-- equivalent to gsf:text -->
15  <xsl:template name="documentNodeText">
16    <xsl:variable name="displayText"><gsf:metadata name="pj.DisplayText"/></xsl:variable>
17    <xsl:if test="$displayText = 'true'">   
18        <!-- Section text -->
19        <xsl:for-each select="nodeContent">
20          <xsl:for-each select="node()">
21            <xsl:choose>
22              <xsl:when test="not(name())">
23                <xsl:value-of select="." disable-output-escaping="yes"/>
24              </xsl:when>
25              <xsl:when test="name() = 'annotation'">
26                <xsl:call-template name="displayAnnotation"/>
27              </xsl:when>
28              <xsl:otherwise>
29                <xsl:apply-templates/>
30              </xsl:otherwise>
31            </xsl:choose>
32          </xsl:for-each>
33        </xsl:for-each>
34    </xsl:if>
35    <xsl:text> </xsl:text>
36  </xsl:template>
37 
38</xsl:stylesheet>
Note: See TracBrowser for help on using the browser.