Bug #2312
closedOptimizations stop disable-output-escaping working
100%
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.
Updated by Michael Kay almost 10 years ago
Added to W3C XSLT30 test suite as bug-1203.
Updated by Michael Kay almost 10 years ago
- 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.
Updated by O'Neil Delpratt over 9 years ago
- 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.
Updated by T Hata over 9 years ago
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>
Updated by Michael Kay over 9 years ago
- Status changed from Closed to In Progress
The test case is working with bytecode generation disabled, but fails with bytecode enabled. Reopened.
Updated by Michael Kay over 9 years ago
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.
Updated by Michael Kay over 9 years ago
- 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.
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to In Progress
Reopening this bug issue as it has caused regression in the XSLT30 test suite.
Updated by O'Neil Delpratt over 9 years ago
- 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.
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to Closed
Bug fix applied in the Saxon 9.6.0.6 maintenance release.
Updated by O'Neil Delpratt about 9 years ago
- 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