You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by James Bullard <bu...@perceptualrobotics.com> on 2001/01/09 16:35:26 UTC

XSP problem.

Hello, I am quite new to XSP and it's usage with cocoon, so I may be
incorrectly utilizing the technologies of cocoon, so please let me know.

I have a booklist.xml which has a list of book elements. I also have an
booklist.filter.xsl, and a booklist.display.xsl. My booklist.xml has one
processing instruction which is xslt with booklist.filter.xsl. This filters
out book tags, and inserts before them xsp conditions which essentially
checks the current time, see if it is later than the books expiration time,
and if so does not include the contents of the book in the document.
Therefore my first XSLT pass converts the page into another xml page which
has two processing instructions xsp, and then xslt. So the xsp conditions
get evaluated, and produces a filtered xml file. Finally, the last xslt pass
is run, (booklist.display.xsl) which formats the output.

This was my solution to dynamically filtering the output based on the date.
First, issue is: Is there a better way of doing this, or am I using the
technologies correctly? Second, issuse is: When I have more than like a
hundred books I get the message from coccon:

java.lang.ClassFormatError: Code of a method longer than 65535 bytes
 at java.lang.ClassLoader.defineClass0(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
 at
org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPCl
assLoader.java:90)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
 at
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJavaP
rocessor.java:164)
 at
org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:509)
 at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:490)
 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:853)
 at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
 at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:156)
 at org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
 at java.lang.Thread.run(Thread.java:484)


I assume that this is a known bug, but maybe not. Is there a workaround?


Thanks, Jim




Palm VII user-agent

Posted by Benjamin Dixon <be...@arches.uga.edu>.
Hi all,

I'm trying to get our site available on the palm VII and am having some
trouble. I figured out the user-agent was "Mozilla/2.0
(compatible;Elaine/1.1)" so I put that in the cocoon.properties file but I
still get the regular html version of our site. Thought it might be some
cacheing issue so a few days later, I'm back at work trying again and
still get the same non-palm stylesheet. I know the stylesheet selection
works because I get a different style for netscape and IE pages but the
palm stuff just won't detect. I suspect its somehow an incorrect
user-agent but if the browser is telling me whats its user-agent is, I
should be able to trust it right? So my question really, is what IS the
palm VII user-agent for PQAs? And is there any other problem that may be
causing this?

Ben


Re: XSP problem.

Posted by Donald Ball <ba...@webslingerZ.com>.
On Wed, 10 Jan 2001, Sergio Carvalho wrote:

> If there is no way of getting the system time (I don't know one, but I
> didn't look for it), then either pass it through an URL parameter (I
> like this solution) or have the XSLT be retrieved using HTTP so you
> can generate the XSLT on the fly (I don't like this one. Trashes XSLT
> caching...)

xslt as implemented by xalan can call extension functions in java and
javascript, among others. it's not standardized, but it might be your best
bet.

- donald


Re: XSP problem.

