Author: cdupoirieux
Date: Thu Dec 22 07:43:54 2005
New Revision: 358580

URL: http://svn.apache.org/viewcvs?rev=358580&view=rev
Log:
compare page path and node path without extension to solve the problem of page 
unselected when the extension is not html...
(cf. php output plugin.)

Modified:
    forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/book-to-menu.xsl
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/tabutils.xsl

Modified: 
forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl?rev=358580&r1=358579&r2=358580&view=diff
==============================================================================
--- forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl 
(original)
+++ forrest/trunk/main/webapp/resources/stylesheets/site-to-site-selectnode.xsl 
Thu Dec 22 07:43:54 2005
@@ -22,11 +22,17 @@
 -->
 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:l="http://apache.org/forrest/linkmap/1.0";>
+  <xsl:import href="pathutils.xsl"/>
 
   <xsl:param name="path" select="'index'"/>
 
   <xsl:variable name="tab">
-    <xsl:value-of select="string(//*[starts-with(@href, $path)]/@tab)"/>
+    <xsl:variable name="path-noext">
+     <xsl:call-template name="path-noext">
+      <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+    <xsl:value-of select="string(//*[starts-with(@href, $path-noext)]/@tab)"/>
   </xsl:variable>
 
   <xsl:template match="/*">

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/book-to-menu.xsl
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/book-to-menu.xsl?rev=358580&r1=358579&r2=358580&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/book-to-menu.xsl
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/book-to-menu.xsl
 Thu Dec 22 07:43:54 2005
@@ -88,15 +88,19 @@
       </xsl:call-template>
     </xsl:variable>
 
-    <xsl:variable name="node-path">
-      <xsl:call-template name="normalize">
-        <xsl:with-param name="path" select="concat($dirname, $href-nofrag)"/>
+    <xsl:variable name="node-path-noext">
+      <xsl:call-template name="path-noext">
+        <xsl:with-param name="path">
+          <xsl:call-template name="normalize">
+            <xsl:with-param name="path" select="concat($dirname, 
$href-nofrag)"/>
+          </xsl:call-template>
+        </xsl:with-param>
       </xsl:call-template>
     </xsl:variable>
 
     <xsl:choose>
       <!-- Compare with extensions stripped -->
-      <xsl:when test="$node-path = $path-nofrag">
+      <xsl:when test="$node-path-noext = $path-nofrag-noext">
         <xsl:choose>
           <xsl:when test="contains(@href, '#')">
             <xsl:call-template name="selected-anchor"/>
@@ -137,6 +141,16 @@
   <xsl:variable name="path-nofrag">
     <xsl:call-template name="path-nofrag">
       <xsl:with-param name="path" select="$path"/>
+    </xsl:call-template>
+  </xsl:variable>
+
+  <xsl:variable name="path-nofrag-noext">
+    <xsl:call-template name="path-noext">
+      <xsl:with-param name="path">
+        <xsl:call-template name="path-nofrag">
+          <xsl:with-param name="path" select="$path"/>
+        </xsl:call-template>
+      </xsl:with-param>
     </xsl:call-template>
   </xsl:variable>
 

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/tabutils.xsl
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/tabutils.xsl?rev=358580&r1=358579&r2=358580&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/tabutils.xsl
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/resources/stylesheets/common/xslt/html/tabutils.xsl
 Thu Dec 22 07:43:54 2005
@@ -71,7 +71,7 @@
     the path of the 'current' tab.
   -->
   <xsl:template name="matching-id" 
xmlns:l="http://apache.org/forrest/linkmap/1.0";>
-    <xsl:value-of select="$site//*[starts-with(@href, $path)]/@tab"/>
+    <xsl:value-of select="$site//*[starts-with(@href, $path-noext)]/@tab"/>
   </xsl:template>
  
   <!--


Reply via email to