You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by ap...@georg-schmitt.de on 2001/04/17 19:02:07 UTC

temporary files - fragment extractor

Hello,

in the cocoon2 sample: "SVG welcome page" i have seen, that it is possible
to create temporary files. I think the fragment extractor is the reason
for that.
Now i want to know, if there is any documantion how to use the fragment
extractor?
or how can i create temporary files?

regards
  Georg



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: embed svg in cocoon 1.8.2?

Posted by Denny <dd...@magic.fr>.
Thanks Donald

Again, I do appreciate your speedy response to my questions!

cheers
Denny

Donald Ball wrote:
> 
> On Fri, 20 Apr 2001, Denny wrote:
> 
> > Hi
> > We're trying to embed svg in html with C 1.8.2
> > latest tomcat
> > latest everything
> >
> > Has anyone done this? Does anyone know how we can do it?
> 
> you could write an svg formatter for c1 using xml-batik - or you could try
> c2, which has svg transcoding support already.
> 
> - donald
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: embed svg in cocoon 1.8.2?

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 20 Apr 2001, Denny wrote:

> Hi
> We're trying to embed svg in html with C 1.8.2
> latest tomcat
> latest everything
>
> Has anyone done this? Does anyone know how we can do it?

you could write an svg formatter for c1 using xml-batik - or you could try
c2, which has svg transcoding support already.

- donald


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


embed svg in cocoon 1.8.2?

Posted by Denny <dd...@magic.fr>.
Hi 
We're trying to embed svg in html with C 1.8.2
latest tomcat 
latest everything

Has anyone done this? Does anyone know how we can do it?

Thanks 
Denny

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: temporary files - fragment extractor

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

apache@georg-schmitt.de a écrit :
> 
> Hello,
> 
> in the cocoon2 sample: "SVG welcome page" i have seen, that it is possible
> to create temporary files. I think the fragment extractor is the reason
> for that.
> Now i want to know, if there is any documantion how to use the fragment
> extractor?
> or how can i create temporary files?
> 
> regards
>   Georg
> 

The fragment extractor in C2 is a nice piece of work from Paul Russell.
It doesn't create temporary files, but allows a single generator to feed
several requests which is perhaps what you need. I'll try to explain my
understanding of it (Paul, correct me if there are some mistakes).

Quoting the Javadoc :
 * FragmentExtractor is a transformer-generator pair which is designed
to allow
 * sitemap managers to extract certain nodes from a SAX stream and move
them
 * into a separate pipeline. The main use for this is to extract inline
SVG
 * images and serve them up through a separate pipeline, usually
serializing
 * them to PNG or JPEG format first.

The first phase is to have a generator (or a subsequent transformer)
that produces SVG images embedded in other markup (HTML in C2 examples).
When piped through the FragmentExtractorTransformer, this one traps all
SVG markup, stores it in memory and replaces it by a <fe:fragment
fragment-id="..."/> tag (the fragement-id uniquely indentifies the
stored extracted fragment). The last transformation stage can then
transform these <fe:fragment> in HTML <img> tags that are mapped by the
sitemap to the FragmentGenerator.

The second phase is to use the FragmentGenerator to retrieve from the
in-memory store the fragments extracted in the first phase, using the
fragment-id. From there on, the fragment can be transformed as usual.

Have a look at the sitemap.xmap from C2 samples to see a practical use
of this stuff. For now it's limited to SVG extraction, but it could
easily be extended if you find other uses for it.

Hope this helps.

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>