nicolaken    2003/11/29 07:26:45

  Modified:    src/blocks/chaperon/samples/stylesheets wiki2xdoc.xsl
  Log:
  Links with an extension should not have .html added at the end;
  image links without link text are shown as images and not links.
  
  Revision  Changes    Path
  1.7       +5 -12     
cocoon-2.1/src/blocks/chaperon/samples/stylesheets/wiki2xdoc.xsl
  
  Index: wiki2xdoc.xsl
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/blocks/chaperon/samples/stylesheets/wiki2xdoc.xsl,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- wiki2xdoc.xsl     30 Apr 2003 10:36:29 -0000      1.6
  +++ wiki2xdoc.xsl     29 Nov 2003 15:26:45 -0000      1.7
  @@ -110,17 +110,12 @@
          <xsl:value-of select="$text"/>
         </link>
        </xsl:when>
  -     <xsl:when test="starts-with($href,'http')">
  +     <xsl:when test="starts-with($href,'http') or contains($href,'.')">
         <link href="{$href}">
          <xsl:value-of select="$text"/>
         </link>
        </xsl:when>
        <xsl:otherwise>
  -      <!--
  -      <link href="http://wiki.cocoondev.org/Wiki.jsp?page={$href}";>
  -       <xsl:value-of select="$text"/>
  -      </link>
  -        -->
         <link href="{$href}.html">
          <xsl:value-of select="$text"/>
         </link>
  @@ -137,17 +132,15 @@
          [<xsl:value-of select="$href"/>]
         </link>
        </xsl:when>
  -     <xsl:when test="starts-with($href,'http')">
  +     <xsl:when test="contains($href,'.png') or contains($href,'.jpg') or 
contains($href,'.gif')">
  +      <img src="{$href}" alt="{$href}"/>
  +     </xsl:when>
  +     <xsl:when test="starts-with($href,'http') or contains($href,'.')">
         <link href="{$href}">
          <xsl:value-of select="$href"/>
         </link>
        </xsl:when>
        <xsl:otherwise>
  -      <!--
  -      <link href="http://wiki.cocoondev.org/Wiki.jsp?page={$href}";>
  -       <xsl:value-of select="$href"/>
  -      </link>
  -        -->
         <link href="{$href}.html">
          <xsl:value-of select="$href"/>
         </link>
  
  
  

Reply via email to