[Webkit-unassigned] [Bug 53375] space character treated as newline with XSLT stylesheet when run using XSLTProcessor script API, but not when using xml-stylesheet pi

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jan 29 21:39:32 PST 2011


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


Alexey Proskuryakov <ap at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Platform|PC                          |All
         OS/Version|Windows XP                  |All
                 CC|                            |ap at webkit.org




--- Comment #1 from Alexey Proskuryakov <ap at webkit.org>  2011-01-29 21:39:33 PST ---
This is an interesting one. I'm not even sure if there's a bug to fix, although the behavior is certainly unexpected.

The issue is that other browsers apply XSL transformations to existing DOM trees, violating the spec. WebKit's XSLTProcessor serializes DOM trees to create XML documents (and XSL stylesheets)  for transformation.

Now, serializing LF in attribute value doesn't produce a character reference like 
 - you can see it by opening <http://home.arcor.de/martin.honnen/safariBugs/test2011012802Xsl.xml> in Firefox or WebKit, and executing the following script in browser address bar:

javascript:alert((new XMLSerializer).serializeToString(document.documentElement))

And parsing XML with an actual line feed embedded produces a space in DOM tree - again, we match Firefox here.

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