- Timestamp:
- 2012-08-14T14:45:33+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
r25806 r26102 784 784 \gst{<gsf:icon type='source'/>} & An appropriate icon for the original file e.g. Word, PDF icon\\ 785 785 \hline 786 \gst{<gsf:metadata name='Title'/>} & The valueof 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\\ 787 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 \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}. \\ 789 789 \hline 790 790 \gst{<gsf:choose-metadata> … … 832 832 \bf Select Type & \bf Description\\ 833 833 \hline 834 current & The current section \\835 834 parent & The immediate parent section\\ 836 835 ancestors & All the parents back to the root (topmost) section\\ 837 836 root & 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 852 toUpper & Make the value upper case \\ 853 toLower & Make the value lower case \\ 854 tidyWhitespace & Replace multiple whitespace characters with a single space \\ 855 stripWhitespace & Removes all whitespace characters \\ 856 cgiSafe &Make value safe to be a cgi argument \\ 857 formatDate & turns '20040201' into '01 February 2004' in a language dependent manner \\ 858 formatLanguage & turns 'en' into 'English' in a language dependent manner\\ 859 formatBigNumber & \\ 841 860 \hline 842 861 \end{tabular}} … … 854 873 \end{gsc} 855 874 856 This will display d ls.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.875 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. 857 876 858 877 The \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. … … 871 890 \end{gsc} 872 891 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).892 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). 874 893 875 894 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.