[Webkit-unassigned] [Bug 28744] New: XSLTProcessor transformToFragment incompatibility with Mozilla and Opera
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 26 10:24:25 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28744
Summary: XSLTProcessor transformToFragment incompatibility with
Mozilla and Opera
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: martin.honnen at gmx.de
Created an attachment (id=38618)
--> (https://bugs.webkit.org/attachment.cgi?id=38618)
HTML document with a JavaScript test case using XSLTProcessor
transformToFragment
WebKit allows XSLT transformations to be run by Javascript code, exposing the
same API that Mozilla introduced:
https://developer.mozilla.org/index.php?title=en/The_XSLT%2F%2FJavaScript_Interface_in_Gecko/Interface_List
There is however a major incompatibility between WebKit and between Mozilla.
The first argument to the transformToFragment method takes a DOM node and
Mozilla (and Opera) then apply the XSLT transformation with that node as the
initial context node while WebKit seems to always apply the XSLT transformation
to the ownerDocument node of the DOM node passed to transformToFragment.
So with Mozilla the API can be used to apply an XSLT transformation to a
certain DOM node (e.g. an element in a larger document) while WebKit always
applies the transformation to the complete document.
That is an incompatibility. As the API was introduced by Mozilla and then
adapted by WebKit I think WebKit should aim to behave like Mozilla.
The test case I am going to attach runs a simple XSLT transformation with
transformToFragment. The stylesheet has two templates, one matching the
document node (match="/") and a second matching a 'foo' element (match="foo").
Then transformToFragment is called with a 'foo' element node in a larger XML
document being passed in as the first argument. Mozilla and Opera that way
start the transformation by applying the match="foo" template while WebKit
starts the transformation by applying the match="/" template leading to a
transformation result that differs strongly between Mozilla and WebKit.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list