Project

Profile

Help

Bug #1732

closed

Incorrect type inference for attribute node tests

Added by Michael Kay about 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2013-04-16
Due date:
% Done:

100%

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

Description

Saxon's algorithm for computing type relationships incorrectly determines that the NameTest attribute(abc) is not a subtype of the NodeKindTest attribute(). This is because the content type inferred for attribute(abc) is AnyType, while the content type inferred for attribute() is the more precise xs:untypedAtomic.

Test case reported by Laurent Caprani on saxon-help list, 2013-04-16. The test must be run with --generateByteCode:off, though the problem has no obvious relationship to bytecode generation.

The obvious fix is to implement the method getContentType() on NameTest using essentially the same implementation as for NodeKindTest; but it's a common path so needs careful regression testing.

Please register to edit this issue

Also available in: Atom PDF