cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <blorit...@apache.org>
Subject Re: [C2] using XInclude Transformer
Date Wed, 11 Jul 2001 17:58:41 GMT
Jeremy Quinn wrote:
> 
> Hi All,
> 
> I am struggling to use the XInclude Transformer in Cocoon 2.

There are two issues with it (I just got done fixing it).

1) You need to include an xml:base="context://"  This tells the
   Xinclude processor where the root is.  P.S.  The newly checked
   in version will update the namespace to "http://www.w3.org/2001/XInclude".

2) There is an error in the construct: new URL(baseURL, relative);  This
   seems to be an error in Sun's JVM.  The URLFactory component has also
   been updated to fix this problem when we have the "file" protocol.

Please allow me a few minutes to update CVS, then you can get the working
version there.

> 
> My TomCat Context is /hrc2/
> 
> I access the URL /hrc2/index.html
> 
> In my file I have the following:
> 
>         <xinclude:include href="./linkbase/hrc.xml" parse="xml"/>
> 
> This 'href' worked fine in Cocoon 1, but in Cocoon 2 gives me :
> 
>         org.apache.cocoon.ProcessingException: Failed to execute
> pipeline.:java.io.FileNotFoundException: /./linkbase/hrc.xml (No such file
> or directory)
> 
> the relevant section from my sitemap looks like this:
> 
>         <map:match pattern="**.html">
>                 <map:generate src="{1}.xml"/>
>                 <map:transform type="xinclude"/>
>                 <map:transform src="stylesheet/navigation.xsl"/>
>                 <map:transform src="stylesheet/hrc.xsl"/>
>                 <map:serialize type="html"/>
>         </map:match>
> 
> I have tried every variation on the path that I can think of, what am I
> doing wrong?
> 
> Thanks for any help
> 
> BTW. Which is the best one to use?
>         XIncludeTransformer
>         CIncludeTransformer
>         or
>         CachingCIncludeTransformer?
> 
> regards Jeremy
> --
>    ___________________________________________________________________
> 
>    Jeremy Quinn                                           Karma Divers
>                                                        webSpace Design
>                                             HyperMedia Research Centre
> 
>    <mailto:sharkbait@mac.com>                    <http://www.media.demon.co.uk>
>     <phone:+44.[0].20.7737.6831>        <pager:jermq@sms.genie.co.uk>
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail: <cocoon-users-help@xml.apache.org>
Mime
View raw message