Project

Profile

Help

Bug #1992

closed

Template pattern incorrectly identified as never matching

Added by John Lumley about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
-
Start date:
2014-01-30
Due date:
% Done:

100%

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

Description

The template:

xsl:template match="@*[xp:is.AVT(.)]"

with function:

<xsl:function name="xp:is.AVT" as="xs:boolean">

<xsl:param name="test" as="attribute()"/>

<xsl:sequence select="contains($test,'{')"/>

</xsl:function>

is incorrectly warned as 'Pattern will never match anything', and does not execute. Works correctly in 9.5.1.3. Running as SaxonEE and the fault occurs with both -opt:0 and byte code generation.


Files

bug9.5.1.4.xsl (725 Bytes) bug9.5.1.4.xsl John Lumley, 2014-01-30 11:17

Related issues

Related to Saxon - Bug #1908: Performance: patterns calling a function in a predicateClosedMichael Kay2013-09-20

Actions
Actions #1

Updated by John Lumley about 10 years ago

Simplest test is to to run the stylesheet with itself as input.

Actions #2

Updated by John Lumley about 10 years ago

Sorry - first line should read:

xsl:template match="@*[xp:is.AVT(.)]"

(There appears to be a problem in input within the text box - the predicate should read:

xp:is.AVT'OPENBRACKET' 'DOT' 'CLOSEBRACKET'

Actions #3

Updated by Michael Kay about 10 years ago

  • Priority changed from High to Normal

This is caused by an error in the patch for bug #1908 (and reveals the wisdom of our normal policy of never trying to implement performance improvements in a maintenance release...). Basically that patch works for patterns that match element nodes, but not for those that match attribute or namespace nodes.

Actions #4

Updated by Michael Kay about 10 years ago

  • Status changed from New to In Progress
Actions #5

Updated by Michael Kay about 10 years ago

  • Status changed from In Progress to Resolved

Resolved on hte 9.5 branch. The test is currently crashing on the 9.6 branch for unrelated reasons (at the time we're trying to rewrite the pattern filter, the function call has not yet been fixed up, as a consequence of changes introduced for packaging).

Added as test case mode-0011 in the W3C XSLT 3.0 test suite.

Actions #6

Updated by O'Neil Delpratt about 10 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Found in version changed from 9.5.1.4 to 9.5
  • 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