Project

Profile

Help

Bug #2301

closed

Confusion between IDREF and NILLED properties in TinyTree

Added by Michael Kay about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
2015-02-01
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

Description

This is a suspected bug from reading the code: it needs confirmation by creating a test case.

In the tinyTree, if an element node is nilled, we set the NILLED bit in the typeCode array: specifically NodeInfo.IS_NILLED, namely 1<<29.

When we test whether an element node has the IDREF property (used by the fn:idref() function), we return true if the IDREF bit is set: specifically, TinyTree.TYPECODE_IDREF, which is also 1 << 29.

So I think that the IDREF property will be true for any node that is nilled. However, there may be no adverse consequences, because the IDREF property is tested only for the fn:idref() function, and the fn:idref function id interested in a node only if its string value is non-empty, and a nilled node always has an empty string value.

Please register to edit this issue

Also available in: Atom PDF