source: main/trunk/greenstone3/web/interfaces/default/transform/text_fragment_format.xsl@ 26326

Last change on this file since 26326 was 26326, checked in by sjm84, 12 years ago

Changing how collection text is retrieved so that they can contain gsf elements. The downside is that it <fragment> elements turn up in the HTML. Possibly need a better solution in the future

  • Property svn:executable set to *
File size: 1.3 KB
RevLine 
[26326]1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:xslt="output.xsl"
5 xmlns:java="http://xml.apache.org/xslt/java"
6 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
7 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
8 extension-element-prefixes="java">
9 <xsl:param name="interface_name"/>
10 <xsl:param name="library_name"/>
11 <xsl:param name="site_name"/>
12 <xsl:param name="collName"/>
13
14 <xsl:output method="xml"/>
15 <xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>
16
17 <!-- With gsf:interfaceText, a user can request a string from the interface dictionaries in the current lang -->
18 <xsl:template match="gsf:interfaceText" name="gsf:interfaceText">
19 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, /page/@lang, @name)"/>
20 </xsl:template>
21
22 <!-- With gsf:collectionText, a user can request a string from the collection's dictionary in the current lang -->
23 <xsl:template match="gsf:collectionText" name="gsf:collectionText">
24 <xsl:copy-of select="util:getCollectionText($collName, $site_name, /page/@lang, @name)"/>
25 </xsl:template>
26
27 <xsl:template match="*">
28 <xsl:copy>
29 <xsl:copy-of select="@*"/>
30 <xsl:apply-templates/>
31 </xsl:copy>
32 </xsl:template>
33</xsl:stylesheet>
34
35
Note: See TracBrowser for help on using the repository browser.