cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@cocoon.zones.apache.org
Subject [DAISY] Updated: Variable substitution
Date Tue, 14 Mar 2006 19:14:41 GMT
A document has been updated:

http://cocoon.zones.apache.org/daisy/documentation/855.html

Document ID: 855
Branch: main
Language: default
Name: Variable substitution (unchanged)
Document Type: Cocoon Document (unchanged)
Updated on: 3/14/06 7:14:18 PM
Updated by: Bruno Dumon

A new version has been created, state: publish

Parts
=====
Content
-------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 4877 bytes (previous version: 4425 bytes)
Content diff:
(6 equal lines skipped)
    using putting an expression between curly braces: <tt>{expression}</tt>. These
    expressions will then be evaluted and replaced with their value.</p>
    
+++ <p>To enter an opening curly brace that is not the start of an expression, use
+++ the escape sequence <tt>\{</tt>.</p>
+++ 
    <h1>Summary</h1>
    
    <p>There are basically two types of expressions:</p>
(3 equal lines skipped)
    <li>an expression that uses an input module to retrieve some value</li>
    </ul>
    
--- <h2>Expressions that retrieve a value returned from a matcher or action</h2>
+++ <h1>Expressions that retrieve a value returned from a matcher or action</h1>
    
    <p>Matchers and actions can return a map of values to the sitemap.</p>
    
(85 equal lines skipped)
    ever use this <tt>sitemap:</tt> syntax.</li>
    </ul>
    
--- <h2>Expressions that uses an input module to retrieve some value</h2>
+++ <h1>Expressions that uses an input module to retrieve some value</h1>
    
    <p>The syntax for these is:</p>
    
    <pre>{&lt;input module name&gt;:&lt;input module specific string&gt;}</pre>
    
--- <p>Input modules are basically components that get some value from somewhere.
--- For example, the "request-param" input module retrieves the value of request
--- parameters. The following example takes the name of the stylesheet to apply from
--- a request parameter called "style":</p>
+++ <p>Input modules are basically components that get some value from somewhere (in
+++ other words, the map a key to a value). For example, the "request-param" input
+++ module retrieves the value of request parameters. The following example takes
+++ the name of the stylesheet to apply from a request parameter called "style":</p>
    
    <pre>&lt;map:match pattern="*.html"&gt;
      &lt;map:generate src="{1}.xml"/&gt;
(4 equal lines skipped)
    
    <p class="fixme">Add link to input module docs, once we have these.</p>
    
+++ <h1>Nesting variable substitution</h1>
+++ 
+++ <p>Variable substitutions can be nested. For example:</p>
+++ 
+++ <pre>{url-encode:{request-param:foo}}
+++ </pre>
+++ 
+++ <p>This will first resolve the expression <tt>{request-param:foo}</tt>,
and the
+++ result thereof will be passed to the url-encode input module.</p>
+++ 
    </body>
    </html>


Fields
======
no changes

Links
=====
no changes

Custom Fields
=============
no changes

Collections
===========
no changes

Mime
View raw message