Apologies for being so dim, but...

Further to my post on basic C2 XML/XSL deployment I have sucessfully got
XML/XSL transformations going.  I am now trying to do a simple XSP/XSL
transformation and hitting problems.

The XSP page is (code.xsp):

<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page
        language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core";
>
<page>
        <title>Code Page</title>
        <p>This page has some code in it...</p>
        <p>
          <xsp:logic>
          String msg = "Usual Hello type stuff...";
          </xsp:logic>
          <xsp:expr>msg</xsp:expr>
        </p>
        <p>The code should appear above</p>
</page>
</xsp:page>

The XSL file is (code2.xsl):

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">

<xsl:template match="page">
  <html>
    <body>
      <h1>
        <xsl:value-of select="title"/>
      </h1>
                        <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="p">
        <xsl:copy>
                <xsl:apply-templates/>
        </xsl:copy>
</xsl:template>

<xsl:template match="@*|node()" priority="-1">
 <xsl:copy>
  <xsl:apply-templates select="@*|node()"/>
 </xsl:copy>
</xsl:template>

</xsl:stylesheet>

and my map match in sitemap.xmap is:

   <map:match pattern="jez/*.xsp">
     <map:generate type="serverpages" src="jez/{1}.xsp"/>
     <map:transform type="xslt" src="jez/{1}.xsl"/>
     <map:serialize/>
   </map:match>

The XSP and XSL files are in {TOMCAT_HOME}/webapps/cocoon/jez

I get the following error when attempting to get
http://localhost:8080/cocoon/jez/code2.xsp

org.apache.cocoon.ProcessingException: Language
Exception:org.apache.cocoon.components.language.LanguageException: Could not
load class for program 'org\apache\cocoon\www\jez\code2_xsp' due to a
java.lang.ClassNotFoundException: org.apache.cocoon.www.jez.code2_xsp

What is interesting is the insertion of the \www in the above path.  Clearly
something is not being compiled or being compiled into the wrong place - I'm
just not sure why or how to fix it.  I am using map code that seems to work
elsewhere in the map file.  FYI the map match code above is in the final
pipeline of the root sitemap.  This is the pipeline that handles things like
the sample apps etc.

Assuming this problem gets sorted I shall next be trying a logicsheet.
Assuming I put a setting into cocoon.xconf are there any other map changes
that have to be done to enforce the inclusion of the logicsheet xsl?  I
can't see an example in the sample stuff that gets sent out.

As a final point - it's C2b2 on Win 2000 Pro, with Apache 1.3.19 and Tomcat
3.2.3.

Many thanks in advance - I'm really getting lots of material for my idiots
guide which I shall put up somewhere very soon!

Jeremy




_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to