<?xml version="1.0" encoding="UTF-8"?>
<!--

    The contents of this file are subject to the license and copyright
    detailed in the LICENSE and NOTICE files at the root of the source
    tree and available online at

    http://www.dspace.org/license/

-->
<!--

    themes.xmap
    Mobile theme for DSpace 1.6
    Last update by James Russell <james@ohiolink.edu>
    September 12, 2012
	
-->

<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
	<map:components>

		<map:matchers default="wildcard">
			<!--
					The ThemeMatcher matches the sitemap URI against the configured set of 
					Theme rules. The selected theme is identified by the sitemap parameters 
					{theme} and {themeName}.
					-->
			<map:matcher name="ThemeMatcher" src="org.dspace.app.xmlui.cocoon.ThemeMatcher"/>
			<map:matcher name="WildcardHostMatcher" src="org.apache.cocoon.matching.WildcardHostMatcher"/>
		</map:matchers>
		
	</map:components>


	<map:pipelines>
	
	    <!-- match the new domain and limit it to use the mobile theme -->
		<map:pipeline>
			<map:match type="WildcardHostMatcher" pattern="mobile.*">
				<map:mount uri-prefix="" src="mobile/"/>
			</map:match>

			<!--
					Theme Rules
					-->
			<map:match type="ThemeMatcher">
				<map:mount uri-prefix="" src="{theme}"/>
			</map:match>
			
			<!--
					Default Theme, if the above matcher failed then no theme rule applied to this
					url. In this case, we'll just use the Reference theme. 
					-->
			<map:match pattern="**">
				<map:mount uri-prefix="" src="Reference/"/>
			</map:match>
			
		</map:pipeline>
	</map:pipelines>
</map:sitemap>