root/main/trunk/greenstone3/web/interfaces/default/transform/text_fragment_format.xsl @ 31656

Revision 30478, 1.4 KB (checked in by davidb, 4 years ago)

Changes in the XSL and JS code to support the new approach taken to client-side XSLT (using Saxon-CE JS library in the browser). Also the reintroduction of the DirectEdit? (Seaweed) template. Not on by default but a simple matter to call the re-instated template for projects that would like to make use of it, such as the digital music stand DL collection. Some white-space changes also occured. This was not deliberate, but would have been quite fiddly to tease out from other changes in the file, so consequently left in.

  • Property svn:executable set to *
Line 
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="use_client_side_xslt"/>
13    <xsl:param name="collName"/>
14    <xsl:param name="lang"/>
15 
16    <xsl:output method="xml"/>
17    <xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/>
18
19    <!-- With gsf:interfaceText, a user can request a string from the interface dictionaries in the current lang -->
20    <xsl:template match="gsf:interfaceText" name="gsf:interfaceText">
21        <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText($interface_name, $lang, @name)"/>
22    </xsl:template>
23
24    <!-- With gsf:collectionText, a user can request a string from the collection's dictionary in the current lang -->
25    <xsl:template match="gsf:collectionText" name="gsf:collectionText">
26        <xsl:copy-of select="util:getCollectionText($collName, $site_name, $lang, @name, @args)/node()"/>
27    </xsl:template>
28
29    <xsl:template match="*">
30        <xsl:copy>
31        <xsl:copy-of select="@*"/>
32            <xsl:apply-templates/>
33        </xsl:copy>
34    </xsl:template>
35</xsl:stylesheet>
36
37
Note: See TracBrowser for help on using the browser.