forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gav...." <brightoncomput...@brightontown.com.au>
Subject Re: Example use case.
Date Thu, 19 Jan 2006 23:28:33 GMT

----- Original Message ----- 
From: "Thorsten Scherler" <thorsten@apache.org>
To: <dev@forrest.apache.org>
Sent: Thursday, January 19, 2006 11:13 PM
Subject: Re: Example use case.


| 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

I tried using first v2 and then v3, both use dispatcher by default (?).
Reading other mails in this thread I didnt see a need to use the
locationmap as it hadn't been mentioned until now, but if that's
what you think it needs I will try it.

|
|
| > 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?

It is just static html code. using either apaches 'include' or PHPs 
'require_once'
they just retrieve the html content as is and put it in place of the include 
statement
as request time. For me to keep this 'change one file, affects the whole 
site' scenario
I am guessing then I may need to put this files contents into tabs.xml (but 
see below)

A snippet of this code :-

<div id="navBar">
  <div id="sectionLinks">
    <h3>Navigation</h3>
    <ul>
      <li><a href="/forums/index.php">Visit the Forums</a></li>
      <li><a href="/webdesign/webdindex.shtml">Web Design</a></li>
     <li><a href="/apps/mtbrowser/index.shtml">- MTBrowser</a></li>
      ...
    </ul>
  </div><br />
 <div id="leftbar">
 <div class="leftsub">
<h5>IT Gazette Newsletter</h5>
</div>
</div>
 </div>

|
| >
| >  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.

Is there a howTo anywhere for this, an example?
That 'sounds' easier and better than adding my nav to tabs.xml.

|
| >
| >
| > 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.

Ok, and I guess Jetty wont parse it anyway. I would have
to upload a static site to test it.

|
| >
| >
| > Doing a forrest site does not produce any .xml files.
|
| Hmm, do you have the xml-link contract?

Tested using v2 and v3, this is enabled by default
in both isn't it?


|
| >
| > 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.

Ok, thanks Thorsten.

Gav...
|
| 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)
|
|
|
| -- 
| 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
|
| 



-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.375 / Virus Database: 267.14.20/234 - Release Date: 18/01/2006



Mime
View raw message