diff options
-rw-r--r-- | htdocs/xml-results.xsl | 62 | ||||
-rwxr-xr-x | httpd/cgi-bin/check | 8 |
2 files changed, 66 insertions, 4 deletions
diff --git a/htdocs/xml-results.xsl b/htdocs/xml-results.xsl new file mode 100644 index 0000000..9fa0d4a --- /dev/null +++ b/htdocs/xml-results.xsl @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" +> + + <xsl:output method="html" /> + + <xsl:template match="result"> + <xsl:text disable-output-escaping="yes"><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"></xsl:text> +<html lang="en"> + <head> + <title>Report</title> + <link rel="stylesheet" type="text/css" href="style.css"/> + </head> + <body> +<!-- insert HTML body top parts here --> + <xsl:apply-templates select="meta"/> +<!-- insert (whatever) between tables --> + <xsl:apply-templates select="messages"/> +<!-- insert HTML footer here --> + </body> +</html> + </xsl:template> + + <xsl:template match="meta"> + <table id="about" summary="Metadata concerning the page"> + <tbody> + <tr><th scope="row">URI</th> <td><a><xsl:attribute name="href"><xsl:value-of select="uri"/></xsl:attribute></a></td></tr> + <tr><th scope="row">Last Modified</th> <td><xsl:value-of select="modified"/></td></tr> + <tr><th scope="row">Server</th> <td><xsl:value-of select="server"/></td></tr> + <tr><th scope="row">Content-Length</th> <td><xsl:value-of select="size"/></td></tr> + <tr><th scope="row">Encoding</th> <td><xsl:value-of select="encoding"/></td></tr> + <tr><th scope="row">Doctype</th> <td><xsl:value-of select="doctype"/></td></tr> + </tbody> + </table> + </xsl:template> + + <xsl:template match="messages"> + <table> + <thead> + <tr> + <th scope="col">Line</th> + <th scope="col">Char</th> + <th scope="col">Offset</th> + <th scope="col">Message</th> + </tr> + </thead> + <tbody> + <xsl:apply-templates select="msg"/> + </tbody> + </table> + </xsl:template> + + <xsl:template match="msg"> + <tr> + <td><xsl:value-of select="@line"/></td> + <td><xsl:value-of select="@col"/></td> + <td><xsl:value-of select="@offset"/></td> + <td><xsl:value-of select="text()"/></td> + </tr> + </xsl:template> +</xsl:stylesheet> diff --git a/httpd/cgi-bin/check b/httpd/cgi-bin/check index 58e53e4..1b31312 100755 --- a/httpd/cgi-bin/check +++ b/httpd/cgi-bin/check @@ -9,7 +9,7 @@ # This source code is available under the license at: # http://www.w3.org/Consortium/Legal/copyright-software # -# $Id: check,v 1.284 2002-11-03 14:39:40 link Exp $ +# $Id: check,v 1.285 2002-11-03 15:04:20 link Exp $ # # Disable buffering on STDOUT! @@ -95,7 +95,7 @@ BEGIN { # # Strings - $VERSION = q$Revision: 1.284 $; + $VERSION = q$Revision: 1.285 $; $VERSION =~ s/Revision: ([\d\.]+) /$1/; @@ -157,7 +157,7 @@ $File->{'Header'} = &prepSSI({ }); $File->{'Footer'} = &prepSSI({ File => $CFG->{'Footer'}, - Date => q$Date: 2002-11-03 14:39:40 $, + Date => q$Date: 2002-11-03 15:04:20 $, }); # @@ -2260,7 +2260,7 @@ X-W3C-Validator-Status: $valid X-W3C-Validator-Errors: $errs <?xml version="1.0" encoding="UTF-8"?> -<?xml-stylesheet type="text/css" href="xml-results.css"?> +<?xml-stylesheet type="text/xsl" href="xml-results.xsl"?> <!DOCTYPE result [ <!ELEMENT result (meta, warnings?, messages?)> <!ATTLIST result |