A pedant that hangs out in the dark corner-cases of the web.

Saturday, February 26, 2005

Fix for XML::DTDParser Perl module

XML::DTDParser 1.7 was not parsing all of my attributes correctly, and I noticed that my 'IDREF's were matching as 'ID', leaving an extra token 'REF', and forcing the regex loop to stop.

The module works fine after changing line 18 to:

my $AttType = '(?:CDATA|ID\b|IDREFS?\b|ENTITY|ENTITIES|NMTOKENS?\b|\(.*?\)|NOTATION ?\(.*?\))';

No comments: