cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Mayrhuber <>
Subject Re: Problem with showing pictures from eXist database
Date Fri, 13 Aug 2004 17:06:16 GMT
On Friday 13 August 2004 14:24, Eelke Toonstra wrote:
> I have a problem with showing images from the eXist database in Cocoon.
> When I want to show an image in my browser, for example
> http://localhost:8080/exist/xmldb/db/images/test.jpg it doesn't show a
> picture but the small icon indicating there's no picture.XML files from
> the database work without any problems.
> The sitemap.xmap contains:
> <map:match pattern="xmldb/db/images/**.jpg">
> 	<map:read src="xmldb:exist:///db/images/{1}.jpg" mime-type="text/jpg"/>
> </map:match>
> <map:match pattern="**.jpg">
> 	<map:read mime-type="image/pjpeg" src="{1}.jpg"/>
> </map:match>
> I tried it for gif images as well, but the same problem occurs.
> When I don't use the database it works fine e.g.:
> <map:match pattern="xmldb/db/images/**.jpg">
> 	<map:read src="images/test.jpg" mime-type="image/jpg"/>
> </map:match>
> What could be the problem?
> More in general, is it a good idea to keep the pictures with the XML files
> in the same database?
> Thanks in advance
> eXist 1.0
> Cocoon 2.0
> Java 1.4
> Jetty 4.1
> Windows XP

You are accessing exist trough the cocoon source resolving mechanism, that
would require a ExistSource implementation speaking the xmldb:exist://
There is no ExistSource implementation available.
There exists a XMLDBTransformer and a XQueryGenerator to perform various
queries to the exist database.

If you want to read binary content from the exist database you have to use
the webdav source of your eXist installation.

To test if webdav is working point your browser to:

In your sitemap use:

<map:match pattern="xmldb/db/images/**.jpg">
	<map:read src="webdav://localhost:8080/db/images/{1}.jpg" 


<map:match pattern="xmldb/db/images/**.jpg">
	<map:read src="http://localhost:8080/db/images/{1}.jpg" 

I hope this helps.

lg, Chris

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

View raw message