You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/07/07 13:27:48 UTC
How to reduce the size of XSP classes?
Hi all,
I ran into the "Code of a method longer than 65535 bytes" error. It's an
XSP page, but it has only a minimal amount of logic. The reason why the
cocoon-generated class is so big, are the many regular XML tags in the
XML file.
So, if it was my code that was too large, I could package and jar it and
put it in the classpath instead of in an XSP taglib. However, the
problem is the size of the XML, and that I cannot reduce. So, what can I
do?
Ulrich
--
Ulrich Mayring
DENIC eG, Systementwicklung
Re: How to reduce the size of XSP classes?
Posted by Uli Mayring <ul...@denic.de>.
On Fri, 7 Jul 2000, Mark Washeim wrote:
> 1. If you don't treat the nodes but only want to add something like date,
> then definatly use xinclude (or util:include-file). That will only includ
> eht content at request time, not compile time.
util:include-file is an XSP taglib, so it won't work. I can use it only in
XSP pages and XSP pages are compiled, no matter what. I presented the
counter example as an example of the kind of information I want to
include. It's dynamic information like whether some file exists, when a
file was last modified etc. These things are - like a counter - subject
to change external to cocoon.
> 2. If it's something like date/time you want to include, have Xinclude
> include the xsp page (as a URI, so, with network overhead) as a 'fragment'
> of the secondary page... you could have lots of utility 'pages' . . . but,
> then, we're in jetspeed territory and you might want to look at portlets .
That might just work. You mean I write an XSP page for all my dynamic
stuff (which basically just generates new XML tags) and XInclude this XSP
page into my XML page? But I see two problems here:
1) How do I tell cocoon to first process the XIncluded XSP page and
XInclude only the resulting tags?
2) How do I pass information to the XIncluded XSP page? The XSP page needs
to know which XML file it is being included in (there could be many).
> 3. use two xslt passes, transforming the data of the large data set
> 'through' an xslt/xsp page . . . but I've never tried this. The idea is:
> xml -> xslt -> xslt/xsp -> html
My current approach is XML -> XSLT/XSP -> XSLT -> HTML
I can tell you this doesn't work, cocoon compiles the XML page. Your
approach would mean that in the first XSLT pass I need to get rid of lots
of data, thereby staying under 64KB in the XSLT/XSP pass?
> I'd be interesting to try this with xsp. Namely, aggregate the results of
> numerous documents.
>
> I'm going to have a go at this. But, first, with xinclude such that:
> mailarchive.xml is composed of:
> <xinclude:include parse="xml"
> href="nav/site.xml#xpointer(//somestructure)"/>