Justin wrote:

> 2) Create a jTidy like program that will turn HTML into
> XHTML, but work
> for fragments (jTidy seems to only output complete HTML documents)

I think this is a good approach. I'm trying to deal with the same thing when
reading emails: an email may contain a section formatted in HTML, so it's
necessary to either treat it as CDATA or to parse it specially. You're
right - if you treat it as CDATA then you can't do anything useful with it
in XSLT. But using JTiday is not hard. See the classes HTMLGenerator,
AbstractStreamSource and XMLUtils.

But where to insert JTidy into the pipeline?

At the generator stage? How does the text area input data enter the Cocoon
pipeline? RequestGenerator?

Or perhaps you should write a transformer that can transform a CDATA node
containing HTML into an XHTML SAX stream?

Con


---------------------------------------------------------------------
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]>

Reply via email to