Bug 21895 - Incorrect handling of XSLT embedded stylesheets
Summary: Incorrect handling of XSLT embedded stylesheets
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: XML (show other bugs)
Version: 525.x (Safari 3.1)
Hardware: PC All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-26 17:38 PDT by Martin
Modified: 2022-07-28 13:47 PDT (History)
5 users (show)

See Also:


Attachments
Testcase (474 bytes, application/xml)
2008-10-26 17:43 PDT, Martin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin 2008-10-26 17:38:19 PDT
WebKit has a number of problems with XSLT stylesheets that are embedded in the source document, as defined in:
<http://www.w3.org/TR/xslt#section-Embedding-Stylesheets>

Specifically, embedded stylesheets need to inherit namespaces and a URL from the
enclosing document, and should be part of the input to transform. Emedding the stylesheet is a convenient way of writing short XSLT tests using only one file.

See also the upstream bug report with libxslt:
<http://bugzilla.gnome.org/show_bug.cgi?id=558031>
Comment 1 Martin 2008-10-26 17:43:02 PDT
Created attachment 24685 [details]
Testcase

The attached file results in a green page for Firefox 1 onwards, Opera 9.5 and Internet Explorer 6 (ahem).

Safari 3.1 and the current WebKit nightly fail to produce a result, instead giving an error notice with: "error on line 1 at column 1: Extra content at the end of the document".
Comment 2 Mark Rowe (bdash) 2008-10-26 17:56:15 PDT
Is this something that will need to be fixed in libxslt rather than in WebKit?
Comment 3 Martin 2008-10-26 19:27:31 PDT
I believe it would be most appropriate to solve this at the libxslt level, yes, but am not familiar enough with the WebKit codebase or processes to make that judgement.

A correct implementation to extract the stylesheet certainly can be written external to the library, however getting it in upstream would be obvious, in which case this bug could depend on "Upgrade to libxslt version ..." or however such things are generally handled.
Comment 4 Ahmad Saleem 2022-07-28 12:00:01 PDT
I am unable to reproduce this bug in Safari 15.6 using attached test case and it shows "Green" page similar to all other browsers (Firefox Nightly 105 and Chrome Canary 106). I think this can be marked as "RESOLVED CONFIGURATION CHANGED". Thanks!