You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by je...@apache.org on 2002/11/22 12:16:09 UTC
cvs commit: xml-forrest/src/resources/skins/common/xslt/html book2menu.xsl
jefft 2002/11/22 03:16:09
Modified: . status.xml
src/resources/skins/common/xslt/html book2menu.xsl
Log:
Fix a longstanding bug where multiple menu entries are sometimes highlighted.
PR: FOR-2
Revision Changes Path
1.67 +4 -0 xml-forrest/status.xml
Index: status.xml
===================================================================
RCS file: /home/cvs/xml-forrest/status.xml,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- status.xml 22 Nov 2002 10:30:13 -0000 1.66
+++ status.xml 22 Nov 2002 11:16:08 -0000 1.67
@@ -24,6 +24,10 @@
<changes>
<release version="0.3-dev" date="unreleased">
+ <action dev="JT" type="fix" context="skins">
+ Fixed a bug where multiple menu entries are highlighted if the filenames
+ share a common prefix.
+ </action>
<action dev="DC" type="add" context="build">
Allow configuration of a project local-catalog and the entity resolver
verbosity level, via forrest.properties configuration. This replaces
1.4 +10 -2 xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl
Index: book2menu.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/book2menu.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- book2menu.xsl 17 Nov 2002 00:00:02 -0000 1.3
+++ book2menu.xsl 22 Nov 2002 11:16:09 -0000 1.4
@@ -46,8 +46,16 @@
<xsl:template match="menu-item">
<!-- Use apply-imports when overriding -->
+
+ <xsl:variable name="href-noext">
+ <xsl:call-template name="filename-noext">
+ <xsl:with-param name="path" select="@href"/>
+ </xsl:call-template>
+ </xsl:variable>
+
<xsl:choose>
- <xsl:when test="starts-with(@href, $filename-noext)">
+ <!-- Compare with extensions stripped -->
+ <xsl:when test="$href-noext = $filename-noext">
<xsl:call-template name="selected"/>
</xsl:when>
<xsl:otherwise>