cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kurt Heston <>
Subject RE: Processing XML output from CGI Programs with XSP
Date Wed, 24 Jan 2001 00:31:02 GMT
I’ve done a little more experimenting.

Here’s my xsp code:

<?xml version="1.0"?>

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

<xsp:page xmlns:xsp=""

		<!--<util:include-uri href=""/> -->
		</util:href> -->

You can see I’ve tried a number of different methods.  The best I can get
for output is:

	Warning: can't output text before document element!

Isn't this the same error I would get if I had an empty doc?  I’m wondering
if <util:include-uri> is really doing anything.  Any clues?

"stylesheet.xsl" works fine when I use it with a static xml doc.

-----Original Message-----
From: Donald Ball []
Sent: Tuesday, January 23, 2001 3:04 PM
To: Kurt Heston
Subject: RE: Processing XML output from CGI Programs with XSP

On Tue, 23 Jan 2001, Kurt Heston wrote:

> Donald,
> I already have XSLT code that transforms the CGI output and it works fine.
> However, when I use <util:include>, etc. I get:
> "Can't output text before document element!"
> I think that the problem is in the processing of the root node.  Do you
> of a way to make the included document, the only document, such that my
> produced XML root is the final root node?

wrap the call to <util:include> in a root node:

  <util:include ... />

and see what happens. i'm willing to bet that the util:include you're
using isn't parsing the data as xml. there's something else in the util
namespace that you need to add or use instead, can't remember. grep for
parse or -xml or something.

- donald

View raw message