xml4r / libxml-ruby

Libxml bindings for Ruby.
https://xml4r.github.io/libxml-ruby
MIT License
129 stars 72 forks source link

When creating an internal DTD, external cannot be nil #215

Open slimdave opened 2 weeks ago

slimdave commented 2 weeks ago

In https://github.com/xml4r/libxml-ruby/commit/f82dfd25969a642f2c0fbfc23c56b6a2b46c3f1e looks like external, system, and name were made non-nullable.

That was reverted for name in https://github.com/xml4r/libxml-ruby/commit/2852b92dca14f5bc53e2403ced4e16d5fdaa4452

But it seems that it's not now possible to produce an internal DTD, because external cannot be nil?

cfis commented 1 week ago

Sorry, not following. What would you like to change?

slimdave commented 1 week ago

Can nil be passed for the value of external in the initializer for ext/libxml/ruby_xml_dtd.c?

cfis commented 1 week ago

Ah. Ok looks like no, it has to be set. Want to create a PR?

slimdave commented 1 week ago

I don't really know any C I'm afraid