home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / linkstatus-generator.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  3.6 KB  |  124 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "document-v10.dtd">
  18.  
  19. <document>
  20.  <header>
  21.   <title>LinkStatus Generator</title>
  22.   <subtitle>in @doctitle@</subtitle>
  23.   <version>0.9</version>
  24.   <type>Technical document</type>
  25.   <authors>
  26.    <person name="Bernhard Huber" email="huber@apache.org"/>
  27.   </authors>
  28.   <abstract>This document describes the LinkStatus generator.</abstract>
  29.  </header>
  30.  <body>
  31.   <s1 title="LinkStatus Generator">
  32.    <p>
  33.     The LinkStatus Generator emits a list of links that are reachable. Please note that it is available only in Cocoon 2.1.
  34.    </p>
  35.    <p>
  36.     The LinkStatusGenerator has serveral configuration options.
  37.    </p>
  38.    <dl>
  39.      <dt>include-name</dt>
  40.      <dd>RE pattern for including links
  41.        <br/>
  42.        By default <code>include-name</code> is empty.
  43.      </dd>
  44.      <dt>exclude-name</dt>
  45.      <dd>RE pattern for excluding links.
  46.        <br/>
  47.        By default <code>exclude-name</code> is defined as
  48.        <code>.*\.gif(\?.*)?$,
  49.          .*\.png(\?.*)?$,
  50.          .*\.jpe?g(\?.*)?$,
  51.          .*\.js(\?.*)?$,
  52.          .*\.css(\?.*)?$
  53.        </code>.
  54.      </dd>
  55.      <dt>link-content-type</dt>
  56.      <dd>expected MIME type of xml document requested on view
  57.        <em>link-query-view</em>
  58.        <br/>
  59.        By default <code>link-content-type</code> is set to 
  60.        <code>application/x-cocoon-links</code>.
  61.      </dd>
  62.      <dt>link-view-query</dt>
  63.      <dd>A query-string appended to the crawling URL
  64.        <br/>
  65.        By default <code>link-view-query</code> is set to
  66.        <code>cocoon-view=links</code>.
  67.      </dd>
  68.      <dt>user-agent</dt>
  69.      <dd>HTTP user-agent for requesting links,
  70.        By default <code>user-agent</code> is set to
  71.        value of <code>org.apache.cocoon.Constants.COMPLETE_NAME</code>,
  72.        ie. <code>Apache Cocoon 2.1-dev</code>
  73.      </dd>
  74.      <dt>accept</dt>
  75.      <dd>Not currently used</dd>
  76.    </dl>
  77.    <ul>
  78.     <li>Name : linkStatus</li>
  79.     <li>Class: org.apache.cocoon.generation.LinkStatusGenerator</li>
  80.     <li>Cacheable: no.</li>
  81.    </ul>
  82.    <p>
  83.     A simple example might help to use the LinkStatusGenerator effectivly:
  84.    </p>
  85.    <p>
  86.     Add the LinkStatusGenerator to the components in your sitemap.xmap
  87.    </p>
  88. <source><![CDATA[
  89. ...
  90. <map:components>
  91. ...
  92.   <map:generators default="file">
  93.   ...
  94.     <map:generator name="linkStatus"
  95.       src="org.apache.cocoon.generation.LinkStatusGenerator"/>
  96.   </map:generators>
  97.   <map:serialize default="html">
  98.     <map:serializer name="links"
  99.       src="org.apache.cocoon.serialization.LinkSerializer"/>
  100.   </map:serialize>
  101. </map:components>
  102. <map:views>
  103.   <map:view>
  104.     <map:view from-position="last" name="links">
  105.       <map:serialize type="links"/>
  106.     </map:view>
  107.     ...
  108. </map:view>
  109. ]]></source>
  110.    <p>
  111.      Next define in your pipeline to use the LinkStatusGenerator
  112.    </p>
  113. <source><![CDATA[
  114. <map:match pattern="/linkStatus">
  115.   <map:generate type="linkStatus" name="my-root"/>
  116.   ...
  117.   <map:serialize/>
  118. </map:match>
  119. ]]></source>
  120.  
  121.   </s1>
  122.  </body>
  123. </document>
  124.