Changeset 25806 for main/trunk/greenstone3/docs
- Timestamp:
- 2012-06-21T18:15:32+12:00 (12 years ago)
- Location:
- main/trunk/greenstone3/docs/manual
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/docs/manual/manual.tex
r25804 r25806 785 785 \hline 786 786 \gst{<gsf:metadata name='Title'/>} & The value of a metadata element for the current document or section, in this case, Title\\ 787 \gst{<gsf:metadata name='Title' select='select-type' [separator='y' multiple='true']/>} & A more extended selection of metadata values. The select field can be one of those shown in Table~\ref{tab:gsf-select-types}. There are two optional attributes: separator gives a String that will be used to separate the fields, default is ``, ``, and if multiple is set to true, looks for multiple valuesat each section.\\787 \gst{<gsf:metadata name='Title' select='select-type' [separator='y' pos='first|last|n']/>} & A more extended selection of metadata values. The select field can be one of those shown in Table~\ref{tab:gsf-select-types}. There are two optional attributes: separator gives a String that will be used to separate the fields, default is ``, ``, and pos can be set to return either the first, last or nth value for that metadata at each section.\\ 788 788 \gst{<gsf:metadata name='Date' format='formatDate'/>} & The value of a metadata element for the current document, formatted in some way. Current formatting options available are formatDate: turns '20040201' into '01 February 2004', and formatLanguage: turns 'en' into 'English', both in a language dependent manner. \\ 789 789 \hline … … 793 793 <gsf:metadata name='metaC'/> 794 794 </gsf:choose-metadata>} 795 & A choice of metadata. Will select the first existing one. the metadata elements can have the select, separator and multipleattributes like normal.\\795 & A choice of metadata. Will select the first existing one. the metadata elements can have the select, separator and pos attributes like normal.\\ 796 796 \hline 797 797 \gst{<gsf:switch preprocess= … … 808 808 \end{table} 809 809 810 The \gst{<gsf:metadata>} elements are used to output metadata values. The simplest case is \gst{<gsf:metadata name='Title'/>}---this outputs the Title metadata for the current document or section. Namespaces are important here: if the Title metadata is in the Dublin Core (dc) namespace, then the element should look like \gst{<gsf:metadata name='dc.Title'/>}. There are three other attributes for this element. The attribute \gst{multiple} is used when there may be more than one value for the selected metadata.811 For instance, one document may fall into several classification categories, and therefore may have multiple Subject metadata values. Adding \gst{multiple='true'} to the \gst{<gsf:metadata>} element will retrieve all values, not just the first one. Multiple values are separated by commas by default. The \gst{separator} attribute is used to change the separating string. For example, adding \gst{separator=':~'} to the element will separate all values by a colon and a space.810 The \gst{<gsf:metadata>} elements are used to output metadata values. The simplest case is \gst{<gsf:metadata name='Title'/>}---this outputs all the Title metadata values for the current document or section. Namespaces are important here: if the Title metadata is in the Dublin Core (dc) namespace, then the element should look like \gst{<gsf:metadata name='dc.Title'/>}. There are three other attributes for this element. By default, more than one value for the selected metadata is returned, where multiple exist. The attribute \gst{pos} is used when a particular value for the selected metadata is requested (which can be the first, last or nth value). 811 For instance, one document may fall into several classification categories, and therefore may have multiple Subject metadata values. When all are returned, the multiple values are separated by commas by default. The \gst{separator} attribute is used to change the separating string. For example, adding \gst{separator=':~'} to the element will separate all values by a colon and a space. Instead of retrieving all values for a piece of metadata, adding \gst{pos='first'} to the \gst{<gsf:metadata>} element will retrieve the first value. 812 812 813 813 Sometimes you may want to display metadata values for sections other than the current one. For example, in the mgppdemo collection, in a search list we display the Titles of all the enclosing sections, followed by the Title of the current section, all separated by semi-colons. The display ends up looking something like: … … 2343 2343 \gst{[parent(All': '):Title]} & \gst{<gsf:metadata name='Title' select='ancestors'}\\ 2344 2344 & \gst{ separator=': ' />}\\ 2345 \gst{[sibling(All': '):Title]} & \gst{<gsf:metadata name='Title' multiple='true'} \\ 2345 \gst{[sibling:dc.Title]} & \gst{<gsf:metadata name='dc.Title' pos='first'} \\ 2346 \gst{[sibling(All': '):Title]} & \gst{<gsf:metadata name='Title'} \\ 2346 2347 & \gst{ separator=': ' />}\\ 2347 2348 \gst{\{Or\}\{[dc.Title],} & \gst{<gsf:choose-metadata>}\\
Note:
See TracChangeset
for help on using the changeset viewer.