sitemap.xmap

来自「Hippo CMS是一个以信息为中心的开源内容管理系统。Hippo CMS目标是」· XMAP 代码 · 共 618 行 · 第 1/2 页

XMAP
618
字号
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Copyright 2001-2008 Hippo (www.hippo.nl)

  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:components>
    <map:generators default="file">
      <map:generator
        label="content"
        logger="sitemap.generator.profiling"
        name="profiling"
        pool-grow="4"
        pool-max="32"
        pool-min="4"
        src="nl.hippo.cocoon.profiling.ProfilingGenerator"/>
    </map:generators>
    <map:selectors default="parameter">
      <map:selector name="resource-exists"
               logger="sitemap.selector.resource-exists"
               src="org.apache.cocoon.selection.ResourceExistsSelector"/>
      <map:selector name="simple" src="org.apache.cocoon.selection.SimpleSelector"/>
    </map:selectors>   
    <map:serializers default="xml"/>
    <map:transformers default="xslt">
      <map:transformer name="stripnamespaces" src="org.apache.cocoon.transformation.StripNameSpacesTransformer"/>
      <map:transformer name="i18n" src="org.apache.cocoon.transformation.I18nTransformer" logger="sitemap.transformer.inter">
        <catalogues default="types">
          <catalogue id="types" name="messages" location="cocoon:/I18N/{flow-attr:doctype}"/>
          <catalogue id="CFormsEditor" name="CFormsEditor">
            <location>cocoon://extensions/translations</location>
            <location>cocoon-cform-xmleditor/messages</location>
          </catalogue>
        	<catalogue id="messages" name="messages">
        		<location>cocoon://extensions/translations</location>
        		<location>../translations</location>
        	</catalogue>
          <catalogue id="other" name="OtherMessages" location="../../cforms/messages"/>
          <catalogue id="forms" name="FormsMessages" location="../../cforms/messages"/>
        </catalogues>
        <cache-at-startup>false</cache-at-startup>
      </map:transformer>
    </map:transformers>
  </map:components>
    
  <!-- ========================== Flowscript ================================= -->
  <map:flow language="javascript">
    <map:script src="flow/flow.js"/>    
    <map:script src="cocoon-cform-xmleditor/flow/editorHelper.js"/>    
    <map:script src="flow/HippoForm.js"/>    
    <map:script src="flow/RepositoryTarget.js"/>    
    <map:script src="flow/FormResultHandler.js"/>    
    <map:script src="cocoon-cform-xmleditor/flow/common-forms.js"/>
    <map:script src="site://workflow/workflow.js"/>
  </map:flow>

  <!-- ========================== Views ================================= -->
  
  <map:views>
    <map:view name="pre-styling" from-label="pre-styling">
      <map:serialize type="xml"/>
    </map:view>
    <map:view name="form-input" from-label="form-input">
      <map:serialize type="xml"/>
    </map:view>
  </map:views>
  
  <!-- ========================== Pipelines ================================== -->
  <map:pipelines>
    
    <map:pipeline type="noncaching" internal-only="false">      
      <!--+
        |
        | No caching necessary for filesystem sources because of expires for readers
        |
        + -->

      <!-- usable for default configuration -->
      <map:match pattern="HtmlCleanerConfiguration.xml">
        <map:read src="resources/HtmlCleanerConfiguration.xml" mime-type="text/xml"/>
      </map:match>

      <!-- load js file by filename -->
      <map:match pattern="js/*.js">
        <map:read src="resources/js/{1}.js" mime-type="text/javascript"/>
      </map:match>
      
      <!-- load js file by filename -->
      <map:match pattern="workbench/*.js">
        <map:read src="workbench/{1}.js" mime-type="text/javascript"/>
      </map:match>
      
      <!-- load images file by filename -->
      <map:match pattern="images/*.*">
        <map:read src="resources/images/{1}.{2}"/>
      </map:match>
      
      <!-- css -->
      <!-- load css file by filename -->
      <map:match pattern="css/**_*.css">
        <map:read src="resources/css/{1}_{2}.css" mime-type="text/css"/>
      </map:match>
      
      <!-- load css file by type + browser type -->
      <map:match pattern="css/**.css">
        <map:act type="set-header">
          <map:parameter name="Pragma" value="no-cache"/>
          <map:parameter name="Cache-Control" value="max-age=0, no-cache, must-revalidate"/>
          <map:parameter name="Expires" value="Thu, 9 Nov 1989 22:00:00 GMT"/>
        </map:act>
        <map:select type="browser">
          <map:when test="ie6">
            <map:read src="resources/css/{1}_ie6.css" mime-type="text/css"/>
          </map:when>
          <map:when test="moz">
            <map:read src="resources/css/{1}_moz.css" mime-type="text/css"/>
          </map:when>
          <map:otherwise>
            <map:read src="resources/css/{1}_ie6.css" mime-type="text/css"/>            
          </map:otherwise>
        </map:select>            
      </map:match>
      
      <map:match pattern="perspective.html">
        <map:generate src="sitemap.xmap"/>
        <map:transform src="transformers/perspective.xsl">
        </map:transform>
        <map:serialize type="html"/>
      </map:match>
      
    </map:pipeline>
    



    <map:pipeline type="ecaching" internal-only="false">      

      <!--+
        |
        | ECACHEable pipelines, things that go to the repository *AND SHOULD BE CACHED*.
        |                       take extreme care not to cache any continuations!
        |
        | caching: YES, ECACHE
        | internal: NO, public
        |
        + -->
      
      <!-- load layout binaries from folder defined in types.xml -->
      <map:match pattern="layout-binaries/**">
        <map:read src="{model:/types/binaries}/{1}"/>
      </map:match>
      
      <map:match pattern="modelSource/*/*">
        <map:select type="simple">
          <map:parameter name="value" value="{model://resource[@name='{2}']/*[name()='{1}']/@default}"/>
          <map:when test="">            
            <map:generate src="{model://resource[@name='{2}']/*[name()='{1}']}"/>
          </map:when>
          <map:otherwise>
            <map:generate src="{model://resource[@name='{2}']/*[name()='{1}']/@base}/{model://resource[@name='{2}']/*[name()='{1}']/*[name() = ../@default]}"/>
          </map:otherwise>
        </map:select>
        <map:serialize/>
      </map:match>

      <map:match pattern="modelSource/*/*/*">
        <map:generate src="{model://resource[@name='{2}']/*[name()='{1}']/@base}/{model://resource[@name='{2}']/*[name()='{1}']/*[name() = '{3}']}"/>
        <map:serialize/>
      </map:match>
      
      <map:match pattern="includeSchema/**.xsd">
        <map:generate src="cocoon:/modelSource/schema/{1}"/>
        <map:transform src="site://editing/transformers/includeSchema.xsl"/>
        <map:transform type="include"/>
        <map:serialize type="xml"/>
      </map:match>
      
      <map:match pattern="schema/*">
        <map:aggregate element="root">
          <map:part element="content" src="cocoon:/includeSchema/{1}.xsd"/>
          <map:part src="cocoon-cform-xmleditor/inclusion/definitions/schema.xml"/>
        </map:aggregate>
        <map:transform src="cocoon-cform-xmleditor/inclusion/include.xsl"/>
        <map:serialize type="xml"/>
      </map:match>
      
      <map:match pattern="includeLayout/**">
        <map:generate src="cocoon:/modelSource/layout/{1}"/>
        <map:transform src="cocoon-cform-xmleditor/transformers/util/includeLayout.xsl"/>
        <map:transform type="include"/>
        <map:serialize type="xml"/>
      </map:match>
      
      <map:match pattern="layout/**">
        <map:aggregate element="root">
          <map:part element="content" src="cocoon:/includeLayout/{1}"/>
          <map:part src="cocoon-cform-xmleditor/inclusion/definitions/layout.xml"/>
        </map:aggregate>
        <map:transform src="cocoon-cform-xmleditor/macro/pre-include/layout.xsl"/>
        <map:transform src="cocoon-cform-xmleditor/inclusion/include.xsl"/>
        <map:serialize type="xml"/>
      </map:match>      

      <map:match pattern="includeBL/**">
        <map:generate src="cocoon:/modelSource/bl/{1}"/>
        <map:transform src="cocoon-cform-xmleditor/transformers/util/includeBusinessLogic.xsl"/>
        <map:transform type="include"/>
        <map:serialize type="xml"/>
      </map:match>
      
      <map:match pattern="BL/**">
        <map:aggregate element="root">
          <map:part element="content" src="cocoon:/includeBL/{1}"/>
          <map:part src="cocoon-cform-xmleditor/inclusion/definitions/business-logic.xml"/>
        </map:aggregate>
        <map:transform src="cocoon-cform-xmleditor/macro/pre-include/business-logic.xsl"/>
        <map:transform src="cocoon-cform-xmleditor/inclusion/include.xsl"/>
        <map:transform src="cocoon-cform-xmleditor/transformers/include-sources.xsl"/>
        <map:transform type="include"/>
        <map:serialize type="xml"/>
      </map:match>  
      
      <map:match pattern="datasource/*">
        <map:generate src="{request-param:source}"/>
        <map:transform src="cocoon-cform-xmleditor/transformers/{1}2selectionlist.xsl"/>
        <map:serialize type="xml"/>
      </map:match>

      <map:match pattern="datasource/*/**">
        <map:generate src="cocoon://{2}"/>
        <map:transform src="cocoon-cform-xmleditor/transformers/{1}2selectionlist.xsl"/>
        <map:serialize type="xml"/>
      </map:match>

      <map:match pattern="binding/*">
       <map:aggregate element="root">
         <map:part src="cocoon:/schema/{1}"/>
         <map:part src="cocoon:/BL/{1}"/>
         <map:part src="cocoon:/layout/{1}"/>
       </map:aggregate>
       <map:transform src="cocoon-cform-xmleditor/transformers/xsd2formbinding.xsl"/>
       <map:serialize type="xml"/>
     </map:match>
     
     <map:match pattern="i18n-transform/*/**">
       <map:generate src="{2}" type="file"/>
       <map:transform type="i18n">
         <map:parameter name="locale" value="{session-attr:locale}"/>
       </map:transform>                
       <map:serialize type="xml"/>       
     </map:match>

     <map:match pattern="model/*">
       <map:aggregate element="root">
         <map:part src="cocoon:/schema/{1}"/>
         <map:part src="cocoon:/BL/{1}"/>
         <map:part src="cocoon:/layout/{1}"/>
       </map:aggregate>
       <map:transform src="cocoon:/cocoon-cform-xmleditor/translated-transformers/xsd2formdefinition.xsl"/>
       <map:serialize type="xml"/>
     </map:match>
     
      <map:match pattern="generate-i18n-catalogue/*">
        <map:aggregate element="root">
          <map:part src="cocoon:/schema/{1}"/>
          <map:part src="cocoon:/BL/{1}"/>
          <map:part src="cocoon:/layout/{1}"/>
        </map:aggregate>
        <map:transform src="cocoon-cform-xmleditor/transformers/xsd2i18nmessages.xsl"/>
        <map:serialize type="xml"/>
      </map:match>     

      <map:match pattern="includeI18N/*/**">
        <map:select type="resource-exists">
          <map:when test="{model:/types/resources/resource[@name='{1}']/i18n}/{2}">
            <map:generate src="{model:/types/resources/resource[@name='{1}']/i18n/text()}/{2}"/>
          </map:when>
          <map:otherwise>
            <map:generate src="resources/xml/emptyI18N.xml"/>
          </map:otherwise>
        </map:select>
        <map:transform src="cocoon-cform-xmleditor/transformers/util/includeI18N.xsl">
          <map:parameter name="file" value="{2}"/>
        </map:transform>
        <map:transform type="include"/>
        <map:serialize type="xml"/>
      </map:match>
      
      <map:match pattern="I18N/*/**">
        <map:aggregate element="root">
          <map:part element="content" src="cocoon:/includeI18N/{1}/{2}"/>
          <map:part src="cocoon-cform-xmleditor/inclusion/definitions/i18n.xml"/>
        </map:aggregate>
        <map:transform src="cocoon-cform-xmleditor/inclusion/include.xsl"/>
        <map:transform type="stripnamespaces"/>
        <map:serialize type="xml"/>
      </map:match>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?