OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Bug in XML::Parser declaration handling

[ Lists Home | Date Index | Thread Index ]
  • From: Clark Cooper <coopercc@netheaven.com>
  • To: perl-xml@listserv.activestate.com
  • Date: Sat, 24 Jul 1999 12:15:02 -0400


Ken Beesley <ken.beesley@xrce.xerox.com>, discovered that, in Version 2.25
of XML::Parser, the Attlist and Element handlers aren't being called
for declarations in the external DTD when there is no internal subset.

So, for example, given these files:

junk.dtd:
  <!ATTLIST foo bar CDATA 'junk'>

junk.xml>
  <!DOCTYPE foo SYSTEM 'junk.dtd'>
  <foo/>

junk2.xml:
  <!DOCTYPE foo SYSTEM 'junk.dtd' []>
  <foo/>

This script:
################
use XML::Parser;
$p = new XML::Parser(ParseParamEnt => 1,
                     Handlers => {Start => sub {shift; print "Start: @_\n"},
                                  Attlist => sub {shift; print "Att: @_\n"}});
$p->parsefile('junk.xml');
print "--Next File--\n";
$p->parsefile('junk2.xml');
################

produces this output:
================
Start: foo bar junk
--Next File--
Att: foo bar CDATA 'junk'
Start: foo bar junk
================

So, until I get this bug fixed, a workaround is to put in an empty internal
subset as necessary.

-- 
Clark Cooper		Software Engineer	Home:   coopercc@netheaven.com
			Schenectady, NY	USA	Work:   cccooper@ltionline.com

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS