You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Charles Guo <ch...@rescentris.com> on 2003/01/13 18:03:31 UTC
XPath- Wildcard *
Hello,
I am using both xml-xindice-1.0 on both Red Hat Linux 7.1 and Windows 2000
Pro.
I have found that the wildcard * ,in many cases, only works in the Windows
but not the Linux.
For example:
Linux Windows
----------------------------------------------------------
-q "//product[@id] element return element return
-q "//*[@id] (No return) element return
-g //* (No return) element return
-g /* (No return) element return
What is the problem?
Thanks for help,
Charles
RE: XPath- Wildcard *
Posted by Charles Guo <ch...@rescentris.com>.
Hi Jeff,
I tried the -q '//*' and it behaves like double quotes and no quotes ---
No result returns.
Thank you just the same. If you have other suggestions, please let me know.
Charles
-----Original Message-----
From: Jeff Greif [mailto:jgreif@alumni.princeton.edu]
Sent: Monday, January 13, 2003 2:30 PM
To: xindice-users@xml.apache.org
Subject: Re: XPath- Wildcard *
The asterisk (*) probably needs to be in single quotes, not double quotes,
on Linux, to prevent the shell from trying to substitute directory contents
for it.
Try -q '//*'
Jeff
----- Original Message -----
From: "Charles Guo" <ch...@rescentris.com>
To: <xi...@xml.apache.org>
Sent: Monday, January 13, 2003 10:51 AM
Subject: RE: XPath- Wildcard *
>
> Thanks Gianugo, I did play around with and without the " on Linux (bash)
>
> -q "//*" or -q //*
>
> -q "//*[@id]" or -q //*[@id]
>
> Unfortunately, none of them work. I wonder if something more than the "
> could be the reason for the failed function of * in Xpath/Linux.
>
> More ideas? Thanks again.
>
> Charles
>
> -----Original Message-----
> From: Gianugo Rabellino [mailto:gianugo@apache.org]
> Sent: Monday, January 13, 2003 12:11 PM
> To: xindice-users@xml.apache.org
> Subject: Re: XPath- Wildcard *
>
>
> Charles Guo wrote:
> >
> > I have found that the wildcard * ,in many cases, only works in the
Windows
> > but not the Linux.
> >
> > What is the problem?
>
> Different quoting behaviour in different shells. Try to avoid " on Linux
> when using stars (or quote them appropriately with \).
>
> Ciao,
>
> --
> Gianugo Rabellino
>
>
>
Re: XPath- Wildcard *
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
The asterisk (*) probably needs to be in single quotes, not double quotes,
on Linux, to prevent the shell from trying to substitute directory contents
for it.
Try -q '//*'
Jeff
----- Original Message -----
From: "Charles Guo" <ch...@rescentris.com>
To: <xi...@xml.apache.org>
Sent: Monday, January 13, 2003 10:51 AM
Subject: RE: XPath- Wildcard *
>
> Thanks Gianugo, I did play around with and without the " on Linux (bash)
>
> -q "//*" or -q //*
>
> -q "//*[@id]" or -q //*[@id]
>
> Unfortunately, none of them work. I wonder if something more than the "
> could be the reason for the failed function of * in Xpath/Linux.
>
> More ideas? Thanks again.
>
> Charles
>
> -----Original Message-----
> From: Gianugo Rabellino [mailto:gianugo@apache.org]
> Sent: Monday, January 13, 2003 12:11 PM
> To: xindice-users@xml.apache.org
> Subject: Re: XPath- Wildcard *
>
>
> Charles Guo wrote:
> >
> > I have found that the wildcard * ,in many cases, only works in the
Windows
> > but not the Linux.
> >
> > What is the problem?
>
> Different quoting behaviour in different shells. Try to avoid " on Linux
> when using stars (or quote them appropriately with \).
>
> Ciao,
>
> --
> Gianugo Rabellino
>
>
>
RE: XPath- Wildcard *
Posted by Charles Guo <ch...@rescentris.com>.
Thanks Gianugo, I did play around with and without the " on Linux (bash)
-q "//*" or -q //*
-q "//*[@id]" or -q //*[@id]
Unfortunately, none of them work. I wonder if something more than the "
could be the reason for the failed function of * in Xpath/Linux.
More ideas? Thanks again.
Charles
-----Original Message-----
From: Gianugo Rabellino [mailto:gianugo@apache.org]
Sent: Monday, January 13, 2003 12:11 PM
To: xindice-users@xml.apache.org
Subject: Re: XPath- Wildcard *
Charles Guo wrote:
>
> I have found that the wildcard * ,in many cases, only works in the Windows
> but not the Linux.
>
> What is the problem?
Different quoting behaviour in different shells. Try to avoid " on Linux
when using stars (or quote them appropriately with \).
Ciao,
--
Gianugo Rabellino
Re: XPath- Wildcard *
Posted by Gianugo Rabellino <gi...@apache.org>.
Charles Guo wrote:
>
> I have found that the wildcard * ,in many cases, only works in the Windows
> but not the Linux.
>
> What is the problem?
Different quoting behaviour in different shells. Try to avoid " on Linux
when using stars (or quote them appropriately with \).
Ciao,
--
Gianugo Rabellino