Bug Tracker

Opened 14 years ago

Closed 12 years ago

Last modified 12 years ago

#4264 closed bug (duplicate)

Multiple exceptions in (X)HTML documents produced by XSLT

Reported by: dvdckl Owned by:
Priority: major Milestone: 1.4
Component: core Version: 1.3
Keywords: xslt Cc: [email protected]
Blocked by: Blocking:


When jQuery is included in a page that is produced as the result of an XSLT transformation using an xml-stylesheet processing instruction, it may throw several errors related to missing namespaces and varying HTML DOM support depending upon the browser. This does not affect "vanilla" XHTML pages.


Firefox 3.0.6 when transforming to XHTML

Note that under Firefox the provided test case will cause JavaScript to run twice, but only the second pass is relevant to this ticket (see https://bugzilla.mozilla.org/show_bug.cgi?id=380828) https://bugzilla.mozilla.org/show_bug.cgi?id=230214 may explain the lack of document.body support in Firefox when transforming to XHTML

Safari 3.2.1 when transforming to XHTML Chrome when transforming to XHTML Opera 9.63 when transforming to XHTML or HTML


Internet Explorer 6, 7, 8 (XHTML output test not applicable)

Within the context of support.js, the following changes are one possible way to avoid any errors upon file load. There may also be more errors present when making jQuery method calls:

Fixes for Firefox and Webkit browsers:

replace calls to document.createElement("div") with document.createElementNS(document.documentElement.namespaceURI, "div")

Fixes for Firefox and Opera:

replace document.body with document.documentElement.getElementsByTagName("body")[0]

Attachments (1)

test-xhtml-ns.xml (1.3 KB) - added by dvdckl 14 years ago.
Self-styling XSLT that produces XHTML

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by dvdckl

Attachment: test-xhtml-ns.xml added

Self-styling XSLT that produces XHTML

comment:1 Changed 13 years ago by dmethvin

Component: supportcore
Priority: blockermajor

If this refers to the div element used to convert HTML strings to DOM elements in .clean() then it might be possible to fix #1734 at the same time for IE.

comment:2 Changed 12 years ago by addyosmani

Resolution: duplicate
Status: newclosed

comment:3 Changed 12 years ago by addyosmani

Duplicate of #4895.

comment:4 Changed 12 years ago by Rick Waldron

#4895 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.