developerinlondon
Programmer
I am trying to run the following sample from the cocoon tutorial but it doesnt seem to be working:
greeting.xml
greeting.xsl
I am using cocoon 2.1.7 on tomcat 5.8 as a servlet. I created my own sample directory in the "samples" directory. My sitemap.xmap file looks like this:
sitemap.xmap:
When I run this, I can only see the 'hi' but not the xsl variable.
anyone has any ideas what I might be doing wrong?
thanks
nayeem
greeting.xml
Code:
<?xml version="1.0"?>
<xsp:page xmlns:xsp="[URL unfurl="true"]http://apache.org/xsp">[/URL]
<xsp:logic>
//this could be arbitrarily complex Java code, JDBC queries, etc.
String msg = "Hello, World!";
</xsp:logic>
<greeting>
<xsp:expr>msg</xsp:expr>
</greeting>
</xsp:page>
greeting.xsl
Code:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform"[/URL] version="1.0">
<xsl:template match="/">
<html>
<body>
hi
<h1>
<xsl:value-of select="greeting"/>
</h1>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
I am using cocoon 2.1.7 on tomcat 5.8 as a servlet. I created my own sample directory in the "samples" directory. My sitemap.xmap file looks like this:
sitemap.xmap:
Code:
<?xml version="1.0"?>
<!-- CVS $Id: sitemap.xmap 30938 2004-07-29 19:08:16Z vgritsenko $ -->
<map:sitemap xmlns:map="[URL unfurl="true"]http://apache.org/cocoon/sitemap/1.0">[/URL]
<map:pipelines>
<map:pipeline>
<map:match pattern="greeting">
<map:generate src="greeting.xml"/>
<map:transform src="greeting.xsl"/>
<map:serialize/>
</map:match>
<map:match pattern="request.xml">
<map:generate src="request.xml"/>
<map:serialize/>
</map:match>
</map:pipeline>
</map:pipelines>
</map:sitemap>
When I run this, I can only see the 'hi' but not the xsl variable.
anyone has any ideas what I might be doing wrong?
thanks
nayeem