138 |
print STDERR $s; |
print STDERR $s; |
139 |
} |
} |
140 |
|
|
141 |
|
{ |
142 |
|
my $ResourceCount = 0; |
143 |
|
sub progress_inc () { |
144 |
|
if ((++$ResourceCount % 10) == 0) { |
145 |
|
print STDERR "*"; |
146 |
|
print STDERR " " if ($ResourceCount % (10 * 10)) == 0; |
147 |
|
print STDERR "\n" if ($ResourceCount % (10 * 50)) == 0; |
148 |
|
} |
149 |
|
} |
150 |
|
|
151 |
|
sub progress_reset () { |
152 |
|
$ResourceCount = 0; |
153 |
|
} |
154 |
|
} |
155 |
|
|
156 |
my $impl = $Message::DOM::ImplementationRegistry->get_implementation |
my $impl = $Message::DOM::ImplementationRegistry->get_implementation |
157 |
({ |
({ |
158 |
ExpandedURI q<ManakaiDOM:Minimum> => '3.0', |
ExpandedURI q<ManakaiDOM:Minimum> => '3.0', |
207 |
if ($rres->owner_module eq $opt{source_resource} and## Defined in this module |
if ($rres->owner_module eq $opt{source_resource} and## Defined in this module |
208 |
not ($ReferredResource{$rres->uri} < 0)) { |
not ($ReferredResource{$rres->uri} < 0)) { |
209 |
## TODO: Modification required to support modplans |
## TODO: Modification required to support modplans |
210 |
status_msg_ "*"; |
progress_inc; |
211 |
if ($rres->is_type_uri (ExpandedURI q<ManakaiDOM:Class>)) { |
if ($rres->is_type_uri (ExpandedURI q<ManakaiDOM:Class>)) { |
212 |
append_class_documentation |
append_class_documentation |
213 |
(result_parent => $section, |
(result_parent => $section, |
1053 |
} |
} |
1054 |
|
|
1055 |
status_msg qq<Module <$mod_uri> for <$mod_for>...>; |
status_msg qq<Module <$mod_uri> for <$mod_for>...>; |
1056 |
|
progress_reset; |
1057 |
|
|
1058 |
append_module_documentation |
append_module_documentation |
1059 |
(result_parent => $body, |
(result_parent => $body, |
1065 |
## -- Outputs referenced resources in external modules |
## -- Outputs referenced resources in external modules |
1066 |
|
|
1067 |
status_msg q<Other modules...>; |
status_msg q<Other modules...>; |
1068 |
|
progress_reset; |
1069 |
|
|
1070 |
while (my @ruri = grep {$ReferredResource{$_} > 0} keys %ReferredResource) { |
while (my @ruri = grep {$ReferredResource{$_} > 0} keys %ReferredResource) { |
1071 |
U: while (defined (my $uri = shift @ruri)) { |
U: while (defined (my $uri = shift @ruri)) { |
1072 |
next U if $ReferredResource{$uri} < 0; ## Already done |
next U if $ReferredResource{$uri} < 0; ## Already done |
1073 |
status_msg_ q<*>; |
progress_inc; |
1074 |
my $res = $db->get_resource ($uri); |
my $res = $db->get_resource ($uri); |
1075 |
unless ($res->is_defined) { |
unless ($res->is_defined) { |
1076 |
$res = $db->get_module ($uri); |
$res = $db->get_module ($uri); |