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

*** shadow/2223 Mon Jun 18 14:03:00 2001
--- shadow/2223.tmp.21119       Mon Jun 18 14:03:00 2001
***************
*** 0 ****
--- 1,103 ----
+ +============================================================================+
+ | sort element causes Incompatible argument to function error                |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2223                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.0                   |
+ |   Resolution:                            Platform: Sun                     |
+ |     Severity: Major                    OS/Version: Solaris                 |
+ |     Priority: Other                     Component: org.apache.xalan.xsltc  |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ The following runtime problem was reported by Bill Wu. His stylesheet compiled,
+ but on running it, gives the exception show below. I modified it a bit 
+ and distilled it down. When you remove the <xsl:sort ...> element from 
+ the xsl file, no exception is throw and the results are good. 
+ Both Xalan and Saxon have no problem when the sort is left in. At first,
+ I thought the problem might be caused by the params in the sort attributes, but
+ it doesn't make any difference if you hard code them.
+ 
+ Obtained Results (on wu.xml and wu.xsl)
+ ---------------------------------------
+ 
+ Exception in thread "main" java.lang.VerifyError: (class: wu$0, method:
+ extractValueFromDOM signature:
+ (Lorg/apache/xalan/xsltc/DOM;IILorg/apache/xalan/xsltc/Translet;I)Ljava/lang/String;)
+ Incompatible argument to function
+         at java.lang.Class.forName0(Native Method)
+         at java.lang.Class.forName(Class.java:120)
+         at
+ 
+org.apache.xalan.xsltc.dom.NodeSortRecordFactory.<init>(NodeSortRecordFactory.java:91)
+         at wu.applyTemplates()
+         at wu.transform()
+         at
+ org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:329)
+         at
+ org.apache.xalan.xsltc.runtime.DefaultRun.doTransform(DefaultRun.java:175)
+         at org.apache.xalan.xsltc.runtime.DefaultRun.main(DefaultRun.java:311)
+ 
+ XSL File
+ --------
+ <?xml version="1.0" encoding="UTF-8"?>
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
+ <xsl:param name='sortkey'>name</xsl:param>
+ <xsl:param name='sortorder'>ascending</xsl:param>
+ <xsl:param name='sorttype'>text</xsl:param>
+ <xsl:output method="html" />
+ <xsl:template match="/">
+ <html>
+ <body>
+   <TABLE  width="100%">
+     <TR>
+       
+       <TD>Select</TD>
+       <TD>Fstate</TD>
+       <TD>Icon</TD>
+       <TD>Name</TD>
+       <TD>Size</TD>
+       <TD>LastModified</TD>
+       <TD>Version</TD>
+     </TR>
+     <xsl:for-each select="rtml/node" >
+       <xsl:sort select="property[@name='name']/@value" data-type = "text" order
+ ="ascending" />
+ <!--      <xsl:sort select="property[@name=string($sortkey)]/@value" data-type =
+ "{string($sorttype)}" order ="{string($sortorder)}" />-->
+         <TR>
+           <TD>
+             <input type="checkbox"/>
+           </TD>
+           <TD>
+             <xsl:value-of  select="property[@name='fstate']/@value"/>
+           </TD>
+           <TD>
+             <xsl:value-of  select="property[@name='icon']/@value"/>
+           </TD>
+           <TD>
+             <xsl:value-of  select="property[@name='name']/@value"/>
+           </TD>
+           <TD>
+             <xsl:value-of  select="property[@name='sizeFormatted']/@value"/>
+           </TD>
+           <TD>
+             <xsl:value-of  select="property[@name='mtimeFormatted']/@value"/>
+           </TD>
+           <TD>
+            <xsl:value-of  select="property[@name='version']/@value"/>
+           </TD>
+         </TR>
+     </xsl:for-each>
+   </TABLE>
+ </body>
+ </html>
+   </xsl:template>
+ </xsl:stylesheet>
+ 
+ XML File
+ --------
+ It is rather large, so I'll attach it.
\ No newline at end of file

Reply via email to