Index: /documented-examples/trunk/garish-e/etc/collect.cfg
===================================================================
--- /documented-examples/trunk/garish-e/etc/collect.cfg	(revision 36344)
+++ /documented-examples/trunk/garish-e/etc/collect.cfg	(revision 36345)
@@ -20,7 +20,7 @@
 classify	Hierarchy -metadata dls.Subject -sort dls.Title
 
-classify	List -sort_leaf_nodes_using dls.Title -metadata dls.Organization -bookshelf_type always -partition_type_within_level constant_size
-
-classify	List -metadata dls.Keyword -partition_type_within_level constant_size -buttonname Howto
+classify	List -metadata dls.Organization -sort_leaf_nodes_using dls.Title -partition_type_within_level constant_size -bookshelf_type always
+
+classify	List -metadata dls.Keyword -buttonname Howto -partition_type_within_level constant_size
 
 format CL4VList "<td>[link][icon][/link]</td><td>[link][dls.Keyword][/link]"
@@ -67,8 +67,6 @@
 collectionmeta	collectionname [l=ru] "Ð ÐµÐ·ÐºÐ°Ñ Ð²ÐµÑÑÐžÑ ÐŽÐµÐŒÐŸÐœÑÑÑÐ°ÑÐžÐŸÐœ-ÐœÐŸÐ¹ ÐºÐŸÐ»Ð»ÐµÐºÑÐžÐž"
 
-
 # -- Simplified Chinese strings ----------------
 collectionmeta	collectionname [l=zh] "Garishçæ¬çæŒç€ºéŠè"
-
 
 # -- English text ----------------
@@ -571,5 +569,5 @@
 
 <p>
-Para utilizar enteramente el nuevo estilo para la colecciÃ³n, especifique la macro <i>cssheader</i> en <i>extra.dm</i>. Para simplemente agregar un par de declaraciones de estilos al estilo por defecto, especifique <i>collectionspecificstyle</i> en <i>extra.dm</i>. Eso es lo que la colecciÃ³n ha hecho. La macro  mencionada arriba, <i>collectionspecificstyle</i> incluye el \'stylesheet\' propio de la colecciÃ³n, y a la vez anula un par de declaraciones de imagen, deshaciendose del fondo de pantalla de la barra verde curva, y cambiando a azul el fondo planeado para los botones de la barra de navegaciÃ³n.
+Para utilizar enteramente el nuevo estilo para la colecciÃ³n, especifique la macro <i>cssheader</i> en <i>extra.dm</i>. Para simplemente agregar un par de declaraciones de estilos al estilo por defecto, especifique <i>collectionspecificstyle</i> en <i>extra.dm</i>. Eso es lo que la colecciÃ³n ha hecho. La macro mencionada arriba, <i>collectionspecificstyle</i> incluye el \'stylesheet\' propio de la colecciÃ³n, y a la vez anula un par de declaraciones de imagen, deshaciendose del fondo de pantalla de la barra verde curva, y cambiando a azul el fondo planeado para los botones de la barra de navegaciÃ³n.
 <p>
 La macro de encabezado de la pÃ¡gina tambiÃ©n remite a <i>pagebanner</i> para incluir el logotipo de la colecciÃ³n, los botones principal/ayuda/preferencias y la imagen en la parte superior izquierda que identifica la pÃ¡gina (acerca de esta pÃ¡gina, buscar pÃ¡gina, etc.). Este cÃ³digo redefine el banner con el fin de suprimir estas imÃ¡genes, a excepciÃ³n del botÃ³n de la pÃ¡gina de inicio-- como se puede ver aquÃ­, no aparecen en la parte superior de esta pÃ¡gina.
@@ -871,5 +869,5 @@
 ¶å€è§è¢«æŽæ¹äžºgarishé£æ Œã\n
 
-<h3>æ¬éŠèåŠäœå·¥äœ</h3>\n 
+<h3>æ¬éŠèåŠäœå·¥äœ</h3>\n
 
 <p>GreenstoneéŠèçå€è§ç±<i>greenstone/macros</i>ç®åœäžç\"å®æä»¶\"å®ä¹ïŒä¿®æ¹è¿äºæä»¶çå
@@ -919,5 +917,5 @@
 \n
 &#095;starthighlight&#095; {&lt;b&gt;}\n
