You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by rg...@apache.org on 2005/06/04 01:39:48 UTC
svn commit: r179910 - in
/forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs:
locationmap.xml samples/locationmap/ samples/locationmap/index.xml
Author: rgardler
Date: Fri Jun 3 16:39:46 2005
New Revision: 179910
URL: http://svn.apache.org/viewcvs?rev=179910&view=rev
Log:
added missing samples (these are early stage, links do not lead anywhere sensible yet)
Added:
forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/locationmap.xml (with props)
forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/
forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/index.xml (with props)
Added: forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/locationmap.xml?rev=179910&view=auto
==============================================================================
--- forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/locationmap.xml (added)
+++ forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/locationmap.xml Fri Jun 3 16:39:46 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ Licensed 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.
+-->
+
+<locationmap xmlns="http://apache.org/forrest/locationmap/1.0">
+
+ <components>
+ <matchers default="lm">
+ <matcher
+ name="lm"
+ src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+ </matchers>
+ </components>
+
+ <locator>
+ <match pattern="**">
+ <location src="/somewhereelse/{1}.html" />
+ </match>
+ </locator>
+</locationmap>
Propchange: forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/locationmap.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/index.xml
URL: http://svn.apache.org/viewcvs/forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/index.xml?rev=179910&view=auto
==============================================================================
--- forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/index.xml (added)
+++ forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/index.xml Fri Jun 3 16:39:46 2005
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2002-2004 The Apache Software Foundation or its licensors,
+ as applicable.
+
+ Licensed 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.
+-->
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
+<document>
+ <header>
+ <title>Locationmaps</title>
+ </header>
+ <body>
+ <section id="overview">
+ <title>About Locationmaps</title>
+ <p>A locationmap defines a mapping from requests to location strings.</p>
+
+ <p>It was conceived to:</p>
+
+ <ul>
+ <li>Provide a more powerful means for semantic linking.</li>
+ <li>Enable Forrest with a standard configuration override mechanism.</li>
+ <li>decouple the conceptual source space used by Cocoon from
+ the concrete source space, so that a change in the concrete sources
+ does not impact on the sitemap</li>
+ </ul>
+
+ <p>The syntax of a locationmap resembles that of the sitemap in that it also makes use
+ of Matchers and Selectors to traverse a tree of nodes towards a leaf. In the case of
+ the locationmap however the leaf does not identify a pipeline but instead identifies
+ a location string.</p>
+ </section>
+
+ <section id="examples">
+ <title>Locationmap Examples</title>
+ <section>
+ <title>Link Rewriting</title>
+ <p>The locationmap can be used to rewrite URLs when the page is generated.</p>
+ <source><a href="lm:somefile">This leads somewhere else</a></source>
+ <p>Is translated to the following:</p>
+ <source><a href="lm:source/somefile.html">This leads somewhere</a></source>
+ <p>When the locationmap has:</p>
+ <source>
+<locator>
+ <match pattern="**">
+ <location src="/somewhereelse/{1}.html" />
+ </match>
+</locator>
+ </source>
+ <p>Like this: <a href="lm:somefile">This leads somewhere else</a>.</p>
+ </section>
+
+ <section>
+ <title>Generating from a Different Location</title>
+
+ <warning>This does not work yet, some experimentation still reqruied.</warning>
+
+ <p>Normally files are generated from <code>{project:content.xdocs}</code>.
+ Using the Locationmap it is possible to make these files come from elsewhere.
+ This is useful if you want to pull files from different directory structures,
+ oe even remote repositories.</p>
+
+ <p>The target of <a href="/locationmap/demo.xml">this link</a> is generated from
+ outside the normal documentation directory structure.</p>
+
+
+ </section>
+ </section>
+ </body>
+</document>
Propchange: forrest/branches/locationmap_branch/main/fresh-site/src/documentation/content/xdocs/samples/locationmap/index.xml
------------------------------------------------------------------------------
svn:eol-style = native