loris has asked for the wisdom of the Perl Monks concerning the following question:

Hello DTD-Devotees,

Is it correct that the function get_attrs in XML::Smart::DTD does not recognise attributes that have been defined via ENTITY-declarations? Or am I being dopey?

Thanks

loris

Replies are listed 'Best First'.
Re: Does XML::Smart::DTD not understand ENTITIES?
by mirod (Canon) on Apr 11, 2005 at 10:52 UTC

    Do you have XML::Parser installed? If not XML::Smart will use its own parser, that doesn't seem to parse DTDs (from the doc: XML::Smart::Parser can only handle basic XML data (not supported PCDATA, and any header like: ENTITY, NOTATION, etc...).

      Thanks for bringing the documentation to my attention.

      I do have XML::Parser installed, although I am actually using XML::LibXML to do my parsing. However, even if I do

      my $dtd = XML::Smart::DTD->new($dtdName,'XML::Parser');

      I still have the same problem. Any ideas what could be causing this?

      loris

Re: Does XML::Smart::DTD not understand ENTITIES?
by Anonymous Monk on Apr 11, 2005 at 10:06 UTC
    Have you tried to test it?

      Yes. A DTD without entities worked, whereas one with entities did not.

      I suppose the question should really be:

      Is this a bug and, if so, is there any way of working around the problem?

      loris