View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-cms6/hippo-cms/branches/Branch-CMS-v6_05_xx/editor/src/site/search/sitemap.xmap
Revision: 32883
Committed: Thu Feb 2 12:28:03 2012 UTC (8 years, 2 months ago) by sgrijzenhout
File size: 23813 byte(s)
Log Message:
CMSSIX-292: It is possible to access repository content and configuration when not logged into CMS

File Contents

# Content
1 <?xml version="1.0"?>
2 <!--
3 Copyright 2001-2007 Hippo (www.hippo.nl)
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 <!-- Search sitemap
18 Author: ddam -->
19
20 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
21
22 <!-- =========================== Components ================================ -->
23
24 <map:components>
25 <map:generators default="file">
26 <map:generator name="directory" src="org.apache.cocoon.generation.DirectoryGenerator" logger="sitemap.generation.directory"/>
27 </map:generators>
28 <map:transformers default="xslt">
29
30 <map:transformer name="forms"
31 src="org.apache.cocoon.forms.transformation.FormsTemplateTransformer"
32 logger="forms"/>
33 <map:transformer name="stripnamespaces" src="org.apache.cocoon.transformation.StripNameSpacesTransformer"/>
34 <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
35 <catalogues default="messages">
36 <catalogue id="other" name="OtherMessages" location="site://cforms/messages"/>
37 <catalogue id="forms" name="FormsMessages" location="site://cforms/messages"/>
38 <catalogue id="messages" name="messages">
39 <location>cocoon://extensions/translations</location>
40 <location>site://explorer/translations</location>
41 <location>site://dashboard/translations</location>
42 <location>translations</location>
43 </catalogue>
44 <catalogue id="types" name="TypesMessages" location="{globalconstants:cms-types-dir}/i18n"/>
45 </catalogues>
46 <cache-at-startup>false</cache-at-startup>
47 </map:transformer>
48 </map:transformers>
49 <map:serializers default="xml">
50 <map:serializer name="text"
51 src="org.apache.cocoon.serialization.TextSerializer"
52 mime-type="text/plain"
53 logger="sitemap.serializer.text"
54 />
55 </map:serializers>
56 <map:matchers default="wildcard">
57 <map:matcher name="regexp"
58 src="org.apache.cocoon.matching.RegexpURIMatcher"
59 logger="sitemap.matching.regexp"/>
60 </map:matchers>
61 <map:selectors default="parameter">
62 <map:selector name="simple" src="org.apache.cocoon.selection.SimpleSelector"/>
63 </map:selectors>
64 <map:readers default="resource"/>
65 <map:pipes default="noncaching"/>
66 </map:components>
67
68 <!-- ========================== Flowscript ================================= -->
69
70 <map:flow language="javascript">
71 <map:script src="flow/search.js"/>
72 <map:script src="flow/cache.js"/>
73 </map:flow>
74
75 <!-- views -->
76
77 <map:views>
78 <map:view from-label="content" name="content">
79 <map:serialize type="xml"/>
80 </map:view>
81 <map:view from-label="query" name="query">
82 <map:serialize type="xml"/>
83 </map:view>
84 </map:views>
85
86 <!-- =========================== Pipelines ================================= -->
87
88 <map:pipelines>
89 <map:pipeline type="ecaching" internal-only="true">
90
91 <map:match pattern="fetchDocumentIfExists(/**,**)">
92 <map:call function="jxcache">
93 <map:parameter name="pipeline" value="call-fetchDocumentIfExists"/>
94 <map:parameter name="key:target" value="{repository:files}/{1}"/>
95 <map:parameter name="key:alternative" value="{2}"/>
96 </map:call>
97 </map:match>
98
99 <map:match pattern="call-fetchDocumentIfExists">
100 <map:generate type="jx" src="resources/jx/documentExists.jx"/>
101 <map:transform type="webdav"/>
102 <map:transform src="transformers/util/checkIfExists.xsl">
103 <map:parameter name="alternative" value="{flow-attr:alternative}"/>
104 <map:parameter name="repository-prefix" value="{repository:rootPath}{repository:filesPath}"/>
105 </map:transform>
106 <map:transform type="include"/>
107 <map:transform type="stripnamespaces"/>
108 <map:serialize type="xml"/>
109 </map:match>
110
111
112 <map:match pattern="configuration-file()">
113 <map:generate src="cocoon:/fetchDocumentIfExists(/configuration/search/config.xml,config/defaultConfig.xml)"/>
114 <map:transform src="transformers/util/striproot.xsl"/>
115 <map:transform src="transformers/util/stripnamespaces.xsl"/>
116 <map:serialize type="xml"/>
117 </map:match>
118
119 <map:match pattern="configuration-file(**)">
120 <map:generate src="{1}"/>
121 <map:serialize type="xml"/>
122 </map:match>
123
124 <map:match pattern="get-config-files(**)">
125 <map:generate src="cocoon:/configuration-file({1})"/>
126 <map:transform src="transformers/util/includeConfigurationFiles.xsl"/>
127 <map:transform type="include"/>
128 <map:transform type="i18n">
129 <map:parameter name="locale" value="{session-attr:locale}"/>
130 </map:transform>
131 <map:serialize type="xml"/>
132 </map:match>
133
134 <map:match pattern="config-files(**)">
135 <map:call function="jxcache">
136 <map:parameter name="pipeline" value="call-config-files"/>
137 <map:parameter name="system:currentUser" value="{session-attr:username}"/>
138 <map:parameter name="system:previewPath" value="{repository:filesPath}"/>
139 <map:parameter name="key:config-file" value="{1}"/>
140 </map:call>
141 </map:match>
142
143 <map:match pattern="call-config-files">
144 <map:generate src="cocoon:/get-config-files({flow-attr:config-file})" type="jx"/>
145 <map:transform src="transformers/util/striproot.xsl"/>
146 <map:transform type="stripnamespaces"/>
147 <map:serialize type="xml"/>
148 </map:match>
149
150 <map:match pattern="users">
151 <map:call function="jxcache">
152 <map:parameter name="pipeline" value="call-users"/>
153 <map:parameter name="key:target" value="{repository:users}"/>
154 </map:call>
155 </map:match>
156
157 <map:match pattern="call-users">
158 <map:generate src="resources/jx/users.jx" type="jx">
159 <map:parameter name="target" value="{repository:users}"/>
160 </map:generate>
161 <map:transform type="webdav" label="data"/>
162 <map:transform src="transformers/util/formatUsers.xsl">
163 <map:parameter name="rolespath" value="{repository:rootPath}{repository:rolesPath}"/>
164 <map:parameter name="userspath" value="{repository:rootPath}{repository:usersPath}"/>
165 </map:transform>
166 <map:serialize type="xml"/>
167 </map:match>
168
169 <map:match pattern="roles">
170 <map:call function="jxcache">
171 <map:parameter name="pipeline" value="call-roles"/>
172 <map:parameter name="key:target" value="{repository:roles}"/>
173 </map:call>
174 </map:match>
175
176 <map:match pattern="call-roles">
177 <map:generate src="resources/jx/roles.jx" type="jx"/>
178 <map:transform type="webdav"/>
179 <map:transform src="transformers/util/formatRoles.xsl">
180 <map:parameter name="rolespath" value="{repository:rootPath}{repository:rolesPath}"/>
181 <map:parameter name="userspath" value="{repository:rootPath}{repository:usersPath}"/>
182 </map:transform>
183 <map:serialize/>
184 </map:match>
185
186 <map:match pattern="typesxml2nodetree">
187 <map:generate src="{globalconstants:cms-types-dir}/{globalconstants:cms-types}" />
188 <map:transform type="i18n">
189 <map:parameter name="locale" value="{session-attr:locale}"/>
190 </map:transform>
191 <map:transform src="transformers/util/typesxml2nodetree.xsl"/>
192 <map:serialize/>
193 </map:match>
194
195
196 </map:pipeline>
197
198 <map:pipeline type="noncaching" internal-only="false">
199
200 <map:match pattern="updateElement">
201 <map:generate src="{request-param:source}"/>
202 <map:transform src="transformers/util/source2ajaxresponse.xsl">
203 <map:parameter name="target" value="{request-param:target}"/>
204 <map:parameter name="format" value="{request-param:format}"/>
205 </map:transform>
206 <map:serialize type="text"/>
207 </map:match>
208
209 <map:match pattern="custom.css">
210 <map:select type="resource-exists">
211 <map:when test="repository://configuration/search/css/custom.css">
212 <map:read src="repository://configuration/search/css/custom.css"/>
213 </map:when>
214 <map:otherwise>
215 <map:read src="resources/css/empty.css"/>
216 </map:otherwise>
217 </map:select>
218 </map:match>
219
220 <map:match pattern="custom/**.css">
221 <map:select type="resource-exists">
222 <map:when test="repository://configuration/search/css/{1}.css">
223 <map:read src="repository://configuration/search/css/{1}.css"/>
224 </map:when>
225 <map:otherwise>
226 <map:read src="resources/css/empty.css"/>
227 </map:otherwise>
228 </map:select>
229 </map:match>
230
231 <map:match pattern="js/i18n_messages.js">
232 <map:generate src="cocoon:/translations/messages_en.xml"/>
233 <map:transform src="transformers/util/i18n_messages.xsl"/>
234 <map:transform type="i18n">
235 <map:parameter name="locale" value="{session-attr:locale}"/>
236 </map:transform>
237 <map:transform src="transformers/util/html2plaintext.xsl"/>
238 <map:serialize type="text"/>
239 </map:match>
240
241 <map:match pattern="js/**.js">
242 <map:read src="resources/js/{1}.js" mime-type="text/javascript"/>
243 </map:match>
244
245 <map:match pattern="images/**">
246 <map:read src="resources/images/{1}"/>
247 </map:match>
248
249 <!-- css -->
250 <map:match pattern="css/**.css">
251 <map:read src="resources/css/{1}.css" mime-type="text/css"/>
252 </map:match>
253
254 <!-- load css file by filename -->
255 <map:match pattern="css/**_*.css">
256 <map:read src="resources/css/{1}_{2}.css" mime-type="text/css"/>
257 </map:match>
258 </map:pipeline>
259
260 <map:pipeline type="noncaching" internal-only="false">
261
262 <map:match pattern="batchOpResults.html">
263 <map:generate src="resources/jx/pastedTextHtmlPage.jx" type="jx">
264 <map:parameter name="text" value="{request-param:results}"/>
265 <map:parameter name="title" value="{request-param:title}"/>
266 </map:generate>
267 <map:serialize type="html"/>
268 </map:match>
269
270 <map:match pattern="doSearchReplace">
271 <map:generate src="cocoon:/search-input()" type="jx"/>
272 <!-- when scope of this batch operation is 'all',
273 first fetch ALL search results -->
274 <map:select type="simple">
275 <map:parameter name="value" value="{request-param:__batchScope__}"/>
276 <map:when test="all">
277 <map:transform src="transformers/queryGenerator/generateDasl.xsl">
278 <map:parameter name="pagesize" value="no-limit"/>
279 </map:transform>
280 <map:transform type="i18n">
281 <map:parameter name="locale" value="{session-attr:locale}"/>
282 </map:transform>
283 <map:transform type="webdav"/>
284 </map:when>
285 </map:select>
286 <map:select type="simple">
287 <map:parameter name="value" value="{request-param:__batchScope__}"/>
288 <!-- only perform search and replace when the __batchScope__ param has one of the following
289 values:
290 (1) 'selection' => search and replace in the documents selected by the user
291 (2) 'all' => search and replace in all the search results
292 -->
293 <map:when test="">
294 <!-- do nothing -->
295 </map:when>
296 <map:otherwise>
297 <map:transform src="transformers/queryGenerator/searchReplaceAll.xsl"/>
298 <map:transform type="webdav"/>
299 </map:otherwise>
300 </map:select>
301 <map:transform src="transformers/actions/searchReplace-ajaxResponse.xsl"/>
302 <map:transform type="i18n">
303 <map:parameter name="locale" value="{session-attr:locale}"/>
304 </map:transform>
305 <map:serialize type="xml"/>
306 </map:match>
307
308 <map:match pattern="searchReplaceReport.html">
309 <map:generate src="resources/html/searchReplaceReport.html"/>
310 <map:transform type="i18n">
311 <map:parameter name="locale" value="{session-attr:locale}"/>
312 </map:transform>
313 <map:serialize type="html"/>
314 </map:match>
315
316 <map:match pattern="testcase/*">
317 <map:generate src="testcases/{1}.xml">
318 <map:parameter name="target" value="{repository:files}"/>
319 </map:generate>
320 <map:transform type="webdav"/>
321 <map:serialize/>
322 </map:match>
323
324 </map:pipeline>
325
326 <map:pipeline type="ecaching" internal-only="true">
327
328 <map:match pattern="action">
329 <map:aggregate element="root">
330 <map:part src="cocoon:/configuration"/>
331 <map:part src="cocoon:/variables"/>
332 </map:aggregate>
333 <map:transform src="transformers/search/actions.xsl"/>
334 <map:transform type="i18n">
335 <map:parameter name="locale" value="{session-attr:locale}"/>
336 </map:transform>
337 <map:serialize type="xml">
338 <map:parameter name="omit-xml-declaration" value="no"/>
339 </map:serialize>
340 </map:match>
341
342 <map:match pattern="configuration(**)">
343 <map:aggregate element="root">
344 <map:part src="cocoon:/config-files({1})"/>
345 <map:part src="cocoon:/roles"/>
346 <map:part src="cocoon:/users"/>
347 </map:aggregate>
348 <map:transform src="transformers/util/mergeConfig.xsl"/>
349 <map:transform type="include"/>
350 <map:transform type="i18n">
351 <map:parameter name="locale" value="{session-attr:locale}"/>
352 </map:transform>
353 <map:serialize type="xml"/>
354 </map:match>
355
356
357 <map:match pattern="saved-dashboard-report/**">
358 <map:generate src="cocoon:/search-dashboard-input()" type="jx" label="content"/>
359 <map:transform src="transformers/queryGenerator/generateDasl.xsl">
360 <map:parameter name="saved-report-id" value="{1}"/>
361 </map:transform>
362 <map:transform type="i18n" label="query">
363 <map:parameter name="locale" value="{session-attr:locale}"/>
364 </map:transform>
365 <map:transform type="webdav"/>
366 <map:serialize type="xml"/>
367 </map:match>
368
369 <map:match pattern="search-dashboard-input(**)">
370 <map:aggregate element="root">
371 <map:part src="cocoon:/configuration-dashboard({1})"/>
372 <map:part src="cocoon:/variables"/>
373 <!--map:part element="sitemodel" src="{site:model}"/-->
374 </map:aggregate>
375 <map:serialize type="xml"/>
376 </map:match>
377
378 <map:match pattern="configuration-dashboard(**)">
379 <map:aggregate element="root">
380 <map:part src="cocoon:/config-files({1})"/>
381 <!--map:part src="cocoon:/roles"/-->
382 <!--map:part src="cocoon:/users"/-->
383 </map:aggregate>
384 <map:transform src="transformers/util/mergeConfig.xsl"/>
385 <map:transform type="i18n">
386 <map:parameter name="locale" value="{session-attr:locale}"/>
387 </map:transform>
388 <map:serialize type="xml"/>
389 </map:match>
390
391 <map:match pattern="search-input(**)">
392 <map:aggregate element="root">
393 <map:part src="cocoon:/configuration({1})"/>
394 <map:part src="cocoon:/variables"/>
395 <map:part element="sitemodel" src="{site:model}"/>
396 </map:aggregate>
397 <map:serialize type="xml"/>
398 </map:match>
399
400 <map:match pattern="saved-report/**">
401 <map:generate src="cocoon:/search-input()" type="jx" label="content"/>
402 <map:transform src="transformers/queryGenerator/generateDasl.xsl">
403 <map:parameter name="saved-report-id" value="{1}"/>
404 </map:transform>
405 <map:transform type="i18n" label="query">
406 <map:parameter name="locale" value="{session-attr:locale}"/>
407 </map:transform>
408 <map:transform type="webdav"/>
409 <map:serialize type="xml"/>
410 </map:match>
411
412
413
414 <map:match pattern="searchresults">
415 <map:generate src="cocoon:/search-input()"/>
416 <map:transform src="transformers/queryGenerator/generateDasl.xsl"/>
417 <map:transform src="transformers/util/strip-empty-namespace.xsl"/>
418 <map:transform type="i18n">
419 <map:parameter name="locale" value="{session-attr:locale}"/>
420 </map:transform>
421 <map:transform type="webdav"/>
422 <map:serialize type="xml"/>
423 </map:match>
424
425
426 <map:match pattern="searchform.html">
427 <map:generate src="cocoon:/searchresults" label="content"/>
428 <map:transform src="transformers/search/main.xsl">
429 <map:parameter name="mode" value="{request-param:mode}"/>
430 <map:parameter name="enableShelf" value="{globalconstants:cms-shelf}"/>
431 </map:transform>
432 <map:transform type="i18n">
433 <map:parameter name="locale" value="{session-attr:locale}"/>
434 </map:transform>
435 <map:transform type="stripnamespaces"/>
436 <map:serialize type="html"/>
437 </map:match>
438
439 <map:match pattern="customTranslations/**">
440 <map:select type="resource-exists">
441 <map:when test="repository://configuration/search/translations/{1}">
442 <map:generate src="repository://configuration/search/translations/{1}"/>
443 </map:when>
444 <map:otherwise>
445 <map:generate src="resources/xml/emptyI18N.xml"/>
446 </map:otherwise>
447 </map:select>
448 <map:serialize type="xml"/>
449 </map:match>
450
451 <map:match pattern="get-translations(**)">
452 <map:select type="resource-exists">
453 <map:when test="{1}">
454 <map:generate src="{1}"/>
455 </map:when>
456 <map:otherwise>
457 <map:generate src="resources/xml/emptyI18N.xml"/>
458 </map:otherwise>
459 </map:select>
460 <map:serialize/>
461 </map:match>
462
463 <!-- TODO : add spanish translations -->
464 <map:match pattern="translations/messages_es.xml">
465 <map:redirect-to uri="cocoon:/translations/messages_en.xml"/>
466 </map:match>
467
468 <map:match pattern="translations/**">
469 <map:select type="resource-exists">
470 <map:when test="translations/{1}">
471 <map:aggregate element="root">
472 <map:part src="translations/{1}"/>
473 <map:part src="cocoon:/get-translations(../explorer/translations/{1})"/>
474 <map:part src="cocoon:/get-translations(../dashboard/translations/{1})"/>
475 <map:part src="cocoon:/get-translations(cocoon:/customTranslations/{1})"/>
476 </map:aggregate>
477 <map:transform src="transformers/util/mergei18n.xsl">
478 <map:parameter name="locale" value="{session-attr:locale}"/>
479 </map:transform>
480 <map:serialize type="xml"/>
481 </map:when>
482 <map:otherwise>
483 <map:generate src="resources/xml/emptyI18N.xml"/>
484 <map:serialize/>
485 </map:otherwise>
486 </map:select>
487 </map:match>
488
489 <map:match pattern="scope-picker/**">
490 <map:aggregate element="root" label="nodetree">
491 <map:part element="nodetree" src="cocoon:/nodetree/{1}"/>
492 <map:part element="sitemodel" src="{site:model}"/>
493 </map:aggregate>
494 <map:transform src="transformers/util/tree2html.xsl">
495 <map:parameter name="prefix" value="{repository:rootPath}"/>
496 <map:parameter name="targetNode" value="/{1}"/>
497 <map:parameter name="uri-prefix" value="/search/scope-picker"/>
498 <map:parameter name="mode" value="{request-param:mode}"/>
499 <map:parameter name="locale" value="{session-attr:locale}"/>
500 <map:parameter name="requiredType" value="{request-param:type}"/>
501 </map:transform>
502 <map:transform type="i18n">
503 <map:parameter name="locale" value="{session-attr:locale}"/>
504 <map:parameter name="default-catalogue-id" value="messages"/>
505 </map:transform>
506 <map:serialize type="html"/>
507 </map:match>
508
509 <map:match pattern="^nodetree(/[^/]+)[/]?(.+)?$" type="regexp">
510 <map:generate src="cocoon:/propdetail/{1}/{2}" label="webdav"/>
511 <map:transform src="site://explorer/transformers/util/propfind2tree.xsl" label="nodetree">
512 <map:parameter name="prefix" value="{repository:rootPath}"/>
513 <map:parameter name="rootNode" value="{1}"/>
514 <map:parameter name="targetNode" value="/{2}"/>
515 <map:parameter name="href" value="{2}"/>
516 <map:parameter name="mode" value="list"/>
517 </map:transform>
518 <map:serialize type="xml"/>
519 </map:match>
520
521 <map:match pattern="propdetail/**">
522 <map:generate type="jx" src="site://dav/jx/propdetail.xml">
523 <map:parameter name="target" value="http://{repository:host}:{repository:port}{repository:rootPath}/{1}"/>
524 <map:parameter name="depth" value="1"/>
525 </map:generate>
526 <map:transform type="webdav"/>
527 <map:serialize type="xml"/>
528 </map:match>
529
530 <map:match pattern="variables">
531 <map:generate type="jx" src="resources/jx/variables.jx">
532 <map:parameter name="currentUser" value="{session-attr:username}"/>
533 <map:parameter name="locale" value="{session-attr:locale}"/>
534 <map:parameter name="target" value="webdav://{repository:host}:{repository:port}{repository:rootPath}/files"/>
535 <map:parameter name="scope-prefix" value="{repository:rootPath}"/>
536 <map:parameter name="active-repository-prefix" value="{repository:rootPath}{repository:filesPath}"/>
537 <map:parameter name="reportID" value="{request-param:reportID}"/>
538 <map:parameter name="page" value="{request-param:page}"/>
539 <map:parameter name="pagesize" value="{request-param:pagesize}"/>
540 <map:parameter name="mode" value="{request-param:mode}"/>
541 </map:generate>
542 <map:serialize type="xml"/>
543 </map:match>
544
545 <map:match pattern="search.do">
546 <map:aggregate element="root">
547 <map:part src="cocoon:/configuration"/>
548 <map:part src="cocoon:/variables"/>
549 </map:aggregate>
550 <map:transform src="transformers/queryGenerator/generateDasl.xsl"/>
551 <map:transform type="i18n">
552 <map:parameter name="locale" value="{session-attr:locale}"/>
553 </map:transform>
554 <map:transform type="webdav"/>
555 <map:serialize type="xml"/>
556 </map:match>
557
558 </map:pipeline>
559
560 <map:pipeline type="ecaching" internal-only="false">
561
562 <!-- perspective header and body -->
563 <map:match pattern="perspective.html">
564 <map:generate src="sitemap.xmap"/>
565 <map:transform src="transformers/perspective.xsl">
566 </map:transform>
567 <map:serialize type="html"/>
568 </map:match>
569
570
571 </map:pipeline>
572
573 </map:pipelines>
574
575 </map:sitemap>

Properties

Name Value
svn:eol-style native
svn:keywords Id