[xml/sgml-commit] r1862 - in /packages/w3c-markup-validator/trunk/debian: control copyright validate.pl

periapt-guest at users.alioth.debian.org periapt-guest at users.alioth.debian.org
Thu Mar 17 13:12:39 UTC 2011


Author: periapt-guest
Date: Thu Mar 17 13:12:30 2011
New Revision: 1862

URL: http://svn.debian.org/wsvn/debian-xml-sgml/?sc=1&rev=1862
Log:
finished validate script

Modified:
    packages/w3c-markup-validator/trunk/debian/control
    packages/w3c-markup-validator/trunk/debian/copyright
    packages/w3c-markup-validator/trunk/debian/validate.pl

Modified: packages/w3c-markup-validator/trunk/debian/control
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/control?rev=1862&op=diff
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/control (original)
+++ packages/w3c-markup-validator/trunk/debian/control Thu Mar 17 13:12:30 2011
@@ -19,7 +19,8 @@
  libhtml-encoding-perl, libjson-perl, libxml-libxml-perl (>= 1.70),
  libsgml-parser-opensp-perl
 Recommends: libhtml-tidy-perl
-Suggests: libwebservice-validator-html-w3c-perl, libtest-html-w3c-perl
+Suggests: libwebservice-validator-html-w3c-perl, libtest-html-w3c-perl,
+ libxml-path-perl
 Description: W3C Markup Validator
  The W3C Markup Validator is a CGI script which lets you enter the URL of a web
  page which will be then checked against a validating SGML parser for

Modified: packages/w3c-markup-validator/trunk/debian/copyright
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/copyright?rev=1862&op=diff
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/copyright (original)
+++ packages/w3c-markup-validator/trunk/debian/copyright Thu Mar 17 13:12:30 2011
@@ -34,6 +34,10 @@
 Files: htdocs/scripts/mootools-1.2.5-core-nc.js (portions)
 Copyright: 2005-2007, Sam Stephenson
 License: MIT
+
+Files: debian/validate.pl
+Copyright: 2003-2008, Struan Donald
+License: Artistic
 
 Files: debian/logo.png
 Copyright: 1999, Software in the Public Interest

Modified: packages/w3c-markup-validator/trunk/debian/validate.pl
URL: http://svn.debian.org/wsvn/debian-xml-sgml/packages/w3c-markup-validator/trunk/debian/validate.pl?rev=1862&op=diff
==============================================================================
--- packages/w3c-markup-validator/trunk/debian/validate.pl (original)
+++ packages/w3c-markup-validator/trunk/debian/validate.pl Thu Mar 17 13:12:30 2011
@@ -1,19 +1,26 @@
 #!/usr/bin/perl
 use WebService::Validator::HTML::W3C;
+use XML::XPath;
 
 my $v = WebService::Validator::HTML::W3C->new(
     detailed => 1,
     validator_uri => 'http://localhost/w3c-validator/check',
 );
+my $url = $ARGV[0] || http://www.erfworld.com;
 
-if ($v->validate($ARGV[0])) {
+if ($v->validate($url)) {
     if ($v->is_valid) {
         printf "%s is valid\n", $v->uri;
     }
     else {
         printf "%s is not valid\n", $v->uri;
+	printf "======= ERRORS ========\n";
         foreach my $error (@{$v->errors}) {
             printf "%s at line %d\n", $error->msg, $error->line;
+        }
+	printf "======= WARNINGS ========\n";
+        foreach my $warning (@{$v->warnings}) {
+            printf "%s at line %d\n", $warning->msg, $warning->line;
         }
     }
 }




More information about the debian-xml-sgml-commit mailing list