If XSLTProcessor is given a stylesheet that would generate text nodes for an INPUT ELEMENT, it fails with no error thrown.
This needs a test case.
Created attachment 9455 [details] testcase9901.dmg Attached is a complete testcase reduction for this particular BUG. Copy the contained tescase9901 folder into a test webserver's content directory and browse to it to get started.
The stylesheet fails to load: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output encoding="ISO-8859-1" omit-xml-declaration="no" method="html" indent="yes"/> ... <input name="e164_id" class="item" readonly="readonly" type="text" id="country.e164_id" value="{$e164_id}">textnode_that_will_fail</input> As far as I can tell, xmlns="http://www.w3.org/1999/xhtml" has no business being here, and removing it (or even changing to xmlns="aaa") fixes the symptom. But I do not see why it has such an effect (of course, the <input> element should be empty in XHTML, but that doesn't explain the behavior IMHO).
Created attachment 9699 [details] more reduced test
Created attachment 9702 [details] proposed fix Make sure to write a closing tag if an element has child nodes, to make the output valid XML. We don't care that HTML may forbid the closing tag if the element in question has child nodes. It's a bit surprising that XSLTProcessor goes from DOM to XML document via a serialized representation (though this helped to find this bug :) ).
Comment on attachment 9702 [details] proposed fix r=me
Committed revision 15645.