Actions
Bug #6332
closedLocal variable depending on current-output-uri may be evaluated with the wrong context
Start date:
2024-01-29
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
Description
If a local variable is bound to the value of current-output-uri()
or current-output-uri#0
, and there is only a single reference to the variable, the variable reference might be inlined even though it appears within an xsl:result-document instruction where the current output URI has changed.
Revealed by XSLT 4.0 test case current-output-uri-402.
In LetExpression.optimize(), line 333 (if (ExpressionTool.changesXsltContext(getSequence())) {...}
is designed to prevent this, and it does so for dependencies on other parts of the XSLT dynamic context such as regex groups; but it doesn't take current output URI into account.
Please register to edit this issue
Actions