1 #!/usr/bin/perl -w 2 # $Id: dtddiff,v 2.2 2005/07/16 03:22:57 ehood Exp $ 3 # Author(s): Earl Hood, 4 # modified by Raul Suarez y Gonzalez 5 # POD at end of file. 67 use XML::Parser; 8 use File::Basename; 9 use Getopt::Long; 10 use SGML::DTDParse; 11 12 MAIN: { 13 my %opts = ( 14 'attributes' => 1, 15 'content-model-expanded' => 1, 16 'elements' => 1, 17 'general-ents' => 0, 18 'param-ents' => 0, 19 'verbose' => 0, 20 'ignore' => "", 21 'output' => "html", 22 ); 23 24 GetOptions(\%opts , 25 'attributes!', # Show attribute differences 26 'content-model-expanded!', # Show expanded content-models 27 'elements!', # Show element differences 28 'general-ents!', # Show general entity differences 29 'param-ents!', # Show parameter entity differences 30 'verbose!', 31 'ignore=s', # elements or entities to ignore in comparison 32 'output=s', # xml or html output 33 @SGML::DTDParse::CommonOptions 34 ) || SGML::DTDParse::usage(-verbose => 0, -exitval => 1); 35 SGML::DTDParse::process_common_options(\%opts ); 36 37 my $outfh = \*STDOUT ; 38 select ($outfh ); 39 $opts {'output'}=lc($opts {'output'});