[webkit-help] XSLTProcessor: transformToFragment returns HTMLElement even with method="xml"

Alexey Proskuryakov ap at webkit.org
Sun Sep 12 11:14:01 PDT 2010

12.09.2010, в 06:36, Gregoire написал(а):

> I've created a test-case so that it is easier to answer my question.

This is a combination of a WebKit bug, and a mistake in xsltforms.xsl.

The WebKit bug has been fixed last month as part of HTML5 parser compliance effort, you can see that your test case works as expected in WebKit nightlies <http://nightly.webkit.org>.

The xsltforms.xsl problem is that it produces an HTML document with lots of pseudo-XML cruft in it, which used to confuse WebKit. Notably, on line 84 it outputs '<html xmlns="http://www.w3.org/1999/xhtml">' - removing the default namespace fixes the problem in Safari 5.0.2.

I'm attaching the result an XSL processor gives for test-chrome-xslt.xml for your reference. You can see garbage xmlns attributes on <html>, <script> and <dataisland> - these serve no purpose when output="html" (as it is in xsltforms.xsl).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-help/attachments/20100912/f3943314/attachment.html>
-------------- next part --------------

- WBR, Alexey Proskuryakov

More information about the webkit-help mailing list