Skip Menu |

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

Report information
The Basics
Id: 17704
Status: resolved
Priority: 0/
Queue: XML-SAX-ExpatXS

People
Owner: PCIMPRICH [...] cpan.org
Requestors: nsushkin [...] sushkins.net
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.10
Fixed in: (no value)



Subject: problem with attribute type in doctype declaration (DTD)
When parsing my test XML file, the parser generates an error and doesn't produce attribute type #REQUIRED The following is the output of the test case. $ ./dtd-bug.pl <?xml version='1.0'?><!DOCTYPE test [ <!ELEMENT xsl:stylesheet ANY > Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.5/XML/SAX/Writer/XML.pm line 303. <!ATTLIST xsl:stylesheet id ID > ]><?xml-stylesheet type="text/xsl" href="#stylesheet"?><test> <xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0' id='stylesheet' /> </test>
Subject: dtd-bug.pl
#!/usr/bin/perl -w use strict; use XML::SAX::ExpatXS; use XML::SAX::Writer; my $input = << '__THEEND__'; <?xml version="1.0"?> <!DOCTYPE test [ <!ELEMENT xsl:stylesheet ANY> <!ATTLIST xsl:stylesheet id ID #REQUIRED> ]> <?xml-stylesheet type="text/xsl" href="#stylesheet"?> <test> <xsl:stylesheet version="1.0" id="stylesheet" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"/> </test> __THEEND__ XML::SAX::ExpatXS -> new(Handler => XML::SAX::Writer->new()) -> parse_string($input);
On Fri Feb 17 12:33:58 2006, guest wrote: Show quoted text
> When parsing my test XML file, the parser generates an error and > doesn't produce attribute type #REQUIRED
Minor correction, it's the Writer that generates an error because the parser fails to define one of the hash entries.
Yes. The parser is ok, AFAIK. XML::SAX::Writer hasn't been updated to PerlSAX 2.1. In this case, the update is simple: In XML.pm, line 303, $data->{ValueDefault} should be changed to $data->{Mode}. I will try to find a way how to update XML::SAX::Writer. Petr On Fri Feb 17 12:40:23 2006, guest wrote: Show quoted text
> On Fri Feb 17 12:33:58 2006, guest wrote:
> > When parsing my test XML file, the parser generates an error and > > doesn't produce attribute type #REQUIRED
> > Minor correction, it's the Writer that generates an error because the > parser fails to define one of the hash entries.