Greenstone tutorial exercise

Back to wiki
Back to index
Sample files: isis.zip
Devised for Greenstone version: 2.70w|3.06
Modified for Greenstone version: 2.87|3.11

CDS/ISIS collection

This exercise is similar to the Bibliographic collection exercise, except that a CDS/ISIS database is used instead of a MARC database, and we do not explode the database.

  1. Start a new collection called ISIS Collection (base it on New Collection).

  1. Drag the files from sample_files → isis (excluding the format_tweaks folder and the README.txt file) into the collection.

  1. Build and preview the collection. The default indexes, classifiers and formats are not very useful for this data. There is no metadata searching, and the titles classifier is completely empty. The filenames classifier is useless because all records come from the same file.

  1. In the Search Indexes section of the Design panel, remove the useless Source and Title indexes, and add new indexes for ex.Photographer^all, ex.Country^all and ex.Notes^all metadata. In the Search section of the Format panel, you can set the display text for these indexes to "photographer", "country" and "notes".

    CDS/ISIS metadata has subfields, and these are represented using ^.

  1. In the Browsing Classifiers section of the Design panel, remove the existing (useless) classifiers for dc.Title;ex.Title and ex.Source, and add a new List for ex.Photographer.

  1. Rebuild and preview the collection.

  1. In the Format Features section of the Format panel, change the browse format statement to display Photographer and Notes metadata. Change its documentNode template to look like:

    <gsf:template match="documentNode">
    <td valign="top">
    <gsf:link type="document">
    <gsf:icon type="document"/>
    </gsf:link>
    </td>
    <td valign="top">
    <b><gsf:metadata name="Photographer^all"/></b>
    <br/><gsf:metadata name="Notes^all"/>
    </td>

    </gsf:template>

    The above format can be copied from sample_files → isis → format_tweaks → browse_tweak.txt. If you want search results to be displayed in a similar manner, make the same changes to the documentNode template of the search format features too.

  1. Go to the display format feature in the Format Features section of the Format panel and add the following just after <gsf:option name="TOC" value="true"/>:

    <gsf:template name="documentHeading"/>

ISISPlug stores a nicely formatted version of the record as the document text, and this is what is displayed when we view a record. Let's tidy it up a little more.

  1. We'll link to the raw record, which is stored as ISISRawRecord metadata. Add the following to the display format statement (which can be copied from sample_files → isis → format_tweaks → document_content.txt), to adjust the documentContent. This now makes use of a predefined Greenstone javascript function to toggle between displaying and hiding the raw record.

    <gsf:template name="documentContent">
    <p>
    <xsl:call-template name="wrappedSectionText"/>
    </p>

    <a href="javascript:;" id="cdsreclink">Show/Hide CDS Record</a>
    <div id="cdsrecord">
    <b>CDS Record:</b>
    <br/>
    <tt>
    <gsf:metadata name="ISISRawRecord"/>
    </tt>
    </div>

    <script type="text/javascript">
    <xsl:text disable-output-escaping="yes">
    var link=document.getElementById("cdsreclink");
    var div=document.getElementById("cdsrecord");
    gs.functions.makeToggle(link, div);
    </xsl:text>
    </script>
    </gsf:template>

  1. Preview the collection.


Copyright © 2005-2019 by the New Zealand Digital Library Project at the University of Waikato, New Zealand
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled “GNU Free Documentation License.”