You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tommy Smith <je...@hotmail.com> on 2004/01/21 15:46:26 UTC

Logicsheet not working, anyone help?

Hi,

I am trying to get my first logic sheet up and running but with little 
success.

I'm working through the Cocoon Developers Handbook.

web page is rendered but not logicsheet output.

Can anyone spot what is wrong?

Sorry for the length of mail

****Logic sheet****

<?xml version="1.0"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:abc="http://samspublishing.com/abc/1.0"
  version="1.0">

<xsl:template match="xsp:page">
  <xsp:page>
     <xsl:apply-templates select="@*"/>
     <xsp:structure>
        <xsp:include>java.util.Date</xsp:include>
     </xsp:structure>
     <xsp:logic>
       Date now = new Date();
     </xsp:logic>
     <xsl:apply-templates/>
   </xsp:page>
</xsl:template>

<xsl:template match="abc:datetime">
  The current time is <xsp:expr>now</xsp:expr>
</xsl:template>

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

<xsl:template match="text()">
  <xsl:value-of select="." />
</xsl:template>

</xsl:stylesheet>

****main.xsp entry***

<?xml version="1.0"?>

<xsp:page language="java"
  xmlns:xsp="http://apache.org/xsp"
  xmlns:abc="http://samspublishing.com/abc/1.0"
>



<page>
<page-title>Welcome to ABC Software</page-title>
<content>
  <title>Hello!</title>
  <paragraph>
<abc:datetime/>

     Welcome to the ABC Software support website. On this site, you
     will be able to submit support requests, track open requests and
     view your support contract bills.
  </paragraph>
  <paragraph>
    <abc:datetime/>
  </paragraph>
</content>
</page>

</xsp:page>

****main.xsl****

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:abc="http://samspublishing.com/abc/1.0">

<xsl:template match="/page">
  <html>
   <head>
    <title><xsl:value-of select="page-title"/></title>
   </head>

   <body bgcolor="white" alink="red" link="blue" vlink="blue">
    <xsl:apply-templates/>
   </body>
  </html>
</xsl:template>

<xsl:template match="title">
  <h2 style="color: navy; text-align: center">
    <xsl:apply-templates/>
  </h2>
</xsl:template>

<xsl:template match="paragraph">
  <p align="left">
   <xsl:apply-templates/>
  </p>
</xsl:template>

<xsl:template match="tickets">
  <table border="1">
   <xsl:apply-templates/>
  </table>
</xsl:template>

<xsl:template match="ticket">
  <tr>
   <xsl:for-each select="*">
    <td>
     <xsl:apply-templates/>
    </td>
   </xsl:for-each>
  </tr>
</xsl:template>

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


</xsl:stylesheet>





****Cocoon.xconf entry****

        <builtin-logicsheet>
          <parameter name="prefix" value="abc"/>
          <parameter name="uri" value="http://samspublishing.com/abc/1.0"/>
          <parameter name="href" 
value="file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/abc.xsl"/>
        </builtin-logicsheet>

****Sitemap entry****

   <map:match pattern="index.xsp">
    <map:generate type="serverpages" src="xsp/main.xsp" label="beautify"/>
    <map:transform type="xslt" src="style/main.xsl"/>
    <map:serialize type="html"/>
   </map:match>


****Snippet of log file - complains about not found key and file 
main.xsl****

