You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2003/01/21 23:43:08 UTC
DO NOT REPLY [Bug 16311] New: -
Calling apply-imports in a template matching text() gets variable stack out-of-sync
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16311>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16311
Calling apply-imports in a template matching text() gets variable stack out-of-sync
Summary: Calling apply-imports in a template matching text() gets
variable stack out-of-sync
Product: XalanJ2
Version: 2.4
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xalan.transformer
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: klease@club-internet.fr
I have one template which imports another one. In the first template, I have a
rule matching text(), which does some stuff and calls apply-imports. There is no
other text() rule in the imported stylesheets so the default rule is used. This
results in an extra "unlink()" call being made to the variable stack. In my
program, at the end of the stylesheet I get an ArrayIndexOutOfBoundsException
when the last "reset()" call is done on the variable stack.
I think the bug is in the method applyTemplateToNode() in TransformerImpl.java,
since there is an unlink in a finally clause. When apply-imports is called and
the rule is the default text fule, no link is done, but the finally clause is
executed anyway. I made an ugly patch for this and it made the bug go away.
Note: despite the name of this method, it seems to be called only for the root
node and any apply-imports rules.