Skip Menu |

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

Report information
The Basics
Id: 34090
Status: resolved
Priority: 0/
Queue: XML-DTD

People
Owner: wohl [...] cpan.org
Requestors: paul [...] webotech.co.uk
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.04
  • 0.05
  • 0.05.1
  • 0.06
Fixed in: 0.07



I'm getting an error when trying to validate a DTD. It looks like the code is assuming an ENTITY to exist, although (as far as I am aware) it is not mandatory for a DTD. When I do add an entity to my DTD, I get a different error. I have attached files which form a test case. The DTD has been validated using a different tool.
Subject: webotech-html-menu.dtd
Download webotech-html-menu.dtd
application/xml-dtd 499b

Message body not shown because it is not plain text.

Subject: testCase.pl
#!/usr/bin/perl use strict; my $file = "webotech-html-menu.dtd"; use XML::DTD::Parser; my $dp = XML::DTD::Parser->new(1); open(FH,'< '.$file); my $rt = ''; $dp->parse(*FH, $rt, $file); 1;
Subject: ATTLIST parsing bug
There are two distinct problems here. The first is incorrect use of the XML::DTD::Parser module in testCase.pl - see the attached version for recommended usage. The second problem is a bug in the parsing of ATTLIST declarations, apparently caused by the incorrect assumption that the quoted text following CDATA is always non-empty. Until this bug is fixed, a simple workaround would be to replace all the occurrences of "" following CDATA in an ATTLIST declaration with " ".
#!/usr/bin/perl use strict; my $file = "webotech-html-menu.dtd"; use XML::DTD; my $dtd = new XML::DTD; open(FH,'< '.$file); $dtd->parse(*FH); 1;
The problem is resolved in release 0.07.