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: LinkRewriterTransformer
Date Mon, 14 Apr 2008 13:05:09 GMT
A document has been updated:

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

Document ID: 1102
Branch: main
Language: default
Name: LinkRewriterTransformer (unchanged)
Document Type: Sitemap Component (unchanged)
Updated on: 4/9/08 9:39:38 PM
Updated by: Grzegorz Kossakowski

A new version has been created, state: draft

Parts
=====

Long description
----------------
This part has been updated.
Mime type: text/xml (unchanged)
File name:  (unchanged)
Size: 6648 bytes (previous version: 6651 bytes)
Content diff:
    <html>
    <body>
    
--- <p><strong>Example</strong></p>
+++ <h3><strong>Example</strong></h3>
    
    <p>For instance, if we had an
    <a href="http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/components/modules/input/XMLFileModule.html">XMLFileModule</a>,
(4 equal lines skipped)
         &lt;how_to_boil_eggs href="faq/eggs.html"/&gt;
       &lt;/faq&gt;
     &lt;/site&gt;
---  </pre>
+++ </pre>
    
    <p>mapped to the prefix 'site:', then &lt;link
    href="site:/site/faq/how_to_boil_eggs/@href"&gt; would be replaced with &lt;link
(58 equal lines skipped)
          &lt;map:transform type="linkrewriter" src="cocoon:/{1}linkmap"/&gt;
          &lt;map:serialize type="xml"/&gt;
        &lt;/map:match&gt;
---  </pre>
+++ </pre>
    
    <p>Which would cause the 'mapper' XMLFileModule to be configured with a
    different XML file, depending on the request.</p>
    
    <p>Similarly, we could use a dynamic prefix:</p>
    
    <pre>   &lt;prefix&gt;{prefix}&lt;/prefix&gt;
---  </pre>
+++ </pre>
    
    <p>in the template config, and:</p>
    
    <pre>   &lt;map:parameter name="prefix" value="/site/"/&gt;
---  </pre>
+++ </pre>
    
    <p>in the map:transform</p>
    
(38 equal lines skipped)
         &lt;link-attr name="target" pattern="(?:url\((.*?)\).*?){1,2}$"/&gt;
         &lt;!-- additional configuration ... --&gt;
       &lt;/map:transformer&gt;
---  </pre>
+++ </pre>
    
    <p>When matched against the value of target attribute above, the parenthesized
    expressions are:<br/>
(17 equal lines skipped)


Mime
View raw message