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=2838

*** shadow/2838 Thu Jul 26 10:20:32 2001
--- shadow/2838.tmp.17632       Thu Jul 26 10:20:32 2001
***************
*** 0 ****
--- 1,57 ----
+ +============================================================================+
+ | xsltc fails conf test namedtemplate10 not doing numeric comparison         |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2838                        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                                   |
+ This test uses a named template, recursion, and parameters. However the
+ difference between the expected results of
+ 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <out>
+   <p>AAA AAA AAA </p>
+   <p>BBB BBB </p>
+   <p>CCC CCC CCC CCC CCC </p>
+ </out>
+ 
+ and the obtained results of 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <out>
+   <p>AAA AAA AAA </p>
+   <p>BBB BBB </p>
+   <p>CCC CCC CCC CCC CCC </p>
+ </out>
+ 
+ is due to the expression 
+ 
+   <xsl:if test="$start &lt; $stop">
+ 
+ never evaluating true, even though printing out the values of 
+ start and stop show start starts at 1 and increments while 
+ stop is either 2, 3, or 5, accordingly.
+ 
+ If you change the test to 
+ 
+     test="number($start) &lt; number($stop)"
+ 
+ then you get the expected results.
+ 
+ According to Mike Kay's Programmer's Reference, first edition, 
+ page 390, in an XPath expression, the RelationalExpr operators 
+ less-than (&lt;) or greater-than (&gt;) always perform a numeric 
+ comparison. He adds there is no way to compare string values 
+ according to their alphabetic sequence in XPath. 
+ 
+ Therefore, this test should work as intended without the user 
+ having to explicitly use the number function to force the 
+ parameters to be treated as numbers.

Reply via email to