Steve: The whole <?cocoon-process?> thing was functionality that existed before the sitemap came into being. With Cocoon 2 you can't generate XSP code and then execute it.
It's something that's sorely missed by me in a few cases, but the performance of generating Java code on the fly like that is really horrible (as you'd imagine the compiler then has to get executed for every page request). A better solution that I'd like to see at some point (and may get around to implementing myself) is using XSP to create transformers. Someone else on the cocoon-dev mailing list a while back had some idea to base it on like XSL/T or STX and then you'd embed your Java code into that. (Maybe the XSL/T or STX could just be a taglib even, that could be interesting.) However, he didn't have much time to spend on it. Also, for that specific instance, you may be able to just embed JavaScript code into your XSL/T using Xalan, although that's much more limited, of course. *Is currently in the situation of using ESQL mainly because he wants to run some Java code to reformat one of the fields before outputting it, and if it wasn't for that he'd have a much better separation between his database code and his browser display... there might be a way to do it though, he just hasn't found it yet.* Sincerely, Jay Freeman (saurik) [EMAIL PROTECTED] ----- Original Message ----- From: "Steve Switzer" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Wednesday, August 20, 2003 4:49 PM Subject: help with "Included Logicsheet" and pipeline > I'm trying to execute Java based on the contents of some xml-ized data. > I found the "Included Logicsheet" notes at: > http://www.suranyami.com/XSPtutorial/ and > http://cocoon.apache.org/2.0/userdocs/concepts/#c2-abstractions > > My understanding is the data-XML gets transformed by the xsl into an xsp > that will contain java logic. > I'm not so interested in the XML produced by the xsp, but perhaps I > could use serialize it as html. > > Here's my problem -- the 2 examples I've seen look so simple, but I can > only get serialized XSP, i.e., with no executed java. > > Let me give you the file contents: > > (http request: http://ourtomcatserver.foo.com/cocoon/test ) > ------------ > sitemap.xmap: > ... > <map:match type="regexp" pattern="test"> > <map:generate src="/home/sswitzer/public_xml/test.xml"/> > <map:transform src="/home/sswitzer/public_xml/test.xsl"/> > <map:serialize/> > </map:match> > ... > ------------ > test.xml: > <test>hello world</test> > ------------ > test.xsl: > <?xml version="1.0"?> > <xsl:stylesheet version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > xmlns:xsp="http://www.apache.org/1999/XSP/Core"> > <xsl:template match="test"> > <xsl:processing-instruction > name="cocoon-process">type="xsp"</xsl:processing-instruction> > <xsp:logic> > System.out.println("<xsl:apply-templates/>"); > </xsp:logic> > </xsl:template> > </xsl:stylesheet> > > My client gets back: > > <?cocoon-process type="xsp"> > > <xsp:logic xmlns:xsp="http://www.apache.org/1999/XSP/Core"> > System.out.println("hello world"); > </xsp:logic> > > Which is really cool, considering that it's well set up xsp -- but it doesn't execute anything! > > Am I on the right track? My end result is that the xml-ized data gets put into java objects > which I'll then pass on to a servlet. > > Thanks, Steve Switzer. > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
