Project

Profile

Help

Bug #2685

closed

Incorrect type inference in call on distinct-values()

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

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

100%

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

Description

In a schematron-generated stylesheet we are making an incorrect type inference, resulting in the message:

Warning: in xsl:variable/@select on line 1472 column 160 of transfer.xsl:
  SXWN9000: Required item type of value of variable $theAttCheck is attribute(); supplied
  value has item type xs:untypedAtomic. The expression can succeed only if the supplied
  value is an empty sequence.

and a subsequent run-time failure. The attribute declaration is:

<xsl:variable name="theAttCheck"
                    select="distinct-values(document('-- uri --')/*/valueSet/conceptList/concept[@code = $theAttValue]/@code)"/>

which does not have a declared type.

Reported on 9.7.0.4 on .NET but reproduced on Java.

Please register to edit this issue

Also available in: Atom PDF