forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: xinclude
Date Sun, 03 Sep 2006 20:30:20 GMT
Jim Dixon wrote:
> 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
> -------------------------------------------------------------------------

XInclude works fine in Forrest, it is used internally in a few places.

Try commenting out the xi:include element in your source and remove your 
  project sitemap. Does it work?

If it doesn't then your source logMeIn.xml file is not where Forrest 
expects to find them. Check your paths.

If it does work then it is something to do with your use of Xinclude, 
you should find more information in the logs (see our FAQ if you don't 
know where they are). If they don't help you paste anything you think 
may be useful here.

Ross

Mime
View raw message