source: main/trunk/greenstone3/web/interfaces/default/transform/gli4gs3.xsl@ 32156

Last change on this file since 32156 was 32156, checked in by ak19, 5 years ago

Dr Bainbridge fixed gli4gs3.xsl so that the new GLI Web Start application can be successfully run from a remote machine after it's been downloaded.

File size: 3.1 KB
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:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 extension-element-prefixes="java util"
7 exclude-result-prefixes="java util">
8
9 <xsl:output method="xml"/>
10
11 <!--
12 1. This XSLT rewrites the applet page generated by PageAction, from the top node of / down,
13 to replace it with a JNLP Java Web Start file to launch GLI (web/applet/SignedGatherer.java).
14 2. Putting in an xml processing instruction doesn't seem to go through and causes stylesheet transform errors
15 after following https://www.w3schools.com/xml/ref_xsl_el_processing-instruction.asp
16 -->
17 <xsl:template match="/">
18 <!--
19 /*
20 * Java Web Start support for Greenstone Librarian Interface (GLI) applet.
21 * Copyright (C) 2002 New Zealand Digital Library, http://www.nzdl.org
22 *
23 * This program is free software; you can redistribute it and/or modify
24 * it under the terms of the GNU General Public License as published by
25 * the Free Software Foundation; either version 2 of the License, or
26 * (at your option) any later version.
27 *
28 * This program is distributed in the hope that it will be useful,
29 * but WITHOUT ANY WARRANTY; without even the implied warranty of
30 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 * GNU General Public License for more details.
32 *
33 * You should have received a copy of the GNU General Public License
34 * along with this program; if not, write to the Free Software
35 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
36 */
37 -->
38 <jnlp
39 spec="1.0+"
40 href=""><!-- don't set href to GLIappWebStart.jnlp, because when downloading it will then expect a static file by that name to exist in the location given by codebase-->
41 <xsl:attribute name="codebase"><xsl:value-of select='/page/pageRequest/@baseURL'/>applet</xsl:attribute><!--set codebase to location of jar file-->
42
43 <information>
44 <title>Greenstone Librarian Interface</title>
45 <vendor>New Zealand Digital Library</vendor>
46 <homepage href="http://www.greenstone.org/"/>
47 <description>GLI</description>
48 <description kind="short">Greenstone Librarian Interface (GLI) as Web Start Application over JNLP</description>
49 <offline-allowed/>
50 </information>
51 <resources>
52 <j2se version="1.7+"/>
53 <jar href="SignedGatherer.jar"/>
54 </resources>
55 <application-desc main-class="org.greenstone.gatherer.WebGatherer">
56 <!--<argument>-gwcgi=/greenstone3</argument>
57 <argument>-gsdl3=true</argument>-->
58 <argument>-gwcgi=<xsl:value-of select="/page/pageResponse/Applet/PARAM[@name='gwcgi']/@value" /></argument>
59 <argument>-gsdl3=<xsl:value-of select="/page/pageResponse/Applet/PARAM[@name='gsdl3']/@value" /></argument>
60 </application-desc>
61 <!-- https://stackoverflow.com/questions/12600076/getting-user-home-folder-from-jws-signed-jar -->
62 <security>
63 <all-permissions/>
64 </security>
65 </jnlp>
66
67 </xsl:template>
68
69</xsl:stylesheet>
70
Note: See TracBrowser for help on using the repository browser.