Subversion Repositories wimsdev

Rev

Rev 6349 | Rev 6445 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6349 Rev 6350
Line 2... Line 2...
2
 
2
 
3
## validator file validator_uri
3
## validator file validator_uri
4
my $file = shift(@ARGV);
4
 my $file = shift(@ARGV);
5
my $uri = shift(@ARGV);
5
 my $uri = shift(@ARGV);
6
if ($uri =~ /http/) {
-
 
7
  use WebService::Validator::HTML::W3C;
6
 use WebService::Validator::HTML::W3C;
8
   my $v = WebService::Validator::HTML::W3C->new(detailed => 1);
7
 my $v = WebService::Validator::HTML::W3C->new(detailed => 1);
9
    $v->validator_uri($uri);
8
 $v->validator_uri($uri);
10
}
-
 
11
{
9
 
12
  use WebService::Validator::HTML::W3C::Fast;
-
 
13
  my $v = WebService::Validator::HTML::W3C::Fast->new("detailed" => 1, validator_path  => '$uri');
-
 
14
}
10
 
15
 if ( $v->validate_file("$file") ) {
11
 if ( $v->validate_file("$file") ) {
16
   if ( !$v->is_valid )
12
   if ( !$v->is_valid )
17
   {
13
   {
18
     foreach my $E (@{$v->errors}) {
14
     foreach my $E (@{$v->errors}) {
19
       ##next if ($E->msg =~ /not allowed in prolog/);
15
       ##next if ($E->msg =~ /not allowed in prolog/);