Project

Profile

Help

Bug #5104

Failure to detect XQTY0086 with Linked tree

Added by Michael Kay about 1 month ago. Updated 21 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-09-23
Due date:
% Done:

0%

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

Description

When QT3 tests are run against 10.6 with -tree:linked, the tests Constr-cont-nsmode-5 and -6 fail: specifically, they should report error XQTY0086, but actually complete without error.

History

#1 Updated by Michael Kay about 1 month ago

  • Subject changed from Failure to detect XQDY0086 with Linked tree to Failure to detect XQTY0086 with Linked tree
  • Description updated (diff)

#2 Updated by Michael Kay 21 days ago

For the TinyTree case, the XPTY0086 error in test Constr-cont-nsmode-5 is detected in TinyElementImpl.copy(), line 294. There is no check for namespace-sensitive content in the equivalent code for the linked tree (ElementImpl.copy()).

Studying the code path in the debugger, there seems to be a rather bigger issue: the Linked Tree code isn't actually copying the type annotations on attribute nodes. There seem to be quite a few tests that claim to check that types are preserved, but none of them seems to be doing the job properly. For example Constr-cont-constrmod-4 is described as "preserve decimal type", but actually (a) it only tests that the copied attribute is cartable to xs:integer, which will be equally true if the type annotation of the copied node is xs:untypedAtomic, and (b) for reasons I don't understand, it allows error FORG0001.

I created a new test Constr-cont-constrmod-4 which demonstrates this, the test is succeeding using the tinytree and failing using linked.

#3 Updated by Michael Kay 21 days ago

  • Status changed from New to Resolved
  • Priority changed from Low to Normal
  • Applies to branch 10, trunk added
  • Fix Committed on Branch 10, trunk added

Fixed on the 10 and 11 branches by adding extra code to ElementImpl.copy(), to (a) retain attribute type annotations, and (b) check for namespace-sensitive content.

Please register to edit this issue

Also available in: Atom PDF