WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
11823
XSLTProcessor.transformToFragment inserts extra whitespace node at start of resulting fragment
https://bugs.webkit.org/show_bug.cgi?id=11823
Summary
XSLTProcessor.transformToFragment inserts extra whitespace node at start of r...
Johnvey Hwang
Reported
2006-12-13 18:56:38 PST
The output from the transformToFragment() method inserts a leading whitespace node (nodeType=3) at the beginning of the returned fragment. Ex: // obtain an XML doc var inputXml = '<somexml />'; // setup a receiving node var container = document.createElement('div'); // do the transform var transformedFragment = XSLTProcessor.transformToFragment(inputXml, document); // insert the fragment into the DOM container.appendChild(transformedFragment); // verify that XML has no leading whitespace node var x = (inputXml.firstChild.nodeType == 1) // returns true // check the inserted fragment var y = (container.firstChild.nodeType == 1) // returns false The nodeType of container.firstChild is 3 (a whitespace). The expected behavior (as is from Firefox and IE) is not to have an extra whitespace node.
Attachments
test case (works correctly)
(1.13 KB, text/html)
2007-07-02 04:30 PDT
,
Alexey Proskuryakov
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Alexey Proskuryakov
Comment 1
2007-07-02 04:30:35 PDT
Created
attachment 15348
[details]
test case (works correctly) I have tried to create a test case from this bug description, but couldn't - transformToFragment worked correctly for me. Obviously, this may depend on the stylesheet used. Could you please attach a complete test case?
Alexey Proskuryakov
Comment 2
2007-10-05 05:51:08 PDT
No reply to a request for additional information in three months; closing.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug