cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fel...@apache.org
Subject svn commit: r539056 - /cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-sample/src/main/resources/COB-INF/sitemap.xmap
Date Thu, 17 May 2007 18:18:03 GMT
Author: felixk
Date: Thu May 17 11:18:02 2007
New Revision: 539056

URL: http://svn.apache.org/viewvc?view=rev&rev=539056
Log:
-add views and other matchers
-use servlet services
-reformatted

Modified:
    cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-sample/src/main/resources/COB-INF/sitemap.xmap

Modified: cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-sample/src/main/resources/COB-INF/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-sample/src/main/resources/COB-INF/sitemap.xmap?view=diff&rev=539056&r1=539055&r2=539056
==============================================================================
--- cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-sample/src/main/resources/COB-INF/sitemap.xmap
(original)
+++ cocoon/trunk/blocks/cocoon-chaperon/cocoon-chaperon-sample/src/main/resources/COB-INF/sitemap.xmap
Thu May 17 11:18:02 2007
@@ -18,265 +18,273 @@
 <!-- @version $Id$ -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 
-<!-- =========================== Components ================================ -->
+    <!-- =========================== Components ================================ -->
 
- <map:components>
+    <map:components>
 
-<!-- =========================== Generators ================================= -->
+        <!-- =========================== Generators =================================
-->
 
