You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/11/10 01:23:57 UTC
svn commit: r332183 - in
/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy:
resources.xmap resources/stylesheets/navigation-to-includes.xsl
resources/stylesheets/navigation-to-siteSnippet.xsl
Author: rgardler
Date: Wed Nov 9 16:23:28 2005
New Revision: 332183
URL: http://svn.apache.org/viewcvs?rev=332183&view=rev
Log:
handle imports in navigation documents
Added:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl (with props)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-siteSnippet.xsl
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap?rev=332183&r1=332182&r2=332183&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources.xmap Wed Nov 9 16:23:28 2005
@@ -51,6 +51,7 @@
<map:match pattern="daisy.site.*">
<map:generate src="{lm:{0}}" />
<map:transform src="{lm:daisy.transform.navigation.siteSnippet}"/>
+ <map:transform type="xinclude"/>
<map:serialize type="xml" />
</map:match>
</map:pipeline>
Added: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl?rev=332183&view=auto
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl (added)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl Wed Nov 9 16:23:28 2005
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 1999-2004 The Apache Software Foundation
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<!--+
+ | Add an edit link into the page content.
+ +-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:d="http://outerx.org/daisy/1.0#navigationspec"
+ xmlns="http://apache.org/forrest/locationmap/1.0"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+
+ <xsl:param name="publisherURL"/>
+
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+
+ <xsl:template match="d:import">
+ <xi:include>
+ <xsl:attribute name="href"><xsl:value-of select="$publisherURL"/>blob?documentId=<xsl:value-of select="@docId"/>&version=live&partType=1</xsl:attribute>
+ </xi:include>
+ </xsl:template>
+
+ <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+ <xsl:copy>
+ <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+ </xsl:copy>
+ </xsl:template>
+
+</xsl:stylesheet>
Propchange: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl
------------------------------------------------------------------------------
svn:eol-style = native
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-siteSnippet.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-siteSnippet.xsl?rev=332183&r1=332182&r2=332183&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-siteSnippet.xsl (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-siteSnippet.xsl Wed Nov 9 16:23:28 2005
@@ -19,6 +19,7 @@
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:d="http://outerx.org/daisy/1.0#navigationspec"
+ xmlns:xi="http://www.w3.org/2001/XInclude"
version="1.0">
<xsl:template match="/">
@@ -91,13 +92,16 @@
<group>
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
<xsl:attribute name="label"><xsl:value-of select="@label"/></xsl:attribute>
- <xsl:attribute name="href">
- <xsl:choose>
- <xsl:when test="@nodeId"><xsl:value-of select="@nodeId"/>/</xsl:when>
- <xsl:otherwise><xsl:value-of select="@id"/>/</xsl:otherwise>
- </xsl:choose>
- </xsl:attribute>
+ <xsl:if test="not(d:import)">
+ <xsl:attribute name="href"><xsl:value-of select="@id"/>/</xsl:attribute>
+ </xsl:if>
<xsl:apply-templates/>
</group>
+ </xsl:template>
+
+ <xsl:template match="d:import">
+ <xi:include>
+ <xsl:attribute name="href">cocoon://daisy.site.<xsl:value-of select="@docId"/></xsl:attribute>
+ </xi:include>
</xsl:template>
</xsl:stylesheet>