DEBUG   (2004-01-21) 14:32.45:001   [core.url-factory] 
(/content/abc/index.xsp) Thread-10/URLFactoryImpl: Making URL from 
file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/abc.xsl
DEBUG   (2004-01-21) 14:32.45:011   [core.manager] (/content/abc/index.xsp) 
Thread-10/DefaultComponentFactory: ComponentFactory creating new instance of 
org.apache.cocoon.components.xslt.XSLTProcessorImpl.
DEBUG   (2004-01-21) 14:32.45:011   [core.manager] (/content/abc/index.xsp) 
Thread-10/DefaultComponentFactory: logger attribute is core.xslt-processor
DEBUG   (2004-01-21) 14:32.45:011   [core.xslt-processor] 
(/content/abc/index.xsp) Thread-10/XSLTProcessorImpl: XSLTProcessorImpl 
component initialized.
DEBUG   (2004-01-21) 14:32.45:011   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore: Holding object in memory:
DEBUG   (2004-01-21) 14:32.45:011   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore:   key: 
logicsheet:file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/abc.xsl
DEBUG   (2004-01-21) 14:32.45:011   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore:   value: 
org.apache.cocoon.components.language.markup.NamedLogicsheet@323274
DEBUG   (2004-01-21) 14:32.45:011   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Created a new 
org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage from the 
object factory.
DEBUG   (2004-01-21) 14:32.45:011   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Got a 
org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage from the 
pool.
DEBUG   (2004-01-21) 14:32.45:072   [core.manager] (/content/abc/index.xsp) 
Thread-10/PoolableComponentHandler: ComponentHandler initialized for: 
org.apache.cocoon.www.abc.xsp.main_xsp
DEBUG   (2004-01-21) 14:32.45:072   [core.manager] (/content/abc/index.xsp) 
Thread-10/GeneratorSelector: Adding org.apache.cocoon.www.abc.xsp.main_xsp 
for org\apache\cocoon\www\abc\xsp\main_xsp
DEBUG   (2004-01-21) 14:32.45:072   [core.manager] (/content/abc/index.xsp) 
Thread-10/DefaultComponentFactory: ComponentFactory creating new instance of 
org.apache.cocoon.www.abc.xsp.main_xsp.
DEBUG   (2004-01-21) 14:32.45:072   [core.manager] (/content/abc/index.xsp) 
Thread-10/DefaultComponentFactory: no logger attribute available, using 
standard logger
DEBUG   (2004-01-21) 14:32.45:072   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Created a new 
org.apache.cocoon.www.abc.xsp.main_xsp from the object factory.
DEBUG   (2004-01-21) 14:32.45:072   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Got a org.apache.cocoon.www.abc.xsp.main_xsp 
from the pool.
DEBUG   (2004-01-21) 14:32.45:082   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Put a 
org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage back into 
the pool.
DEBUG   (2004-01-21) 14:32.45:082   [core.xslt-processor] 
(/content/abc/index.xsp) Thread-10/XSLTProcessorImpl: XSLTProcessorImpl 
getTemplates: stylesheet 
file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/main.xsl
DEBUG   (2004-01-21) 14:32.45:082   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore: NOT Found key: 
file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/main.xsl
DEBUG   (2004-01-21) 14:32.45:122   [core.store.persistent] 
(/content/abc/index.xsp) Thread-10/FilesystemStore: NOT Found file: 
file%3A%2Fc%3A%2Ftomcat%2Fjakarta-tomcat-4.1.18%2Fwebapps%2Fcontent%2Fabc%2Fstyle%2Fmain.xsl
DEBUG   (2004-01-21) 14:32.45:122   [core.xslt-processor] 
(/content/abc/index.xsp) Thread-10/XSLTProcessorImpl: Creating new Templates 
for file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/main.xsl
DEBUG   (2004-01-21) 14:32.45:172   [core.xslt-processor] 
(/content/abc/index.xsp) Thread-10/XSLTProcessorImpl: Source = 
org.apache.cocoon.components.source.FileSource@a09e41, templatesHandler = 
org.apache.xalan.processor.StylesheetHandler@f5d030
DEBUG   (2004-01-21) 14:32.45:172   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Got a 
org.apache.avalon.excalibur.xml.JaxpParser from the pool.
DEBUG   (2004-01-21) 14:32.45:302   [core.manager] (/content/abc/index.xsp) 
Thread-10/ResourceLimitingPool: Put a 
org.apache.avalon.excalibur.xml.JaxpParser back into the pool.
DEBUG   (2004-01-21) 14:32.45:302   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore: Holding object in memory:
DEBUG   (2004-01-21) 14:32.45:302   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore:   key: 
file:/c:/tomcat/jakarta-tomcat-4.1.18/webapps/content/abc/style/main.xsl
DEBUG   (2004-01-21) 14:32.45:302   [core.store.transient] 
(/content/abc/index.xsp) Thread-10/MRUMemoryStore:   value: 
[Ljava.lang.Object;@1ce15f6

_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger 
http://www.msn.co.uk/messenger


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org