View File | Revision Log | Show Annotations | Download File | View Changeset
/hippo/hippo-cms-site-sample/trunk/sitemap.xmap
Revision: 2193
Committed: Tue May 9 12:46:22 2006 UTC (14 years, 8 months ago) by nvankampenhout
File size: 5151 byte(s)
Log Message:
(SITESAMPLE-1) Use WebdavTransformer instead of DASLTransformer.

File Contents

# User Rev Content
1 nvankampenhout 414 <?xml version="1.0"?>
2     <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
3    
4     <map:components>
5     <map:transformers default="xslt">
6     <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer">
7     <catalogues default="demo">
8     <catalogue id="demo" name="messages" location="translations"/>
9     </catalogues>
10     <cache-at-startup>false</cache-at-startup>
11     </map:transformer>
12     </map:transformers>
13     <map:serializers default="xml">
14     <map:serializer name="xhtml" logger="sitemap.serializer.xml"
15     mime-type="text/html" src="org.apache.cocoon.serialization.XMLSerializer">
16     <omit-xml-declaration>no</omit-xml-declaration>
17     <doctype-public>-//W3C//DTD XHTML 1.0 Transitional//EN</doctype-public>
18     <doctype-system> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</doctype-system>
19     <encoding>UTF-8</encoding>
20     <indent>no</indent>
21     </map:serializer>
22     </map:serializers>
23     </map:components>
24    
25     <map:views>
26     <map:view name="source" from-label="source">
27     <map:serialize type="xml"/>
28     </map:view>
29     </map:views>
30    
31    
32     <map:pipelines>
33    
34     <map:component-configurations>
35     <global-variables>
36     <repositoryRoot>webdav://siteuser:siteuser@localhost:60000/default/</repositoryRoot>
37     <previewPath>files/default.preview/</previewPath>
38     <livePath>files/default.www/</livePath>
39     </global-variables>
40     </map:component-configurations>
41    
42 nvankampenhout 2191 <map:pipeline internal-only="true" type="noncaching">
43 nvankampenhout 414
44     <!--
45     Get a list of available document using a DASL query.
46     {1} = "preview" or "live"
47     -->
48     <map:match pattern="*/documents">
49     <map:generate src="dasl-documents.xml" type="jx">
50     <map:parameter name="repository" value="{global:repositoryRoot}{global:{1}Path}"/>
51     </map:generate>
52 nvankampenhout 2193 <map:transform type="webdav"/>
53     <map:transform src="transformers/dasl-result.xsl"/>
54 nvankampenhout 414 <map:serialize type="xml"/>
55     </map:match>
56    
57     <!--
58     Get a document from the repository.
59     {1} = "preview" or "live"
60     -->
61     <map:match pattern="*/document/*.xml">
62     <map:generate src="{global:repositoryRoot}{global:{1}Path}content/documents/{2}.xml"/>
63     <map:serialize type="xml"/>
64     </map:match>
65    
66     </map:pipeline>
67    
68    
69 nvankampenhout 2191 <map:pipeline internal-only="false" type="noncaching">
70 nvankampenhout 414
71     <!--
72     {1} = "preview" or "live"
73     {2} = CSS file
74     -->
75     <map:match pattern="*/*.css">
76     <map:read src="resources/css/{2}.css"/>
77     </map:match>
78    
79     <!--
80     {1} = "preview" or "live"
81     {2} = image
82     -->
83     <map:match pattern="*/*.png">
84     <map:read src="resources/images/{2}.png"/>
85     </map:match>
86    
87     <!--
88     {1} = "preview" or "live"
89     {2} = binary path
90     {3} = extension
91     -->
92     <map:match pattern="*/repository/binaries/**.*">
93     <map:read src="{global:repositoryRoot}{global:previewPath}binaries/{2}.{3}"/>
94     </map:match>
95    
96     <!--
97     {1} = "preview" or "live"
98     -->
99     <map:match pattern="*/index.html">
100     <map:aggregate element="root" label="source">
101     <map:part element="documents" src="cocoon:/{1}/documents"/>
102     </map:aggregate>
103     <map:transform src="transformers/page.xsl">
104     <map:parameter name="previewOrLive" value="{1}"/>
105     </map:transform>
106     <map:transform type="i18n">
107     <map:parameter name="locale" value="en"/>
108     </map:transform>
109     <map:transform src="transformers/stripnamespaces.xsl"/>
110     <map:serialize type="xhtml"/>
111     </map:match>
112    
113     <!--
114     Present a document in XHTML.
115     {1} = "preview" or "live"
116     {2} = document in repository
117     -->
118     <map:match pattern="*/*.html">
119     <map:aggregate element="root" label="source">
120     <map:part element="documents" src="cocoon:/{1}/documents"/>
121     <map:part element="document" src="cocoon:/{1}/document/{2}.xml"/>
122     </map:aggregate>
123     <map:transform src="transformers/page.xsl">
124     <map:parameter name="selectedDocument" value="{2}.xml"/>
125     <map:parameter name="previewOrLive" value="{1}"/>
126     </map:transform>
127     <map:transform type="i18n">
128     <map:parameter name="locale" value="en"/>
129     </map:transform>
130     <map:transform src="transformers/stripnamespaces.xsl"/>
131     <map:serialize type="xhtml"/>
132     </map:match>
133    
134     <!--
135     {1} = "preview" or "live"
136     -->
137     <map:match pattern="*/">
138     <map:redirect-to uri="cocoon:/{1}/index.html"/>
139     </map:match>
140    
141     <map:match pattern="">
142     <map:redirect-to uri="cocoon:/index.html"/>
143     </map:match>
144    
145     <map:match pattern="index.html">
146     <map:generate src="resources/xhtml/index.xhtml"/>
147     <map:serialize type="xhtml"/>
148     </map:match>
149    
150     </map:pipeline>
151    
152     </map:pipelines>
153    
154     </map:sitemap>