User Tools

Site Tools


en:user:gs3_sample_format_statements

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:user:gs3_sample_format_statements [2016/10/12 21:47] – can't use innerHTML if the element already has content kjdonen:user:gs3_sample_format_statements [2023/03/13 01:46] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +
 +
 +
  
 ====== Sample Greenstone3 Format Statements ====== ====== Sample Greenstone3 Format Statements ======
Line 154: Line 157:
  
  
-===== Linking metadata to a search =====+===== Handling multi-valued metadata ===== 
 + 
 +==== Displaying values in a bulleted list ==== 
 + 
 +Say we want to display all the authors of a document in a bulleted list. We can't just use <gsf:metadata name="dc.Creator"/> as it will put all the names out in a comma separated list. However, we can use the prefix and suffix options to put some HTML before and after each author. 
 + 
 +<code> 
 +<ul> 
 +<gsf:metadata name="dc.Creator" separator=""><prefix><gsf:html>&lt;li&gt;&lt;b&gt;</gsf:html></prefix> 
 +<suffix><gsf:html>&lt;/b&gt;&lt;/li&gt;</gsf:html></suffix></gsf:metadata> 
 +</ul> 
 +</code> 
 + 
 +This will produce output like: 
 + 
 +<ul><li><b>John Smith</b></li><li><b>Katherine Don</b></li><li><b>Cliff Richard</b></li></ul> 
 +==== Linking metadata to a search ==== 
 + 
 +How to link metadata values to a search for that value?
  
-How to link metadata values to a search for that value. 
 For example, say a document has several authors, stored as dc.Creator metadata. You can display a list of the authors, each one linked to a search of the dc.Creator index for that author. For example, say a document has several authors, stored as dc.Creator metadata. You can display a list of the authors, each one linked to a search of the dc.Creator index for that author.
  
Line 353: Line 373:
  
 Greenstone provides a shorthand: **<gsf:html>"</gsf:html>**, which gets resolved to <xsl:text> with the disable-output-escaping attribute set.  Greenstone provides a shorthand: **<gsf:html>"</gsf:html>**, which gets resolved to <xsl:text> with the disable-output-escaping attribute set. 
- 
- 
- 
  
  
  
  
en/user/gs3_sample_format_statements.1476308842.txt.gz · Last modified: 2016/10/12 21:47 by kjdon