I used JTidy to parse the string and output it as a DOM stream into an XSP page. This DOM stream is automatically converted to a SAX stream by Cocoon.
Regular XSLT can be performed after this.
JTidy is readily available in Cocoon.

Here's a code snip:

try {
Tidy tidy = new Tidy();
//Do not show "parsing" messages
tidy.setQuiet(true);
//Do not show warnings in the Servlet Engine console
tidy.setShowWarnings(false);
//set the output type
tidy.setXmlOut(true);
//Set the encoding
tidy.setCharEncoding( conf.UTF8 );
//Set output options
tidy.setNumEntities(true);
tidy.setBreakBeforeBR(false);
tidy.setQuoteNbsp(true);
tidy.setQuoteAmpersand(true);
tidy.setLiteralAttribs(true);
//Omit the document type in the tidy output
tidy.setXmlPi(false);
//parse the document tot a DOM tree
doc = tidy.parseDOM(in, null);
} catch (Exception e) {
}


Bert

At 10:06 24/10/2002 +0200, you wrote:
> It will work for a textarea if that is an option, but for an
> input, all the tags get stripped out and just the content
> gets included.

This is a very interesting thread.
So with hidden textareas or you custom class, I can pass the XML fragment.
But when receiving the request parameter in my XSL, how can I transform it
into a XML fragment again and out put it of the transformation?
Is the noddeset() function useful in that case?

This e-mail is intended only for the above addressee. It may contain
privileged information. If you are not the addressee you must not copy,
distribute, disclose or use any of the information in it. If you have
received it in error please delete it and immediately notify the sender.
Security Notice: all e-mail, sent to or from this address, may be
accessed by someone other than the recipient, for system management and
security reasons. This access is controlled under Regulation of
Investigatory Powers Act 2000, Lawful Business Practises.

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

Reply via email to