Subversion Repositories wimsdev

Rev

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

Rev 6350 Rev 6445
Line 4... Line 4...
4
 my $file = shift(@ARGV);
4
 my $file = shift(@ARGV);
5
 my $uri = shift(@ARGV);
5
 my $uri = shift(@ARGV);
6
 use WebService::Validator::HTML::W3C;
6
 use WebService::Validator::HTML::W3C;
7
 my $v = WebService::Validator::HTML::W3C->new(detailed => 1);
7
 my $v = WebService::Validator::HTML::W3C->new(detailed => 1);
8
 $v->validator_uri($uri);
8
 $v->validator_uri($uri);
9
 
-
 
10
 
9
 
11
 if ( $v->validate_file("$file") ) {
10
 if ( $v->validate_file("$file") ) {
12
   if ( !$v->is_valid )
11
   if ( !$v->is_valid )
13
   {
12
   {
14
     foreach my $E (@{$v->errors}) {
13
     foreach my $E (@{$v->errors}) {
15
       ##next if ($E->msg =~ /not allowed in prolog/);
14
       next if ($E->msg =~ /not allowed in prolog/);
16
       next if ($E->msg =~ /Conflict between Mime Type/); #error coming from last.html
15
       next if ($E->msg =~ /Conflict between Mime Type/); #error coming from last.html
17
       next if ($E->msg =~ /xmlParseEntityRef/); #error I do not understand, link with &
16
       next if ($E->msg =~ /xmlParseEntityRef/); #error I do not understand, link with &
18
       printf("\$wims_name_Error: line %d, %s\n", $E->line, $E->msg);
17
       printf("\$wims_name_Error: line %d, %s\n", $E->line, $E->msg);
19
       
18
       
20
     }
19
     }
21
     foreach my $E (@{$v->warnings}) {
20
     foreach my $E (@{$v->warnings}) {
22
       next if ($E->msg =~ /character "(&|&)" is the first character of a delimiter but occurred as data/);  ##due to wims
21
       next if ($E->msg =~ /character "(&|&)" is the first character of a delimiter but occurred as data/);  ##due to wims
23
       next if ($E->msg =~ /Conflict between Mime Type/);  #error coming from last.html
22
       next if ($E->msg =~ /Conflict between Mime Type/);  #error coming from last.html
24
       next if ($E->msg =~ /xmlParseEntityRef/); #error I do not understand, link with &
23
       next if ($E->msg =~ /xmlParseEntityRef/); #error I do not understand, link with &
25
       printf("\$wims_name_warning: line %d, %s\n", $E->line, $E->msg);}
24
       printf("\$wims_name_warning: line %d, %s\n", $E->line, $E->msg);}
26
   }
25
   } else {
-
 
26
     printf("Validation has been done") ; }
27
 } else {
27
 } else {
28
     printf ("Failed to validate the validator $v->uri : %s\n", $v->validator_error);
28
     printf ("Failed to validate the validator $v->uri : %s\n", $v->validator_error);
29
 }
29
 }