forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r886147 [5/6] - in /forrest/trunk/whiteboard: ./ FOR-1157/ cocoon-2.2-blocks/dispatcher/ dispatcher/ plugins/org.apache.forrest.plugin.internal.dispatcher/ plugins/org.apache.forrest.plugin.internal.dispatcher/lib/ plugins/org.apache.forres...
Date Wed, 02 Dec 2009 13:58:28 GMT
Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/index.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/index.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,25 +15,24 @@
   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">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+"http://forrest.apache.org/dtd/document-v20.dtd">
 <document>
   <header>
     <title>Per Folder/File Themes</title>
   </header>
   <body>
-    <p>It is possible to customise the theme on a per folder or per file basis.</p>
-    
+    <p>It is possible to customise the theme on a per folder or per file
+    basis.</p>
     <p>To do this simply add a *.fv file in the directory that you wish to
     create an alternative theme for. The name of this file must be the same as
     the theme name you are using for your site. For example, this site uses the
     "pelt" theme and the directory containing this file contains a pelt.fv file
     that customises the theme for this file (and any others that may be in this
-    folder). In order to show this working we have simply stripped the PDF
-    link from the theme.</p>
-    
+    folder). In order to show this working we have simply stripped the PDF link
+    from the theme.</p>
     <p>For demonstration purposes we also provide a 
-    <a href="subFolder/index.html">subfolder</a> within this folder
-    that has another modified theme.</p>
+    <a href="subFolder/index.html">subfolder</a>within this folder that has
+    another modified theme.</p>
   </body>
 </document>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/subFolder/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/subFolder/index.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/subFolder/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/how/perFolderThemes/subFolder/index.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,14 +15,14 @@
   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">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+"http://forrest.apache.org/dtd/document-v20.dtd">
 <document>
   <header>
     <title>Per Folder/File Themes</title>
   </header>
   <body>
