cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [Cocoon Wiki] New: XfolioRedirectAction
Date Tue, 13 Jul 2004 19:05:24 GMT
   Date: 2004-07-13T12:05:24
   Editor: GlorieuxFrédéric <>
   Wiki: Cocoon Wiki
   Page: 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"/>

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

 * [  Cocoon]
 * [ Actions]
 * [  XSP]
 * [  XSP Actions]
 * [ redirections]

  = Rights =
(c) 2003, 2004,,
Licence : GPL []
#created: 2003-07-10

View raw message