-  <map:generators default="file">
+        <map:generators default="file">
+            <map:generator name="text" logger="sitemap.generator.textgenerator" src="org.apache.cocoon.generation.TextGenerator">
+                <parameter name="localizable" value="true" />
+            </map:generator>
+
+            <map:generator name="exception" src="org.apache.cocoon.generation.ParseExceptionGenerator"
/>
+        </map:generators>
+
+        <!-- =========================== Transformers =================================
-->
+
+        <map:transformers default="xsltc">
+            <map:transformer name="pattern" src="org.apache.cocoon.transformation.PatternTransformer"
logger="sitemap.transformer.pattern">
+                <parameter name="groups" value="true" />
+            </map:transformer>
+
+            <map:transformer name="lexer" src="org.apache.cocoon.transformation.LexicalTransformer"
logger="sitemap.transformer.lexer">
+                <parameter name="localizable" value="true" />
+            </map:transformer>
+
+            <map:transformer name="parser" src="org.apache.cocoon.transformation.ParserTransformer"
logger="sitemap.transformer.parser">
+                <parameter name="flatten" value="true" />
+                <parameter name="recovery" value="true" />
+                <parameter name="localizable" value="true" />
+            </map:transformer>
+
+            <map:transformer name="extparser" src="org.apache.cocoon.transformation.ExtendedParserTransformer"
logger="sitemap.transformer.extendedparser"></map:transformer>
+        </map:transformers>
+
+        <!-- =========================== Selectors ================================ -->
+
+        <map:selectors default="browser">
+            <map:selector logger="sitemap.selector.exception" name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
+                <exception name="syntax" class="net.sourceforge.chaperon.process.ParseException"
/>
+                <exception class="java.lang.Throwable" unroll="true" />
+            </map:selector>
+        </map:selectors>
+
+    </map:components>
+
+    <!-- =========================== Views =================================== -->
+
+    <map:views>
+        <map:view from-label="content" name="content">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="content" name="pretty-content">
+            <!-- Make use of servlet services -->
+            <map:serialize type="servletService">
+                <map:parameter name="service" value="servlet:style-default:/service/system/xml2html"
/>
+            </map:serialize>
+        </map:view>
+
+        <map:view from-position="last" name="links">
+            <map:serialize type="links" />
+        </map:view>
+
+        <map:view from-label="ast" name="ast">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-label="xdoc" name="xdoc">
+            <map:serialize type="xml" />
+        </map:view>
+
+        <map:view from-position="last" name="links">
+            <map:serialize type="links" />
+        </map:view>
+
+    </map:views>
+
+    <!-- =========================== Flow =================================== -->
+
+    <map:flow language="javascript">
+        <map:script src="misc/wiki.js" />
+    </map:flow>
+
+    <!-- =========================== Pipelines ================================= -->
+
+    <map:pipelines>
+
+        <map:pipeline type="caching" internal-only="true">
+            <!-- Hint: During development you could expose this pipeline, to help
+                with writing your grammars. Use a text grammar myapp.grm and request
+                the myapp.xlex and myapp.xgrm URLs and then view source.
+            -->
+            <map:match pattern="*.xlex">
+                <map:generate type="text" src="grammars/{1}.grm" />
+                <map:transform type="lexer" src="grammars/grm.xlex" />
+                <map:transform type="parser" src="grammars/grm.xgrm" />
+                <map:transform src="stylesheets/text4regex.xsl" />
+                <map:transform type="lexer" src="grammars/regex.xlex" />
+                <map:transform type="parser" src="grammars/regex.xgrm" />
+                <map:transform src="stylesheets/grm2xlex.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="*.xgrm">
+                <map:generate type="text" src="grammars/{1}.grm" />
+                <map:transform type="lexer" src="grammars/grm.xlex" />
+                <map:transform type="parser" src="grammars/grm.xgrm" />
+                <map:transform src="stylesheets/text4regex.xsl" />
+                <map:transform type="lexer" src="grammars/regex.xlex" />
+                <map:transform type="parser" src="grammars/regex.xgrm" />
+                <map:transform src="stylesheets/grm2xgrm.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="*.xegrm">
+                <map:generate type="text" src="grammars/{1}.egrm" />
+                <map:transform type="extparser" src="grammars/egrm.xegrm" />
+                <map:transform src="stylesheets/egrm2xegrm.xsl" />
+                <map:serialize type="xml" />
+            </map:match>
+
+            <map:match pattern="wiki/*.html">
+                <map:generate type="jx" src="misc/{1}.xml" />
+                <map:transform type="lexer" src="cocoon:/wiki.xlex" />
+                <map:transform type="parser" src="cocoon:/wiki.xgrm" label="ast">
+                    <map:parameter name="failsafe" value="true" />
+                </map:transform>
+                <map:transform src="stylesheets/error4wiki.xsl" />
+                <map:transform type="lexer" src="grammars/error.xlex" />
+                <map:transform src="stylesheets/error2page.xsl" />
+                <map:transform src="stylesheets/wiki2xdoc.xsl" label="xdoc" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/style/complex-page2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="wiki/source.xml">
+                <map:generate type="jx" src="misc/source.xml" />
+                <map:transform type="lexer" src="cocoon:/wiki.xlex" />
+                <map:transform type="parser" src="cocoon:/wiki.xgrm" label="ast" />
+                <map:transform src="stylesheets/wiki2xdoc.xsl" label="xdoc" />
+                <map:serialize type="xml" />
+            </map:match>
+
+        </map:pipeline>
+
+        <map:pipeline type="caching">
+
+            <map:match pattern="">
+                <map:redirect-to uri="welcome" />
+            </map:match>
+
+            <map:match pattern="welcome">
+                <map:generate src="misc/samples.xml" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/simple-samples2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="sitemap.xmap">
+                <map:read src="sitemap.xmap" mime-type="text/xml" />
+            </map:match>
+
+            <map:match pattern="*.kont">
+                <map:call continuation="{1}" />
+            </map:match>
+
+            <map:match pattern="*.do">
+                <map:call function="{1}" />
+            </map:match>
+
+            <map:match pattern="*.css">
+                <map:read src="misc/{1}.css" />
+            </map:match>
+
+            <map:match pattern="**/*.css">
+                <map:read src="misc/{2}.css" />
+            </map:match>
+
+            <!-- ========================= Chaperon ================================ -->
+            <map:match pattern="mathexp.html">
+                <map:call function="mathexp" />
+            </map:match>
+            <map:match pattern="mathexp-view.html">
+                <map:generate type="jx" src="misc/mathexp.jx" />
+                <map:transform type="lexer" src="grammars/mathexp.xlex" />
+                <map:transform type="parser" src="grammars/mathexp.xgrm" />
+                <map:transform src="stylesheets/mathexp2html.xsl" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/complex-page2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="quote*.html">
+                <map:generate type="text" src="misc/quote{1}.txt" />
+                <map:transform type="lexer" src="cocoon:/quote.xlex" />
+                <map:transform type="parser" src="cocoon:/quote.xgrm" label="ast" />
+                <map:transform src="stylesheets/quote2page.xsl" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/complex-page2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="pattern.html">
+                <map:generate src="misc/patterntext.xml" />
+                <map:transform type="pattern" src="grammars/link.xlex" />
+                <map:transform src="stylesheets/pattern2link.xsl" />
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/complex-page2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="**/*.java.html">
+                <map:generate type="text" src="http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/java/{1}/{2}.java"
/>
+                <map:transform type="lexer" src="grammars/java.xlex" />
+                <map:transform src="stylesheets/text4javadoc.xsl" />
+                <map:transform type="lexer" src="grammars/javadoc.xlex" label="ast" />
+                <map:transform src="stylesheets/java2html.xsl">
+                    <map:parameter name="package" value="{1}" />
+                    <map:parameter name="class" value="{2}" />
+                </map:transform>
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/complex-page2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:match pattern="**/*.class.html">
+                <map:generate type="text" src="http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/java/{1}/{2}.java"
/>
+                <map:transform type="lexer" src="grammars/java.xlex" />
+                <map:transform src="stylesheets/remove4class.xsl" />
+                <map:transform type="parser" src="cocoon:/java.xgrm" />
+                <map:transform src="stylesheets/text4javadoc2.xsl" />
+                <map:transform type="lexer" src="cocoon:/javadoc.xlex" />
+                <map:transform type="parser" src="cocoon:/javadoc.xgrm" label="ast" />
+                <map:transform src="stylesheets/class2html.xsl">
+                    <map:parameter name="package" value="{1}" />
+                    <map:parameter name="class" value="{2}" />
+                </map:transform>
+                <!-- Make use of servlet services -->
+                <map:serialize type="servletService">
+                    <map:parameter name="service" value="servlet:style-default:/service/common/complex-page2html"
/>
+                </map:serialize>
+            </map:match>
+
+            <map:handle-errors>
+                <map:select type="exception">
+                    <map:when test="syntax">
+                        <map:generate type="exception" />
+                        <map:transform src="stylesheets/text4error.xsl" />
+                        <map:transform type="xinclude" />
+                        <map:transform type="lexer" src="grammars/error.xlex" />
+                        <map:transform src="stylesheets/error2html.xsl">
+                            <map:parameter name="contextPath" value="{request:contextPath}"
/>
+                        </map:transform>
+                        <map:serialize type="html" />
+                    </map:when>
+                </map:select>
+            </map:handle-errors>
 
