root/main/trunk/model-cols/niupepa/etc/collectionConfig.xml @ 26283

Revision 26283, 12.9 KB (checked in by sjm84, 8 years ago)

Added a style to make the sectionHeaders less bulky

Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<CollectionConfig xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3    <metadataList>
4        <metadata lang="en" name="creator"/>
5        <metadata lang="en" name="maintainer"/>
6        <metadata lang="en" name="public">true</metadata>
7    </metadataList>
8    <displayItemList>
9        <displayItem assigned="true" lang="en" name="description">A sample of niupepa papers</displayItem>
10        <displayItem assigned="true" lang="en" name="name">niupepa: māori newspapers</displayItem>
11    </displayItemList>
12    <format>
13            <gsf:template name="choose-icon">
14                <gsf:switch>
15                    <gsf:metadata name="DocType"/>
16                    <gsf:when test="equals" test-value="Commentary">
17                        <gsf:icon file="icomm.gif" select="collection"/>
18                    </gsf:when>
19                    <gsf:when test="equals" test-value="Abstract">
20                        <gsf:icon file="iabstr.gif" select="collection"/>
21                    </gsf:when>
22                    <gsf:when test="equals" test-value="Niupepa">
23                        <gsf:icon file="np.gif" select="collection"/>
24                    </gsf:when>
25                    <gsf:otherwise>
26                        <gsf:icon type="document"/>
27                    </gsf:otherwise>
28                </gsf:switch>
29            </gsf:template>
30    <gsf:template name="title-plain">
31      <gsf:choose-metadata>
32    <gsf:metadata name="Series" select="root"/>
33    <gsf:metadata name="Series"/>
34      </gsf:choose-metadata>
35      <xsl:text>: </xsl:text>
36      <gsf:switch>
37    <gsf:metadata name="Title" select="ancestors"/>
38    <gsf:when test="exists">
39      <gsf:metadata name="Title" select="ancestors"/><xsl:text>: </xsl:text>
40    </gsf:when>
41      </gsf:switch>
42    <gsf:metadata name="Title"/>
43    </gsf:template>
44        </format>
45    <search type="mgpp">
46        <level name="section">
47            <displayItem lang="en" name="name">section</displayItem>
48        </level>
49        <defaultLevel name="section"/>
50        <index name="text">
51            <displayItem lang="en" name="name">text</displayItem>
52        </index>
53        <defaultIndex name="text"/>
54        <indexOption>
55            <option name="accentfold"/>
56            <option name="casefold"/>
57            <option name="stem"/>
58        </indexOption>
59        <indexSubcollection name="abstract,commentary,niupepa">
60      <displayItem lang="en" name="name">papers, commentaries and abstracts</displayItem>
61      <displayItem lang="mi" name="name">ngā niupepa, kupu whakataki, me ngā rāpopoto</displayItem>
62    </indexSubcollection>
63        <indexSubcollection name="niupepa">
64      <displayItem lang="en" name="name">newspapers</displayItem>
65      <displayItem lang="mi" name="name">ngā niupepa anake</displayItem>
66      </indexSubcollection>
67        <indexSubcollection name="commentary">
68      <displayItem lang="en" name="name">bibliographic commentaries</displayItem>
69      <displayItem lang="mi" name="name">ngā kupu whakataki anake</displayItem>0
70    </indexSubcollection>
71        <indexSubcollection name="abstract">
72      <displayItem lang="en" name="name">english abstracts</displayItem>
73      <displayItem lang="mi" name="name">ngā rāpopoto reo Pākehā anake</displayItem>
74      </indexSubcollection>
75        <subcollection filter="DocType/Commentary/" name="commentary"/>
76        <subcollection filter="DocType/Abstract/" name="abstract"/>
77        <subcollection filter="DocType/Niupepa/" name="niupepa"/>
78        <searchType name="plain"/>
79        <format>
80    <gsf:template name="title-with-link">
81      <gsf:choose-metadata>
82    <gsf:metadata name="Series" select="root"/>
83    <gsf:metadata name="Series"/>
84      </gsf:choose-metadata>
85      <xsl:text>: </xsl:text>
86      <gsf:switch>
87    <gsf:metadata name="Title" select="ancestors"/>
88    <gsf:when test="exists">
89      <gsf:metadata name="Title" select="ancestors"/><xsl:text>: </xsl:text>
90    </gsf:when>
91      </gsf:switch>
92      <gsf:link type="document">
93    <gsf:metadata name="Title"/>
94      </gsf:link>
95    </gsf:template>
96
97            <gsf:template match="documentNode">
98                <td valign="top">
99                    <gsf:link type="document">
100                        <xsl:call-template name="choose-icon"/>
101                    </gsf:link>
102                </td>
103                <td>
104                                <xsl:call-template name="title-with-link"/>
105                </td>
106            </gsf:template>
107        </format>
108    </search>
109    <infodb type="gdbm"/>
110    <import>
111        <pluginList>
112            <plugin name="ZIPPlugin"/>
113            <plugin name="GreenstoneXMLPlugin"/>
114            <plugin name="CommentaryPlugin"/>
115            <plugin name="NiupepaPlugin">
116                <option name="-enable_cache"/>
117                <option name="-OIDtype" value="filename"/>
118                <option name="-process_exp" value="\.item$"/>
119                <option name="-create_thumbnail" value="true"/>
120                <option name="-create_screenview" value="true"/>
121            </plugin>
122            <plugin name="AbstractPlugin"/>
123            <plugin name="MetadataXMLPlugin"/>
124            <plugin name="ArchivesInfPlugin"/>
125            <plugin name="DirectoryPlugin"/>
126        </pluginList>
127    </import>
128    <browse>
129        <classifier name="List">
130            <option name="-metadata" value="Series"/>
131            <option name="-sort_leaf_nodes_using" value="ex.Date"/>
132            <option name="-bookshelf_type" value="always"/>
133            <option name="-partition_type_within_level" value="none"/>
134      <option name="-filter_metadata" value="DocType"/>
135      <option name="-filter_regex" value="(?i)(niupepa|commentary)"/>
136            <format>
137            <gsf:template match="documentNode">
138                <td valign="top">
139                    <gsf:switch>
140                        <gsf:metadata name="abstract"/>
141                        <gsf:when test="exists">
142                            <gsf:link OIDmetadata="abstract" type="document">
143                                <gsf:icon file="iabstr.gif" select="collection"/>
144                            </gsf:link>
145                        </gsf:when>
146                    </gsf:switch>
147                </td>
148                <td valign="top">
149                    <gsf:link type="document">
150                        <xsl:call-template name="choose-icon"/>
151                    </gsf:link>
152                </td>
153                <td valign="top">
154                    <gsf:metadata name="Title"/>
155                    <xsl:text>                  </xsl:text>                 <i><gsf:metadata format="formatDate" name="Date"/></i>
156                </td>
157            </gsf:template>
158            <gsf:template match="classifierNode[@classifierStyle = 'VList']">
159                <td valign="top">
160                    <gsf:link type="classifier">
161                        <gsf:icon type="classifier"/>
162                    </gsf:link>
163                </td>
164                <td valign="top">
165                    <gsf:metadata name="Title"/>
166                    <xsl:text>                  </xsl:text>                 <i>(<gsf:metadata name="numleafdocs"/> issues)</i>
167                </td>
168            </gsf:template>
169        </format>
170        </classifier>
171        <classifier name="DateList">
172            <option name="-metadata" value="Date"/>
173            <option name="-nogroup"/>
174        </classifier>
175        <format>
176            <gsf:template match="documentNode">
177                <td valign="top">
178                    <gsf:link type="document">
179                        <gsf:icon type="document"/>
180                    </gsf:link>
181                </td>
182                <td valign="top">
183                    <gsf:link type="source">
184                        <gsf:choose-metadata>
185                            <gsf:metadata name="thumbicon"/>
186                            <gsf:metadata name="srcicon"/>
187                        </gsf:choose-metadata>
188                    </gsf:link>
189                </td>
190                <td valign="top">
191                    <gsf:link type="document">
192<!--
193Defined in the global format statement
194-->
195                        <xsl:call-template name="title-plain"/>
196                    </gsf:link>
197                </td>
198            </gsf:template>
199            <gsf:template match="classifierNode[@classifierStyle = 'VList']">
200                <td valign="top">
201                    <gsf:link type="classifier">
202                        <gsf:icon type="classifier"/>
203                    </gsf:link>
204                </td>
205                <td valign="top">
206                    <gsf:link type="source">
207                        <gsf:choose-metadata>
208                            <gsf:metadata name="thumbicon"/>
209                            <gsf:metadata name="srcicon"/>
210                        </gsf:choose-metadata>
211                    </gsf:link>
212                </td>
213                <td valign="top">
214<!--
215Defined in the global format statement
216-->
217                    <xsl:call-template name="title-plain"/>
218                    <gsf:switch>
219                        <gsf:metadata name="Source"/>
220                        <gsf:when test="exists">
221                            <br/>
222                            <i>(<gsf:metadata name="Source"/>)</i>
223                        </gsf:when>
224                    </gsf:switch>
225                </td>
226            </gsf:template>
227            <gsf:template match="classifierNode[@classifierStyle = 'HList']">
228                <gsf:link type="classifier">
229                    <gsf:metadata name="Title"/>
230                </gsf:link>
231            </gsf:template>
232        </format>
233    </browse>
234    <display>
235        <format>
236            <gsf:option name="TOC" value="true"/>
237            <xsl:template name="additionalHeaderContent">
238<!--
239this javascript is needed to get the #Biblio etc links in the commentaries to work
240-->
241                <script type="text/javascript">
242                    <xsl:text disable-output-escaping="yes">$(window).load(function()
243{
244    var links = $("a");
245    for(var i = 0; i &lt; links.length; i++)
246    {
247        if($(links[i]).attr("href") &amp;&amp; $(links[i]).attr("href").match("^#"))
248        {
249            $(links[i]).attr("href", document.URL + $(links[i]).attr("href"));
250        }
251    }
252});</xsl:text>
253                </script>
254               
255                <link rel="stylesheet" href="sites/{$site_name}/collect/{$collName}/style/style.css"/>
256            </xsl:template>
257<!--
258Overwriting this template allows you to change the heading of the document.
259-->
260
261<gsf:template name="documentHeading">
262<span style="font-weight:bold; font-size: 120%;">
263<xsl:call-template name="title-plain"/>
264</span>
265<gsf:switch>
266<gsf:metadata name="DocType"/>
267<gsf:when test="equals" test-value="Abstract">
268<gsf:collectionText name="abstract"/>
269</gsf:when>
270</gsf:switch>
271</gsf:template>
272<!--
273Overwriting 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.
274-->
275<!--
276<gsf:template name="documentContent">
277<xsl:call-template name="wrappedSectionImage"/>
278<xsl:call-template name="wrappedSectionText"/>
279</gsf:template>
280-->
281<!--
282Overwriting this template can be used to change the content of section headings.
283-->
284            <gsf:template name="sectionHeading">
285                <xsl:call-template name="title-plain"/>
286            </gsf:template>
287            <gsf:template name="pageTitle">
288                <xsl:for-each select="/page/pageResponse/document/documentNode">
289                    <xsl:call-template name="title-plain"/>
290                </xsl:for-each>
291            </gsf:template>
292<!--
293Overwriting this template can be used to change the content of the top-level section.
294-->
295<!--
296<gsf:template name="topLevelSectionContent">
297<xsl:call-template name="wrappedSectionImage"/>
298<xsl:call-template name="wrappedSectionText"/>
299</gsf:template>
300-->
301<!--
302Overwriting this template can be used to change the content of sections.
303-->
304<!--
305<gsf:template name="sectionContent">
306<xsl:call-template name="wrappedSectionImage"/>
307<xsl:call-template name="wrappedSectionText"/>
308</gsf:template>
309-->
310        </format>
311    </display>
312    <replaceListRef id="gs2-standard"/>
313    <replaceListRef id="gs2-image"/>
314    <replaceList>
315        <replace bundle="niupepa" key="vol" macro="_vol_" resolve="false" scope="metadata"/>
316        <replace bundle="niupepa" key="num" macro="_num_" resolve="false" scope="metadata"/>
317        <replace bundle="niupepa" key="commentary" macro="_commentary_" resolve="false" scope="metadata"/>
318        <replace bundle="niupepa" key="textbiblio" macro="_textbiblio_" resolve="false" scope="text"/>
319        <replace bundle="niupepa" key="textbackground" macro="_textbackground_" resolve="false" scope="text"/>
320        <replace bundle="niupepa" key="textsubmat" macro="_textsubmat_" resolve="false" scope="text"/>
321        <replace bundle="niupepa" key="textavail" macro="_textavail_" resolve="false" scope="text"/>
322    <replace macro="_httpdocument_&amp;cl=_cgiargcl_&amp;gg=prev&amp;d=" scope="text" text="_libraryname_/collection/_clustername_/document/" resolve="true"/>
323    </replaceList>
324    <serviceRackList><!-- comment out the following serviceRack if you want to disable OAI for this collection -->
325        <serviceRack name="OAIPMH">
326            <ListMetadataFormats><!--What metadata sets to support is collection specific. To support other metadata schema, simply add a metadataFormat element here.
327                    The support of unqualified Dublin Core metadata set is mandatory in the oai specification.
328                -->
329                <metadataFormat metadataPrefix="oai_dc">
330                    <metadataPrefix>oai_dc</metadataPrefix>
331                    <schema>http://www.openarchives.org/OAI/2.0/oai_dc.xsd</schema>
332                    <metadataNamespace>http://www.openarchives.org/OAI/2.0/oai_dc/</metadataNamespace><!--<metadataElements>dc.Title,dc.Creator,dc.Subject,dc.Description,dc.Publisher,dc.Contributor,dc.Date,dc.Type,dc.Format,dc.Identifier,dc.Source,dc.Language,dc.Relation,dc.Coverage,dc.Rights</metadataElements>-->
333                    <mappingList><!--
334                            The mapping is in the form: <publicly supported metadata name>,<mapped metadata name>, short as <A>,<B>
335                            The first metadata name is medatory; if there is no mapped name followed, then the first name must be used by the records and
336                            searchable in the database, otherwise it is the mapped name stored in the database. The number of mapping elements matches the
337                            number of external metadata of the records. If only one name is present, the returned metadata will use this name plus the retrieved value;
338                            if both <A>,<B> are present, the returned metadata will use <A>'s name plus <B>'s value retrieved from database.
339                   
340                            **Bear in mind: if this mapping list is not present, the standard dc. metadata names (15 in total) will be used to retrieve metadata in the database.
341                   
342                            **The only case when this mapping is not present is that: 1. this metadata format is oai_dc; 2. the metadata is also stored in the database by Dublin Core's names.
343                        -->
344                        <mapping>dc:title,Title</mapping><!-- This mapping example means that the dc.Title is requested and the value of the metadata Title, which is used in this repository, is returned as response. -->
345                    </mappingList>
346                </metadataFormat>
347            </ListMetadataFormats>
348        </serviceRack>
349    </serviceRackList>
350</CollectionConfig>
Note: See TracBrowser for help on using the browser.