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

Diff of /test/html-webhacc/WebHACC/Input.pm

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

revision 1.4 by wakaba, Mon Jul 21 09:40:59 2008 UTC revision 1.5 by wakaba, Mon Jul 21 12:56:34 2008 UTC
# Line 44  sub generate_info_section ($$) { Line 44  sub generate_info_section ($$) {
44      $out->start_tag ('dd');      $out->start_tag ('dd');
45      $out->code ($self->{media_type}, class => 'MIME', lang => 'en');      $out->code ($self->{media_type}, class => 'MIME', lang => 'en');
46      if ($self->{media_type_overridden}) {      if ($self->{media_type_overridden}) {
47        $out->html (' <em>(overridden)</em>');        $out->nl_text ('... overridden');
48      } elsif (defined $self->{official_type}) {      } elsif (defined $self->{official_type}) {
49        if ($self->{media_type} eq $self->{official_type}) {        if ($self->{media_type} eq $self->{official_type}) {
50          #          #
51        } else {        } else {
52          $out->html (' <em>(sniffed; official type is: ');          $out->nl_text ('... sniffed, official type is #',
53          $out->code ($self->{official_type}, class => 'MIME', lang => 'en');                         text => $self->{official_type});
         $out->html (')</em>');  
54        }        }
55      } else {      } else {
56        $out->html ( '<em>(sniffed)</em>');        $out->nl_text ( '... sniffed');
57      }      }
58    
59      $out->dt ('Character Encoding');      $out->dt ('Character Encoding');
# Line 62  sub generate_info_section ($$) { Line 61  sub generate_info_section ($$) {
61      if (defined $self->{charset}) {      if (defined $self->{charset}) {
62        $out->code ($self->{charset}, class => 'charset', lang => 'en');        $out->code ($self->{charset}, class => 'charset', lang => 'en');
63      } else {      } else {
64        $out->text ('(none)');        $out->nl_text ('(unknown)');
65      }      }
66      $out->html (' <em>overridden</em>') if $self->{charset_overridden};      $out->nl_text ('... overridden') if $self->{charset_overridden};
67    
68      $out->dt ($self->{is_char_string} ? 'Character Length' : 'Byte Length');      $out->dt ($self->{is_char_string} ? 'Character Length' : 'Byte Length');
69      ## TODO: formatting      ## TODO: formatting
70      $out->start_tag ('dd');      $out->start_tag ('dd');
71      my $length = length $self->{s};      my $length = length $self->{s};
72      $out->text ($length . ($self->{is_char_string} ? ' character' : ' byte') .      $out->text ($length . ' ');
73                  ($length == 1 ? '' : 's'));      $out->nl_text (($self->{is_char_string} ? 'character' : 'byte') .
74                       ($length == 1 ? '' : 's'));
75    }    }
76    
77    $out->end_tag ('dl');    $out->end_tag ('dl');
# Line 136  sub new ($$) { Line 136  sub new ($$) {
136  } # new  } # new
137    
138  sub id_prefix ($) {  sub id_prefix ($) {
139    return 'subdoc-' . shift->{subdocument_index} . '-';    return 'subdoc-' . shift->full_subdocument_index . '-';
140  } # id_prefix  } # id_prefix
141    
142  sub nested ($) { 1 }  sub nested ($) { 1 }
# Line 163  sub start_section ($$) { Line 163  sub start_section ($$) {
163    
164    my $index = $self->full_subdocument_index;    my $index = $self->full_subdocument_index;
165    $out->start_section (id => $self->id_prefix,    $out->start_section (id => $self->id_prefix,
166                         title => qq[Subdocument #] . $index,                         title => qq[Subdocument #],
167                         short_title => 'Sub #' . $index);                         short_title => 'Sub #',
168                           text => $index);
169  } # start_section  } # start_section
170    
171  sub end_section ($$) {  sub end_section ($$) {

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

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24