cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: Cocoon 2 XInclude filter example?
Date Fri, 14 Apr 2000 07:57:23 GMT
On Thu, 13 Apr 2000, Simeon Walker wrote:

> Hi,
>   I'm experimenting with Cocoon 2 but I can't quite seem to figure
> out how to get the XInclude filter to work. At the moment I get the
> xml include but it is ignored by the xslt filter. Could someone 
> (donald?) please tell me the correct stuff to put in the sitemap
> and xml file?

the relevant bits from my sitemap:

<filter name="xinclude" class="org.apache.cocoon.filters.XIncludeFilter"/>

<process uri="xinclude.xml" source="xinclude.xml">
 <generator name="file"/>
 <filter name="xinclude"/>
 <serializer name="xml">
  <parameter name="contentType" value="text/xml"/>

and xinclude.xml itself:

<?xml version="1.0"?>

<xinclude:include parse="text" href="foo.txt"/>
<xinclude:include parse="xml" href="foo.xml"/>

relocating the base URI according to the XML:Base spec should be 100%
functional. parse="cdata" does not work at this time; also, only complete
files may be included, can't limit using XPath expressions yet.

Pier, actually, I wanted to ask you about this - Xalan can't do XPath with
SAX events, so for included files that have an XPath expression, I need a
DOM object. I could build one out of SAX events, but it seems to me that
it would be more efficient to simply ask cocoon's parser to give me a DOM
object instead of SAX events. Do you have any problems if I modify the
parser interface to do so, or do you have an alternate suggestion?

- donald

View raw message