Thanks guys. In fact, once embedded into my code there is no problem with the command interpreter.
However, I still have one issue: I want to retrieve all the documents from the collection where the userID is Jack and the date is 2004-01-23 Would the following query be correct? //doc([contains(userID,"Jack")] and [contains(date,"2004-01-23")]) Regards, Boris ----- Original Message ----- From: "Jeff Greif" <[EMAIL PROTECTED]> To: <xindice-users@xml.apache.org> Sent: Friday, January 23, 2004 2:59 PM Subject: Re: XPath query with a contains() function > I think you need the single quotes on the outside and the double quotes > inside on Windows, in order to prevent the Windows command interpreter from > trying to treat "/..." as a command switch. Try > xindice xpath -c /db/test -q '//doc[contains(userID,"Jack")]' > > Jeff > ----- Original Message ----- > From: "Terry Rosenbaum" <[EMAIL PROTECTED]> > To: <xindice-users@xml.apache.org> > Sent: Friday, January 23, 2004 6:15 AM > Subject: Re: XPath query with a contains() function > > > > On windows, using the command prompt, it is virtually impossible > > to correctly quote/escape some xpath queries that you may wish to run. > > > > On unix shells (sh, csh, ksh, tcsh, bash, ...) it is not so hard. > > Best advice is to procure a unix shell that runs on your > > windows system. One solution is to install the cygwin > > environment. > > > > Another way around this would be to modify the xindice command-line tool > > to add a "-qf <filename>" option. The -qf option, if present, would > > specify the name of > > a file to read the query from. It would be used instead of the -q option. > If > > the query were read from a file, no shell escaping would be needed. > > > > -Terry > > > > Boris Rousseau wrote: > > > > >I am using windows. > > >Still does not work... > > > > > >----- Original Message ----- > > >From: "Vadim Gritsenko" <[EMAIL PROTECTED]> > > >To: <xindice-users@xml.apache.org> > > >Sent: Friday, January 23, 2004 1:32 PM > > >Subject: Re: XPath query with a contains() function > > > > > > > > > > > > > > >>Boris Rousseau wrote: > > >> > > >> > > >> > > >>>Hi all, > > >>> > > >>>I am testing this query from the command line and I cannot see why the > > >>>following does not work: > > >>>xindice xpath -c /db/test -q "//doc/userID[contains(.,'Jack')]" > > >>>or > > >>>xindice xpath -c /db/test -q "//doc[contains(userID,'Jack')]" > > >>>gives me the error message: 'Jack')]""=="" was unexpected at this time. > > >>> > > >>>Can anoybody see why? > > >>> > > >>> > > >>> > > >>> > > >>Is it windows or unix? It works just ok under cygwin for me. > > >> > > >> > > >>PS Hint, if you have not got it already: You can do just so much with > > >>command line parameters under Win > > >> > > >>Vadim > > >> > > >> > > >> > > > > >