Index: /documented-examples/trunk/pagedimg-e/etc/collectionConfig.xml
===================================================================
--- /documented-examples/trunk/pagedimg-e/etc/collectionConfig.xml	(revision 36249)
+++ /documented-examples/trunk/pagedimg-e/etc/collectionConfig.xml	(revision 36249)
@@ -0,0 +1,260 @@
+<?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 assigned="true" dictionary="collectionConfig" key="name" name="name"/>
+		<displayItem assigned="true" lang="en" name="name">Paged Image Example</displayItem>
+		<displayItem assigned="true" dictionary="collectionConfig" key="section_text" name="section_text"/>
+		<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"/>
+	</displayItemList>
+	<format/>
+	<search type="mg">
+		<index name="section:text">
+			<displayItem lang="fr" name="name">section_text</displayItem>
+			<displayItem lang="zh" name="name">section_text</displayItem>
+			<displayItem lang="es" name="name">section_text</displayItem>
+			<displayItem lang="en" name="name">section_text</displayItem>
+		</index>
+		<defaultIndex name="section:text"/>
+		<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][icon][/link]
+</td>
+<td valign=top>[parent(Top):Series] {If}{[parent(Top):Volume],Vol. [parent(Top):Volume]} {If}{[parent(Top):Number],No. [parent(Top):Number]} Page [Title]
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top"><gsf:metadata name="Series"/><gsf:switch><gsf:metadata name="Volume"/><gsf:when test="exists">Vol.<gsf:metadata name="Volume"/></gsf:when></gsf:switch><gsf:switch><gsf:metadata name="Number"/><gsf:when test="exists">No.<gsf:metadata name="Number"/></gsf:when></gsf:switch> Page<gsf:metadata name="Title"/></td>
+			</gsf:template>
+		</format>
+	</search>
+	<infodb type="gdbm"/>
+	<import>
+		<pluginList>
+			<plugin name="GreenstoneXMLPlugin"/>
+			<plugin name="PagedImagePlugin">
+				<option name="-process_exp" value="xml.*\.item$"/>
+				<option name="-create_screenview" value="true"/>
+				<option name="-OIDtype" value="assigned"/>
+				<option name="-minimumsize" value="100"/>
+				<option name="-OIDmetadata" value="ItemOID"/>
+				<option name="-documenttype" value="hierarchy"/>
+			</plugin>
+			<plugin name="PagedImagePlugin">
+				<option name="-create_screenview" value="true"/>
+				<option name="-OIDtype" value="assigned"/>
+				<option name="-minimumsize" value="100"/>
+				<option name="-OIDmetadata" value="ItemOID"/>
+				<option name="-documenttype" value="paged"/>
+			</plugin>
+			<plugin name="MetadataXMLPlugin"/>
+			<plugin name="ArchivesInfPlugin"/>
+			<plugin name="DirectoryPlugin"/>
+		</pluginList>
+	</import>
+	<browse>
+		<classifier name="AZCompactList">
+			<option name="-metadata" value="Series"/>
+			<option name="-sort" value="Date"/>
+			<format>
+			<gsf:template match="documentNode">
+				<gsf:format-gs2><![CDATA[
+<td valign=top>[link][icon][/link]
+</td>
+<td valign=top>{If}{[numleafdocs],[Title],{If}{[Volume],Vol. [Volume]} {If}{[Number],No. [Number]} ([format:Date])}
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top"><gsf:switch><gsf:metadata name="Volume"/><gsf:when test="exists">Vol.<gsf:metadata name="Volume"/></gsf:when></gsf:switch><gsf:switch><gsf:metadata name="Number"/><gsf:when test="exists">No.<gsf:metadata name="Number"/></gsf:when></gsf:switch> (<gsf:metadata name="Date"/>)</td>
+			</gsf:template>
+			<gsf:template match="classifierNode">
+				<gsf:format-gs2><![CDATA[
+<td valign=top>[link][icon][/link]
+</td>
+<td valign=top>{If}{[numleafdocs],[Title],{If}{[Volume],Vol. [Volume]} {If}{[Number],No. [Number]} ([format:Date])}
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:metadata name="Title"/>
+				</td>
+			</gsf:template>
+		</format>
+		</classifier>
+		<classifier name="DateList">
+			<format>
+			<gsf:template match="documentNode">
+				<gsf:format-gs2><![CDATA[
+<td valign=top>[link][icon][/link]
+</td>
+<td valign=top>[Series] {If}{[Volume],Vol. [Volume]} {If}{[Number],No. [Number]}
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="document">
+						<gsf:icon type="document"/>
+					</gsf:link>
+				</td>
+				<td valign="top">
+					<gsf:metadata name="Series"/>
+					<gsf:switch>
+						<gsf:metadata name="Volume"/>
+						<gsf:when test="exists">Vol.<gsf:metadata name="Volume"/></gsf:when>
+					</gsf:switch>
+					<gsf:switch>
+						<gsf:metadata name="Number"/>
+						<gsf:when test="exists">No.<gsf:metadata name="Number"/></gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+		</format>
+		</classifier>
+		<format>
+			<gsf:template match="documentNode">
+				<gsf:format-gs2><![CDATA[
+<td valign="top">[link][icon][/link]
+</td>
+<td valign="top">[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]
+</td>
+<td valign="top">[highlight] {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled} [/highlight]{If}{[ex.Source],
+<br>
+<i>([ex.Source])
+</i>}
+</td>]]></gsf:format-gs2>
+				<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">
+					<span class="highlight">
+						<gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata>
+					</span>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="Source"/>)</i>
+						</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">[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]
+</td>
+<td valign="top">[highlight] {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled} [/highlight]{If}{[ex.Source],
+<br>
+<i>([ex.Source])
+</i>}
+</td>]]></gsf:format-gs2>
+				<td valign="top">
+					<gsf:link type="classifier">
+						<gsf:icon type="classifier"/>
+					</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">
+					<span class="highlight">
+						<gsf:choose-metadata><gsf:metadata name="dc.Title"/><gsf:metadata name="exp.Title"/><gsf:metadata name="Title"/>Untitled</gsf:choose-metadata>
+					</span>
+					<gsf:switch>
+						<gsf:metadata name="Source"/>
+						<gsf:when test="exists">
+							<br/>
+							<i>(<gsf:metadata name="Source"/>)</i>
+						</gsf:when>
+					</gsf:switch>
+				</td>
+			</gsf:template>
+			<gsf:template match="classifierNode" mode="horizontal">
+				<gsf:format-gs2><![CDATA[[link][highlight][ex.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></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"/>
+</CollectionConfig>
Index: /documented-examples/trunk/pagedimg-e/resources/collectionConfig.properties
===================================================================
--- /documented-examples/trunk/pagedimg-e/resources/collectionConfig.properties	(revision 36249)
+++ /documented-examples/trunk/pagedimg-e/resources/collectionConfig.properties	(revision 36249)
@@ -0,0 +1,19 @@
+name=Paged Image example
+section_text=newspaper pages
+
+shortDescription=<p>This collection contains a few newspapers from the <a href='http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa'> Niupepa</a> collection of Maori newspapers.</p>
+
+description1=<h3>How the collection works</h3> <p>Each newspaper issue consists of a set of images, one per page, and a set of text files for the OCR'd text. An item file links the set of pages into a single newspaper document. PagedImagePlugin is used to process the item files.</p>
+
+description2=<p>There are two styles of item files, and this collection demonstrates both. The first uses a text based format, and consists of a list of metadata for the document, and a list of pages. Here are some examples: <a href='_httpcollection_/import/09/09\_1\_1.item'>Te Waka o Te Iwi, Vol. 1, No. 1</a>, <a href='_httpcollection_/import/10/10\_1\_3.item'>Te Whetu o Te Tau, Vol. 1, No. 3</a>. This format allows specification of document level metadata, and a single list of pages.</p>
+
+description3=<p>The second style is an extended format, and uses XML. It allows a hierarchy of pages, and metadata specification at the page level as well as at the document level. An example is <a href='_httpcollection_/import/xml/23/23\_\_2.item'>Matariki 1881, No. 2</a>. This newspaper also has an abstract associated with it. The contents have been grouped into two sections: Supplementary Material, which contains the Abstract, and Newspaper Pages, which contains the page images.</p>
+
+description4=<p>Paged documents can be presented with a hierarchical table of contents (e.g. <a href='?a=d&amp;amp;d=23\_\_1.2.1&amp;sa=text'>this one</a>), or with next and previous page arrows, and a goto page box (e.g. <a href='?a=d&amp;amp;d=10\_1\_2&amp;sa=preview'>this one</a>). This is specified by the <tt>-documenttype (hierarchy|paged)</tt> option to PagedImagePlugin. The next and previous arrows suit the linear sequence documents, while the table of contents suits the hierarchically organised document. Ordinarily, a Greenstone collection would have one plugin per document type, and all documents of that type get the same processing. In this case, we want to treat the XML-based item files differently from the text-based item files. We can achieve this by adding two PagedImagePlugin plugins to the collection, and configuring them differently.</p>
+
+description5=<p><tt>plugin PagedImagePlugin -documenttype hierarchy -process_exp xml.*\.item$; <br/> plugin PagedImagePlugin -documenttype paged</tt></p>
+
+description6=<p>XML based newpapers have been grouped into a folder called <tt>xml</tt>. This enables us to process these files differently, by utilising the <tt>process_exp</tt> option which all plugins support. The first PagedImagePlugin in the list looks for item files underneath the xml folder. These documents will be processed as hierarchical documents. Item files that don't match the process expression (i.e. aren't underneath the xml folder) will be passed onto the second PagedImagePlugin, and these are treated as paged documents.</p>
+
+description7=<p><b>Formatting</b> <p>We have modified the document formatting to display fullsized images, preview images or text, with buttons to switch between them. This involves modifications to the DocumentHeading and DocumentText format statements in the <a href='_httpcollection_/etc/collect.cfg' target='collect.cfg'>collection configuration file</a>, and some macro definitions in the <a href='_httpcollection_/macros/extra.dm' target='extra.dm'>extra.dm macro file</a>. The extra.dm macro file provides definitions for the buttons (\_viewfullsize\_, \_viewpreview\_, \_viewtext\_) which are used by the format statement in the collect.cfg file. The format statement switches the document display and sets the buttons to be displayed based on the p argument, which is also set by the format statement.</p>
+
Index: /documented-examples/trunk/pagedimg-e/resources/collectionConfig_es.properties
===================================================================
--- /documented-examples/trunk/pagedimg-e/resources/collectionConfig_es.properties	(revision 36249)
+++ /documented-examples/trunk/pagedimg-e/resources/collectionConfig_es.properties	(revision 36249)
@@ -0,0 +1,18 @@
+name=Ejemplo de imÃ¡genes paginadas
+section_text=pÃ¡ginas de diario
+
+shortDescription=<p>Esta colecciÃ³n contiene algunos diarios de la colecciÃ³n <a href="http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa"> Niupepa</a> de periÃ³dicos Maories.</p>
+
+description1=<h3>CÃ³mo funciona la colecciÃ³n</h3> <p>Cada diario consiste en un conjunto de imÃ¡genes, una por pÃ¡gina, y un conjunto de archivos de texto provenientes del OCR. Un archivo .item relaciona al conjunto de pÃ¡ginas con un Ãºnico diario. PagedImagePlugin se utiliza para procesar esos archivos .item.</p>
+
+description2=<p>Hay dos estilos para escribir esos archivos item. y esta colecciÃ³n demuestra ambos. El primero usa un formato bÃ¡sico de texto, y consiste en una lista de metadatos para el documento, y una lista de pÃ¡ginas. AquÃ­ hay algunos ejemplos: <a href='_httpcollection_/import/09/09\_1\_1.item'>Te Waka o Te Iwi, Vol. 1, No. 1</a>, <a href='_httpcollection_/import/10/10\_1\_3.item'>Te Whetu o Te Tau, Vol. 1, No. 3</a>. Este formato permite la especificaciÃ³n de metadatos a nivel de documento, y una lista simple de pÃ¡ginas.</p>
+
+description3=<p>El segundo estilo es un formato extendido y usa XML. Permite una jerarquÃ­a de pÃ¡ginas, y una especificaciÃ³n de metadatos a nivel de documento como tambiÃ©n de pÃ¡ginas. Un ejemplo es <a href='_httpcollection_/import/xml/23/23\_\_2.item'>Matariki 1881, No. 2</a>. Este diario tambiÃ©n tiene un resumen asociado a Ã©l. Los contenidos han sido agrupados en 2 secciones: Material Suplementario, la cual contiene el resumen, y PÃ¡ginas del Diario, que contiene las imÃ¡genes de las pÃ¡ginas.</p>
+
+description4=<p>Los documentos paginados pueden presentarse con una tabla de contenidos jerÃ¡rquica (por ej. <a href='?a=d&amp;amp;d=23\_\_1.2.1&amp;p=text'>esta</a>), o con flechas de avance o retroceso de pÃ¡ginas, y una opciÃ³n "Ir a" (por ejemplo, <a href='?a=d&amp;amp;d=10\_1\_2&amp;p=preview'>esta</a>). Esto se especifica con la opciÃ³n <tt>-documenttype (hierarchy|paged)</tt> del PagedImagePlugin. Las flechas de avance o retroceso permiten la recorrida secuencial del documento, mientras que la tabla de contenidos recorrer el documento organizado jerÃ¡rquicamente. Normalmente, una colecciÃ³n de Greenstone tendrÃ­a solo un plugin por tipo de documento, y todos los documentos de ese tipo tendrÃ¡n el mismo procesamiento. En este caso, queremos tratar a los archivos .item con formato XML de una manera diferente a los archivos .item con formato plano. Podemos lograr esto agregando 2 plugins PagedImagePlugin a la colecciÃ³n, y configurÃ¡ndolos de manera diferente.</p>
+
+description5=<p><tt>plugin PagedImagePlugin -documenttype hierarchy -process_exp xml.*\.item$; <br/> plugin PagedImagePlugin -documenttype paged</tt></p>
+
+description6=<p>Los Diarios basados en XML fueron agrupados en una carpeta llamada <tt>xml</tt>. Esto permite procesar esos archivos de una forma diferente, utilizando la opciÃ³n <tt>process_exp</tt> que todos los plugin soportan. El primer plugin PagedImagePlugin de la lista busca archivos .item dentro de la carpeta xml. Estos documentos serÃ¡n procesados como documentos jerÃ¡rquicos. Los archivos item que no coincidan con ese criterio (p.e. no estÃ¡n dentro de la carpeta xml) serÃ¡n pasados al segundo PagedImagePlugin, y serÃ¡n tratados como documentos paginados.</p>
+
+description7=<p><b>Formateo</b> <p>Hemos modificado el formateo del documento para mostrar imÃ¡genes a tamaÃ±o completo, previsualizaciÃ³n de la imagen o el texto, con botones para intercambiar entre ellos. esto incluye modificaciones a las cadenas de formateo del DocumentHeading y del DocumentText en el <a href='_httpcollection_/etc/collect.cfg' target='collect.cfg'>archivo de configuraciÃ³n</a>, y algunas definiciones de macros en <a href='_httpcollection_/macros/extra.dm' target='extra.dm'>el archivo extra.dm</a>. El archivo de macros extra.dm provee definiciones para os botones (\_viewfullsize\_, \_viewpreview\_, \_viewtext\_) que son usados por la cadena de formateo en el collect.cfg. Dicha cadena de formateo cambia la visualizaciÃ³n del documento y configura los botones de acuerdo al argumento p, el cual tambiÃ©n es configurado por la cadena de formateo.</p>
Index: /documented-examples/trunk/pagedimg-e/resources/collectionConfig_fr.properties
===================================================================
--- /documented-examples/trunk/pagedimg-e/resources/collectionConfig_fr.properties	(revision 36249)
+++ /documented-examples/trunk/pagedimg-e/resources/collectionConfig_fr.properties	(revision 36249)
@@ -0,0 +1,18 @@
+name=Exemple d'image mise en page
+section_text=pages de journaux
+
+shortDescription=<p>Cette collection contient quelques journaux de la collection de journaux Maori <a href='http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa'>Niupepa</a>.</p>
+
+description1=<h3>Comment fonctionne la collection</h3>  <p>Chaque numÃ©ro de revue est constituÃ© d'une sÃ©rie d'images, une par page, et d'une sÃ©rie de fichiers textuels issus de l'OCR. Un fichier d'exemplaire fait le lien entre la sÃ©rie d'images et le document du numÃ©ro du journal. Le plugiciel PagedImagePlugin est utilisÃ© pour traiter les fichiers d'exemplaire.</p>
+
+description2=<p>Il y a deux styles de fichiers d'exemplaires, et cette collection les utilise tous les deux. Le premier utilise un format textuel, et regroupe une liste de mÃ©tadonnÃ©es et une liste de pages.  En voici quelques exemples : <a href='_httpcollection_/import/09/09\_1\_1.item'>Te Waka o Te Iwi, Vol. 1, No. 1</a>, <a href='_httpcollection_/import/10/10\_1\_3.item'>Te Whetu o Te Tau, Vol. 1, No. 3</a>. Ce format permet de spÃ©cifier des mÃ©tadonnÃ©es de niveau document, et une seule liste de pages.</p>
+
+description3=<p>Le second style est un format Ã©tendu et utilise XML. Il permet de hiÃ©rarchiser les pages, et de spÃ©cifier des mÃ©tadonnÃ©es aussi bien au niveau de la page que du document. En voici un exemple : <a href='_httpcollection_/import/xml/23/23\_\_2.item'>Matariki 1881, No. 2</a>. Ce journal a aussi un rÃ©sumÃ© qui lui est associÃ©. Les contenus ont donc Ã©tÃ© regroupÃ©s en deux sections : matÃ©riaux complÃ©mentaires, qui contient les rÃ©sumÃ©s, et pages du journal, qui contient les images des pages.</p>
+
+description4=<p>Les documents paginÃ©s peuvent Ãªtre prÃ©sentÃ©s avec une table des matiÃšres hiÃ©rarchique (voir par exemple <a href='?a=d&amp;amp;d=23\_\_1.2.1&amp;sa=text'>celle-ci</a>), ou avec des flÃšches de navigation pour atteindre la page prÃ©cÃ©dente ou la page suivante, ainsi qu'une boÃ®te permettant d'atteindre une page en particulier (par exemple <a href='?a=d&amp;amp;d=10\_1\_2&amp;sa=preview'>celle-ci</a>). Cela est dÃ©fini par l'option <tt>-documenttype (hierarchy|paged)</tt> du plugiciel PagedImagePlugin. Les flÃšches de navigation suivent l'organisation linÃ©aire des documents, tandis que la table des matiÃšres respecte l'organisation hiÃ©rarchique des documents. Normalement, une collection Greenstone utilise un seul plugiciel par type de document, et tous les documents de ce type subissent le mÃªme traitement. Dans ce cas, nous voulons traiter diffÃ©remment les fichiers d'exemplaires au format XML et les ficiers d'exemplaires au format texte. Nous pouvons arriver Ã  ce rÃ©sultat en ajoutant deux plugiciels PagedImagePlugin Ã  la collection, et en les configurant diffÃ©remment de la faÃ§on suivante :</p>
+
+description5=<p><tt>plugin PagedImagePlugin -documenttype hierarchy -process_exp xml.*\.item$; <br/> plugin PagedImagePlugin -documenttype paged</tt></p>
+
+description6=<p>Les journaux dÃ©crits en XML ont Ã©tÃ© regroupÃ©s dans un dossier appelÃ© <tt>xml</tt>. Cela nous permet de traiter ces fichiers diffÃ©remment, en utilisant l'option <tt>process_exp</tt> dont disposent tous les plugiciels. Le premier plugiciel PagedImagePlugin de la liste recherche les fichiers d'exemplaires Ã  l'intÃ©rieur du dossier xml. Ces documents seront alors traitÃ©s comme des documents hiÃ©rarchisÃ©s. Les fichiers d'exemplaires qui ne correspondent pas Ã  l'expression de recherche (c'est Ã  dire qui ne sont pas situÃ©s dans le dossier xml) seront traitÃ©s par le second plugiciel PagedImagePlugin, comme des documents paginÃ©s.</p>
+
+description7=<p><b>Formatage</b> <p>Nous avons modifiÃ© le formatage du document pour afficher les images en haute rÃ©solution, prÃ©visualiser les images ou le texte, avec un bouton pour passer d'un mode Ã  l'autre. Cela implique des modifications dans les dÃ©clarations des formats DocumentHeading et DocumentText, dans le <a href='_httpcollection_/etc/collect.cfg' target='collect.cfg'>fichier de configuration de la collection</a>, et la dÃ©finition de certaines macros dans le <a href='_httpcollection_/macros/extra.dm' target='extra.dm'>fichier de macro extra.dm</a>. Le fichier de macro extra.dm dÃ©finit les boutons (\_viewfullsize\_, \_viewpreview\_, \_viewtext\_) qui sont utilisÃ©s par la dÃ©claration de format dans le fichier collect.cfg. La dÃ©claration de format change l'affichage du document et dÃ©finit les boutons affichÃ©s en se basant sur l'argument p, qui est aussi dÃ©fini dans la dÃ©claration du format.</p>
Index: /documented-examples/trunk/pagedimg-e/resources/collectionConfig_zh.properties
===================================================================
--- /documented-examples/trunk/pagedimg-e/resources/collectionConfig_zh.properties	(revision 36249)
+++ /documented-examples/trunk/pagedimg-e/resources/collectionConfig_zh.properties	(revision 36249)
@@ -0,0 +1,44 @@
+name=åé¡µåŸçç€ºèéŠè
+section_text=æ¥çºžé¡µé¢
+
+shortDescription=<p>æ¬éŠèå
+å«è¥å¹²æºèª <a href='http://www.nzdl.org/cgi-bin/library?a=p&amp;p=about&amp;c=niupepa'>Niupepa</a>éŠèçæ¯å©æ¥çºžã</p>
+
+description1=<h3>æ¬éŠèåŠäœå·¥äœ</h3>  <p>æ¯ææ¥çºžç±äžç»åŸçç»æïŒæ¯é¡µå¯¹åºäžåŒ åŸçïŒä»¥åäžç»å
+å«OCRææ¬çææ¬æä»¶ã ç±äžäžªitemæä»¶å°äžç»é¡µé¢éŸæ¥èµ·æ¥ïŒåœ¢æäžäžªæ¥çºžææ¡£ãPagedImagePluginçšäºå€çè¿äºitemæä»¶ã</p>
+
+description2=<p>itemæä»¶æäž€ç§æ ŒåŒïŒèæ¬éŠèå°æŒç€ºè¿äž€ç§æ ŒåŒãç¬¬äžç§æ¯åºäºææ¬çæ ŒåŒïŒç±äžäžªææ¡£å
+æ°æ®åè¡šå äžäžªé¡µé¢åè¡šç»æ. æ¯åŠïŒ <a href='_httpcollection_/import/09/09\_1\_1.item'>Te Waka o Te IwiïŒç¬¬1å·ïŒç¬¬1æ</a>ïŒ <a href='_httpcollection_/import/10/10\_1\_3.item'>Te Whetu o Te TauïŒç¬¬1å·ïŒç¬¬3æ</a>ã è¿ç§æ ŒåŒå
+è®žè®Ÿçœ®ææ¡£çº§çå
+æ°æ®ïŒä»¥åäžäžªé¡µé¢åè¡šã</p>
+
+description3=<p>ç¬¬äºç§æ ŒåŒæ¯äžç§äœ¿çšXMLçæ©å±æ ŒåŒãè¿ç§æ ŒåŒå
+è®žè®Ÿçœ®å±çº§åŒé¡µé¢åè¡šïŒå¹¶äžå
+æ°æ®å¯ä»¥æ¯é¡µé¢çº§çä¹å¯ä»¥æ¯ææ¡£çº§çã æ¯åŠ<a href='_httpcollection_/import/xml/23/23\_\_2.item'>Matariki 1881ïŒç¬¬2æ</a>ãè¿ææ¥çºžè¿æéå±çææã è¿ææ¥çºžçå
+å®¹è¢«åäžºäž€äžªéšåïŒå
+æ¬ææåšå
+çè¡¥å
+
+ææïŒä»¥åæ¥çºžçé¡µé¢ïŒå³é¡µé¢åŸçã</p>
+
+description4=<p>åé¡µææ¡£å¯ä»¥çšäžäžªå±çº§åŒçå
+å®¹å€§çº²æŸç€ºïŒäŸåŠ<a href='?a=d&amp;amp;d=23\_\_1.2.1&amp;sa=text'>è¿äžªææ¡£</a>ïŒ ïŒæè
+çšäžäžé¡µååäžé¡µçé¡µé¢ç®­å€Žä»¥åäžäžªè·³èœ¬é¡µé¢èŸå
+¥æ¡æ¥æŸç€º ïŒæ¯åŠ<a href='?a=d&amp;amp;d=10\_1\_2&amp;sa=preview'>è¿äžªææ¡£</a>ïŒã è¿æ¯éè¿è®Ÿå®PagedImagePluginç<tt>-documenttype (hierarchy|paged)</tt>éé¡¹æ¥å®ç°çã äžäžé¡µååäžé¡µç®­å€Žéçšäºçº¿æ§åºåçææ¡£ïŒèå
+å®¹å€§çº²éçšäºå±çº§åŒçææ¡£ãäžè¬æ
+åµäžïŒäžäžªGreenstoneéŠèçšäžäžªæä»¶å€çäžç§ç±»åçææ¡£ïŒ å æ­€ææåç±»åçææ¡£éœå°ä»¥åäžç§æ¹åŒè¿è¡å€çãåšè¿ç§æ
+åµäžïŒæä»¬æ³çšäžåçæ¹åŒåå«å€çåºäºXMLçitemæä»¶äžåºäºææ¬çitemæä»¶ã è¿å¯ä»¥éè¿åšéŠèäž­æ·»å äž€äžªPagedImagePluginæä»¶æ¥å®æïŒå¹¶å¯¹å
+¶åå«è¿è¡äžåçè®Ÿçœ®ã</p>
+
+description5=<p> <tt>plugin PagedImagePlugin -documenttype hierarchy -process_exp xml.*\.item$; <br/> plugin PagedImagePlugin -documenttype paged</tt></p>
+
+description6=<p>åºäºXMLçæ¥çºžè¢«éäž­çœ®äºäžäžªç§°äžº<tt>xml</tt>çæä»¶å€¹äž­ãè¿å
+è®žæä»¬çšäžåæ¹åŒå¯¹è¿äºæä»¶è¿è¡å€çïŒ è¿æ¯éè¿è®Ÿçœ®æææä»¶éœæ¯æç<tt>process_exp</tt>éé¡¹æ¥å®ç°çãåè¡šäž­çç¬¬äžäžªPagedImagePluginå°æ¥æŸxmlæä»¶å€¹äžçææitemæä»¶ã è¿äºææ¡£å°äŒæå±çº§åŒææ¡£è¿è¡å€çãäžå¹é
+å€çè¡šèŸŸåŒçitemæä»¶ïŒå³äžåšxmlæä»¶å€¹äž­çitemæä»¶ïŒå°è¢«äŒ éç»ç¬¬äºäžªPagedImagePluginïŒèè¿äºå°äŒæåé¡µææ¡£è¿è¡å€çã</p>
+
+description7=<p><b>æ ŒåŒå</b> <p>æä»¬å·²ç»ä¿®æ¹äºææ¡£çæ ŒåŒäœ¿å
+¶æŸç€ºå
+šå¹
+çåŸçïŒé¢è§åŸçæè
+ææ¬ïŒä»¥ååšäžåæš¡åŒä¹éŽè¿è¡èœ¬æ¢çæé®ã è¿æ¶åå°åšéŠèç<a href='_httpcollection_/etc/collect.cfg' target='collect.cfg'>é
+çœ®æä»¶</a>äž­ä¿®æ¹ DocumentHeadingåDocumentTextæ ŒåŒåéïŒä»¥å<a href='_httpcollection_/macros/extra.dm' target='extra.dm'> extra.dmå®æä»¶</a>äž­çäžäºå®ã  extra.dmå®æä»¶æäŸæé®ïŒ\_viewfullsize\_ïŒ\_viewpreview\_ïŒ\_viewtext\_ïŒçå®ä¹ïŒè¿äºå®ä¹åšcollect.cfgæä»¶çæ ŒåŒåéäž­çšå°ã æ ŒåŒåéæ ¹æ®påæ°çåŒèœ¬æ¢å°äžåçææ¡£æŸç€ºæš¡åŒä»¥åå¯¹åºçæé®ïŒèpåæ°ä¹æ¯ç±æ ŒåŒåæ°æè®Ÿå®çã</p>
Index: /documented-examples/trunk/pagedimg-e/transform/pages/about.xsl
===================================================================
--- /documented-examples/trunk/pagedimg-e/transform/pages/about.xsl	(revision 36249)
+++ /documented-examples/trunk/pagedimg-e/transform/pages/about.xsl	(revision 36249)
@@ -0,0 +1,18 @@
+<?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:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description6']"/>
+	  <xsl:value-of disable-output-escaping="yes" select="/page/pageResponse/collection/displayItemList/displayItem[@name='description7']"/>
+	</xsl:template>
+
+</xsl:stylesheet>  
+
