Bug #3386
closeddeep-equal() fails comparing attributes
100%
Description
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 7 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.
Updated by Debbie Lockett about 7 years ago
- Status changed from New to Resolved
Marking as resolved now.
Updated by Debbie Lockett about 7 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 1.0.2
Bug fix applied in Saxon-JS 1.0.2 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page