Actions
Bug #6654
closedXTDE1360 Dynamic evaluation of the current() function is not supported
Start date:
2025-01-17
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java
Description
I get this error (on both 12.x and 13.x) with a 4.0 stylesheet that makes a static call on current(). See attached
Files
Updated by Michael Kay 12 days ago
The optimizer trace shows
OPT : At line 22 of file:/Users/mike/Desktop/temp/test.xsl
OPT : Extracted global variable vv:gg1636506029 := data((((current()) treat as node())/child::element(Q{http://www.w3.org/1999/XSL/Transform}field))/attribute::attribute(Q{}name))
It seems to have failed to recognize that an expression calling current()
can't be promoted to global.
The error message arises when current() is called as a normal function - it should be rewritten as a variable reference. It's misleading because this isn't a dynamic function call, just a static function call happening at runtime.
Updated by Michael Kay 11 days ago
The problem is that XSLIf
doesn't call typeCheck()
on the then
and else
subexpressions (new 4.0 feature), and it's during the typeCheck
call that calls on current()
are resolved.
Updated by Michael Kay 11 days ago
- Category set to Features new in 4.0
- Status changed from New to Resolved
- Fix Committed on Branch 12, trunk added
- Platforms .NET added
Please register to edit this issue
Actions