From 0384d5b0531644399ffcde08114bd63b05665b90 Mon Sep 17 00:00:00 2001 From: david <> Date: Sun, 5 May 2002 20:29:12 +0000 Subject: [PATCH] work on xml files as well as sgml files --- LDP/builder/db2omf/db2omf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/LDP/builder/db2omf/db2omf b/LDP/builder/db2omf/db2omf index 5d04c393..188ac9d3 100644 --- a/LDP/builder/db2omf/db2omf +++ b/LDP/builder/db2omf/db2omf @@ -3,13 +3,13 @@ # DESC: Script for creating an OMF (OpenSource Metadata Framework) file # from DocBook SGML. # -# USAGE: db2omf {-o } .sgml +# USAGE: db2omf {-o } # # Greg Ferguson # # See Changelog for the revision history. -$VERSION = '0.4'; +$VERSION = '0.5'; # output stream flush # @@ -46,7 +46,7 @@ while(1) { } if( $in_f eq '' ) { - print "db2omf: ERROR .sgml not specified.\n\n"; + print "db2omf: ERROR not specified.\n\n"; &usage(); } elsif( !(-r $in_f) ) { print "db2omf: ERROR cannot read $f ($!)\n\n"; @@ -54,7 +54,7 @@ if( $in_f eq '' ) { } if( $out_f eq '' ) { - $in_f =~ /([^\/]+)\.sgml$/i; + $in_f =~ /([^\/]+)\./i; $out_f = $1 . ".omf"; } @@ -95,7 +95,7 @@ $_creator_template =" \n" . $_creator_template =~ s/%%DATE/$_today/g; $_res_template =~ s/%%DATE/$_today/g; -&proc_sgml($in_f); +&proc_file($in_f); $_res_template =~ s/%%CREATOR/$_creator_template/; $_res_template =~ s/%%SGML/$in_f/; @@ -115,7 +115,7 @@ exit(0); # # # -sub proc_sgml { +sub proc_file { my($f) = @_; @@ -448,7 +448,7 @@ sub get_date { # # sub usage { - print "\ndb2omf {-o } .sgml\n\n", + print "\ndb2omf {-o } \n\n", "db2omf - version $_vrs\n\n"; exit(0); }