Failure to detect XQTY0086 with Linked tree
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.
#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