raw.xmap

来自「国外的一套开源CRM」· XMAP 代码 · 共 95 行

XMAP
95
字号
<?xml version="1.0"?>
<!-- ===============================================
Serves 'raw' content from files in src/documentation/content/
This allows the inclusion of binary content (*.doc, *.pdf etc) in Forrest sites.

This pipeline *relies* on the caller checking if the content actually exists!
If the caller doesn't do this, this sitemap's '**' pipeline will match everything.

Generates  :  Exact bytes read from content/**
Example URL:  http://localhost:8888/blah.doc
Used by    :  sitemap.xmap
Uses       :  content/**

$Revision: 1.10 $
==================================================== -->

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
  <map:components>
    <map:generators default="file">
      <map:generator name="html" src="org.apache.cocoon.generation.HTMLGenerator" />
    </map:generators>
    <map:serializers default="html"/>
    <map:transformers default="xslt"/>
    <map:readers default="resource"/>
    <map:matchers default="wildcard"/>
  </map:components>

  <map:pipelines>
    <map:pipeline>

      <!-- ============================================================ -->
      <!-- OUTPUT FORMATS                                               -->
      <!-- ============================================================ -->
      <map:match pattern="**">

        <map:match pattern="**.html">
          <!--
          Use this instead if you want JTidy to clean up your HTML
          <map:generate type="html" src="content/{0}" />
          <map:serialize type="html"/>
          -->
          <map:read src="content/{0}" mime-type="text/html"/>
        </map:match>

        <map:match pattern="**.xml">
          <map:generate type="file" src="content/{0}" />
          <map:serialize type="xml" />
        </map:match>

        <map:match pattern="skin/**.css">
          <map:read src="content/{1}.css" mime-type="text/css" />
        </map:match>

        <map:match pattern="**.js">
          <map:read src="content/{0}" mime-type="application/javascript" />
        </map:match>

        <map:match pattern="**.gif">
          <map:read src="content/{0}" mime-type="image/gif" />
        </map:match>

        <map:match pattern="**.png">
          <map:read src="content/{0}" mime-type="image/png" />
        </map:match>

        <map:match pattern="**.jpg">
          <map:read src="content/{0}" mime-type="image/jpeg" />
        </map:match>

        <map:match pattern="**.jpeg">
          <map:read src="content/{0}" mime-type="image/jpeg" />
        </map:match>

        <map:match pattern="**.pdf">
          <map:read src="content/{0}" mime-type="application/pdf" />
        </map:match>

        <map:match pattern="**.swf">
          <map:read src="content/{0}" mime-type="application/x-shockwave-flash" />
        </map:match>

        <map:match pattern="**.txt">
          <map:read src="content/{0}" mime-type="text/plain" />
        </map:match>

        <map:match pattern="**">
          <map:read src="content/{1}"/>
        </map:match>

      </map:match>

    </map:pipeline>
  </map:pipelines>
</map:sitemap>

⌨️ 快捷键说明

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