forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Dixon <...@dixons.org>
Subject xinclude
Date Sun, 03 Sep 2006 15:17:34 GMT
On Thu, 29 Jun 2006, Thorsten Scherler wrote:

> Have a look at
> http://cocoon.apache.org/2.1/userdocs/xinclude-transformer.html
> and add xmlns:xi="http://www.w3.org/2001/XInclude" to the document tag
> like:
> <document xmlns:xi="http://www.w3.org/2001/XInclude">

Has anyone been able to get this working with Forrest?  I have followed
their instructions closely but it appears that the transformed file
doesn't get passed on.

-- sitemap.xmap ---------------------------------------------------------
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:components>
    <map:transformers default="xslt">
      <map:transformer name="xinclude"
        src="org.apache.cocoon.transformation.XIncludeTransformer"/>
    </map:transformers>
  </map:components>
  <map:pipelines>
    <map:pipeline>
      <map:match pattern="eg/logMeIn.xml">
        <map:generate src="eg/logMeIn.xml"/>
        <map:transform type="xinclude"/>
        <map:serialize type="xml"/>
      </map:match>
    </map:pipeline>
  </map:pipelines>
</map:sitemap>

-- logMeIn.xml ----------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document xmlns:xi="http//www.w3.org/2001/XInclude">
  <header><title>logMeIn</title></header>
  <body>
    <source>
      <xi:include parse="text" href="eg/foo.txt"/>
    </source>
  </body>
</document>
-------------------------------------------------------------------------
foo.txt is just a line of nonsense.

Cocoon returns:
-------------------------------------------------------------------------
Message:  Resource Not Found
Description: The requested resource "/eg/logMeIn.html" could not be found
Sender: org.apache.cocoon.servlet.CocoonServlet
Source: Cocoon Servlet
-------------------------------------------------------------------------

--
Jim Dixon  jdd@dixons.org   tel +44 117 982 0786  mobile +44 797 373 7881

Mime
View raw message