forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From je...@apache.org
Subject cvs commit: xml-forrest/src/resources/library/xslt absolutize-linkmap.xsl
Date Mon, 06 Jan 2003 15:15:57 GMT
jefft       2003/01/06 07:15:57

  Modified:    src/resources/library/xslt Tag: LINKMAP_BRANCH
                        absolutize-linkmap.xsl
  Log:
  If a @href is absolute, don't prepend the ancestor @hrefs
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +7 -4      xml-forrest/src/resources/library/xslt/Attic/absolutize-linkmap.xsl
  
  Index: absolutize-linkmap.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/library/xslt/Attic/absolutize-linkmap.xsl,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- absolutize-linkmap.xsl	26 Dec 2002 14:41:15 -0000	1.1.2.2
  +++ absolutize-linkmap.xsl	6 Jan 2003 15:15:56 -0000	1.1.2.3
  @@ -30,10 +30,13 @@
     <!-- Recursive template to collate @href's -->
     <xsl:template name="absolutize">
       <xsl:param name="node"/>
  -    <xsl:if test="$node/..">
  -      <xsl:call-template name="absolutize">
  -        <xsl:with-param name="node" select="$node/.."/>
  -      </xsl:call-template>
  +    <!-- 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:'))">
  +      <xsl:if test="$node/..">
  +        <xsl:call-template name="absolutize">
  +          <xsl:with-param name="node" select="$node/.."/>
  +        </xsl:call-template>
  +      </xsl:if>
       </xsl:if>
       <xsl:value-of select="$node/@href"/>
   
  
  
  

Mime
View raw message