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/03/06 12:22:55 UTC

How to chain XSPs?

Hello,

I have a std.xsp file, which creates standard dynamic content for every
page. All my XML files call this XSP file, which then calls a std.xsl
for HTML transformation.

But I have a few XML files which require a lengthy, dynamic computation
in Java. Of course I don't want to put this Java code into the std.xsp
file, because the computation would be carried out for every single
page, whether it needs it or not. So I am looking for a way to first
call a lengthy.xsp, which in turn calls std.xsp, from which point on the
"standard" procedure as for every other page would ensue.

What I tried is this code in lengthy.xsp:

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="std.xsp" type="text/xsl"?>

<xsp:page
  language="java"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<xsp:logic>
	[ ... lengthy computation ... ]
</xsp:logic>

<xsl:copy>
	<mypage>
	[ ... all the tags needed by std.xsp ... ]
	</mypage>
<(xsl:copy>

</xsp:page>

However, this gives me: Could not associate stylesheet to document:  no
matching stylesheet for: netscape

I don't have anything that sounds like "netscape" in my code, so what
gives?

thanks in advance,

Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung