Bug 50369 - XML with embedded CSS doesn't work
Summary: XML with embedded CSS doesn't work
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL: http://www.hl7.org/documentcenter/bal...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-12-01 21:42 PST by Keith W. Boone
Modified: 2010-12-02 18:41 PST (History)
1 user (show)

See Also:


Attachments
This is the sample that will not display, also appearing in the ZIP file above (31.63 KB, text/xml)
2010-12-01 21:42 PST, Keith W. Boone
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith W. Boone 2010-12-01 21:42:04 PST
Created attachment 75351 [details]
This is the sample that will not display, also appearing in the ZIP file above

I'm using Safari 5.0.2 and Chrome 7.0.517.44 on Windows XP. I cannot get it to display an XML document with an embedded CSS stylesheet. The file in question appears in this ZIP file: http://www.hl7.org/documentcenter/ballots/2011JAN/downloads/CDAR2_IG_SDISP_R1_D1_2011JAN.zip

That document demonstrates is an attempt to enable display of standardized healthcare content in common web browsers. 

The style sheet appears inside an XML element and is referenced by an xml-stylesheet Processing instruction using a local URL: #hl7-css-for-cda 

There is an element inside the XML document that contains xml:id='hl7-css-for-cda' containting a CSS stylesheet, but it appears that the browser doesn't want to load it.

Since both these browsers are based upon webkit, it was suggested that I post this bug here.

The ZIP file described also contains more details about what is being attempted, why, and what fails (see appendix B).
Comment 1 Alexey Proskuryakov 2010-12-02 11:54:07 PST
See bug 49281 for some history. In short, there is no real specification for that, and Mozilla support is also largely broken.
Comment 2 Keith W. Boone 2010-12-02 12:25:47 PST
This works beautifully in FireFox 3.6.12 (details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12)

My presumption about how this should work for a stylesheet embedded in XML is that it identifies the XML element whose text content is the stylesheet (type text/css), not an HTML or XHTML <style> element.
Comment 3 Alexey Proskuryakov 2010-12-02 12:29:20 PST
Yes - I wasn't saying that the attached test case didn't work in Firefox. Please see the linked bug (https://bugzilla.mozilla.org/show_bug.cgi?id=61675) for why Mozilla developers consider their implementation broken in general case.
Comment 4 Alexey Proskuryakov 2010-12-02 18:41:28 PST
<rdar://problem/8719709>