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 2002/11/29 19:26:54 UTC

DO NOT REPLY [Bug 14965] New: - Empty comments causes ArrayIndexOutOfBoundsException

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=14965>.
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=14965

Empty comments causes ArrayIndexOutOfBoundsException

           Summary: Empty comments causes ArrayIndexOutOfBoundsException
           Product: XalanJ2
           Version: 2.4
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: peter.hunsberger@stjude.org


With

<iframe id="{$cur-id}-iframe" height="0" width="0"><xsl:comment/></iframe>

the following exception is thrown:

javax.xml.transform.TransformerException: 
java.lang.ArrayIndexOutOfBoundsException
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2344)
   at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:710)
   at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes
(ElemApplyTemplates.java:425)
   at org.apache.xalan.templates.ElemApplyTemplates.execute
(ElemApplyTemplates.java:216)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:710)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:710)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:185)
   at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes
(ElemApplyTemplates.java:425)
   at org.apache.xalan.templates.ElemApplyTemplates.execute
(ElemApplyTemplates.java:216)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:710)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:710)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.templates.ElemLiteralResult.execute
(ElemLiteralResult.java:710)
   at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes
(ElemApplyTemplates.java:425)
   at org.apache.xalan.templates.ElemApplyTemplates.execute
(ElemApplyTemplates.java:216)
   at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates
(TransformerImpl.java:2339)
   at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode
(TransformerImpl.java:2160)
   at org.apache.xalan.transformer.TransformerImpl.transformNode
(TransformerImpl.java:1213)
   at org.apache.xalan.transformer.TransformerImpl.run
(TransformerImpl.java:3372)
   at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument
(TransformerHandlerImpl.java:433)

Previously the same XSLT added an empty comment with 2.3.1.  Workd around is to 
add a space (or similar) in the comment.