cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@cocoon.apache.org
Subject [Cocoon Wiki] New: XfolioRedirectAction
Date Tue, 13 Jul 2004 19:05:24 GMT
   Date: 2004-07-13T12:05:24
   Editor: GlorieuxFrédéric <frederic.glorieux@ajlsm.com>
   Wiki: Cocoon Wiki
   Page: XfolioRedirectAction
   URL: http://wiki.apache.org/cocoon/XfolioRedirectAction

   no comment

New Page:

  = Abstract =

About a cocoon XspAction, part of the XFolio app. 
If cocoon is used to serve and transform "every thing",
you may have strange surprises of what users can produce.
For example, imagine a folder of xml documents in a schema you are 
waiting for (you are lucky), which one to choose as a welcome 
page ?
When a request can't find a source to answer (like match="**/")
redirection may have bad infinite loop effects if nothing found.
This action search for the "best" identifier in a source directory
for the pipeline to continue on valid parameter.

  = Status =

This document is a first step to use wiki syntax for documenting code,
think to a project, and give knowledge back to the community.

  = Usage =

See [xfolio.xmap] 

When a directory is called (match="" or "**/"), 
this action search for a file available to transform in a given folder, 
with in priority
 * index*
 * default*
 * (the first page)
The output is a "radical", a not yet precise spec but a filename without
extension, probably more convenient to build an URI for your sitemap.

{{{
<map:match type="regexp" pattern="^$|^(.*/)$">
  <map:act type="xsp" src="actions/redirect.xsp">
    <map:parameter name="folder" value="{context-attr:xfolio.efolder}{1}"/>
    <map:read src="cocoon:/{../1}{radical}.html"/>
  </map:act>
</map:match>
}}}


  = TODO =

Verify it works better for XFolio.

  = MAYDO =

Write it more generic if some one like it ?
  
  = Changes =

#2004-07-14:FG  better searches 
#2004-07-10:FG  creation


  = References =

 * [http://cocoon.apache.org/2.1/  Cocoon]
 * [http://cocoon.apache.org/2.1/userdocs/actions/actions.html Actions]
 * [http://cocoon.apache.org/2.1/userdocs/xsp/index.html  XSP]
 * [http://wiki.apache.org/cocoon/XSPAction  XSP Actions]
 * [http://cocoon.apache.org/2.1/userdocs/concepts/redirection.html redirections]

  = Rights =
  
(c) 2003, 2004 xfolio.org, ajlsm.com, strabon.org
Licence : GPL [http://www.gnu.org/copyleft/gpl.html]
#created: 2003-07-10

Mime
View raw message