I believe the problem is in your "catch-all" template in your logicsheet:
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
because this is AFTER your template matching abc:datetime, and not at a
lower priority, it gets applied instead of your abc:datetime template.
Change the above template to have priority="-2" and you'll get better
results.
-Christopher
|---------+---------------------------->
| | "Tommy Smith" |
| | <[EMAIL PROTECTED]|
| | .com> |
| | |
| | 01/21/2004 09:46 |
| | AM |
| | Please respond to|
| | users |
| | |
|---------+---------------------------->
>--------------------------------------------------------------------------------------------------------------|
|
|
| To: [EMAIL PROTECTED]
|
| cc:
|
| Subject: 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>
...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Re: Logicsheet not working, anyone help?
Christopher Painter-Wakefield Wed, 21 Jan 2004 07:59:07 -0800
- Logicsheet not working, anyone help? Tommy Smith
- Re: Logicsheet not working, anyone help... Christopher Painter-Wakefield
- Re: Logicsheet not working, anyone help... Tommy Smith
- Re: Logicsheet not working, anyone help... Christopher Painter-Wakefield
