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 filterlinks.xsl
Date Wed, 09 Apr 2003 10:14:41 GMT
jefft       2003/04/09 03:14:40

  Modified:    src/resources/stylesheets filterlinks.xsl
  Log:
  - Remove what appears to be some obsolete special handling for rollover menus
  - Fix up documentation
  
  Revision  Changes    Path
  1.5       +10 -20    xml-forrest/src/resources/stylesheets/filterlinks.xsl
  
  Index: filterlinks.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/stylesheets/filterlinks.xsl,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- filterlinks.xsl	11 Dec 2002 08:28:11 -0000	1.4
  +++ filterlinks.xsl	9 Apr 2003 10:14:40 -0000	1.5
  @@ -1,36 +1,26 @@
   <?xml version="1.0"?>
   
   <!--
  -This stylesheet filters all references to the javadocs
  -and the samples.
  +This stylesheet filters out links to URLs that we don't want Forrest to crawl,
  +like Javadocs.  By default, URLs beginning with 'api/' or containing 'apidocs'
  +are filtered out.  Edit the @test attribute below to customize for your site.
  +
  +To test link filtering, request a page URL with '?cocoon-view=links' appended,
  +for example after a 'forrest run', request
  +http://localhost:8888/index.html?cocoon-view=links That will return a list of
  +paths in the page that Forrest will try to recursively render.
   -->
  +
   <xsl:stylesheet
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       version="1.0">
   
     <xsl:template match="@src|@href|@background">
  -    <xsl:if test="not(contains(.,'apidocs')) and not(starts-with(., 'samples/'))">
  +    <xsl:if test="not(contains(.,'apidocs')) and not(starts-with(., 'api/'))">
         <xsl:copy>
           <xsl:apply-templates select="."/>
         </xsl:copy>
       </xsl:if>
  -  </xsl:template>
  -
  -  <!-- This is a hack which makes the javascript images work -->
  -  <xsl:template match="img[@onLoad and starts-with(@src, 'graphics')]">
  -      <img src="{@src}"/>
  -      <img>
  -        <xsl:attribute name="src">
  -          <xsl:value-of select="substring-before(@src, '.')"/>_over.<xsl:value-of
select="substring-after(@src, '.')"/>
  -        </xsl:attribute>
  -      </img>
  -  </xsl:template>
  -
  -  <xsl:template match="img[@onLoad and starts-with(@src, 'images') and contains(@src,
'-lo.gif')]">
  -      <img src="{@src}"/>
  -      <img>
  -        <xsl:attribute name="src"><xsl:value-of select="substring-before(@src,
'-lo.gif')"/>-hi.gif</xsl:attribute>
  -      </img>
     </xsl:template>
   
     <xsl:template match="@*|node()">
  
  
  

Mime
View raw message