Skip Menu |

This queue is for tickets about the XML-LibXML CPAN distribution.

Report information
The Basics
Id: 70878
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: zzgrim [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Subject: add support for HTML_PARSE_NODEFDTD option
The attached (trivial) patch adds support for the html option NODEFDTD and two small tests for it. It does not add documentation as it didn't seem very clear for me where to put it, sorry. It also does not check if the used libxml2 does anything useful with the flag, ie. ${ver} "ge" 2.7.8. HTML_PARSE_NODEFDTD has been added to libxml2 more than a year ago, in Jul 2010, so I think it is in from 2.7.8 onwards but I didn't check thoroughly.
Subject: xml-libxml-nodefdtd.diff.gz
Download xml-libxml-nodefdtd.diff.gz
application/gzip 1.3k

Message body not shown because it is not plain text.

Hi zzgrim, thanks for your patch, but it requires some revision. On Sun Sep 11 18:08:55 2011, zzgrim@gmail.com wrote: Show quoted text
> > The attached (trivial) patch adds support for the html option NODEFDTD > and two small tests for it.
The tests should contain Test-Count "# TEST" annotations. Show quoted text
> It does not add documentation as it didn't > seem very clear for me where to put it, sorry.
Well, search for "suppress_warnings" in docs/libxml.dbk and add it there. Show quoted text
> It also does not check if > the used libxml2 does anything useful with the flag, ie. ${ver} "ge"
2.7.8. You should skip the tests (which should be meaningful) if the libxml2 version is too low. There are examples for that in the other t/*.t files. Please revise your patch according to this input. Regards, -- Shlomi Fish Show quoted text
> > HTML_PARSE_NODEFDTD has been added to libxml2 more than a year ago, in > Jul 2010, so I think it is in from 2.7.8 onwards but I didn't check > thoroughly.
From: zgrim <zzgrim [...] gmail.com>
Thanks for your time. Revised patch attached. Also changed the naming of nodefdtd to no_defdtd to align it with the other (perl side) "no_" options vs libxml2's "no"es. On a side note, the documentation of options says "possible values are 0 and 1", but the code maps those to perl boolean-ness, ie. a much larger spectrum. I think a small validation helper function for these is needed, but that's for another ticket i guess.
Subject: xml-libxml-nodefdtd-2.diff.gz

Message body not shown because it is not plain text.

Hi, sorry for replying so late. I have now applied the patch, and pushed it to the Mercurial repository. It will be available in the next release. Sorry it took me so long. Thanks for the patch. Regards, -- Shlomi Fish