[Webkit-unassigned] [Bug 13807] XML without style should render as syntax-highlighted source

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Mar 12 22:54:51 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=13807


alan.stroop at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alan.stroop at gmail.com




--- Comment #44 from alan.stroop at gmail.com  2011-03-12 22:54:50 PST ---
I noticed the new native XML rendering in Chrome version 11.0.696.3 dev. I see a few issues with the implementation:

1. You're using an XSL stylesheet to render the output. This proves problematic in both rendering times on large-ish XML documents and getting declared namespaces to display accurately.

2. The results don't include declared namespaces. See comments about #1.

I maintain the XML Tree extension for Chrome and initially it used an XSL stylesheet to render the output. However, due to long transformation times on large XML documents I had to swap the majority of the rendering work to javascript. This reduced the rendering time of XML document tremendously. 

Another issue I ran into is trying to get declared namespaces to display accurately. I spent many hours trying to get this right with an XSL stylesheet. I probably got about 95% of the way there, but in the end it's just too much of a hassle with XSL. Using javascript (SAX parsing) for the rendering, the XML Tree extension can accurately display declared namespaces where as the native rendering attributed to this bug doesn't display any. I know both IE and Firefox don't display namespaces in their rendering, so you are on par with those, but they also don't have half the functionality of most XML extensions available for Chrome have (so far Safari gets no XML love).

One problem I have with this implementation is that there isn't a way programmatically to not have the native rendering occur. For a Chrome user with one of the XML extensions installed, this means the native rendering is applied and then the extension's rendering is applied to the native renderings output for XML documents without namespaces.

For XML documents with namespaces, because namespaces are not included in the native rendering, the Chrome javascript DOM parser barfs when an extension attempts to render the native rendered XML because it is not valid XML as the prefixes are applied to the elements and attributes, but the namespace URIs are nowhere to be found.  
For instance, if you open an XSL stylesheet in Chrome without an XML rendering extension installed, you'll get the native rendering but no where is the "http://www.w3.org/1999/XSL/Transform" namespace declared anywhere. Great that webkit provides native rendering of XML documents, but not so great it fails badly with namespaces and displays invalid XML documents.

I applaud the work to natively render XML documents in webkit, but I think you are doing a disservice by not displaying well-formed and valid XML. As a Safari user I'd be happy to have any XML rendering, but as a Chrome user this is a real step down from what the three XML rendering extensions provide for functionality.

-- 
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