Bug #2312
closed
Optimizations stop disable-output-escaping working
Category:
XSLT conformance
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Description
When Saxon encounters code executed within a template that has no dependencies, it may move the evaluation of that code to a global variable so it is only executed once. But if the code uses disable-output-escaping, then writing the result to a variable does not have the same effect as writing it directly to the serializer, because d-o-e is ignored when writing to a variable.
Added to W3C XSLT30 test suite as bug-1203.
- Status changed from In Progress to Resolved
Fixed by giving value-of with DOE a dependency (arbitrarily, depends-on-assignable-globals) that inhibits this optimization.
Patch committed to 9.6 and 9.7 branches.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.5
Bug fix applied in the Saxon 9.6.0.5 maintenance release.
Wondering if it's really fixed on 9.6.0.5.
P:\>java -cp "saxon9ee.jar" net.sf.saxon.Transform -?
Saxon-EE 9.6.0.5J from Saxonica
...
P:\>java -cp "saxon9ee.jar" net.sf.saxon.Transform -xsl:bug-1203.xsl -it:main
<?xml version="1.0" encoding="UTF-8"?><root><a>&gt;</a><b>></b></root>
- Status changed from Closed to In Progress
The test case is working with bytecode generation disabled, but fails with bytecode enabled. Reopened.
The problem arises with bytecode enabled because the analyze-string byte code generator has no method to generate code in "push mode", so it falls back to generating a (pull mode) iterate() method, which means that the value-of instruction is creating a text node in memory, which is then copied to the serializer; this process loses the disable-output-escaping flag.
- Status changed from In Progress to Resolved
- Fixed in version deleted (
9.6.0.5)
I have implemented push-mode bytecode generation for xsl:analyze-string, and this solves the problem. Patch committed for 9.6 and 9.7.
- Status changed from Resolved to In Progress
Reopening this bug issue as it has caused regression in the XSLT30 test suite.
- Status changed from In Progress to Resolved
- Fixed in version set to 9.6.0.6
Bytecode generation bug fix applied in the AnalyzeStringCompiler. we had failed to stack the newly created context item.
Bug fix applied in the Saxon 9.6.0.6 maintenance release.
- Status changed from Resolved to Closed
Bug fix applied in the Saxon 9.6.0.6 maintenance release.
- Sprint/Milestone set to 9.6.0.6
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.6 added
Please register to edit this issue
Also available in: Atom
PDF