CLEMENTE,GRAZIA (HP-Italy,ex1) wrote:
We are having a problem porting our application from cocoon 2.0 to 2.1.4.
JDK 1.4.2 HW Sun Solaris
The application worked perfectly on the older release that used JDK 1.3.1.07.
PROBLEM DESCRIPTION
The problem is summarized as follows:
1. We have match that uses the xslt transformer to generate HTML.
<map:match pattern="wifi/internal"> <map:generate src="prova.xml"/> <map:transform src="prova.xsl"/> <map:serialize type="html"/> </map:match>
2. We have an other match that does a map:read to call the match as above.
<map:match pattern="wifi/prova">
<map:read src="cocoon:/wifi/internal"/>
</map:match>
The problem we have is that the second match, will send to the browser an
XML page rather than an HTML page.
<map:match pattern="wifi/internal"> <map:generate src="prova.xml"/> <map:transform src="prova.xsl"/> <map:serialize type="html"/> </map:match>
For internal pipeline assembly the last serializer is nothing more than an "end-marker". So all you would have to change is the second match:
<map:match pattern="wifi/prova"> <map:generate src="cocoon:/wifi/internal"/> <map:serialize type="html"/> </map:match>
You still only serialize once.
True. I was refraining from suggesting this, though, because it becomes really unmanageable in the long run. If someone comes after a few months and takes a look at the application, she won't realize that the first pipeline is actually a resource to be reused elsewhere... and you always have to remember that your (generic) pipeline serializer is actually a fake one, which means asking for trouble. :-)
Ciao,
-- Gianugo Rabellino Pro-netics s.r.l. - http://www.pro-netics.com Orixo, the XML business alliance - http://www.orixo.com (Blogging at: http://www.rabellino.it/blog/)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
