Project

Profile

Help

Bug #2312

closed

Optimizations stop disable-output-escaping working

Added by Michael Kay almost 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XSLT conformance
Sprint/Milestone:
Start date:
2015-02-06
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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.

Actions #1

Updated by Michael Kay almost 10 years ago

Added to W3C XSLT30 test suite as bug-1203.

Actions #2

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.

Actions #3

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.

Actions #4

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>&amp;gt;</a><b>&gt;</b></root>
Actions #5

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.

Actions #6

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.

Actions #7

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.

Actions #8

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.

Actions #9

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.

Actions #10

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.

Actions #11

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

Also available in: Atom PDF