Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/FILELEVEL-DOCVER-TEST-ALL.sh
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/FILELEVEL-DOCVER-TEST-ALL.sh	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/FILELEVEL-DOCVER-TEST-ALL.sh	(revision 37212)
@@ -0,0 +1,66 @@
+#!/bin/bash
+
+echo ""
+echo "****"
+echo "Setting text to be 2 paras of lorem ipsun"
+echo "****"
+echo ""
+
+/bin/cp sample-text-2paras.txt  import/sample-text.txt
+
+
+echo ""
+echo "****"
+echo "Full Rebuild"
+echo "****"
+echo ""
+
+#import.pl -removeold -OIDtype hash -site test-suite filelevel-docver-simpletext \
+#    && full-buildcol.pl -site test-suite filelevel-docver-simpletext
+
+full-import.pl -site test-suite filelevel-docver-simpletext \
+    && full-buildcol.pl -site test-suite filelevel-docver-simpletext
+
+echo ""
+echo "****"
+echo "Updating text to be 3 paras of lorem ipsun"
+echo "****"
+echo ""
+
+/bin/cp sample-text-3paras.txt  import/sample-text.txt
+
+echo ""
+echo "****"
+echo "Incremental Rebuild"
+echo "****"
+echo ""
+
+
+#import.pl -incremental -keepold -OIDtype hash -site test-suite filelevel-docver-simpletext \
+#    && incremental-buildcol.pl -site test-suite filelevel-docver-simpletext
+
+
+incremental-import.pl -site test-suite filelevel-docver-simpletext \
+    && incremental-buildcol.pl -site test-suite filelevel-docver-simpletext
+
+#incremental-rebuild.pl -OIDtype hash  -site test-suite filelevel-docver-simpletext
+
+
+echo ""
+echo ""
+echo "##############################################################################"
+echo "##############################################################################"
+echo "##############################################################################"
+
+
+echo ""
+echo "File-level Doc-Version History doc.xml nminus-1 with 2 paragraphs"
+echo "--------"
+cat archives/HASH06c6.dir/_fldv_history/nminus-1/doc.xml
+echo "--------"
+
+echo ""
+echo "Top level doc.xml 3 paragraphs"
+echo "--------"
+cat archives/HASH06c6.dir/doc.xml
+echo "--------"
Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/RECONFIGURE.sh
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/RECONFIGURE.sh	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/RECONFIGURE.sh	(revision 37212)
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+source ../_local_collect_config.bash
+
+wget -O - "${gs_library_url}?a=s&sa=c&sc=$col" >/dev/null
Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/etc/collectionConfig.xml
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/etc/collectionConfig.xml	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/etc/collectionConfig.xml	(revision 37212)
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gslib="http://www.greenstone.org/skinning">
+	<metadataList>
+		<metadata name="creator"></metadata>
+		<metadata name="maintainer"></metadata>
+		<metadata name="public">true</metadata>
+	</metadataList>
+	<displayItemList>
+		<displayItem assigned="true" lang="en" name="name">filelevel-docver-simpletext</displayItem>
+		<displayItem assigned="true" lang="en" name="description"></displayItem>
+                <!-- shortDescription is used as a tooltip for collection icon on home page-->
+                <displayItem assigned="true" lang="en" name="shortDescription">filelevel-docver-simpletext</displayItem>
+	</displayItemList>
+	<!-- Global format statement -->
+	<format>
+	  <gsf:template name="choose-title">
+	    <gsf:choose-metadata>
+	      <gsf:metadata name="dc.Title"/>
+	      <gsf:metadata name="exp.Title"/>
+	      <gsf:metadata name="ex.dc.Title"/>
+	      <gsf:metadata name="Title"/>
+	      <gsf:default>Untitled</gsf:default>
+	    </gsf:choose-metadata>
+	  </gsf:template>
+	  <!-- modify the collection description template to output the "this collection contains X documents and was last built Y days ago" message -->
+	  <xsl:template name="coll-description">
+	    <p><gslib:collectionDescriptionTextAndServicesLinks/></p>
+	    <xsl:variable name="raw_date"><gslib:collectionMeta name="buildDate"/></xsl:variable>
+	    <xsl:variable name="formatted_date"><xsl:value-of select="util:formatTimeStamp($raw_date, 0, 3, /page/@lang)"/></xsl:variable>
+	    <xsl:variable name="numdocs"><gslib:collectionMeta name="numDocs"/></xsl:variable>
+	    <p><xsl:value-of select="util:getInterfaceText($interface_name, /page/@lang, 'about.standarddescriptiondays', concat($numdocs, ';', $formatted_date))"/></p>
+	  </xsl:template>	
+	</format>
+	<search type="lucene">
+		<level name="document">
+			<displayItem lang="en" name="name">document</displayItem>
+		</level>
+		<level name="section">
+			<displayItem lang="en" name="name">section</displayItem>
+		</level>
+		<defaultLevel name="document"/>
+		<index name="text">
+			<displayItem lang="en" name="name">text</displayItem>
+		</index>
+		<index name="dc.Title,ex.dc.Title,Title">
+			<displayItem lang="en" name="name">titles</displayItem>
+		</index>
+		<index name="Source">
+			<displayItem lang="en" name="name">filenames</displayItem>
+		</index>
+		<defaultIndex name="text"/>
+		<sort name="rank">
+		  <displayItem lang="en" name="name">rank</displayItem>
+                </sort>
+                <sort name="none">
+		  <displayItem lang="en" name="name">natural (build) order</displayItem>
+		</sort>
+		<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:link type="document">
+						<xsl:call-template name="choose-title"/>
+					</gsf:link>
+				</td>
+			</gsf:template>
+		</format>
+	</search>
+
+	<infodb type="jdbm"/>
+
+	<import>
+		<pluginList>
+			<plugin name="ZIPPlugin"/>
+			<plugin name="GreenstoneXMLPlugin"/>
+			<plugin name="TextPlugin"/>
+			<plugin name="HTMLPlugin"/>
+			<plugin name="EmailPlugin"/>
+			<plugin name="PDFv2Plugin"/>
+			<!-- Configuring an UnknownConverterPlugin for docx processing with Tika -->
+			<plugin name="UnknownConverterPlugin">
+			  <option name="-exec_cmd" value="java -jar %%GSDLHOME/ext/tika/tika-app.jar --html --pretty-print --encoding=UTF-8 %%INPUT_FILE &gt; %%OUTPUT"/>
+			  <option name="-convert_to" value="html"/>
+			  <option name="-mime_type" value="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
+			  <option name="-srcicon" value="icondocx"/>
+			  <option name="-process_extension" value="docx"/>
+			</plugin>
+			<!-- If you have Tesseract installed (for linux 64 bit machines, there's a tesseract tarball available
+			     for download from http://trac.greenstone.org/browser/gs2-extensions/tesseract/trunk/tesseract-linux-x64.tar.gz
+			     Untested: for windows, you can try installing Tesseract from Win binaries at https://github.com/UB-Mannheim/tesseract/wiki
+			     For Windows and Mac, be sure to add tesseract's bin folder to your PATH and also set the TESSDATA_PREFIX environment variable to
+			     the folder "tessdata" wherein you also need to have the "<3-letter-langcode>.traineddata" files for the languages you want
+			     to OCR.) The Linux 64 bit tesseract extension tarball already does all this for you.
+			     Once you have Tesseract installed, you can activate the following UnknownConverterPlugin to use Tika with Tesseract to OCR PDFs
+			     that contain images by removing the XML comment symbols.
+			-->
+			<!--
+			<plugin name="UnknownConverterPlugin">
+				<option name="-exec_cmd" value="java -jar $GSDLHOME/ext/tika/tika-app-*.jar &#45;&#45;config=$GSDLHOME/ext/tika/ocr-pdfs-config.xml &#45;&#45;html %%INPUT_FILE > %%OUTPUT"/>
+				<option name="-convert_to" value="html"/>
+				<option name="-mime_type" value="application/pdf"/>
+				<option name="-srcicon" value="iconpdf"/>
+				<option name="-process_extension" value="pdf"/>
+			</plugin>
+			-->
+			<plugin name="RTFPlugin"/>
+			<plugin name="WordPlugin"/>
+			<plugin name="PostScriptPlugin"/>
+			<plugin name="PowerPointPlugin"/>
+			<plugin name="ExcelPlugin"/>
+			<plugin name="ImagePlugin"/>
+			<plugin name="ISISPlugin"/>
+			<plugin name="NulPlugin"/>
+			<plugin name="OAIPlugin"/>
+			<plugin name="MetadataXMLPlugin"/>
+			<plugin name="ArchivesInfPlugin"/>
+			<plugin name="DirectoryPlugin"/>
+		</pluginList>
+	</import>
+	<browse>
+		<classifier name="List">
+			<option name="-metadata" value="dc.Title,Title"/>
+			<option name="-partition_type_within_level" value="approximate_size"/>
+			<option name="-numeric_partition_type_within_level" value="approximate_size"/>
+			<!-- only use one dc.Title/Title value. change to allvalues to use all of them.-->
+			<option name="-metadata_selection_mode_within_level" value="firstvalue"/>
+			<!--
+				If you are classifying by multiple title values for each document, then 
+				(1) edit above line to: <option name="-metadata_selection_mode_within_level" value="allvalues"/>
+				(2) create a custom <format> statement immediately below this <option> element,
+				and copy the existing browse <format>'s <gsf:template match="documentNode"> into it
+				(3) then change its choose-title line (<xsl:call-template name="choose-title"/>)
+				to the following (note pos=classifiedBy) preceded by the XML comment:
+				Instead of using choose-title here, we want to display the title that the document was classified on
+				<gsf:metadata name="dc.Title,Title" pos="classifiedBy"/>
+			-->
+			<!--<format>
+			  <gsf:template match="documentNode">
+			    <td valign="top">
+			      <gsf:link type="document">
+				<gsf:icon type="document"/>
+			      </gsf:link>
+			    </td>
+			    <td valign="top">
+			      <gsf:link type="source">
+				<gsf:choose-metadata>
+				  <gsf:metadata name="thumbicon"/>
+				  <gsf:metadata name="srcicon"/>
+				</gsf:choose-metadata>
+			      </gsf:link>
+			    </td>
+			    <td valign="top">
+			      <gsf:link type="document">
+				Instead of using choose-title here, we want to display the title that the document was classified on
+				<gsf:metadata name="dc.Title,Title" pos="classifiedBy"/>
+				<gsf:switch>
+				  <gsf:metadata name="Source"/>
+				  <gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
+				</gsf:switch>
+			      </gsf:link>
+			    </td>
+			  </gsf:template>
+			</format>
+			-->
+		</classifier>
+		<classifier name="List">
+			<option name="-metadata" value="Source"/>
+			<option name="-partition_type_within_level" value="approximate_size"/>
+			<option name="-numeric_partition_type_within_level" value="approximate_size"/>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="source">
+						<gsf:choose-metadata>
+							<gsf:metadata name="thumbicon"/>
+							<gsf:metadata name="srcicon"/>
+						</gsf:choose-metadata>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:link type="document">
+						<!-- Defined in the global format statement -->
+						<xsl:call-template name="choose-title"/>
+						<gsf:switch>
+							<gsf:metadata name="Source"/>
+							<gsf:when test="exists"><br/><i>(<gsf:metadata name="Source"/>)</i></gsf:when>
+						</gsf:switch>
+					</gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'VList']">
+				<td valign="top">
+					<gsf:link type="classifier" style="static">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+				  <gsf:link type="classifier">
+	                            <gsf:metadata name="Title"/>
+				  </gsf:link>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode[@classifierStyle = 'HList']">
+				<gsf:link type="classifier" style="static">
+					<gsf:metadata name="Title"/>
+				</gsf:link>
+			</gsf:template>
+		</format>
+	</browse>
+	<display>
+		<format>
+			<gsf:option name="TOC" value="true"/>
+			<gsf:option name="allowUserComments" value="true"/>
+			<gsf:option name="allowDocumentEditing" value="true"/>
+			<gsf:option name="allowMapGPSEditing" value="true"/>
+			<!-- 
+				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"/>
+	<replaceListRef id="gs2-image" />
+	<serviceRackList>
+		<!-- comment out the following serviceRack if you want to disable RSS for this collection -->	  
+	        <serviceRack name="RSSRetrieve"/>
+		<!-- comment out the following serviceRack if you want to disable OAI for this collection -->
+		<serviceRack name="OAIPMH">
+		  <setName>filelevel-docver-simpletext</setName>
+		  <setDescription></setDescription>
+		  <!-- uncomment the following and set the name attribute if 
+		       you want this collection to be part of a super set. -->
+		  <!--<oaiSuperSet name="xxx"/>-->		  
+			<ListMetadataFormats>
+			  <!--What metadata sets to support for this collection. You can select any set that is specified in OAIConfig.xml. To use a new set, you need to add a set definition in OAIConfig.xml, then reference it here, like:
+				   <metadataFormat metadataPrefix="prefix"/> -->
+			  
+			  <metadataFormat metadataPrefix="oai_dc">
+			    <!-- you can customize the mappings by adding elements in here. See resources/oai/OAIConfig.xml for the format-->
+			  </metadataFormat>
+			</ListMetadataFormats>
+		</serviceRack> 
+	</serviceRackList>
+</CollectionConfig>
Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/import/metadata.xml
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/import/metadata.xml	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/import/metadata.xml	(revision 37212)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<DirectoryMetadata>
+	<FileSet>
+		<FileName>sample-text.txt</FileName>
+		<Description>
+		   <Metadata mode="accumulate" name="username">admin</Metadata>
+		  <Metadata mode="accumulate" name="usertimestamp">1674967220362</Metadata>
+    <Metadata mode="accumulate" name="usercomment">My first comment</Metadata>
+  </Description>
+	</FileSet>
+</DirectoryMetadata>
Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/import/sample-text.txt
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/import/sample-text.txt	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/import/sample-text.txt	(revision 37212)
@@ -0,0 +1,11 @@
+Lorem ipsum dolor sit amet. Ab impedit odit 33 eaque nostrum nam vero
+ipsam ut praesentium aspernatur in magnam voluptas sed eius aliquam
+eum quidem rerum. Qui sint vero quo quas soluta eos suscipit iste ut
+minus neque est omnis distinctio!
+
+Qui aliquam sequi et recusandae quibusdam ea modi minus qui galisum
+repudiandae. Est consequatur dolores qui eligendi magni ut inventore
+possimus. Aut velit repellat ea alias corporis 33 consequatur fugiat
+sed necessitatibus maxime ea rerum ratione. Et quibusdam consectetur
+et voluptatem voluptatum quo adipisci natus qui repellendus officiis
+aut galisum quia quo fugiat sint?
Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/sample-text-2paras.txt
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/sample-text-2paras.txt	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/sample-text-2paras.txt	(revision 37212)
@@ -0,0 +1,11 @@
+Lorem ipsum dolor sit amet. Ab impedit odit 33 eaque nostrum nam vero
+ipsam ut praesentium aspernatur in magnam voluptas sed eius aliquam
+eum quidem rerum. Qui sint vero quo quas soluta eos suscipit iste ut
+minus neque est omnis distinctio!
+
+Qui aliquam sequi et recusandae quibusdam ea modi minus qui galisum
+repudiandae. Est consequatur dolores qui eligendi magni ut inventore
+possimus. Aut velit repellat ea alias corporis 33 consequatur fugiat
+sed necessitatibus maxime ea rerum ratione. Et quibusdam consectetur
+et voluptatem voluptatum quo adipisci natus qui repellendus officiis
+aut galisum quia quo fugiat sint?
Index: /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/sample-text-3paras.txt
===================================================================
--- /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/sample-text-3paras.txt	(revision 37212)
+++ /gs3-installations/test-suite/trunk/sites/test-suite/collect/filelevel-docver--simpletext/sample-text-3paras.txt	(revision 37212)
@@ -0,0 +1,18 @@
+Lorem ipsum dolor sit amet. Ab impedit odit 33 eaque nostrum nam vero
+ipsam ut praesentium aspernatur in magnam voluptas sed eius aliquam
+eum quidem rerum. Qui sint vero quo quas soluta eos suscipit iste ut
+minus neque est omnis distinctio!
+
+Qui aliquam sequi et recusandae quibusdam ea modi minus qui galisum
+repudiandae. Est consequatur dolores qui eligendi magni ut inventore
+possimus. Aut velit repellat ea alias corporis 33 consequatur fugiat
+sed necessitatibus maxime ea rerum ratione. Et quibusdam consectetur
+et voluptatem voluptatum quo adipisci natus qui repellendus officiis
+aut galisum quia quo fugiat sint?
+
+Non labore esse qui voluptatum nesciunt sit praesentium distinctio eum
+placeat galisum qui necessitatibus cumque in harum voluptates. Ut
+cupiditate architecto sed cumque similique ut perferendis velit. Ex
+nulla doloribus ut architecto voluptate qui aliquam asperiores. Id
+aspernatur alias sit ipsum natus ea sint fuga quo voluptas cupiditate
+aut dolor molestias At nihil maxime et alias dolorum.
