<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl

$ignore = 0;

print "&lt;!DOCTYPE article PUBLIC \"-//OASIS//DTD DocBook V4.1//EN\"&gt;\n";

while (&lt;STDIN&gt;) {

	$_ =~ s/&lt;chapter/&lt;article/g;
	$_ =~ s/&lt;\/chapter/&lt;\/article/g;

	if ( $_ =~ '&lt;articleinfo&gt;') {
		$ignore = 1;
	}

	if ( $_ =~ '&lt;/articleinfo&gt;') {
		$ignore = 0;
		$_ = "";
	}


	if (! $ignore) { print "$_"; }


}
</pre></body></html>