Open Bug 1252566 Opened 9 years ago Updated 3 years ago

XML transformed to HTML with XSLT; Javascript cannot use HTML <template>

Categories

(Core :: XSLT, defect)

47 Branch
defect

Tracking

()

ASSIGNED

People

(Reporter: thomas.rebele, Assigned: peterv)

Details

(Whiteboard: btpp-followup-2016-03-11)

Attachments

(3 files)

Attached file out.xml
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36 OPR/35.0.2066.82 Steps to reproduce: I use an XML file with texts, where parts of the texts are annotated by <mark>. I transform this to a HTML document, which contains Javascript and a <template>. The code adds two new nodes to the DOM, one with document.createTextNode(...) and one with document.importNode(...) for the template. I run this directly in Firefox, Chrome, Opera and also generated an HTML file with xsltproc out.xml > out.html I tested this with Firefox 44 and Firefox nightly (47.0a1, 2016-03-01) Actual results: When I open out.xml file in Chrome or Opera, both display the new nodes as expected. Firefox however only shows the node created by document.createTextNode(...) The out.html file works in all three browsers. Expected results: All browsers should show the same page for out.xml and out.html
Component: Untriaged → XSLT
Product: Firefox → Core
Whiteboard: btpp-followup-2016-03-04
Jonas, what do you think?
Flags: needinfo?(jonas)
Whiteboard: btpp-followup-2016-03-04 → btpp-followup-2016-03-11
Attached patch WIPSplinter Review
Fixing this for transforms from script for the source document looks pretty hard. We'd have to give XPath treewalker a mode in which it knows about template and use that just for XSLT :-/.
Assignee: nobody → peterv
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I'm honestly not sure it's worth investing in this bug at all. XSLT is a dying technology and used by very few websites.
Flags: needinfo?(jonas)
I replaced the HTML template tag with another HTML+js template technology, so that it works in Firefox, Opera and Chrome. I guess that people will rarely encounter this bug.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: