cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Larsen" ...@homecentricity.com>
Subject RE: XSP tag library problem C1.8
Date Tue, 16 Jan 2001 03:31:53 GMT
Thanks for the suggestion. My test example doesn't do justice to why my
usage is this way, but suffice it to say architecturally (sp?), it seems to
have some merit to me at this point given the scale I have in mind. Anyhow,
I tried what you said and created an xsp page from the get-go (see below).
It still gave me the exact same errors as before. Why is the java
compilation working except for my logicsheet includes and functions not
being added in? This seems to be the crux of the problem. Any other thoughts
or suggestions would be greatly welcomed as I'm at wits end.
thx
-steve

/******** new business_default.xml *************/
<?xml version="1.0" encoding="UTF-8"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-logicsheet href="hc.xsl"?>
<?xml-stylesheet href="transformtoHTML.xsl" type="text/xsl"?>
<xsp:page language="java"
		xmlns:xsp="http://www.apache.org/1999/XSP/Core"
		xmlns:hc="http://www.homecentricity.com/2001/XSP/Core"
>
	<Page>
		<PageTitle>My Business</PageTitle>
		<PageType>Index4</PageType>
		<Date><hc:todaysDate format="EEEE MMM dd, yyyy"/></Date>
	</Page>
</xsp:page>
/**************8end business_default.xml *********/

/******** error message ************/
java.lang.Exception: XSP Java Compiler: Compilation failed for
_business_default.java
           128: ';' expected.
                           todaysDate(new Date(), "EEEE MMM dd, yyyy")
                                                                      ^
           1 error
                   at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJa
vaProcessor.java:141)
                   at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:489)
                   at org.apache.cocoon.Engine.handle(Engine.java:359)
                   at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
                   at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
                   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
                   at
allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
                   at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
                   at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
                   at
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
                   at
allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
                   at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
                   at allaire.jrun.WorkerThread.run(WorkerThread.java:74)

/******** end error message ************/
/*********** error message with bogus semi-colon error corrected *******/
java.lang.Exception: XSP Java Compiler: Compilation failed for
_business_default.java
      128: Method todaysDate(java.util.Date, java.lang.String) not found in
class _C_._apache._htdocs._hc_net._business_default.
                      todaysDate(new Date(), "EEEE MMM dd, yyyy");
                                ^
      1 error
              at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.compile(XSPJa
vaProcessor.java:141)
              at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:489)
              at org.apache.cocoon.Engine.handle(Engine.java:359)
              at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
              at
javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
              at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1013)
              at allaire.jrun.servlet.JRunSE.runServlet(JRunSE.java:925)
              at
allaire.jrun.servlet.JRunRequestDispatcher.forward(JRunRequestDispatcher.jav
a:88)
              at allaire.jrun.servlet.JRunSE.service(JRunSE.java:1131)
              at
allaire.jrun.servlet.JvmContext.dispatch(JvmContext.java:330)
              at allaire.jrun.jrpp.ProxyEndpoint.run(ProxyEndpoint.java:354)
              at allaire.jrun.ThreadPool.run(ThreadPool.java:267)
              at allaire.jrun.WorkerThread.run(WorkerThread.java:74)
/*********** end second error message *******/

_____________________________________________

Steven J. Larsen
email: sl@homecentricity.com
web: www.homecentricity.com
_____________________________________________


-----Original Message-----
From: Donald Ball [mailto:balld@webslingerZ.com]
Sent: Monday, January 15, 2001 9:38 PM
To: cocoon-users@xml.apache.org; sl@homecentricity.com
Subject: Re: XSP tag library problem C1.8


On Mon, 15 Jan 2001, Homecentricity wrote:

> I have been trying to build a simple example of an XML to XML to HTML
> transformation incorporating XSP tag libraries. The steps are as follows:
> business_default.xml --->XSLT (transform.xsl) --->temp generated XML
> file--->XSLT (transformtoHTML.xsl)
>
> I can not get the XSP tag libraries to work. I have, however, succeeded in
> getting XSP to work when I embed the java logic code (not tags). This is
> killing me to figure out. I need help...

your cocoon usage model is broken. you're doing an xslt process, then an
xsp process, then another xslt process. the first xslt process is
unnecessary and is breaking the xsp engine, which really needs to be the
first processor.

as far as i can tell, the first xslt stylesheet you're applying is
completely_gratuitous. you're going from this:

<Page>
  <PageTitle>My Business</PageTitle>
  <PageType>Index4</PageType>
</Page>

to this:

<Page>
  <PageTitle>My Business</PageTitle>
  <Date><hc:todaysDate format="EEEE MM dd, yyyy"/></Date>
</Page>

and then passing it off to the xsp engine. if you want to magically add
this Date element to all of your pages, do that using a common xsp
logicsheet.

- donald



Mime
View raw message