Bug 11694 - XSLT output method does not default to HTML when the target document is HTML
: XSLT output method does not default to HTML when the target document is HTML
Status: RESOLVED FIXED
: WebKit
XML
: 420+
: Macintosh Mac OS X 10.4
: P2 Normal
Assigned To:
: http://blog.ilikeu2.nl/demo/demo.html
: HasReduction
:
:
  Show dependency treegraph
 
Reported: 2006-11-26 20:53 PST by
Modified: 2006-11-27 21:45 PST (History)


Attachments
test case (626 bytes, text/html)
2006-11-27 10:04 PST, Alexey Proskuryakov
no flags Details
proposed fix (5.80 KB, patch)
2006-11-27 11:43 PST, Alexey Proskuryakov
hyatt: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2006-11-26 20:53:03 PST
The rows in this "LiveGrid demo" don't look correct, they don't appear to have been transformed or had style applied. Result differs from Firefox.
------- Comment #1 From 2006-11-27 10:04:10 PST -------
Created an attachment (id=11644) [details]
test case
------- Comment #2 From 2006-11-27 10:12:30 PST -------
The problem here is that the result of the transformation is plain XML, without an XHTML namespace. So, tags have no meaning when the result is inserted into the HTML document with appendChild(). I don't know why Firefox styles it, maybe they have some good reason?

To work around this, add an XSLT output directive: "<xsl:output method="html"/>".
------- Comment #3 From 2006-11-27 10:23:32 PST -------
I think I know the reason - Firefox defaults the output method to HTML because the target document of transformToFragment() is an HTML one.
------- Comment #4 From 2006-11-27 11:43:02 PST -------
Created an attachment (id=11645) [details]
proposed fix
------- Comment #5 From 2006-11-27 13:12:45 PST -------
(From update of attachment 11645 [details])
r=me
------- Comment #6 From 2006-11-27 21:45:50 PST -------
Committed revision 17902.