forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thors...@apache.org>
Subject Re: Example use case.
Date Thu, 19 Jan 2006 15:13:25 GMT
El jue, 19-01-2006 a las 19:28 +0800, Gav.... escribió: 
> ----- Original Message ----- 
> From: "David Crossley" <crossley@apache.org>
> To: <dev@forrest.apache.org>
> Sent: Thursday, January 19, 2006 12:39 PM
> Subject: Re: Example use case.
> 
> 
> | Paul Bolger wrote:
> | > Ross
> | >
> | > This relates to an issue I've been thinking about for a while. If one
> | > had a pile of html and wanted to convert the docs to Forrest internal
> | > format, and then convert them back into html as a Forrest generated
> | > site presumably leaving the source documents in their original
> | > location would result in Forrest reconverting them whenever one of
> | > them was requested - which would slow things down quite a lot. As you
> | > would only really want this done once what would be the best way to
> | > approach a 'once-off' conversion' - run forrest once in 'build' mode,
> | > delete (or whatever) the original docs and then run Forrest in 'run'
> | > mode?
> 
> This is what I had in mind, rather than Incubator style using html docs I
> wanted to convert my existing into forrest source xml.
> Thanks for putting it a better way!

Yeah, David described how.

> 
> |
> | I would do it as a once-off conversion.
> |
> | If you are using old "skins" then set disable-xml-link=false
> | in forrest.properties file. If using Dispatcher then
> | this is enabled by default in this development phase.
> |
> | Do 'forrest site' to generate everything.
> 
> This is more difficult for me I think. I have an index.php page
> and a few others, the rest are .shtml pages. 

Ok, *if* you use the dispatcher you can actually "imitate" your site
with structurer definitions (it is possible as well with "normal"
forrest). So you need to "redirect" all calls for a *.xml in your xdocs
to e.g. your webpage. The best for that is the locationmap.
http://forrest.apache.org/docs_0_80/locationmap.html

Now follow 
http://forrest.apache.org/docs_0_80/locationmap.html#source-from-remote-cms


> All of them 'include'
> the main navigation which is in a separate nav.inc file.
> 

I must see this file before saying anything but I reckon this is semi-static, right?

> 
>  Forrest
> is not therefore finding the navigation and not linking the site
> properly.
> 

That depends, you could write a custom transformation from your linking file to site.xml,

then you have forrest default behaviour.

> 
> 
> There was mention that forrest can parse PHP, did I get this
> wrong? Also I guess it wont parse the .shtml files either.
> 

That is raw data, _normally_ this stuff just got let through.

> 
> 
> Doing a forrest site does not produce any .xml files.

Hmm, do you have the xml-link contract?

> 
> So this is the stage where I am at. I am thinking I should
> remove any PHP requirements for now and rename them
> to html extension. Then add back in to each page to each
> page (using f & r) the navigation -- or should I be putting
> my site navigation into the tabs.xml file -- or is there
> another way to inlcude the nav.inc file.

If you really consider to use pure forrest you *have to* have 
some kind (static/dynamic) of tab.xml/site.xml. I recommend
to directly use tab/site.xml.

salu2

> 
> Thanks
> 
> Gav...
> 
> |
> | Perhaps you want to temporarily change forrest.properties
> | to set a different location for project.site-dir
> |
> | That will generate the set of xml documents.
> | They will be in document-v1.3 format rather than
> | document-v2.0 because the former is still Forrest's
> | internal format.
> |
> | Now copy those new sources from build/site/ into your
> | src/documentation/xdocs/ space and remove the *.html
> | versions. That will cause forrest to find the *.xml
> | (i think that it searches for a .html source first
> | then looks for a .xml source).
> |
> | That is basically how i did it for the Incubator
> | site conversion, except i wrote a new output plugin
> | to get the special output format.
> |
> | -David
> |
> |
> | -- 
> | No virus found in this incoming message.
> | Checked by AVG Free Edition.
> | Version: 7.1.375 / Virus Database: 267.14.20/234 - Release Date: 
> 18/01/2006
> |
> | 
> 
> 
> 
-- 
thorsten

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


Mime
View raw message