On Thu, 21 Feb 2002, Gianugo Rabellino wrote:
> Stephan Michels wrote:
> > I try to use cocoon with xindice.
>
> Please avoid, if possible, the XML:DB generators, swith to the Source
> implementation, which allows you to use straightforward XML:DB URIs in
> your sitemap. The generators are going to be deprecated and abandoned in
> a short while.
Okay, thank you.
> Anyway, as for your problem, try to correct this:
>
> > <base>xmldb:dbxml:///db/</base>
>
> Base should be is xmldb:xindice///db/.
>
> Also, you are getting the error from the XML:DB source protocol, not
> from the generators, please double check your settings:
I also added the the line
<driver type="xindice"
class="org.apache.xindice.client.xmldb.DatabaseImpl"/>
into the cocoon.xconf
When I now try the request
http://vernjava:8080/cocoon/xmldb/addressbook?xpath=//person[lname=%27Cletus%27]
I got following exception:
org.apache.cocoon.ProcessingException: Could not read resource
xmldb:xindice://vernjava:4080/addressbook:
java.lang.StringIndexOutOfBoundsException: String index out of range: -11
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:166)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:255)
If I try this in the cmdline:
>xindice xpath_query -c /db/addressbook -q //person[lname=\'Cletus\']
<?xml version="1.0"?>
<person xmlns:src="http://xml.apache.org/xindice/Query"
src:col="/db/addressbook" src:key="address2">
<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">[EMAIL PROTECTED]</email>
<email type="work">[EMAIL PROTECTED]</email>
<address type="home">1234 S. Elm St.</address>
<address type="work">4567 W. Pine St.</address>
</person>
Have anyone an idea?
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>