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 [EMAIL PROTECTED] > - 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: <[EMAIL PROTECTED]> >For additional commands, e-mail: <[EMAIL PROTECTED]> --------------------------------------------------------------------- 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]>