[Webkit-unassigned] [Bug 53375] New: 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 04:38:29 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=53375
Summary: space character treated as newline with XSLT
stylesheet when run using XSLTProcessor script API,
but not when using xml-stylesheet pi
Product: WebKit
Version: 528+ (Nightly build)
Platform: PC
URL: http://home.arcor.de/martin.honnen/safariBugs/test2011
012802.xhtml
OS/Version: Windows XP
Status: UNCONFIRMED
Severity: Normal
Priority: P2
Component: XML
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: martin.honnen at gmx.de
Over on stackoverflow (http://stackoverflow.com/questions/4822883/wrong-webkit-whitespace-handling-when-calling-xslt-transformation-through-javascr) someone reported a problem with Webkit browsers and white space treatment in XSLT stylesheet when run with the XSLTProcessor script API. A space character in the input document is treated as a newline character by XSLT/XPath functions like contains or substring-after.
This bug reports tries to isolate the problem with a test case:
The XML document at http://home.arcor.de/martin.honnen/safariBugs/test2011012802.xml has a <test>test string</test> element containing the words "test" and "string" separated by a single space " " character.
The document links to the stylesheet http://home.arcor.de/martin.honnen/safariBugs/test2011012802Xsl.xml which simply checks whether the "test" element contains a newline character, with the XPath expression contains(., '
'). That XPath expression obviously should return false as there is no newline character in the input element.
When the XML document linking to the stylesheet is loaded in a browser window of a Webkit browser, the XPath expression correctly returns false.
However when running the XSLT transformation with Javascript and the XSLTProcessor API, as in the test case http://home.arcor.de/martin.honnen/safariBugs/test2011012802.xhtml, Webkit browsers for the XPath expression "contains(., '
')" return true. Other XPath expressions like substring-after(., '
') also treat the space character as a newline.
Other browsers like Firefox or Opera don't exhibit this behaviour
The problems happens for me with Safari 5.0.3 on Windows XP as well as with today's Webkit nightly download.
--
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