Update of /cvsroot/flexml/flexml
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv15755
Modified Files:
flexml.pl
Log Message:
Add a --sysid to override the name of the dtd expected in the parsed files; kill latin1 chars; update copyrights somehow
Index: flexml.pl
===================================================================
RCS file: /cvsroot/flexml/flexml/flexml.pl,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- flexml.pl 18 Jul 2006 12:12:06 -0000 1.53
+++ flexml.pl 18 Jul 2006 19:08:58 -0000 1.54
@@ -1,10 +1,11 @@
#!/usr/bin/env perl
# Flex(1) XML processor scanner generator.
-# Copyright © 1999 Kristoffer Rose. All rights reserved.
+# Copyright (C) 1999 Kristoffer Rose. All rights reserved.
#
# This file is part of the FleXML XML processor generator system.
-# Copyright © 1999 Kristoffer Rose. All rights reserved.
+# Copyright (C) 1999 Kristoffer Rose. All rights reserved.
+# Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
@@ -54,6 +55,7 @@
my $quiet_parser; # -q option flag
my $uri; # -u option uri
my $pubid; # -p option string
+my $sysid; # --sysid option string
my $stacksize=100000; # -b option flag
my $tagprefix=""; # -P option flag
my $actbin="./flexml-act"; # -T option content
@@ -175,7 +177,8 @@
my ($pre) = @_;
print <<EOT;
$pre This program was generated with the FleXML XML processor generator.
-$pre FleXML is Copyright © 1999-2005 Kristoffer Rose. All rights reserved.
+$pre FleXML is Copyright (C) 1999-2005 Kristoffer Rose. All rights reserved.
+$pre FleXML is Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
$pre ($Id).
$pre
$pre There are two, intertwined parts to this program, part A and part B.
@@ -184,8 +187,8 @@
$pre ------
$pre
$pre Some parts, here collectively called "Part A", are found in the
-$pre FleXML package. They are Copyright © 1999-2005 Kristoffer Rose.
-$pre All rights reserved.
+$pre FleXML package. They are Copyright (C) 1999-2005 Kristoffer Rose
+$pre and Copyright (C) 2003-2006 Martin Quinson. All rights reserved.
$pre
$pre You can redistribute, use, perform, display and/or modify "Part A"
$pre provided the following two conditions hold:
@@ -496,7 +499,7 @@
# Parse options.
-$Use = "Usage: flexml [-ASHDvdqnLXV] [-s skel] [-T actbin] [-p pubid] [-u uri]\n"
+$Use = "Usage: flexml [-ASHDvdqnLXV] [-s skel] [-T actbin] [--sysid sysid] [-p pubid] [-u uri]\n"
. " [-b stack_size] [-r roottags] [-a actions] [-P prefix] name[.dtd]";
sub show_version {
@@ -546,6 +549,7 @@
# Set document type URI and PUBID.
"uri|u=s" => \$uri,
"pubid|p=s" => \$pubid,
+ "sysid=s" => \$sysid,
# What to generate
"header|H:s" => sub { $header = $_[1] || 'true' },
@@ -1067,6 +1071,7 @@
print "uri=$uri\n";
print "pubid=$pubid\n\n";
+ print "sysid=$sysid\n\n";
print "header=".($header||'undef')."\n";
print "dummy=".($dummy||'undef')."\n";
@@ -1276,8 +1281,9 @@
}
elsif ( /^FLEXML_DOCTYPES$/ ) {
- my $sysid = ( $uri ? "(\"'$uri'\"|\"\\\"$uri\\\"\")"
- : "(\"'$dtd'\"|\"\\\"$dtd\\\"\")" );
+ $sysid = $sysid ? "(\"'$sysid'\"|\"\\\"$sysid\\\"\")"
+ : ( $uri ? "(\"'$uri'\"|\"\\\"$uri\\\"\")"
+ : "(\"'$dtd'\"|\"\\\"$dtd\\\"\")" );
for (keys %roottags) {
my $c = $ctag{$_};
@@ -1679,7 +1685,7 @@
die "\"$ACTIONS\", line $lineno: Malformed annotation `$&' in <$tag> action.\n"
if m|\{[^;\s]+\}|o;
}
- print STDERR "Action: $_" if $verbose;
+ print STDERR "Action: $_" if $debug;
print $_;
}
@@ -1814,6 +1820,11 @@
Sets the document type to be C<PUBLIC> with the identifier I<pubid>
instead of C<SYSTEM>, the default.
+=item B<--sysid>=I<sysid>
+
+Overrides the C<SYSTEM> id of the accepted DTD. Sometimes usefull when your
+dtd is placed in a subdirectory.
+
=item B<--root-tags> I<roottags>, B<-r> I<roottags>
Restricts the XML processor to validate only documents with one of the
@@ -2043,7 +2054,7 @@
=head1 AUTHOR
-I<Flexml> was written by Kristoffer Høgsbro Rose,
+I<Flexml> was written by Kristoffer Rose,
E<lt>C<kri...@de...>E<gt>.
=head1 COPYRIGHT
|