source: main/trunk/greenstone3/web/interfaces/default/transform/layouts/header-vars.xsl@ 38966

Last change on this file since 38966 was 38841, checked in by kjdon, 3 months ago

when I added a global format statement containing <gsf:link> in it to a collection, the about page crapped out due to variable opt-doc-link-args not being defined. This is used in the replacement xsl for gsf:link. This means that any page could potentially have this problem, so I added the empty default def into header-vars, and removed it from individual page xsl

File size: 1.7 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 xmlns:gslib="http://www.greenstone.org/skinning"
7 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8 extension-element-prefixes="java util"
9 exclude-result-prefixes="java util gsf">
10
11
12 <!-- If the c parameter is empty then use the p.c parameter for the collection name-->
13 <xsl:variable name="collNameChecked">
14 <xsl:choose>
15 <xsl:when test="$collName = '' and /page/pageRequest/paramList/param[@name='p.c']/@value">
16 <xsl:value-of select="/page/pageRequest/paramList/param[@name='p.c']/@value"/>
17 </xsl:when>
18 <xsl:otherwise>
19 <xsl:value-of select="$collName"/>
20 </xsl:otherwise>
21 </xsl:choose>
22 </xsl:variable>
23
24 <xsl:variable name="servletProtocol">
25 <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_protocol']/@value"/>
26 </xsl:variable>
27 <xsl:variable name="servletDomain">
28 <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_domain']/@value"/>
29 </xsl:variable>
30 <xsl:variable name="servletOptPort">
31 <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_opt_port']/@value"/>
32 </xsl:variable>
33 <xsl:variable name="servletContext">
34 <xsl:value-of select="/page/pageResponse/interfaceOptions/option[@name = 'servlet_context']/@value"/>
35 </xsl:variable>
36
37 <!-- define this in a page xsl if you need args to be added to doc links -->
38 <xsl:variable name="opt-doc-link-args"></xsl:variable>
39</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.