You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by hu...@apache.org on 2002/08/04 14:23:21 UTC
cvs commit: xml-cocoon2/src/documentation/xdocs/userdocs/transformers augment-transformer.xml transformers.xml book.xml
huber 2002/08/04 05:23:21
Modified: src/documentation/xdocs/userdocs/transformers
transformers.xml book.xml
Added: src/documentation/xdocs/userdocs/transformers
augment-transformer.xml
Log:
added doc about augmentent transformer
Revision Changes Path
1.5 +1 -0 xml-cocoon2/src/documentation/xdocs/userdocs/transformers/transformers.xml
Index: transformers.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/transformers/transformers.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- transformers.xml 3 Jul 2002 19:39:54 -0000 1.4
+++ transformers.xml 4 Aug 2002 12:23:21 -0000 1.5
@@ -41,6 +41,7 @@
<li><link href="cinclude-transformer.html">CInclude Transformer</link></li>
<li><link href="encodeurl-transformer.html">EncodeURL Transformer</link></li>
<li><link href="sourcewriting-transformer.html">SourceWriting Transformer</link></li>
+ <li><link href="augment-transformer.html">Augment Transformer</link></li>
<li><link href="xt-transformer.html">XT Transformer</link> (optional)</li>
<li><link href="ldap-transformer.html">LDAP Transformer</link> (optional)</li>
</ul>
1.4 +1 -0 xml-cocoon2/src/documentation/xdocs/userdocs/transformers/book.xml
Index: book.xml
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/userdocs/transformers/book.xml,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- book.xml 3 Jul 2002 19:39:54 -0000 1.3
+++ book.xml 4 Aug 2002 12:23:21 -0000 1.4
@@ -28,6 +28,7 @@
<menu-item label="CInclude Transformer" href="cinclude-transformer.html"/>
<menu-item label="EncodeURL Transformer" href="encodeurl-transformer.html"/>
<menu-item label="SourceWriting Transformer" href="sourcewriting-transformer.html"/>
+ <menu-item label="Augment Transformer" href="augment-transformer.html"/>
</menu>
<menu label="Optional">
<menu-item label="XT Transformer" href="xt-transformer.html"/>
1.1 xml-cocoon2/src/documentation/xdocs/userdocs/transformers/augment-transformer.xml
Index: augment-transformer.xml
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
<header>
<title>Augment Transformer</title>
<subtitle>in @doctitle@</subtitle>
<version>0.9</version>
<type>Technical document</type>
<authors>
<person name="Bernhard Huber" email="huber@apache.org"/>
</authors>
<abstract>This document describes the Augment transformer.</abstract>
</header>
<body>
<s1 title="Augment Transformer">
<p>
The AugmentTransformer
augments all <code>href</code> attributes with the full path to the request.
If a <code>href</code> is already a full HTTP URL, or HTTPS URL the value of
href is not changed.
</p>
<p>
The AugmentTransformer has serveral configuration options. These options
may be specified by each request.
</p>
<dl>
<dt>mount</dt>
<dd>If this request parameter is specified it defines the URI relative
to the servlet's context-path. If no mount parameter is specified the
resolution is calculated relative to the request URI.
</dd>
</dl>
<ul>
<li>Name : augment</li>
<li>Class: org.apache.cocoon.transformation.AugmentTransformer</li>
<li>Cacheable: no.</li>
</ul>
<p>
A simple example might help to use the AugmentTransformer effectivly:
</p>
<p>
Add the AugmentTransformer to the components in your sitemap.xmap
</p>
<source><![CDATA[
...
<map:components>
...
<map:transformers default="xslt">
...
<map:transformer name="augment"
src="org.apache.cocoon.transformation.AugmentTransformer">
</map:transformer>
...
]]></source>
<p>
Next define in your pipeline to use the AugmentTransformer
</p>
<source><![CDATA[
<map:match pattern="**book-**.xml">
<map:generate src="docs/{1}book.xml"/>
<map:transform type="augment">
<map:parameter name="mount" value="samples/flow/"/>
</map:transform>
...
]]></source>
<p>
In the example above all href attributes which do not start with <code>http</code>, or
<code>https</code> are augmented.
</p>
<p>
Assuming Cocoon is deployed at <code>http://localhost:8080/cocoon</code> a
href <code>href="overview.html"</code> is augmented
to <code>href="http://localhost:8080/cocoon/samples/flow/overview.html"</code>.
</p>
</s1>
</body>
</document>
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org