Skip to main content

Bug Tracker

Side navigation

#4264 closed bug (duplicate)

Opened February 27, 2009 04:40AM UTC

Closed November 05, 2010 08:12AM UTC

Last modified November 07, 2010 03:25PM UTC

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: webdev@blizzard.com
Blocked by: Blocking:
Description

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.

Affects:

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 1.0.154.48 when transforming to XHTML

Opera 9.63 when transforming to XHTML or HTML

Unaffected:

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 February 27, 2009 04:41AM UTC.

    Self-styling XSLT that produces XHTML

Change History (4)

Changed October 19, 2009 01:42AM UTC by dmethvin comment:1

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.

Changed November 05, 2010 08:12AM UTC by addyosmani comment:2

resolution: → duplicate
status: newclosed

Changed November 05, 2010 08:12AM UTC by addyosmani comment:3

Duplicate of #4895.

Changed November 07, 2010 03:25PM UTC by rwaldron comment:4

#4895 is a duplicate of this ticket.