PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3066

*** shadow/3066 Thu Aug  9 13:38:22 2001
--- shadow/3066.tmp.20971       Thu Aug  9 13:38:22 2001
***************
*** 0 ****
--- 1,63 ----
+ +============================================================================+
+ | xsltc fails XSLTMark test depth with IndexOutofBounds exception            |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 3066                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: CurrentCVS              |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Major                    OS/Version: All                     |
+ |     Priority: Other                     Component: org.apache.xalan.xsltc  |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ Doesn't matter whether you use Xerces or Crimson, the depth test gives a runtime
+ exception:
+ 
+ apxslt depth.xml find
+ java.lang.ArrayIndexOutOfBoundsException
+         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
+         at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1122)
+         at
+ org.apache.xalan.xsltc.cmdline.Transform.doTransform(Transform.java:153)
+         at org.apache.xalan.xsltc.cmdline.Transform.main(Transform.java:294)
+ Error: internal error.
+ 
+ Interesting that Xalan using Xerces as its parser does not throw such an
+ exception. 
+ 
+ I vaguely remember that this problem was resolved in the old XSLTC before
+ donation to Apache, but must have regressed.
+ 
+ This test uses depth.xml and find.xsl.
+ 
+ XSL
+ ===
+ <?xml version="1.0"?> 
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+   <xsl:output encoding="utf-8"/>
+   <xsl:template match="element[@needle=1]">
+     <found>
+       <xsl:apply-templates/>
+     </found>
+   </xsl:template>
+ 
+   <xsl:template match="element">
+     <element>
+       <xsl:apply-templates/>
+     </element>
+   </xsl:template>
+ 
+ </xsl:stylesheet> 
+ 
+ XML
+ ===
+ The xml file depth.xml has a very long line that has elements 
+ nested to a great depth. Here's just a snippet of the beginning.
+ The attached file has the whole thing.
+ <?xml version="1.0" encoding="utf-8"?>
+ <element needle="0"><element needle="0"><element needle="0"><element
+ needle="0"><element needle="0">....
\ No newline at end of file

Reply via email to