Skip Menu |

This queue is for tickets about the XML-ParseDTD CPAN distribution.

Report information
The Basics
Id: 5221
Status: resolved
Priority: 0/
Queue: XML-ParseDTD

People
Owner: Nobody in particular
Requestors: boris [...] alum.mit.edu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: (no value)



Subject: error in child_allowed
The child_allowed command returns true sometimes when the child is actually not allowed in the tag. This is the case for example if you check for the allowability of a child named "bar" in an element that can contain elemnet "foobar". I've provided a patch that solved the problem for me.
--- /usr/lib/perl5/site_perl/5.8.1/XML/ParseDTD.pm 2003-12-06 17:39:45.000000000 -0500 +++ script/XML/ParseDTD.pm 2004-02-05 15:19:24.000000000 -0500 @@ -216,7 +216,7 @@ sub child_allowed { my($self,$tag,$child) = @_; $self->_set_errstr(1,$tag) and return 0 unless($self->{'Element'}->{$tag}); - return 1 if (eval("'" . $self->{'Element'}->{$tag} . "'" . "=~ m/($child,)/")); + return 1 if (eval("'" . $self->{'Element'}->{$tag} . "'" . "=~ m/\\($child,\\)/")); $self->_set_errstr(4,$child,$tag); return 0; }
[guest - Thu Feb 5 15:58:21 2004]: Show quoted text
> The child_allowed command returns true sometimes when the child is > actually not allowed in the tag. This is the case for example if > you check for the allowability of a child named "bar" in an element > that can contain elemnet "foobar". > > I've provided a patch that solved the problem for me. >
thanks a lot. your patch will be implemented in the next release.