Changeset 25807
- Timestamp:
- 2012-06-21T19:04:26+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/tutorials/xml-source/tutorial_en.xml
r25799 r25807 1016 1016 <MajorVersion number="3"> 1017 1017 <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> 1019 1019 <Format> 1020 1020 <td valign="top"><br /> … … 1035 1035 <Tab n="1"/></gsf:link><br /> 1036 1036 <Tab n="1"/><br/><br /> 1037 <Tab n="1"/><highlight><gsf:metadata name="dc.Creator" multiple="true"/></highlight><br />1037 <Tab n="1"/><highlight><gsf:metadata name="dc.Creator" /></highlight><br /> 1038 1038 </td><br /> 1039 1039 </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><gsf:metadata name="dc.Creator" multiple="true"/></Format> displays all the Creator metadata for the document, separated by a comma (<AutoText text=", " type="quoted"/>), while <Format><gsf:metadata name="dc.Creator" /></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><gsf:metadata name="dc.Creator" multiple="true"/></Format> with <Format><gsf:metadata name="dc.Creator" multiple="true" separator="&lt;br/&gt;" /></Format>. This will add a new line after each author (<Format>&lt;br/&gt;</Format> is the escaped version of <Format><br/></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 <gsf:metadata name="dc.Creator" multiple="true"/> <br /> 1047 <gsf:metadata name="ex.Creator" multiple="true"/><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><gsf:metadata name="dc.Creator" /></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><gsf:metadata name="dc.Creator" select="siblings"/></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><gsf:metadata name="dc.Creator" pos="first"/></Format> (or alternatively, <Format><gsf:metadata name="dc.Creator" pos="0"/></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><gsf:metadata name="dc.Creator" /></Format> with <Format><gsf:metadata name="dc.Creator" separator="&lt;br/&gt;" /></Format>. This will add a new line after each author (<Format>&lt;br/&gt;</Format> is the escaped version of <Format><br/></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 <gsf:metadata name="dc.Creator" /> <br /> 1049 <gsf:metadata name="ex.Creator" /><br /> 1050 </Format> 1051 <Text id="fw-23a-3">To display dc.Creator if it is present, otherwise display ex.Creator, use</Text> 1050 1052 <Format> 1051 1053 <gsf:choose-metadata><br /> 1052 <Tab n="1"/><gsf:metadata name="dc.Creator" multiple="true"/><br />1053 <Tab n="1"/><gsf:metadata name="ex.Creator" multiple="true"/><br />1054 <Tab n="1"/><gsf:metadata name="dc.Creator" /><br /> 1055 <Tab n="1"/><gsf:metadata name="ex.Creator" /><br /> 1054 1056 </gsf:choose-metadata><br /> 1055 1057 </Format>
Note:
See TracChangeset
for help on using the changeset viewer.