Issue Details (XML | Word | Printable)

Key: XALANJ-2206
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Brian Minchau
Reporter: Vadim Gritsenko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
XalanJ2

[PATCH] Propagate template inlining trax attribute

Created: 27/Sep/05 02:26 AM   Updated: 11/Dec/07 04:57 PM
Return to search
Component/s: XSLTC
Affects Version/s: 2.7
Fix Version/s: 2.7.1

Time Tracking:
Not Specified

File Attachments:
  Size
File Licensed for inclusion in ASF works inlining-patch.diff 2005-09-27 02:29 AM Vadim Gritsenko 6 kB
Text File Licensed for inclusion in ASF works xalanj-2206.inlining-patch4.txt 2007-09-20 09:31 PM Brian Minchau 4 kB
Environment: trax, command line is not affected

Xalan info: PatchAvailable
Resolution Date: 20/Sep/07 10:00 PM


 Description  « Hide
Template inlining attribute set on xsltc TransformerFactoryImpl has no effect, default value from Stylesheet is always used. Attached patch resolves this issue.

This is required in order to use large stylesheets (such as where applyTemplates method with template inlining is over 64Kb).

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vadim Gritsenko added a comment - 27/Sep/05 02:29 AM
Patch:
 * Change default value of Stylesheet._templateInlining to false, to match XSLTC._templateInlining
 * Add XSLTC.isTemplateInlining()
 * Initialize template inlining in TemplatesHandlerImpl.<init>
 * Propagate template inlining value to created Stylesheet object
 * Support ENABLE_INLINING attribute in TransformerFactoryImpl.getAttribute()

Brian Minchau added a comment - 02/Nov/05 05:49 AM
Assiging to Yash T., per the JIRA meeting on Nov. 1, 2005

Brian Minchau added a comment - 17/Oct/06 02:36 PM
Per the JIRA meeting on Oct 16, 2005, Yash has agreed to look at this one again.

Vadim Gritsenko added a comment - 09/Aug/07 12:36 PM
So Brian, was Yash able to do it? :)

Brian Minchau added a comment - 13/Sep/07 04:40 PM
Yash is going to look at this one. If OK it should make the 2.7.1 release, but this will probably be the last fix in the door for that release. - Brian

Brian Minchau added a comment - 19/Sep/07 08:57 PM
Actually Yash punted the problem to another committer, but the ball bounced off them and I'm catching it before it falls on the ground.

I have some review comments on the patch so far:

Basically good so far.

Curious that the patch gets rid of a few new Boolean(true) sort of things and replaces them
   with Boolean.TRUE, which is a good thing, ... but then the patch goes on to add this in TransformerFactoryImpl:
       return new Boolean(_enableInling)
rather than this:
      if (_enableInlining)
         return Boolean.TRUE;
     else
         return Boolean.FALSE;

Minor stuff over all. A bit more review of mine needed before I approve/commit a slightly modified version of the patch.

Brian Minchau added a comment - 20/Sep/07 09:31 PM
Attaching a slightly modified patch. The changes are mostly superficial.

A little more setting of the inlining value from one object to another,
not just when the value is true, but regardless of the value. The old code is a little too smug about knowing the default value (false) and so not bothering to set it when it is false.

Other than that I'm convinced that default value of true for the inlining flag inside org/apache/xalan/xsltc/compiler/Stylesheet was wrong. The default of similar flags in these classes:
  org/apache/xalan/xsltc/compiler/XSLTC
  org/apache/xalan/xsltc/trax/TransformerFactoryImpl
was already false, and the value in StyleSheet was over-ridden by the TransformerFactory anyway, so that is a moot point. No performance hits by setting the default value to false like the other two.

I approve the change and am going to commit this modified patch.

Brian Minchau added a comment - 20/Sep/07 10:00 PM
Problem fixed. I committed the fix to the main development code branch, and it will shortly make it under 2.7.1 as well.

Brian Minchau added a comment - 11/Dec/07 03:24 PM
Changing affected version to 2.7, and fixed version to 2.7.1

Brian Minchau added a comment - 11/Dec/07 04:57 PM
Would the originator of this issue please verify that this issue is fixed in the 2.7.1 release, by adding a comment to this issue, so that we can close this issue.

A lack of response by February 1, 2008 will be taken as consent that we can close this resolved issue.

Regards,
Brian Minchau