Changeset 28629

Show
Ignore:
Timestamp:
15.11.2013 12:04:26 (6 years ago)
Author:
jlwhisler
Message:

Modified section about dummy text in building a multimedia collection in GS3.

Files:
1 modified

Legend:

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

    r28619 r28629  
    32613261<Text id="0575a">Note how we assigned <AutoText key="metadata::dc.Format"/> metadata to all documents in the collection with a minimum of labour. We did this by capitalizing on the folder structure of the original information. Even though we complained earlier about how messy this folder structure is, you can still take advantage of it when assigning metadata.</Text> 
    32623262</Comment> 
     3263<MajorVersion number="2"> 
    32633264<Heading> 
    32643265<Text id="0579">Suppressing dummy text</Text> 
     
    32713272</Bullet> 
    32723273<Bullet> 
    3273 <Text id="0582">Ensure that <MajorVersion number="2"><AutoText text="VList"/></MajorVersion><MajorVersion number="3">the <AutoText text="browse"/> format feature</MajorVersion> is selected, and make the changes that are highlighted below<MajorVersion number="3"> to its <AutoText text="documentNode"/> template</MajorVersion>.<MajorVersion number="2"> You need to insert five lines into the first line, and delete the second line. (Note, the changes are available in a text file, see below.)</MajorVersion> </Text> 
     3274<Text id="0582">Ensure that <AutoText text="VList"/> is selected, and make the changes that are highlighted below. You need to insert five lines into the first line, and delete the second line. (Note, the changes are available in a text file, see below.)</Text> 
    32743275<Text id="0582a">Change:</Text> 
    32753276<Format> 
    3276 <MajorVersion number="2"> 
    32773277&lt;td valign=top&gt;<highlight>[link][icon][/link]</highlight>&lt;/td&gt;<br/>  
    32783278<highlight>&lt;td valign=top&gt;[ex.srclink]{Or}{[ex.thumbicon],[ex.srcicon]}[ex./srclink]&lt;/td&gt; </highlight><br/> 
     
    32803280{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled} <br/> 
    32813281[/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt; 
     3282</Format>  
     3283<Text id="0583">to this:</Text> 
     3284<Format> 
     3285&lt;td valign=top&gt;<br/> 
     3286<highlight>{If}{[dc.Format] eq 'Audio', </highlight><br/> 
     3287<highlight>[srclink][srcicon][/srclink], </highlight><br/> 
     3288<highlight>{If}{[dc.Format] eq 'Images',</highlight><br/>  
     3289<highlight>[srclink][thumbicon][/srclink],</highlight><br/>  
     3290<highlight>{If}{[dc.Format] eq 'Supplementary',</highlight><br/> 
     3291<highlight>[srclink][srcicon][/srclink] [link][icon][/link],</highlight> 
     3292<highlight>[link][icon][/link]}}}</highlight>&lt;/td&gt; <br/> 
     3293&lt;td valign=top&gt;[highlight]<br/> 
     3294{Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/> 
     3295[/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt; 
     3296</Format>  
     3297</Bullet> 
     3298</BulletList> 
     3299<Text id="0585">To make this easier for you we have prepared a plain text file that contains the new text. In WordPad open the following file:</Text> 
     3300<Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; audio_tweak.txt</Path>  
     3301<Text id="0586">(Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.) Place it in the copy buffer by highlighting the text in WordPad and selecting <Menu>Edit &rarr; Copy</Menu>. Now move back to the Librarian Interface, highlight all the text that makes up the current <AutoText text="VList"/> format statement, and use <Menu><AutoText key="glidict::Menu.Edit"/> &rarr; <AutoText key="glidict::Menu.Edit_Paste"/></Menu> to transform the old statement to the new one.</Text> 
     3302<Text id="0589"><b>Preview</b> the result. You may need to click the browser's &lt;<b>Reload</b>&gt; button to force it to re-load the page.</Text> 
     3303</NumberedItem> 
    32823304</MajorVersion> 
    32833305<MajorVersion number="3"> 
     3306<Heading> 
     3307<Text id="0579">Using switch statements</Text> 
     3308</Heading> 
     3309<NumberedItem> 
     3310<Text id="0580">Alongside the Audio files there is an MP3 icon, which plays the audio when you click it. There is also a document icon, which doesn't make much sense with either audio or image files. We can modify the format statement to display different icons depending on the value of the <b>dc.Format</b> metadata field.</Text> 
     3311<BulletList> 
     3312<Bullet> 
     3313<Text id="0581">Change to the <AutoText key="glidict::GUI.Format"/> panel and select the <AutoText key="glidict::CDM.GUI.Formats"/> section.</Text> 
     3314</Bullet> 
     3315<Bullet> 
     3316<Text id="0582">Ensure that the <AutoText text="browse"/> format feature is selected, and make the changes that are highlighted below to its <AutoText text="documentNode"/> template. </Text> 
     3317<Text id="0582a">Change:</Text> 
     3318<Format> 
    32843319    &lt;td valign=&quot;top&quot;&gt;<br /> 
    32853320      <Tab n="1"/><highlight>&lt;gsf:link type=&quot;document&quot;&gt;<br /> 
     
    32953330      <Tab n="1"/>&lt;/gsf:link&gt;</highlight><br /> 
    32963331    &lt;/td&gt; 
    3297 </MajorVersion> 
    32983332</Format>  
    32993333<Text id="0583">to this:</Text> 
    33003334<Format> 
    3301 <MajorVersion number="2"> 
    3302 &lt;td valign=top&gt;<br/> 
    3303 <highlight>{If}{[dc.Format] eq 'Audio', </highlight><br/> 
    3304 <highlight>[srclink][srcicon][/srclink], </highlight><br/> 
    3305 <highlight>{If}{[dc.Format] eq 'Images',</highlight><br/>  
    3306 <highlight>[srclink][thumbicon][/srclink],</highlight><br/>  
    3307 <highlight>{If}{[dc.Format] eq 'Supplementary',</highlight><br/> 
    3308 <highlight>[srclink][srcicon][/srclink] [link][icon][/link],</highlight> 
    3309 <highlight>[link][icon][/link]}}}</highlight>&lt;/td&gt; <br/> 
    3310 &lt;td valign=top&gt;[highlight]<br/> 
    3311 {Or}{[dc.Title],[exp.Title],[ex.Title],Untitled}<br/> 
    3312 [/highlight]{If}{[ex.Source],&lt;br&gt;&lt;i&gt;([ex.Source])&lt;/i&gt;}&lt;/td&gt; 
    3313 </MajorVersion> 
    3314 <MajorVersion number="3"> 
    33153335&lt;td valign=&quot;top&quot;&gt;<br /> 
    33163336  <Tab n="1"/><highlight>&lt;gsf:switch&gt;<br /> 
     
    33313351  <Tab n="1"/>&lt;/gsf:switch&gt;</highlight><br /> 
    33323352&lt;/td&gt; 
    3333 </MajorVersion> 
    33343353</Format>  
    33353354</Bullet> 
    33363355</BulletList> 
    3337 <Text id="0585">To make this easier for you we have prepared a plain text file that contains the new text. In WordPad open the following file:</Text> 
    3338 <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; audio_tweak<MajorVersion number="3">_3</MajorVersion>.txt</Path>  
    3339 <Text id="0586">(Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.) Place it in the copy buffer by highlighting the text in WordPad and selecting <Menu>Edit &rarr; Copy</Menu>. Now move back to the Librarian Interface, <MajorVersion number="2">highlight all the text that makes up the current <AutoText text="VList"/> format statement</MajorVersion><MajorVersion number="3">highlight the portion of the existing <AutoText text="documentNode"/> template of the <AutoText text="browse"/> format statement that needs to be replaced</MajorVersion>, and use <Menu><AutoText key="glidict::Menu.Edit"/> &rarr; <AutoText key="glidict::Menu.Edit_Paste"/></Menu> to transform the old statement to the new one.</Text> 
     3356<Text id="0585">To make this easier for you we have prepared a plain text file that contains the new text. In WordPad open the following file (Be sure to use WordPad rather than Notepad, because Notepad does not display the line breaks correctly.):</Text> 
     3357<Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; audio_tweak_3.txt</Path>  
     3358<Text id="0586">The <Format>gsf:switch</Format> statement allows you to display different things depending on the value (or existence) of a metadata field. This switch statement is based on the value of <b>dc.Format</b>. If dc.Format equals <i>Audio</i>, then the source icon will be displayed, linking to the source document. (For the MP3 files, the MP3 icon will display, and clicking the icon will play the MP3.) If dc.Format equals <i>Images</i>, the image thumbnail will appear, linking to the full-size image. If dc.Format equals <i>Supplementary</i>, both the source and document icons will appear, linking to the source document and the document display page, respectively. Finally, the <Format>gsf:otherwise</Format> statement says what to do in all other cases.</Text> 
    33403359<Text id="0589"><b>Preview</b> the result. You may need to click the browser's &lt;<b>Reload</b>&gt; button to force it to re-load the page.</Text> 
    33413360</NumberedItem> 
     3361</MajorVersion> 
    33423362<NumberedItem> 
    33433363<Text id="0593">While we're at it, let's remove the source filename from where it appears after each document.</Text> 
     
    34253445<Text id="0606-3">Make the bookshelves show how many documents they contain by modifying the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature in the <AutoText key="glidict::CDM.GUI.Formats"/> section of the <AutoText key="glidict::GUI.Format"/> panel. Insert the highlighted statements:</Text>  
    34263446<Format> 
    3427       <Tab n="1"/>&lt;gsf:template match=&quot;classifierNode[@classifierStyle = 'VList']&quot;&gt;<br /> 
    3428       <Tab n="1"/>...<br /> 
    3429       <Tab n="1"/>&lt;gsf:metadata name=&quot;Title&quot;/&gt;<br /> 
    3430      &lt;/td&gt;<br /> 
    3431     <highlight>&lt;td valign=&quot;top&quot;&gt;<br /> 
    3432        <Tab n="1"/>(&lt;gsf:metadata name=&quot;numleafdocs&quot;/&gt;)<br /> 
    3433     &lt;/td&gt;</highlight> 
    3434     &lt;gsf:template<br /> 
     3447&lt;gsf:template match=&quot;classifierNode[@classifierStyle = 'VList']&quot;&gt;<br /> 
     3448      <Tab n="2"/>...<br /> 
     3449      <Tab n="2"/>&lt;gsf:metadata name=&quot;Title&quot;/&gt;<br /> 
     3450     <Tab n="1"/>&lt;/td&gt;<br /> 
     3451    <highlight><Tab n="1"/>&lt;td valign=&quot;top&quot;&gt;<br /> 
     3452       <Tab n="2"/>(&lt;gsf:metadata name=&quot;numleafdocs&quot;/&gt;)<br /> 
     3453    <Tab n="1"/>&lt;/td&gt;</highlight><br /> 
     3454&lt;gsf:template<br /> 
    34353455</Format> 
    34363456<Text id="0606-3a">The complete format statement for the <AutoText text="VList classifierNode"/> template of the <AutoText text="browse"/> format feature can be copied from <Path>sample_files &rarr; beatles &rarr; format_tweaks &rarr; show_num_docs_3.txt</Path>.</Text> 
     
    35163536</NumberedItem> 
    35173537<NumberedItem> 
    3518 <Text id="0645">Using your Windows file browser outside Greenstone, locate the folder</Text> 
     3538<Text id="0645">Using your file browser outside Greenstone, locate the folder</Text> 
    35193539<Path>sample_files &rarr; beatles &rarr; advbeat_large</Path>  
    35203540</NumberedItem> 
     
    46244644</NumberedItem> 
    46254645<NumberedItem> 
    4626 <Text id="0759">In your Windows file browser, locate the <Path>archives</Path> folder for the collection you are working with (in <Path>Greenstone<MajorVersion number="3">3 &rarr; web &rarr; sites &rarr; localsite</MajorVersion> &rarr; collect &rarr; &lt;collname&gt; &rarr; archives</Path>). For each document in the collection, Greenstone has generated two files: <Path>docmets.xml</Path>, the core METS description, and <Path>doctxt.xml</Path>, a supporting file. (Note: unless you are connected to the Internet you may be unable to view <Path>doctxt.xml</Path> in your web browser, because it refers to a remote resource.) Depending on the source documents there may be additional files, such as the images used within a web page. One of METS' many features is the ability to reference information in external XML files. Greenstone uses this to tie the content of the document, which is stored in the external XML file <Path>doctxt.xml</Path>, to its hierarchical structure, which is described in the core METS file <Path>docmets.xml</Path>.</Text> 
     4646<Text id="0759">In your file browser, locate the <Path>archives</Path> folder for the collection you are working with (in <Path>Greenstone<MajorVersion number="3">3 &rarr; web &rarr; sites &rarr; localsite</MajorVersion> &rarr; collect &rarr; &lt;collname&gt; &rarr; archives</Path>). For each document in the collection, Greenstone has generated two files: <Path>docmets.xml</Path>, the core METS description, and <Path>doctxt.xml</Path>, a supporting file. (Note: unless you are connected to the Internet you may be unable to view <Path>doctxt.xml</Path> in your web browser, because it refers to a remote resource.) Depending on the source documents there may be additional files, such as the images used within a web page. One of METS' many features is the ability to reference information in external XML files. Greenstone uses this to tie the content of the document, which is stored in the external XML file <Path>doctxt.xml</Path>, to its hierarchical structure, which is described in the core METS file <Path>docmets.xml</Path>.</Text> 
    46274647</NumberedItem> 
    46284648</Content>