On Mon, Mar 03, 2008 at 11:06:08PM -0800, Mark Rowe wrote: > > On 03/03/2008, at 22:47, Daniel Veillard wrote: > > >On Mon, Mar 03, 2008 at 09:45:18AM -0800, Darin Adler wrote: > >>Hi folks. > >> > >>As you may know, WebKit currently uses libxml2 to handle XML > >>documents, including XHTML. I recently discovered that a number of > >>Ian > >>Hickson's test cases that work fine in other browsers fail in > >>browsers > >>based on WebKit. That's because libxml2 discards empty CDATA > >>sections. > >>I filed this bug: > >> > >> http://bugzilla.gnome.org/show_bug.cgi?id=514181 > >> > >>And Mark Rowe attached a patch that resolves the issue. > >> > >>Daniel pointed out that some clients of libxml2 may be depending on > >>the current behavior; some may see this as a feature rather than a > >>bug. > >> > >>Does anyone have any comments, objections to this change perhaps or > >>support for the change?
Since nobody seems to have objections about this I will look at the changes needed and do some testing when I find a bit of free time. > > One of the things which should probably be reviewed is the impact > >when doing XPath/XSLT, i.e. check that with the settings needed to > >build > >an XPath tree we don't end up with extra text nodes which would break > >XPath adressing, and probably check also the impact when doing type > >validation, i.e. how an empty CDATA added in an element content should > >affect (or not) XSD/RelaxNG. That mean at least a few tests to be > >added > >to libxml2 regression test suite. > > Where can I find documentation about how to write tests for the > regression test suite? README.tests in the source tree talks briefly > about how to run existing tests, but I have been unable to find any > documentation, either in the source or on the website, about the > creation of new tests. Hum, usually it's me or Bill who add them based on examples given in bug reports. Considering the very large kind of processing found in libxml2 there are multiple catalogs of tests (found in the source tree under test/, associated results are under result/, for example for XPath it's under test/XPath/ , docs are the documents, and tests/ contains the expression tested (and the matching is dones w.r.t. the documents based on names). For RelaxNG it's under test/relaxng/ .xml are ssumed documents, and .rng Relax-NG descriptions, the binding is done by filename common prefixes. For XSD that's in test/schemas/ and matching is also name based. Running 'make tests' detects new tests added in the tree, which are then manually checked for their output in result/ and commited. The 'runtest' command uses the same data, goes way faster, is single process but doesn't detect and generate output for new tests. In a nutshell that's how it's done. There are also external tests but since we don't control the content it's not a concern to you I guess. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
