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 Thomas Zastrow <ch...@thomas-zastrow.de> on 2003/11/06 18:50:09 UTC
Newbie-Question
Hello,
I'm Tom from Germany and I'm new to Xindice and this list :-)
At first I would like to thank all the people around Xindice, it's a great pice of software!
So, and here is my first question ... ;-)
I have a XML-document imported and the Xpath-query
xindice xpath_query -c /db/corpora/taz -q /corpus//syntax
brings up a lot results like this:
<?xml version="1.0"?>
<syntax cat="NE" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/corpora/taz" src:key="teil1.10-1">
<token wclass="NE" lemma="Dax">
Dax
</token>
</syntax>
Now I want just all the <syntax>-Tags which matches for example with cat="NE". So I did this:
xindice xpath_query -c /db/corpora/taz -q /corpus//syntax[@cat="NE"]
And the result ist empty ... but there *are* a lot matching <syntax>-Tags with the atribut cat="NE"
Any ideas??? I'm absolutely new to Xpath, perhaps you can recommend me some good books, tutorials etc.??
Thanks a lot for your patience!
Greetings,
Tom
--
----------------------------------------------------
|Q: What's little, yellow and very very dangerous? |
|A: A canary with the super-user password. |
|--------------------------------------------------|
| http://www.thomas-zastrow.de |
----------------------------------------------------
Re: Newbie-Question
Posted by Thomas Zastrow <ch...@thomas-zastrow.de>.
On Thu, 6 Nov 2003 10:04:14 -0800
"Jeff Greif" <jg...@alumni.princeton.edu> wrote:
> Try quoting the entire query string, like this
> xindice xpath_query -c /db/corpora/taz -q '/corpus//syntax[@cat="NE"]'
> or this
> xindice xpath_query -c /db/corpora/taz -q "/corpus//syntax[@cat='NE']"
>
> Different operating systems prefer one or the other version, so if one fails
> to help, try the other.
Thank you, that's it, now it works fine!!!
Greetings,
Tom
--
----------------------------------------------------
|Q: What's little, yellow and very very dangerous? |
|A: A canary with the super-user password. |
|--------------------------------------------------|
| http://www.thomas-zastrow.de |
----------------------------------------------------
Re: Newbie-Question
Posted by Jeff Greif <jg...@alumni.princeton.edu>.
Try quoting the entire query string, like this
xindice xpath_query -c /db/corpora/taz -q '/corpus//syntax[@cat="NE"]'
or this
xindice xpath_query -c /db/corpora/taz -q "/corpus//syntax[@cat='NE']"
Different operating systems prefer one or the other version, so if one fails
to help, try the other.
Jeff
----- Original Message -----
From: "Thomas Zastrow" <ch...@thomas-zastrow.de>
To: <xi...@xml.apache.org>
Sent: Thursday, November 06, 2003 9:50 AM
Subject: Newbie-Question
> Hello,
>
> I'm Tom from Germany and I'm new to Xindice and this list :-)
>
> At first I would like to thank all the people around Xindice, it's a great
pice of software!
...
> Now I want just all the <syntax>-Tags which matches for example with
cat="NE". So I did this:
>
> xindice xpath_query -c /db/corpora/taz -q /corpus//syntax[@cat="NE"]
>
> And the result ist empty ... but there *are* a lot matching <syntax>-Tags
with the atribut cat="NE"
...