Hi, I made the changes you proposed. The query as such works now but - surprise - it always returns now the same answer:
c:\Programme\xml-xindice-1.0>xindice xpath_query -c /db/klemens -q /[EMAIL PROTECTED]"120320"] <?xml version="1.0"?> <product product_id="120320" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/klemens" src:key="test3"> <description>Glazed Ham</description> </product> c:\Programme\xml-xindice-1.0>xindice xpath_query -c /db/klemens -q [EMAIL PROTECTED]"de"] <?xml version="1.0"?> <product product_id="120320" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/klemens" src:key="test3"> <description>Glazed Ham</description> </product> I just changed the last lines in the bat file: REM set CL= REM :LOOP REM if "%1"=="" goto DONE REM set CL=%CL% %1 REM shift REM goto LOOP REM :DONE :runAnt %JAVACMD% -Xms16m -Xmx128m -Djacorb.verbosity=0 -Dxindice.home=%XINDICE_HOME% -Dcmd.home=%XINDICE_HOME%\bin -classpath %LOCALCLASSPATH% org.apache.xindice.tools.XMLUserTools %CL% :end set LOCALCLASSPATH= Klemens -----Urspr�ngliche Nachricht----- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 9. Juli 2002 14:48 An: [email protected] Betreff: Re: AW: AW: XPATH usage There is (was?) a bug in the window's command file for Xindice which incorrectly passes the command line parameters to the java application. I posted a revised command file some weeks back to this group which resolved the issue. Julian > Hi, > > This does not work either. The really curious thing is that sometimes > other queries work. > > I tried the query also in some XINDICE browser and there it does not > work too. Thus I think this has nothing to do with the way how Windows > (XP) treats command lines. > > Klemens > > -----Urspr�ngliche Nachricht----- > Von: Mark J. Stang [mailto:[EMAIL PROTECTED] > Gesendet: Montag, 8. Juli 2002 15:06 > An: [email protected] > Betreff: Re: AW: XPATH usage > > > Shouldn't it be: > > xindice xpath -c /db/klemens -q "/[EMAIL PROTECTED]'120320']" > > xpath not xpath_query... > > Mark > > "Dr. Klemens Waldh�r" wrote: > > > I tried this too. The answer I get is: > > > > c:\Programme\xml-xindice-1.0>xindice xpath_query -c /db/klemens -q > > "/[EMAIL PROTECTED]'120320']" Results in: > > > > "='120320']""==""" ist syntaktisch an dieser Stelle nicht > > verarbeitbar. > > > > Which literally translated means: "='120320']""==""" cannot be > > treated > > (?) syntactically at this point. > > > > Klemens > > > > -----Urspr�ngliche Nachricht----- > > Von: Mark J. Stang [mailto:[EMAIL PROTECTED] > > Gesendet: Samstag, 6. Juli 2002 21:52 > > An: [email protected] > > Betreff: Re: XPATH usage > > > > This is necessary on Windows. Otherwise, the command-line parser in > > windows gets screwed up. It is a platform thing... > > > > Mark > > > > "Richard R. Liu" wrote: > > > > > Try > > > > > > xindice xpath_query -c /db/klemens -q > > > "/[EMAIL PROTECTED]'120320']" > > > > > > i.e., double quotes around the query and single quotes within it. > > > > > > > -----Original Message----- > > > > From: Rizwan Virk [mailto:[EMAIL PROTECTED] > > > > Sent: Saturday, July 06, 2002 17:07 > > > > To: [email protected] > > > > Subject: RE: XPATH usage > > > > > > > > > > > > hi, > > > > > > > > try it with single quotes ... this makes a difference sometimes > > > > ... /[EMAIL PROTECTED]'120320'] > > > > > > > > Thanks > > > > Riz > > > > > > > > ------------------------------ > > > > Riz Virk, (617) 905-3518 > > > > [EMAIL PROTECTED], [EMAIL PROTECTED] > > > > http://www.xyztechnologies.com > > > > > > > > > > > > -----Original Message----- > > > > From: Dr. Klemens Waldh�r [mailto:[EMAIL PROTECTED] > > > > Sent: Saturday, July 06, 2002 10:54 AM > > > > To: [email protected] > > > > Subject: XPATH usage > > > > > > > > > > > > Hi, > > > > > > > > I tried several times to run the XPATH example given in the user > > > > manual. It does not seem to work. > > > > > > > > I imported several files. Also one with given in the manual. My > > > > collectionn is called db/klemens. > > > > > > > > <?xml version="1.0"?> > > > > <product product_id="120320"> > > > > <description>Glazed Ham</description> > > > > </product> > > > > > > > > Now when I search using > > > > > > > > c:\projects\perl\tm>xindice xpath_query -c /db/klemens -q > > > > /[EMAIL PROTECTED]"120320"] > > > > > > > > ====> No result ! > > > > > > > > If I use the following simple XPATH query instead: > > > > > > > > c:\projects\perl\tm>xindice xpath_query -c /db/klemens -q > > > > /product > > > > > > > > I get: > > > > > > > > > > > > <?xml version="1.0"?> <product product_id="120320" > > > > xmlns:src="http://xml.apache.org/xindice/Query" > > > > sr:col="/db/klemens" > > > > > > src:key="test3"> > > > > <description>Glazed Ham</description> > > > > </product> > > > > c:\projects\perl\tm> > > > > > > > > It works ! Now what's wrong with the first query ? Do I have to > > > > create an index ? I am really wondering. > > > > > > > > With regard to the article mentioned at XINDICE realm it should > > > > work > > > > > > too (Apache's Xindice Organizes XML Data Without Schema). The > > > > example there is as follows (although one has to adapt it because > > > > this is not a valid > > > > XML document and XINDICE recognises this bug) > > > > > > > > " <?xml version="1.0"?> > > > > <product product_id="1" type="widget"> > > > > <description>foo</description> > > > > </product> > > > > <product product_id="2" type="widget"> > > > > <description>bar</description> > > > > </product> > > > > <product product_id="3" type="widget"> > > > > <description>foobar</description> > > > > </product> > > > > > > > > And the author states: If I wanted to write an XPath query to > > > > select > > > > > > the second product, I could use the following query string: > > > > /[EMAIL PROTECTED]"2"] > > > > " > > > > > > > > So theoretically my statement is correct. > > > > > > > > Thanks for your help ! > > > > > > > > I also used the query in some of the browsers avalable for > > > > XINDICE > > > > > and it does not work either. Curiously other queries sometimes > > > > work, > > > > > > sometimes not. And it hard to see why one query works and the > > > > other not. > > > > > > > > Another question: Is there an easy way to check if XINDICE is > > > > running or not ? Idea is to check through the web if the server is > > > > > running or not on a specific machine. > > > > > > > > BTW: XINDICE is a cool tool. > > > > > > > > Klemens > > > > > > > > > > > > -- > > Mark J Stang > > System Architect > > Cybershop Systems > > -- > Mark J Stang > System Architect > Cybershop Systems > >
