You want the lighter debug solution of a pipeline ? Try the "debug" serializer.
Insert/Delete it everywhere in your pipe (for now this bad practice is not yet forbid by cocoon) like that
What is it ? Nothing more than a default XML serializer to declare, with some simple parameters to precise. Never read it in the doc, but found it in the code : the XML serializer use your default xsl engine to get text from SAX events.
- Take note of this detail, the sended mime-type to the browser is "text-plain". Why ? Have you ever try to
view a one Mo xml file in your browser ? By server or client, it's always an XSL transform to HTML "pretty-view", expensive. Also, usually you need to verify the source to check <![CDATA]>, &entities;, or xmlns="" declarations.
- And about indent option, it's a bit like in your XSL when you precise
<xsl:output method="xml" indent="yes" encoding="UTF-8" doctype-public="" doctype-system="" .../>, you have your quite pretty view, depending on your XSL engine (Saxon do good work on that), but without colors.
- If brower (Firefox or IE) see an xmlns="http://www.w3.org/1999/xhtml", they try to render as HTML
- If IE (not moz) see an XML header like that
<?xml version="1.0" encoding="UTF-8"?>, it forget mime-type and render as XML. This not conformant behavior is not a so big problem, because IE is faster than moz on XML display, and are there lots of cocoon users debugging with IE ?
- <<Date(2004-07-14T15:01:17Z)>>:#FG Creation