| <?xml version="1.0" encoding="utf-8"?> |
| <!-- |
| 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. |
| --> |
| <!-- Default Forrest locationmap for the structurer/themer --> |
| <locationmap xmlns="http://apache.org/forrest/locationmap/1.0"> |
| <components> |
| <matchers default="lm"> |
| <matcher name="lm" |
| src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher" /> |
| </matchers> |
| <actions default="RecursiveDirectoryTraversalAction"> |
| <action name="RecursiveDirectoryTraversalAction" |
| src="org.apache.forrest.dispatcher.acting.RecursiveDirectoryTraversalAction" /> |
| <action name="resourceTypeAction" |
| src="org.apache.forrest.dispatcher.acting.ResourceTypeAction" /> |
| <action logger="sitemap.action.sourcetype" name="sourcetype" |
| src="org.apache.forrest.sourcetype.SourceTypeAction"> |
| <sourcetype name="document-v10"> |
| <document-declaration public-id="-//APACHE//DTD Documentation V1.0//EN" /> |
| </sourcetype> |
| <sourcetype name="howto-v10"> |
| <document-declaration public-id="-//APACHE//DTD How-to V1.0//EN" /> |
| </sourcetype> |
| <sourcetype name="todo-v10"> |
| <document-declaration public-id="-//APACHE//DTD Todo V1.0//EN" /> |
| </sourcetype> |
| <sourcetype name="changes-v10"> |
| <document-declaration public-id="-//APACHE//DTD Changes V1.0//EN" /> |
| </sourcetype> |
| <sourcetype name="document-v11"> |
| <document-declaration public-id="-//APACHE//DTD Documentation V1.1//EN" /> |
| </sourcetype> |
| <sourcetype name="howto-v11"> |
| <document-declaration public-id="-//APACHE//DTD How-to V1.1//EN" /> |
| </sourcetype> |
| <sourcetype name="todo-v11"> |
| <document-declaration public-id="-//APACHE//DTD Todo V1.1//EN" /> |
| </sourcetype> |
| <sourcetype name="changes-v11"> |
| <document-declaration public-id="-//APACHE//DTD Changes V1.1//EN" /> |
| </sourcetype> |
| <sourcetype name="todo-v12"> |
| <document-declaration public-id="-//APACHE//DTD Todo V1.2//EN" /> |
| </sourcetype> |
| <sourcetype name="changes-v12"> |
| <document-declaration public-id="-//APACHE//DTD Changes V1.2//EN" /> |
| </sourcetype> |
| <sourcetype name="howto-v12"> |
| <document-declaration public-id="-//APACHE//DTD How-to V1.2//EN" /> |
| </sourcetype> |
| <sourcetype name="todo-v13"> |
| <document-declaration public-id="-//APACHE//DTD Todo V1.3//EN" /> |
| </sourcetype> |
| <sourcetype name="changes-v13"> |
| <document-declaration public-id="-//APACHE//DTD Changes V1.3//EN" /> |
| </sourcetype> |
| <sourcetype name="howto-v13"> |
| <document-declaration public-id="-//APACHE//DTD How-to V1.3//EN" /> |
| </sourcetype> |
| <sourcetype name="document-v20a"> |
| <document-declaration public-id="-//APACHE//DTD Documentation V2.0a//EN" /> |
| </sourcetype> |
| <sourcetype name="document-v20"> |
| <document-declaration public-id="-//APACHE//DTD Documentation V2.0//EN" /> |
| </sourcetype> |
| <sourcetype name="todo-v20"> |
| <document-declaration public-id="-//APACHE//DTD Todo V2.0//EN" /> |
| </sourcetype> |
| <sourcetype name="changes-v20"> |
| <document-declaration public-id="-//APACHE//DTD Changes V2.0//EN" /> |
| </sourcetype> |
| <sourcetype name="howto-v20"> |
| <document-declaration public-id="-//APACHE//DTD How-to V2.0//EN" /> |
| </sourcetype> |
| </action> |
| </actions> |
| <selectors default="exists"> |
| <selector name="exists" logger="sitemap.selector.exists" |
| src="org.apache.forrest.sourceexists.SourceExistsSelector" /> |
| </selectors> |
| </components> |
| <locator> |
| <!--+ |
| | Configuration of general location |
| +--> |
| <!--+ |
| | resources home |
| +--> |
| <match pattern="resources.home"> |
| <location src="{properties:resources}" /> |
| </match> |
| <!--+ |
| | Base location of the project themes |
| +--> |
| <match pattern="themer.project.dir"> |
| <location src="{lm:resources.home}themes" /> |
| </match> |
| <!--+ |
| | Base location of the project structurer |
| +--> |
| <match pattern="structurer.project.dir"> |
| <location src="{lm:resources.home}structurer" /> |
| </match> |
| <!--+ |
| | Base location for plugins |
| +--> |
| <match pattern="plugins.home"> |
| <location src="{properties:forrest.plugins}" /> |
| </match> |
| <!--+ |
| | Base location of the builded dispatcher plugin |
| +--> |
| <match pattern="dispatcher.home"> |
| <location src="{lm:plugins.home}/{properties:dispatcher.home}" /> |
| </match> |
| <!--+ |
| | Base location of the builded themer plugin |
| +--> |
| <match pattern="dispatcher.themer"> |
| <location src="{lm:dispatcher.home}/themer" /> |
| </match> |
| <!--+ |
| | Configuration of general location |
| | END |
| +--> |
| <!-- resource types --> |
| <match pattern="dispatcher.structurer.resourceType.**"> |
| <select> |
| <location src="{lm:structurer.project.dir}/resource-types/{1}{properties:dispatcher.theme-ext}" /> |
| <location src="{lm:dispatcher.themer}/structurer/resource-types/{1}{properties:dispatcher.theme-ext}" /> |
| </select> |
| </match> |
| <!-- |
| FIXME - Problem with the pattern |
| ******************************** |
| We have encountered a strange problem with the pattern 'resolve.structurer.**'. |
| The {1} sometimes matches nothing, whereas {../1} is OK. |
| On the contrary, the {../1} sometimes matches nothing, whereas {1} is OK. |
| As a temporary workaround, we put {../1}{1} which covers all the cases. |
| CF. FOR-893 |
| |
| structurer templating |
| ********************* |
| URL specific structurer templates (project-based) e.g. index.structurer.xml |
| * either in the structurer/url |
| * or in the xdocs dir [deprecated] |
| have priority *before* |
| |
| a) sourcetype based e.g. document-v20.structurer.xml |
| b) resourceTypeAction based on meta data e.g. xhtml.structurer.xml |
| (demonstrates lenya meta data integration for DOCO) |
| c) RecursiveDirectoryTraversalAction e.g. samples/common.structurer.xml |
| c1) url dir |
| c2) xdocs dir [deprecated] |
| |
| If no structurer template can be found in the project, |
| we use either the templates provided by the |
| a) custom implementation of the themes.core plugin |
| b) themes.core plugin |
| where we test for |
| 1) {properties:dispatcher.theme}{properties:dispatcher.theme-ext} |
| 2) {properties:dispatcher.fallback.theme}{properties:dispatcher.fallback.theme-ext} |
| --> |
| <match pattern="resolve.structurer.**"> |
| <select type="exists"> |
| <!-- project-based |
| url-based (url location) --> |
| <location src="{lm:structurer.project.dir}/url/{1}{properties:dispatcher.theme-ext}" /> |
| <!--<act type="sourcetype" |
| src="{properties:content.xdocs}{1}.xml"> |
| Sourcetype based |
| http://forrest.apache.org/docs/cap.html |
| <location |
| src="lm://dispatcher.structurer.resourceType.{sourcetype}" |
| /> |
| </act> |
| --> |
| <!--<act type="resourceTypeAction"> |
| <parameter value="{../1}{1}" name="request"/> |
| <parameter value="{properties:content.xdocs}" |
| name="projectDir"/> |
| <parameter value="lm://dispatcher.structurer.resourceType." |
| name="resourceTypeBase"/> |
| <parameter value=".xml.meta" name="metaExtension"/> |
| <parameter value="resourceType" name="resourceTypeElement"/> |
| <parameter |
| value="http://apache.org/cocoon/lenya/page-envelope/1.0" |
| name="resourceTypeElementNS"/> |
| Meta data based |
| <location src="{uri}" /> |
| </act> |
| --> |
| <act type="RecursiveDirectoryTraversalAction"> |
| <parameter value="{../1}{1}" name="request" /> |
| <parameter value="{properties:dispatcher.theme}" |
| name="projectFallback" /> |
| <parameter value="{properties:dispatcher.theme-ext}" |
| name="projectExtension" /> |
| <parameter value="{lm:structurer.project.dir}/url/" |
| name="projectDir" /> |
| <!-- url |
| project-based theme-based = directory-based / parent-directory based (recursively) --> |
| <location src="{uri}" /> |
| </act> |
| <!-- themes-dir: project-application-based theme-dir-based --> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.theme}{properties:dispatcher.theme-ext}" /> |
| <!-- themes-dir: project-application-based default --> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.fallback.theme}{properties:dispatcher.fallback.theme-ext}" /> |
| <!-- themer: forrest-application-based theme-based --> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.theme}{properties:dispatcher.theme-ext}" /> |
| <!-- themer: forrest-application-based default --> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}{properties:dispatcher.fallback.theme-ext}" /> |
| </select> |
| </match> |
| <!-- Structurer panels - You can group elements to a template and call it from any view. --> |
| <match pattern="resolve.panels.**"> |
| <select type="exists"> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.theme}/panels/{1}{properties:dispatcher.panel-ext}" /> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.fallback.theme}/panels/{1}{properties:dispatcher.panel-ext}" /> |
| <!-- plugin provided panels --> |
| <location src="{lm:resolvePluginPanels.{1}}" /> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.theme}/panels/{1}{properties:dispatcher.panel-ext}" /> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/panels/{1}{properties:dispatcher.panel-ext}" /> |
| </select> |
| </match> |
| <!-- Next coming from themer --> |
| <!-- Project implementation of templates have priority before default ones. |
| If no implementation can be found we use the noFt (~ - no forrest:template) implementation. |
| {1} name of the contract --> |
| <match pattern="resolve.contract.*.**"> |
| <select type="exists"> |
| <!-- project-based theme --> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.theme}/{1}/{2}{properties:dispatcher.contract-ext}" /> |
| <!-- project-based default fallback --> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.fallback.theme}/{1}/{2}{properties:dispatcher.contract-ext}" /> |
| <!-- plugin provided contracts --> |
| <location src="{lm:resolvePluginContract.{1}.{2}}" /> |
| <!-- forrest-application-based theme --> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.theme}/{1}/{2}{properties:dispatcher.contract-ext}" /> |
| <!-- forrest-application-based default fallback --> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/{1}/{2}{properties:dispatcher.contract-ext}" /> |
| <!-- forrest-application-based no found --> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/{1}/noFt{properties:dispatcher.contract-ext}" /> |
| </select> |
| </match> |
| <!-- generic match for theme image resources --> |
| <!-- |
| {1} name |
| {2} extension (note we assume e.g. {1}.gif) |
| --> |
| <match pattern="themes/images/**.*"> |
| <select type="exists"> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.theme}/images/{1}.{2}" /> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.fallback.theme}/images/{1}.{2}" /> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.theme}/images/{1}.{2}" /> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/images/{1}.{2}" /> |
| </select> |
| </match> |
| <!-- generic match for theme resources like css and js. --> |
| <!-- |
| {1} name |
| {2} extension (note we assume e.g. PATH/css/{1}.css) |
| --> |
| <match pattern="themes/**.*"> |
| <select type="exists"> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.theme}/{2}/{1}.{2}" /> |
| <location src="{lm:themer.project.dir}/{properties:dispatcher.fallback.theme}/{2}/{1}.{2}" /> |
| <!-- plugin provided contracts --> |
| <location src="{lm:resolvePluginThemes.{2}.{1}}" /> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.theme}/{2}/{1}.{2}" /> |
| <location src="{lm:dispatcher.themer}/themes/{properties:dispatcher.fallback.theme}/{2}/{1}.{2}" /> |
| </select> |
| </match> |
| <!--+ |
| | various helper xsl matches |
| +--> |
| <!-- xhtml2 to html core transformation --> |
| <match pattern="transform.xhtml2.html.structurer"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/html/xhtml2_to_html.xsl" /> |
| </match> |
| <!-- Some input need to be striped by their root element. --> |
| <match pattern="root-strip.xsl"> |
| <select type="exists"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/helper/root-strip.xsl" /> |
| </select> |
| </match> |
| <!-- dataModel --> |
| <!-- A project can to supersede the standard <format>-to-<format>.xsl file to add specific feature. |
| to include the standard in the new stylesheet, just import the standard stylesheet has follows : |
| <xsl:import href="lm://std-dataModel-xml-document-to-<format>.xsl"/> |
| or <xsl:import href="lm://std-dataModel-html-<format>-to-<format>.xsl"/> |
| --> |
| <match pattern="dataModel-xml-document-to-**.xsl"> |
| <select type="exists"> |
| <location src="{lm:resources.home}stylesheets/xslt/xml/document-to-{1}.xsl" /> |
| <location src="{lm:std-dataModel-xml-document-to-{1}.xsl}" /> |
| </select> |
| </match> |
| <match pattern="dataModel-html-**.xsl"> |
| <select type="exists"> |
| <location src="{lm:resources.home}stylesheets/xslt/html/{1}.xsl" /> |
| <location src="{lm:std-dataModel-html-{1}.xsl}" /> |
| </select> |
| </match> |
| <match pattern="std-dataModel-html-**.xsl"> |
| <select type="exists"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/html/{1}.xsl" /> |
| </select> |
| </match> |
| <match pattern="std-dataModel-xml-document-to-**.xsl"> |
| <select type="exists"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/xml/document-to-{1}.xsl" /> |
| </select> |
| </match> |
| <!-- contracts have to be striped to their stylesheet for aggregation. --> |
| <match pattern="contract-strip-xsl.xsl"> |
| <select type="exists"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/helper/contract-strip-xsl.xsl" /> |
| </select> |
| </match> |
| <match pattern="transform.book.menu"> |
| <select type="exists"> |
| <location src="{forrest:forrest.context}/skins/common/xslt/html/book-to-menu.xsl" /> |
| </select> |
| </match> |
| <match pattern="hooks-to-**.xsl"> |
| <select type="exists"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/{1}/hooksMatcher.xsl" /> |
| </select> |
| </match> |
| <match pattern="strip-dispatcher-remains-**.xsl"> |
| <select type="exists"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/{1}/strip-dispatcher-remains.xsl" /> |
| </select> |
| </match> |
| <!-- contracts (e.g. html) that can be used in the project. --> |
| <match pattern="ls.contracts.xsl"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/ls.contracts.xsl" /> |
| </match> |
| <match pattern="ls.contracts-to-document.xsl"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/ls.contracts-to-document.xsl" /> |
| </match> |
| <!-- Dispatcher has its own implementation of the following match |
| since the original has a dependency on skinconf.xml --> |
| <match pattern="transform.project.text"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/helper/project-to-text.xsl" /> |
| </match> |
| <!-- Extracts the style sheet from the contract. --> |
| <match pattern="contract-strip-xsl.xsl"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/helper/contract-strip-xsl.xsl" /> |
| </match> |
| <!-- Round corner images --> |
| <match pattern="theme.images.corner.round"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/helper/round-corner-hex.svg.xslt" /> |
| </match> |
| <match pattern="transform.xml.variable.helper"> |
| <location src="{lm:dispatcher.home}/resources/stylesheets/helper/variable.helper.xsl" /> |
| </match> |
| <match pattern="transform.xml.namespaced-svg"> |
| <location src="{forrest:forrest.stylesheets}/add-namespace-svg.xsl" /> |
| </match> |
| </locator> |
| </locationmap> |