Debian Codegraph @

documentation-sources/conf/cli.xconf

raw
1 <?xml version="1.0"?>
2 <!--
3
4 Licensed to the Apache Software Foundation (ASF) under one or more
5 contributor license agreements. See the NOTICE file distributed with
6 this work for additional information regarding copyright ownership.
7 The ASF licenses this file to You under the Apache License, Version 2.0
8 (the "License"); you may not use this file except in compliance with
9 the License. You may obtain a copy of the License at
10
11 http://www.apache.org/licenses/LICENSE-2.0
12
13 Unless required by applicable law or agreed to in writing, software
14 distributed under the License is distributed on an "AS IS" BASIS,
15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 See the License for the specific language governing permissions and
17 limitations under the License.
18
19 $Id$
20 -->
21 <!--+
22 | This is the Apache Cocoon command line configuration file.
23 | Here you give the command line interface details of where
24 | to find various aspects of your Cocoon installation.
25 |
26 | If you wish, you can also use this file to specify the URIs
27 | that you wish to generate.
28 |
29 | The current configuration information in this file is for
30 | building the Cocoon documentation. Therefore, all links here
31 | are relative to the build context dir, which, in the build.xml
32 | file, is set to ${build.context}
33 |
34 | Options:
35 | verbose: increase amount of information presented
36 | to standard output (default: false)
37 | follow-links: whether linked pages should also be
38 | generated (default: true)
39 | precompile-only: precompile sitemaps and XSP pages, but
40 | do not generate any pages (default: false)
41 | confirm-extensions: check the mime type for the generated page
42 | and adjust filename and links extensions
43 | to match the mime type
44 | (e.g. text/html->.html)
45 |
46 | Note: Whilst using an xconf file to configure the Cocoon
47 | Command Line gives access to more features, the use of
48 | command line parameters is more stable, as there are
49 | currently plans to improve the xconf format to allow
50 | greater flexibility. If you require a stable and
51 | consistent method for accessing the CLI, it is recommended
52 | that you use the command line parameters to configure
53 | the CLI. See documentation at:
54 | http://cocoon.apache.org/2.1/userdocs/offline/
55 | http://wiki.apache.org/cocoon/CommandLine
56 |
57 +-->
58
59 <cocoon verbose="true"
60 follow-links="true"
61 precompile-only="false"
62 confirm-extensions="false">
63
64 <!--+
65 | The context directory is usually the webapp directory
66 | containing the sitemap.xmap file.
67 |
68 | The config file is the cocoon.xconf file.
69 |
70 | The work directory is used by Cocoon to store temporary
71 | files and cache files.
72 |
73 | The destination directory is where generated pages will
74 | be written (assuming the 'simple' mapper is used, see
75 | below)
76 +-->
77 <context-dir>.</context-dir>
78 <config-file>WEB-INF/cocoon.xconf</config-file>
79 <work-dir>../tmp/cocoon-work</work-dir>
80 <dest-dir>../site</dest-dir>
81
82 <!--+
83 | A checksum file can be used to store checksums for pages
84 | as they are generated. When the site is next generated,
85 | files will not be written if their checksum has not changed.
86 | This means that it will be easier to detect which files
87 | need to be uploaded to a server, using the timestamp.
88 +-->
89 <!-- <checksums-uri>build/work/checksums</checksums-uri>-->
90
91 <!--+
92 | Broken link reporting options:
93 | Report into a text file, one link per line:
94 | <broken-links type="text" report="filename"/>
95 | Report into an XML file:
96 | <broken-links type="xml" report="filename"/>
97 | Ignore broken links (default):
98 | <broken-links type="none"/>
99 |
100 | Two attributes to this node specify whether a page should
101 | be generated when an error has occured. 'generate' specifies
102 | whether a page should be generated (default: true) and
103 | extension specifies an extension that should be appended
104 | to the generated page's filename (default: none)
105 |
106 | Using this, a quick scan through the destination directory
107 | will show broken links, by their filename extension.
108 +-->
109 <broken-links type="xml"
110 file="../brokenlinks.xml"
111 generate="false"
112 extension=".error"
113 show-referrers="true"/>
114
115 <!--+
116 | Load classes at startup. This is necessary for generating
117 | from sites that use SQL databases and JDBC.
118 | The <load-class> element can be repeated if multiple classes
119 | are needed.
120 +-->
121 <!--
122 <load-class>org.firebirdsql.jdbc.Driver</load-class>
123 -->
124
125 <!--+
126 | Configures logging.
127 | The 'log-kit' parameter specifies the location of the log kit
128 | configuration file (usually called logkit.xconf).
129 |
130 | Logger specifies the logging category (for all logging prior
131 | to other Cocoon logging categories taking over)
132 |
133 | Available log levels are:
134 | DEBUG: prints all level of log messages.
135 | INFO: prints all level of log messages except DEBUG
136 | ones.
137 | WARN: prints all level of log messages except DEBUG
138 | and INFO ones.
139 | ERROR: prints all level of log messages except DEBUG,
140 | INFO and WARN ones.
141 | FATAL_ERROR: prints only log messages of this level
142 +-->
143 <!-- <logging log-kit="WEB-INF/logkit.xconf" logger="cli" level="ERROR" /> -->
144
145 <!--+
146 | Specifies the filename to be appended to URIs that
147 | refer to a directory (i.e. end with a forward slash).
148 +-->
149 <default-filename>index.html</default-filename>
150
151 <!--+
152 | Specifies a user agent string to the sitemap when
153 | generating the site.
154 |
155 | A generic term for a web browser is "user agent". Any
156 | user agent, when connecting to a web server, will provide
157 | a string to identify itself (e.g. as Internet Explorer or
158 | Mozilla). It is possible to have Cocoon serve different
159 | content depending upon the user agent string provided by
160 | the browser. If your site does this, then you may want to
161 | use this <user-agent> entry to provide a 'fake' user agent
162 | to Cocoon, so that it generates the correct version of your
163 | site.
164 |
165 | For most sites, this can be ignored.
166 +-->
167 <!--
168 <user-agent>Cocoon Command Line Environment 2.1</user-agent>
169 -->
170
171 <!--+
172 | Specifies an accept string to the sitemap when generating
173 | the site.
174 | User agents can specify to an HTTP server what types of content
175 | (by mime-type) they are able to receive. E.g. a browser may be
176 | able to handle jpegs, but not pngs. The HTTP accept header
177 | allows the server to take the browser's capabilities into account,
178 | and only send back content that it can handle.
179 |
180 | For most sites, this can be ignored.
181 +-->
182
183 <accept>*/*</accept>
184
185 <!--+
186 | Specifies which URIs should be included or excluded, according
187 | to wildcard patterns.
188 |
189 | These includes/excludes are only relevant when you are following
190 | links. A link URI must match an include pattern (if one is given)
191 | and not match an exclude pattern, if it is to be followed by
192 | Cocoon. It can be useful, for example, where there are links in
193 | your site to pages that are not generated by Cocoon, such as
194 | references to api-documentation.
195 |
196 | By default, all URIs are included. If both include and exclude
197 | patterns are specified, a URI is first checked against the
198 | include patterns, and then against the exclude patterns.
199 |
200 | Multiple patterns can be given, using muliple include or exclude
201 | nodes.
202 |
203 | The order of the elements is not significant, as only the first
204 | successful match of each category is used.
205 |
206 | Currently, only the complete source URI can be matched (including
207 | any URI prefix). Future plans include destination URI matching
208 | and regexp matching. If you have requirements for these, contact
209 | [email protected].
210 +-->
211
212 <exclude pattern="**/"/>
213 <exclude pattern="**apidocs**"/>
214 <exclude pattern="api/**"/>
215 <exclude pattern="javadoc/**"/>
216
217 <!--
218 This is a workaround for FOR-284 "link rewriting broken when
219 linking to xml source views which contain site: links".
220 See the explanation there and in declare-broken-site-links.xsl
221 -->
222 <exclude pattern="site:**"/>
223 <exclude pattern="ext:**"/>
224 <exclude pattern="**/site:**"/>
225 <exclude pattern="**/ext:**"/>
226
227 <!-- Exclude tokens used in URLs to ASF mirrors (interpreted by a CGI) -->
228 <exclude pattern="[preferred]/**"/>
229 <exclude pattern="[location]"/>
230
231 <!-- Exclude the download.cgi file -->
232 <exclude pattern="download.cgi"/>
233
234 <!-- Exclude the applet demo directory -->
235 <exclude pattern="demo/**"/>
236
237 <!-- <include-links extension=".html"/>-->
238
239 <!--+
240 | <uri> nodes specify the URIs that should be generated, and
241 | where required, what should be done with the generated pages.
242 | They describe the way the URI of the generated file is created
243 | from the source page's URI. There are three ways that a generated
244 | file URI can be created: append, replace and insert.
245 |
246 | The "type" attribute specifies one of (append|replace|insert):
247 |
248 | append:
249 | Append the generated page's URI to the end of the source URI:
250 |
251 | <uri type="append" src-prefix="documents/" src="index.html"
252 | dest="build/dest/"/>
253 |
254 | This means that
255 | (1) the "documents/index.html" page is generated
256 | (2) the file will be written to "build/dest/documents/index.html"
257 |
258 | replace:
259 | Completely ignore the generated page's URI - just
260 | use the destination URI:
261 |
262 | <uri type="replace" src-prefix="documents/" src="index.html"
263 | dest="build/dest/docs.html"/>
264 |
265 | This means that
266 | (1) the "documents/index.html" page is generated
267 | (2) the result is written to "build/dest/docs.html"
268 | (3) this works only for "single" pages - and not when links
269 | are followed
270 |
271 | insert:
272 | Insert generated page's URI into the destination
273 | URI at the point marked with a * (example uses fictional
274 | zip protocol)
275 |
276 | <uri type="insert" src-prefix="documents/" src="index.html"
277 | dest="zip://*.zip/page.html"/>
278 |
279 | This means that
280 | (1)
281 |
282 | In any of these scenarios, if the dest attribute is omitted,
283 | the value provided globally using the <dest-dir> node will
284 | be used instead.
285 +-->
286 <!--
287 <uri type="replace"
288 src-prefix="samples/"
289 src="hello-world/hello.html"
290 dest="build/dest/hello-world.html"/>
291 -->
292
293 <!--+
294 | <uri> nodes can be grouped together in a <uris> node. This
295 | enables a group of URIs to share properties. The following
296 | properties can be set for a group of URIs:
297 | * follow-links: should pages be crawled for links
298 | * confirm-extensions: should file extensions be checked
299 | for the correct mime type
300 | * src-prefix: all source URIs should be
301 | pre-pended with this prefix before
302 | generation. The prefix is not
303 | included when calculating the
304 | destination URI
305 | * dest: the base destination URI to be
306 | shared by all pages in this group
307 | * type: the method to be used to calculate
308 | the destination URI. See above
309 | section on <uri> node for details.
310 |
311 | Each <uris> node can have a name attribute. When a name
312 | attribute has been specified, the -n switch on the command
313 | line can be used to tell Cocoon to only process the URIs
314 | within this URI group. When no -n switch is given, all
315 | <uris> nodes are processed. Thus, one xconf file can be
316 | used to manage multiple sites.
317 +-->
318 <!--
319 <uris name="mirrors" follow-links="false">
320 <uri type="append" src="mirrors.html"/>
321 </uris>
322 -->
323
324 <!--+
325 | File containing URIs (plain text, one per line).
326 +-->
327 <!--
328 <uri-file>uris.txt</uri-file>
329 -->
330 </cocoon>