Project

Profile

Help

Bug #5104

closed

Failure to detect XQTY0086 with Linked tree

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

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

100%

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.

Actions #1

Updated by Michael Kay over 2 years ago

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

Updated by Michael Kay over 2 years 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.

Actions #3

Updated by Michael Kay over 2 years 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.

Actions #4

Updated by Debbie Lockett about 2 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 10.7 added

Bug fix applied in the Saxon 10.7 maintenance release.

Please register to edit this issue

Also available in: Atom PDF