forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mathieu Champlon <>
Subject Embedding existing HTML pages from a location outside src/documentation/content/xdocs
Date Sat, 14 Feb 2009 14:45:45 GMT

I'm trying to embed existing HTML pages into a site generated by Forrest.
Starting from a "forrest seed" everything works fine out of the box if 
the pages are in a sub-directory of src/documentation/content/xdocs like 
samples-b/embedded_html.html is.
However I would like to move them somewhere else, for instance let's say 
in src/documentation/content/embedded/embedded_html.html, changing 
site.xml like this :

@@ -43,6 +43,8 @@
   <about label="About">
     <index label="Index" href="index.html" description="Welcome to 
     <linkmap label="Documentation ToC" href="linkmap.html" 
description="Table of Contents for this example site"/>
+    <sample-html label="Embedded HTML" href="embedded/embedded_html.html"
+      description="Test of Embedded HTML"/>
   <samples tab="samples">
     <overview label="Overview" href="samples-a/index.html"/>
@@ -60,8 +62,6 @@
       <linking label="Linking" href="linking.html" description="Linking 
explained and demonstrated"/>
       <sample-howto label="How To" href="howto-howto.html"
         description="Test of How To documents"/>
-      <sample-html label="Embedded HTML" href="embedded_html.html"
-        description="Test of Embedded HTML"/>
       <sample-ascii-art label="ascii-art page" href="ascii-art.html"
         description="Sample Ascii Art page"/>
       <svg label="Using SVG" href="svg.html" description="Using 
Scalable Vector Graphics (SVG)"/>

I cannot seem to come up with the proper modifications to sitemap.xmap 
and/or locationmap.xml to make it work.

I thought adding something like this to locationmap.xml would be enough :
    <match pattern="embedded/**">
      <location src="{properties:content}/{0}"/>
But the file is still being looked for in .../xdocs/... :
X [0]                                     embedded/embedded_html.html   

(The system cannot find the path specified)

Is there a solution involving only altering the locationmap ?

I also tried the "old_site" path, that is not touching locationmap.xml 
but adding the following to the sitemap.xmap existing pipeline :
      <map:match pattern="embedded/**.html">
        <map:read src="{properties:content}{0}" mime-type="text/html"/>
This somewhat succeeds, as in "build successful", but the page is not 
really embedded as it misses the skinning.
Then I tried this instead :
      <map:match pattern="embedded/**.html">
        <map:generate type="html" src="{properties:content}{0}"/>
        <map:serialize type="xml"/>
And got the following error :
X [0]                                     embedded/embedded_html.html   

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

I read and did what is 
suggested but the same error remains.
I tried copying the file to src/WEB-INF and still got 
the same error.

Did I miss something obvious ?
Am I completely misunderstanding how Forrest/Cocoon work ?

Thanks !

View raw message