Hello!
I'm a newbie. I tried to use the /db/addressbook shipped with Xindice. I've
found some examples on http://cocooncenter.de. But the examples didn't run
yet.
If I try to run this :  (db_test.xml)

<?xml version="1.0" encoding="UTF-8"?>
<collection:results query="//person[contains(fname,'John')]"
  resources="1" xmlns:collection="http://apache.org/cocoon/xmldb/1.0";>
  <collection:result docid="address1">
    <person xmlns:src="http://xml.apache.org/xindice/Query";
      src:col="/db/addressbook"
      src:key="address1">
      <fname>John</fname>
      <lname>Smith</lname>
      <phone type="work">563-456-7890</phone>
      <phone type="home">534-567-8901</phone>
      <email type="home">[EMAIL PROTECTED]</email>
      <email type="work">[EMAIL PROTECTED]</email>
      <address type="home">34 S. Colon St.</address>
      <address type="work">9967 W. Shrimp Ave.</address>
    </person>
  </collection:result>
</collection:results>

I only get the xml-source (above) on the Browser! ???

This is the part of the sitemap.xmap:
...
<map:pipeline>
  <map:match pattern="db_test" type="wildcard">
   <map:generate src="db_test.xml" type="file"/>
   <map:serialize type="xml"/>
  </map:match>
 </map:pipeline>
...
------------------------------
if I type this 
http://localhost:8080/cocoon/xmldb/addressbook/?xpath=//person[contains(fnam
e,'John')
<http://localhost:8080/cocoon/xmldb/addressbook/?xpath=//person[contains(fna
me,'John')> ]
in my browser I get all data about John.
------------------------------
So I ask you some questions:

Do you know what I have done wrong?
How do cocoon know which DB I want to use in the xml-file?

I use Win 2k, Tomcat 4.0.4, Cocoon 2.0.3 (compiled on Java 1.3.x), Xindice
1.0, Java SDK 1.3.1_04

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to