source: main/trunk/greenstone3/web/sites/localsite/collect/gberg/transform/pages/document-content.xsl@ 25724

Last change on this file since 25724 was 25724, checked in by kjdon, 12 years ago

make the catchall template a bit more specific as it is being used instead of the one making the search form at the top

File size: 2.8 KB
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:gs3="http://www.greenstone.org/gs3"
5 xmlns:java="http://xml.apache.org/xslt/java"
6 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
7 xmlns:gslib="http://www.greenstone.org/skinning"
8 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
9 extension-element-prefixes="java util"
10 exclude-result-prefixes="java util gsf">
11
12 <!-- use the 'main' layout -->
13 <xsl:import href="layouts/main.xsl"/>
14
15 <xsl:template name="pageTitle">
16 <xsl:value-of select="/page/pageResponse/documentNode/metadataList/metadata[@name='root_Title']"/>
17 </xsl:template>
18
19 <!-- set page breadcrumbs -->
20 <xsl:template name="breadcrumbs">
21 <gslib:siteLink/><gslib:rightArrow/>
22 <gslib:collectionNameLinked/><gslib:rightArrow/>
23 </xsl:template>
24
25 <!-- page specific style goes here -->
26 <xsl:template name="additionalHeaderContent">
27 <link type="text/css" href="sites/localsite/collect/gberg/transform/darwin.css" rel="stylesheet"/>
28 </xsl:template>
29
30 <xsl:template match="/page"><xsl:apply-templates select="/page/pageResponse/documentNode"/></xsl:template>
31
32 <xsl:template match="documentNode">
33 <xsl:variable name="docname"><xsl:choose><xsl:when test="contains(@nodeID, '.')"><xsl:value-of select="substring-before(@nodeID, '.')"/></xsl:when><xsl:otherwise><xsl:value-of select="@nodeID"/></xsl:otherwise></xsl:choose></xsl:variable>
34 <h1>
35 <center>
36 <a href="{$library_name}?a=xd&amp;sa=toc&amp;c={$collName}&amp;d={$docname}"><xsl:attribute name="title">Go to the document contents</xsl:attribute><xsl:value-of select="metadataList/metadata[@name='root_Title']"/>&#160;</a>
37 </center>
38 </h1>
39 <xsl:apply-templates select="nodeContent/*"/>
40 </xsl:template>
41
42 <xsl:template match="gutblurb | markupblurb | endmarkupblurb | endgutblurb">
43 </xsl:template>
44
45 <xsl:template match="gutbook | book | frontmatter | bookbody | backmatter | titlepage| htitlepage | toc | dedication | preface | introduction | chapter | part | chapheader | index | appendix | glossary">
46 <xsl:copy>
47 <xsl:copy-of select="@*"/>
48 <xsl:apply-templates/>
49 </xsl:copy>
50 </xsl:template>
51
52<!-- dont seem to be able to apply styles to title tags - cos they are special to html. so we rename title to title1-->
53 <xsl:template match="title">
54 <title1>
55 <xsl:apply-templates/>
56 </title1>
57 </xsl:template>
58
59 <!-- catch any tags that we haven't already looked for, but only in the nodeContent. assign a low priority as the specificity of the path would give this a high system priority -->
60 <xsl:template match="/page/pageResponse/documentNode/nodeContent//*" priority="-1">
61 <xsl:copy-of select="."/>
62 </xsl:template>
63
64 <xsl:template match="metadataList">
65 </xsl:template>
66
67</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.