Project

Profile

Help

Bug #4111

closed

[.NET] xsl:function/@override="no" does not work

Added by Max Toro over 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Saxon extensions
Sprint/Milestone:
-
Start date:
2019-01-24
Due date:
% Done:

0%

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

Description

Tested with 9.6, 9.7 and 9.8. Attached repro.


Files

SaxonFunctionOverrideRepro.zip (4.14 KB) SaxonFunctionOverrideRepro.zip Max Toro, 2019-01-24 18:14
Actions #1

Updated by O'Neil Delpratt over 3 years ago

  • Category set to Saxon extensions
  • Status changed from New to In Progress
  • Assignee set to O'Neil Delpratt
  • Applies to branch 9.9, trunk added

Thanks for reporting the issue you found. Yes this is a bug which is also reproducible on the Java platform.

Investigating it now.

Actions #2

Updated by Michael Kay over 3 years ago

  • Priority changed from High to Normal

Although the code to implement the xsl:function/@override-extension-functions attribute (or its previous name, @override) appears to be all in place, it looks to me as if it has been dormant and untested for some while.

I got this test case working after fixing three separate bugs:

(a) the compile-time function library used for binding simple static function calls in XSLT includes only one instance of StylesheetFunctionLibrary, containing the functions with override="yes", rather that (as intended) containing two instances, with different search precedence, one with override="yes" and one with override="no".

(b) the above error would be fatal were it not that the search for a function in the StylesheetFunctionLibrary ignores this property anyway.

(c) the overrideExtensionFunction property on a UserFunction object is set too late for it to affect forwards references from previous components in the stylesheet.

Actions #3

Updated by Michael Kay over 3 years ago

Have created unit tests in TestIntegratedFunctions and TestReflexion to test this for all combinations of:

  • integrated and reflexive extension functions
  • exported and non-exported stylesheets
  • attribute names "override" and "override-extension-functions".
Actions #4

Updated by Michael Kay over 3 years ago

  • Fix Committed on Branch 9.9, trunk added

Bug fix committed and tested on the Java side (9.9 and trunk); fix needs confirming for .NET

Not fixed for 9.8

Actions #5

Updated by O'Neil Delpratt about 3 years ago

  • Fixed in Maintenance Release 9.9.1.2 added

I confirm this has been fixed in Saxon 9.9 .NET.

The only change for the Call method in ExtensionFunctionCall is we return IXdmEnumerator.

Actions #6

Updated by O'Neil Delpratt about 3 years ago

  • Status changed from In Progress to Closed

Please register to edit this issue

Also available in: Atom PDF