User Tools

Site Tools


Table of Contents

gslib: XSL utility templates

Greenstone 3 has a gslib.xsl file which defines a lot of utility templates. These can be called simply by <gslib:templatename/>. They are basically just shortcuts to things.

For example, gslib.xsl defines the following template:

<xsl:template name="siteName">
  <xsl:value-of select="/page/pageResponse/displayItemList/displayItem[@name='siteName']"/>

This can be called using <gslib:siteName/>

It also defines some common variables, which can be accessed by all template files, using $variablename.

gslib.xsl can be found in web/interfaces/default/transform/gslib.xsl.


$interface_name The internal name of the current interface, eg 'default'
$library_name The name of the library servlet, eg 'library'
$site_name The internal name of the current site, eg 'localsite'.


gslib defines HEAPS of templates. Here is just a few of them.

<gslib:siteName/> The display name of the site
<gslib:siteDescription/> The description of the site
<gslib:collectionMeta name="xxx"/>
<gslib:defaultDividerBar text="display text"/>
<gslib:groupName path=""/>
<gslib:groupDescription path=""/>
<gslib:groupHref path=""/>
en/user/gslib.txt · Last modified: 2023/03/13 01:46 by