ghoward 2003/03/30 04:48:33
Modified: src/webapp/stylesheets/system error2html.xslt
status2html.xslt
src/webapp/samples sitemap.xmap
src/webapp/samples/common/style/xsl/html
simple-page2html.xsl simple-samples2html.xsl
src/webapp sitemap.xmap
Log:
use $contextPath in xsl to accomodate different context names.
Revision Changes Path
1.5 +4 -2 cocoon-2.1/src/webapp/stylesheets/system/error2html.xslt
Index: error2html.xslt
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/stylesheets/system/error2html.xslt,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- error2html.xslt 26 Mar 2003 21:21:29 -0000 1.4
+++ error2html.xslt 30 Mar 2003 12:48:32 -0000 1.5
@@ -6,20 +6,22 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:error="http://apache.org/cocoon/error/2.1">
+<xsl:param name="contextPath" select="string('/cocoon')"/>
+
<xsl:template match="error:notify">
<html>
<head>
<title>
<xsl:value-of select="error:title"/>
</title>
- <link href="/styles/main.css" type="text/css" rel="stylesheet"/>
+ <link href="{$contextPath}/styles/main.css" type="text/css" rel="stylesheet"/>
<style>
h1 { color: #336699; text-align: left; margin: 0px 0px 30px 0px;
padding: 0px; border-width: 0px 0px 1px 0px; border-style: solid; border-color:
#336699;}
p.message { padding: 10px 30px 10px 30px; font-weight: bold;
font-size: 130%; border-width: 1px; border-style: dashed; border-color: #336699; }
p.description { padding: 10px 30px 20px 30px; border-width: 0px 0px
1px 0px; border-style: solid; border-color: #336699;}
p.topped { padding-top: 10px; border-width: 1px 0px 0px 0px;
border-style: solid; border-color: #336699; }
</style>
- <script src="/scripts/main.js" type="text/javascript"/>
+ <script src="{$contextPath}/scripts/main.js" type="text/javascript"/>
</head>
<body>
<h1><xsl:value-of select="error:title"/></h1>
1.4 +4 -2 cocoon-2.1/src/webapp/stylesheets/system/status2html.xslt
Index: status2html.xslt
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/stylesheets/system/status2html.xslt,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- status2html.xslt 26 Mar 2003 21:21:30 -0000 1.3
+++ status2html.xslt 30 Mar 2003 12:48:32 -0000 1.4
@@ -7,13 +7,15 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:status="http://apache.org/cocoon/status/2.0">
+
+ <xsl:param name="contextPath" select="string('/cocoon')"/>
<xsl:template match="status:statusinfo">
<html>
<head>
<title>Cocoon Status [<xsl:value-of select="@status:host"/>]</title>
- <link href="/styles/main.css" type="text/css" rel="stylesheet"/>
- <script src="/scripts/main.js" type="text/javascript"/>
+ <link href="{$contextPath}/styles/main.css" type="text/css"
rel="stylesheet"/>
+ <script src="{$contextPath}/scripts/main.js" type="text/javascript"/>
</head>
<body>
1.11 +10 -4 cocoon-2.1/src/webapp/samples/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/samples/sitemap.xmap,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- sitemap.xmap 27 Mar 2003 17:55:45 -0000 1.10
+++ sitemap.xmap 30 Mar 2003 12:48:32 -0000 1.11
@@ -119,14 +119,18 @@
<map:match pattern="status.html">
<map:generate src="status" type="status"/>
- <map:transform src="context://stylesheets/system/status2html.xslt"/>
+ <map:transform src="context://stylesheets/system/status2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
<map:serialize/>
</map:match>
<map:match pattern="clearcache.html">
<map:act type="clear-cache">
<map:generate src="status" type="status"/>
- <map:transform src="context://stylesheets/system/status2html.xslt"/>
+ <map:transform src="context://stylesheets/system/status2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
<map:serialize/>
</map:act>
</map:match>
@@ -134,7 +138,9 @@
<map:match pattern="clearpersistentstore.html">
<map:act type="clear-persistent-store">
<map:generate src="status" type="status"/>
- <map:transform src="context://stylesheets/system/status2html.xslt"/>
+ <map:transform src="context://stylesheets/system/status2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
<map:serialize/>
</map:act>
</map:match>
1.4 +1 -1
cocoon-2.1/src/webapp/samples/common/style/xsl/html/simple-page2html.xsl
Index: simple-page2html.xsl
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/webapp/samples/common/style/xsl/html/simple-page2html.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- simple-page2html.xsl 27 Mar 2003 17:55:47 -0000 1.3
+++ simple-page2html.xsl 30 Mar 2003 12:48:33 -0000 1.4
@@ -26,7 +26,7 @@
<xsl:template match="page">
<html>
- <link rel="stylesheet" href="/styles/main.css" title="Default Style"/>
+ <link rel="stylesheet" href="{$contextPath}/styles/main.css" title="Default
Style"/>
<head>
<title>
<xsl:value-of select="title"/>
1.3 +1 -1
cocoon-2.1/src/webapp/samples/common/style/xsl/html/simple-samples2html.xsl
Index: simple-samples2html.xsl
===================================================================
RCS file:
/home/cvs/cocoon-2.1/src/webapp/samples/common/style/xsl/html/simple-samples2html.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- simple-samples2html.xsl 26 Mar 2003 21:21:44 -0000 1.2
+++ simple-samples2html.xsl 30 Mar 2003 12:48:33 -0000 1.3
@@ -16,7 +16,7 @@
<table border="0" cellspacing="2" cellpadding="2" align="center" width="100%">
<tr>
<td width="*"><font face="arial,helvetica,sanserif" color="#000000">The
Apache Software Foundation is proud to present...</font></td>
- <td width="40%" align="center"><img border="0" src="/images/cocoon.gif"/></td>
+ <td width="40%" align="center"><img border="0"
src="{$contextPath}/images/cocoon.gif"/></td>
<td width="30%" align="center"><font face="arial,helvetica,sanserif"
color="#000000"><b>version @version@</b></font></td>
</tr>
<tr>
1.9 +4 -2 cocoon-2.1/src/webapp/sitemap.xmap
Index: sitemap.xmap
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/webapp/sitemap.xmap,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sitemap.xmap 28 Mar 2003 13:40:24 -0000 1.8
+++ sitemap.xmap 30 Mar 2003 12:48:33 -0000 1.9
@@ -497,7 +497,9 @@
| manipulate the error screen.
+-->
<map:handle-errors>
- <map:transform src="stylesheets/system/error2html.xslt"/>
+ <map:transform src="stylesheets/system/error2html.xslt">
+ <map:parameter name="contextPath" value="{request:contextPath}"/>
+ </map:transform>
<map:serialize/>
</map:handle-errors>