Summary: | XSLT output method does not default to HTML when the target document is HTML | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Alex Taylor <darwin> | ||||||
Component: | XML | Assignee: | Alexey Proskuryakov <ap> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | ap | ||||||
Priority: | P2 | Keywords: | HasReduction | ||||||
Version: | 420+ | ||||||||
Hardware: | Mac | ||||||||
OS: | OS X 10.4 | ||||||||
URL: | http://blog.ilikeu2.nl/demo/demo.html | ||||||||
Attachments: |
|
Description
Alex Taylor
2006-11-26 20:53:03 PST
Created attachment 11644 [details]
test case
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"/>". I think I know the reason - Firefox defaults the output method to HTML because the target document of transformToFragment() is an HTML one. Created attachment 11645 [details]
proposed fix
Comment on attachment 11645 [details]
proposed fix
r=me
Committed revision 17902. |