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/stylesheets relativize-linkmap.xsl
Date Sun, 15 Jun 2003 12:35:17 GMT
jefft       2003/06/15 05:35:17

  Modified:    src/resources/stylesheets relativize-linkmap.xsl
  Log:
  Cleaner handling of images
  
  Revision  Changes    Path
  1.5       +10 -6     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- relativize-linkmap.xsl	15 Jun 2003 08:29:01 -0000	1.4
  +++ relativize-linkmap.xsl	15 Jun 2003 12:35:17 -0000	1.5
  @@ -44,7 +44,7 @@
   <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   
     <xsl:param name="path"/>
  -  <xsl:param name="site-root" select="'http://localhost:8787/forrest/'"/>
  +  <xsl:param name="site-root"/>
   
     <xsl:include href="dotdots.xsl"/>
   
  @@ -62,14 +62,18 @@
           <xsl:when test="starts-with(., 'http:') or starts-with(., 'https:')">
             <xsl:value-of select="."/>
           </xsl:when>
  +        <xsl:when test="contains(., '.png') or
  +          contains(., '.jpeg') or
  +          contains(., '.jpg') or
  +          contains(., '.tif')">
  +          <!-- Image links are always relative -->
  +          <xsl:value-of select="$root"/><xsl:value-of select="."/>
  +        </xsl:when>
  +
   
           <!-- PDFs can handle inline images, but everything else must become an
           external link -->
  -        <xsl:when test="contains($path, '.pdf') and not(
  -        contains(., '.png') or
  -        contains(., '.jpeg') or
  -        contains(., '.jpg') or
  -        contains(., '.tif'))">
  +        <xsl:when test="contains($path, '.pdf')">
   
             <!-- Links to outside a PDF are all absolute -->
             <xsl:value-of select="concat($site-root, .)"/>
  
  
  

Mime
View raw message