# Changeset 26102 for main

Ignore:
Timestamp:
2012-08-14T14:45:33+12:00 (9 years ago)
Message:

updated the gsf:metadata options in the formatting section

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

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

 r25806 \gst{} & An appropriate icon for the original file e.g. Word, PDF icon\\ \hline \gst{} & The value of a metadata element for the current document or section, in this case, Title\\ \gst{} & All the values of a metadata element for the current document or section, in this case, Title\\ \gst{} & 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.\\ \gst{} & 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. \\ \gst{} & The value of a metadata element for the current document, formatted in some way. Current formatting options available are listed in Table~\ref{tab:gsf-process-types}. \\ \hline \gst{ \bf Select Type & \bf Description\\ \hline current & The current section \\ parent & The immediate parent section\\ ancestors & All the parents back to the root (topmost) section\\ root & The root or topmost section \\ siblings & All the sibling sections\\ children & The immediate child sections of the current section\\ descendants & All the descendent sections\\ %siblings & All the sibling sections\\ %children & The immediate child sections of the current section\\ %descendants & All the descendent sections\\ \hline \end{tabular}} \end{table} \begin{table} \caption{String processing option, for preprocess in gsf:switch, and format in gsf:metadata} \label{tab:gsf-process-types} {\footnotesize \begin{tabular}{ll} \hline \bf Process Type & \bf Description\\ \hline toUpper & Make the value upper case \\ toLower & Make the value lower case \\ tidyWhitespace & Replace multiple whitespace characters with a single space \\ stripWhitespace & Removes all whitespace characters \\ cgiSafe &Make value safe to be a cgi argument \\ formatDate & turns '20040201' into '01 February 2004' in a language dependent manner \\ formatLanguage & turns 'en' into 'English' in a language dependent manner\\ formatBigNumber & \\ \hline \end{tabular}} \end{gsc} This will display dls.Title if available, otherwise it will use dc.Title if available, otherwise it will use the Title metadata. If there are no values for any of these metadata elements, then nothing will be displayed. This will display dc.Title if available, otherwise it will use dls.Title if available, otherwise it will use the Title metadata. If there are no values for any of these metadata elements, then nothing will be displayed. The \gst{} element allows different formatting depending on the value of a specified metadata element. For example, the following switch statement could be used to display a different icon for each document in a list depending on which organization it came from. \end{gsc} Preprocessing of the metadata value is optional. The preprocess types are \gst{toLower} (make the value lowercase), \gst{toUpper} (make the value uppercase), \gst{stripSpace} (removes any whitespace from the value). These operations are carried out on the value of the selected metadata before the test is carried out. Multiple processing types can be specified, separated by ; and they will be applied in the order specified (from left to right). Preprocessing of the metadata value is optional. The preprocess types are listed in Table~\ref{tab:gsf-process-types}. These operations are carried out on the value of the selected metadata before the test is carried out. Multiple processing types can be specified, separated by ; and they will be applied in the order specified (from left to right). Each option specifies a test and a test value. Test values are just text. Tests include \gst{startsWith}, \gst{contains}, \gst{exists}, \gst{equals}, \gst{endsWith}. Exists doesn't need a test value. Having an otherwise option ensures that something will be displayed even when none of the tests match.
Note: See TracChangeset for help on using the changeset viewer.