-&#095;endhighlight&#095;   {&lt;/b&gt;}\n
+&#095;endhighlight&#095; {&lt;/b&gt;}\n
 \n
 &#095;navbarspacer&#095; { \n
@@ -943,5 +941,5 @@
 <pre>
 &lt;img src=\"&#095;httpcimages&#095;\/horzline.gif\"\n
-   width=\"&#095;widthtspace&#095;\" height=\"17\"&gt;
+width=\"&#095;widthtspace&#095;\" height=\"17\"&gt;
 </pre>\n
 
@@ -959,5 +957,5 @@
 &#095;collectionspecificstyle&#095; {\n
 &lt;link rel=\"stylesheet\" href=\"&#095;httpcstyle&#095;/style.css\" type=\"text/css\" \n
-   title=\"Greenstone Style\" charset=\"UTF-8\"&gt;\n
+title=\"Greenstone Style\" charset=\"UTF-8\"&gt;\n
 &lt;style&gt;\n
 body.bgimage \\\{ background-image: none; \\\}\n
Index: /documented-examples/trunk/garish-e/etc/collectionConfig.xml
===================================================================
--- /documented-examples/trunk/garish-e/etc/collectionConfig.xml	(revision 36345)
+++ /documented-examples/trunk/garish-e/etc/collectionConfig.xml	(revision 36345)
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:gslib="http://www.greenstone.org/skinning" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<metadataList>
+		<metadata lang="en" name="creator">greenstone@cs.waikato.ac.nz</metadata>
+		<metadata lang="en" name="maintainer"/>
+		<metadata lang="en" name="public">true</metadata>
+	</metadataList>
+	<displayItemList>
+		<displayItem dictionary="collectionConfig" key="name" name="name"/>
+		<displayItem lang="en" name="name">Custom stylesheet demo collection</displayItem>
+		<displayItem dictionary="collectionConfig" key="name" name="name"/>
+		<displayItem dictionary="collectionConfig" key="shortDescription" name="shortDescription"/>
+		<displayItem dictionary="collectionConfig" key="description1" name="description1"/>
+		<displayItem dictionary="collectionConfig" key="description2" name="description2"/>
+		<displayItem dictionary="collectionConfig" key="description3" name="description3"/>
+		<displayItem dictionary="collectionConfig" key="description4" name="description4"/>
+		<displayItem dictionary="collectionConfig" key="description5" name="description5"/>
+	</displayItemList>
+	<format>
+			<xsl:template name="additionalHeaderContent">
+				<xsl:variable name="httpCollection">
+					<xsl:value-of select="/page/pageResponse/collection/metadataList/metadata[@name='httpPath']"/>
+				</xsl:variable>
+				<link href="{$httpCollection}/style/custom-style.css" rel="stylesheet" type="text/css"/>
+<!--
+<script src="{$httpCollection}/script/script.js" type="text/javascript">    </script>
+-->
+			</xsl:template>
+		</format>
+	<search type="mgpp">
+		<index name="dls.Organization">
+			<displayItem lang="en" name="name">dls.Organization</displayItem>
+		</index>
+		<index name="dls.Title,Title">
+			<displayItem lang="en" name="name">dls.Title,Title</displayItem>
+		</index>
+		<index name="dls.Keyword">
+			<displayItem lang="en" name="name">dls.Keyword</displayItem>
+		</index>
+		<index name="text">
+			<displayItem lang="en" name="name">text</displayItem>
+		</index>
+		<index name="dls.Subject">
+			<displayItem lang="en" name="name">dls.Subject</displayItem>
+		</index>
+		<defaultIndex name="text"/>
+		<level name="document">
+			<displayItem lang="en" name="name">_textbook_</displayItem>
+		</level>
+		<level name="section">
+			<displayItem lang="en" name="name">_textchapter_</displayItem>
+		</level>
+		<defaultLevel name="section"/>
+		<indexOption name="casefold"/>
+		<indexOption name="stem"/>
+		<searchType name="plain"/>
+		<searchType name="simpleform"/>
+		<searchType name="advancedform"/>
+		<format>
+			<gsf:template match="documentNode">
+				<gsf:format-gs2><![CDATA[<td valign=top>[link]<img src='[DocImage]' height='21'>[/link]</td><td>{If}{[parent(All': '):Title],[parent(All': '):Title]:}[link][Title][/link]</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="document">
+						<img height="21" src=""/>
+					</gsf:link>
+				</td>
+				<td>
+					<gsf:switch>
+						<gsf:metadata name="Title"/>
+						<gsf:when test="exists"><gsf:metadata name="Title"/>:</gsf:when>
+					</gsf:switch>
+					<gsf:link type="document">
+						<gsf:metadata name="Title"/>
+					</gsf:link>
+				</td>
+			</gsf:template>
+		</format>
+	</search>
+	<infodb type="gdbm"/>
+	<import>
+		<pluginList>
+			<plugin name="GreenstoneXMLPlugin"/>
+			<plugin name="HTMLPlugin">
+				<option name="-description_tags"/>
+			</plugin>
+			<plugin name="MetadataXMLPlugin"/>
+			<plugin name="ArchivesInfPlugin"/>
+			<plugin name="DirectoryPlugin"/>
+		</pluginList>
+	</import>
+	<browse>
+		<classifier name="List">
+			<option name="-metadata" value="dls.Title"/>
+			<option name="-partition_type_within_level" value="constant_size"/>
+		</classifier>
+		<classifier name="Hierarchy">
+			<option name="-metadata" value="dls.Subject"/>
+			<option name="-sort" value="dls.Title"/>
+		</classifier>
+		<classifier name="List">
+			<option name="-metadata" value="dls.Organization"/>
+			<option name="-sort_leaf_nodes_using" value="dls.Title"/>
+			<option name="-partition_type_within_level" value="constant_size"/>
+			<option name="-bookshelf_type" value="always"/>
+		</classifier>
+		<classifier name="List">
+			<option name="-metadata" value="dls.Keyword"/>
+			<option name="-buttonname" value="Howto"/>
+			<option name="-partition_type_within_level" value="constant_size"/>
+			<format>
+			<gsf:template match="documentNode">
+				<gsf:format-gs2><![CDATA[
+<td>[link][icon][/link]
+</td>
+<td>[link][dls.Keyword][/link]]]></gsf:format-gs2>
+				<td>
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td>
+					<gsf:link type="document">
+						<gsf:metadata name="dls.Keyword"/>
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode">
+				<gsf:format-gs2><![CDATA[
+<td>[link][icon][/link]
+</td>
+<td>[link][dls.Keyword][/link]]]></gsf:format-gs2>
+				<td>
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td>
+					<gsf:link type="classifier">
+						<gsf:metadata name="dls.Keyword"/>
+					</gsf:link>
+				</td>
+			</gsf:template>
+		</format>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+				<gsf:format-gs2><![CDATA[
+<td valign=top>[link][icon][/link]
+</td>
+<td valign=top>[highlight]{Or}{[Title],Untitled}[/highlight]{If}{[Date],
+<br>
+<small>
+<i>_textdate_[Date]
+</i>
+</small>}{If}{[NumPages],
+<br>
+<small>
+<i>_textnumpages_[NumPages]
+</i>
+</small>}{If}{[Source],
+<br>
+<small>
+<i>_textsource_[dmsafe:Source]
+</i>
+</small>}
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<span class="highlight">
+						<gsf:choose-metadata><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata>
+					</span>
+					<gsf:switch>
+						<gsf:metadata name="Date"/>
+						<gsf:when test="exists">
+							<br/>
+							<small>
+								<i>_textdate_<gsf:metadata name="Date"/></i>
+							</small>
+						</gsf:when>
+					</gsf:switch>
+					<gsf:switch>
+						<gsf:metadata name="NumPages"/>
+						<gsf:when test="exists">
+							<br/>
+							<small>
+								<i>_textnumpages_<gsf:metadata name="NumPages"/></i>
+							</small>
+						</gsf:when>
+					</gsf:switch>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<small>
+								<i>_textsource_<gsf:metadata name="Source"/></i>
+							</small>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode">
+				<gsf:format-gs2><![CDATA[
+<td valign=top>[link][icon][/link]
+</td>
+<td valign=top>[highlight]{Or}{[Title],Untitled}[/highlight]{If}{[Date],
+<br>
+<small>
+<i>_textdate_[Date]
+</i>
+</small>}{If}{[NumPages],
+<br>
+<small>
+<i>_textnumpages_[NumPages]
+</i>
+</small>}{If}{[Source],
+<br>
+<small>
+<i>_textsource_[dmsafe:Source]
+</i>
+</small>}
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<span class="highlight">
+						<gsf:choose-metadata><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata>
+					</span>
+					<gsf:switch>
+						<gsf:metadata name="Date"/>
+						<gsf:when test="exists">
+							<br/>
+							<small>
+								<i>_textdate_<gsf:metadata name="Date"/></i>
+							</small>
+						</gsf:when>
+					</gsf:switch>
+					<gsf:switch>
+						<gsf:metadata name="NumPages"/>
+						<gsf:when test="exists">
+							<br/>
+							<small>
+								<i>_textnumpages_<gsf:metadata name="NumPages"/></i>
+							</small>
+						</gsf:when>
+					</gsf:switch>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<small>
+								<i>_textsource_<gsf:metadata name="Source"/></i>
+							</small>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode" mode="horizontal">
+				<gsf:format-gs2><![CDATA[[link][highlight][Title][/highlight][/link]]]></gsf:format-gs2>
+				<gsf:link type="classifier">
+					<span class="highlight">
+						<gsf:metadata name="Title"/>
+					</span>
+				</gsf:link>
+			</gsf:template>
+		</format>
+	</browse>
+	<display>
+		<format>
+			<gsf:option name="TOC" value="true"/>
+			<gsf:option name="AllowUserComments" value="false"/>
+<!--
+Overwriting this template allows you to change the heading of the document.
+-->
+<!--
+<gsf:template name="documentHeading"><span style="font-weight:bold; font-size: 120%;"><xsl:call-template name="choose-title"/></span></gsf:template>
+-->
+<!--
+Overwriting this template can be used to redefine the content of the whole document.This is useful for simple documents, but not recommended for more complex documents(e.g. hierachical and paged documents) as it can prevent any sub-sections from showing.
+-->
+<!--
+<gsf:template name="documentContent"><div id="gs-document"><xsl:call-template name="documentPre"/><xsl:call-template name="wrappedSectionImage"/><div id="gs-document-text"><xsl:call-template name="documentNodeText"/></div></div></gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of section headings.
+-->
+<!--
+<gsf:template name="sectionHeading"><xsl:call-template name="choose-title"/></gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of the top-level section.
+-->
+<!--
+<gsf:template name="topLevelSectionContent"><xsl:call-template name="wrappedSectionImage"/><xsl:call-template name="wrappedSectionText"/></gsf:template>
+-->
+<!--
+Overwriting this template can be used to change the content of sections.
+-->
+<!--
+<gsf:template name="sectionContent"><xsl:call-template name="wrappedSectionImage"/><xsl:call-template name="wrappedSectionText"/></gsf:template>
+-->
+		</format>
+	</display>
+	<replaceListRef id="gs2-standard"/>
+</CollectionConfig>
Index: /documented-examples/trunk/garish-e/resources/collectionConfig.properties
===================================================================
--- /documented-examples/trunk/garish-e/resources/collectionConfig.properties	(revision 36345)
+++ /documented-examples/trunk/garish-e/resources/collectionConfig.properties	(revision 36345)
@@ -0,0 +1,22 @@
+name=Custom stylesheet demo collection
+
+shortDescription=<p>This demonstration collection contains the same material as the original Greenstone demo collection, but its appearance has been altered slightly using a custom stylesheet.</p>
+
+description1=<p>Greenstone 3 uses default stylesheets, which can be overridden for all collections in a site or for any particular collection. This documented example collection covers the last case.</p>
+
+description2=<h3>How the collection works</h3><p>The <b>global</b> format statement contains a link to the collection's custom stylesheet, which is located inside the collection:</p><pre>\
+  &lt;xsl:template name=&quot;additionalHeaderContent&quot;&gt; \n\
+    &lt;xsl:variable name=&quot;httpCollection&quot;&gt; \n\
+      &lt;xsl:value-of select=&quot;/page/pageResponse/collection/metadataList/metadata[@name='httpPath']&quot;/&gt; \n\
+    &lt;/xsl:variable&gt; \n\
+    &lt;link href=&quot;{$httpCollection}/style/style.css&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;/&gt; \n\    
+  &lt;/xsl:template&gt; \n\
+</pre>
+
+description3=<p>Next, a folder named <i>style</i> is created within the collection and a new text file, called <i>style.css</i>, is created within that folder. The css suffix indicates it's a <i>Cascading Style Sheet</i>. CSS files define the look of web pages such as the colours, borders, fonts, heading styles and more. CSS files are just text files, and can thus be edited with any text editor.</p>
+
+description4=<p>The default Greenstone CSS style sheets define certain styles for all collections, that are <i>overridden</i> for the collection by defining CSS rules within its new custom stylesheet. It is by linking the CSS file in the Greenstone collection's <b>global</b> format statement as above, that the general Greenstone CSS styling rules get overridden at the collection level.</p>
+
+description5=<p>You can quickly learn how to write CSS at <a href="https://www.w3schools.com/css/default.asp">W3schools</a> and other online sites.</p>
+
+	
Index: /documented-examples/trunk/garish-e/style/custom-style.css
===================================================================
--- /documented-examples/trunk/garish-e/style/custom-style.css	(revision 36345)
+++ /documented-examples/trunk/garish-e/style/custom-style.css	(revision 36345)
@@ -0,0 +1,92 @@
+/*
+https://www.w3schools.com/cssref/css_colors.asp
+https://www.w3schools.com/colors/colors_picker.asp
+*/
+:root {
+	--cc-btn-primary-bg: LightSteelBlue;	
+}
+
+/* This style sheet is used by the garish collection as an
+  example of modifying the appearance */
+
+/* notes about style sheets.
+
+   Colours - The most portable way to specify colours is to use the
+     #xxxxxx notation, which is in hex for red, green, and blue.  eg black
+     is #000000, red is #ff0000, blue is #0000ff and white is #ffffff.
+     This may seem confusing at first, but you can't count on colour names
+     being the same across all browsers and platforms. For example,
+     linux/x11 has hundreds of colours with names such as DarkOliveGreen
+     and PaleVioletRed. However, simple colour names should work with most
+     browsers...
+
+*/
+   
+
+/* set defaults for the HTML body */
+body {
+ /* set the face. The first one in the list found will be used, so
+    have reasonable fall-backs */
+ /* use a serif font windows uses "times new roman", "times" on mac/linux */
+  font-family: times new roman, times, serif;
+}
+
+ /* you can set a background colour, but a lot of the images/buttons are
+    designed to blend into a white background. */
+/* Note, this didn't seem to work when placed into above body definition */
+body.bgimage {
+  background-color: LightSteelBlue;
+}
+
+
+/* paragraph text - this will override the settings above for text inside
+ <p>....</p> tags. */
+
+p {
+ color: Black;/* DarkSlateGrey */
+ font-weight: normal;
+}
+
+/* headings */
+h1, h2, h3, h4 {
+ /* use a sans-serif font - arial on windows, helvetica on mac/linux */
+ font-family: arial, helvetica, sans-serif;
+ color: SteelBlue;
+}
+
+#titlearea h2, #titlearea h1, #titlearea h3, #titlearea h4 {
+	color: #edf2f7; /* LightCyan #edf2f7 lighter than LightSteelBlue */
+}
+
+#gs_banner {
+	background: SteelBlue;
+}
+
+#topArea, #viewAndZoomOptions {
+	background: SteelBlue;
+}
+
+.ui-state-default, .ui-widget-content .ui-state-default {
+	border: 1px solid SteelBlue;
+	background: SteelBlue;
+}
+
+.ui-button, .ui-widget-header, .ui-widget-header .ui-state-default {
+	background: #a5bcd9; /* #a5bcd9 slightly darker than LightSteelBlue*/
+	color: White; /* #325d81 or #2b506e for darker than SteelBlue*/
+}
+
+/*
+#gs-nav .ui-state-default {
+	background: GoldenRod;
+	color: White;
+}
+*/
+
+.ui-button:hover, .ui-widget-header .ui-state-default:hover {
+	background: LightSkyBlue;	
+}
+
+.ui-state-active a, .ui-state-active a:link {
+	color: #396a93; /* #325d81 or #2b506e for darker than SteelBlue*/
+}
Index: /documented-examples/trunk/garish-e/transform/pages/about.xsl
===================================================================
--- /documented-examples/trunk/garish-e/transform/pages/about.xsl	(revision 36345)
+++ /documented-examples/trunk/garish-e/transform/pages/about.xsl	(revision 36345)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform">	
+	
+	<xsl:template name="coll-description">
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='shortDescription']"/>
+	  
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description1']"/>
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description2']"/>
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description3']"/>
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description4']"/>
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description5']"/>
+	  
+	</xsl:template>
+
+</xsl:stylesheet>  
+
