forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joachim Breitsprecher ...@dserv.net>
Subject Re: Making Forrest serve Lenya content
Date Sun, 28 Aug 2005 21:23:27 GMT
Thorsten Scherler schrieb:
> http://forrest.apache.org/docs_0_80/locationmap.html

Geee... Thanks. :) I saw that document but somehow missed the part about 
Lenya ;-)


> <map:match pattern="lenya/**.xml">
>   <map:generate type="html" src="{lm:{0}}" />
>   <map:transform src="{forrest:stylesheets}/html2document.xsl" />
>   <map:serialize type="xml"/>
> </map:match>
> 
> Basically you need to transform the html to our internal format first 
> with above pipe you can do this. Add it to the sitemap.xmap of your project.

The HTML serializer does not seem to work with Lenya's data - probably 
because of the xhtml namespace. I solved it this way:

<map:match pattern="lenya/**.xml">
   <map:generate src="{lm:{0}}"/>
   <map:transform 
src="{project:resources.stylesheets}/lenyaxhtml2html.xsl"/>
   <map:transform src="{forrest:stylesheets}/html2document.xsl"/>
   <map:serialize type="xml"/>
</map:match>

Where lenyaxhtml2html.xsl is just a (incorrectly named) simple 
stylesheet that strips out all namespaces.

Anyway, it works now, thanks for the help!


> If you have some working code that you can attach to the issue tracker? I will take care
of it. ;-)

Sure. I will probably do that tomorrow when I am back in the office. Is 
there a particular issue I should attach it to or should I just open a 
new one?


> Thanks jb and welcome to forrest. Nice to see you over here and hope you stay. ;-)

Thanks for the warm welcome :-)


Cheers,
Joachim

Mime
View raw message