Changeset 25807


Ignore:
Timestamp:
2012-06-21T19:04:26+12:00 (12 years ago)
Author:
ak19
Message:

Updated the tutorial Formatting the Word and PDF collection tutorial for GS3 again, since the boolean attribute multiple is no longer available for the meadata gsf format statement, with the pos attribute having been introduced in its place.

File:
1 edited

Legend:

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

    r25799 r25807  
    10161016<MajorVersion number="3">
    10171017<NumberedItem>
    1018 <Text id="fw-18-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 <b>documentNode</b> 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>
     1018<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 <b>documentNode</b> 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>
    10191019<Format>
    10201020    &lt;td valign=&quot;top&quot;&gt;<br />
     
    10351035      <Tab n="1"/>&lt;/gsf:link&gt;<br />
    10361036      <Tab n="1"/>&lt;br/&gt;<br />
    1037       <Tab n="1"/><highlight>&lt;gsf:metadata name=&quot;dc.Creator&quot; multiple=&quot;true&quot; /&gt;</highlight><br />
     1037      <Tab n="1"/><highlight>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</highlight><br />
    10381038    &lt;/td&gt;<br />
    10391039</Format>
    1040 <Text id="fw-21">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. The additional line <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; multiple=&quot;true&quot;/&gt;</Format> displays all the Creator metadata for the document, separated by a comma (<AutoText text=", " type="quoted"/>), while <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;</Format> displays only the first author. Preview the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list and make sure that all authors are displayed for documents.</Text> 
    1041 </NumberedItem>
    1042 <NumberedItem>
    1043 <Text id="fw-22">You can change the separator between the authors. Modify the format statement, and replace <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; multiple=&quot;true&quot;/&gt;</Format> with <Format>&lt;gsf:metadata name=&quot;dc.Creator&quot; multiple=&quot;true&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> and specifies a line break in HTML and XML). Preview the <AutoText key="coredm::_Global:labelCreator_" type="italics"/> list.</Text>
    1044 <Text id="fw-23">If you have done exercise <TutorialRef id="enhanced_word"/>, the collection will have both dc.Creator and ex.Creator metadata. To display both, you can use </Text>
    1045 <Format>
    1046 &lt;gsf:metadata name=&quot;dc.Creator&quot; multiple=&quot;true&quot;/&gt; <br />
    1047 &lt;gsf:metadata name=&quot;ex.Creator&quot; multiple=&quot;true&quot;/&gt;<br />
    1048 </Format>
    1049 <Text id="fw-23a">To display dc.Creator if it is present, otherwise display ex.Creator, use</Text>
     1040<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>
     1041<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>
     1042<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> 
     1043</NumberedItem>
     1044<NumberedItem>
     1045<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>
     1046<Text id="fw-23">If you have done exercise <TutorialRef id="enhanced_word"/>, the collection will have both dc.Creator and ex.Creator metadata. To display the metadata values for both, you can use </Text>
     1047<Format>
     1048&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt; <br />
     1049&lt;gsf:metadata name=&quot;ex.Creator&quot; /&gt;<br />
     1050</Format>
     1051<Text id="fw-23a-3">To display dc.Creator if it is present, otherwise display ex.Creator, use</Text>
    10501052<Format>
    10511053&lt;gsf:choose-metadata&gt;<br />
    1052   <Tab n="1"/>&lt;gsf:metadata name=&quot;dc.Creator&quot; multiple=&quot;true&quot;/&gt;<br />
    1053   <Tab n="1"/>&lt;gsf:metadata name=&quot;ex.Creator&quot; multiple=&quot;true&quot;/&gt;<br /> 
     1054  <Tab n="1"/>&lt;gsf:metadata name=&quot;dc.Creator&quot; /&gt;<br />
     1055  <Tab n="1"/>&lt;gsf:metadata name=&quot;ex.Creator&quot; /&gt;<br /> 
    10541056&lt;/gsf:choose-metadata&gt;<br />
    10551057</Format>
Note: See TracChangeset for help on using the changeset viewer.