Bug 15368

Summary: REGRESSION: xsl:import fails when preceded by comment
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <geoffers+webkit>
Component: XMLAssignee: Alexey Proskuryakov <ap>
Status: RESOLVED FIXED    
Severity: Normal CC: ap
Priority: P1 Keywords: HasReduction, InRadar, Regression
Version: 523.x (Safari 3)   
Hardware: Macintosh   
OS: OS X 10.4   
URL: http://www.w3.org/2001/tag/doc/mime-respect
Attachments:
Description Flags
reduction
none
proposed fix eric: review+

Description Sam Sneddon [:gsnedders] 2007-10-04 07:33:38 PDT
When attempting to load the given IRI with either a locally compiled copy or downloaded nightly of WebKit, all that is shown is a blank white page.

From the locally compiled copy I get, "compilation error: file http://www.w3.org/2001/tag/doc/mime-respect line 6 element import
xsl:import : unable to load http://www.w3.org/2001/tag/doc/xmlspec.xsl"
Comment 1 Alexey Proskuryakov 2007-10-04 10:33:24 PDT
I'm not sure what's going on here - could be related to bug 10313.
Comment 2 Alexey Proskuryakov 2007-10-05 01:52:22 PDT
For this site, it's a regression (it sends plain HTML to Tiger Safari/WebKit). Upgrading to P1.
Comment 3 Alexey Proskuryakov 2007-10-05 02:04:43 PDT
Created attachment 16540 [details]
reduction
Comment 4 Alexey Proskuryakov 2007-10-05 02:08:34 PDT
Removing the comment before xsl:import fixes the problem:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Comment -->
<xsl:import href="transform.xsl"/>
</xsl:stylesheet>
Comment 5 David Kilzer (:ddkilzer) 2007-10-05 08:56:33 PDT
<rdar://problem/5524762>
Comment 6 Alexey Proskuryakov 2007-10-06 03:50:18 PDT
Created attachment 16566 [details]
proposed fix

XSLStyleSheet::loadChildSheets() is just an evil hack.
Comment 7 Eric Seidel (no email) 2007-10-06 19:31:05 PDT
Comment on attachment 16566 [details]
proposed fix

The spec seems to support ap's diagnosis:
http://www.w3.org/TR/xslt#import

r=me
Comment 8 Alexey Proskuryakov 2007-10-07 02:04:33 PDT
Committed revision 26097 (feature branch).