Update of /cvsroot/flexml/flexml
In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv10599
Modified Files:
flexml.pl
Log Message:
Fix bug 1498401 "Parser loops on empty entity expansion" (l. 251);
Fix bug 1498407 "Cannot have ELEMENT with same name as ATTLIST" (ll. 674-5);
Fix bug 1498418 "ENTITY attribute type unimplemented." (ll. 842-51).
Index: flexml.pl
===================================================================
RCS file: /cvsroot/flexml/flexml/flexml.pl,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- flexml.pl 21 Apr 2006 23:35:51 -0000 1.49
+++ flexml.pl 31 May 2006 20:02:54 -0000 1.50
@@ -248,7 +248,7 @@
sub expandparametersat { # Expand parameter entities in $_ at $place.
my ($place) = @_;
while ( m/$place\s*%($Name);/ ) {
- if ($parameter{$1}) {
+ if (defined $parameter{$1}) {
s/$place(\s*)%($Name);/ ' '. $1 . $parameter{$2} . ' ' /xe;
}
}
@@ -672,11 +672,12 @@
# strip off the matched code from the beginning of $_
$_ = $'; #'
+ # place the newly found tag into the list of tags @tags
+ die place()."Repeated element $tag.\n" if exists $source{$tag};
+
# ????? - most of the time $orig is undef
$source{$tag} = "$orig";
- # place the newly found tag into the list of tags @tags
- die place()."Repeated element $tag.\n" if $ctag{$tag};
push @tags, $tag;
# Create C-friendly tag names.
@@ -839,10 +840,15 @@
$literaltype{"$tag/$attribute"} = '{Nmtokens}';
}
elsif ( $type eq 'ENTITY' ) {
- die place()."ENTITY attribute type unimplemented.\n";
+ #die place()."ENTITY attribute type unimplemented.\n";
+ $literaltype{"$tag/$attribute"} = '{Name}';
+ print STDERR place()."Warning: attribute type `$type' not validated.\n";
}
elsif ( $type eq 'ENTITIES' ) {
- die place()."ENTITIES attribute type unimplemented.\n";
+ #die place()."ENTITIES attribute type unimplemented.\n";
+ $literaltype{"$tag/$attribute"} = '{Names}';
+ print STDERR place()."Warning: attribute type `$type' not validated.\n";
+
}
elsif ( $type ne 'CDATA' ) {
die place()."Unknown AttType `$type'.\n";
|