-   <map:generator name="text" logger="sitemap.generator.textgenerator"
-                  src="org.apache.cocoon.generation.TextGenerator">
-    <parameter name="localizable" value="true"/>
-   </map:generator>
-
-   <map:generator name="exception"
-                  src="org.apache.cocoon.generation.ParseExceptionGenerator"/>
-
-  </map:generators>
-
-<!-- =========================== Transformers ================================= -->
-
-  <map:transformers default="xsltc">
-
-   <map:transformer name="pattern" 
-                    src="org.apache.cocoon.transformation.PatternTransformer" 
-                    logger="sitemap.transformer.pattern">
-    <parameter name="groups" value="true"/>
-   </map:transformer>
-   <map:transformer name="lexer" 
-                    src="org.apache.cocoon.transformation.LexicalTransformer" 
-                    logger="sitemap.transformer.lexer">
-    <parameter name="localizable" value="true"/>
-   </map:transformer>
-   <map:transformer name="parser" 
-                    src="org.apache.cocoon.transformation.ParserTransformer" 
-                    logger="sitemap.transformer.parser">
-    <parameter name="flatten" value="true"/>
-    <parameter name="recovery" value="true"/>
-    <parameter name="localizable" value="true"/>
-   </map:transformer>
-
-   <map:transformer name="extparser"
-                    src="org.apache.cocoon.transformation.ExtendedParserTransformer"
-                    logger="sitemap.transformer.extendedparser">
-   </map:transformer>
-
-  </map:transformers>
-
-<!-- =========================== Selectors ================================ -->
-
-  <map:selectors default="browser">
-   <map:selector logger="sitemap.selector.exception" name="exception"
-                 src="org.apache.cocoon.selection.ExceptionSelector">
-     <exception name="syntax" class="net.sourceforge.chaperon.process.ParseException"/>
-     <exception class="java.lang.Throwable" unroll="true"/>
-   </map:selector>
-  </map:selectors>
-
- </map:components>
-
-<!-- =========================== Views =================================== -->
-
- <map:views>
-  <map:view from-label="content" name="content">
-   <map:serialize type="xml"/>
-  </map:view>
-
-  <map:view from-label="ast" name="ast">
-   <map:serialize type="xml"/>
-  </map:view>
-  
-  <map:view from-label="xdoc" name="xdoc">
-   <map:serialize type="xml"/>
-  </map:view>
-  
-  <map:view from-position="last" name="links">
-   <map:serialize type="links"/>
-  </map:view>
-
- </map:views>
-
-<!-- =========================== Flow =================================== -->
-
- <map:flow language="javascript">
-  <map:script src="misc/wiki.js"/>
- </map:flow>
-
-<!-- =========================== Pipelines ================================= -->
-
- <map:pipelines>
-
-  <map:pipeline type="caching" internal-only="true">
-   <!-- Hint: During development you could expose this pipeline, to help
-     with writing your grammars. Use a text grammar myapp.grm and request
-     the myapp.xlex and myapp.xgrm URLs and then view source.
-   -->
-   <map:match pattern="*.xlex">
-    <map:generate  type="text"   src="grammars/{1}.grm"/>
-    <map:transform type="lexer"  src="grammars/grm.xlex"/>
-    <map:transform type="parser" src="grammars/grm.xgrm"/>
-    <map:transform               src="stylesheets/text4regex.xsl"/>
-    <map:transform type="lexer"  src="grammars/regex.xlex"/>
-    <map:transform type="parser" src="grammars/regex.xgrm"/>
-    <map:transform               src="stylesheets/grm2xlex.xsl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="*.xgrm">
-    <map:generate  type="text"   src="grammars/{1}.grm"/>
-    <map:transform type="lexer"  src="grammars/grm.xlex"/>
-    <map:transform type="parser" src="grammars/grm.xgrm"/>
-    <map:transform               src="stylesheets/text4regex.xsl"/>
-    <map:transform type="lexer"  src="grammars/regex.xlex"/>
-    <map:transform type="parser" src="grammars/regex.xgrm"/>
-    <map:transform               src="stylesheets/grm2xgrm.xsl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="*.xegrm">
-    <map:generate  type="text"   src="grammars/{1}.egrm"/>
-    <map:transform type="extparser" src="grammars/egrm.xegrm"/>
-    <map:transform               src="stylesheets/egrm2xegrm.xsl"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-   <map:match pattern="wiki/*.html">
-    <map:generate  type="jx"      src="misc/{1}.xml" />
-    <map:transform type="lexer"   src="cocoon:/wiki.xlex"/>
-    <map:transform type="parser"  src="cocoon:/wiki.xgrm"         label="ast">
-     <map:parameter name="failsafe" value="true"/>
-    </map:transform>
-    <map:transform                src="stylesheets/error4wiki.xsl"/>
-    <map:transform type="lexer"   src="grammars/error.xlex"/>
-    <map:transform                src="stylesheets/error2page.xsl"/>
-    <map:transform                src="stylesheets/wiki2xdoc.xsl" label="xdoc"/>
-    <map:transform                src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:match pattern="wiki/source.xml">
-    <map:generate  type="jx"      src="misc/source.xml" />
-    <map:transform type="lexer"   src="cocoon:/wiki.xlex"/>
-    <map:transform type="parser"  src="cocoon:/wiki.xgrm"         label="ast"/>
-    <map:transform                src="stylesheets/wiki2xdoc.xsl" label="xdoc"/>
-    <map:serialize type="xml"/>
-   </map:match>
-
-  </map:pipeline>
-
-  <map:pipeline type="caching"> 
-
-   <map:match pattern="">
-    <map:redirect-to uri="welcome"/>
-   </map:match>
-   
-   <map:match pattern="welcome">
-    <map:generate                src="misc/samples.xml"/>
-    <map:transform src="servlet:style-default:/common/style/xsl/html/simple-samples2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize/>
-   </map:match>
-
-   <map:match pattern="*.kont">
-    <map:call continuation="{1}"/>
-   </map:match>
-                                                                                        
                                                                                      
