> From: Alex McLintock [mailto:[EMAIL PROTECTED]]
>
> Hi folks,
>
> I'm trying to get Cocoon2 (recent CVS snapshot) working with Xindice
1.0 on
> RedHat Linux/Tomcat4
>
> Happily the biggest problem is no more.....
>
> I can successfully call something like this
>
>
http://myserver:8080/cocoon/asubdir/xmldb/reviews/?xpath=//review[contai
ns(tit
> le,%27Dune%27)]
>
>
> This is in my sitemap....
>
> <!-- THIS WORKS - HOORAY -->
> <map:match pattern="xmldb/**">
> <map:match type="request-parameter" pattern="xpath">
> <map:generate
> src="xmldb:xindice://localhost:4080/db/{../1}#{1}"/>
> <map:serialize type="xml"/>
> </map:match>
> <map:generate src="xmldb:xindice://localhost:4080/db/{1}"/>
> <map:serialize type="xml"/>
> </map:match>
>
>
> But I'd also like to be able to respond to URLs like this since this
is a
> bit more secure.
>
>
> http://myserver:8080/cocoon/asubdir/reviewbytitle/Dune
>
> This is what I tried.....
>
> <!-- these don't work yet..... -->
> <map:match pattern="reviewbytitle/**">
> <map:generate
>
src="xmldb:xindice://localhost:4080/db/reviews/#?xpath=//review[contains
(title
> ,'{1}')]"/>
Why question mark? Why 'xpath=' ???
As you wrote above:
<map:generate src="xmldb:xindice://localhost:4080/db/{../1}#{1}"/>
Note that there is no '?', and no 'xpath='.
PS From the http://xml.apache.org/cocoon/changes.html:
"URL should be in form: xmldb:dbxml://host:port/db/collection/#/xpath"
Vadim
> <map:serialize type="xml"/>
> </map:match>
>
>
> I get back an empty result set
>
> <?xml version="1.0" encoding="UTF-8"?>
> <collection:results query="?xpath=//review[contains(title,'Dune')]"
> resources="0" xmlns:collection="http://apache.org/cocoon/xmldb/1.0"/>
>
> Can you see what I am doing wrong? I guess it is something to do with
the
> bit before "xpath"
>
> In case it wasnt obvious I have a collection called reviews. Each of
the
> documents in it has one "<review>" section, and there is a "<title>"
tag in
> the review.
>
>
> (I was using the following page to help me....
> http://www.cocooncenter.de/cc/documents/resources/xindice/index.html
> )
>
> Alex
>
---------------------------------------------------------------------
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]>