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

updated the gsf:metadata options in the formatting section

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

Legend:

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

    r25806 r26102  
    784784\gst{<gsf:icon type='source'/>} & An appropriate icon for the original file e.g. Word, PDF icon\\
    785785\hline
    786 \gst{<gsf:metadata name='Title'/>} & The value of a metadata element for the current document or section, in this case, Title\\
     786\gst{<gsf:metadata name='Title'/>} & All the values of a metadata element for the current document or section, in this case, Title\\
    787787\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 \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. \\
     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 listed in Table~\ref{tab:gsf-process-types}. \\
    789789\hline
    790790\gst{<gsf:choose-metadata>
     
    832832\bf Select Type & \bf Description\\
    833833\hline
    834 current & The current section \\
    835834parent & The immediate parent section\\
    836835ancestors & All the parents back to the root (topmost) section\\
    837836root & The root or topmost section \\
    838 siblings & All the sibling sections\\
    839 children & The immediate child sections of the current section\\
    840 descendants & All the descendent sections\\
     837%siblings & All the sibling sections\\
     838%children & The immediate child sections of the current section\\
     839%descendants & All the descendent sections\\
     840\hline
     841\end{tabular}}
     842\end{table}
     843
     844\begin{table}
     845\caption{String processing option, for preprocess in gsf:switch, and format in gsf:metadata}
     846\label{tab:gsf-process-types}
     847{\footnotesize
     848\begin{tabular}{ll}
     849\hline
     850\bf Process Type & \bf Description\\
     851\hline
     852toUpper & Make the value upper case \\
     853toLower & Make the value lower case \\
     854tidyWhitespace & Replace multiple whitespace characters with a single space \\
     855stripWhitespace & Removes all whitespace characters \\
     856cgiSafe &Make value safe to be a cgi argument \\
     857formatDate & turns '20040201' into '01 February 2004' in a language dependent manner \\
     858formatLanguage & turns 'en' into 'English' in a language dependent manner\\
     859formatBigNumber & \\
    841860\hline
    842861\end{tabular}}
     
    854873\end{gsc}
    855874
    856 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.
     875This 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.
    857876
    858877The \gst{<gsf:switch>} 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.
     
    871890\end{gsc}
    872891
    873 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).
     892Preprocessing 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).
    874893
    875894Each 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.