How extreme do you want to get? You can work some wonders with your
HTML in dispatchRequest
Personally, I find that this generates the cleanest possible response:
public WOResponse dispatchReqcuest( WORequest request ) {
WOResponse respone = super.dispatchRequest( request );
response.setContent( "" );
return response;
}
I experimented last year with running output through tidy, but it ends
up breaking all kinds of things (tidy is just too strict for most HTML):
public WOResponse dispatchRequest(WORequest request) {
WOResponse response = super.dispatchRequest(request);
if (MDTApplication.contentTypeHTML(response)) {
ByteArrayInputStream in = response.content().stream();
ERXRefByteArrayOutputStream out = new
ERXRefByteArrayOutputStream();
tidy().parseDOM(in, out);
response.setContent(out.toNSData());
}
return response;
}
Possibly exporting the formatter from WOLips to an external jar might
give better results because it's designed to be very forgiving about
how it interprets your HTML, but in the scheme of things, this is
probably not worth the effort.
ms
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]