Lines 21-42
Link Here
|
21 |
|
21 |
|
22 |
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
22 |
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
23 |
|
23 |
|
24 |
<map:components> |
|
|
25 |
<map:transformers default="xslt"> |
26 |
<map:transformer name="metaData" logger="lenya.sitemap.transformer.metaData" src="org.apache.lenya.cms.cocoon.transformation.MetaDataTransformer"/> |
27 |
</map:transformers> |
28 |
<map:serializers default="xhtml"> |
29 |
<map:serializer logger="sitemap.serializer.links" name="links" src="org.apache.lenya.cms.cocoon.serialization.LinkSerializer"/> |
30 |
</map:serializers> |
31 |
</map:components> |
32 |
|
33 |
<map:views> |
34 |
<map:view from-position="last" name="links"> |
35 |
<map:serialize type="links" /> |
36 |
</map:view> |
37 |
</map:views> |
38 |
|
39 |
|
40 |
<map:pipelines> |
24 |
<map:pipelines> |
41 |
|
25 |
|
42 |
<!-- This pipeline handles helper requests and metadata, not the actual publication documents --> |
26 |
<!-- This pipeline handles helper requests and metadata, not the actual publication documents --> |
Lines 104-131
Link Here
|
104 |
|
88 |
|
105 |
<map:pipeline type="caching"> |
89 |
<map:pipeline type="caching"> |
106 |
|
90 |
|
107 |
<!-- RSS formatting. |
91 |
<!-- {1:rendertype}/{2:pub}/{3:area}/{4:path} --> |
108 |
FIXME: this should be handled by an RSS feed module! |
|
|
109 |
--> |
110 |
<map:match pattern="**.rss"> |
111 |
<map:generate src="{resource-type:format-rss}"/> |
112 |
<map:serialize type="xml"/> |
113 |
</map:match> |
114 |
|
115 |
<!-- FIXME: either this should be moved into a metadata module, or at least we need to establish |
116 |
some standard for magic extra suffixes and stick to it. |
117 |
Here we use .html.meta, bxe uses .bxe.html. |
118 |
--> |
119 |
<map:match pattern="*/**.html.meta"> |
120 |
<map:generate type="lenyaMetaData" src="lenya-document:{page-envelope:document-uuid},area={1}"/> |
121 |
<map:serialize type="xml"/> |
122 |
</map:match> |
123 |
<map:match pattern="**meta"> |
124 |
<map:generate type="lenyaMetaData" src="lenya-document:{request-param:uuid},lang={request-param:lang},pubid={request-param:pubid},area={request-param:area}"/> |
125 |
<map:serialize type="xml"/> |
126 |
</map:match> |
127 |
|
128 |
<!-- {1:rendertype}/{2:pub}/{3:area}/{4:path} --> |
129 |
<map:match pattern="document-content/*/*/*/**"> |
92 |
<map:match pattern="document-content/*/*/*/**"> |
130 |
<map:act type="language-exists"> |
93 |
<map:act type="language-exists"> |
131 |
<map:generate src="{resource-type:format-xhtml}?rendertype={../1}"/> |
94 |
<map:generate src="{resource-type:format-xhtml}?rendertype={../1}"/> |
Lines 217-245
Link Here
|
217 |
<map:parameter name="title" value="{dublincore:title}"/> |
180 |
<map:parameter name="title" value="{dublincore:title}"/> |
218 |
</map:transform> |
181 |
</map:transform> |
219 |
</map:act> |
182 |
</map:act> |
220 |
|
|
|
221 |
<!-- This is a demonstration of the generic meta data transformer |
222 |
described in bug 39891. |
223 |
|
224 |
1) define the ns: xmlns:meta="http://apache.org/lenya/meta/1.0/" |
225 |
2) use it in above xsl like e.g. |
226 |
<meta:value ns="http://purl.org/dc/elements/1.1/" element="date" uuid="{@uuid}"/> |
227 |
|
228 |
Where @ns is the namespace for which you want to retrieve the @element for. |
229 |
If there is more then one element registered then the transformer returns: |
230 |
<value xmlns="http://apache.org/lenya/meta/1.0/" value="2005-09-11 12:44:05" element="date" /> |
231 |
<value xmlns="http://apache.org/lenya/meta/1.0/" value="2006-09-11 12:44:05" element="date" /> |
232 |
|
233 |
Otherwise it will return the value as characters. |
234 |
--> |
235 |
<map:transform type="metaData"> |
236 |
<map:parameter name='pubid' value='{page-envelope:publication-id}'/> |
237 |
<map:parameter name='area' value='{page-envelope:area}'/> |
238 |
</map:transform> |
239 |
<map:transform type="i18n"> |
240 |
<map:parameter name="locale" value="{page-envelope:language}"/> |
241 |
</map:transform> |
242 |
<map:transform type="uuid2url"/> |
243 |
<map:serialize type="xml"/> |
183 |
<map:serialize type="xml"/> |
244 |
</map:match> |
184 |
</map:match> |
245 |
|
185 |
|
Lines 252-267
Link Here
|
252 |
<map:pipeline> |
192 |
<map:pipeline> |
253 |
|
193 |
|
254 |
<!-- |
194 |
<!-- |
255 |
FIXME: this is a BXE-specific hack that should be handled by BXE's module sitemap. The publication |
|
|
256 |
should not be concerned with BXE-specific pre-processing of documents. |
257 |
--> |
258 |
<map:match pattern="**.bxe.html"> |
259 |
<map:generate src="cocoon:/lenyabody-edit/{page-envelope:publication-id}/{page-envelope:area}/{page-envelope:document-type}{page-envelope:document-path}"/> |
260 |
<map:transform type="proxy"/> |
261 |
<map:serialize type="xml"/> |
262 |
</map:match> |
263 |
|
264 |
<!-- |
265 |
Finally: this matcher handles requests for publication documents. |
195 |
Finally: this matcher handles requests for publication documents. |
266 |
/{1:area}/{2:document-path}.html |
196 |
/{1:area}/{2:document-path}.html |
267 |
--> |
197 |
--> |
Lines 330-341
Link Here
|
330 |
</map:otherwise> |
260 |
</map:otherwise> |
331 |
</map:select> |
261 |
</map:select> |
332 |
|
262 |
|
333 |
<!-- |
|
|
334 |
strip xhtml namespace prefix to ensure compatibility with non-XML conformant browsers |
335 |
workaround to avoid empty script, style and textarea tags (firefox chokes on those) |
336 |
--> |
337 |
<map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/> |
338 |
|
339 |
<!-- client cache expiration settings --> |
263 |
<!-- client cache expiration settings --> |
340 |
<map:select type="parameter"> |
264 |
<map:select type="parameter"> |
341 |
<map:parameter name="parameter-selector-test" value="{1}"/> |
265 |
<map:parameter name="parameter-selector-test" value="{1}"/> |
Lines 356-372
Link Here
|
356 |
</map:otherwise> |
280 |
</map:otherwise> |
357 |
</map:select> |
281 |
</map:select> |
358 |
|
282 |
|
359 |
<!-- pretty-print output for easier debugging and for the benefit of new users |
|
|
360 |
NOTE: you may want to disable this in production for performance reasons, |
361 |
but it's on by default in the default publication to make the generated code |
362 |
easier to work with for new users. --> |
363 |
<map:transform src="fallback://lenya/modules/prettyprinting/xslt/xml2nicexml.xsl"/> |
364 |
|
365 |
<!-- the proxy transformer handles proxy-related URL rewriting --> |
366 |
<map:transform type="proxy"/> |
367 |
|
368 |
<map:act type="language-exists"> |
283 |
<map:act type="language-exists"> |
369 |
<map:serialize type="xhtml"/> |
284 |
<map:serialize/> |
370 |
</map:act> |
285 |
</map:act> |
371 |
<!-- |
286 |
<!-- |
372 |
When the requested document does not exist, we generate a nice error page. |
287 |
When the requested document does not exist, we generate a nice error page. |
Lines 407-417
Link Here
|
407 |
<map:parameter name="parameter-selector-test" value="{1}"/> |
322 |
<map:parameter name="parameter-selector-test" value="{1}"/> |
408 |
<map:when test="live"/> |
323 |
<map:when test="live"/> |
409 |
<map:otherwise> |
324 |
<map:otherwise> |
410 |
<map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}?doctype={page-envelope:document-type}"/> |
325 |
<map:transform src="cocoon://lenya-page/{page-envelope:publication-id}/{1}/{2}"/> |
411 |
</map:otherwise> |
326 |
</map:otherwise> |
412 |
</map:select> |
327 |
</map:select> |
413 |
<map:transform src="fallback://lenya/xslt/util/strip_namespaces.xsl"/> |
|
|
414 |
<map:transform type="proxy"/> |
415 |
<map:serialize type="xhtml" status-code="404"/> |
328 |
<map:serialize type="xhtml" status-code="404"/> |
416 |
|
329 |
|
417 |
</map:match> |
330 |
</map:match> |