-   <map:match pattern="*.do">
-    <map:call function="{1}"/>
-   </map:match>
-
-   <map:match pattern="*.css">
-    <map:read src="misc/{1}.css"/>
-   </map:match>
-                                                                                        
                                                                                      
-   <map:match pattern="**/*.css">
-    <map:read src="misc/{2}.css"/>
-   </map:match>
-
-<!-- ========================= Chaperon ================================ -->
-   <map:match pattern="mathexp.html">
-     <map:call function="mathexp"/>
-   </map:match>
-   <map:match pattern="mathexp-view.html">
-    <map:generate type="jx" src="misc/mathexp.jx"/>
-    <map:transform type="lexer"   src="grammars/mathexp.xlex"/>
-    <map:transform type="parser"  src="grammars/mathexp.xgrm"/>
-    <map:transform                src="stylesheets/mathexp2html.xsl"/>
-    <map:transform                src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:match pattern="quote*.html">
-    <map:generate  type="text"    src="misc/quote{1}.txt"/>
-    <map:transform type="lexer"   src="cocoon:/quote.xlex"/>
-    <map:transform type="parser"  src="cocoon:/quote.xgrm" label="ast"/>
-    <map:transform                src="stylesheets/quote2page.xsl"/>
-    <map:transform                src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:match pattern="pattern.html">
-    <map:generate                 src="misc/patterntext.xml"/>
-    <map:transform type="pattern" src="grammars/link.xlex"/>
-    <map:transform                src="stylesheets/pattern2link.xsl"/>
-    <map:transform                src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:match pattern="**/*.java.html">
-    <map:generate  type="text"    src="http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/java/{1}/{2}.java"/>
-    <map:transform type="lexer"   src="grammars/java.xlex"/>
-    <map:transform                src="stylesheets/text4javadoc.xsl"/>
-    <map:transform type="lexer"   src="grammars/javadoc.xlex" label="ast"/>
-    <map:transform                src="stylesheets/java2html.xsl">
-     <map:parameter name="package" value="{1}"/>
-     <map:parameter name="class"   value="{2}"/>
-    </map:transform>
-    <map:transform src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:match pattern="**/*.class.html">
-    <map:generate  type="text"    src="http://cvs.apache.org/viewcvs.cgi/*checkout*/cocoon-2.1/src/java/{1}/{2}.java"/>
-    <map:transform type="lexer"   src="grammars/java.xlex"/>
-    <map:transform                src="stylesheets/remove4class.xsl"/>
-    <map:transform type="parser"  src="cocoon:/java.xgrm"/>
-    <map:transform                src="stylesheets/text4javadoc2.xsl"/>
-    <map:transform type="lexer"   src="cocoon:/javadoc.xlex"/>
-    <map:transform type="parser"  src="cocoon:/javadoc.xgrm" label="ast"/>
-    <map:transform                src="stylesheets/class2html.xsl">
-     <map:parameter name="package" value="{1}"/>
-     <map:parameter name="class"   value="{2}"/>
-    </map:transform>
-    <map:transform src="servlet:style-default:/common/style/xsl/html/complex-page2html.xsl"
/>
-    <map:transform type="servletLinkRewriter" />
-    <map:serialize type="html"/>
-   </map:match>
-
-   <map:handle-errors>
-    <map:select type="exception">
-     <map:when test="syntax">
-      <map:generate  type="exception"/>
-      <map:transform                 src="stylesheets/text4error.xsl"/>
-      <map:transform type="xinclude"/>
-      <map:transform type="lexer"    src="grammars/error.xlex"/>
-      <map:transform                 src="stylesheets/error2html.xsl">
-       <map:parameter name="contextPath" value="{request:contextPath}"/>
-      </map:transform>
-      <map:serialize type="html"/>
-     </map:when>
-    </map:select>
-   </map:handle-errors>
-                                                                                        
                                                                    
-  </map:pipeline>
+        </map:pipeline>
 
- </map:pipelines>
+    </map:pipelines>
 
 </map:sitemap>



Mime
View raw message