You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2009/04/17 16:44:42 UTC
svn commit: r766036 - in /lenya/docu/modules/forrest: sitemap.xmap
xslt/addForrestNamespace.xsl xslt/forrestDocument202xhtml.xsl
xslt/forrestDocument202xhtmlInclude.xsl xslt/removeNamespaces.xsl
xslt/toc.xsl
Author: andreas
Date: Fri Apr 17 14:44:42 2009
New Revision: 766036
URL: http://svn.apache.org/viewvc?rev=766036&view=rev
Log:
Add forrest namespace instead of removing it (XSLT needs it for Firedocs).
Added:
lenya/docu/modules/forrest/xslt/addForrestNamespace.xsl
- copied, changed from r766026, lenya/docu/modules/forrest/xslt/removeNamespaces.xsl
Removed:
lenya/docu/modules/forrest/xslt/removeNamespaces.xsl
Modified:
lenya/docu/modules/forrest/sitemap.xmap
lenya/docu/modules/forrest/xslt/forrestDocument202xhtml.xsl
lenya/docu/modules/forrest/xslt/forrestDocument202xhtmlInclude.xsl
lenya/docu/modules/forrest/xslt/toc.xsl
Modified: lenya/docu/modules/forrest/sitemap.xmap
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/sitemap.xmap?rev=766036&r1=766035&r2=766036&view=diff
==============================================================================
--- lenya/docu/modules/forrest/sitemap.xmap (original)
+++ lenya/docu/modules/forrest/sitemap.xmap Fri Apr 17 14:44:42 2009
@@ -77,7 +77,7 @@
<map:transform src="fallback://lenya/modules/forrest/xslt/{doc-info:{2}:{3}:{4}:{5}:resourceType}2document.xsl"/>
</map:when>
</map:select>
- <map:transform src="fallback://lenya/modules/forrest/xslt/removeNamespaces.xsl"/>
+ <map:transform src="fallback://lenya/modules/forrest/xslt/addForrestNamespace.xsl"/>
<map:transform src="fallback://lenya/modules/forrest/xslt/forrestDocument202{1}.xsl">
<map:parameter name="rendertype" value="{request-param:rendertype}"/>
<map:parameter name="nodeid" value="{doc-info:{2}:{3}:{4}:{5}:nodeName}"/>
Copied: lenya/docu/modules/forrest/xslt/addForrestNamespace.xsl (from r766026, lenya/docu/modules/forrest/xslt/removeNamespaces.xsl)
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/xslt/addForrestNamespace.xsl?p2=lenya/docu/modules/forrest/xslt/addForrestNamespace.xsl&p1=lenya/docu/modules/forrest/xslt/removeNamespaces.xsl&r1=766026&r2=766036&rev=766036&view=diff
==============================================================================
--- lenya/docu/modules/forrest/xslt/removeNamespaces.xsl (original)
+++ lenya/docu/modules/forrest/xslt/addForrestNamespace.xsl Fri Apr 17 14:44:42 2009
@@ -22,7 +22,7 @@
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="*">
- <xsl:element name="{local-name()}">
+ <xsl:element name="{local-name()}" namespace="http://apache.org/lenya/forrest">
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:element>
Modified: lenya/docu/modules/forrest/xslt/forrestDocument202xhtml.xsl
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/xslt/forrestDocument202xhtml.xsl?rev=766036&r1=766035&r2=766036&view=diff
==============================================================================
--- lenya/docu/modules/forrest/xslt/forrestDocument202xhtml.xsl (original)
+++ lenya/docu/modules/forrest/xslt/forrestDocument202xhtml.xsl Fri Apr 17 14:44:42 2009
@@ -20,25 +20,26 @@
+-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:forrest="http://apache.org/lenya/forrest"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:include href="toc.xsl"/>
- <xsl:preserve-space elements="source"/>
+ <xsl:preserve-space elements="forrest:source"/>
- <xsl:template match="/document">
+ <xsl:template match="/forrest:document">
<html>
<body>
- <xsl:apply-templates select="header/title"/>
- <xsl:apply-templates select="body" mode="toc"/>
+ <xsl:apply-templates select="forrest:header/forrest:title"/>
+ <xsl:apply-templates select="forrest:body" mode="toc"/>
<xsl:choose>
- <xsl:when test="document/body/row">
+ <xsl:when test="forrest:document/forrest:body/forrest:row">
<table width="100%">
- <xsl:apply-templates select="body"/>
+ <xsl:apply-templates select="forrest:body"/>
</table>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="body"/>
+ <xsl:apply-templates select="forrest:body"/>
</xsl:otherwise>
</xsl:choose>
</body>
@@ -46,23 +47,23 @@
</xsl:template>
- <xsl:template match="body">
+ <xsl:template match="forrest:body">
<xsl:apply-templates/>
</xsl:template>
- <xsl:template match="document/header/title">
+ <xsl:template match="forrest:document/forrest:header/forrest:title">
<h1><xsl:value-of select="."/></h1>
</xsl:template>
- <xsl:template match="row">
+ <xsl:template match="forrest:row">
<tr>
- <xsl:apply-templates select="column"/>
+ <xsl:apply-templates select="forrest:column"/>
</tr>
</xsl:template>
- <xsl:template match="column">
+ <xsl:template match="forrest:column">
<td valign="top">
<h4 class="samplesGroup">
<xsl:value-of select="@title"/>
@@ -73,7 +74,7 @@
</td>
</xsl:template>
- <xsl:template match="section">
+ <xsl:template match="forrest:section">
<xsl:variable name="id">
<xsl:call-template name="generate-id"/>
</xsl:variable>
@@ -82,26 +83,26 @@
</xsl:template>
- <xsl:template match="section/title">
+ <xsl:template match="forrest:section/forrest:title">
<xsl:element name="h{1 + count(ancestor::section)}" namespace="http://www.w3.org/1999/xhtml">
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
- <xsl:template match="source">
+ <xsl:template match="forrest:source">
<pre class="source">
<xsl:value-of select="."/>
</pre>
</xsl:template>
- <xsl:template match="link">
+ <xsl:template match="forrest:link">
<xsl:text> </xsl:text><a href="{@href}">
<xsl:apply-templates/></a>
<xsl:text> </xsl:text>
</xsl:template>
- <xsl:template match="strong">
+ <xsl:template match="forrest:strong">
<xsl:text> </xsl:text>
<b>
<xsl:apply-templates/>
@@ -110,7 +111,7 @@
</xsl:template>
- <xsl:template match="anchor"><a name="{@name}">
+ <xsl:template match="forrest:anchor"><a name="{@name}">
<xsl:apply-templates/></a>
</xsl:template>
@@ -122,23 +123,23 @@
</xsl:template> -->
- <xsl:template match="para">
+ <xsl:template match="forrest:para">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
- <xsl:template match="figure">
+ <xsl:template match="forrest:figure">
<img src="{@src}" alt="{@title}"/>
</xsl:template>
- <xsl:template match="warning|note|fixme">
+ <xsl:template match="forrest:warning | forrest:note | forrest:fixme">
<div class="{local-name()}Title">
<div>
<xsl:value-of select="local-name()"/>
- <xsl:if test="self::fixme">
+ <xsl:if test="self::forrest:fixme">
(author: <xsl:value-of select="@author"/>)
</xsl:if>
</div>
@@ -150,14 +151,14 @@
<!-- Don't apply text nodes in tables, otherwise position() doesn't work for row selection. -->
- <xsl:template match="table">
+ <xsl:template match="forrest:table">
<xsl:copy>
<xsl:apply-templates select="@*|*"/>
</xsl:copy>
</xsl:template>
- <xsl:template match="table[@class = 'list' or @class = 'properties']/tr">
+ <xsl:template match="forrest:table[@class = 'list' or @class = 'properties']/forrest:tr">
<xsl:copy>
<xsl:attribute name="class">
<xsl:choose>
Modified: lenya/docu/modules/forrest/xslt/forrestDocument202xhtmlInclude.xsl
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/xslt/forrestDocument202xhtmlInclude.xsl?rev=766036&r1=766035&r2=766036&view=diff
==============================================================================
--- lenya/docu/modules/forrest/xslt/forrestDocument202xhtmlInclude.xsl (original)
+++ lenya/docu/modules/forrest/xslt/forrestDocument202xhtmlInclude.xsl Fri Apr 17 14:44:42 2009
@@ -20,22 +20,23 @@
+-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:forrest="http://apache.org/lenya/forrest"
xmlns="http://www.w3.org/1999/xhtml">
<xsl:import href="forrestDocument202xhtml.xsl"/>
- <xsl:preserve-space elements="source"/>
+ <xsl:preserve-space elements="forrest:source"/>
<xsl:template match="/">
<div class="include">
<xsl:choose>
- <xsl:when test="document/body/row">
+ <xsl:when test="forrest:document/forrest:body/forrest:row">
<table width="100%">
- <xsl:apply-templates select="document/body/*"/>
+ <xsl:apply-templates select="forrest:document/forrest:body/*"/>
</table>
</xsl:when>
<xsl:otherwise>
- <xsl:apply-templates select="document/body/*"/>
+ <xsl:apply-templates select="forrest:document/forrest:body/*"/>
</xsl:otherwise>
</xsl:choose>
</div>
Modified: lenya/docu/modules/forrest/xslt/toc.xsl
URL: http://svn.apache.org/viewvc/lenya/docu/modules/forrest/xslt/toc.xsl?rev=766036&r1=766035&r2=766036&view=diff
==============================================================================
--- lenya/docu/modules/forrest/xslt/toc.xsl (original)
+++ lenya/docu/modules/forrest/xslt/toc.xsl Fri Apr 17 14:44:42 2009
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:forrest="http://apache.org/lenya/forrest"
xmlns="http://www.w3.org/1999/xhtml">
<!-- Templates for "toc" mode. This will generate a complete
@@ -23,28 +24,28 @@
</xsl:template>
- <xsl:template match="body" mode="toc">
- <xsl:if test="section">
+ <xsl:template match="forrest:body" mode="toc">
+ <xsl:if test="forrest:section">
<div class="tocTitle">
<div>Table of Contents</div>
</div>
<ul class="toc">
- <xsl:apply-templates select="section" mode="toc"/>
+ <xsl:apply-templates select="forrest:section" mode="toc"/>
</ul>
</xsl:if>
</xsl:template>
- <xsl:template match="section" mode="toc">
+ <xsl:template match="forrest:section" mode="toc">
<xsl:param name="level" select="number(1)"/>
<li>
<a>
<xsl:attribute name="href">#<xsl:call-template name="generate-id"/></xsl:attribute>
- <xsl:value-of select="title"/>
+ <xsl:value-of select="forrest:title"/>
</a>
- <xsl:if test="section">
+ <xsl:if test="forrest:section">
<ul class="toc">
- <xsl:apply-templates select="section" mode="toc">
+ <xsl:apply-templates select="forrest:section" mode="toc">
<xsl:with-param name="level" select="$level+1"/>
</xsl:apply-templates>
</ul>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org