Hi Jeff, I am sorry for the confusion. In the email, I did forget to type the double quotes around the 123456. In the real query, they are there (�123456�). The testing result on Linux should be like this:
Following NOT Work Following Works ---------------------- -------------------------- -q //[EMAIL PROTECTED] -q //[EMAIL PROTECTED] -q '//[EMAIL PROTECTED]' -q '//[EMAIL PROTECTED]' -q "//[EMAIL PROTECTED]" -q "//[EMAIL PROTECTED]" Still, the -q '//[EMAIL PROTECTED]' does NOT work. Thanks for your explanation of the quote issue on different platforms. Charles -----Original Message----- From: Jeff Greif [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 14, 2003 11:28 AM To: [email protected] Subject: Re: XPath_attribute You've forgotten to quote the value of @id --- should be @id="123456" or @id='123456'. I'm surprised any of the queries worked if they are transcribed correctly below. On Linux, '*' needs to be inside single quotes to prevent interpretation as a file wildcard by the shell. On Windows (using the Windows command prompt) / needs to be inside double quotes to prevent interpretation as a command switch. So on Linux, single quotes are needed on the outside of the query, with double quotes on the inner values (e.g. attribute values). On Windows, it needs to be the other way around. Jeff ----- Original Message ----- From: "Charles Guo" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Tuesday, January 14, 2003 7:37 AM Subject: RE: XPath_attribute > Hi Mark > > The single quotes do work on Linux. Thanks for you suggestion. > > Still, both single and double quotes have failed on Windows. > > > By the way, do you or anyone else have any idea that why the * does not work > on Linux, which is independent of the quote issue? > > > Following NOT Work Following Works > ---------------------- -------------------------- > > -q //[EMAIL PROTECTED] -q //[EMAIL PROTECTED] > > -q '//[EMAIL PROTECTED]' -q '//[EMAIL PROTECTED]' > > -q "//[EMAIL PROTECTED]" -q "//[EMAIL PROTECTED]" > > This is an important query for retrieving selected element(s). I need help > badly. > > > Charles > > -----Original Message----- > From: Mark J. Stang [mailto:[EMAIL PROTECTED] > Sent: Monday, January 13, 2003 6:31 PM > To: [email protected] > Subject: Re: XPath_attribute > > > Use single quotes. > > >xindice xpath_query -c /../.. -q "/[EMAIL PROTECTED]'AB123456']" > > > Charles Guo wrote: > > > Hello, > > > > I have encountered a problem that the xpath_query dose NOT take the > > attribute with LETTERS but takes ONLY NUMBERS. > > Is this a bug? Is there any way to get arround it? Thanks for help. > > > > For example: > > > > -------------- Following does NOT work --------------- > > > > <?xml version="1.0"?> > > <product id="AB123456"> > > <description> test </description> > > </product> > > > > >xindice xpath_query -c /../.. -q "/[EMAIL PROTECTED]"AB123456"]" > > ---------------------------------------------------------- > > > > -------------- Following (control) works --------------- > > > > <?xml version="1.0"?> > > <product id="123456"> > > <description> test </description> > > </product> > > > > >xindice xpath_query -c /../.. -q "/[EMAIL PROTECTED]"123456"]" > > > > ------------------------------------------------------------ > > > > === === === === System Info === === === === > > SW: Xindice Server (xml-xindice-1.0) > > Computer: PC > > OS: Windows 2000 Pro > > Red Hat Linux 7.1 > > > > Charles > > -- > Mark J Stang > System Architect > Cybershop Systems > > >
