Teach dtd2js.pl to ignore comments.
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Jan 2008 02:49:29 +0000 (02:49 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 21 Jan 2008 02:49:29 +0000 (02:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@8443 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/external/dtd2js.pl

index d7ee4e4..6894bf0 100755 (executable)
@@ -12,7 +12,9 @@ while( $line = <> ) {
 
        if ($line =~ /<!ENTITY\s+(\S+)\s+((["']).*\3)\s*>\s*$/) {
                print "entities['$1'] = $2;\n"; 
-       } else {
+       } elsif ($line =~ /^\s*<!--.*?-->\s*$/) {
+        # Ignore comments
+    } else {
                chomp $line;
                if ($line) { print STDERR "Problem with: $line\n"; }
        }