Hi,
You are at least half correct. xmlSubstituteEntitiesDefaultValue has
nothing to do with DTD. However, while the _get method you have
illustrated here makes reference to the wrong variable, the _set
method does not suffer the same problem. So, while the script return
value interrogating the variable is not correct, the functionality
should be. Does the DTD entity loading work when you set it?
The correction is committed in svn #216
Dan
On Nov 26, 2007, at 16:18, Paul Dlug wrote:
> 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
> [email protected]
> http://rubyforge.org/mailman/listinfo/libxml-devel
_______________________________________________
libxml-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/libxml-devel