cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Request parameter defines an include?
Date Sun, 19 Nov 2000 01:37:44 GMT
"Scott Jones" <scott@on-sitemanager.com> wrote:
>I'm trying to get Cocoon to dynamically choose which file gets included 
>into
>my page,

Please be more specific. Why? What do these files contain?

>but I'm running into a problem.  The included file has a bunch of
>calls to a logic sheet that I have defined, and so far, I am unable to get
>the page to process once it's been included.

Right, the old "impossible XSP->XSP problem". It might be possible to allow 
XSP->XSP but it would be a non-trivial change so don't hold your breath. And 
it would be very inefficient - compiling the page on each and every request. 
Probably there's an easier alternative.

>I've tried two ways of doing this, neither of which is exactly what I need.
>The first thing I did was to use "XInclude" which worked perfectly when I
>hard-coded the file name in.  Unfortunately, I need to be able to specify
>the file to be included dynamically, which I wasn't able to do...
>
>I tried to take an XSP page, get the requested file name, and then send the
>result on to XSL, where I tried to do the xinclude.  This resulted in the
><!--Processed by XInclude--> comment but didn't actually do the 
>including...
>I noticed some discussion about this earlier this month (titled "Xinclude
>problem.  failed processing? Help!"), but it doesn't seem that there is a
>solution -- I saw a hint that something related to Xinclude may have been
>fixed in CVS; is that true?

Sorry, I thought it was but it isn't. It will be soon, or you can find the 
patch on the mail archive yourself.

>I also tried the "util:include-file" custom tag, but was unable to get the
>XSP in the included file to get processed...

>
>If anybody has any suggestions, that would be awesome.  Thank you.

Don't use separate xml files. Use Java "if" statements. Is there any reason 
why you can't do that?

Or batch generate all possible xsp files beforehand, using Xalan. I.e. 
include each possible file, in turn, and output to a different file each 
time. That way, again, you'll only have one file per request (or two if you 
clunk it with a redirect.)





_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Mime
View raw message