[DAISY] Updated: LinkRewriterTransformer

[email protected]
Newsgroups gmane.text.xml.cocoon.documentation
Message-ID <[email protected]>
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)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.