Index: trunk/gsdl3/web/sites/localsite/collect/gberg/transform/about.xsl
===================================================================
--- trunk/gsdl3/web/sites/localsite/collect/gberg/transform/about.xsl	(revision 5957)
+++ trunk/gsdl3/web/sites/localsite/collect/gberg/transform/about.xsl	(revision 5957)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+  extension-element-prefixes="java util"
+  exclude-result-prefixes="java util">
+
+  <!-- style includes global params interface_name, library_name -->
+  <xsl:include href="style.xsl"/>
+
+  <xsl:output method="html"/>  
+
+  <xsl:template name="pageHead">
+    <head>
+      <title>
+	Sample XML Texts Collection
+      </title>
+    </head>
+  </xsl:template>
+  
+  <xsl:template match="pageResponse">
+      <xsl:apply-templates select="collection"/>
+  </xsl:template>
+
+  <xsl:template match="collection">
+    <xsl:variable name="collName" select="@name"/>
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>
+    <xsl:call-template name="navigationBar">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>      
+    <p/><xsl:value-of select="displayItem[@name='description']"/>
+    <p/><xsl:apply-templates select="documentList">
+      <xsl:with-param name="collName" select="@name"/>
+    </xsl:apply-templates>
+  </xsl:template>
+  
+  <xsl:template match="documentList">
+    <xsl:param name="collName"/>
+    <ul>
+      <xsl:for-each select="document">
+	<li><a href="{$library_name}?a=xd&amp;sa=toc&amp;sc=full&amp;c={$collName}&amp;d={@name}"><xsl:value-of select="metadataList/metadata[@name='Title']"/></a></li>
+      </xsl:for-each>
+    </ul>
+  </xsl:template>
+</xsl:stylesheet>
Index: trunk/gsdl3/web/sites/localsite/collect/gberg/transform/darwin.css
===================================================================
--- trunk/gsdl3/web/sites/localsite/collect/gberg/transform/darwin.css	(revision 5957)
+++ trunk/gsdl3/web/sites/localsite/collect/gberg/transform/darwin.css	(revision 5957)
@@ -0,0 +1,342 @@
+/*This is darwin.css*/
+
+ gutblurb{
+  display:none;
+ }
+
+ markupblurb
+  {
+  display:none;
+
+  }
+ endgutblurb{
+  display:none;
+ }
+
+ para,sect1,sect2,sect3,sect4,simplesect{
+  display:block;
+  }
+
+
+ title1,item,chapter,chapnum,chapsummary,desc,def,letter
+{
+  display:block;
+  }
+
+ blockquote,footnote,note,list,deflist,blockgraphic{
+  display:block;
+  }
+
+ quote,emph,ital,reference,date,place,name,graphic,misc{
+  display:inline;
+  }
+
+  acknowledge{
+  display:block;
+  text-align:center;
+  font-size:8pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+ htitlepage title1{
+  display:block;
+  text-align:center;
+  font-size:16pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+ htitlepage subtitle{
+  display:block;
+  text-align:center;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+  htitlepage author{
+  display:block;
+  text-align:center;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+  epigraph{
+  display:block;
+  text-align:center;
+  font-size:12pt;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+
+  epigraph blockquote{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  margin-top:8pt;
+  margin-left:24pt;
+  margin-right:24pt;
+  margin-bottom:12pt;
+  }
+
+  epigraph attrib{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  margin-top:8pt;
+  margin-right:24pt;
+  margin-left:24pt;
+  margin-bottom:12pt;
+  }
+
+ titlepage title1{
+  display:block;
+  text-align:center;
+  font-size:16pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+  titlepage para{
+  display:block;
+  text-align:center;
+  font-size:12pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+  titlepage line{
+  display:block;
+  text-align:center;
+  font-size:12pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+  titlepage subtitle{
+  display:block;
+  text-align:center;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+
+
+  titlepage author{
+  display:block;
+  text-align:center;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+ titlepage partnum{
+  display:block;
+  text-align:center;
+  font-size:16pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+ dedication title1{
+  display:block;
+  text-align:center;
+  font-size:16pt;
+  font-family:arial,sans-serif;
+  margin-top:8pt;
+  margin-bottom:12pt;
+  }
+
+  toc title1{
+  display:block;
+  text-align:left;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:24pt;
+  margin-bottom:12pt;
+  }
+
+  toc subtitle{
+  display:block;
+  text-align:left;
+  font-weight:bold;
+  font-size:13pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:24pt;
+  margin-bottom:12pt;
+  }
+
+
+  toc item{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:36pt;
+  margin-bottom:12pt;
+  }
+
+
+  toc def{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  font-family:times new roman,serif;
+  margin-top:12pt;
+  margin-left:48pt;
+  margin-right:24pt;
+
+  margin-bottom:12pt;
+  }
+
+  toc desc{
+  display:block;
+  text-align:left;
+  font-size:10pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:42pt;
+  margin-bottom:12pt;
+  }
+
+ preface title1{
+  display:block;
+  text-align:left;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:12pt;
+  margin-bottom:12pt;
+  }
+
+  introduction title1{
+  display:block;
+  text-align:left;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:12pt;
+  margin-bottom:12pt;
+  }
+
+  salut,sig,para{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  font-family:times new roman,serif;
+  margin-top:12pt;
+  margin-left:24pt;
+  margin-right:24pt;
+  margin-bottom:12pt;
+  }
+
+  poem{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  margin-left:24pt;
+  margin-top:18pt;
+  margin-bottom:18pt;
+  }
+
+  line{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  margin-left:24pt;
+  margin-right:24pt;
+  }
+
+  chapter title1{
+  display:block;
+  text-align:left;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:12pt;
+  margin-bottom:12pt;
+  }
+
+  chapter chapnum{
+  display:block;
+  text-align:center;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-bottom:12pt;
+  }
+
+  chapter chapsummary{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  font-style:italic;
+  font-family:times new roman,serif;
+  margin-top:12pt;
+  margin-left:48pt;
+  margin-right:36pt;
+  margin-bottom:12pt;
+  }
+
+  chapter blockquote para{
+  display:block;
+  text-align:left;
+  font-size:11pt;
+  
+  margin-top:8pt;
+  margin-left:48pt;
+  margin-right:48pt;
+  margin-bottom:12pt;
+  }
+
+
+  index item{
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  font-family:times new roman,serif;
+  margin-top:8pt;
+  margin-left:12pt;
+  margin-bottom:8pt;
+  }
+
+  index title1{
+  display:block;
+  text-align:left;
+  font-size:14pt;
+  font-family:arial,sans-serif;
+  margin-top:12pt;
+  margin-left:12pt;
+  margin-bottom:12pt;
+  }
+
+  list item{
+  color:black;
+  display:block;
+  text-align:left;
+  font-size:12pt;
+  font-family:times new roman,serif;
+  margin-top:8pt;
+  margin-left:48pt;
+  margin-bottom:8pt;
+  }
+
+
+
Index: trunk/gsdl3/web/sites/localsite/collect/gberg/transform/document-content.xsl
===================================================================
--- trunk/gsdl3/web/sites/localsite/collect/gberg/transform/document-content.xsl	(revision 5957)
+++ trunk/gsdl3/web/sites/localsite/collect/gberg/transform/document-content.xsl	(revision 5957)
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+  extension-element-prefixes="java util"
+  exclude-result-prefixes="java util">
+
+  <!-- style includes global params interface_name, library_name -->
+  <xsl:include href="style.xsl"/>
+
+  <xsl:output method="html"/> 
+  
+  <xsl:template name="pageHead">
+    <head>
+      <title>
+	<xsl:value-of select="/page/pageResponse/documentNode/metadataList/metadata[@name='root_Title']"/>
+      </title>
+      <link type="text/css" href="sites/localsite/collect/gbergtest/transform/darwin.css" rel="stylesheet"/>
+    </head>
+  </xsl:template>
+  
+  <xsl:template match="pageResponse">
+    <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>
+    <xsl:call-template name="navigationBar">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>      
+    <!-- display the document -->
+    <xsl:apply-templates select="documentNode">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:apply-templates>
+    <xsl:call-template name="dividerBar"/>
+  </xsl:template>
+
+  <xsl:template match="documentNode">
+    <xsl:param name="collName"/>
+    <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>
+    <h1>
+      <center>
+	<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>
+      </center>
+    </h1>
+    <xsl:apply-templates select="nodeContent/*"/>
+  </xsl:template>
+
+  <xsl:template match="gutblurb | markupblurb | endmarkupblurb | endgutblurb">
+  </xsl:template>
+
+  <xsl:template match="gutbook | book | frontmatter | bookbody | backmatter | titlepage| htitlepage | toc | dedication | preface | introduction | chapter |  part | chapheader | index | appendix | glossary">
+    <xsl:copy>
+      <xsl:copy-of select="@*"/>
+      <xsl:apply-templates/>
+    </xsl:copy>
+  </xsl:template>
+
+<!-- dont seem to be able to apply styles to title tags - cos they are special to html. so we rename title to title1-->
+  <xsl:template match="title">
+    <title1>
+      <xsl:apply-templates/>
+    </title1>
+  </xsl:template>  
+    
+  <xsl:template match="*">
+    <xsl:copy-of select="."/>
+  </xsl:template>
+
+  <xsl:template match="metadataList">
+  </xsl:template>
+
+</xsl:stylesheet>
+
+
+
+
+
+
+
Index: trunk/gsdl3/web/sites/localsite/collect/gberg/transform/document-toc.xsl
===================================================================
--- trunk/gsdl3/web/sites/localsite/collect/gberg/transform/document-toc.xsl	(revision 5957)
+++ trunk/gsdl3/web/sites/localsite/collect/gberg/transform/document-toc.xsl	(revision 5957)
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:gs3="http://www.greenstone.org/gs3"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+  extension-element-prefixes="java util"
+  exclude-result-prefixes="java util">
+
+  <!-- style includes global params interface_name, library_name -->
+  <xsl:include href="style.xsl"/>
+
+  <xsl:output method="html"/> 
+  
+  <xsl:template name="pageHead">
+    <head>
+      <title>
+	<xsl:value-of select="/page/pageResponse/documentNode/metadataList/metadata[@name='root_Title']"/>: Table of Contents
+      </title>
+    </head>
+  </xsl:template>
+  
+  <xsl:template match="pageResponse">
+    <xsl:variable name="collName"><xsl:value-of select="/page/pageRequest/paramList/param[@name='c']/@value"/></xsl:variable>
+    <xsl:call-template name="standardPageBanner">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>
+    <xsl:call-template name="navigationBar">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:call-template>      
+    <!-- display the document -->
+    <xsl:apply-templates select="documentNode">
+      <xsl:with-param name="collName" select="$collName"/>
+    </xsl:apply-templates>
+    <xsl:call-template name="dividerBar"/>
+  </xsl:template>
+
+  <xsl:template match="documentNode">
+    <xsl:param name="collName"/>
+    <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>
+    <h1>
+      <center>
+	<xsl:value-of select="metadataList/metadata[@name='root_Title']"/>
+      </center>
+    </h1>
+    <xsl:apply-templates select="nodeStructure/gutbook/book"><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="docName" select="$docname"/></xsl:apply-templates>
+  </xsl:template>
+  
+  <xsl:template match="book">
+    <xsl:param name="collName"/>
+    <xsl:param name="docName"/>
+    <h1>
+      Contents
+    </h1>
+    <ul class="toc">
+      <xsl:if test="acknowledge">
+	<li class='toc'>
+	  <a href="{$library_name}?a=xd&amp;sa=text&amp;d={$docName}.acknowledge&amp;c={$collName}">Acknowledgements</a>
+	</li>
+      </xsl:if>
+      <xsl:if test="frontmatter">
+	<li class='toc'>
+	  <a href="{$library_name}?a=xd&amp;sa=text&amp;d={$docName}.frontmatter&amp;c={$collName}">About this document</a>
+	</li>
+      </xsl:if>
+      <li class='toc'><a href="{$library_name}?a=xd&amp;sa=text&amp;d={$docName}&amp;c={$collName}">Full version</a>
+      </li>
+    </ul>
+    <xsl:apply-templates select="bookbody"><xsl:with-param name="collName" select="$collName"/><xsl:with-param name="docName" select="$docName"/></xsl:apply-templates>
+    <xsl:if test="backmatter">
+      <ul class='toc'>
+	<li class='toc'>
+	<a href="{$library_name}?a=xd&amp;sa=text&amp;d={$docName}.backmatter&amp;c={$collName}">Back matter (may include appendices, index, glossary etc)</a>
+	</li>
+      </ul>
+    </xsl:if>
+  </xsl:template>
+    
+  <xsl:template match="bookbody">
+    <xsl:param name="collName"/>
+    <xsl:param name="docName"/>
+    <ul class="toc">
+      <xsl:apply-templates select="part|chapter">
+	<xsl:with-param name="collName" select="$collName"/>
+	<xsl:with-param name="docName" select="$docName"/>
+      </xsl:apply-templates>
+    </ul>
+  </xsl:template>
+
+  <xsl:template match="part">
+    <xsl:param name="collName"/>
+    <xsl:param name="docName"/>
+    <li class='toc'>
+      <a href="{$library_name}?a=xd&amp;sa=text&amp;c={$collName}&amp;d={$docName}.bookbody.part.{@gs3:id}">Part <xsl:value-of select="position()"/></a>
+      <xsl:if test="chapter">
+	<ul class='toc'>
+	  <xsl:apply-templates select="chapter">
+	  <xsl:with-param name="collName" select="$collName"/>
+	  <xsl:with-param name="docName" select="$docName"/>
+	</xsl:apply-templates>
+	</ul>
+      </xsl:if>
+    </li>
+  </xsl:template>
+
+  <xsl:template match="chapter">
+    <xsl:param name="collName"/>
+    <xsl:param name="docName"/>
+    <li class='toc'>
+      <a href="{$library_name}?a=xd&amp;sa=text&amp;c={$collName}&amp;d={$docName}.bookbody.chapter.{@gs3:id}">
+	<xsl:choose>
+	  <xsl:when test="title">
+	    <xsl:value-of select="title"/>
+	  </xsl:when>
+	  <xsl:when test="chapheader">
+	    <xsl:value-of select="chapheader/chapnum"/>: <xsl:value-of select="chapheader/title"/>
+	  </xsl:when>
+	  <xsl:otherwise>
+	    Chapter <xsl:value-of select="position()"/>
+	  </xsl:otherwise>
+	</xsl:choose>
+      </a>
+    </li>
+  </xsl:template>
+   
+</xsl:stylesheet>
+
+
+
+
+
+
+
Index: trunk/gsdl3/web/sites/localsite/collect/gberg/transform/produce-toc.xsl
===================================================================
--- trunk/gsdl3/web/sites/localsite/collect/gberg/transform/produce-toc.xsl	(revision 5957)
+++ trunk/gsdl3/web/sites/localsite/collect/gberg/transform/produce-toc.xsl	(revision 5957)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:java="http://xml.apache.org/xslt/java"
+  xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
+  extension-element-prefixes="java util"
+  exclude-result-prefixes="java util">
+  
+  <xsl:output method="xml"/>
+
+  <xsl:strip-space elements='*'/>
+
+  <xsl:template match="gutbook | book | acknowledge | frontmatter | bookbody | backmatter | part | chapter | chapheader "><xsl:copy><xsl:for-each select="@*"><xsl:copy/></xsl:for-each><xsl:apply-templates/></xsl:copy></xsl:template>
+
+  <xsl:template match="title | chapnum">
+    <xsl:copy-of select="."/>
+  </xsl:template>
+
+  <!-- any thing else is ignored -->
+  <xsl:template match="*"></xsl:template>
+  
+</xsl:stylesheet>
