(Perhaps my question concerns more Xpath than Xindice itself... ?)
Is there a way to get only nodes without their descendant(s) ?
I test with these two documents:
$ cat doc1.xml
<?xml version="1.0"?>
<AAA>
<BBB/>
<CCC value="doc1">
<DDD/>
<EEE/>
</CCC>
<FFF/>
</AAA> $ $ cat doc2.xml
<?xml version="1.0"?>
<AAA>
<BBB/>
<CCC value="doc2">
<DDD/>
<EEE/>
</CCC>
<FFF/>
</AAA>
I'd like to get the list of "CCC values", without having the "DDD" and "EEE" nodes:
$ xindice xpath -c /db/test -q '/AAA/CCC' <?xml version="1.0"?> <CCC value="doc1" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/test" src:key="338c319e664de474000000eedabd3e89"> <DDD /> <EEE /> </CCC> <?xml version="1.0"?> <CCC value="doc2" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/test" src:key="338c319e664de474000000eedabd99ef"> <DDD /> <EEE /> </CCC>
What should be the QUERY for having this:
$ xindice xpath -c /db/test -q QUERY <?xml version="1.0"?> <CCC value="doc1" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/test" src:key="338c319e664de474000000eedabd3e89"> </CCC> <?xml version="1.0"?> <CCC value="doc2" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/test" src:key="338c319e664de474000000eedabd99ef"> </CCC>
NB: probably i didn't anderstand wel the tutorial http://www.zvon.org/xxl/XPathTutorial/General/examples.html ...
Thanks, Erick.
