cziegeler 2002/07/02 06:37:57 Modified: src/webapp/samples sitemap.xmap Log: Adding old root sitemap to samples sitemap Revision Changes Path 1.8 +841 -2 xml-cocoon2/src/webapp/samples/sitemap.xmap Index: sitemap.xmap =================================================================== RCS file: /home/cvs/xml-cocoon2/src/webapp/samples/sitemap.xmap,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- sitemap.xmap 1 Jul 2002 18:57:46 -0000 1.7 +++ sitemap.xmap 2 Jul 2002 13:37:57 -0000 1.8 @@ -1,10 +1,56 @@ -<?xml version="1.0"?> - +<?xml version="1.0" encoding="UTF-8"?> <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> +<!-- + This is the 'heart' of Cocoon. The sitemap maps URI space to + resources. It consists basicly of two parts: components and + pipelines. Pipelines are made out of components. There is such a + vast number of components available that it would be impossible to + describe them here, please refer to the accompanying + documentation. For specific components, have a look also at the + javadocs for them. Most pipelines are present to demonstrate some + feature or technique, often they are explained in more detail in + the accompanying documentation. + + There are some other, less important parts that deal with + resources, views and action sets. For now, ignore them. +--> + + + <!-- =========================== Components ================================ --> <map:components> +<!-- + All pipelines consist at least of two components: a generator, that + produces the content and a serialiser, that delivers the content to + the client. + + More precisely: a generator generates SAX events and a serializer + consumes these events and produces a character stream. + + Some things to note here: each generator has a unique name, this + name is mapped to a java class, one name is declared as default + generator. In addition each generator may have additional + configurations as child elements. + + Additional attributes are targeted at the component manager. The optional + "label" attribute is relevant for the view concept below. The optional + "logger" attribute defines the logging category where messages produced + by a component should go. If there's no "logger" attribute, the category + used is the one defined for the "sitemap" component in cocoon.xconf. + + We have chosen in this example sitemap to use a different logging category + for each component, which allows fine-grained classification of log + messages. But you are free to use any category you want. + + It is possible to have the same java class declared as different + generators by using different names. No configuration options are + shared between these instances, however. + + All components follow this schema. + +--> <map:matchers default="wildcard"/> <map:selectors default="browser"/> <!-- <map:actions/> --> @@ -13,6 +59,25 @@ <map:transformers default="xslt"/> <map:readers default="resource"/> <map:serializers default="html"/> +<!-- + Actions are executed during pipeline setup. Their purpose is to + execute some arbitrary complex code. They are the work horses of + pipelines. Use them to update databases, check external resources + etc. The execution may fail or complete successfully. Only if the + execution was successful, the pipeline fragment contained inside is + used within the pipeline. Related concepts are matchers and + selectors. + + Since this is important, let me repeat it: Actions are executed + during pipeline setup. +--> + <map:actions> + <map:action logger="sitemap.action.add-employee" name="add-employee" src="org.apache.cocoon.acting.DatabaseAddAction"/> + + <map:action logger="sitemap.action.del-employee" name="del-employee" src="org.apache.cocoon.acting.DatabaseDeleteAction"/> + + <map:action logger="sitemap.action.upd-employee" name="upd-employee" src="org.apache.cocoon.acting.DatabaseUpdateAction"/> + </map:actions> </map:components> @@ -38,9 +103,131 @@ </map:views> +<!-- =========================== Resources ================================= --> + +<!-- + Resources are pipeline fragments that may be used from different + pipeline fragments. For our needs, they behave exactly like + pipelines, only that they are not accessible from outside. + Hence I will explain what's inside below for pipelines. +--> + + <map:resources> + <map:resource name="slides"> + <map:generate src="docs/samples/slides/slides.xml"/> + <map:transform src="stylesheets/slides/slides-navigation.xsl"> + <map:parameter name="use-request-parameters" value="true"/> + <map:parameter name="use-browser-capabilities-db" value="true"/> + </map:transform> + <map:transform src="stylesheets/slides/slides-apachecon.xsl"/> + <map:serialize/> + </map:resource> + + <map:resource name="dynamic-page"> + <map:generate src="{target}.xsp" type="serverpages"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="{target}.xsp"/> + </map:transform> + <map:serialize/> + </map:resource> + + <map:resource name="dynamic-page1"> + <!-- print all current sitemap parameters to log --> + <map:act type="session-state"> + <map:parameter name="new-state" value="{../0}"/> + <!-- + use the complete string that was matched as a parameter. Compare + this with the target parameter below. There the third + sitemap parameter refers to the very same string. Verfy this + by looking at the log. This irritating effect stems from + the fact, that the above map:parameter belongs conceptually + still to the parent element while all other nested tags + are, well, nested. + --> + <map:call resource="dynamic-page"> + <map:parameter name="target" value="{../target}/state{../../../0}{../../0}"/> + </map:call> + </map:act> + </map:resource> + + <map:resource name="dynamic-page2"> + <map:act type="session-state"> + <map:parameter name="new-state" value="1"/> + <map:call resource="dynamic-page"> + <map:parameter name="target" value="{../target}1"/> + </map:call> + </map:act> + </map:resource> + + <map:resource name="simple-page"> + <map:generate src="{target}.xml" type="file"/> + <map:transform src="stylesheets/page/simple-page2html.xsl"> + <map:parameter name="view-source" value="{target}.xml"/> + </map:transform> + <map:serialize/> + </map:resource> + </map:resources> + +<!-- ========================== Action sets ================================ --> + +<!-- + Action sets group actions together. If some actions are often used + together in pipeline fragments, it's easier to group them and refer + to the group. For more info, please see the docs. +--> + + <map:action-sets> + <map:action-set name="employee"> + <map:act action="Add" type="add-employee"/> + <map:act action="Delete" type="del-employee"/> + <map:act action="Update" type="upd-employee"/> + </map:action-set> + </map:action-sets> + <!-- =========================== Pipelines ================================= --> +<!-- + Pipelines. The beef. Pipelines specify, how the processing of your + content is done. Usually, a pipeline consists of several fragments + that specify the generation, transformation, and serialization of + SAX events. + + Processing is done in two steps: + + 1) The top level elements are executed in order of appearance until + one signals success. These top level elements are usually + matchers. AFAIK other components are not supported for this. + + Other components are called depth-first to determine what + fragments make up the processing pipeline. When a component + fails, no nested components are called but the next component on + the same level. + + 2) Once it is determined which generator, which transformers and + wich serializer is used, these components are executed. During + this, the pipeline may not be changed. + + + You may have as many pipelines in your sitemap as you like. However, + it seems that the only purposes would be to specify different error + handlers. +--> + <map:pipelines> + <map:global-parameters> + <!-- Define global parameters here --> + </map:global-parameters> + <map:component-configurations> + <!-- Define component configuration here --> + </map:component-configurations> + + <!-- MyApp - minimal Cocoon Application Mount --> + <map:pipeline> + <map:match pattern="myapp/**"> + <map:mount check-reload="yes" src="myapp/" uri-prefix="myapp"/> + </map:match> + </map:pipeline> + <!-- sub-sitemap example pipeline --> <map:pipeline> <!-- Matcher: --> @@ -91,6 +278,658 @@ </map:handle-errors> </map:pipeline> + <map:pipeline id="optional"> + <!-- Utility for viewing source xml or html --> + <!-- sample use of regexp equivalent to "**.source" using wildcard + this also shows the '\{' notation to escape sitemap values substitution --> + <map:match pattern="(.*)\.s\{1}ource" type="regexp"> + <map:generate src="cocoon:/{1}"/> + <map:transform src="stylesheets/simple-xml2html.xsl"/> + <map:serialize/> + </map:match> + + <!-- Below goes entries added by Cocoon build system --> + + + <!-- XSP pages written in Javascript --> + <map:match pattern="xsp-js/*"> + <map:generate src="docs/samples/xsp-js/{1}.xsp" type="serverpages"> + <map:parameter name="programming-language" value="js"/> + </map:generate> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="docs/samples/xsp-js/{1}.xsp"/> + </map:transform> + <map:serialize/> + </map:match> + + + <!-- ======================= XML:DB ============================== --> + <map:match pattern="xmldb/**"> + <map:match pattern="xpath" type="request-parameter"> + <map:generate src="xmldb:xindice://localhost:4080/db/{../1}#{1}"/> + <map:serialize type="xml"/> + </map:match> + + <map:generate src="xmldb:xindice://localhost:4080/db/{1}"/> + <map:serialize type="xml"/> + </map:match> +</map:pipeline> + + <!-- pipeline mounting samples sitemaps --> + <map:pipeline> + <!-- mount other sample pages --> + <map:match pattern="samples/**"> + <map:mount check-reload="yes" src="samples/" uri-prefix="samples"/> + </map:match> + </map:pipeline> + + <!-- main samples pipeline --> + <map:pipeline> + <map:match pattern=""> + <map:generate src="welcome/welcome.xhtml"/> + <map:serialize/> + </map:match> + + <map:match pattern="cocoon.gif"> + <map:read mime-type="image/gif" src="welcome/cocoon.gif"/> + </map:match> + + <map:match pattern="welcome"> + <map:generate src="docs/samples/samples.xml"/> + <!-- + The first 'real' pipeline. The default generator reads from + "docs/samples/samples.xml" and emits SAX events down the + pipeline. Here, the default generator just reads XML from a file, + parses it and generates SAX events while it does so. + --> + <!-- + <map:select> + <map:when test="wap"> + <map:transform src="stylesheets/simple-samples2html.xsl"/> + </map:when> + <map:when test="netscape"> + <map:transform src="stylesheets/simple-samples2html.xsl"/> + </map:when> + <map:otherwise> + <map:transform src="stylesheets/simple-samples2html.xsl"/> + </map:otherwise> + </map:select> + --> + <map:transform type="xslt" src="stylesheets/simple-samples2html.xsl"/> + <!-- uncomment the following if you want to use Xalan's interpreter as the XSLT processor --> + <!-- <map:transform type="xalan" src="stylesheets/simple-samples2html.xsl"/> --> + <!-- + These events are consumed by the default transformer, which + uses "stylesheets/simple-samples2html.xsl" as parameter. Since + here the default transformer is an XSLT transformer, the above + stylesheet is applied. As soon as some of the transformation's + result is determined, new SAX events are emitted down the + pipeline. + --> + <map:serialize/> + <!-- + Finally, those SAX events are consumed by the default + serializer, assembling a character stream from them which is + send to the client. + + Once a serializer is encountered when assembling the pipeline, + the setup stops and the pipeline is fired up. + --> + </map:match> + + <map:match pattern="sample-*"> + <map:generate src="docs/samples/sample-{1}.xml"/> + <map:transform src="stylesheets/simple-samples2html.xsl"/> + <map:serialize/> + </map:match> + + + + <map:match pattern="welcome-svg"> + <map:generate src="docs/samples/samples.xml"/> + <map:transform src="stylesheets/svg-samples2html.xsl"/> + <map:transform type="extractor"/> + <!-- + Here, several transformers are needed to obtain the desired + result. Note, that the above is not the default transformer but + one named "extractor". Interestingly enough, this transformer + does not need any additional configuration or input. + + If we look at it's javadocs it says: + + "[...] The transformation half of the FragmentExtractor. This + transformer sieves an incoming stream of xml with embedded SVG + images and replaces the images with an xlink locator pointing + to the image. [...]" + + So, this interacts with the fragment below, doing the actual + generating. + --> + <map:transform src="stylesheets/fragment-extractor.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="welcome-svg-images/*.png"> + <map:generate src="{1}" type="extractor"/> + <!-- + Again, citing the javadocs: + + "[...] The generation half of + FragmentExtractor. FragmentExtractor is a transformer-generator + pair which is designed to allow sitemap managers to extract + certain nodes from a SAX stream and move them into a separate + pipeline. The main use for this is to extract inline SVG images + and serve them up through a separate pipeline, usually + serializing them to PNG or JPEG format first. [...]" + --> + <map:serialize type="svg2png"/> + </map:match> + + + + + <!-- ================ Hello =========================== --> + + <map:match pattern="deli.html"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/deli_test.xsl" type="xslt"> + <map:parameter name="use-deli" value="true"/> + </map:transform> + <map:serialize type="html"/> + </map:match> + + <map:match pattern="deli.wml"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/deli_test.xsl" type="xslt"> + <map:parameter name="use-deli" value="true"/> + </map:transform> + <map:serialize type="wml"/> + </map:match> + + <map:match pattern="hello.html"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/page/simple-page2html.xsl"/> + <map:serialize type="html"/> + </map:match> + + <map:match pattern="hello.wml"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/page/simple-page2wml.xsl"/> + <map:serialize type="wml"/> + </map:match> + + <map:match pattern="hello.vml"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/page/simple-page2vml.xsl"/> + <map:serialize type="xml"/> + </map:match> + + <map:match pattern="hello.svg"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/page/simple-page2svg.xsl"/> + <map:serialize type="svg2jpeg"/> + </map:match> + + <map:match pattern="hello.wrl"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/page/simple-page2vrml.xsl"/> + <map:serialize type="vrml"/> + </map:match> + + <map:match pattern="hello.pdf"> + <map:generate src="docs/samples/hello-page.xml"/> + <map:transform src="stylesheets/page/simple-page2fo.xsl"/> + <map:serialize type="fo2pdf"/> + </map:match> + + <map:match pattern="redirect"> + <map:act type="request"> + <map:parameter name="parameters" value="true"/> + + <map:redirect-to uri="{dest}"/> + </map:act> + </map:match> + + <!-- ================ Sites =========================== --> + + <map:match pattern="sites/*.apache.org"> + <map:generate src="docs/samples/sites/{1}_apache_org.xml"/> + <map:transform src="stylesheets/sites/{1}_apache_org-html.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="sites/images/*.gif"> + <map:read mime-type="image/gif" src="resources/images/{1}.gif"/> + </map:match> + + <!-- ================ NEWS =========================== --> + + <map:match pattern="news/slashdot.xml"> + <map:generate src="http://slashdot.org/slashdot.xml"/> + <map:transform src="stylesheets/news/slashdot.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="news/**.gif"> + <map:read mime-type="image/gif" src="http://images.slashdot.org/topics/{1}.gif"/> + </map:match> + + <map:match pattern="news/**.jpg"> + <map:read mime-type="image/jpg" src="http://images.slashdot.org/topics/{1}.jpg"/> + </map:match> + + <map:match pattern="news/moreover.xml"> + <map:generate src="http://www.moreover.com/cgi-local/page?o=xml&c=Developer%20news"/> + <map:transform src="stylesheets/news/moreover.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="news/xmlhack.xml"> + <map:generate src="http://www.xmlhack.com/cdf.cdf"/> + <map:transform src="stylesheets/news/xmlhack.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="news/aggregate.xml"> + <map:aggregate element="page" ns="http://foo.bar.com/myspace"> + <!-- + Aggregation is a very powerful concept that allows a document + be generated from several other documents. Strictly speaking, + all parts are just concatenated in this order to a new + document. + + Several things to note here: + + "cocoon:" is a pseudo protocol and refers to another + pipeline. "cocoon:/" refers to a pipeline from the current + sitemap while "cocoon://" refers to a pipeline from the root + sitemap. + + Other pseudo protocols exist: + + "context:" is another pseudo protocol, "context://" is + refering to a resource using the servlet context. + + "resource:" is yet another pseudo protocol, "resource://" is + refering to a resource from the context classloader. + + These pseudo protocols are declared in cocoon.xconf + + Thus the parts refer to the pipeline fragments above. + + The element attribute places the content in a new root element + named as specified, using the namespace provided by the ns + attribute. + + Please see docs for further explanations. + --> + <map:part element="news" ns="http://foo.bar.com/slashdot" src="cocoon:/news/slashdot.xml"/> + <map:part element="news" ns="http://foo.bar.com/moreover" src="cocoon:/news/moreover.xml"/> + <map:part element="news" ns="http://foo.bar.com/xmlhack" src="cocoon:/news/xmlhack.xml"/> + </map:aggregate> + <map:transform src="stylesheets/news/news.xsl"/> + <map:serialize/> + </map:match> + + <!-- Aggregation using CInclude transformer --> + <map:match pattern="news/aggregate"> + <map:generate src="docs/samples/xsp/aggregate.xsp" type="serverpages"/> + <map:transform type="cinclude"/> + <map:transform src="stylesheets/news/news.xsl"/> + <map:serialize/> + </map:match> + + <!-- ============== Catalog ========================== --> + + <map:match pattern="**/samples/catalog-demo"> + <map:generate src="docs/samples/catalog/test.xml"/> + <map:transform src="docs/samples/catalog/style.xsl"/> + <map:serialize type="html"/> + </map:match> + + <map:match pattern="catalog-demo"> + <map:generate src="docs/samples/catalog/test.xml"/> + <map:transform src="docs/samples/catalog/style.xsl"/> + <map:serialize type="html"/> + </map:match> + + <map:match pattern="sdocbook-demo"> + <map:generate src="docs/samples/catalog/article.xml"/> + <map:transform src="docs/samples/catalog/sdocbook2body.xsl"/> + <map:serialize type="html"/> + </map:match> + + <!-- ================ Static =========================== --> + + <map:match pattern="fo"> + <map:generate src="docs/samples/fo/readme.fo"/> + <map:serialize type="fo2pdf"/> + </map:match> + + <map:match pattern="svg"> + <map:generate src="docs/samples/svg/henryV.svg"/> + <map:serialize type="svg2png"/> + </map:match> + + <map:match pattern="scripts/*"> + <map:generate src="docs/samples/scripts/{1}" type="script"/> + <map:transform src="stylesheets/page/simple-page2html.xsl"/> + <map:serialize type="html"/> + </map:match> + + <map:match pattern="templates/*"> + <map:generate src="templates/{1}" type="velocity"> + <map:parameter name="name" value="Velocity"/> + <map:parameter name="project" value="Cocoon"/> + </map:generate> + <map:transform src="stylesheets/page/simple-page2html.xsl"/> + <map:serialize type="html"/> + </map:match> + + <map:match pattern="slides/slides"> + <map:call resource="slides"/> + <!-- + To include common pipeline fragments in a pipeline they can be + defined in a resource. Such a resource can be called from + anywhere in your pipeline. Note that this is conceptionally + more like a "goto" because it will never return. + --> + </map:match> + + <map:match pattern="slides/"> + <map:call resource="slides"/> + </map:match> + + <map:match pattern="slides/style"> + <map:read mime-type="text/css" src="resources/styles/slides-apachecon.css"/> + </map:match> + + <map:match pattern="style"> + <map:read mime-type="text/css" src="resources/styles/slides-apachecon.css"/> + </map:match> + + <map:match pattern="slides/**.gif"> + <map:read mime-type="image/gif" src="docs/samples/{1}.gif"/> + </map:match> + + <map:match pattern="slides/**.jpg"> + <map:read mime-type="image/jpg" src="docs/samples/{1}.jpg"/> + </map:match> + + <map:match pattern="slides/**.png"> + <map:read mime-type="image/png" src="docs/samples/{1}.png"/> + </map:match> + + <!-- =========================== Dynamic ================================ --> + <map:match pattern="xsp/*"> + <map:generate src="docs/samples/xsp/{1}.xsp" type="serverpages"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="docs/samples/xsp/{1}.xsp"/> + <!-- + Run-time configuration is done through these + <map:parameter/> elements. Again, let's have a look at the + javadocs: + + "[...] All <map:parameter> declarations will be made + available in the XSLT stylesheet as xsl:variables. [...]" + --> + </map:transform> + <map:serialize/> + </map:match> + + <map:match pattern="xsp-plain/*"> + <map:generate src="docs/samples/xsp/{1}.xsp" type="serverpages"/> + <map:serialize/> + </map:match> + + <map:match pattern="sql/*"> + <map:generate src="docs/samples/sql/{1}.xml"/> + <map:transform type="sql"> + <map:parameter name="use-connection" value="personnel"/> + <!-- + Let's have a look at the user docs: + + "[...] The purpose of the SQLTransformer is to query a + database and translate the result to XML. [...]" + --> + </map:transform> + <map:transform src="stylesheets/simple-sql2html.xsl"/> + <map:serialize/> + </map:match> + + <!-- ========================== Forms ================================= --> + <map:match pattern="forms/employee"> + <map:act set="employee"> + <map:parameter name="descriptor" value="docs/samples/forms/employee.xml"/> + <!-- + Here an action is used. To be precise: all actions that were + grouped together to a set named "employee". See user docs on + actions for more on this. + + This fragment until the closing tag of map:act is only + included if at least one action of this set completes + successfully. + --> + <map:generate src="docs/samples/forms/employee.xsp" type="serverpages"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="docs/samples/forms/employee.xsp"/> + </map:transform> + <map:serialize/> + </map:act> + </map:match> + + <map:match pattern="forms/*"> + <map:generate src="docs/samples/forms/{1}.xsp" type="serverpages"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="docs/samples/forms/{1}.xsp"/> + </map:transform> + <map:serialize/> + </map:match> + + <!-- ======================= FormValidation ============================= --> + + <map:match pattern="formvalidation/test"> + <map:act type="form-validator"> + <map:parameter name="descriptor" value="docs/samples/formvalidation/descriptor.xml"/> + <map:parameter name="validate-set" value="car-reservation"/> + <map:call resource="dynamic-page"> + <map:parameter name="target" value="docs/samples/formvalidation/OK"/> + </map:call> + </map:act> + <map:call resource="dynamic-page"> + <map:parameter name="target" value="docs/samples/formvalidation/ERROR"/> + </map:call> + </map:match> + + <!-- ========================== session state ================================= --> + + <map:match pattern="session-state/example"> + <!-- + This example like the next one show, that matches can be + nested and don't need to match on URIs alone. By using a + session attribute or the referer header for matches it is + easy to model a state machine with the sitemap. + + There are user documents on this. + --> + <map:act type="session-isvalid"> + <!-- if session is valid ... --> + + <map:match pattern="1" type="sessionstate"> + <!-- if a specific session attribute matches pattern "1" --> + <map:match pattern="1" type="next-page"> + <map:call resource="dynamic-page1"> + <map:parameter name="target" value="docs/samples/session-state"/> + </map:call> + <!-- by calling this resource, the rest of this fragment here is irrelevant --> + </map:match> + <map:match pattern="2" type="next-page"> + <map:call resource="dynamic-page1"> + <map:parameter name="target" value="docs/samples/session-state"/> + </map:call> + </map:match> + </map:match> + + <map:match pattern="2" type="sessionstate"> + <map:match pattern="1" type="next-page"> + <map:call resource="dynamic-page1"> + <map:parameter name="target" value="docs/samples/session-state"/> + </map:call> + </map:match> + <map:match pattern="2" type="next-page"> + <map:call resource="dynamic-page1"> + <map:parameter name="target" value="docs/samples/session-state"/> + </map:call> + </map:match> + </map:match> + + <map:call resource="dynamic-page2"> + <map:parameter name="target" value="docs/samples/session-state/state0"/> + </map:call> + </map:act> + <!-- end if session is valid --> + + <map:call resource="dynamic-page"> + <map:parameter name="target" value="docs/samples/session-state/start"/> + </map:call> + </map:match> + + <!-- ========================== referer ================================= --> + + <map:match pattern="referer/*"> + <map:match pattern="http://*/cocoon/referer/a" type="referer-match"> + <map:call resource="simple-page"> + <map:parameter name="target" value="docs/samples/referer/a/{../1}"/> + </map:call> + </map:match> + <map:match pattern="http://*/cocoon/referer/b" type="referer-match"> + <map:call resource="simple-page"> + <map:parameter name="target" value="docs/samples/referer/b/{../1}"/> + </map:call> + </map:match> + + <map:call resource="simple-page"> + <map:parameter name="target" value="docs/samples/referer/a/a"/> + </map:call> + </map:match> + + <!-- ========================== Stream ================================= --> + <map:match pattern="request1"> + <map:generate type="stream"> + <map:parameter name="form-name" value="Foo"/> + </map:generate> + <map:serialize type="xml"/> + </map:match> + + <map:match pattern="Order"> + <map:generate src="docs/samples/stream/OrderPage.xml"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"/> + <map:serialize type="html"/> + </map:match> + + <!-- ========================== XSP Sources ============================== --> + <map:match pattern="view-source/*"> + <map:read mime-type="text/plain" src="docs/samples/slides/{1}"/> + </map:match> + + <map:match pattern="view-source"> + <map:generate src="docs/samples/slides/view-source.xsp" type="serverpages"/> + <map:serialize/> + </map:match> + + <map:match pattern="view-xsource"> + <map:generate src="docs/samples/slides/view-source.xsp" type="serverpages"/> + <map:serialize type="xml"/> + </map:match> + + <!-- ========================== SOAP ============================== --> + <map:match pattern="soap/*"> + <map:generate src="docs/samples/soap/{1}.xml" type="serverpages"/> + <map:serialize type="xml"/> + </map:match> + + <!-- ======================== XScript Samples ========================= --> + <map:match pattern="xscript/soap-getquote1"> + <map:generate src="docs/samples/xscript/soap-getquote1.xsp" type="serverpages"/> + <map:transform src="docs/samples/xscript/soap-getquote1.xsl"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="docs/samples/xscript/soap-getquote1.xsp"/> + </map:transform> + <map:serialize/> + </map:match> + + <map:match pattern="xscript/*"> + <map:generate src="docs/samples/xscript/{1}.xsp" type="serverpages"/> + <map:transform src="stylesheets/dynamic-page2html.xsl"> + <map:parameter name="view-source" value="docs/samples/xscript/{1}.xsp"/> + </map:transform> + <map:serialize/> + </map:match> + + <!-- ========================== Tidy Samples ============================== --> + + <map:match pattern="yahoo"> + <map:generate src="http://www.yahoo.com" type="html"> + <map:parameter name="xpath" value="/html/body/center/table[1]/tr[1]/td[1]/table[position()=last()]"/> + </map:generate> + <map:transform src="stylesheets/news/news.xsl"/> + <map:serialize type="html"/> + </map:match> + + <!-- ========================= Server ================================ --> + <map:match pattern="legacyProfiles/**.rdf"> + <map:read mime-type="text/rdf" src="resources/legacyProfiles/{1}.rdf"/> + </map:match> + + <map:match pattern="request"> + <map:generate type="request"/> + <map:serialize type="xml"/> + </map:match> + + <map:match pattern="generror"> + <map:generate src="docs/samples/error-giving-page.xml"/> + <map:transform src="stylesheets/simple-samples2html.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="status"> + <map:generate src="status" type="status"/> + <map:transform src="welcome/status2html.xsl"/> + <map:serialize/> + </map:match> + + <map:match pattern="sites/styles/**.css"> + <map:read mime-type="text/css" src="resources/styles/{1}.css"/> + </map:match> + + <map:match pattern="**favicon.ico"> + <map:read mime-type="application/ico" src="resources/icons/cocoon.ico"/> + </map:match> + + <map:match pattern="images/**.gif"> + <map:read mime-type="image/gif" src="resources/images/{1}.gif"/> + </map:match> + + <map:match pattern="images/**.jpg"> + <map:read mime-type="image/jpg" src="resources/images/{1}.jpg"/> + </map:match> + + <map:match pattern="images/**.png"> + <map:read mime-type="image/png" src="resources/images/{1}.png"/> + </map:match> + + <map:match pattern="**/"> + <map:generate src="{1}" type="directory"/> + <map:transform src="stylesheets/system/directory2html.xsl"/> + <map:serialize/> + </map:match> + + <map:handle-errors> + <map:transform src="context://stylesheets/system/error2html.xsl"/> + <map:serialize status-code="500"/> + </map:handle-errors> + + </map:pipeline> <map:pipeline> <map:match pattern="">
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]