cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steph <proje...@free.fr>
Subject [readers] file contains errors ?? ??
Date Thu, 22 Jan 2004 19:39:44 GMT
Hello,

Will first thank you Miles Elam for his help, showing me the way of
readers.

Though, I still would like to dipsplay these images.

I modified my sitemap with: 

<!-- =================== Components =================== -->
 
<map:components>

  <map:readers default="resource">
    <map:reader name="databasereader"
src="org.apache.cocoon.reading.DatabaseReader"
logger="sitemap.reader.databasereader" pool-max="32" pool-min="1"
pool-grow="4">
     <use-connection>public-users</use-connection>
    </map:reader>
  </map:readers>

</map:components>

and in my pipeline :
<!-- =================== pipeline =================== -->
...
<!-- images -->
<map:match pattern="images/*.jpg">
  <map:read type="databasereader"
                src="{1}"
                mime-type="image/jpg">
    <!-- option sitemap parameters -->
    <map:parameter name="table" value="document"/>
    <map:parameter name="image" value="content"/>
    <map:parameter name="key" value="doc_id"/>
  </map:read>
</map:match>
...

This is a desc of my postgresql table:
pfe=> \d document
              Table "public.document"
     Colonne      |      Type       | Modifications 
------------------+-----------------+---------------
 doc_id           | integer         | not null
 doc_title        | character(1024) | 
 content          | oid             | 
 comments         | character(2048) | 
 provider         | integer         | 
 documentation_id | integer         | 
 doc_type         | character(128)  |


So the request I want to do in my sitemap is :

SELECT content FROM document WHERE {1}=doc_id ;

But when i do: http://localhost:8888/path_to_my_app/images/5.jpg (for
example) 

I've got :
The image “http://localhost:8888/path_to_my_app/images/5.jpg” cannot be
displayed, because it contains errors.

(if I try with 18.jpg which does not exist I've got a sitemap error.)


Thanks in advance,
Stephane



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message