You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by cr...@apache.org on 2004/07/21 08:53:27 UTC
svn commit: rev 23112 - forrest/trunk/src/core/context/WEB-INF
Author: crossley
Date: Tue Jul 20 23:53:26 2004
New Revision: 23112
Modified:
forrest/trunk/src/core/context/WEB-INF/cli.xconf
Log:
Synchronise with Cocoon cli.xconf
Lots of explanations and updated comments.
New facilities like the important <uris> group to include extra files.
Modified: forrest/trunk/src/core/context/WEB-INF/cli.xconf
==============================================================================
--- forrest/trunk/src/core/context/WEB-INF/cli.xconf (original)
+++ forrest/trunk/src/core/context/WEB-INF/cli.xconf Tue Jul 20 23:53:26 2004
@@ -14,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
<!--+
| This is the Apache Cocoon command line configuration file.
| Here you give the command line interface details of where
@@ -47,7 +46,8 @@
| greater flexibility. If you require a stable and
| consistent method for accessing the CLI, it is recommended
| that you use the command line parameters to configure
- | the CLI.</note>
+ | the CLI. See documentation at:
+ | /userdocs/offline/index.html and Wiki:CommandLine
|
+-->
@@ -64,7 +64,7 @@
|
| The work directory is used by Cocoon to store temporary
| files and cache files.
- |
+ |
| The destination directory is where generated pages will
| be written (assuming the 'simple' mapper is used, see
| below)
@@ -73,6 +73,15 @@
<config-file>WEB-INF/cocoon.xconf</config-file>
<work-dir>../tmp/cocoon-work</work-dir>
<dest-dir>../site</dest-dir>
+
+ <!--+
+ | A checksum file can be used to store checksums for pages
+ | as they are generated. When the site is next generated,
+ | files will not be written if their checksum has not changed.
+ | This means that it will be easier to detect which files
+ | need to be uploaded to a server, using the timestamp.
+ +-->
+ <!-- <checksums-uri>build/work/checksums</checksums-uri>-->
<!--+
| Broken link reporting options:
@@ -89,6 +98,8 @@
| extension specifies an extension that should be appended
| to the generated page's filename (default: none)
|
+ | Using this, a quick scan through the destination directory
+ | will show broken links, by their filename extension.
+-->
<broken-links type="xml"
file="../brokenlinks.xml"
@@ -106,39 +117,111 @@
-->
<!--+
- |
+ | Configures logging.
+ | The 'log-kit' parameter specifies the location of the log kit
+ | configuration file (usually called logkit.xconf.
+ |
+ | Logger specifies the logging category (for all logging prior
+ | to other Cocoon logging categories taking over)
+ |
+ | Available log levels are:
+ | DEBUG: prints all level of log messages.
+ | INFO: prints all level of log messages except DEBUG
+ | ones.
+ | WARN: prints all level of log messages except DEBUG
+ | and INFO ones.
+ | ERROR: prints all level of log messages except DEBUG,
+ | INFO and WARN ones.
+ | FATAL_ERROR: prints only log messages of this level
+-->
<!-- <logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" /> -->
<!--+
- | Specifies the filename to be appended to URIs that
- | refer to a directory (i.e. end with a forward slash).
+ | Specifies the filename to be appended to URIs that
+ | refer to a directory (i.e. end with a forward slash).
+-->
<default-filename>index.html</default-filename>
<!--+
| Specifies a user agent string to the sitemap when
| generating the site.
+ |
+ | A generic term for a web browser is "user agent". Any
+ | user agent, when connecting to a web server, will provide
+ | a string to identify itself (e.g. as Internet Explorer or
+ | Mozilla). It is possible to have Cocoon serve different
+ | content depending upon the user agent string provided by
+ | the browser. If your site does this, then you may want to
+ | use this <user-agent> entry to provide a 'fake' user agent
+ | to Cocoon, so that it generates the correct version of your
+ | site.
+ |
+ | For most sites, this can be ignored.
+-->
<!--
- <user-agent>xxx</user-agent>
+ <user-agent>Cocoon Command Line Environment 2.1</user-agent>
-->
<!--+
| Specifies an accept string to the sitemap when generating
| the site.
+ | User agents can specify to an HTTP server what types of content
+ | (by mime-type) they are able to receive. E.g. a browser may be
+ | able to handle jpegs, but not pngs. The HTTP accept header
+ | allows the server to take the browser's capabilities into account,
+ | and only send back content that it can handle.
+ |
+ | For most sites, this can be ignored.
+-->
+
<accept>*/*</accept>
<!--+
- | Specifies the URIs that should be generated (using <uri>
- | elements, and (if necessary) what should be done with the
- | generated pages.
- |
- | The old behaviour - appends uri to the specified destination
- | directory (as specified in <dest-dir>):
- |
- | <uri>documents/index.html</uri>
+ | Specifies which URIs should be included or excluded, according
+ | to wildcard patterns.
+ |
+ | These includes/excludes are only relevant when you are following
+ | links. A link URI must match an include pattern (if one is given)
+ | and not match an exclude pattern, if it is to be followed by
+ | Cocoon. It can be useful, for example, where there are links in
+ | your site to pages that are not generated by Cocoon, such as
+ | references to api-documentation.
+ |
+ | By default, all URIs are included. If both include and exclude
+ | patterns are specified, a URI is first checked against the
+ | include patterns, and then against the exclude patterns.
+ |
+ | Multiple patterns can be given, using muliple include or exclude
+ | nodes.
+ |
+ | The order of the elements is not significant, as only the first
+ | successful match of each category is used.
+ |
+ | Currently, only the complete source URI can be matched (including
+ | any URI prefix). Future plans include destination URI matching
+ | and regexp matching. If you have requirements for these, contact
+ | dev@cocoon.apache.org.
+ +-->
+
+ <exclude pattern="**/"/>
+ <exclude pattern="**apidocs**"/>
+ <exclude pattern="api/**"/>
+
+ <exclude pattern="site:**"/>
+ <exclude pattern="ext:**"/>
+
+ <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
+ <exclude pattern="[preferred]/**"/>
+ <exclude pattern="[location]"/>
+
+ <!-- <include-links extension=".html"/>-->
+
+ <!--+
+ | <uri> nodes specify the URIs that should be generated, and
+ | where required, what should be done with the generated pages.
+ | They describe the way the URI of the generated file is created
+ | from the source page's URI. There are three ways that a generated
+ | file URI can be created: append, replace and insert.
|
| The "type" attribute specifies one of (append|replace|insert):
|
@@ -180,26 +263,48 @@
| the value provided globally using the <dest-dir> node will
| be used instead.
+-->
+ <!--
+ <uri type="replace"
+ src-prefix="samples/"
+ src="hello-world/hello.html"
+ dest="build/dest/hello-world.html"/>
+ -->
- <!-- Includes and excludes can be used to limit which URLs are rendered -->
- <exclude pattern="**/"/>
- <exclude pattern="**apidocs**"/>
- <exclude pattern="api/**"/>
-
- <exclude pattern="site:**"/>
- <exclude pattern="ext:**"/>
-
- <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
- <exclude pattern="[preferred]/**"/>
- <exclude pattern="[location]"/>
-
+ <!--+
+ | <uri> nodes can be grouped together in a <uris> node. This
+ | enables a group of URIs to share properties. The following
+ | properties can be set for a group of URIs:
+ | * follow-links: should pages be crawled for links
+ | * confirm-extensions: should file extensions be checked
+ | for the correct mime type
+ | * src-prefix: all source URIs should be
+ | pre-pended with this prefix before
+ | generation. The prefix is not
+ | included when calculating the
+ | destination URI
+ | * dest: the base destination URI to be
+ | shared by all pages in this group
+ | * type: the method to be used to calculate
+ | the destination URI. See above
+ | section on <uri> node for details.
+ |
+ | Each <uris> node can have a name attribute. When a name
+ | attribute has been specified, the -n switch on the command
+ | line can be used to tell Cocoon to only process the URIs
+ | within this URI group. When no -n switch is given, all
+ | <uris> nodes are processed. Thus, one xconf file can be
+ | used to manage multiple sites.
+ +-->
+ <!--
+ <uris name="mirrors" follow-links="false">
+ <uri type="append" src="mirrors.html"/>
+ </uris>
+ -->
<!--+
| File containing URIs (plain text, one per line).
+-->
<!--
- <uri-file></uri-file>
+ <uri-file>uris.txt</uri-file>
-->
-
</cocoon>
-