Project

Profile

Help

Bug #3386

closed

deep-equal() fails comparing attributes

Added by Michael Kay over 7 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2017-08-11
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
0.9, 1.0, Trunk
Fix Committed on JS Branch:
1.0, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

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.

Actions #1

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.

Actions #2

Updated by Debbie Lockett about 7 years ago

  • Status changed from New to Resolved

Marking as resolved now.

Actions #3

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