User Tools

Site Tools


en:user:list_of_format_options

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
en:user:list_of_format_options [2016/05/12 00:18] kjdonen:user:list_of_format_options [2016/05/12 01:56] (current) – removed kjdon
Line 1: Line 1:
-====== List of GS3 Format Options ====== 
- 
-The full list of formatting options is shown here.  
-See also the description of [[en:user:format_statements|format statements]], and some [[en:user:sample_format_statements | sample format statements]] for miscellaneous tasks. 
- 
- 
-^Greenstone3 format statement items^^^ 
-^Format Statement^Greenstone2 equivalent^Description^ 
-|     ||| 
-^//Templates//^^^ 
-|''<gsf:template match="documentNode"></gsf:template>'' |Templates are the containers that hold all format statements. The value of ''match'' determines which part of the page content the template applies to.|  
-^//Links//^^^ 
-|''<gsf:link></gsf:link>'' or \\ ''<gsf:link type='document'></gsf:link>''|''[link][/link]''|The HTML link to the Greenstone version of the document| 
-|''<gsf:link type='source'></gsf:link>''|''[srclink][/srclink]''|The HTML link to the original file for documents that have been converted, e.g. Word,PDF, PS| 
-|''<gsf:link type='classifier'></gsf:link>'' |A link to a classification node (use in classifierNode templates)| 
-^//Icons//^^^ 
-|''<gsf:icon/>'' or \\ ''<gsf:icon type='document'/>''|''[icon]''|An appropriate icon for the document (e.g. book or page icon)| 
-|''<gsf:metadata name="srcicon"/>''|''[srcicon]''|An appropriate icon for the original file e.g. Word, PDF icon, if available| 
-|''<gsf:icon type='classifier'/>'' |Bookshelf icon (generally used for classification nodes)| 
-|''<gsf:metadata name="thumbicon"/>'' |Thumbnail for images  (default width 100px, which can be modified in ImagePlugin options)| 
-|''<gsf:metadata name="screenicon"/>'' |For images, a decent-sized version (width of 500px) for displaying the image in a webpage| 
-^//Text and Metadata//^^^ 
-|''<gsf:text/>''|''[Text]''|The document's text| 
-|''<gsf:metadata name='Title'/>'' or \\ ''<gsf:metadata name='Title' select='current'/>''|''[Title]''|The value of a metadata element for the current document or section, in this case, Title| 
-|''<gsf:metadata name='Title' select='select-type' [separator='; ' pos='first']/>'' |A more extended selection of metadata values. The select field can be one of those shown in the table below. There are two optional attributes: separator gives a String that will be used to separate the fields, default is "“,"“, and pos selects one particular value.| 
-|''<gsf:metadata name='Title' select='parent' />''|''[parent:Title]''|The Title of the parent of the current document/section| 
-|''<gsf:metadata name='Title' select='ancestors'/>''|''[parent(All):Title]''|The Title of all of the parent documents/sections, separated by a comma| 
-|''<gsf:metadata name='Title' select='root' />''|''[parent(Top):Title]''|The Title of the top-level document (i.e. in a sectioned document, the Title of the document itself)| 
-|''<gsf:metadata name='Title' select='ancestors' separator=': ' />''|''[parent(All': '):Title]''|The Title of all of the parent documents/sections, separated by ": "| 
-|''<gsf:metadata name='Title' separator=': ' />''|''[sibling(All': '):Title]''|The Title of all of the current document's/section's siblings, separated by ": "| 
-|''<gsf:metadata name='dc.Date,Date'/>'' |All dc.Dates and Dates (in the order that they come out of the database.| 
-|''<gsf:metadata name='dc.Date,Date' pos='classifiedBy'/>'' |The actual date (dc.Date or Date) that was used to classify the document into its current position in the classifier (List -metadata dc.Date,Date)| 
-|''<gsf:metadata name='Date' format='formatDate'/>'' |The value of a metadata element for the current document, formatted in some way. formatDate turns '20040201' into '01 February 2004' (in a language dependent manner).| 
-|''<gsf:metadata name='Language' format='format-Language'/>'' |The value of a metadata element for the current document, formatted in some way. format-Language: turns language code into language name, e.g. 'en' into 'English'.| 
-^//Conditional//^^^ 
-|''<gsf:choose-metadata><gsf:metadata name='dc.Title'/><gsf:metadata name='dls.Title'/><gsf:metadata name='Title'/></gsf:choose-metadata>''|''[Or}{[dc.Title], [dls.Title], [Title]}''|A choice of metadata. Will select the first existing one. The metadata elements can have the select, separator and multiple attributes like normal.| 
-|''<gsf:choose-metadata> <gsf:metadata name='Title' select='parent'/><gsf:metadata name='Title'/></gsf:choose-metadata>''|''[If}{[parent:Title],[parent:Title], [Title]}''|A choice of metadata. Will select the first existing one.| 
-|''<gsf:switch><gsf:metadata name='Subject'/><gsf:when test='exists'><td><gsf:metadata name='Subject'/></td></gsf:when></gsf:switch>''|''[If}{[Subject],<td>[Subject]</td>}''|Switch on the existence or value of a particular metadata - the metadata is specified in gsf:metadata, has the same attributes as normal.| 
-|''<gsf:switch preprocess='preprocess-type'> \\ <gsf:metadata name='Title'/> \\ <gsf:when test='test-type' test-value='xxx'>...</gsf:when> \\ <gsf:when test='test-type' test-value='yyy'>...</gsf:when> \\ <gsf:otherwise>...</gsf:otherwise> \\ </gsf:switch>'' |switch on the value of a particular metadata - the metadata is specified in gsf:metadata, has the same attributes as normal.| 
-^//Iteration//^^^ 
-|''<gsf:foreach-metadata name='Subject'> \\ <b><gsf:meta-value/></b> \\ </gsf:foreach-metadata>''| |Iterate over metadata values and output each one. Use this instead of <gsf:metadata> if you want to put HTML around each value, which you can't do using a separator. <gsf:meta-value/> is a placeholder for where the metadata value is to go in the output.| 
-|''<gsf:foreach-metadata name='Subject'> \\ <gsf:sort/> \\ <b><gsf:meta-value/></b> \\ </gsf:foreach-metadata>'' |Iterate over each sorted metadata item. For a basic sort, use @sort='true' in the <gsf:foreach-metadata> element. For a more specific sort, use the <gsf:sort> element which mirrors the <xsl:sort> element. For attributes, see below.| 
- 
-===== gsf:metadata attributes ===== 
- 
-^gsf:metadata Attribute^Possible Values^Description^ 
-^select|current|The current section (this is the default type; if ''select'' is not specified, the current section is assumed)| 
-^:::|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| 
-^:::|descendents|All the descendent sections| 
-^pos|first, last or any number (1,2,3,etc.) |gsf:metadata by default displays all values of a metadata field for a document; this allows you to select which one you want (e.g. the first, second, 8th one listed)| 
-^:::|classifiedBy|If the document has multiple values for the metadata element that you have classified on, this allows you to select the value that was used to classify the document into its current position in the classifier. Only useful in documentNode templates for a classifier.| 
-^separator|Any character(s)|when there are multiple values for a metadata field for a document, they are separated by a ", " by default; this allows you to select whatever separator you would like| 
-^format|formatDate|turns '20040201' into '01 February 2004' (in a language dependent manner)| 
-^:::|formatLanguage|turns language code into language name, e.g. 'en' into 'English'.| 
- 
-===== gsf:foreach-metadata attributes ===== 
- 
-^gsf:foreach-metadata Attribute^Possible Values^Description^ 
-^select|current|The current section (this is the default type; if ''select'' is not specified, the current section is assumed)| 
-^:::|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| 
-^:::|descendents|All the descendent sections| 
-^separator|Any character(s)|This will be output between each value| 
-^sort|true|Sort the metadata values (alphabetically, ascending order)| 
- 
-===== gsf:sort attributes ===== 
- 
-^gsf:sort Attribute^Possible Values^Description^ 
-^select|Expression|Defines the sort key. The default is the string value of the node. Not so useful in this context.| 
-^order|ascending/descending|Defines sort order| 
-^case-order|upper-first/lower-first|Defines whether upper-case letters are to be sorted before or after lower-case letters. Default is language dependent.| 
-^lang|language code|Defines the language whose sorting conventions are to be used| 
-^data-type|text/number/data-type name|Defines whether values are sorted alphabetically, numerically, or using a user-defined data type| 
- 
  
en/user/list_of_format_options.1463012285.txt.gz · Last modified: 2016/05/12 00:18 by kjdon