/[suikacvs]/test/html-webhacc/WebHACC/Language/CacheManifest.pm
Suika

Diff of /test/html-webhacc/WebHACC/Language/CacheManifest.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by wakaba, Sun Jul 20 16:53:10 2008 UTC revision 1.5 by wakaba, Thu Aug 14 15:50:42 2008 UTC
# Line 1  Line 1 
1  package WebHACC::Language::CacheManifest;  package WebHACC::Language::CacheManifest;
2  use strict;  use strict;
3  require WebHACC::Language::Base;  require WebHACC::Language::Base;
4  push our @ISA, 'WebHACC::Langauge::Base';  push our @ISA, 'WebHACC::Language::Base';
5    
6  sub new ($) {  sub new ($) {
7    my $self = bless {}, shift;    my $self = bless {}, shift;
# Line 15  sub generate_syntax_error_section ($) { Line 15  sub generate_syntax_error_section ($) {
15    
16    my $out = $self->output;    my $out = $self->output;
17    
18    $out->start_section (id => 'parse-errors', title => 'Parse Errors');    $self->result->layer_uncertain ('encode');
19    $out->start_tag ('dl', id => 'parse-errors-list');    $self->result->layer_uncertain ('charset');
20    
21      $out->start_section (role => 'parse-errors');
22      $out->start_error_list (role => 'parse-errors');
23      $self->result->layer_applicable ('syntax');
24    
25    my $input = $self->input;    my $input = $self->input;
26    my $result = $self->result;    my $result = $self->result;
# Line 26  sub generate_syntax_error_section ($) { Line 30  sub generate_syntax_error_section ($) {
30        ($input->{s}, $input->{uri}, $input->{base_uri}, sub {        ($input->{s}, $input->{uri}, $input->{base_uri}, sub {
31          $result->add_error (@_, layer => 'syntax', index_has_link => 1);          $result->add_error (@_, layer => 'syntax', index_has_link => 1);
32        });        });
33          
34    $out->end_tag ('dl');    $out->end_error_list (role => 'parse-errors');
35    $out->end_section;    $out->end_section;
36  } # generate_syntax_error_section  } # generate_syntax_error_section
37    
# Line 35  sub generate_structure_dump_section ($) Line 39  sub generate_structure_dump_section ($)
39    my $self = shift;    my $self = shift;
40    my $manifest = $self->{structure};    my $manifest = $self->{structure};
41    
42    $self->start_section (id => 'dump-manifest', title => 'Cache Manifest');    my $out = $self->output;
43    
44    $self->html (qq[<dl><dt>Explicit entries</dt>]);    $out->start_section (role => 'structure');
45    
46      $out->html (qq[<dl><dt>Explicit entries</dt>]);
47    my $i = 0;    my $i = 0;
48    for my $uri (@{$manifest->[0]}) {    for my $uri (@{$manifest->[0]}) {
49      $out->start_tag ('dd', id => 'index-' . $i++);      $out->start_tag ('dd', id => 'index-' . $i++);
# Line 71  sub generate_structure_error_section ($) Line 77  sub generate_structure_error_section ($)
77    
78    my $out = $self->output;    my $out = $self->output;
79    
80    $out->start_section (id => 'document-errors', title => 'Document Errors');    $out->start_section (role => 'structure-errors');
81    $out->start_tag ('dl');    $out->start_error_list (role => 'structure-errors');
82      $self->result->layer_applicable ('structure');
83    
84    my $result = $out->result;    my $result = $self->result;
85    
86    Whatpm::CacheManifest->check_manifest ($self->{structure}, sub {    Whatpm::CacheManifest->check_manifest ($self->{structure}, sub {
87      $result->add_error (@_, layer => 'structure');      $result->add_error (@_, layer => 'structure');
88    });    });
89    
90      $out->end_error_list;
91    $out->end_section;    $out->end_section;
92  } # generate_structure_error_section  } # generate_structure_error_section
93    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24