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
_______________________________________________
libxml-devel mailing list
libxml-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/libxml-devel

Reply via email to