cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From root <>
Subject Including XML and/or XSP in an XSP file
Date Sun, 26 Mar 2000 21:50:51 GMT

There are a couple of messages from a little while back  about the best
way to include the output of one page into another.
This is more or less a follow up to that.  I would like to use the
tag-lib that Stefano mentioned in his reply, but I am not having a lot
of success.  Can anyone answer the following questions:
1) From an XSP file can you include another XSP file, either through a
call to <util:include-file name="..."/> or <util:include-uri
href="..."/> and have the included XSP file be processed as part of the
calling XSP file?  For this to work is it necessary to "strip-off" the
XSP header stuff, like the XSP:page declaration and what not in the
included XSP file?
2) If that is not possible can you, from an XSP file include the output
XML of an XSP file?  This would have to be done through a call like
<util:include-uri href="..."/> and not a file include so that the
included XSP file can be processed by cocoon.  When I try to do this the
call to the uri works, but the output is then not formatted by the XSL
Stylesheet in the calling XSP page.  Does this have something to do with
the output escaping problems of xerces in the cocoon1.1.7 distribution?

Right now, I have the following XSP file called caller.xml
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylsheet href="catpage-html.xsl" type="text/xsl"?>
<xsp:page language="java"
  <title>The titel</title>

When I make a call to this page through cocoon via the url:
The following is returned instead of the actual contents of my test.xml
{unable to include: ''}
It seems like this must be a bug, because I know the file exists as I
can call it through my browser without any problems.  If that is the
case I'd be willing to take a stab at fixing it, but ...

I have taken a look at the source code and source xml files for the Util
tag library.  I can't really figure out what is what though.  It seems
like the same thing is sort of handled in two different places.  There
is both the file and file.
Both of them seem to have methods for including files.  Can anyone tell
me how these two files are related?  And also which is used when I have
<util:include-uri .../> in my XSP file?   It might just be that these
are two totally serparate files except for the fact that they share
similar names, but I can't tell.

Thanks for you help

View raw message