deep-equal() fails comparing attributes
A number of tests for deep-equals(), e,g, expression-1401, fail. The methods hasAttributeNS() and getAttributeNS() are being called with a first argument of "" to indicate no-namespace, but it seems that null is correct (though it's hard to find documentation on this).
Fixed on the JS branch.
Updated by Debbie Lockett over 6 years ago
- Fix Committed on JS Branch 1.0 added
This change was producing a number of QT3 test failures (e.g. -s:prod-AxisStep.unabbr -t:unabbreviatedSyntax-8).
I believe it is correct that we should use null rather than "" to indicate no-namespace, as this seems to work with what we get back from the XML parser (e.g. DOMParser.parseFromString() as used by parseXmlFromString() in JSTestDriver or NashornPlatform).
The problem is that we are not using this when we set attributes ourselves - i.e. when we use setAttributeNS within makeComplexContent (in Copy.js on trunk branch, Expr.js on 1.0), copyItem (Copy.js on trunk branch, domutils.js on 1.0), and CoreFn.snapshot. If the namespaceURI is "", we should use setAttributeNS(null, name, value) rather than setAttributeNS("", name, value).
Changes committed on the trunk and 1.0 branches.
Please register to edit this issue