[libxml-devel] Load external DTD true/false not working?
Paul Dlug
paul at aps.org
Mon Nov 26 16:18:02 EST 2007
It doesn't appear to me that the flag on XML::Parser
'default_load_external_dtd" works.
Looking at the source:
VALUE
ruby_xml_parser_default_load_external_dtd_get(VALUE class) {
if (xmlSubstituteEntitiesDefaultValue)
return(Qtrue);
else
return(Qfalse);
}
I think the variable to set here should be xmlLoadExtDtdDefaultValue,
not xmlSubstituteEntitiesDefaultValue.
This can be verified with a small test:
require 'xml/libxml'
puts "Load DTD: #{XML::Parser.default_load_external_dtd}"
XML::Parser.default_load_external_dtd = true
puts "Load DTD: #{XML::Parser.default_load_external_dtd}"
Which outputs (incorrectly I believe):
Load DTD: false
Load DTD: false
However, changing this variable still does not make the above test
case work and the DTD is still loaded when I parse the document.
Any suggestions?
--Paul
More information about the libxml-devel
mailing list