-    <p>This file has another customised theme, in this case we have stripped both
-    the pdf and the fontsize trail.</p>
+    <p>This file has another customised theme, in this case we have stripped
+    both the pdf and the fontsize trail.</p>
   </body>
 </document>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/group.svg
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/group.svg?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/group.svg (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/group.svg Wed Dec  2 13:58:18 2009
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <!--
        SVG Anteater logo
 
@@ -23,7 +22,6 @@
 xml-batik CVS module. Then have a look at the xml-batik/samples files. Use the
 SVG spec (http://www.w3.org/TR/SVG/) as a reference.
 -->
-
 <!-- See Forrest Issue: FOR-229
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"
@@ -34,15 +32,11 @@
 ]>
 -->
 <svg xmlns="http://www.w3.org/2000/svg"
-     xmlns:xlink="http://www.w3.org/1999/xlink"
-     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-     xsl:version="1.0"
-     xmlns:for="http://apache.org/forrest"
-     width="220" height="65" >
+xmlns:xlink="http://www.w3.org/1999/xlink"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0"
+xmlns:for="http://apache.org/forrest" width="220" height="65">
   <title>Anteater logo</title>
-
   <defs>
-
     <!--
     <radialGradient id="radialGradient">
       <stop style="stop-color:gold" offset="0"/>
@@ -55,27 +49,26 @@
       <stop style="stop-color:crimson" offset="1"/>
     </linearGradient>
     -->
-
     <linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
-      <stop style="stop-color:white" offset="0"/>
-      <stop style="stop-color:lightgreen" offset="1"/>
+      <stop style="stop-color:white" offset="0" />
+      <stop style="stop-color:lightgreen" offset="1" />
     </linearGradient>
-    <filter id="shadowFilter" filterUnits="objectBoundingBox" width="1.4" height="1.4">
+    <filter id="shadowFilter" filterUnits="objectBoundingBox" width="1.4"
+    height="1.4">
       <!-- Takes the alpha channel (black outline of the text), blurs it and saves as 'blur' -->
-      <feGaussianBlur in="SourceAlpha" stdDeviation="2 2" result="blur"/>
+      <feGaussianBlur in="SourceAlpha" stdDeviation="2 2" result="blur" />
       <!-- Takes saved 'blur' and offsets it by 4 pixels, saves as 'offsetBlur' -->
-      <feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
+      <feOffset in="blur" dx="4" dy="4" result="offsetBlur" />
       <!-- Merges SourceGraphic (original image) and 'offsetBlur', putting the
       former 'over' the latter, and using the merged result as the finished
       image -->
-      <feComposite in="SourceGraphic" in2="offsetBlur" operator="over"/>
+      <feComposite in="SourceGraphic" in2="offsetBlur" operator="over" />
     </filter>
-
   </defs>
-
   <g filter="url(#shadowFilter)" fill="url(#gradient)">
-    <text x="40%" y="60%" style="font-size:24pt; font-family:Verdana ; text-anchor: middle">
-    <for:group-name />
+    <text x="40%" y="60%"
+    style="font-size:24pt; font-family:Verdana ; text-anchor: middle">
+      <for:group-name />
     </text>
   </g>
 </svg>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/project.svg
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/project.svg?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/project.svg (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/images/project.svg Wed Dec  2 13:58:18 2009
@@ -15,7 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-
 <!--
        SVG Anteater logo
 
@@ -23,7 +22,6 @@
 xml-batik CVS module. Then have a look at the xml-batik/samples files. Use the
 SVG spec (http://www.w3.org/TR/SVG/) as a reference.
 -->
-
 <!-- See Forrest Issue: FOR-229
 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
 "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"
@@ -34,15 +32,11 @@
 ]>
 -->
 <svg xmlns="http://www.w3.org/2000/svg"
-     xmlns:xlink="http://www.w3.org/1999/xlink"
-     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-     xsl:version="1.0"
-     xmlns:for="http://apache.org/forrest"
-     width="420" height="65" >
+xmlns:xlink="http://www.w3.org/1999/xlink"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xsl:version="1.0"
+xmlns:for="http://apache.org/forrest" width="420" height="65">
   <title>Anteater logo</title>
-
   <defs>
-
     <!--
     <radialGradient id="radialGradient">
       <stop style="stop-color:gold" offset="0"/>
@@ -55,28 +49,26 @@
       <stop style="stop-color:crimson" offset="1"/>
     </linearGradient>
     -->
-
     <linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
-      <stop style="stop-color:white" offset="0"/>
-      <stop style="stop-color:lightgreen" offset="1"/>
+      <stop style="stop-color:white" offset="0" />
+      <stop style="stop-color:lightgreen" offset="1" />
     </linearGradient>
-
-    <filter id="shadowFilter" filterUnits="objectBoundingBox" width="1.4" height="1.4">
+    <filter id="shadowFilter" filterUnits="objectBoundingBox" width="1.4"
+    height="1.4">
       <!-- Takes the alpha channel (black outline of the text), blurs it and saves as 'blur' -->
-      <feGaussianBlur in="SourceAlpha" stdDeviation="2 2" result="blur"/>
+      <feGaussianBlur in="SourceAlpha" stdDeviation="2 2" result="blur" />
       <!-- Takes saved 'blur' and offsets it by 4 pixels, saves as 'offsetBlur' -->
-      <feOffset in="blur" dx="4" dy="4" result="offsetBlur"/>
+      <feOffset in="blur" dx="4" dy="4" result="offsetBlur" />
       <!-- Merges SourceGraphic (original image) and 'offsetBlur', putting the
       former 'over' the latter, and using the merged result as the finished
       image -->
-      <feComposite in="SourceGraphic" in2="offsetBlur" operator="over"/>
+      <feComposite in="SourceGraphic" in2="offsetBlur" operator="over" />
     </filter>
-
   </defs>
-
   <g filter="url(#shadowFilter)" fill="url(#gradient)">
-    <text x="100%" y="60%" style="font-size:24pt; font-family:Verdana ; text-anchor: end" >
-    <for:project-name />
+    <text x="100%" y="60%"
+    style="font-size:24pt; font-family:Verdana ; text-anchor: end">
+      <for:project-name />
     </text>
   </g>
 </svg>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/index.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/index.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,203 +15,172 @@
   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">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+"http://forrest.apache.org/dtd/document-v20.dtd">
 <document>
   <header>
     <title>Dispatcher (Draft - feature under development)</title>
   </header>
   <body>
-    <warning>
-      The "dispatcher" is new functionality which is still in development phase.
-      That is why it is in the "whiteboard" section of the Forrest distribution.
-      We are working at the moment on moving this plugin from the whiteboard
-      into the core plugins. Further all dispatcher related documents will be
-      moved into the plugin as well. See
-      <a 
-      href="http://forrest.apache.org/docs_0_80/status-themes.html">Status
-      of Themes: Skins and Dispatcher</a>.
-    </warning>
+    <warning>The "dispatcher" is new functionality which is still in
+    development phase. That is why it is in the "whiteboard" section of the
+    Forrest distribution. We are working at the moment on moving this plugin
+    from the whiteboard into the core plugins. Further all dispatcher related
+    documents will be moved into the plugin as well. See 
+    <a href="http://forrest.apache.org/docs_0_80/status-themes.html">Status of
+    Themes: Skins and Dispatcher</a>.</warning>
     <section id="introduction">
       <title>Introduction</title>
-      <p>
-        As stated in the Skin documentation the aim of the Forrest skins is to
-        provide many capabilities so that extra skins are not needed. Experience
-        showed that many Forrest users still decided to create a new skin
-        because the default skin did not offer the features that they wanted or
-        they "just" needed extra content in some pages. We introduced
-        skinconf.xml where the user could configure some features of skins but
-        it was up to the skin to support it and did not solve the problem to add
-        page specific extra content. That led us to develop a new concept of
-        creating skins (we called the result "themes") which would be more
-        easily extensible by a user.
-      </p>
+      <p>As stated in the Skin documentation the aim of the Forrest skins is to
+      provide many capabilities so that extra skins are not needed. Experience
+      showed that many Forrest users still decided to create a new skin because
+      the default skin did not offer the features that they wanted or they
+      "just" needed extra content in some pages. We introduced skinconf.xml
+      where the user could configure some features of skins but it was up to
+      the skin to support it and did not solve the problem to add page specific
+      extra content. That led us to develop a new concept of creating skins (we
+      called the result "themes") which would be more easily extensible by a
+      user.</p>
     </section>
     <section id="dispatcher">
       <title>Dispatcher - advanced separation of concerns</title>
-      <p>
-        The aim of the "dispatcher" concept is to provide a flexible framework
-        for creating site and page specific layout in different formats from
-        different content through an advanced seperation of concerns.
-      </p>
-      <p>
-        The dispatcher is a filter that limits the data-model to a minimum by
-        only requesting what the structurer (e.g. common-html.vt.xml) need. This
-        leads to a different URL handling focus - away from document centric. A
-        document can (but does not have to) be behind a certain URL. Like said a
-        structurer can request any given data as input not only a document and
-        the forrest core contracts (like navigation). It may be the main
-        enhancement in comparison to skins that this concept lets you easily
-        extend the default data models provided by forrest.
-      </p>
-      <p>
-        Since the dispatcher has implemented a fallback concept it makes
-        maintenance of custom themes which are based on forrest core ones very
-        easy and less time consuming. The principal is to override or extend
-        only certain parts (contracts) of the core. This is based on the
-        observation that normally only a small percentage of core skin contracts
-        have been changed. At the same time the new plugin system emerged.
-        Plugins are a way of extending Forrest to satisfy site-specific needs.
-        This includes to provide for plugin specific contracts.
-      </p>
+      <p>The aim of the "dispatcher" concept is to provide a flexible framework
+      for creating site and page specific layout in different formats from
+      different content through an advanced seperation of concerns.</p>
+      <p>The dispatcher is a filter that limits the data-model to a minimum by
+      only requesting what the structurer (e.g. common-html.vt.xml) need. This
+      leads to a different URL handling focus - away from document centric. A
+      document can (but does not have to) be behind a certain URL. Like said a
+      structurer can request any given data as input not only a document and
+      the forrest core contracts (like navigation). It may be the main
+      enhancement in comparison to skins that this concept lets you easily
+      extend the default data models provided by forrest.</p>
+      <p>Since the dispatcher has implemented a fallback concept it makes
+      maintenance of custom themes which are based on forrest core ones very
+      easy and less time consuming. The principal is to override or extend only
+      certain parts (contracts) of the core. This is based on the observation
+      that normally only a small percentage of core skin contracts have been
+      changed. At the same time the new plugin system emerged. Plugins are a
+      way of extending Forrest to satisfy site-specific needs. This includes to
+      provide for plugin specific contracts.</p>
       <section id="structurer">
         <title>Structurer - configuration for themes</title>
-        <p>
-          We developed<strong> the structurer</strong> to let the user decide
-          where to place elements in e.g. html pages. We started this work with
-          the <code>skinconf.xml</code> where you could configure certain
-          elements and their positions. These elements were known under certain
-          names. It was up to the skin designer to support this configuration
-          and the elements.
-        </p>
-        <p>
-          The work started with grouping elements (the ones from skinconf). We
-          used css-contracts that we added as @attributes e.g. <code>
-<![CDATA[<div id="content-main"/>]]>
-          </code>. That made it possible to use the same elements in different
-          skins. For the full list refer to the
-          <a href="http://svn.apache.org/repos/asf/forrest/trunk/main/webapp/skins/leather-dev/contracts.initial.txt">
-          initial contract list </a>
-        </p>
-        <p>
-          Around this contracts we developed a configuration Domain Specific
-          Language - called <strong>the structurer</strong>. The
-          <strong>structurer</strong> allows us to define the order in which
-          <strong>forrest:contract</strong>s appear, and also to group them
-          using <strong>forrest:hook</strong>s.
-        </p>
-        <p>
-          <strong>forrest:hook</strong>s are containers that are only used for
-          layout reasons. They <strong>do not</strong> add any content nor
-          functionality to the output. They add <strong>only</strong> layout
-          information to the output. Actually e.g. a <code>
-<![CDATA[<forrest:hook name="layoutId"/>]]>
-          </code> will be transformed to <code>
-<![CDATA[<div id="layoutId"/>]]>
-          </code>
-        </p>
-        <p>
-          <strong>forrest:contract</strong>s are functionality or extra content
-          that a theme can use to display the request. Sometimes a contract
-          delivers <strong>format-specific markup</strong>, other times it
-          delivers a <strong>format-independent string</strong>. We decide
-          different kind of contracts, static one (like described in the
-          contract howto), semi static (which offer configuration parameter in
-          the structurer) and dynamic contracts (which offer semi-static
-          configuration and/or requesting the content).
-        </p>
-        <p>
-          The structurer is also a configuration file for the dispatcher. The
-          new thinking on the dispatcher is that one can include any content
-          from any given business service by dispatching a request against it.
-          In "old fashion" skins and in v1 contracts we assumed a given data
-          model. In the dispatcher there is <strong>no</strong> given data model
-          any more. All data has to be defined in the structurer so that they
-          can be dispatched.
-        </p>
+        <p>We developed 
+        <strong>the structurer</strong>to let the user decide where to place
+        elements in e.g. html pages. We started this work with the 
+        <code>skinconf.xml</code>where you could configure certain elements and
+        their positions. These elements were known under certain names. It was
+        up to the skin designer to support this configuration and the
+        elements.</p>
+        <p>The work started with grouping elements (the ones from skinconf). We
+        used css-contracts that we added as @attributes e.g. 
+        <code>
+          <![CDATA[<div id="content-main"/>]]>
+</code>. That made it possible to use the same elements in different skins. For
+the full list refer to the 
+        <a href="http://svn.apache.org/repos/asf/forrest/trunk/main/webapp/skins/leather-dev/contracts.initial.txt">
+        initial contract list</a></p>
+        <p>Around this contracts we developed a configuration Domain Specific
+        Language - called 
+        <strong>the structurer</strong>. The 
+        <strong>structurer</strong>allows us to define the order in which 
+        <strong>forrest:contract</strong>s appear, and also to group them using
+        
+        <strong>forrest:hook</strong>s.</p>
+        <p>
+        <strong>forrest:hook</strong>s are containers that are only used for
+        layout reasons. They 
+        <strong>do not</strong>add any content nor functionality to the output.
+        They add 
+        <strong>only</strong>layout information to the output. Actually e.g. a 
+        <code>
+          <![CDATA[<forrest:hook name="layoutId"/>]]>
+</code>will be transformed to 
+        <code>
+          <![CDATA[<div id="layoutId"/>]]>
+</code></p>
+        <p>
+        <strong>forrest:contract</strong>s are functionality or extra content
+        that a theme can use to display the request. Sometimes a contract
+        delivers 
+        <strong>format-specific markup</strong>, other times it delivers a 
+        <strong>format-independent string</strong>. We decide different kind of
+        contracts, static one (like described in the contract howto), semi
+        static (which offer configuration parameter in the structurer) and
+        dynamic contracts (which offer semi-static configuration and/or
+        requesting the content).</p>
+        <p>The structurer is also a configuration file for the dispatcher. The
+        new thinking on the dispatcher is that one can include any content from
+        any given business service by dispatching a request against it. In "old
+        fashion" skins and in v1 contracts we assumed a given data model. In
+        the dispatcher there is 
+        <strong>no</strong>given data model any more. All data has to be
+        defined in the structurer so that they can be dispatched.</p>
       </section>
       <section id="contracts">
         <title>Contracts - grouped functionality</title>
-        <p>
-          The result of the leather-dev development was grouped functionality in
-          named containers. We gave those code snippets names (based on their
-          functionality) and called them <strong>contracts</strong>. This naming
-          enabled us to keep the contract separate from the positioning of the
-          code itself. Furthermore, since major parts of the code of skins has
-          never been documented, we started to add for each contract a
-          description and an explanation on how to use this contract. The
-          skinconf.xml gave an excellent source for this documentation effort,
-          since it described most features of the pelt skin.
-        </p>
-        <p>
-          Contracts are standalone, self explaining, configurable pieces of xsl
-          templates created purely for ease of maintenance.
-        </p>
-        <p>
-          Since these contracts are working from the input given in the
-          <a 
-            href="#structurer">structurer</a>, it works on
-          different input sources. One can pass variables into the contracts
-          that can be used to apply presentation logic in the xsl (like sorting
-          order, ...).
-        </p>
+        <p>The result of the leather-dev development was grouped functionality
+        in named containers. We gave those code snippets names (based on their
+        functionality) and called them 
+        <strong>contracts</strong>. This naming enabled us to keep the contract
+        separate from the positioning of the code itself. Furthermore, since
+        major parts of the code of skins has never been documented, we started
+        to add for each contract a description and an explanation on how to use
+        this contract. The skinconf.xml gave an excellent source for this
+        documentation effort, since it described most features of the pelt
+        skin.</p>
+        <p>Contracts are standalone, self explaining, configurable pieces of
+        xsl templates created purely for ease of maintenance.</p>
+        <p>Since these contracts are working from the input given in the 
+        <a href="#structurer">structurer</a>, it works on different input
+        sources. One can pass variables into the contracts that can be used to
+        apply presentation logic in the xsl (like sorting order, ...).</p>
       </section>
     </section>
     <section id="background">
       <title>Background</title>
-      <p>
-        The problem with the forrest skins so far has been that even if "only"
-        the design changed (html-skeleton), we still had to write a completely
-        new skin and implement all functionality. Another problem was that the
-        functionality was not easily extensible by a user. We decided to support
-        a standard regarding naming conventions for css elements. This standard
-        has been developed on the
-        <a 
-        href="http://www.oscom.org/events/oscom4/proposals/skins.html">
-        OSCOM website</a>, where you can find some more background information.
-      </p>
+      <p>The problem with the forrest skins so far has been that even if "only"
+      the design changed (html-skeleton), we still had to write a completely
+      new skin and implement all functionality. Another problem was that the
+      functionality was not easily extensible by a user. We decided to support
+      a standard regarding naming conventions for css elements. This standard
+      has been developed on the 
+      <a href="http://www.oscom.org/events/oscom4/proposals/skins.html">OSCOM
+      website</a>, where you can find some more background information.</p>
       <section id="nc-definition">
         <title>Definition of naming conventions</title>
-        <p>
-          "A naming convention is an attempt to systematize names in a field so
-          they unambiguously convey similar information in a similar manner."
-          <a 
-          href="http://en.wikipedia.org/wiki/Naming_conventions">wikipedia</a>
-        </p>
+        <p>"A naming convention is an attempt to systematize names in a field
+        so they unambiguously convey similar information in a similar manner." 
+        <a href="http://en.wikipedia.org/wiki/Naming_conventions">
+        wikipedia</a></p>
       </section>
       <section id="leather">
         <title>leather-dev</title>
-        <p>
-          That led to the development of the "leather-dev" skin which
-          established a semantic container approach for div elements.
-          Leather-dev evolved from the "pelt" skin and used almost the same
-          functionality (contracts). We had started to encapsulate functional
-          code into templates, but there have been still in 4 xsl files and
-          without any documentation on what they are doing and how to use them.
-          The problems with leather-dev was pointed out in the mail
-          "<a 
-          href="http://marc.theaimsgroup.com/?l=forrest-dev&amp;m=111049344517653" 
-          >status
-          on leather-dev?</a>". The main proplem was to limit users to only one
-          html-skeleton which was way too limiting regarding design. Since we
-          had now grouped functionality in named containers we were ready to
-          start the dispatcher (aka forrest:views).
-        </p>
+        <p>That led to the development of the "leather-dev" skin which
+        established a semantic container approach for div elements. Leather-dev
+        evolved from the "pelt" skin and used almost the same functionality
+        (contracts). We had started to encapsulate functional code into
+        templates, but there have been still in 4 xsl files and without any
+        documentation on what they are doing and how to use them. The problems
+        with leather-dev was pointed out in the mail " 
+        <a href="http://marc.theaimsgroup.com/?l=forrest-dev&amp;m=111049344517653">
+        status on leather-dev?</a>". The main proplem was to limit users to
+        only one html-skeleton which was way too limiting regarding design.
+        Since we had now grouped functionality in named containers we were
+        ready to start the dispatcher (aka forrest:structurer).</p>
       </section>
     </section>
     <section id="info">
       <title>Further information</title>
-      <p>
-        See the various How-to documents about the dispatcher, starting with the
-        <a href="site:dispatcher/quickstart">quickstart</a>. It would also be
-        useful to familiarise yourself with some of the terms used in the
-        dispatcher, the <a href="site:about/glossary">Dispatcher Glossary</a>
-        contains some of the terms used.
-      </p>
-      <p>
-        Apache Forrest 1.0 Specification (Draft, not yet published):
-        <code>site-author/content/xdocs/TR/2005/WD-forrest10.html</code>
-      </p>
+      <p>See the various How-to documents about the dispatcher, starting with
+      the 
+      <a href="site:dispatcher/quickstart">quickstart</a>. It would also be
+      useful to familiarise yourself with some of the terms used in the
+      dispatcher, the 
+      <a href="site:about/glossary">Dispatcher Glossary</a>contains some of the
+      terms used.</p>
+      <p>Apache Forrest 1.0 Specification (Draft, not yet published): 
+      <code>site-author/content/xdocs/TR/2005/WD-forrest10.html</code></p>
     </section>
   </body>
 </document>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/int/index.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/int/index.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/int/index.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/int/index.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,8 +15,8 @@
   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">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+"http://forrest.apache.org/dtd/document-v20.dtd">
 <document>
   <header>
     <title>Living on the edge.</title>
@@ -24,63 +24,55 @@
   <body>
     <section id="introduction">
       <title>Introduction</title>
-      <p>
-        Since the dispatcher is in the whiteboard, we can afford to use the
-        latest features available in forrest. This helps to test these new
-        features and to be prepared for the future when this feature is
-        standard.
-      </p>
+      <p>Since the dispatcher is in the whiteboard, we can afford to use the
+      latest features available in forrest. This helps to test these new
+      features and to be prepared for the future when this feature is
+      standard.</p>
     </section>
     <section id="fpx">
       <title>forrest.properties.xml</title>
-      <p>
-        We needed to prevent having references from the core to a plugin. This
-        can be done with the new properties system. You can override any of the
-        following values via a <code>forrest.properties.xml</code> in your
-        project.
-      </p>
+      <p>We needed to prevent having references from the core to a plugin. This
+      can be done with the new properties system. You can override any of the
+      following values via a 
+      <code>forrest.properties.xml</code>in your project.</p>
       <source>
-<![CDATA[  <property name="dispatcher.theme" value="pelt"/>
+        <![CDATA[  <property name="dispatcher.theme" value="pelt"/>
   <property name="dispatcher.fallback.theme" value="common"/>
   <property name="dispatcher.theme-ext" value=".fv"/>
   <property name="dispatcher.fallback.theme-ext" value=".fv"/>
-  <property name="dispatcher.themer" value="org.apache.forrest.themes.core"/>
   <property name="dispatcher.home" value="org.apache.forrest.plugin.internal.dispatcher"/>]]>
-      </source>
+</source>
       <section>
         <title>Using properties in contracts</title>
-        <p> In the contract body you can access all forrest properties by</p>
+        <p>In the contract body you can access all forrest properties by</p>
         <source>
           <![CDATA[<xsl:param name="defaultVariables" select="'test.html'"/>]]>
-        </source>
+</source>
         <p>then extract the variable like:</p>
         <source>
-          <![CDATA[<xsl:variable name="skin-img-dir" select="$defaultVariables/*/*[@name='THE_PROPERTY']/@value"/>]]>
-        </source>
+          <![CDATA[<xsl:variable name="skin-img-dir" select="$defaultVariables/*[@name='THE_PROPERTY']/@value"/>]]>
+</source>
         <p>more information which variables are available can be found at
-          http://localhost:8888/**.props which connects to the
-          org.apache.forrest.plugin.output.inputModule plugin. A custom generator
-          contacts the forrest properties input module to get all aviable key/values and
-          outputs them to xml (dtd like forrest.properties.xml). </p>
+        http://localhost:8888/**.props which connects to the
+        org.apache.forrest.plugin.output.inputModule plugin. A custom generator
+        contacts the forrest properties input module to get all aviable
+        key/values and outputs them to xml (dtd like
+        forrest.properties.xml).</p>
       </section>
     </section>
     <section id="lm">
       <title>locationmap.xml</title>
-      <p>
-        One of the main features of the dispatcher is its fallback mechanism. We
-        are not only looking into one or two places but a sophisticated list of
-        locations. These locations are defined in the locationmap.xml. Like with
-        the forrest.properties.xml you can override any match in there by
-        implementing it in your project locationmap.xml.
-      </p>
+      <p>One of the main features of the dispatcher is its fallback mechanism.
+      We are not only looking into one or two places but a sophisticated list
+      of locations. These locations are defined in the locationmap.xml. Like
+      with the forrest.properties.xml you can override any match in there by
+      implementing it in your project locationmap.xml.</p>
       <section id="handson">
         <title>Hands on the lm</title>
-        <p>
-          The resolving process of the structurer responsible for the URL has
-          implemented a high amount of fallbacks. Let us have a look.
-        </p>
+        <p>The resolving process of the structurer responsible for the URL has
+        implemented a high amount of fallbacks. Let us have a look.</p>
         <source>
-<![CDATA[<match pattern="resolve.structurer.**">
+          <![CDATA[<match pattern="resolve.structurer.**">
   <!-- 
       FIXME - Problem with the pattern
       ********************************
@@ -176,7 +168,7 @@
       />
   </select>
 </match>]]>
-        </source>
+</source>
       </section>
     </section>
   </body>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/news.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/news.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/news.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/news.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,34 +15,33 @@
   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">
+<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN"
+"http://forrest.apache.org/dtd/document-v20.dtd">
 <document>
   <header>
     <title>News about recent changes</title>
   </header>
   <body>
-    <warning>
-      The "dispatcher" is new functionality which is still in development phase.
-      That is why it is in the "whiteboard" section of the Forrest distribution.
-      We are working at the moment on moving this plugin from the whiteboard
-      into the core plugins. Further all dispatcher related documents will be
-      moved into the plugin as well. See
-      <a 
-      href="http://forrest.apache.org/docs_0_80/status-themes.html">Status
-      of Themes: Skins and Dispatcher</a>.
-    </warning>
+    <warning>The "dispatcher" is new functionality which is still in
+    development phase. That is why it is in the "whiteboard" section of the
+    Forrest distribution. We are working at the moment on moving this plugin
+    from the whiteboard into the core plugins. Further all dispatcher related
+    documents will be moved into the plugin as well. See 
+    <a href="http://forrest.apache.org/docs_0_80/status-themes.html">Status of
+    Themes: Skins and Dispatcher</a>.</warning>
     <!-- FIFO order: first in first out
       Add new events to the top. -->
     <section id="cleanup.15.06.07">
       <title>Cleanup of the locationmap - 15.06.07</title>
-      <p> The locationmap matching for the structurer needed a cleanup. Structurer needs to
-        be placed now in
-        <code>${project.resources-dir}/structurer/url</code> instead of the xdocs
-        directory. </p>
-      <p>The following matches have been removed during this cleanup (you need to implement
-        them in your project locationmap if you still want their behavior.</p>
-      <source><![CDATA[<match pattern="resolve.structurer.**">
+      <p>The locationmap matching for the structurer needed a cleanup.
+      Structurer needs to be placed now in 
+      <code>${project.resources-dir}/structurer/url</code>instead of the xdocs
+      directory.</p>
+      <p>The following matches have been removed during this cleanup (you need
+      to implement them in your project locationmap if you still want their
+      behavior.</p>
+      <source>
+        <![CDATA[<match pattern="resolve.structurer.**">
   <select type="exists">
 <!-- ... -->
     <!-- project-based url-based (xdocs location) -->
@@ -62,7 +61,7 @@
 <!-- ... -->
   </select>
 </match>      ]]>
-      </source>
+</source>
     </section>
   </body>
 </document>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/site.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/site.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/site.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/site.xml Wed Dec  2 13:58:18 2009
@@ -28,28 +28,33 @@
 
 See http://forrest.apache.org/docs/linking.html for more info
 -->
-<site label="org.apache.forrest.plugin.internal.views" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
+<site label="org.apache.forrest.plugin.internal.views" href=""
+xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
   <about label="About">
-    <dispatcher-concept label="Dispatcher development" href="index.html"/>
-    <news label="News" href="news.html" description="News about changes"/>
-    <glossary label="Glossary" href="dispatcher-glossary.html" description="Dispactcher related terms and meanings" />
-    <changes label="Changes" href="changes.html" description="History of Changes" />
+    <dispatcher-concept label="Dispatcher development" href="index.html" />
+    <news label="News" href="news.html" description="News about changes" />
+    <glossary label="Glossary" href="dispatcher-glossary.html"
+    description="Dispactcher related terms and meanings" />
+    <changes label="Changes" href="changes.html"
+    description="History of Changes" />
     <todo label="Todo" href="todo.html" description="Todo List" />
   </about>
   <dispatcher label="How to" tab="how">
-    <quickstart label="Quickstart" href="how/howto-dispatcher-quickstart.html"/>
-    <structurer label="Structurer" href="how/howto-dispatcher-structurer.html"/>
-    <contracts label="Contracts" href="how/howto-dispatcher-contracts.html"/>
-    <perFolderThemes label="Per Folder/File Themes" href="how/perFolderThemes/index.html"/> 
-    <configure-serializer label="Configure output serializer" href="how/configure-serializer.html"/>
+    <quickstart label="Quickstart"
+    href="how/howto-dispatcher-quickstart.html" />
+    <structurer label="Structurer"
+    href="how/howto-dispatcher-structurer.html" />
+    <contracts label="Contracts" href="how/howto-dispatcher-contracts.html" />
+    <perFolderThemes label="Per Folder/File Themes"
+    href="how/perFolderThemes/index.html" />
   </dispatcher>
   <internals label="Internals" tab="int" href="int/">
-    <index label="Overview" href="index.html"/>
+    <index label="Overview" href="index.html" />
   </internals>
   <examples label="Examples" tab="examples" href="examples/">
-          <index label="Overview" href="index.html"/>
+    <index label="Overview" href="index.html" />
   </examples>
-<!--
+  <!--
   The href must be wholesite.html/pdf  You can change the labels and node names
   <all label="All">
     <whole_site_html label="Whole Site HTML" href="wholesite.html"/>
@@ -58,14 +63,14 @@
   -->
   <external-refs>
     <forrest href="http://forrest.apache.org/">
-      <linking href="docs/linking.html"/>
-      <validation href="docs/validation.html"/>
-      <webapp href="docs/your-project.html#webapp"/>
-      <dtd-docs href="docs/dtd-docs.html"/>
-      <issues href="issues.html"/>
-      <mail-lists href="mail-lists.html"/>
-      <status-themes href="docs/status-themes.html"/>
-      <forrestbar href="tools/forrestbar.html"/>
+      <linking href="docs/linking.html" />
+      <validation href="docs/validation.html" />
+      <webapp href="docs/your-project.html#webapp" />
+      <dtd-docs href="docs/dtd-docs.html" />
+      <dtd-docs href="issues.html" />
+      <mail-lists href="mail-lists.html" />
+      <status-themes href="docs_0_80/status-themes.html" />
+      <forrestbar href="tools/forrestbar.html" />
     </forrest>
     <sun href="http://java.sun.com/">
       <j2ee href="j2ee/">
@@ -79,12 +84,12 @@
         <dispatcherView href="DispatcherView.htm" />
       </patterns>
     </corej2eepatterns>
-    <cocoon href="http://cocoon.apache.org/"/>
-    <xml.apache.org href="http://xml.apache.org/"/>
+    <cocoon href="http://cocoon.apache.org/" />
+    <xml.apache.org href="http://xml.apache.org/" />
     <mailings href="http://marc.theaimsgroup.com/?">
       <dev href="l=forrest-dev&amp;">
-        <pInfra href="m=110019697426791&amp;w=2"/>
-        <ftLeather href="m=109959086204887&amp;w=2"/>
+        <pInfra href="m=110019697426791&amp;w=2" />
+        <ftLeather href="m=109959086204887&amp;w=2" />
       </dev>
     </mailings>
   </external-refs>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/tabs.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/tabs.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/tabs.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/content/xdocs/tabs.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,12 +15,11 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN" "http://forrest.apache.org/dtd/tab-cocoon-v11.dtd">
-<tabs software="MyProj"
-  title="MyProj"
-  copyright="Foo"
-  xmlns:xlink="http://www.w3.org/1999/xlink">
-<!-- The rules for tabs are:
+<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.1//EN"
+"http://forrest.apache.org/dtd/tab-cocoon-v11.dtd">
+<tabs software="MyProj" title="MyProj" copyright="Foo"
+xmlns:xlink="http://www.w3.org/1999/xlink">
+  <!-- The rules for tabs are:
     @dir will always have '/@indexfile' added.
     @indexfile gets appended to @dir if the tab is selected. Defaults to 'index.html'
     @href is not modified unless it is root-relative and obviously specifies a
@@ -30,12 +29,14 @@
    Tabs can be embedded to a depth of two. The second level of tabs will only 
     be displayed when their parent tab is selected.    
   -->
-  <tab id="plugins" label="Forrest Plugins" href="http://forrest.apache.org/pluginDocs" indexfile="index.html"/>
-  <tab id="" label="Home" dir="" indexfile="index.html"/>
-  <tab id="how" label="HowTo" dir="how" indexfile="howto-dispatcher-quickstart.html"/>
-  <tab id="int" label="Internals" dir="int" indexfile="index.html"/>
-  <tab id="examples" label="Examples" dir="examples" indexfile="index.html"/>
-<!-- Add new tabs here, eg:
+  <tab id="plugins" label="Forrest Plugins"
+  href="http://forrest.apache.org/pluginDocs" indexfile="index.html" />
+  <tab id="" label="Home" dir="" indexfile="index.html" />
+  <tab id="how" label="HowTo" dir="how"
+  indexfile="howto-dispatcher-quickstart.html" />
+  <tab id="int" label="Internals" dir="int" indexfile="index.html" />
+  <tab id="examples" label="Examples" dir="examples" indexfile="index.html" />
+  <!-- Add new tabs here, eg:
   <tab label="How-Tos" dir="community/howto/"/>
   <tab label="XML Site" dir="xml-site/"/>
   -->

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/examples/pelt.fv
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/examples/pelt.fv?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/examples/pelt.fv (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/examples/pelt.fv Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,29 +15,30 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" 
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
-<!-- The following variables are used to contact data models and/or contracts. -->
-  <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}"/>
-  <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
-  <jx:set var="getRequestExtension" value="#{$cocoon/parameters/getRequestExtension}" />
+<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"
+xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <!-- The following variables are used to contact data models and/or contracts. -->
+  <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}" />
+  <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}" />
+  <jx:set var="getRequestExtension"
+  value="#{$cocoon/parameters/getRequestExtension}" />
   <forrest:view type="fo" hooksXpath="/">
-    <jx:import uri="cocoon://prepare.panels.common-fo"/>
+    <jx:import uri="cocoon://prepare.panels.common-fo" />
   </forrest:view>
-<!-- CSS View of the request e.g. index.dispatcher.css -->
+  <!-- CSS View of the request e.g. index.dispatcher.css -->
   <forrest:view type="css" hooksXpath="/">
-    <jx:import uri="cocoon://prepare.panels.pelt-css"/>
+    <jx:import uri="cocoon://prepare.panels.pelt-css" />
   </forrest:view>
-<!-- HTML View of the request (e.g. index.html)-->
+  <!-- HTML View of the request (e.g. index.html)-->
   <forrest:view type="html" hooksXpath="/html/body">
-    <jx:import uri="cocoon://prepare.panels.pelt-html.head"/>
+    <jx:import uri="cocoon://prepare.panels.pelt-html.head" />
     <forrest:hook name="container">
-      <jx:import uri="cocoon://prepare.panels.pelt-html.header"/>
+      <jx:import uri="cocoon://prepare.panels.pelt-html.header" />
       <forrest:hook name="page">
-        <jx:import uri="cocoon://prepare.panels.pelt-html.leftbar"/>
-        <jx:import uri="cocoon://prepare.panels.pelt-html.example-specific"/>
+        <jx:import uri="cocoon://prepare.panels.pelt-html.leftbar" />
+        <jx:import uri="cocoon://prepare.panels.pelt-html.example-specific" />
       </forrest:hook>
-      <jx:import uri="cocoon://prepare.panels.pelt-html.footer"/>
+      <jx:import uri="cocoon://prepare.panels.pelt-html.footer" />
     </forrest:hook>
   </forrest:view>
 </forrest:views>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/how/perFolderThemes/subFolder/pelt.fv
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/how/perFolderThemes/subFolder/pelt.fv?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/how/perFolderThemes/subFolder/pelt.fv (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/structurer/url/how/perFolderThemes/subFolder/pelt.fv Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -15,29 +15,30 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0" 
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
-<!-- The following variables are used to contact data models and/or contracts. -->
-  <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}"/>
-  <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}"/>
-  <jx:set var="getRequestExtension" value="#{$cocoon/parameters/getRequestExtension}" />
+<forrest:views xmlns:forrest="http://apache.org/forrest/templates/1.0"
+xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+  <!-- The following variables are used to contact data models and/or contracts. -->
+  <jx:set var="contextPath" value="#{$cocoon/parameters/contextPath}" />
+  <jx:set var="getRequest" value="#{$cocoon/parameters/getRequest}" />
+  <jx:set var="getRequestExtension"
+  value="#{$cocoon/parameters/getRequestExtension}" />
   <forrest:view type="fo" hooksXpath="/">
-    <jx:import uri="cocoon://prepare.panels.common-fo"/>
+    <jx:import uri="cocoon://prepare.panels.common-fo" />
   </forrest:view>
-<!-- CSS View of the request e.g. index.dispatcher.css -->
+  <!-- CSS View of the request e.g. index.dispatcher.css -->
   <forrest:view type="css" hooksXpath="/">
-    <jx:import uri="cocoon://prepare.panels.pelt-css"/>
+    <jx:import uri="cocoon://prepare.panels.pelt-css" />
   </forrest:view>
-<!-- HTML View of the request (e.g. index.html)-->
+  <!-- HTML View of the request (e.g. index.html)-->
   <forrest:view type="html" hooksXpath="/html/body">
-    <jx:import uri="cocoon://prepare.panels.pelt-html.head"/>
+    <jx:import uri="cocoon://prepare.panels.pelt-html.head" />
     <forrest:hook name="container">
-      <jx:import uri="cocoon://prepare.panels.pelt-html.header"/>
+      <jx:import uri="cocoon://prepare.panels.pelt-html.header" />
       <forrest:hook name="page">
-        <jx:import uri="cocoon://prepare.panels.pelt-html.leftbar"/>
-        <jx:import uri="cocoon://prepare.panels.pelt-html.content-specific"/>
+        <jx:import uri="cocoon://prepare.panels.pelt-html.leftbar" />
+        <jx:import uri="cocoon://prepare.panels.pelt-html.content-specific" />
       </forrest:hook>
-      <jx:import uri="cocoon://prepare.panels.pelt-html.footer"/>
+      <jx:import uri="cocoon://prepare.panels.pelt-html.footer" />
     </forrest:hook>
   </forrest:view>
 </forrest:views>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.content-specific.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.content-specific.panel.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.content-specific.panel.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.content-specific.panel.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -16,21 +16,21 @@
   limitations under the License.
 -->
 <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <forrest:hook name="content">
     <forrest:contract name="content-title"
-      dataURI="cocoon://#{$getRequest}.title.xml"/>
+    dataURI="cocoon://#{$getRequest}.title.xml" />
     <forrest:contract name="content-abstract"
-      dataURI="cocoon://#{$getRequest}.abstract.xml"/>
+    dataURI="cocoon://#{$getRequest}.abstract.xml" />
     <forrest:contract name="content-minitoc"
-      dataURI="cocoon://#{$getRequest}.toc.xml">
-      <forrest:property name="content-minitoc-conf" max-depth="2" min-sections="1"
-        location="page"/>
+    dataURI="cocoon://#{$getRequest}.toc.xml">
+      <forrest:property name="content-minitoc-conf" max-depth="2"
+      min-sections="1" location="page" />
     </forrest:contract>
     <forrest:contract name="content-main"
-      dataURI="cocoon://#{$getRequest}.body.xml">
+    dataURI="cocoon://#{$getRequest}.body.xml">
       <forrest:property name="content-main-conf">
-        <headings type="underlined"/>
+        <headings type="underlined" />
       </forrest:property>
     </forrest:contract>
     <!--

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.example-specific.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.example-specific.panel.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.example-specific.panel.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.example-specific.panel.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -16,29 +16,28 @@
   limitations under the License.
 -->
 <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <forrest:hook name="content">
     <forrest:hook name="export-link">
-      <forrest:contract name="content-pod-link"/>
+      <forrest:contract name="content-pod-link" />
     </forrest:hook>
-    
     <!-- FIXME - Problem with ndeSetTextSize() script from fontsize.js not compliant between Pelt and Leather-dev... -->
     <forrest:hook class="trail">
-      <forrest:contract name="branding-fontsize"/>
+      <forrest:contract name="branding-fontsize" />
     </forrest:hook>
     <forrest:contract name="content-title"
-      dataURI="cocoon://#{$getRequest}.title.xml"/>
+    dataURI="cocoon://#{$getRequest}.title.xml" />
     <forrest:contract name="content-abstract"
-      dataURI="cocoon://#{$getRequest}.abstract.xml"/>
+    dataURI="cocoon://#{$getRequest}.abstract.xml" />
     <forrest:contract name="content-minitoc"
-      dataURI="cocoon://#{$getRequest}.toc.xml">
-      <forrest:property name="content-minitoc-conf" max-depth="2" min-sections="1"
-        location="page"/>
+    dataURI="cocoon://#{$getRequest}.toc.xml">
+      <forrest:property name="content-minitoc-conf" max-depth="2"
+      min-sections="1" location="page" />
     </forrest:contract>
     <forrest:contract name="content-main"
-      dataURI="cocoon://#{$getRequest}.body.xml">
+    dataURI="cocoon://#{$getRequest}.body.xml">
       <forrest:property name="content-main-conf">
-        <headings type="underlined"/>
+        <headings type="underlined" />
       </forrest:property>
     </forrest:contract>
     <!--

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.header.panel.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.header.panel.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.header.panel.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/resources/themes/pelt/panels/pelt-html.header.panel.xml Wed Dec  2 13:58:18 2009
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="UTF-8"?>
+<?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
@@ -16,44 +16,46 @@
   limitations under the License.
 -->
 <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
+xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
   <forrest:contract name="branding-breadcrumbs">
     <forrest:property name="branding-breadcrumbs">
       <trail>
-        <link1 name="Apache Forrest" href="http://forrest.apache.org/"/>
+        <link1 name="Apache Forrest" href="http://forrest.apache.org/" />
       </trail>
     </forrest:property>
   </forrest:contract>
   <forrest:hook name="header">
     <forrest:contract name="branding-tagline">
-      <forrest:property name="branding-tagline-name">new seed</forrest:property>
+      <forrest:property name="branding-tagline-name">new
+      seed</forrest:property>
       <forrest:property name="branding-tagline-tagline">powered by the
-        dispatcher</forrest:property>
+      dispatcher</forrest:property>
     </forrest:contract>
     <forrest:hook class="logo">
       <forrest:contract name="branding-logo">
         <forrest:property name="branding-logo-name">Apache Forrest
-          Logo</forrest:property>
+        Logo</forrest:property>
         <forrest:property name="branding-logo-description">Apache
-          Forrest</forrest:property>
+        Forrest</forrest:property>
         <forrest:property name="branding-logo-url">
-          http://forrest.apache.org/</forrest:property>
+        http://forrest.apache.org/</forrest:property>
         <forrest:property name="branding-logo-logo">
-          images/project-logo.gif</forrest:property>
+        images/project-logo.gif</forrest:property>
       </forrest:contract>
     </forrest:hook>
     <forrest:hook class="logo">
       <forrest:contract name="branding-logo">
-        <forrest:property name="branding-logo-name">plugin logo</forrest:property>
+        <forrest:property name="branding-logo-name">plugin
+        logo</forrest:property>
         <forrest:property name="branding-logo-description">
-          org.apache.forrest.plugin.internal.dispatcher plugin for Apache
-          Forrest</forrest:property>
+        org.apache.forrest.plugin.internal.dispatcher plugin for Apache
+        Forrest</forrest:property>
         <forrest:property name="branding-logo-url">
-          http://forrest.apache.org/pluginDocs/</forrest:property>
+        http://forrest.apache.org/pluginDocs/</forrest:property>
         <forrest:property name="branding-logo-logo">
-          images/project.png</forrest:property>
+        images/project.png</forrest:property>
       </forrest:contract>
     </forrest:hook>
-    <jx:import uri="cocoon://prepare.panels.pelt-html.nav-main"/>
+    <jx:import uri="cocoon://prepare.panels.pelt-html.nav-main" />
   </forrest:hook>
 </forrest:template>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/skinconf.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/skinconf.xml?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/skinconf.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/documentation/skinconf.xml Wed Dec  2 13:58:18 2009
@@ -15,13 +15,12 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.7-1//EN" "http://forrest.apache.org/dtd/skinconfig-v07-1.dtd"
+<!DOCTYPE skinconfig PUBLIC "-//APACHE//DTD Skin Configuration V0.7-1//EN"
+"http://forrest.apache.org/dtd/skinconfig-v07-1.dtd"
 [
   <!ENTITY skinconf-common PUBLIC "-//Apache Forrest//ENTITIES Skin Configuration common plugins V0.7-1//EN" "">
 ]>
-<skinconfig>
-  &skinconf-common;
-
-  <project-name>Plugin: dispatcher internal</project-name>
-  <project-description>org.apache.forrest.plugin.internal.dispatcher plugin for Apache Forrest</project-description>
-</skinconfig>
+<skinconfig>&skinconf-common; 
+<project-name>Plugin: dispatcher internal</project-name>
+<project-description>org.apache.forrest.plugin.internal.dispatcher plugin for
+Apache Forrest</project-description></skinconfig>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/RecursiveDirectoryTraversalAction.java Wed Dec  2 13:58:18 2009
@@ -21,6 +21,7 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.avalon.framework.parameters.ParameterException;
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
@@ -30,7 +31,7 @@
 import org.apache.cocoon.environment.Redirector;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
-import org.apache.forrest.dispatcher.DispatcherException;
+import org.apache.forrest.dispatcher.exception.DispatcherException;
 
 /**
  * Calculates which location to return for a given directory.
@@ -91,7 +92,7 @@
             org.apache.cocoon.environment.SourceResolver resolver,
             Map objectModel, String source, Parameters parameters)
             throws Exception {
-        this.prepare(parameters, source);
+        this.prepare(parameters);
         String uri = this.getProjectDir() + this.getRequest()
                 + this.getProjectExtension();
         map = new HashMap();
@@ -112,7 +113,7 @@
         }
 
         try {
-            this.computeResponseURI(uri, src);
+            this.computeResponseURI(uri,src);
             //src = resolver.resolveURI(uri);
             if (this.map.containsKey("uri")) {
                 return this.map;
@@ -135,23 +136,23 @@
      *            *viewSelector* project-xdocs will return which view is
      *            responsible for the requested path. If no view
      *            (choice|fallback) could be found the template will return the
-     *            viewFallback (resources/views/default.fv).
+     *            viewFallback (resources/views/default.structurer.xml).
      * 
-     * ex.: 1.request: index First choice: index.fv First/last fallback:
-     * default.fv
+     * ex.: 1.request: index First choice: index.structurer.xml First/last fallback:
+     * default.structurer.xml
      * 
-     * 2.request: sample/index First choice: sample/index.fv First fallback:
-     * sample/default.fv Last fallback: default.fv
+     * 2.request: sample/index First choice: sample/index.structurer.xml First fallback:
+     * sample/default.structurer.xml Last fallback: default.structurer.xml
      * 
-     * 3.request: sample/subdir/index First choice: sample/subdir/index.fv First
-     * fallback: sample/subdir/default.fv Second fallback: sample/default.fv
-     * Last fallback: default.fv
+     * 3.request: sample/subdir/index First choice: sample/subdir/index.structurer.xml First
+     * fallback: sample/subdir/default.structurer.xml Second fallback: sample/default.structurer.xml
+     * Last fallback: default.structurer.xml
      * 
      * ...
      * 
      * des.: The parent view (root-view) inherits to its children until a child
      * is overriding this view. This override can be used for directories
-     * (default.fv) and/or files (*.fv). That means that the root view is the
+     * (default.structurer.xml) and/or files (*.structurer.xml). That means that the root view is the
      * default view as long no other view can be found in the requested child.
      * @throws DispatcherException 
      *  
@@ -195,13 +196,11 @@
        resolver.release(source);
      }
     }
-    public void prepare(Parameters parameters, String src) {
-        this.setRequest(parameters.getParameter("request", src));
-        this.setProjectFallback(parameters.getParameter("projectFallback",
-                src));
-        this.setProjectExtension(parameters.getParameter("projectExtension",
-                src));
-        this.setProjectDir(parameters.getParameter("projectDir", src));
+    private void prepare(Parameters parameters) throws ParameterException {
+        this.setRequest(parameters.getParameter("request"));
+        this.setProjectFallback(parameters.getParameter("projectFallback"));
+        this.setProjectExtension(parameters.getParameter("projectExtension"));
+        this.setProjectDir(parameters.getParameter("projectDir"));
         this.setRest(this.getRequest());
     }
 

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/ResourceTypeAction.java
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/ResourceTypeAction.java?rev=886147&r1=886146&r2=886147&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/ResourceTypeAction.java (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/src/java/org/apache/forrest/dispatcher/acting/ResourceTypeAction.java Wed Dec  2 13:58:18 2009
@@ -36,11 +36,16 @@
 *     &lt;location src="{uri}" /&gt;<br>
  * &lt;/act&gt;
  */
+import java.io.File;
 import java.io.IOException;
-import java.net.MalformedURLException;
+import java.io.InputStream;
 import java.util.HashMap;
 import java.util.Map;
 
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
@@ -49,10 +54,13 @@
 import org.apache.cocoon.acting.ServiceableAction;
 import org.apache.cocoon.environment.Redirector;
 import org.apache.excalibur.source.Source;
+import org.apache.excalibur.source.SourceNotFoundException;
 import org.apache.excalibur.source.SourceResolver;
-import org.apache.forrest.dispatcher.DispatcherException;
+import org.apache.forrest.dispatcher.exception.DispatcherException;
+import org.apache.xml.resolver.tools.CatalogResolver;
 import org.w3c.dom.Document;
 import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
 
 
 public class ResourceTypeAction extends ServiceableAction
@@ -123,7 +131,7 @@
         try {
           src = resolver.resolveURI(uri);
           if (src.exists()) {
-            Document rawData =  org.apache.forrest.dispatcher.util.SourceUtil.readDOM(
+            Document rawData =  readDOM(
                     uri, resolver);
             NodeList type = rawData.getElementsByTagNameNS(getResourceTypeElementNS(),getResourceTypeElement());
             String typeString = type.item(0).getFirstChild().getNodeValue();
@@ -242,5 +250,51 @@
     public void setResourceTypeElementNS(String resourceTypeElementNS) {
         this.resourceTypeElementNS = resourceTypeElementNS;
     }
-
+    /**
+     * Reads a DOM from a source.
+     * @param sourceUri The source URI.
+     * @param manager The service manager.
+     * @return A document or <code>null</code> if the source does not exist.
+     * @throws ServiceException if an error occurs.
+     * @throws SourceNotFoundException if an error occurs.
+     * @throws ParserConfigurationException if an error occurs.
+     * @throws SAXException if an error occurs.
+     * @throws IOException if an error occurs.
+     */
+    public static Document readDOM(String sourceUri, SourceResolver resolver)
+            throws ServiceException, SourceNotFoundException, ParserConfigurationException,
+            SAXException, IOException {
+        Source source = null;
+        Document document = null;
+        try {
+            source = resolver.resolveURI(sourceUri);
+            if (source.exists()) {
+                document = readDocument(source.getInputStream());
+            }
+        } finally {
+                if (source != null) {
+                    resolver.release(source);
+                }
+        }
+        return document;
+    }
+    public static Document readDocument(InputStream stream) throws ParserConfigurationException,
+    SAXException, IOException {
+DocumentBuilder builder = createBuilder();
+return builder.parse(stream);
+}
+    /**
+     * Creates a non-validating and namespace-aware DocumentBuilder.
+     * @return A new DocumentBuilder object.
+     * @throws ParserConfigurationException if an error occurs
+     */
+    public static DocumentBuilder createBuilder() throws ParserConfigurationException {
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+        DocumentBuilder builder = factory.newDocumentBuilder();
+
+        CatalogResolver cr = new CatalogResolver();
+        builder.setEntityResolver(cr);
+        return builder;
+    }
 }



Mime
View raw message