forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <nicola...@apache.org>
Subject Multiple file output formats and views (skinned-source-translation-etc)
Date Fri, 07 May 2004 13:42:45 GMT

Usually Forrest works like this:

  * file.sourceextension
            |
            V
  * file.xdoc
            |
            V
  * file.resultextension

So I can have one of these:

  file.xml
  file.cwiki
  file.txt

any of them will be transformed in xdoc and can be rendered, for 
example, in:

  file.html
  file.pdf

                          - 0 -

We have already seen though how this is not all that we need.
Sometimes we need to have files as-is, so we have a raw-dir, that 
contains file to be served as-is. This is not optimum though, as it puts 
a special place for the source files.

In alternative it has been said that in site.xml one could specify if 
the file is to be served as-is or not, and this is much better.

But then, another factor comes into play.

Let's say that we include .java files in the ones that can be processed.
The most obvious thing to do is to colorize the source code:

  * file.java
            |
            V
  * file.xdoc
            |
            V
  * file.html (colorized source code)

Or... maybe javadocs?

  * file.java
            |
            V
  * file.xdoc
            |
            V
  * file.html (javadoc)

Or... a translated version of the javadocs?

  * file.java
            |
            V
  * file.xdoc
            |
            V
  * file.html (javadoc in french)

Things become more complicated when I have the same format as the output:

                          file.html
                              |
                              V
                         (file.xdoc)
            |           |           |          |
            V           V           V          V

         file.html  file.html  file.html  file.html
         (skinned)  (as-is)     (docs)    (translated)



                          - 0 -

Ok, so I hope I've explained the problem. We have multiple outputs and 
only one input.

Cocoon has a very neat concept of this called "views". We could have a 
default view and define the other ones as different views of the same 
source.

   index.html
   index.html?cocoon-view=source
   index.html?cocoon-view=docs
   index.html?cocoon-view=translated&language=fr

This is ok for live sites, but for static sites?

It's easy to see that the default output is the one that skins the file 
to make it published on the website.

The question is: how do we make the urls of the other views? Should we 
simply follow the Cocoon CLI convention on views to flatten the names or 
use another scheme?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Mime
View raw message