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) <how_to_boil_eggs href="faq/eggs.html"/> </faq> </site> --- </pre> +++ </pre> <p>mapped to the prefix 'site:', then <link href="site:/site/faq/how_to_boil_eggs/@href"> would be replaced with <link (58 equal lines skipped) <map:transform type="linkrewriter" src="cocoon:/{1}linkmap"/> <map:serialize type="xml"/> </map:match> --- </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> <prefix>{prefix}</prefix> --- </pre> +++ </pre> <p>in the template config, and:</p> <pre> <map:parameter name="prefix" value="/site/"/> --- </pre> +++ </pre> <p>in the map:transform</p> (38 equal lines skipped) <link-attr name="target" pattern="(?:url\((.*?)\).*?){1,2}$"/> <!-- additional configuration ... --> </map:transformer> --- </pre> +++ </pre> <p>When matched against the value of target attribute above, the parenthesized expressions are:<br/> (17 equal lines skipped)