cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Sahuc <ssa...@imediation.com>
Subject RE: [C2] Generator which can do HTML->XHTML
Date Mon, 30 Oct 2000 11:49:28 GMT

> #2: When i tried to use the DOM document returned by parseDOM 
> with DOMStreamer, it did not work :(
> Hence the need for ByteArrayStream, i did not try to dig 
> deeper. I will revisit this sometime
> later when they update Tidy.
> 
> #3: Yes, we should buffer the input stream. I will clean it 
> up and post a patch.

#4 Don't you think JTiddy should fire SAX events, and optionally use them to
build a DOM tree (through a DOM builder) ? 

Sebastien

> 
> Thanks,
> dims
> 
> --- Per Kreipke <per@onclave.com> wrote:
> > Davanum,
> > 
> > Nicely done.
> > 
> > Couple of questions (mostly for learning):
> > 
> > - What will happen with the Tidy.jar file needed to use 
> this generator? Will
> > it be included in the C2 install?
> > 
> > - Is the stream returned from Url.openStream() buffered? If 
> so, ok. If not,
> > why not use a buffered stream since it's a network request:
> > 
> > Document newdoc = tidy.parseDOM(new 
> BufferedInputStream(url.openStream()),
> > ostream);
> > 
> > Only asking because this is what I used under C1. Too bad 
> JTidy can't emit
> > SAX events (understandably).
> > 
> > - Why use a ByteArrayStream as the intermediate stream?
> > 
> > Per.
> > 
> > > Thanks, applied
> > >
> > > Giacomo
> > >
> > > Davanum Srinivas wrote:
> > > >
> > > > HTMLGenerator can be used to collect content from external web
> > > sites. It uses JTidy from
> > > > http://lempinen.net/sami/jtidy/.
> > > >
> > > > This was inspired by the following thread
> > > >    http://marc.theaimsgroup.com/?t=97240792100003&w=2&r=1
> > > >
> > > > Here's the generator entry.
> > > >    <map:generator  name="html"
> > > src="org.apache.cocoon.generation.HTMLGenerator"/>
> > > >
> > > > Here's the pipeline entry.
> > > >    <map:match pattern="javasoft">
> > > >     <map:generate type="html" src="http://www.javasoft.com"/>
> > > >     ....
> > > >     ....
> > > >    </map:match>
> > > >
> > > > If you are within a firewall, make sure you set the following
> > > params in the java.exe command line.
> > > >
> > > >    java.exe -DproxySet=true -DproxyHost=caproxy.cai.com
> > > -DproxyPort=80 ....
> > > >
> 
> 
> =====
> Davanum Srinivas, JNI-FAQ Manager
> http://www.jGuru.com/faq/JNI
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Messenger - Talk while you surf!  It's FREE.
> http://im.yahoo.com/
> 

Mime
View raw message