Ignore:
Timestamp:
2012-06-21T18:15:32+12:00 (12 years ago)
Author:
ak19
Message:

metadata attribute multiple has been replaced by new attribute pos.

Location:
main/trunk/greenstone3/docs/manual
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/docs/manual/manual.tex

    r25804 r25806  
    785785\hline
    786786\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 values at 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.\\
    788788\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. \\
    789789\hline
     
    793793  <gsf:metadata name='metaC'/>
    794794</gsf:choose-metadata>}
    795  & A choice of metadata. Will select the first existing one. the metadata elements can have the select, separator and multiple attributes 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.\\
    796796\hline
    797797\gst{<gsf:switch preprocess=
     
    808808\end{table}
    809809
    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.
     810The \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).
     811For 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.
    812812
    813813Sometimes 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:
     
    23432343\gst{[parent(All': '):Title]} & \gst{<gsf:metadata name='Title' select='ancestors'}\\
    23442344& \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'} \\
    23462347& \gst{  separator=': ' />}\\
    23472348\gst{\{Or\}\{[dc.Title],}  & \gst{<gsf:choose-metadata>}\\
Note: See TracChangeset for help on using the changeset viewer.