Ignore:
Timestamp:
2013-03-25T08:04:53+13:00 (11 years ago)
Author:
jlwhisler
Message:

Changes to Word/PDF and formatting Word/PDF tutorials. Added |3.05 to Version/@current for the tutorials. Fixed some minor problems with GS3 formatting statements for Word/Pdf collection. Added AutoText for GS3 to correspond with GS2’s coredm keys – so tutorials for GS3 can be generated properly from Greenstone 3 installation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • documentation/trunk/tutorials/xml-source/tutorial_en.xml

    r27113 r27114  
    752752</Title>
    753753<SampleFiles folder="Word_and_PDF"/>
    754 <Version initial="2.60" current="2.85"/>
     754<Version initial="2.60" current="2.85|3.05"/>
    755755<Content>
    756756<Comment>
     
    800800</NumberedItem>
    801801<Comment>
    802 <Text id="0294">If you build and preview your collection at this point, you will see that the <AutoText key="coredm::_Global:labelTitle_"/> list now shows your new Titles. However, the <AutoText key="metadata::dc.Creator"/> metadata is not displayed. You need to alter the collection design to use this metadata.</Text>
     802<Text id="0294">If you build and preview your collection at this point, you will see that the <MajorVersion number="2"><AutoText key="coredm::_Global:labelTitle_"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Title.buttonname" /></MajorVersion> list now shows your new Titles. However, the <AutoText key="metadata::dc.Creator"/> metadata is not displayed. You need to alter the collection design to use this metadata.</Text>
    803803</Comment>
    804804<Heading>
     
    824824</Heading>
    825825<NumberedItem>
    826 <Text id="0315a">The <AutoText key="glidict::CDM.GUI.Classifiers"/> section adds "classifiers," which provide the collection with browsing functions. Go to this section and observe that Greenstone has provided two <i>List</i> classifiers, based on <AutoText text="dc.Title;ex.Title"/> and <AutoText key="metadata::ex.Source"/> metadata. These correspond to the <AutoText key="coredm::_Global:labelTitle_" type="italics"/> and <AutoText key="coredm::_Global:labelSource_" type="italics"/> buttons on the collection's access bar. </Text>
     826<Text id="0315a">The <AutoText key="glidict::CDM.GUI.Classifiers"/> section adds "classifiers," which provide the collection with browsing functions. Go to this section and observe that Greenstone has provided two <i>List</i> classifiers, based on <AutoText text="dc.Title;ex.Title"/> and <AutoText key="metadata::ex.Source"/> metadata. <MajorVersion number="2">These correspond to the <AutoText key="coredm::_Global:labelTitle_" type="italics"/> and <AutoText key="coredm::_Global:labelSource_" type="italics"/> buttons on the collection's access bar.</MajorVersion><MajorVersion number="3">These correspond to the <AutoText key="gs3::metadata_names::Title.buttonname" /> and <AutoText key="gs3::metadata_names::Source.buttonname" /> buttons on the collection's access bar.</MajorVersion> </Text>
    827827<Text id="0315a-1">Remove the <AutoText key="metadata::ex.Source"/> classifier by selecting it and clicking <AutoText key="glidict::CDM.ClassifierManager.Remove" type="button"/>.</Text>
    828828</NumberedItem>
     
    837837</NumberedItem></MajorVersion>
    838838<NumberedItem>
    839 <Text id="0321">Check that all the facilities work properly. There should be three full-text indexes, called <AutoText key="coredm::_Global:texttext_" type="italics"/>, <AutoText key="coredm::_Global:labelTitle_" type="italics"/>, and <AutoText key="coredm::_Global:labelCreator_" type="italics"/>. The <AutoText key="coredm::_Global:labelTitle_" type="italics"/> list should display all the document Titles. The <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list should show one bookshelf for each author you have assigned as <AutoText key="metadata::dc.Creator"/>, and clicking on that bookshelf should take you to all the documents they authored.</Text>
    840 </NumberedItem>
    841 <Comment>
    842 <Text id="0321b">The <AutoText key="coredm::_Global:labelTitle_" type="italics"/> list shows all documents which have been assigned <AutoText key="metadata::dc.Title"/> metadata, or have automatically extracted <AutoText key="metadata::ex.Title"/>. For many documents, extracted Titles may be fine, and it is impractical to add the same metadata again as <AutoText key="metadata::dc.Title"/>. Specifying a list of metadata names in the classifier allows us to use both. </Text>
     839<MajorVersion number="2">
     840<Text id="0321-1">Check that all the facilities work properly. There should be three full-text indexes, called <AutoText key="coredm::_Global:texttext_" type="italics"/>, <AutoText key="coredm::_Global:labelTitle_" type="italics"/>, and <AutoText key="coredm::_Global:labelCreator_" type="italics"/>. The <AutoText key="coredm::_Global:labelTitle_" type="italics"/> list should display all the document Titles. The <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list should show one bookshelf for each author you have assigned as <AutoText key="metadata::dc.Creator"/>, and clicking on that bookshelf should take you to all the documents they authored.</Text>
     841</MajorVersion>
     842<MajorVersion number="3">
     843<Text id="0321-2">Check that all the facilities work properly. There should be three full-text indexes, called <AutoText text="text" type="italics"/>, <AutoText key="gs3::metadata_names::Title.buttonname" type="italics"/>, and <AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/>. The <AutoText key="gs3::metadata_names::Title.buttonname" type="italics"/> list should display all the document Titles. The <AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/> list should show one bookshelf for each author you have assigned as <AutoText key="metadata::dc.Creator"/>, and clicking on that bookshelf should take you to all the documents they authored.</Text>
     844</MajorVersion>
     845</NumberedItem>
     846<Comment>
     847<Text id="0321b">The <MajorVersion number="2"><AutoText key="coredm::_Global:labelTitle_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Title.buttonname" type="italics"/></MajorVersion> list shows all documents which have been assigned <AutoText key="metadata::dc.Title"/> metadata, or have automatically extracted <AutoText key="metadata::ex.Title"/>. For many documents, extracted Titles may be fine, and it is impractical to add the same metadata again as <AutoText key="metadata::dc.Title"/>. Specifying a list of metadata names in the classifier allows us to use both. </Text>
    843848</Comment>
    844849<NumberedItem>
    845850<Text id="0321b-1">If you have already done the <TutorialRef id="enhanced_word"/> exercise, some of the documents will have extracted ex.Creator metadata, and some will have dc.Creator. To use both of these in the Creators classifier, make the <AutoText text="metadata"/> field read <Format><AutoText key="metadata::dc.Creator" type="plain"/><AutoText text=",ex.Creator" type="plain"/></Format>.</Text>
    846 <Text id="0321e"><b>Build</b> the collection again and <b>preview</b> it. Now extracted Creators should appear in the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list.</Text>
     851<Text id="0321e"><b>Build</b> the collection again and <b>preview</b> it. Now extracted Creators should appear in the <MajorVersion number="2"><AutoText key="coredm::_Global:labelCreator_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/></MajorVersion> list.</Text>
    847852</NumberedItem>
    848853<Comment>
     
    856861</Title>
    857862<Prerequisite id="word_pdf_collection"/>
    858 <Version initial="2.70w" current="2.85"/>
     863<Version initial="2.70w" current="2.85|3.05"/>
    859864<Content>
    860865<Comment>
     
    899904<Text id="fw-3a-3">In this part of the exercise, we make the format statement simpler without changing the resulting display.</Text>
    900905<Text id="fw-3-3">Greenstone's default format statement is complex because it is designed to produce something reasonable under almost any conditions, and also because for practical reasons it needs to be backwards compatible with legacy collections. For this collection, we don't need all of the complexity.</Text>
    901 <Text id="fw-3a-1-3">Make sure that the <AutoText key="coredm::_Global:labelBrowse_"/> format statement is selected in the list of formats.</Text>
    902 <Text id="fw-4-3">An excerpt from the default <AutoText key="coredm::_Global:labelBrowse_"/> format statement for <b>documentNode</b> looks like the following:</Text>
     906<Text id="fw-3a-1-3">Make sure that the <AutoText text="Browse" />
     907 format statement is selected in the list of formats.</Text>
     908<Text id="fw-4-3">An excerpt from the default <AutoText text="Browse" />
     909 format statement for <b>documentNode</b> looks like the following:</Text>
    903910<Format>
    904911    &lt;td valign=&quot;top&quot;&gt;<br/>
     
    952959<MajorVersion number="3">
    953960<NumberedItem>
    954 <Text id="fw-11-3">For collections with documents that undergo a conversion process during importing (e.g. Word, PDF, PowerPoint documents, but not text, HTML documents), the original file is stored in the collection along with the converted version. The default <AutoText key="coredm::_Global:labelBrowse_"/> format statement links to both versions, but the format statement for <AutoText key="coredm::_Global:labelSearch_"/> links only to the converted version of the original file:</Text>
     961<Text id="fw-11-3">For collections with documents that undergo a conversion process during importing (e.g. Word, PDF, PowerPoint documents, but not text, HTML documents), the original file is stored in the collection along with the converted version. The default <AutoText text="Browse" /> format statement links to both versions, but the format statement for <AutoText text="Search"/> links only to the converted version of the original file:</Text>
    955962<Format>&lt;gsf:link type=&quot;document&quot;&gt;<br/>
    956963        <Tab n="1"/>&lt;gsf:icon type=&quot;document&quot;/&gt;<br/>
     
    962969</Format>
    963970<Text id="fw-12a-3">links to the original.</Text>
    964 <Text id="fw-13-3">Choose <AutoText key="coredm::_Global:labelSearch_"/> in <AutoText key="glidict::CDM.GUI.Formats"/>. Experiment with removing either of the two links from the format statement.</Text>
     971<Text id="fw-13-3">Choose <AutoText text="Search"/> in <AutoText key="glidict::CDM.GUI.Formats"/>. Experiment with removing either of the two links from the format statement.</Text>
    965972<Text id="fw-13a-3">To see the results of your changes, preview the collection and do a search. You are making changes to <b>documentNode</b>s under <AutoText text="Search"/>, which means the changes will only apply to search results.</Text>
    966973<Text id="fw-13b-3">Storing and displaying the original allows users to see the correct format, but requires the user to have the relevant program installed. It also increases the size of the collection. The Greenstone version can be viewed in a browser, but may not look as nice.</Text>
     
    971978</Heading>
    972979<NumberedItem>
    973 <Text id="fw-14">Next, we'll customize the format for the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list. Classifier bookshelves have only a few pieces of metadata to display: <Format>[ex.Title]</Format> and <Format>[numleafdocs]</Format>. Whatever metadata the classifier has been built on, the bookshelf label is always stored as <Format>[ex.Title]</Format>. This is why a Creator is printed out for each bookshelf even though <Format>[dc.Creator]</Format> is not specified in the format statement.
     980<Text id="fw-14">Next, we'll customize the format for the <MajorVersion number="2"><AutoText key="coredm::_Global:labelCreator_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/></MajorVersion> list. Classifier bookshelves have only a few pieces of metadata to display: <Format>[ex.Title]</Format> and <Format>[numleafdocs]</Format>. Whatever metadata the classifier has been built on, the bookshelf label is always stored as <Format>[ex.Title]</Format>. This is why a Creator is printed out for each bookshelf even though <Format>[dc.Creator]</Format> is not specified in the format statement.
    974981<MajorVersion number="2">
    975982 <Format>[numleafdocs]</Format> is only defined for bookshelves, so this metadata can be used in an <Format>{If}</Format> statement to make bookshelves and documents display differently in the list.
     
    984991</MajorVersion>
    985992<MajorVersion number="3">
    986 <Text id="fw-15-3">Make each bookshelf in the Creator classifier show how many entries it contains. In the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel, select the <AutoText key="coredm::_Global:labelBrowse_"/> format statement. This consists of three parts: the first gsf:template is the format statement defining the display of a <b>documentNode</b>, the second one is the format statement that controls the appearance of <b>VList classifierNodes</b> (which appear as bookshelves here), while the final gsf:template block is the format statement defining the display of <b>HList classifierNodes</b>.</Text>
     993<Text id="fw-15-3">Make each bookshelf in the Creator classifier show how many entries it contains. In the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel, select the <AutoText text="Browse" /> format statement. This consists of three parts: the first gsf:template is the format statement defining the display of a <b>documentNode</b>, the second one is the format statement that controls the appearance of <b>VList classifierNodes</b> (which appear as bookshelves here), while the final gsf:template block is the format statement defining the display of <b>HList classifierNodes</b>.</Text>
    987994<Text id="fw-15a-3">Scroll down to the end of the second format statement, which is the one for the VList classifiers and appears just before the start of the format statement for HList classifiers. Then insert the line highlighted below, which will display the number of leaf documents inside a classifier bookshelf:</Text>
    988995<Format>
     
    9981005</Format>
    9991006</MajorVersion>
    1000 <Text id="fw-16"><b>Preview</b> the collection. Click on the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list and notice that the bookshelves now display how many documents they contain.</Text>
     1007<Text id="fw-16"><b>Preview</b> the collection. Click on the <MajorVersion number="2"><AutoText key="coredm::_Global:labelCreator_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/></MajorVersion> list and notice that the bookshelves now display how many documents they contain.</Text>
    10011008<Text id="fw-17">This revised format statement has the effect of specifying in brackets how many items are contained within a bookshelf.
    10021009<MajorVersion number="2">
     
    10381045<MajorVersion number="3">
    10391046<NumberedItem>
    1040 <Text id="fw-18-3-3">Next we modify the document entries in the Creator classifier to display all authors. Back in <AutoText key="glidict::CDM.GUI.Formats"/>, select the <AutoText key="coredm::_Global:labelBrowse_"/> format in the list of assigned formats. Edit the format statement for <AutoText text="documentNode"/> after the part where it displays the Title metadata, so that it now additionally contains the new line highlighted below. This will display the dc.Creator metadata.</Text>
     1047<Text id="fw-18-3-3">Next we modify the document entries in the Creator classifier to display all authors. Back in <AutoText key="glidict::CDM.GUI.Formats"/>, select the <AutoText text="Browse" /> format in the list of assigned formats. Edit the format statement for <AutoText text="documentNode"/> after the part where it displays the Title metadata, so that it now additionally contains the new line highlighted below. This will display the dc.Creator metadata.</Text>
    10411048<Format>
    10421049    &lt;td valign=&quot;top&quot;&gt;<br />
     
    10511058        <Tab n="2"/>&lt;/gsf:switch&gt;<br />
    10521059      <Tab n="1"/>&lt;/gsf:link&gt;<br />
    1053       <Tab n="1"/>&lt;br/&gt;<br />
    1054       <Tab n="1"/><highlight>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</highlight><br />
     1060      <Tab n="1"/><highlight>&lt;br/&gt;<br />
     1061      <Tab n="1"/>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</highlight><br />
    10551062    &lt;/td&gt;<br />
    10561063</Format>
    1057 <Text id="fw-21-3">The format statement as it is above will now display the Greenstone link, the link to the original, then the Title as before. Since it's defined for <b>documentNode</b>s, it will display all the Authors (Creators), and the source document for documents. Preview the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list and make sure that all authors are displayed for documents.</Text>
     1064<Text id="fw-21-3">The format statement as it is above will now display the Greenstone link, the link to the original, then the Title as before. Since it's defined for <b>documentNode</b>s, it will display all the Authors (Creators), and the source document for documents. Preview the <AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/> list and make sure that all authors are displayed for documents.</Text>
    10581065<Text id="fw-21a-3">The additional line <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</Format> displays all the Creator metadata for the document, separated by a comma (<AutoText text=", " type="quoted"/>). The same line could also have been written as <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; select=&quot;siblings&quot;/&gt;</Format>, but mentioning <Format>siblings</Format> explicitly is not necessary, as all the metadata values for dc.Creator will be returned by default. However, this longer way of requesting specific metadata is useful when <Format>parent</Format>, <Format>ancestors</Format>, or <Format>root</Format> values are required for a piece of metadata, such as when you want not just the current section's Title to be displayed, but wish to display the Title of the (parent) document containing the section as well.</Text>
    1059 <Text id="fw-21b-3">If you wish to retrieve only the <Format>first</Format>, <Format>last</Format> or <Format>n</Format>th value for a metadata, you would use the <Format>pos</Format> attribute. For example, <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; pos=&quot;first&quot;/&gt;</Format> (or alternatively, <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; pos=&quot;0&quot;/&gt;</Format>) displays only the first author.</Text> 
     1066<Text id="fw-21b-3">If you wish to retrieve only the <Format>first</Format>, <Format>last</Format> or <Format>n</Format>th value for a metadata, you would use the <Format>pos</Format> attribute. For example, <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; pos=&quot;first&quot;/&gt;</Format> (or alternatively, <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; pos=&quot;1&quot;/&gt;</Format>) displays only the first author.</Text> 
    10601067</NumberedItem>
    10611068<NumberedItem>
    10621069<MajorVersion number="2"><Text id="fw-22-3">You can change the separator between the authors. Modify the format statement, and replace <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</Format> with <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; separator=&quot;&amp;lt;br/&amp;gt;&quot; /&gt;</Format>. This will add a new line after each author (<Format>&amp;lt;br/&amp;gt;</Format> is the escaped version of <Format>&lt;br/&gt;</Format> which specifies a line break in HTML and XML). Preview the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list.</Text></MajorVersion>
    10631070<MajorVersion number="3">
    1064 <Text id="fw-22-3">You can change the separator between the authors. Modify the format statement, and replace <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</Format> with <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; separator=&quot; &quot;&gt;</Format>. This will add a space after each author. Preview the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list. However, if you want a newline to separate each author, it requires a little more in order to escape the HTML newline (&lt;br /&gt;) element:
     1071<Text id="fw-22-3">You can change the separator between the authors. Modify the format statement, and replace <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</Format> with <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; separator=&quot; &quot;&gt;</Format>. This will add a space after each author. Preview the <AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/> list. However, if you want a newline to separate each author, it requires a little more in order to escape the HTML newline (&lt;br /&gt;) element:
    10651072</Text>
    10661073<Format>
     
    11051112</NumberedItem>
    11061113<NumberedItem>
    1107 <Text id="0322">We'll now set the <AutoText text="firstvalueonly"/> option for the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> classifier. Switch to the <AutoText key="glidict::CDM.GUI.Classifiers"/> section of the <AutoText key="glidict::GUI.Design"/> panel, select the <AutoText text="AZCompactList"/> for <AutoText key="metadata::dc.Creator"/> metadata in the <AutoText key="glidict::CDM.ClassifierManager.Assigned"/> box and click <AutoText key="glidict::CDM.ClassifierManager.Configure" type="button"/>. Select the <AutoText text="firstvalueonly"/> option.</Text>
    1108 <Text id="0322a"><b>Rebuild</b> and <b>preview</b> the collection. Now the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list classifies documents based on the first author appearing in the <AutoText key="metadata::dc.Creator"/> metadata.</Text>
    1109 <Text id="0322b">If you set the <AutoText text="metadata"/> field of <AutoText text="AZCompactList"/> to <Format><AutoText key="metadata::dc.Creator" type="plain"/><AutoText text=",ex.Creator" type="plain"/></Format> in the <TutorialRef id="word_pdf_collection"/> exercise, now the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list will classify based on the first author appearing in either the <AutoText key="metadata::dc.Creator"/> metadata or the <AutoText key="metadata::ex.Creator"/> metadata.</Text>
     1114<Text id="0322">We'll now set the <AutoText text="firstvalueonly"/> option for the <MajorVersion number="2"><AutoText key="coredm::_Global:labelCreator_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/></MajorVersion> classifier. Switch to the <AutoText key="glidict::CDM.GUI.Classifiers"/> section of the <AutoText key="glidict::GUI.Design"/> panel, select the <AutoText text="AZCompactList"/> for <AutoText key="metadata::dc.Creator"/> metadata in the <AutoText key="glidict::CDM.ClassifierManager.Assigned"/> box and click <AutoText key="glidict::CDM.ClassifierManager.Configure" type="button"/>. Select the <AutoText text="firstvalueonly"/> option.</Text>
     1115<Text id="0322a"><b>Rebuild</b> and <b>preview</b> the collection. Now the <MajorVersion number="2"><AutoText key="coredm::_Global:labelCreator_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/></MajorVersion> list classifies documents based on the first author appearing in the <AutoText key="metadata::dc.Creator"/> metadata.</Text>
     1116<Text id="0322b">If you set the <AutoText text="metadata"/> field of <AutoText text="AZCompactList"/> to <Format><AutoText key="metadata::dc.Creator" type="plain"/><AutoText text=",ex.Creator" type="plain"/></Format> in the <TutorialRef id="word_pdf_collection"/> exercise, now the <MajorVersion number="2"><AutoText key="coredm::_Global:labelCreator_" type="italics"/></MajorVersion><MajorVersion number="3"><AutoText key="gs3::metadata_names::Creator.buttonname" type="italics"/></MajorVersion> list will classify based on the first author appearing in either the <AutoText key="metadata::dc.Creator"/> metadata or the <AutoText key="metadata::ex.Creator"/> metadata.</Text>
    11101117</NumberedItem>
    11111118</Content>
Note: See TracChangeset for help on using the changeset viewer.