<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You 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.
-->
<!-- SVN $Id: sitemap.xmap 433543 2006-08-22 06:22:54Z crossley $ -->
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">

<map:pipelines>
    
  <map:pipeline>

	<map:match pattern="images/*.jpg">
    	<map:read mime-type="image/jpg" src="samplepics/{1}.jpg"/>
   	</map:match>
  </map:pipeline>
  <!--  We are using the caching uri coplet adapter caching the 
        content anyway, so no need to use pipeline caching. -->
  <map:pipeline type="noncaching">
    <!-- this is a gallery coplet -->
    <map:match pattern="browser">
        <map:generate type="directory" src="{coplet:copletData/attributes/image-dir}">
            <map:parameter name="include" value="{coplet:copletData/attributes/image-include}"/>
        </map:generate>
        <map:transform src="dir2pic.xsl">
            <map:parameter name="dirprefix" value="{coplet:copletData/attributes/image-uri-prefix}"/>
        </map:transform>
        <map:transform type="xslt" src="gallery.xsl">
            <map:parameter name="pic" value="{coplet:attributes/picture}"/>
            <map:parameter name="fullscreen" value="{coplet:aspectDatas/fullScreen}"/>
        </map:transform>
        <!-- This must be commented out if CachingURICopletAdapter is used in profiles/copletdata
             due to links that needs to be cached untranslated.
         <map:transform type="portal-coplet"/>
        -->
        <map:serialize type="xml"/>
    </map:match>
    <map:match pattern="viewer">
        <map:generate src="picture.xml"/>
        <map:transform type="xslt" src="picture.xsl">
            <map:parameter name="pic" value="{coplet:attributes/picture}"/>
            <map:parameter name="tpic" value="{coplet:temporaryAttributes/pictitle}"/>
        </map:transform>
        <map:serialize type="xml"/>
    </map:match>

  </map:pipeline>

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