You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by rg...@apache.org on 2005/11/16 16:54:50 UTC

svn commit: r345044 - in /cocoon/whiteboard/daisy-to-docs/src/documentation: resources/stylesheets/daisy/navigation-to-locationmap.xsl sitemap.xmap

Author: rgardler
Date: Wed Nov 16 07:54:40 2005
New Revision: 345044

URL: http://svn.apache.org/viewcvs?rev=345044&view=rev
Log:
generate changes and todo from status.xml

Added:
    cocoon/whiteboard/daisy-to-docs/src/documentation/resources/stylesheets/daisy/navigation-to-locationmap.xsl   (with props)
Modified:
    cocoon/whiteboard/daisy-to-docs/src/documentation/sitemap.xmap

Added: cocoon/whiteboard/daisy-to-docs/src/documentation/resources/stylesheets/daisy/navigation-to-locationmap.xsl
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/daisy-to-docs/src/documentation/resources/stylesheets/daisy/navigation-to-locationmap.xsl?rev=345044&view=auto
==============================================================================
--- cocoon/whiteboard/daisy-to-docs/src/documentation/resources/stylesheets/daisy/navigation-to-locationmap.xsl (added)
+++ cocoon/whiteboard/daisy-to-docs/src/documentation/resources/stylesheets/daisy/navigation-to-locationmap.xsl Wed Nov 16 07:54:40 2005
@@ -0,0 +1,100 @@
+<?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">
+                
+  <xsl:param name="publisherURL"/>
+  <xsl:param name="pathPrefix"/>
+  <xsl:param name="index"/>
+                
+  <xsl:template match="/">
+    <locationmap>
+  
+      <components>
+        <matchers default="lm">
+          <matcher 
+            name="lm" 
+            src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+        </matchers>
+      </components>
+      
+      <locator>
+        <match pattern="project.status">
+          <location src="http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/status.xml"/>
+        </match>
+     
+       <match pattern="index.xml">
+           <location>
+             <xsl:attribute name="src"><xsl:value-of select="$index"/></xsl:attribute>
+           </location>
+       </match>
+     
+       <xsl:apply-templates/>
+        
+       <match pattern="project.*.daisy.source">
+           <location>
+             <xsl:attribute name="src"><xsl:value-of select="$publisherURL"/>document?documentId={1}&amp;includeNavigation=false&amp;locale=en_US&amp;version=live</xsl:attribute>
+           </location>
+       </match>
+     
+       <match pattern="**/*.daisy.img">
+           <location>
+             <xsl:attribute name="src"><xsl:value-of select="$publisherURL"/>blob?documentId={2}&amp;version=live&amp;partType=3</xsl:attribute>
+           </location>
+       </match>
+     
+       <match pattern="daisy.site.*">
+           <location>
+             <xsl:attribute name="src"><xsl:value-of select="$publisherURL"/>blob?documentId={1}&amp;version=live&amp;partType=1</xsl:attribute>
+           </location>
+       </match>
+      </locator>
+    </locationmap>
+  </xsl:template>
+    
+  <xsl:template match="d:doc">    
+    <xsl:variable name="path">
+      <xsl:for-each select="ancestor::d:group|ancestor::d:doc">
+        <xsl:choose>
+          <xsl:when test="@nodeId"><xsl:value-of select="@nodeId"/>/</xsl:when>
+          <xsl:otherwise>
+            <xsl:if test="name()='d:group'"><xsl:value-of select="@id"/>/</xsl:if>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:for-each>
+      <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:variable>
+     <match>
+       <xsl:attribute name="pattern"><xsl:value-of select="$pathPrefix"/><xsl:value-of select="$path"/>.daisy.source</xsl:attribute>
+       <location>
+         <xsl:attribute name="src"><xsl:value-of select="$publisherURL"/>document?documentId=<xsl:value-of select="@id"/>&amp;includeNavigation=false&amp;locale=en_US&amp;version=live</xsl:attribute>
+       </location> 
+     </match>
+     <xsl:apply-templates/>
+  </xsl:template>
+  
+</xsl:stylesheet>

Propchange: cocoon/whiteboard/daisy-to-docs/src/documentation/resources/stylesheets/daisy/navigation-to-locationmap.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: cocoon/whiteboard/daisy-to-docs/src/documentation/sitemap.xmap
URL: http://svn.apache.org/viewcvs/cocoon/whiteboard/daisy-to-docs/src/documentation/sitemap.xmap?rev=345044&r1=345043&r2=345044&view=diff
==============================================================================
--- cocoon/whiteboard/daisy-to-docs/src/documentation/sitemap.xmap (original)
+++ cocoon/whiteboard/daisy-to-docs/src/documentation/sitemap.xmap Wed Nov 16 07:54:40 2005
@@ -21,11 +21,7 @@
 
       <map:match pattern="locationmap-project.xml">
         <map:generate src="cocoon:/daisy.navigation.655"/>
-        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-includes.xsl">
-          <map:parameter name="publisherURL" value="http://publish:publish@cocoon.zones.apache.org:9263/publisher/"/>
-        </map:transform>
-        <map:transform type="xinclude"/>
-        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-locationmap.xsl">
+        <map:transform src="{project:resources.stylesheets}/daisy/navigation-to-locationmap.xsl">
           <map:parameter name="publisherURL" value="http://publish:publish@cocoon.zones.apache.org:9263/publisher/"/>
           <map:parameter name="pathPrefix" value="2.1/"/>
         </map:transform>
@@ -46,6 +42,25 @@
         <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.Daisy/resources/stylesheets/navigation-to-siteSnippet.xsl"/>
         <map:transform type="xinclude"/>
         <map:serialize type="xml" />
+      </map:match>
+      
+      <!-- The following two matchers are from the projectInfo plugin
+           This is a hack to prevent the Daisy matchers below from intercepting
+           the call to projectInfo, the need for this hack will be removed in a 
+           future version of the Daisy plugin. -->
+      <map:match type="regexp" pattern="^(.*?)([^/]*)changes.xml$">
+        <map:generate type="file" src="{lm:project.status}" />
+        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/changes-to-document.xsl" >
+          <map:parameter name="bugtracking-url" value="{defaults:bugtracking-url}"/>
+          <map:parameter name="path" value="{1}{2}"/>
+        </map:transform>
+        <map:serialize type="xml-document"/>
+      </map:match>
+
+      <map:match type="regexp" pattern="^(.*?)([^/]*)todo.xml$">
+        <map:generate type="file" src="{lm:project.status}" />
+        <map:transform src="{forrest:plugins}/org.apache.forrest.plugin.input.projectInfo/resources/stylesheets/todo-to-document.xsl"/>
+        <map:serialize type="xml-document"/>
       </map:match>
 
       <map:match pattern="2.1/*.xml">