Bug 15321 - WebArchives save XSL processed document with wrong mimetype
Summary: WebArchives save XSL processed document with wrong mimetype
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on: 15320
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-29 08:12 PDT by Eric Seidel (no email)
Modified: 2022-08-02 09:42 PDT (History)
5 users (show)

See Also:


Attachments
patch with test case (1.12 KB, patch)
2007-09-29 08:27 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
support file for test (450 bytes, text/xml)
2007-09-29 08:29 PDT, Eric Seidel (no email)
no flags Details
test case (modified to work online in bugzilla), save as a WebArchive to test (120 bytes, application/xml)
2007-09-29 08:30 PDT, Eric Seidel (no email)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-09-29 08:12:15 PDT
WebArchives do not embed XSL stylesheets

I had thought that this would get fixed when I fixed bug 15320, however it appears that XSLStyleSheets don't have any Obj-C DOM representation... preventing WebKit from having any way to get their href (at least that's my theory).
Comment 1 Eric Seidel (no email) 2007-09-29 08:19:33 PDT
Actually, it looks like WebArchives don't actually save the original xml and xsl, they just save the processed source.  it looks like they don't actually do that entirely correctly... they insert a non-self-closing <meta> tag (wrong!), but that's fixable.
Comment 2 Eric Seidel (no email) 2007-09-29 08:22:16 PDT
Actually, it seems my testcase uses xsl to convert an xml file into html, and that confuses the webarchive.
Comment 3 Eric Seidel (no email) 2007-09-29 08:27:55 PDT
Created attachment 16451 [details]
patch with test case
Comment 4 Eric Seidel (no email) 2007-09-29 08:29:16 PDT
Created attachment 16452 [details]
support file for test
Comment 5 Eric Seidel (no email) 2007-09-29 08:30:31 PDT
Created attachment 16453 [details]
test case (modified to work online in bugzilla), save as a WebArchive to test
Comment 6 Eric Seidel (no email) 2007-09-29 08:31:18 PDT
Hum... I guess my test case doesn't actually work as part of bugzilla. oh well.
Comment 7 Alexey Proskuryakov 2010-06-11 16:28:19 PDT
The MIME type should be text/html, but it's application/xml.
Comment 8 Ahmad Saleem 2022-08-02 08:54:21 PDT
In attached test case named (test case [modified..]), only Firefox Nightly 105 display just text "FAILED", all other browsers (Safari 15.6 and Chrome Canary 106) displayed the test case with following error message:

___

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<?xml-stylesheet
type="text/xsl" href="http://bugs.webkit.org/attachment.cgi?id=16452&action=view"
?>
<test>FAILED</test>
___

Just wanted to share updated test results. Thanks!
Comment 9 Ryosuke Niwa 2022-08-02 09:42:53 PDT
When the attached test case fails is saved as a webarchive, it fails load due to bogus meta element in the header.