Posted by Sergio Carvalho <sc...@criticalsoftware.com>.
If there is no way of getting the system time (I don't know one, but I didn't look for it), then either pass it through an URL parameter (I like this solution) or have the XSLT be retrieved using HTTP so you can generate the XSLT on the fly (I don't like this one. Trashes XSLT caching...)


On Tue, 9 Jan 2001 12:35:25 -0600
"James Bullard" <bu...@perceptualrobotics.com> wrote:

> >
> > Why don't you, in booklist.filter.xsl, output an XML file, using the same
> format as the source XML, including only the 'valid' books? (valid according
> to your condition). Then, process this to the final format using an output
> XSLT.
> 
> 
> The problem at least as I see it is that I could not figure out how to get
> the current System time with XSL. If I could get that with XSL then that
> would be great. The other option is to use a parameter in the URL to pass
> into the XSL page which is the date, but this is really skirting the issue,
> which is how can I dynamically compute some system value (time) use that to
> filter the XML, and then use the resulting XML to generate the page.
> 
> Thanks . Jim
> 
> 
> >
> > I don't even think you need XSP. Just two XSLT transforms.
> >
> >
> > On Tue, 9 Jan 2001 09:35:26 -0600
> > "James Bullard" <bu...@perceptualrobotics.com> wrote:
> >
> > > Hello, I am quite new to XSP and it's usage with cocoon, so I may be
> > > incorrectly utilizing the technologies of cocoon, so please let me know.
> > >
> > > I have a booklist.xml which has a list of book elements. I also have an
> > > booklist.filter.xsl, and a booklist.display.xsl. My booklist.xml has one
> > > processing instruction which is xslt with booklist.filter.xsl. This
> filters
> > > out book tags, and inserts before them xsp conditions which essentially
> > > checks the current time, see if it is later than the books expiration
> time,
> > > and if so does not include the contents of the book in the document.
> > > Therefore my first XSLT pass converts the page into another xml page
> which
> > > has two processing instructions xsp, and then xslt. So the xsp
> conditions
> > > get evaluated, and produces a filtered xml file. Finally, the last xslt
> pass
> > > is run, (booklist.display.xsl) which formats the output.
> > >
> > > This was my solution to dynamically filtering the output based on the
> date.
> > > First, issue is: Is there a better way of doing this, or am I using the
> > > technologies correctly? Second, issuse is: When I have more than like a
> > > hundred books I get the message from coccon:
> > >
> > > java.lang.ClassFormatError: Code of a method longer than 65535 bytes
> > >  at java.lang.ClassLoader.defineClass0(Native Method)
> > >  at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> > >  at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
> > >  at
> > >
> org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPCl
> > > assLoader.java:90)
> > >  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> > >  at
> > >
> org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJavaP
> > > rocessor.java:164)
> > >  at
> > >
> org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:509)
> > >  at
> > >
> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:490)
> > >  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:853)
> > >  at
> > >
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> > >  at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> > >  at
> > >
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> > > (Ajp12ConnectionHandler.java:156)
> > >  at
> org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
> > >  at
> > >
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
> > >  at java.lang.Thread.run(Thread.java:484)
> > >
> > >
> > > I assume that this is a known bug, but maybe not. Is there a workaround?
> > >
> > >
> > > Thanks, Jim
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > >
> >
> >
> > --
> > --
> > Sergio Carvalho
> > ---------------
> > scarvalho@criticalsoftware.com
> >
> > If at first you don't succeed, skydiving is not for you
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 


-- 
Sergio Carvalho
---------------
scarvalho@criticalsoftware.com

If at first you don't succeed, skydiving is not for you

Re: XSP problem.

Posted by James Bullard <bu...@perceptualrobotics.com>.
>
> Why don't you, in booklist.filter.xsl, output an XML file, using the same
format as the source XML, including only the 'valid' books? (valid according
to your condition). Then, process this to the final format using an output
XSLT.


The problem at least as I see it is that I could not figure out how to get
the current System time with XSL. If I could get that with XSL then that
would be great. The other option is to use a parameter in the URL to pass
into the XSL page which is the date, but this is really skirting the issue,
which is how can I dynamically compute some system value (time) use that to
filter the XML, and then use the resulting XML to generate the page.

Thanks . Jim


>
> I don't even think you need XSP. Just two XSLT transforms.
>
>
> On Tue, 9 Jan 2001 09:35:26 -0600
> "James Bullard" <bu...@perceptualrobotics.com> wrote:
>
> > Hello, I am quite new to XSP and it's usage with cocoon, so I may be
> > incorrectly utilizing the technologies of cocoon, so please let me know.
> >
> > I have a booklist.xml which has a list of book elements. I also have an
> > booklist.filter.xsl, and a booklist.display.xsl. My booklist.xml has one
> > processing instruction which is xslt with booklist.filter.xsl. This
filters
> > out book tags, and inserts before them xsp conditions which essentially
> > checks the current time, see if it is later than the books expiration
time,
> > and if so does not include the contents of the book in the document.
> > Therefore my first XSLT pass converts the page into another xml page
which
> > has two processing instructions xsp, and then xslt. So the xsp
conditions
> > get evaluated, and produces a filtered xml file. Finally, the last xslt
pass
> > is run, (booklist.display.xsl) which formats the output.
> >
> > This was my solution to dynamically filtering the output based on the
date.
> > First, issue is: Is there a better way of doing this, or am I using the
> > technologies correctly? Second, issuse is: When I have more than like a
> > hundred books I get the message from coccon:
> >
> > java.lang.ClassFormatError: Code of a method longer than 65535 bytes
> >  at java.lang.ClassLoader.defineClass0(Native Method)
> >  at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
> >  at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
> >  at
> >
org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPCl
> > assLoader.java:90)
> >  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
> >  at
> >
org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJavaP
> > rocessor.java:164)
> >  at
> >
org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:509)
> >  at
> >
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:490)
> >  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:853)
> >  at
> >
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
> >  at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
> >  at
> >
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> > (Ajp12ConnectionHandler.java:156)
> >  at
org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
> >  at
> >
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
> >  at java.lang.Thread.run(Thread.java:484)
> >
> >
> > I assume that this is a known bug, but maybe not. Is there a workaround?
> >
> >
> > Thanks, Jim
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> >
>
>
> --
> --
> Sergio Carvalho
> ---------------
> scarvalho@criticalsoftware.com
>
> If at first you don't succeed, skydiving is not for you
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


