Changeset 28619 for documentation/trunk/tutorials
- Timestamp:
- 2013-11-13T12:38:11+13:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/tutorials/xml-source/tutorial_en.xml
r28617 r28619 986 986 </Format> 987 987 <Text id="fw-6-3">chooses <i>ex.thumbicon</i> metadata if it's there, otherwise chooses <i>ex.srcicon</i> metadata. If neither are present, nothing is displayed. For this collection there is no <i>ex.thumbicon</i> metadata so the choice is not needed.</Text> 988 <Text id="fw-7-3">Replace the above with</Text>988 <Text id="fw-7-3">Replace the longer excerpt above with</Text> 989 989 <Format> 990 990 <td valign="top"><br/> … … 1039 1039 </Heading> 1040 1040 <NumberedItem> 1041 <Text id="fw-14">Next, we'll customize the format statement 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.1042 <MajorVersion number="2"> 1043 < 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.1041 <Text id="fw-14">Next, we'll customize the format statement 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: <i>ex.Title</i> and <i>numleafdocs</i>. Whatever metadata the classifier has been built on, the bookshelf label is always stored as <i>ex.Title</i>. This is why a Creator is printed out for each bookshelf even though <i>dc.Creator</i> is not specified in the format statement. 1042 <MajorVersion number="2"> 1043 <i>[numleafdocs]</i> 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. 1044 1044 </MajorVersion> 1045 1045 </Text> … … 1057 1057 <gsf:template match="classifierNode[@classifierStyle = 'VList']"><br /> 1058 1058 <Tab n="1"/>...<br /> 1059 <Tab n="1"/><highlight><td >(<gsf:metadata name="numleafdocs"/>)</td></highlight><br />1059 <Tab n="1"/><highlight><td valign="top">(<gsf:metadata name="numleafdocs"/>)</td></highlight><br /> 1060 1060 </gsf:template><br /> 1061 1061 <gsf:template match="classifierNode[@classifierStyle = 'HList']"><br /> … … 1124 1124 </Format> 1125 1125 <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> 1126 <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>1127 <Text id="fw-21b-3">I f 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="1"/></Format>) displays only the first author.</Text>1126 <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"/>). All the metadata values for dc.Creator will be returned by default. If you wish to retrieve only the <i>first</i>, <i>last</i> or <i>n</i>th value for a metadata, you would use the <i>pos</i> attribute. For example, <Format><gsf:metadata name="dc.Creator" pos="first"/></Format> (or alternatively, <Format><gsf:metadata name="dc.Creator" pos="1"/></Format>) displays only the first author. </Text> 1127 <Text id="fw-21b-3">In sectioned documents, you can allow users to browse and search on the section level. In this case, you may want to request metadata for the <i>parent</i>, <i>ancestors</i>, or <i>root</i> (i.e. document) of the current section. For instance, is you want to display the title of the section's parent you can use <Format><gsf:metadata name="Title" select="parent"/></Format>.</Text> 1128 1128 </NumberedItem> 1129 1129 <NumberedItem> 1130 1130 <MajorVersion number="2"><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></MajorVersion> 1131 1131 <MajorVersion number="3"> 1132 <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=" "/></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 ( <br />) element:1132 <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=" "/></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 (<Format><br /></Format>) element: 1133 1133 </Text> 1134 1134 <Format> … … 1175 1175 <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> 1176 1176 <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> 1177 <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>1177 <Text id="0322b">If you set the <AutoText text="metadata"/> field of <AutoText text="AZCompactList"/> to <i><AutoText key="metadata::dc.Creator" type="plain"/><AutoText text=",ex.Creator" type="plain"/></i> 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> 1178 1178 </NumberedItem> 1179 1179 </Content>
Note:
See TracChangeset
for help on using the changeset viewer.