[Webkit-unassigned] [Bug 11823] New: XSLTProcessor.transformToFragment inserts extra whitespace node at start of resulting fragment

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Dec 13 18:56:38 PST 2006


http://bugs.webkit.org/show_bug.cgi?id=11823

           Summary: XSLTProcessor.transformToFragment inserts extra
                    whitespace node at start of resulting fragment
           Product: WebKit
           Version: 420+ (nightly)
          Platform: Macintosh
        OS/Version: Mac OS X 10.4
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: XML
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: johnvey at splunk.com


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.


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list