forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu Champlon <m.champ...@free.fr>
Subject Re: Embedding existing HTML pages from a location outside src/documentation/content/xdocs
Date Thu, 19 Feb 2009 13:06:38 GMT
Just in case someone faces the same issue, here is how I ended up 
working around it.

I used the following pipeline :

<map:pipelines>
   <map:pipeline>
     <map:match pattern="embedded/**.html">
       <map:generate type="html" src="{properties:content}{0}"/>
       <map:transform 
src="{forrest:forrest.stylesheets}/html-to-document.xsl"/>
       <map:serialize type="xml"/>
     </map:match>
     ...

Along with the following generator (a bit adapted from 
https://issues.apache.org/jira/browse/FOR-679) :

  <map:components>
    <map:generators default="file">
      <map:generator name="html" 
src="org.apache.cocoon.generation.HTMLGenerator">
        <jtidy-config>context://WEB-INF/jtidy.properties</jtidy-config>
      </map:generator>
    </map:generators>
    ...

And this solves the error I had previously which was :
X [0]                                     embedded/embedded_html.html   
BROKEN: 
C:\Users\Mat\Desktop\dev\tools\forrest\main\webapp\.\c:\Users\Mat\Desktop\dev\perso\cpp\forrest_seed\src\WEB-INF\jtidy.properties

(The filename, directory name, or volume label syntax is incorrect)


Afterwards I played a bit with the forrest sitemap configuration, and 
changed main/webapp/resources/schema/entity/symbols-core-v10.ent like this :
@@ -25,7 +25,7 @@
 <!ENTITY for-s "<strong>Apache Forrest</strong>">
 
 <!-- Configure some sitemap components -->
-<!ENTITY generator-html-jtidy-properties "WEB-INF/jtidy.properties">
+<!ENTITY generator-html-jtidy-properties 
"context://WEB-INF/jtidy.properties">
 <!ENTITY dispatcher-output-serializer "xhtml">
 <!ENTITY serializer-html-encoding "UTF-8">
 <!ENTITY serializer-html-doctype-public "-//W3C//DTD HTML 4.01 
Transitional//EN">

It seems to work quite well and I was able to remove the generator 
definition from my project sitemap entirely.
The jtidy.properties file is then looked for in main/webapp/WEB-INF 
which is fine when no project specific customization is required.

I'm not really sure but maybe this could also be used to fix 
https://issues.apache.org/jira/browse/FOR-679 ?
Actually I never experienced the problem described in FOR-679 anyway so 
maybe it became invalid at some point when moving from 0.8 to 0.9dev ?


MAT.


Mime
View raw message