You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Sreenivasan N." <sr...@ap.sony.com> on 2002/06/20 14:37:29 UTC

Help on displaying both image and content in one output

hi all

I would like to display my output with a image and content. Basically i 
would like to give user output with a chart using svg2jpg serializer and 
html output using an XSP taking data from database.
Is it possible in cocoon..?
Can anyone help me in this

Thanks in advance
Sreenivasan.










"Attitudes are much more important than aptitudes."
"Nothing is impossible for a willing heart"

Sreenivasan N.
Sony SARD
Ext 232

Email. sreenivasan.n@ap.sony.com
Per: nsreenivasan@yahoo.com


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Help on displaying both image and content in one output

Posted by Denis Thierry <de...@aic-info.com>.
I never tested it, but you could try to generate your 
html page that have an <img src="path_to_the_svg_jpg"/>
tag. 
Hence, when the page will request the image, it will generate
the jpg image from your XSP page!

Hope this will help you,

Denis

>hi all
>
>I would like to display my output with a image and content. Basically i 
>would like to give user output with a chart using svg2jpg serializer and 
>html output using an XSP taking data from database.
>Is it possible in cocoon..?
>Can anyone help me in this
>
>Thanks in advance
>Sreenivasan.










"Attitudes are much more important than aptitudes."
"Nothing is impossible for a willing heart"

Sreenivasan N.
Sony SARD
Ext 232

Email. sreenivasan.n@ap.sony.com
Per: nsreenivasan@yahoo.com


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Help on displaying both image and content in one output

Posted by Bert Van Kets <be...@vankets.com>.
At 23:49 20/06/2002 +0200, you wrote:

>Sreenivasan N. wrote:
>>hi all
>>I would like to display my output with a image and content. Basically i 
>>would like to give user output with a chart using svg2jpg serializer and 
>>html output using an XSP taking data from database.
>>Is it possible in cocoon..?
>>Can anyone help me in this
>
>Look at the samples, there is an example of a Cocoon start page done
>with svg parts.

I would just like to add this:
if you add an <img> tag in your html page the browser will see it and 
request the image.  This request is captured by Cocoon and the image is 
served.  Where Cocoon gets the image is up to you and teh sitemap.  You can 
use a reader to server a file from disk or a pipeline to generate an image 
using svg2jpg.  Don't use bitmap generation when it's not really 
necessary.  svg2jpg is slow.  Check out the non-cocoon xml.apache sites 
(ex. Xerxes site).  Their menu images are generated using Cocoon svg2jpg 
transformer.  These menu's appear a lot slower than the Cocoon menu.  You 
could also get hold of Cocoon v2.0.0 which still uses that menu and check 
it out.
Separating generated and read images is simply a matter of creating the 
right matchers in the right order.

example:

<map:match pattern="images/genrate-*.jpg">
   ...image generating generator, transformers and serializer
</map:match>

<map:match pattern="images/*.jpg">
   <map:read src="images/{1}.jpg"/>
</map:match>

These two pipelines will generate images if you add a <img 
src="images/generate-[image].jpg"> tag to a html page and serve from disk 
when the "generate-" part is omitted.  Note that the order of the pipelines 
is very important.

HTH,
Bert



>--
>Nicola Ken Barozzi                   nicolaken@apache.org
>             - verba volant, scripta manent -
>    (discussions get forgotten, just code remains)
>---------------------------------------------------------------------
>
>
>
>---------------------------------------------------------------------
>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:     <co...@xml.apache.org>
>For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


"Resource not found" message

Posted by Tom Loebach <lo...@yahoo.com>.
Folks,

  This is a newbie question. I am trying to pass parameters into cocoon with a URI that looks like this:

http://server:8080/cocoon/APP?color=red&shape=square

Cocoon has no problems when the parameters have values. If I pass in a URI that looks like this:

http://server:8080/APP?color=&shape=square

I get the follwoing error

------

The org.apache.cocoon.www.sitemap_xmap notifies that org.apache.cocoon.ProcessingException says:

Exception during processing of http://server;8080/APP?color=&shape=square 

More precisely:

org.apache.cocoon.ProcessingException: Exception during processing of http://server:8080/APP?color=&shape=square: org.apache.cocoon.ResourceNotFoundException: Resource not found http://server:8080/APP?color=&shape=square: java.io.FileNotFoundException: http://server:8080/APP?color=&shape=square

-----

My sitemap entry looks like this:

<map:match pattern="APP">
  <map:act type="request">
    <map:parameter name="parameters" value="true"/>
    <map:generate src="http://server/APP/app_query{requestQuery}"/>
    <map:transform src="APP/doc_list_app.xsl"/>
  </map:act>
  <map:serialize/>
</map:match>

-----

Any tips would be appreciated.

Thanks,

-tom



---------------------------------
Do You Yahoo!?
Sign-up for Video Highlights of 2002 FIFA World Cup

Re: Help on displaying both image and content in one output

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Sreenivasan N. wrote:
> hi all
> 
> I would like to display my output with a image and content. Basically i 
> would like to give user output with a chart using svg2jpg serializer and 
> html output using an XSP taking data from database.
> Is it possible in cocoon..?
> Can anyone help me in this

Look at the samples, there is an example of a Cocoon start page done
with svg parts.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



---------------------------------------------------------------------
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:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>