forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject an XSLT issue with seed-sample WAR and Java-1.5
Date Fri, 04 Feb 2011 03:42:42 GMT
David Crossley wrote:
> David Crossley wrote:
> > Using our rc1 and Apache Tomcat 6.0.30 on Mac with Java 1.5
> > 
> > ]$ cd seed-basic-rc1
> > ]$ forrest war
> > ]$ cp build/my-project.war $CATALINA_HOME/webapps
> > ]$ $CATALINA_HOME/bin/startup.sh
> > 
> > Yes, it works.
> > 
> > However, i am having trouble with the war from
> > "seed-sample" and from "site-author".
> 
> The "seed-sample" gives this in webapps/my-project/WEB-INF/logs/error.log
> ERROR   (2011-02-03) 22:03.00:895   [access] (/my-project/index.html) http-8080-1/CocoonServlet:
Internal Cocoon Problem
> org.apache.cocoon.ProcessingException: Failed to process pipeline
>         at [TransformerException] - file:///path/to/apache-tomcat-6.0.30/webapps/my-project/skins/pelt/xslt/html/site-to-xhtml.xsl:61:61
> 
> i.e. $FORREST_HOME/main/webapp/skins/pelt/xslt/html/site-to-xhtml.xsl
> 
> Does someone else also get that on Java 1.5
> Any clues?

Would someone please try with Tomcat on Java 1.5
As said in another thread, the "seed-sample" does
work for me on Java 6.

I have done some investigation of the abovementioned problem.
As per the error above, line 61 is the following:

59:     <title><xsl:value-of select="div[@id='content']/h1"/>
60:       <xsl:if test="$config/motd">
61:         <xsl:for-each select="$config/motd/motd-option">
62:           <xsl:choose>

This uses the "skinconf" which has been added into $config
when the "common" version of the "site-to-xhtml" stylesheet
was imported at the top of this pelt skin styleheet.
The "motd" (Message of the day) is a single optional
configuration element.

This works fine in 'forrest site' and 'forrest run' mode
and when using a WAR with Tomcat 6 on Java 6. But not
for me on Mac Leopard with Java 1.5

The following replacement for line 60 fixes the problem for me:
60:       <xsl:if test="count($config/motd) = 1">

Also strange is that after this first now successful use of $config,
the other uses further in this stylesheet now work properly,
including this similar line:
523:      <xsl:if test="$config/motd">


    ----------

Would someone please try the WAR files on a full modern Jetty server.
I have had a quick try, but not yet successful.

-David

Mime
View raw message