Re: XSP problem.

Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 9 Jan 2001, Sergio Carvalho wrote:

> wow! I'd never think of solving it that way. You are in fact
> generating code for each and every one of the books, that says
>   if (somecondition1) outputBook1()
>   .
>   .
>   .
>   if (somecondition2) outputBook2()
>
> Why don't you, in booklist.filter.xsl, output an XML file, using the
> same format as the source XML, including only the 'valid' books?
> (valid according to your condition). Then, process this to the final
> format using an output XSLT.
>
> I don't even think you need XSP. Just two XSLT transforms.

or alternately, don't do xslt-xsp-xslt. never do an xslt process before an
xsp process - you're setting yourself up for big troubles. instead, use
xsp's logicsheet/taglib features.

- donald


Re: XSP problem.

Posted by Sergio Carvalho <sc...@criticalsoftware.com>.
wow! I'd never think of solving it that way. You are in fact generating code for each and every one of the books, that says
  if (somecondition1) outputBook1()
  .
  .
  . 
  if (somecondition2) outputBook2()

Why don't you, in booklist.filter.xsl, output an XML file, using the same format as the source XML, including only the 'valid' books? (valid according to your condition). Then, process this to the final format using an output XSLT. 

I don't even think you need XSP. Just two XSLT transforms.


On Tue, 9 Jan 2001 09:35:26 -0600
"James Bullard" <bu...@perceptualrobotics.com> wrote:

> Hello, I am quite new to XSP and it's usage with cocoon, so I may be
> incorrectly utilizing the technologies of cocoon, so please let me know.
> 
> I have a booklist.xml which has a list of book elements. I also have an
> booklist.filter.xsl, and a booklist.display.xsl. My booklist.xml has one
> processing instruction which is xslt with booklist.filter.xsl. This filters
> out book tags, and inserts before them xsp conditions which essentially
> checks the current time, see if it is later than the books expiration time,
> and if so does not include the contents of the book in the document.
> Therefore my first XSLT pass converts the page into another xml page which
> has two processing instructions xsp, and then xslt. So the xsp conditions
> get evaluated, and produces a filtered xml file. Finally, the last xslt pass
> is run, (booklist.display.xsl) which formats the output.
> 
> This was my solution to dynamically filtering the output based on the date.
> First, issue is: Is there a better way of doing this, or am I using the
> technologies correctly? Second, issuse is: When I have more than like a
> hundred books I get the message from coccon:
> 
> java.lang.ClassFormatError: Code of a method longer than 65535 bytes
>  at java.lang.ClassLoader.defineClass0(Native Method)
>  at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
>  at java.lang.ClassLoader.defineClass(ClassLoader.java:426)
>  at
> org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPCl
> assLoader.java:90)
>  at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
>  at
> org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJavaP
> rocessor.java:164)
>  at
> org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:509)
>  at
> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:490)
>  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:853)
>  at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>  at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>  at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
> (Ajp12ConnectionHandler.java:156)
>  at org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
>  at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
>  at java.lang.Thread.run(Thread.java:484)
> 
> 
> I assume that this is a known bug, but maybe not. Is there a workaround?
> 
> 
> Thanks, Jim
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 


-- 
--
Sergio Carvalho
---------------
scarvalho@criticalsoftware.com

If at first you don't succeed, skydiving is not for you