You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ni...@apache.org on 2003/11/29 16:28:19 UTC

cvs commit: xml-forrest/src/core/context/resources/chaperon/stylesheets wiki2xdoc.xsl

nicolaken    2003/11/29 07:28:19

  Modified:    src/core/context/resources/chaperon/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.
  
  NOTE: this change has already also been done in Cocoon 2.1 CVS.
  
  Revision  Changes    Path
  1.2       +5 -12     xml-forrest/src/core/context/resources/chaperon/stylesheets/wiki2xdoc.xsl
  
  Index: wiki2xdoc.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/core/context/resources/chaperon/stylesheets/wiki2xdoc.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- wiki2xdoc.xsl	28 Nov 2003 11:04:28 -0000	1.1
  +++ wiki2xdoc.xsl	29 Nov 2003 15:28:19 -0000	1.2
  @@ -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>