cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter C. Verhage" <pete...@zeelandnet.nl>
Subject Dynamic XInclude
Date Wed, 06 Dec 2000 23:12:35 GMT
I've tried to dynamically include another page with the XInclude processor.
But I had no luck so far. This is what I've got:

<?xml version="1.0"?>
<?cocoon-process type="xinclude"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<?xml-stylesheet href="index.xsl" type="text/xsl"?>

<!-- Author: Peter Verhage (peter@no-nonsense.org) -->

<xsp:page
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:xinclude="http://www.w3.org/1999/XML/xinclude"
  xmlns:request="http://www.apache.org/1999/XSP/Request"
>

<data>
  <include xinclude:parse="xml">
    <xsp:attribute name="xinclude:href">../<xsp:expr><request:get-parameter
name="name"/></xsp:expr>.xml</xsp:attribute>
  </include>
</data>

</xsp:page>

Everything works when I just do a:
<include xinclude:parse="xml" xinclude:href="../filename.xml"/>

Maybe this is something that is not possible with Cocoon this way, but is
there another way?

BTW, the file that gets included is pretty large (120 Kb). When I do this
without XSP tags everything goes fine, when I do it with XSP tags (without
doing something usefull with it, so just surround it with <xsp:page....>
tags, then it takes to much time so it seems, and I get an error page back:

<< Internal Server Error
The server encountered an internal error or misconfiguration and was unable
to complete your request.
Please contact the server administrator, webmaster@no-nonsense.org and
inform them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error log.
>>

Nothing usefull in the error log. I'm using the latest (and the last) Jserv,
with Apache 1.3.14 on FreeBSD 4.1.1 STABLE and the latest 1.81 Development
Cocoon.

The output from the above example is (without XSLT processing!):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"
"http://www.w3.org/TR/REC-html40/strict.dtd">
<data>
  <include xinclude:href="../filename.xml" xinclude:parse="xml">
  </include>
</data>
<!-- This page was served in 5405 milliseconds by Cocoon 1.8.1-dev -->

As you can see the xinclude processor did not even look at the instructions.
Also changing the order of cocoon-processes does not help.

With best regards,

Peter


Mime
View raw message