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 Domagala Marcin <m....@plusnet.pl> on 2003/12/29 14:24:52 UTC
XPath Query node position problem
Hi
I'have such problem using Xindice with Cocoon in embedded mode:
When i use such query
xmldb:xindice-embed:///db/addressbook/#/person
i've got
<xmldb:results xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
query="/person" resources="2"><xmldb:result
xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
docid="06ffa7c01f9fdabb000000f9c1c4eab9"><person
xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/addressbook"
src:key="06ffa7c01f9fdabb000000f9c1c4eab9">
<fname>John</fname>
<lname>Smith</lname>
<phone type="work">563-456-7890</phone>
<phone type="home">534-567-8901</phone>
<email type="home">jsmith@somemail.com</email>
<email type="work">john@lovesushi.com</email>
<address type="home">34 S. Colon St.</address>
<address type="work">9967 W. Shrimp Ave.</address>
</person></xmldb:result><xmldb:result
xmlns:xmldb="http://apache.org/cocoon/xmldb/1.0"
docid="06ffa7c01f9fdabb000000f9c1c5328c"><person
xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/addressbook"
src:key="06ffa7c01f9fdabb000000f9c1c5328c">
<fname>SlackJawedLocal</fname>
<lname>Cletus</lname>
<phone type="work">123-456-7890</phone>
<phone type="home">234-567-8901</phone>
<phone type="cell">345-678-9012</phone>
<email type="home">cletus@hotmail.com</email>
<email type="work">cletus@micrsquish.com</email>
<address type="home">1234 S. Elm St.</address>
<address type="work">4567 W. Pine St.</address>
</person></xmldb:result></xmldb:results>
And this is ok but when i've try to get first <person> element with query
xmldb:xindice-embed:///db/addressbook/#/person[1]
i've got same result.
Is it something wrong with my query?
another queries for example:
xmldb:xindice-embed:///db/addressbook/#/person[lname='John']
works fine.
on
http://wiki.cocoondev.org/Wiki.jsp?page=XMLIndiceCocoon2.1
there is such query as example
xmldb:xindice-embed:///db/myCollection/#/*[[1]]
but it also doesn't work
any suggestions ?
Greatings
Marcin Domagala