Jay Freeman (saurik) wrote:I thought the <?cocoon-process?> tag looked a little fishy. I'll take it out, and the resulting xsl will look like: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. <?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"> <xsp:logic> System.out.println("<xsl:apply-templates/>"); </xsp:logic> </xsl:template> </xsl:stylesheet> When I call the URL, the result back at the client is now: <xsp:logic xmlns:xsp="http://www.apache.org/1999/XSP/Core"> System.out.println("hello world"); </xsp:logic> I'm not sure that I understand your point that I can't "generate XSP code and then execute it". Isn't that what XSP code is for? Oh... maybe I do get it. You can execute XSP code that you have written, but you can't execute XSP code that is generated. Then what's the point of the examples I found at the 2 URL's listed below? http://www.suranyami.com/XSPtutorial/ says:The diagram he refers to is _almost_ identical to the diagram given at the Included Logicsheet section of http://cocoon.apache.org/2.0/userdocs/concepts/#c2-abstractions Look at: http://cocoon.apache.org/2.0/userdocs/concepts/images/xsp-way2.gif and: http://www.suranyami.com/XSPtutorial/XSP2.gif I personally think the problem lies in my pipeline, but I don't know how to fix it. ----- Original Message ----- From: "Steve Switzer" <[EMAIL PROTECTED]> Sent: Wednesday, August 20, 2003 4:49 PMI'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=""/> <map:transform src=""/> <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 itdoesn't execute anything! |
- help with "Included Logicsheet" and pipel... Steve Switzer
- Re: help with "Included Logicsheet" ... Jay Freeman \(saurik\)
- Re: help with "Included Logicsheet&qu... Steve Switzer
- Re: help with "Included Logicshee... Steve Switzer
