| <?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:generators default="file"> |
| <map:generator label="content,data" logger="sitemap.generator.file" name="file" pool-grow="4" pool-max="32" pool-min="8" src="org.apache.cocoon.generation.FileGenerator"/> |
| |
| <map:generator label="content,data" logger="sitemap.generator.serverpages" name="serverpages" pool-grow="2" pool-max="32" pool-min="4" src="org.apache.cocoon.generation.ServerPagesGenerator"/> |
| |
| <map:generator label="content,data" logger="sitemap.generator.directory" name="directory" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.generation.DirectoryGenerator"/> |
| |
| <map:generator label="data" logger="sitemap.generator.request" name="request" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.generation.RequestGenerator"/> |
| |
| <map:generator label="data" logger="sitemap.generator.status" name="status" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.generation.StatusGenerator"/> |
| |
| <map:generator label="content,data" logger="sitemap.generator.imagedirectory" name="imagedirectory" src="org.apache.cocoon.generation.ImageDirectoryGenerator"/> |
| |
| <map:generator label="data" logger="sitemap.generator.extractor" name="extractor" src="org.apache.cocoon.generation.FragmentExtractorGenerator"/> |
| |
| <map:generator name="parentcm" src="org.apache.cocoon.samples.parentcm.Generator"/> |
| |
| <map:generator label="content,data" name="html" src="org.apache.cocoon.generation.HTMLGenerator"/> |
| |
| <map:generator label="content,data" name="script" src="org.apache.cocoon.generation.ScriptGenerator"/> |
| |
| <map:generator label="content,data" name="velocity" src="org.apache.cocoon.generation.VelocityGenerator"/> |
| |
| <map:generator label="content,data" name="jsp" src="org.apache.cocoon.generation.JspGenerator"/> |
| <map:generator label="content,data" name="stream" src="org.apache.cocoon.generation.StreamGenerator"/> |
| </map:generators> |
| |
| <!-- |
| Transformers can be placed inside the pipeline between the generator |
| and the serializer. You may have as many transformers as you |
| like. Transformers consume SAX events and emmit SAX events. |
| |
| The "xslt" transformer is an example of a component with additional |
| configuration. |
| --> |
| <map:transformers default="xslt"> |
| <map:transformer logger="sitemap.transformer.xslt" name="xslt" pool-grow="2" pool-max="32" pool-min="8" src="org.apache.cocoon.transformation.TraxTransformer"> |
| <use-request-parameters>false</use-request-parameters> |
| <use-browser-capabilities-db>false</use-browser-capabilities-db> |
| <use-deli>false</use-deli> |
| </map:transformer> |
| |
| <map:transformer logger="sitemap.transformer.log" name="log" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.LogTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.xinclude" name="xinclude" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.XIncludeTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.cinclude" name="cinclude" pool-grow="2" pool-max="16" pool-min="2" src="org.apache.cocoon.transformation.CIncludeTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.sql" name="sql" src="org.apache.cocoon.transformation.SQLTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.extractor" name="extractor" src="org.apache.cocoon.transformation.FragmentExtractorTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.i18n" name="i18n" src="org.apache.cocoon.transformation.I18nTransformer"> |
| <catalogue-name>messages</catalogue-name> |
| <catalogue-location>translations</catalogue-location> |
| </map:transformer> |
| |
| <map:transformer logger="sitemap.transformer.filter" name="filter" src="org.apache.cocoon.transformation.FilterTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.writeDOMsession" name="writeDOMsession" src="org.apache.cocoon.transformation.WriteDOMSessionTransformer"/> |
| |
| <map:transformer logger="sitemap.transformer.readDOMsession" name="readDOMsession" src="org.apache.cocoon.transformation.ReadDOMSessionTransformer"/> |
| <map:transformer logger="sitemap.transformer.encodeURL" name="encodeURL" src="org.apache.cocoon.transformation.EncodeURLTransformer"/> |
| |
| |
| <map:transformer name="xt" src="org.apache.cocoon.transformation.XTTransformer"/> |
| |
| <map:transformer name="ldap" src="org.apache.cocoon.transformation.LDAPTransformer"/> |
| </map:transformers> |
| |
| <!-- |
| Readers are an exception to the above rule that a pipline need to |
| have exactly one generator and exactly one serializer. Readers |
| circumvent the XML oriented SAX pipeline model, think of a reader |
| being a generator and a serializer at once thus a pipeline may not |
| contain any generator, transformer or serializer in addition to a |
| reader. They are useful for delivering binary content like images. |
| --> |
| <map:readers default="resource"> |
| <map:reader logger="sitemap.reader.resource" name="resource" pool-max="32" src="org.apache.cocoon.reading.ResourceReader"/> |
| |
| <map:reader name="jsp" src="org.apache.cocoon.reading.JSPReader"/> |
| </map:readers> |
| |
| <!-- |
| Serializers consume SAX events and produce a character stream. Every |
| pipeline needs to be terminated by a serializer. |
| --> |
| <map:serializers default="html"> |
| <map:serializer logger="sitemap.serializer.links" name="links" src="org.apache.cocoon.serialization.LinkSerializer"/> |
| |
| <map:serializer logger="sitemap.serializer.xml" mime-type="text/xml" name="xml" src="org.apache.cocoon.serialization.XMLSerializer"/> |
| |
| <map:serializer logger="sitemap.serializer.html" mime-type="text/html" name="html" pool-grow="4" pool-max="32" pool-min="4" src="org.apache.cocoon.serialization.HTMLSerializer"> |
| <buffer-size>1024</buffer-size> |
| </map:serializer> |
| |
| <map:serializer logger="sitemap.serializer.vrml" mime-type="model/vrml" name="vrml" src="org.apache.cocoon.serialization.TextSerializer"/> |
| |
| <map:serializer logger="sitemap.serializer.wml" mime-type="text/vnd.wap.wml" name="wml" src="org.apache.cocoon.serialization.XMLSerializer"> |
| <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public> |
| <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system> |
| <encoding>ASCII</encoding> |
| <omit-xml-declaration>yes</omit-xml-declaration> |
| </map:serializer> |
| |
| <map:serializer logger="sitemap.serializer.svgxml" mime-type="image/svg-xml" name="svgxml" src="org.apache.cocoon.serialization.XMLSerializer"> |
| <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public> |
| <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system> |
| </map:serializer> |
| |
| <map:serializer logger="sitemap.serializer.xhtml" mime-type="text/html" name="xhtml" pool-grow="2" pool-max="64" pool-min="2" src="org.apache.cocoon.serialization.XMLSerializer"> |
| <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public> |
| <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system> |
| <encoding>UTF-8</encoding> |
| </map:serializer> |
| |
| <map:serializer logger="sitemap.serializer.text" mime-type="text/text" name="text" src="org.apache.cocoon.serialization.TextSerializer"/> |
| |
| <map:serializer mime-type="application/msword" name="fo2rtf" src="org.apache.cocoon.serialization.RTFSerializer"/> |
| |
| <map:serializer mime-type="application/pdf" name="fo2pdf" src="org.apache.cocoon.serialization.FOPSerializer"/> |
| <map:serializer mime-type="application/postscript" name="fo2ps" src="org.apache.cocoon.serialization.FOPSerializer"/> |
| <map:serializer mime-type="vnd.hp-PCL" name="fo2pcl" src="org.apache.cocoon.serialization.FOPSerializer"/> |
| |
| <map:serializer mime-type="image/jpeg" name="svg2jpeg" src="org.apache.cocoon.serialization.SVGSerializer"> |
| <parameter name="quality" type="float" value="0.9"/> |
| </map:serializer> |
| <map:serializer mime-type="image/png" name="svg2png" src="org.apache.cocoon.serialization.SVGSerializer"/> |
| </map:serializers> |
| |
| <!-- |
| Matchers are executed during pipeline setup. They decide if a |
| pipeline fragment is used within a pipeline. Usually, the decision |
| is based on a match on the requested URI but matchers exist, that |
| match different things as well. Most often the fragment contained in |
| a matcher has a generator as well as a serializer. This is not a |
| necessity, matchers can be nested while chaining does not work. |
| Related concepts are selectors and actions. |
| |
| Since this is important, let me repeat it: Matchers are executed |
| during pipeline setup. |
| --> |
| <map:matchers default="wildcard"> |
| <map:matcher logger="sitemap.matcher.wildcard" name="wildcard" src="org.apache.cocoon.matching.WildcardURIMatcher"/> |
| |
| <map:matcher logger="sitemap.matcher.regexp" name="regexp" src="org.apache.cocoon.matching.RegexpURIMatcher"/> |
| <map:matcher logger="sitemap.matcher.request-parameter" name="request-parameter" src="org.apache.cocoon.matching.RequestParameterMatcher"/> |
| |
| <map:matcher logger="sitemap.matcher.cookie" name="cookie" src="org.apache.cocoon.matching.CookieMatcher"/> |
| |
| <map:matcher logger="sitemap.matcher.header" name="header" src="org.apache.cocoon.matching.HeaderMatcher"/> |
| |
| <map:matcher logger="sitemap.matcher.parameter" name="parameter" src="org.apache.cocoon.matching.ParameterMatcher"/> |
| |
| <map:matcher logger="sitemap.matcher.sessionstate" name="sessionstate" src="org.apache.cocoon.matching.WildcardSessionAttributeMatcher"> |
| <attribute-name>org.apache.cocoon.SessionState</attribute-name> |
| </map:matcher> |
| |
| <map:matcher logger="sitemap.matcher.next-page" name="next-page" src="org.apache.cocoon.matching.WildcardRequestParameterMatcher"> |
| <parameter-name>next-state</parameter-name> |
| </map:matcher> |
| |
| <map:matcher logger="sitemap.matcher.referer-match" name="referer-match" src="org.apache.cocoon.matching.WildcardHeaderMatcher"> |
| <header-name>referer</header-name> |
| </map:matcher> |
| </map:matchers> |
| |
| <!-- |
| Selectors are executed during pipeline setup. They can be used to |
| determine which pipeline fragments should be combined. They are best |
| compared with a switch statement in java. Matchers and actions are |
| related concepts. |
| |
| Since this is important, let me repeat it: Selectors are executed |
| during pipeline setup. |
| --> |
| <map:selectors default="browser"> |
| <map:selector logger="sitemap.selector.browser" name="browser" src="org.apache.cocoon.selection.BrowserSelector"> |
| <!-- # NOTE: The appearance indicates the search order. This is very important since |
| # some words may be found in more than one browser description. (MSIE is |
| # presented as "Mozilla/4.0 (Compatible; MSIE 4.01; ...") |
| --> |
| <browser name="explorer" useragent="MSIE"/> |
| <browser name="pocketexplorer" useragent="MSPIE"/> |
| <browser name="handweb" useragent="HandHTTP"/> |
| <browser name="avantgo" useragent="AvantGo"/> |
| <browser name="imode" useragent="DoCoMo"/> |
| <browser name="opera" useragent="Opera"/> |
| <browser name="lynx" useragent="Lynx"/> |
| <browser name="java" useragent="Java"/> |
| <browser name="wap" useragent="Nokia"/> |
| <browser name="wap" useragent="UP"/> |
| <browser name="wap" useragent="Wapalizer"/> |
| <browser name="mozilla5" useragent="Mozilla/5"/> |
| <browser name="mozilla5" useragent="Netscape6/"/> |
| <browser name="netscape" useragent="Mozilla"/> |
| </map:selector> |
| |
| <map:selector logger="sitemap.selector.request-parameter" name="request-parameter" src="org.apache.cocoon.selection.RequestParameterSelector"> |
| <!-- Define now which request parameter to use; or do it later, |
| when using this selector, via "parameter-name" parameter. |
| <parameter-name>myparam</parameter-name> |
| --> |
| </map:selector> |
| |
| <map:selector logger="sitemap.selector.request-attribute" name="request-attribute" src="org.apache.cocoon.selection.RequestAttributeSelector"> |
| <!-- <attribute-name>myparam</attribute-name> --> |
| </map:selector> |
| |
| <map:selector logger="sitemap.selector.session-attribute" name="session-attribute" src="org.apache.cocoon.selection.SessionAttributeSelector"> |
| <!-- <attribute-name>myparam</attribute-name> --> |
| </map:selector> |
| |
| <map:selector logger="sitemap.selector.parameter" name="parameter" src="org.apache.cocoon.selection.ParameterSelector"/> |
| |
| <map:selector logger="sitemap.selector.header" name="header" src="org.apache.cocoon.selection.HeaderSelector"> |
| <!-- <header-name>myparam</header-name> --> |
| </map:selector> |
| |
| <map:selector logger="sitemap.selector.host" name="host" src="org.apache.cocoon.selection.HostSelector"/> |
| </map:selectors> |
| |
| <!-- |
| 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:action logger="sitemap.action.lang-select" name="lang-select" src="org.apache.cocoon.acting.LangSelect"/> |
| |
| <map:action logger="sitemap.action.locale" name="locale" src="org.apache.cocoon.acting.LocaleAction"/> |
| |
| <map:action logger="sitemap.action.request" name="request" src="org.apache.cocoon.acting.RequestParamAction"/> |
| |
| <map:action logger="sitemap.action.form-validator" name="form-validator" src="org.apache.cocoon.acting.FormValidatorAction"/> |
| |
| <map:action logger="sitemap.action.session-state" name="session-state" src="org.apache.cocoon.acting.SessionStateAction"/> |
| |
| <map:action logger="sitemap.action.session-isvalid" name="session-isvalid" src="org.apache.cocoon.acting.SessionIsValidAction"/> |
| |
| <map:action logger="sitemap.action.resource-exists" name="resource-exists" src="org.apache.cocoon.acting.ResourceExistsAction"/> |
| |
| <map:action logger="sitemap.action.set-header" name="set-header" src="org.apache.cocoon.acting.HttpHeaderAction"/> |
| |
| </map:actions> |
| </map:components> |
| |
| <!-- =========================== Views =================================== --> |
| |
| <!-- |
| Views provide diffent, well, views to resources. Views are |
| orthogonal to pipelines. Please refer to the docs. |
| --> |
| <map:views> |
| <map:view from-label="content" name="content"> |
| <map:serialize type="xml"/> |
| </map:view> |
| |
| <map:view from-label="data" name="pretty-content"> |
| <map:transform src="stylesheets/simple-xml2html.xsl"/> |
| <map:serialize type="html"/> |
| </map:view> |
| |
| <map:view from-position="last" name="links"> |
| <map:serialize type="links"/> |
| </map:view> |
| |
| </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> |
| |
| <!-- sub-sitemap example pipeline --> |
| <map:pipeline> |
| <!-- Matcher: --> |
| <map:match pattern="sub/**"> |
| <!-- |
| matches all URIs starting with "sub". Have a look at |
| the docs for this matcher component. |
| |
| "*" means, anything that does not contain a path separator, |
| i.e. slash "/", "**" means anything including path |
| separators. What is matched by the wildcard is put into sitemap |
| variables. |
| |
| Sitemap variables are organized like a stack, a new set is placed |
| on top of the already present ones. Any existing variable can be |
| accessed through a simplified path expression. These simplified |
| path expression may only use any number of "../" to refer to the |
| previous levels. |
| |
| If a component completes successfully, it sets some sitemap |
| variables. Their scope is only within the element of that |
| component. Thus they can only be accessed by nested components. |
| --> |
| |
| <!-- Mount: --> |
| <map:mount check-reload="yes" src="sub/sitemap.xmap" uri-prefix="sub"/> |
| <!-- |
| Sitemaps may be organized hierarchically. Here such a subsitemap |
| is "mounted" (think: unix filesystems) to be responsible for all |
| URIs starting with "sub/". The file itself is by |
| coincidence located in a subdirectory named "sub/" as |
| well. There's no need to do that but it is good practice. The |
| check-reload attributes specifies, if changed to the subsitemap |
| should result in cocoon rereading the subsitemap or if they are to |
| be ignored. See docs for suggestions on this. |
| |
| Note here, that all component declarations are inherited to a |
| subsitemap. |
| --> |
| </map:match> |
| |
| <map:handle-errors> |
| <!-- |
| This pipeline specifies a different error handler. |
| --> |
| <map:transform src="stylesheets/system/error2html.xsl"/> |
| <map:serialize status-code="500"/> |
| </map:handle-errors> |
| </map:pipeline> |
| |
| <!-- Cocoon documentation pipeline --> |
| <map:pipeline> |
| <map:match pattern="documents/index"> |
| <map:redirect-to uri="index.html"/> |
| <!-- |
| You may direct a client to a more appropriate URI by the above |
| command. The above results in a redirect response to the |
| client. By redirecting to a ressource it would be handled by |
| cocoon internally. |
| |
| Since pipelines work on a first match basis, the above wins the |
| request although the match below would match as well. |
| --> |
| </map:match> |
| <map:match pattern="documents/**"> |
| <map:mount check-reload="yes" src="documentation/" uri-prefix="documents"/> |
| </map:match> |
| <map:match pattern="tutorial/**"> |
| <map:mount check-reload="yes" src="tutorial/" uri-prefix="tutorial/"/> |
| </map:match> |
| </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 --> |
| |
| |
| <!-- =============== Parent Component Manager ====================== --> |
| <map:match pattern="parentcm"> |
| <map:generate src="{1}" type="parentcm"/> |
| <map:transform src="stylesheets/parentcm/time.xsl"/> |
| <map:serialize/> |
| </map:match> |
| |
| |
| <!-- Mount search pages sitemap, for using indexing & searching --> |
| <map:match pattern="search/**"> |
| <map:mount check-reload="yes" src="search/" uri-prefix="search"/> |
| </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> |
| |
| |
| <!-- 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> |
| </map:pipeline> |
| |
| <!-- "automount" setup |
| This causes directories added under "mount" |
| (even with Cocoon already running) to be activated automagically |
| if they contain a sitemap.xmap, without having to modify the main |
| sitemap.xmap |
| --> |
| <map:pipeline> |
| <map:match pattern="mount/*/**"> |
| <map:mount check-reload="yes" src="mount/{1}/" uri-prefix="mount/{1}"/> |
| <!-- |
| This is an example of using a sitemap variable: "{1}" Curly |
| brackets denote sitemap variables, here the one named "1". |
| --> |
| </map:match> |
| </map:pipeline> |
| |
| <!-- pipeline mounting samples sitemaps --> |
| <map:pipeline> |
| <!-- protected webapp example pipeline --> |
| <map:match pattern="protected/**"> |
| <map:mount check-reload="yes" src="protected/" uri-prefix="protected"/> |
| </map:match> |
| |
| <!-- i18n examples sitemap --> |
| <map:match pattern="i18n/**"> |
| <map:mount check-reload="yes" src="i18n/" uri-prefix="i18n"/> |
| </map:match> |
| |
| <!-- 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 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="jsp/*.htm"> |
| <map:read mime-type="text/html" src="/docs/samples/jsp/{1}.jsp" type="jsp"/> |
| </map:match> |
| |
| <map:match pattern="jsp/*"> |
| <map:generate src="/docs/samples/jsp/{1}.jsp" type="jsp"/> |
| <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> |
| |
| |
| <!-- ========================== 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:pipelines> |
| |
| </map:sitemap><!-- end of file --> |