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=3276 *** shadow/3276 Sun Aug 26 19:35:15 2001 --- shadow/3276.tmp.18539 Sun Aug 26 19:35:15 2001 *************** *** 0 **** --- 1,135 ---- + +============================================================================+ + | Xpath search containing ">" or "<" (greater or less than) relationships al | + +----------------------------------------------------------------------------+ + | Bug #: 3276 Product: XalanJ2 | + | Status: NEW Version: 2.2.x | + | Resolution: Platform: PC | + | Severity: Blocker OS/Version: Other | + | Priority: Other Component: org.apache.xpath | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Since 2.2 all attempts to records elements using the follow examplary xpath + statements fail to return any records. + + java ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01']" + + This error is not exhibited in any release version (ie: 2.1.0) + + an example DOS bat file and XML file to exercise this behaviour follows: + + You will need to modify the PATH and ClassPath's appropriately to use + this batch file! + ----------------------------------------------------------------------- + @echo off + PATH=%PATH%;P:\JBUILDER4\JDK1.3\bin + set CP201="P:\JBuilder4\xalan-j_2_0_1\bin\xalansamples.jar;P:\JBuilder4\xalan- + j_2_0_1\bin\xerces.jar;P:\JBuilder4\xalan-j_2_0_1\bin\xalan.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\i18n.jar;P:\JBUILDER4\JDK1.3\jre\lib\jaws.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\rt.jar;P:\JBUILDER4\JDK1.3\jre\lib\sunrsasign.jar" + set CP210="P:\JBuilder4\xalan-j_2_1_0\bin\xalansamples.jar;P:\JBuilder4\xalan- + j_2_1_0\bin\xerces.jar;P:\JBuilder4\xalan-j_2_1_0\bin\xalan.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\i18n.jar;P:\JBUILDER4\JDK1.3\jre\lib\jaws.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\rt.jar;P:\JBUILDER4\JDK1.3\jre\lib\sunrsasign.jar" + set CP22D6="P:\JBuilder4\xalan-j_2_2_D6\bin\xalansamples.jar;P:\JBuilder4\xalan- + j_2_2_D6\bin\xerces.jar;P:\JBuilder4\xalan-j_2_2_D6\bin\xalan.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\i18n.jar;P:\JBUILDER4\JDK1.3\jre\lib\jaws.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\rt.jar;P:\JBUILDER4\JDK1.3\jre\lib\sunrsasign.jar" + set CP22D9="P:\JBuilder4\xalan-j_2_2_D9\bin\xalansamples.jar;P:\JBuilder4\xalan- + j_2_2_D9\bin\xerces.jar;P:\JBuilder4\xalan-j_2_2_D9\bin\xalan.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\i18n.jar;P:\JBUILDER4\JDK1.3\jre\lib\jaws.jar;P:\JBUILDER4 + \JDK1.3\jre\lib\rt.jar;P:\JBUILDER4\JDK1.3\jre\lib\sunrsasign.jar" + + rem Return record on 2001.10.06 (Expecting 1 record) + + echo "Xalan: 2.0.1: Return record on 2001.10.06 (Expecting 1 record)" + java -cp %CP201% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate='2001.10.06']" + + echo "Xalan: 2.1.0: Return record on 2001.10.06 (Expecting 1 record)" + java -cp %CP210% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate='2001.10.06']" + + echo "Xalan: 2.2.D6: Return record on 2001.10.06 (Expecting 1 record)" + java -cp %CP22D6% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate='2001.10.06']" + + echo "Xalan: 2.2.D9: Return record on 2001.10.06 (Expecting 1 record)" + java -cp %CP22D9% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate='2001.10.06']" + + rem Return all records after 2001.10.01 (Expecting 3 records) + + echo "Xalan: 2.0.1: Return all records after 2001.10.01 (Expecting 3 records)" + java -cp %CP201% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01']" + + echo "Xalan: 2.1.0: Return all records after 2001.10.01 (Expecting 3 records)" + java -cp %CP210% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01']" + + echo "Xalan: 2.2.D6: Return all records after 2001.10.01 (Expecting 3 records)" + java -cp %CP22D6% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01']" + + echo "Xalan: 2.2.D9: Return all records after 2001.10.01 (Expecting 3 records)" + java -cp %CP22D9% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01']" + + rem Return first record after 2001.10.01 (Expecting 1 record) + + echo "Xalan: 2.0.1: Return first record after 2001.10.01 (Expecting 1 record)" + java -cp %CP201% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01'][1]" + + echo "Xalan: 2.1.0: Return first record after 2001.10.01 (Expecting 1 record)" + java -cp %CP210% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01'][1]" + + echo "Xalan: 2.2.D6: Return first record after 2001.10.01 (Expecting 1 record)" + java -cp %CP22D6% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01'][1]" + + echo "Xalan: 2.2.D9: Return first record after 2001.10.01 (Expecting 1 record)" + java -cp %CP22D9% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate>'2001.10.01'][1]" + + rem Return all records before 2001.10.01 (Expecting 4 records) + + echo "Xalan: 2.0.1: Return all records before 2001.10.01 (Expecting 4 records)" + java -cp %CP201% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate<'2001.10.01']" + + echo "Xalan: 2.1.0: Return all records before 2001.10.01 (Expecting 4 records)" + java -cp %CP210% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate<'2001.10.01']" + + echo "Xalan: 2.2.D6: Return all records before 2001.10.01 (Expecting 4 + records)" + java -cp %CP22D6% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate<'2001.10.01']" + + echo "Xalan: 2.2.D9: Return all records before 2001.10.01 (Expecting 4 + records)" + java -cp %CP22D9% ApplyXPath xpathtest.xml "/Analysis/Samples/Sample + [@TradingDate<'2001.10.01']" + ----------------------------------------------------------------------- + <?xml version="1.0" encoding="UTF-8"?> + <Analysis> + <Samples> + <Sample StockPrice="4.8" TradingDate="1999.09.27"/> + <Sample StockPrice="4.7" TradingDate="1999.09.28"/> + <Sample StockPrice="5.0" TradingDate="1999.09.29"/> + <Sample StockPrice="0.1" TradingDate="1999.10.02"/> + <Sample StockPrice="0.1" TradingDate="2001.10.06"/> + <Sample StockPrice="0.2" TradingDate="2001.10.07"/> + <Sample StockPrice="0.5" TradingDate="2001.10.08"/> + </Samples> + </Analysis> + -----------------------------------------------------------------------
