184 |
my $elements = print_structure_error_dom_section |
my $elements = print_structure_error_dom_section |
185 |
($input, $doc, $el, $result); |
($input, $doc, $el, $result); |
186 |
print_table_section ($input, $elements->{table}) if @{$elements->{table}}; |
print_table_section ($input, $elements->{table}) if @{$elements->{table}}; |
187 |
print_id_section ($input, $elements->{id}) if keys %{$elements->{id}}; |
print_listing_section ({ |
188 |
print_term_section ($input, $elements->{term}) if keys %{$elements->{term}}; |
id => 'identifiers', label => 'IDs', heading => 'Identifiers', |
189 |
print_class_section ($input, $elements->{class}) if keys %{$elements->{class}}; |
}, $input, $elements->{id}) if keys %{$elements->{id}}; |
190 |
|
print_listing_section ({ |
191 |
|
id => 'terms', label => 'Terms', heading => 'Terms', |
192 |
|
}, $input, $elements->{term}) if keys %{$elements->{term}}; |
193 |
|
print_listing_section ({ |
194 |
|
id => 'classes', label => 'Classes', heading => 'Classes', |
195 |
|
}, $input, $elements->{class}) if keys %{$elements->{class}}; |
196 |
} elsif (defined $manifest) { |
} elsif (defined $manifest) { |
197 |
print_structure_dump_manifest_section ($input, $manifest); |
print_structure_dump_manifest_section ($input, $manifest); |
198 |
print_structure_error_manifest_section ($input, $manifest, $result); |
print_structure_error_manifest_section ($input, $manifest, $result); |
657 |
print STDOUT qq[</div>]; |
print STDOUT qq[</div>]; |
658 |
} # print_table_section |
} # print_table_section |
659 |
|
|
660 |
sub print_id_section ($$) { |
sub print_listing_section ($$$) { |
661 |
my ($input, $ids) = @_; |
my ($opt, $input, $ids) = @_; |
662 |
|
|
663 |
push @nav, ['#identifiers' => 'IDs'] unless $input->{nested}; |
push @nav, ['#' . $opt->{id} => $opt->{label}] unless $input->{nested}; |
664 |
print STDOUT qq[ |
print STDOUT qq[ |
665 |
<div id="$input->{id_prefix}identifiers" class="section"> |
<div id="$input->{id_prefix}$opt->{id}" class="section"> |
666 |
<h2>Identifiers</h2> |
<h2>$opt->{heading}</h2> |
667 |
|
|
668 |
<dl> |
<dl> |
669 |
]; |
]; |
674 |
} |
} |
675 |
} |
} |
676 |
print STDOUT qq[</dl></div>]; |
print STDOUT qq[</dl></div>]; |
677 |
} # print_id_section |
} # print_listing_section |
|
|
|
|
sub print_term_section ($$) { |
|
|
my ($input, $terms) = @_; |
|
|
|
|
|
push @nav, ['#terms' => 'Terms'] unless $input->{nested}; |
|
|
print STDOUT qq[ |
|
|
<div id="$input->{id_prefix}terms" class="section"> |
|
|
<h2>Terms</h2> |
|
|
|
|
|
<dl> |
|
|
]; |
|
|
for my $term (sort {$a cmp $b} keys %$terms) { |
|
|
print STDOUT qq[<dt>@{[htescape $term]}</dt>]; |
|
|
for (@{$terms->{$term}}) { |
|
|
print STDOUT qq[<dd>].get_node_link ($input, $_).qq[</dd>]; |
|
|
} |
|
|
} |
|
|
print STDOUT qq[</dl></div>]; |
|
|
} # print_term_section |
|
|
|
|
|
sub print_class_section ($$) { |
|
|
my ($input, $classes) = @_; |
|
|
|
|
|
push @nav, ['#classes' => 'Classes'] unless $input->{nested}; |
|
|
print STDOUT qq[ |
|
|
<div id="$input->{id_prefix}classes" class="section"> |
|
|
<h2>Classes</h2> |
|
|
|
|
|
<dl> |
|
|
]; |
|
|
for my $class (sort {$a cmp $b} keys %$classes) { |
|
|
print STDOUT qq[<dt><code>@{[htescape $class]}</code></dt>]; |
|
|
for (@{$classes->{$class}}) { |
|
|
print STDOUT qq[<dd>].get_node_link ($input, $_).qq[</dd>]; |
|
|
} |
|
|
} |
|
|
print STDOUT qq[</dl></div>]; |
|
|
} # print_class_section |
|
678 |
|
|
679 |
sub print_result_section ($) { |
sub print_result_section ($) { |
680 |
my $result = shift; |
my $result = shift; |