Index: documented-examples/trunk/authen-e/etc/collectionConfig.xml
===================================================================
--- documented-examples/trunk/authen-e/etc/collectionConfig.xml	(revision 38840)
+++ documented-examples/trunk/authen-e/etc/collectionConfig.xml	(revision 38842)
@@ -1,269 +1,165 @@
 <?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">
-	<security default_access="private" scope="document">
-		<exception>
-			<group name="demo"/>
-		</exception>
-		<exception>
-			<documentSet name="always-public"/>
-			<group name=""/>
-		</exception>
-		<documentSet name="always-public">
-			<match>fb33fe</match>
-			<match>fb34fe</match>
-		</documentSet>
-	</security>
-	<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 assigned="true" dictionary="collectionConfig" key="name" name="name"/>
-		<displayItem assigned="true" lang="en" name="name">Authentication demo</displayItem>
-		<displayItem assigned="true" dictionary="collectionConfig" key="shortDescription" name="shortDescription"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description1" name="description1"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description2" name="description2"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description3" name="description3"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description4" name="description4"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description5" name="description5"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description6" name="description6"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="description7" name="description7"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="textsource" name="textsource"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="textnumpages" name="textnumpages"/>
-		<displayItem assigned="true" dictionary="collectionConfig" key="textdate" name="textdate"/>
-	</displayItemList>
-	<format/>
-	<search type="lucene">
-	  <level name="section">
-	    		<displayItem assigned="true" dictionary="collectionConfig" key="section_chapter" name="name"/>
-		</level>
-		<level name="document">
-		  <displayItem assigned="true" dictionary="collectionConfig" key="document_book" name="name"/>
-		</level>
-		<defaultLevel name="section"/>
-		<index name="dls.Organization">
-			<displayItem dictionary="collectionConfig" key="dls.Organization" name="name"/>
-		</index>
-		<index name="dls.Keyword">
-			<displayItem dictionary="collectionConfig" key="dls.Keyword" name="name"/>
-		</index>
-		<index name="dls.Title,Title">
-			<displayItem dictionary="collectionConfig" key="dls.Titles" name="name"/>
-		</index>
-		<index name="text">
-			<displayItem dictionary="collectionConfig" key="index_text" name="name"/>
-		</index>
-		<index name="dls.Subject">
-			<displayItem dictionary="collectionConfig" key="dls.Subject" name="name"/>
-		</index>
-		<defaultIndex name="text"/>
-		<indexOption name="casefold"/>
-		<indexOption name="stem"/>
-		<searchType name="plain"/>
-		<searchType name="simpleform"/>
-		<searchType name="advancedform"/>
-		<format>
-			<gsf:template match="documentNode">
-				<td valign="top">
-					<gsf:link type="document">
-						<gsf:icon type="document"/>
-					</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"/>
-				<option name="-OIDtype" value="dirname"/>
-			</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">
-					<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">
-					<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">
-				<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"/>
-							<gsf:default>Untitled</gsf:default>
-						</gsf:choose-metadata>
-					</span>
-					<gsf:switch>
-						<gsf:metadata name="Date"/>
-						<gsf:when test="exists">
-							<br/>
-							<small>
-								<i>
-									<gsf:displayItem name="textdate"/>
-									<gsf:metadata name="Date"/>
-								</i>
-							</small>
-						</gsf:when>
-					</gsf:switch>
-					<gsf:switch>
-						<gsf:metadata name="NumPages"/>
-						<gsf:when test="exists">
-							<br/>
-							<small>
-								<i>
-									<gsf:displayItem name="textnumpages"/>
-									<gsf:metadata name="NumPages"/>
-								</i>
-							</small>
-						</gsf:when>
-					</gsf:switch>
-					<gsf:switch>
-						<gsf:metadata name="Source"/>
-						<gsf:when test="exists">
-							<br/>
-							<small>
-								<i>
-									<gsf:displayItem name="textsource"/>
-									<gsf:metadata name="Source"/>
-								</i>
-							</small>
-						</gsf:when>
-					</gsf:switch>
-				</td>
-			</gsf:template>
-			<gsf:template match="classifierNode">
-				<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"/>
-							<gsf:default>Untitled</gsf:default>
-						</gsf:choose-metadata>
-					</span>
-					<gsf:switch>
-						<gsf:metadata name="Date"/>
-						<gsf:when test="exists">
-							<br/>
-							<small>
-								<i>
-									<gsf:displayItem name="textdate"/>
-									<gsf:metadata name="Date"/>
-								</i>
-							</small>
-						</gsf:when>
-					</gsf:switch>
-					<gsf:switch>
-						<gsf:metadata name="NumPages"/>
-						<gsf:when test="exists">
-							<br/>
-							<small>
-								<i>
-									<gsf:displayItem name="textnumpages"/>
-									<gsf:metadata name="NumPages"/>
-								</i>
-							</small>
-						</gsf:when>
-					</gsf:switch>
-					<gsf:switch>
-						<gsf:metadata name="Source"/>
-						<gsf:when test="exists">
-							<br/>
-							<small>
-								<i>
-									<gsf:displayItem name="textsource"/>
-									<gsf:metadata name="Source"/>
-								</i>
-							</small>
-						</gsf:when>
-					</gsf:switch>
-				</td>
-			</gsf:template>
-			<gsf:template match="classifierNode" mode="horizontal">
-				<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"/>
-		</format>
-	</display>
-	<replaceListRef id="gs2-standard"/>
-	<serviceRackList>
-	  <serviceRack name="OAIPMH">
-	    <setName>Authentication demo</setName>
+  <!-- By default, all documents are private-->
+  <security default_access="private" scope="document">
+    <!-- except for users in the demo group -->
+    <exception>
+      <group name="demo"/>
+    </exception>
+    <!-- also, except for documents in the always-public set-->
+    <exception>
+      <documentSet name="always-public"/>
+      <group name=""/>
+    </exception>
+    <!-- define which documents are in the always-public set -->
+    <documentSet name="always-public">
+      <match>fb33fe</match>
+      <match>fb34fe</match>
+    </documentSet>
+  </security>
+  <metadataList>
+    <metadata lang="en" name="creator">greenstone @ waikato.ac.nz</metadata>
+    <metadata lang="en" name="maintainer"/>
+    <metadata lang="en" name="public">true</metadata>
+  </metadataList>
+  <displayItemList>
+    <!-- some text strings for the collection. These are defined in a dictionary file called
+	 collectionConfig.properties -->
+    <displayItem assigned="true" dictionary="collectionConfig" key="name" name="name"/>
+    <displayItem assigned="true" lang="en" name="name">Authentication demo</displayItem>
+    <displayItem assigned="true" dictionary="collectionConfig" key="shortDescription" name="shortDescription"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description1" name="description1"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description2" name="description2"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description3" name="description3"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description4" name="description4"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description5" name="description5"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description6" name="description6"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="description7" name="description7"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="textsource" name="textsource"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="textnumpages" name="textnumpages"/>
+    <displayItem assigned="true" dictionary="collectionConfig" key="textdate" name="textdate"/>
+  </displayItemList>
+  <format>
+    <gsf:template name="display-full-linked-title">
+      <gsf:if-metadata-exists>
+	<gsf:metadata name="Title" select="ancestors"/>
+	<gsf:if><gsf:metadata name="Title" select="ancestors" separator=": "/>: </gsf:if>
+      </gsf:if-metadata-exists>
+      <gsf:link type="document">
+	<gsf:metadata name="Title"/>
+      </gsf:link>
+    </gsf:template>
+  </format>
+  <search type="lucene">
+    <level name="section">
+      <displayItem assigned="true" dictionary="collectionConfig" key="section_chapter" name="name"/>
+    </level>
+    <level name="document">
+      <displayItem assigned="true" dictionary="collectionConfig" key="document_book" name="name"/>
+    </level>
+    <defaultLevel name="section"/>
+    <index name="dls.Organization">
+      <displayItem dictionary="collectionConfig" key="dls.Organization" name="name"/>
+    </index>
+    <index name="dls.Keyword">
+      <displayItem dictionary="collectionConfig" key="dls.Keyword" name="name"/>
+    </index>
+    <index name="dls.Title,Title">
+      <displayItem dictionary="collectionConfig" key="dls.Titles" name="name"/>
+    </index>
+    <index name="text">
+      <displayItem dictionary="collectionConfig" key="index_text" name="name"/>
+    </index>
+    <index name="dls.Subject">
+      <displayItem dictionary="collectionConfig" key="dls.Subject" name="name"/>
+    </index>
+    <defaultIndex name="text"/>
+    <indexOption name="casefold"/>
+    <indexOption name="stem"/>
+    <searchType name="plain"/>
+    <searchType name="simpleform"/>
+    <searchType name="advancedform"/>
+    <format>
+      <gsf:template match="documentNode">
+	<td valign="top">
+	  <gsf:link type="document"><gsf:icon type="document"/></gsf:link>
+	</td>
+	<td>
+	  <xsl:call-template name="display-full-linked-title"/>
+	</td>
+      </gsf:template>
+    </format>
+  </search>
+  <infodb type="gdbm"/>
+  <import>
+    <pluginList>
+      <plugin name="GreenstoneXMLPlugin"/>
+      <plugin name="HTMLPlugin">
+	<option name="-description_tags"/>
+	<option name="-OIDtype" value="dirname"/>
+      </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"/>
+      <!-- custom documentNode format specific to this classifier -->
+      <format>
+	<gsf:template match="documentNode">
+	  <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>
+      </format>
+    </classifier>
+    <format>
+      <gsf:template match="documentNode">
+	<td valign="top">
+	  <gsf:link type="document"><gsf:icon type="document"/></gsf:link>
+	</td>
+	<td valign="top">
+	    <gsf:choose-metadata>
+	      <gsf:metadata name="dls.Title"/>
+	      <gsf:metadata name="Title"/>
+	      <gsf:default>Untitled</gsf:default>
+	    </gsf:choose-metadata>
+	    <br/>
+	    <small><i><gsf:displayItem name="textsource"/><gsf:metadata name="Source"/></i></small>
+	</td>
+      </gsf:template>
+    </format>
+  </browse>
+  <display>
+    <format>
+      <gsf:option name="TOC" value="true"/>
+      <gsf:option name="AllowUserComments" value="false"/>
+    </format>
+  </display>
+  <replaceListRef id="gs2-standard"/>
+  <serviceRackList>
+    <serviceRack name="OAIPMH">
+      <setName>Authentication demo</setName>
       <setDescription>A collection demonstrating document level security.</setDescription>
       <!-- uncomment the following and set the name attribute if you want this
