Project

Profile

Help

Bug #2032

closed

Spurious type-checking error XPTY0020

Added by Debbie Lockett about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2014-03-13
Due date:
% Done:

100%

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

Description

Unmatched pattern "text()[/..//../foobar]" produces error as below:

Warning: on line 40 of decoy.xsl:

The child axis starting at a text node will never select anything

Error on line 40 of decoy.xsl:

XPTY0020: Cannot select the parent of the context node: the context item is an atomic value


Files

decoy.xsl (2.33 KB) decoy.xsl Debbie Lockett, 2014-03-13 12:25
Actions #1

Updated by Michael Kay about 10 years ago

  • Category set to XPath conformance
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Priority changed from Low to Normal

The issue is essentially an error in the static type checking of a path of the form text()/*/..

The inferred type of text()/* is xs:error (the type with no instances). The type checking for ".." is reporting an error if the inferred type of the context item is a subtype of "atomic" (which xs:error is); it should be reporting an error only if the inferred type is disjoint with "node()". xs:error is a subtype of node(), so there should be no error here.

A patch is being applied to SingleNodeExpression.typeCheck().

Actions #2

Updated by Michael Kay about 10 years ago

  • Subject changed from Spurious error to Spurious type-checking error XPTY0020
Actions #3

Updated by O'Neil Delpratt about 10 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 9.5.1.5

Bug fix applied in Saxon maintenance release 9.5.1.5

Please register to edit this issue

Also available in: Atom PDF