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 2003/07/02 13:58:44 UTC
cvs commit: xml-forrest/src/resources/stylesheets/aggregates relativize-split-linkmap.xsl
jefft 2003/07/02 04:58:44
Modified: src/resources/stylesheets absolutize-linkmap.xsl
relativize-linkmap.xsl
src/resources/stylesheets/aggregates
relativize-split-linkmap.xsl
Log:
Allow arbitrary URL schemes in site.xml and friends. Thanks to Dave Brondsema
Revision Changes Path
1.3 +2 -2 xml-forrest/src/resources/stylesheets/absolutize-linkmap.xsl
Index: absolutize-linkmap.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/absolutize-linkmap.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- absolutize-linkmap.xsl 8 Jan 2003 05:44:34 -0000 1.2
+++ absolutize-linkmap.xsl 2 Jul 2003 11:58:44 -0000 1.3
@@ -30,8 +30,8 @@
<!-- Recursive template to collate @href's -->
<xsl:template name="absolutize">
<xsl:param name="node"/>
- <!-- Only append ancestor hrefs if we're not a http(s): URL -->
- <xsl:if test="not(starts-with($node/@href, 'http:') or starts-with($node/@href, 'https:'))">
+ <!-- Only append ancestor hrefs if we're not a uri-scheme: URL -->
+ <xsl:if test="not(contains($node/@href, ':')) or contains(substring-before($node/@href, ':'), '/')">
<xsl:if test="$node/..">
<xsl:call-template name="absolutize">
<xsl:with-param name="node" select="$node/.."/>
1.7 +1 -1 xml-forrest/src/resources/stylesheets/relativize-linkmap.xsl
Index: relativize-linkmap.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/relativize-linkmap.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- relativize-linkmap.xsl 26 Jun 2003 05:50:03 -0000 1.6
+++ relativize-linkmap.xsl 2 Jul 2003 11:58:44 -0000 1.7
@@ -59,7 +59,7 @@
<xsl:attribute name="href">
<xsl:choose>
- <xsl:when test="starts-with(., 'http:') or starts-with(., 'https:')">
+ <xsl:when test="contains(., ':') and not(contains(substring-before(., ':'), '/'))">
<xsl:value-of select="."/>
</xsl:when>
<xsl:when test="contains(., '.png') or
1.6 +1 -1 xml-forrest/src/resources/stylesheets/aggregates/relativize-split-linkmap.xsl
Index: relativize-split-linkmap.xsl
===================================================================
RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/aggregates/relativize-split-linkmap.xsl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- relativize-split-linkmap.xsl 26 Jun 2003 05:42:34 -0000 1.5
+++ relativize-split-linkmap.xsl 2 Jul 2003 11:58:44 -0000 1.6
@@ -61,7 +61,7 @@
<xsl:attribute name="href">
<xsl:choose>
- <xsl:when test="starts-with(., 'http:') or starts-with(., 'https:')">
+ <xsl:when test="contains(., ':') and not(contains(substring-before(., ':'), '/'))">
<xsl:value-of select="."/>
</xsl:when>
<xsl:when test="contains(., '.png') or