cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Moylan <>
Subject Re: Cocoon and Xindice
Date Mon, 19 Aug 2002 08:29:01 GMT
This may be of some use to you, it's a snippet from my sitemap showing 
the use of stylesheets with Xindice. Note the use of <map:transform 
You are also serializing as XML specifically in your sutemap which from 
your email, does not sound like the effect you require. Try serializing 
to html instead.

>>How do cocoon know which DB I want to use in the xml-file?

You tell cocoon the collection(db) you want to use in the URL. eg the following URL is using
the addressbook collection(db).



<map:match pattern="xmldb/**">
                <map:match pattern="xpath" type="request-parameter">
                        <map:transform src="stylesheets/jtest.xsl">
                <map:generate src="xmldb:xindice://localhost:4080/db/{1}"/>
                <map:transform src="stylesheets/jtest.xsl">

praktikant wrote:

>I'm a newbie. I tried to use the /db/addressbook shipped with Xindice. I've
>found some examples on But the examples didn't run
>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="">
>  <collection:result docid="address1">
>    <person xmlns:src=""
>      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>
>      <email type="work"></email>
>      <address type="home">34 S. Colon St.</address>
>      <address type="work">9967 W. Shrimp Ave.</address>
>    </person>
>  </collection:result>
>I only get the xml-source (above) on the Browser! ???
>This is the part of the sitemap.xmap:
>  <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 
>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.     <>
>To unsubscribe, e-mail:     <>
>For additional commands, e-mail:   <>

The information in this e-mail is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this e-mail by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in reliance
on it, is prohibited and may be unlawful.
Please note that emails to, from and within RTÉ may be subject to the Freedom
of Information Act 1997 and may be liable to disclosure.

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message