You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2004/08/29 05:38:40 UTC
svn commit: rev 37167 - in forrest/trunk: . src/core/context/resources/stylesheets
Author: crossley
Date: Sat Aug 28 20:38:39 2004
New Revision: 37167
Modified:
forrest/trunk/src/core/context/resources/stylesheets/absolutize-linkmap.xsl
forrest/trunk/status.xml
Log:
Only absolutize the href path if it is not already and absolute path.
Issue: FOR-268
Modified: forrest/trunk/src/core/context/resources/stylesheets/absolutize-linkmap.xsl
==============================================================================
--- forrest/trunk/src/core/context/resources/stylesheets/absolutize-linkmap.xsl (original)
+++ forrest/trunk/src/core/context/resources/stylesheets/absolutize-linkmap.xsl Sat Aug 28 20:38:39 2004
@@ -15,7 +15,8 @@
limitations under the License.
-->
<!--
-Stylesheet to recursively append all @href's in a tree. Eg, given as input:
+Stylesheet to recursively append all @href's in a tree,
+e.g. given as input:
<site href="">
<community href="community/">
@@ -58,9 +59,18 @@
<xsl:template match="@href">
<xsl:attribute name="href">
- <xsl:call-template name="absolutize">
- <xsl:with-param name="node" select=".."/>
- </xsl:call-template>
+ <xsl:choose>
+ <xsl:when test="starts-with(., '/')">
+ <!-- already is an absolute path, strip the leading slash -->
+ <xsl:value-of select="substring-after(., '/')"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- the path needs to be absolutized -->
+ <xsl:call-template name="absolutize">
+ <xsl:with-param name="node" select=".."/>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:attribute>
</xsl:template>
Modified: forrest/trunk/status.xml
==============================================================================
--- forrest/trunk/status.xml (original)
+++ forrest/trunk/status.xml Sat Aug 28 20:38:39 2004
@@ -49,6 +49,10 @@
Added new document to facilitate
<link href="site:upgrading_06">upgrading to v0.6</link>
</action>
+ <action dev="DC" type="fix" context="core" fixes-bug="FOR-268"
+ Relative URIs with absolute paths were broken in the site.xml
+ linking mechanism.
+ </action>
<action dev="DC" type="fix" context="core" due-to="Fabio Rinaldi">
Re-write the Chaperon grammar for CWiki to address ambiguity with
paragraphs and sub-sections.