while (/^<!DOCTYPE/ || /^<!ENTITY/ || /^<\?xml-stylesheet/ || /^<\?xml /) {
# print "SGML: $_";
$before_copyright = "$before_copyright$_";
+ if (/\]>$/ ) {
+ $_ = <SOURCE>;
+ close(SOURCE) if (eof(SOURCE));
+ next;
+ }
+ if (/^<!DOCTYPE/) {
+ while (!eof(SOURCE)) {
+ $_ = <SOURCE>;
+ next if (eof(SOURCE));
+ $before_copyright =
+ "$before_copyright$_";
+ if (/]>$/) {
+ $_ = <SOURCE>;
+ last;
+ }
+ }
+ close(SOURCE) if (eof(SOURCE));
+ next;
+ }
if (/>$/ ) {
$_ = <SOURCE>;
close(SOURCE) if (eof(SOURCE));