forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: Implementing direct html-support
Date Tue, 02 May 2006 10:57:41 GMT
El mar, 02-05-2006 a las 11:45 +0200, Ferdinand Soethe escribió:
> 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.

Makes somehow sense since placing it *before* the original match will
work. First matched - first served. 

> 
> Two questions:
> 
>         - Is this because the required components need to be required
>           components are declares in the sytem sitemap and need to be
>           referenced differently here?

Do not understand the question. What components? You are using standard
components (already declared in forrest) or did I miss something? 

> 
>           If so, how do I reference this properly (I also need this to
>           implement php-support) which I want to do in the project
>           sitemap in any case.
> 
>         - Should I insert my matcher into heads sitemap.xmp like I
>           did thus implementing a preferred processing of html?

IMO that should rather go into an input plugin on its own rather then
core. Not only that it is heavily skin specific but can have ugly side
effects for the rest of forrest (since it e.g. reserves an url space
**body-*.html and further is doing a html-to-html conversion of the body
(as I understand it) and not xdocs).

In the dispatcher we are now using extensions like **.body.xml which are
conform to our naming conventions.

wdot?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)


Mime
View raw message