forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <ferdin...@apache.org>
Subject Re: Implementing direct html-support
Date Mon, 08 May 2006 17:34:17 GMT


Just for the record in case somebody else stumbles over this one (and
in reply to my own horribly misspelled question):

> I'v finally started to implement direct support for html (as a first
> step towards xhtml as core format).

> To do so I have written a direct transformation from html to
> body-*.html and inserted it into my project sitemap (Forrest 0.7x)
> like this

>   <map:match pattern="**body-*.html">
>       <map:select type="exists">
>           <map:when test="{project:content.xdocs}{1}{2}.html">
>               <map:generate type="html"
> src="{project:content.xdocs}{1}{2}.html" />
>               <map:transform type="xinclude"/>
>               <map:transform type="linkrewriter"
> src="cocoon:/{1}linkmap-{2}.html"/>
>               <map:transform
> src="{forrest:stylesheets}/declare-broken-site-links.xsl" />
>               <map:transform
> src="{project:resources.stylesheets}/html-to-body.xsl" />
>               <map:serialize type="xml" />
>           </map:when>
>       </map:select>
>   </map:match>


> Unfortunately this is not working properly (with the linkrewriter-part
> throwing an error in some pages) while it does work when I insert the
> same block into the system sitemap.xmap right above the orginal matcher.

The problem is this reference to the linkmap

<map:transform type="linkrewriter" src="cocoon:/{1}linkmap-{2}.html"/>

which uses the cocoon-protocol. It doesn't work because 'cocoon:/'
means 'look for a match in the current sitemap' which is my project
sitymap and doesn't habe such a match. So I get the proper error
message 'No pipeline matched request: linkmap-anmeldung.html'

Replace this with

<map:transform type="linkrewriter" src="cocoon://{1}linkmap-{2}.html"/>

referencing it the parent sitemap everything works just fine.

--
Ferdinand Soethe


Mime
View raw message