nicolaken    02/03/27 01:58:34

  Modified:    src/scratchpad/webapp/mount/linkstatus linkstatus.xsl
  Log:
  Updated the stylesheet to use a table and color the row according to success (green) 
or failure (red).
  
  Revision  Changes    Path
  1.2       +23 -4     
xml-cocoon2/src/scratchpad/webapp/mount/linkstatus/linkstatus.xsl
  
  Index: linkstatus.xsl
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/scratchpad/webapp/mount/linkstatus/linkstatus.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- linkstatus.xsl    26 Mar 2002 08:10:58 -0000      1.1
  +++ linkstatus.xsl    27 Mar 2002 09:58:34 -0000      1.2
  @@ -3,12 +3,31 @@
   xmlns:linkstatus="http://apache.org/cocoon/linkstatus/2.0";>
   
     <xsl:template match="linkstatus:linkstatus">
  -     <xsl:apply-templates/>
  +   <html>
  +     <body>
  +      <table border="1">
  +       
<tr><th>URL</th><th>referrer</th><th>content-type</th><th>status</th><th>message</th></tr>
  +        <xsl:apply-templates/>
  +      </table>
  +     </body>
  +     </html>
     </xsl:template>
   
     <xsl:template match="linkstatus:link">
  -     HREF: <xsl:value-of select="@href"/>, REFERRER: <xsl:value-of 
select="@referrer"/>, CONTENT-TYPE: <xsl:value-of select="@content"/>, STATUS: 
<xsl:value-of select="@status"/>, MESSAGE: <xsl:value-of select="@message"/><BR/>
  +    <tr><xsl:attribute name = "bgcolor" ><xsl:choose>
  +             <xsl:when test="normalize-space(@status)='200'">#00ff00</xsl:when>
  +     <xsl:otherwise>#ff0000</xsl:otherwise></xsl:choose>
  +    </xsl:attribute>
  +    
  +    
  +     <td><a><xsl:attribute name="href"><xsl:value-of 
select="@href"/></xsl:attribute>
  +            <xsl:value-of select="@href"/></a></td>
  +     <td><a><xsl:attribute name="href"><xsl:value-of 
select="@referrer"/></xsl:attribute>
  +            <xsl:value-of select="@referrer"/></a></td>
  +     <td><xsl:value-of select="@content"/></td> 
  +     <td><xsl:value-of select="@status"/></td> 
  +     <td><xsl:value-of select="@message"/></td>
  +    </tr>
     </xsl:template>
   
  -</xsl:stylesheet>
  -
  +</xsl:stylesheet>
  \ No newline at end of file
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to