You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2007/06/13 17:04:04 UTC

svn commit: r546904 - /lenya/docu/src/documentation/content/xdocs/docs/1_4/reference/link-management.xml

Author: andreas
Date: Wed Jun 13 08:03:48 2007
New Revision: 546904

URL: http://svn.apache.org/viewvc?view=rev&rev=546904
Log:
Added docs about proxy transformer

Modified:
    lenya/docu/src/documentation/content/xdocs/docs/1_4/reference/link-management.xml

Modified: lenya/docu/src/documentation/content/xdocs/docs/1_4/reference/link-management.xml
URL: http://svn.apache.org/viewvc/lenya/docu/src/documentation/content/xdocs/docs/1_4/reference/link-management.xml?view=diff&rev=546904&r1=546903&r2=546904
==============================================================================
--- lenya/docu/src/documentation/content/xdocs/docs/1_4/reference/link-management.xml (original)
+++ lenya/docu/src/documentation/content/xdocs/docs/1_4/reference/link-management.xml Wed Jun 13 08:03:48 2007
@@ -72,17 +72,48 @@
     </section>
     
     <section>
-      <title>HTML Links</title>
+      <title>Specifying the Resource Type Format</title>
+      <p>
+        Sometimes you want to specify the format of the link target. This can be done using the
+        <code>format</code> parameter. A typical use case is the inclusion via CInclude.
+      </p>
+      <p>
+        Imagine you're converting a collection of documents to a list of teasers.
+        The collection source might look like this:
+      </p>
+      <source xml:space="preserve">&lt;col:collection&gt;
+  &lt;col:document uuid="031&#8230;"/&gt;
+  &lt;col:document uuid="a5r&#8230;"/&gt;
+  &#8230;
+&lt;/col:collection&gt;</source>
+      <p>
+        You could use the following XSLT template to generate the CInclude statements for the
+        teaser list:
+      </p>
+      <source xml:space="preserve"><![CDATA[<xsl:template match="col:document">
+  <ci:include src="lenya-document:{@uuid}?format=teaser"/>
+</xsl:template>]]></source>
+      <p>
+        When the resulting XML is processed by
+      </p>
+      <source xml:space="preserve"><![CDATA[<map:transform type="cinclude"/>]]></source>
+      <p>the teaser version of each document will be included.</p>
+    </section>
+    
+    <section>
+      <title>Converting UUID-based URLs to Web Application URLs</title>
       <p>
         The <code>UuidToUrlTransformer</code> is responsible for translating <code>lenya-document:</code>
-        links into the corresponding HTML links which can be understood by the browser.
+        links into the corresponding web application links. The context path or proxy settings
+        are not considered yet, this is the responsibility of the ProxyTransformer (see below).
+        So don't forget to apply the ProxyTransformer after the UuidToUrlTransformer.
       </p>
       <p>
         If your source document contains a link like this:
       </p>
       <source xml:space="preserve">&lt;a href="lenya-document:031&#8230;"&gt;News&lt;/a&gt;</source>
       <p>
-        and your pipeline contains a call to the <code>UuidToUrlTransformer</code>:
+        and your pipeline contains a call to the UuidToUrlTransformer:
       </p>
       <source xml:space="preserve"><![CDATA[<map:transform type="uuid2url"/>]]></source>
       <p>
@@ -93,7 +124,7 @@
       <section>
         <title>Specifying an Extension</title>
         <p>
-          The <code>UuidToUrlTransformer</code> recognizes the query string parameter
+          The UuidToUrlTransformer recognizes the query string parameter
           <code>uuid2url.extension</code>. You can use it to force a specific extension.
           For instance
         </p>
@@ -106,32 +137,29 @@
     </section>
     
     <section>
-      <title>Specifying the Resource Type Format</title>
+      <title>Converting Web Application Links to Servlet Container or Proxy Links</title>
       <p>
-        Sometimes you want to specify the format of the link target. This can be done using the
-        <code>format</code> parameter. A typical use case is the inclusion via CInclude.
+        The <code>ProxyTransformer</code> converts all web application links to final links
+        by adding the servlet context path or the proxy URL. For instance, if you run your
+        Lenya servlet in Tomcat under the context path <em>lenya14</em>, transforming
       </p>
+      <source xml:space="preserve">&lt;a href="/default/authoring/news.html"&gt;News&lt;/a&gt;</source>
       <p>
-        Imagine you're converting a collection of documents to a list of teasers.
-        The collection source might look like this:
+        with the ProxyTransformer
       </p>
-      <source xml:space="preserve">&lt;col:collection&gt;
-  &lt;col:document uuid="031&#8230;"/&gt;
-  &lt;col:document uuid="a5r&#8230;"/&gt;
-  &#8230;
-&lt;/col:collection&gt;</source>
+      <source xml:space="preserve"><![CDATA[<map:transform type="proxy"/>]]></source>
       <p>
-        You could use the following XSLT template to generate the CInclude statements for the
-        teaser list:
+        will result in
       </p>
-      <source xml:space="preserve"><![CDATA[<xsl:template match="col:document">
-  <ci:include src="lenya-document:{@uuid}?format=teaser"/>
-</xsl:template>]]></source>
+      <source xml:space="preserve">&lt;a href="/lenya14/default/authoring/news.html"&gt;News&lt;/a&gt;</source>
       <p>
-        When the resulting XML is processed by
+        If you have declared a proxy for the authoring area, the resulting link might look like this:
+      </p>
+      <source xml:space="preserve">&lt;a href="http://cms.mysite.com/news.html"&gt;News&lt;/a&gt;</source>
+      <p>
+        Typically, the ProxyTransformer is applied right after the UuidToUrlTransformer.
+        For more information on the ProxyTransformer, consult the API documentation.
       </p>
-      <source xml:space="preserve"><![CDATA[<map:transform type="cinclude"/>]]></source>
-      <p>the teaser version of each document will be included.</p>
     </section>
     
   </body>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org