| 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'); |
| 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'); |
| 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 } |
| 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 ($$) { |