| <?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. |
| --> |
| <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> |
| <map:components> |
| <map:generators default="file"> |
| <map:generator name="imagedirectory" |
| src="org.apache.cocoon.generation.ImageDirectoryGenerator" /> |
| <map:generator name="xpathdirectory" |
| src="org.apache.cocoon.generation.XPathDirectoryGenerator" /> |
| </map:generators> |
| <map:transformers default="xslt" /> |
| </map:components> |
| |
| <map:pipelines> |
| <map:pipeline internal-only="false"> |
| <map:match pattern="gallery/raw.xml"> |
| <map:generate type="xpathdirectory" src="{lm:project.images/gallery/}"> |
| <map:parameter name="depth" value="99"/> |
| <map:parameter name="xpath" value="/albuminfo/*"/> |
| <map:parameter name="sort" value="lastmodified"/> |
| <map:parameter name="reverse" value="true"/> |
| <map:parameter name="exclude" value="(\.svn$|\w\.thumb.jpg|\w\.small.jpg|Thumbs.db|\.DS_Store|album.xml)"/> |
| <map:parameter name="xmlFiles" value="album\.xml"/> |
| </map:generate> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| <map:match pattern="gallery/index.xml"> |
| <map:generate type="xpathdirectory" src="{lm:project.images/gallery/}"> |
| <map:parameter name="depth" value="99"/> |
| <map:parameter name="xpath" value="/albuminfo/*"/> |
| <map:parameter name="sort" value="lastmodified"/> |
| <map:parameter name="reverse" value="true"/> |
| <map:parameter name="exclude" value="(\.svn$|\w\.thumb.jpg|\w\.small.jpg|Thumbs.db|\.DS_Store)"/> |
| <map:parameter name="xmlFiles" value="\.xml$"/> |
| </map:generate> |
| <map:transform src="{lm:photoGallery.transform.dir.galleryHome}"/> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| |
| |
| <map:match pattern="gallery/**/dir.xml"> |
| <map:generate type="imagedirectory" src="{lm:project.images/gallery/{1}/}"> |
| <!-- HELP: I'd like to be able to have more dynamic image variants (e.g. thumb) |
| without having them hardcoded like the are but I suck at regex. |
| --> |
| <map:parameter name="exclude" value="(\w\.thumb.jpg|\w\.small.jpg|Thumbs.db|\.DS_Store|album.xml)"/> |
| </map:generate> |
| <map:serialize type="xml" /> |
| </map:match> |
| |
| <map:match pattern="gallery/**/index.xml"> |
| <map:generate src="cocoon://gallery/{1}/index_1.xml"/> |
| <map:serialize type="xml" /> |
| </map:match> |
| |
| <map:match pattern="gallery/**/index_*.xml"> |
| <map:aggregate element="pics"> |
| <map:part src="{lm:photoGallery.albuminfo.{1}}"/> |
| <map:part src="cocoon:/gallery/{1}/dir.xml" /> |
| <!-- <map:part src="cocoon:/gallery/{1}/comment.xml" /> --> |
| </map:aggregate> |
| <map:transform src="{lm:photoGallery.transform.dir.galleryIndexPage}"> |
| <map:parameter name="page" value="{2}" /> |
| <map:parameter name="rows" value="5" /> |
| <map:parameter name="cols" value="4" /> |
| </map:transform> |
| <map:serialize type="xml" /> |
| </map:match> |
| |
| <map:match pattern="gallery/**/pic_*.xml"> |
| <map:generate src="cocoon:/gallery/{1}/dir.xml"/> |
| <map:transform src="{lm:photoGallery.transform.dir.galleryPicture}"> |
| <map:parameter name="pos" value="{2}" /> |
| <map:parameter name="big" value="0" /> |
| </map:transform> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| <map:match pattern="gallery/**/fullPic_*.xml"> |
| <map:generate src="cocoon:/gallery/{1}/dir.xml"/> |
| <map:transform src="{lm:photoGallery.transform.dir.galleryPicture}"> |
| <map:parameter name="pos" value="{2}" /> |
| <map:parameter name="big" value="1" /> |
| </map:transform> |
| <map:serialize type="xml"/> |
| </map:match> |
| |
| </map:pipeline> |
| </map:pipelines> |
| |
| </map:sitemap> |