forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thors...@apache.org
Subject svn commit: r808385 [4/14] - in /forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher: ./ resources/stylesheets/ resources/stylesheets/fo/ resources/stylesheets/helper/ resources/stylesheets/html/ resources/styleshe...
Date Thu, 27 Aug 2009 12:07:47 GMT
Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/locationmap.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/locationmap.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/locationmap.xml Thu Aug 27 12:07:38 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
@@ -20,43 +20,37 @@
   <components>
     <matchers default="lm">
       <matcher name="lm"
-        src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher"/>
+      src="org.apache.forrest.locationmap.WildcardLocationMapHintMatcher" />
     </matchers>
     <actions default="RecursiveDirectoryTraversalAction">
       <action name="RecursiveDirectoryTraversalAction"
-        src="org.apache.forrest.dispatcher.acting.RecursiveDirectoryTraversalAction"/>
+      src="org.apache.forrest.dispatcher.acting.RecursiveDirectoryTraversalAction" />
       <action name="resourceTypeAction"
-        src="org.apache.forrest.dispatcher.acting.ResourceTypeAction"/>
+      src="org.apache.forrest.dispatcher.acting.ResourceTypeAction" />
     </actions>
     <selectors default="exists">
       <selector name="exists" logger="sitemap.selector.exists"
-        src="org.apache.forrest.sourceexists.SourceExistsSelector"/>
+      src="org.apache.forrest.sourceexists.SourceExistsSelector" />
     </selectors>
   </components>
   <locator>
-    
     <!-- Base location of the dispatcher-->
     <match pattern="dispatcher.home">
-      <location src="blockcontext:/dispatcher/"/>
+      <location src="blockcontext:/dispatcher/" />
     </match>
-    
     <!-- Base location of the themer -->
     <match pattern="dispatcher.themer">
-      <location src="{lm:dispatcher.home}resource/themer"/>
+      <location src="{lm:dispatcher.home}resource/themer" />
     </match>
-    
     <!-- contracts (e.g. html) that can be used in the project. -->
     <match pattern="themer.contracts.dir">
       <location src="{lm:dispatcher.themer}/themes" />
     </match>
-    
     <!-- resource types -->
     <match pattern="dispatcher.structurer.resourceType.**">
       <select>
-        <location
-          src="{lm:project.themer}/structurer/resource-types/{1}{global:dispatcher.theme-ext}"/>
-        <location
-          src="{lm:dispatcher.themer}/structurer/resource-types/{1}{global:dispatcher.theme-ext}"/>
+        <location src="{lm:project.themer}/structurer/resource-types/{1}{global:dispatcher.theme-ext}" />
+        <location src="{lm:dispatcher.themer}/structurer/resource-types/{1}{global:dispatcher.theme-ext}" />
       </select>
     </match>
     <!-- 
@@ -86,52 +80,42 @@
       <select type="exists">
         <!-- project-based 
         url-based (url location) -->
-        <location
-          src="{lm:project.themer}/structurer/url/{1}{global:dispatcher.theme-ext}"/>
+        <location src="{lm:project.themer}/structurer/url/{1}{global:dispatcher.theme-ext}" />
         <act type="RecursiveDirectoryTraversalAction">
-          <parameter value="{../1}{1}" name="request"/>
-          <parameter value="{global:dispatcher.theme}" name="projectFallback"/>
+          <parameter value="{../1}{1}" name="request" />
+          <parameter value="{global:dispatcher.theme}"
+          name="projectFallback" />
           <parameter value="{global:dispatcher.theme-ext}"
-            name="projectExtension"/>
-          <parameter value="{lm:project.themer}/structurer/url/" name="projectDir"/>
+          name="projectExtension" />
+          <parameter value="{lm:project.themer}/structurer/url/"
+          name="projectDir" />
           <!--  url
           project-based theme-based = directory-based / parent-directory based (recursively) -->
-          <location src="{uri}"/>
+          <location src="{uri}" />
         </act>
         <!-- themes-dir: project-application-based theme-dir-based -->
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.theme}{global:dispatcher.theme-ext}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.theme}{global:dispatcher.theme-ext}" />
         <!-- themes-dir: project-application-based default -->
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}{global:dispatcher.fallback.theme-ext}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}{global:dispatcher.fallback.theme-ext}" />
         <!-- themer: forrest-application-based theme-based -->
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}{global:dispatcher.theme-ext}"/>
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}{global:dispatcher.theme-ext}" />
         <!-- themer: forrest-application-based default -->
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}{global:dispatcher.fallback.theme-ext}"/>
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}{global:dispatcher.fallback.theme-ext}" />
       </select>
     </match>
-    
-    
     <!-- Structurer panels - You can group elements to a template and call it from any structurer. -->
     <match pattern="resolve.panels.**">
       <select type="exists">
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.theme}/panels/{1}{global:dispatcher.panel.ext}"/>
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/panels/{1}{global:dispatcher.panel.ext}"/>
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/panels/{1}{global:dispatcher.panel.ext}"/>
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/panels/{1}{global:dispatcher.panel.ext}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.theme}/panels/{1}{global:dispatcher.panel.ext}" />
+        <location src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/panels/{1}{global:dispatcher.panel.ext}" />
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/panels/{1}{global:dispatcher.panel.ext}" />
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/panels/{1}{global:dispatcher.panel.ext}" />
       </select>
     </match>
     <!-- Some input need to be striped by their root element. -->
     <match pattern="root-strip.xsl">
       <select type="exists">
-        <location
-          src="{lm:dispatcher.home}resource/stylesheets/root-strip.xsl"/>
+        <location src="{lm:dispatcher.home}resource/stylesheets/root-strip.xsl" />
       </select>
     </match>
     <!-- Project implementation of templates have priority before default ones.
@@ -140,49 +124,39 @@
     <match pattern="resolve.contract.*.**">
       <select type="exists">
         <!-- project-based theme -->
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.theme}/{1}/{2}{global:dispatcher.contract.ext}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.theme}/{1}/{2}{global:dispatcher.contract.ext}" />
         <!-- project-based default fallback -->
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/{1}/{2}{global:dispatcher.contract.ext}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/{1}/{2}{global:dispatcher.contract.ext}" />
         <!-- forrest-application-based theme -->
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/{1}/{2}{global:dispatcher.contract.ext}"/>
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/{1}/{2}{global:dispatcher.contract.ext}" />
         <!--  forrest-application-based default fallback -->
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/{1}/{2}{global:dispatcher.contract.ext}"/>
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/{1}/{2}{global:dispatcher.contract.ext}" />
         <!--  forrest-application-based no found -->
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/{1}/noFt{global:dispatcher.contract.ext}"/>
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/{1}/noFt{global:dispatcher.contract.ext}" />
       </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}resource/stylesheets/contract-strip-xsl.xsl"/>
+        <location src="{lm:dispatcher.home}resource/stylesheets/contract-strip-xsl.xsl" />
       </select>
     </match>
     <match pattern="hooks-to-*.xsl">
       <select type="exists">
-        <location
-          src="{lm:dispatcher.home}resource/stylesheets/{0}"/>
+        <location src="{lm:dispatcher.home}resource/stylesheets/{0}" />
       </select>
     </match>
     <match pattern="strip-dispatcher-remains-**.xsl">
       <select type="exists">
-        <location
-          src="{lm:dispatcher.home}resource/stylesheets/{0}"/>
+        <location src="{lm:dispatcher.home}resource/stylesheets/{0}" />
       </select>
     </match>
     <!-- contracts (e.g. html) that can be used in the project. -->
     <match pattern="ls.contracts.xsl">
-      <location
-        src="{lm:dispatcher.home}resource/stylesheets/ls.contracts.xsl"/>
+      <location src="{lm:dispatcher.home}resource/stylesheets/ls.contracts.xsl" />
     </match>
     <match pattern="ls.contracts-to-document.xsl">
-      <location
-        src="{lm:dispatcher.home}resource/stylesheets/ls.contracts-to-document.xsl"/>
+      <location src="{lm:dispatcher.home}resource/stylesheets/ls.contracts-to-document.xsl" />
     </match>
     <!-- generic match for theme image resource -->
     <!-- 
@@ -191,14 +165,10 @@
     -->
     <match pattern="themes/images/**.*">
       <select type="exists">
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.theme}/images/{1}.{2}"/>
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/images/{1}.{2}"/>
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/images/{1}.{2}"/>
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/images/{1}.{2}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.theme}/images/{1}.{2}" />
+        <location src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/images/{1}.{2}" />
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/images/{1}.{2}" />
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/images/{1}.{2}" />
       </select>
     </match>
     <!-- generic match for theme resource like css and js. -->
@@ -208,32 +178,25 @@
     -->
     <match pattern="themes/**.*">
       <select type="exists">
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.theme}/{2}/{1}.{2}"/>
-        <location
-          src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/{2}/{1}.{2}"/>
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/{2}/{1}.{2}"/>
-        <location
-          src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/{2}/{1}.{2}"/>
+        <location src="{lm:project.themer}/themes/{global:dispatcher.theme}/{2}/{1}.{2}" />
+        <location src="{lm:project.themer}/themes/{global:dispatcher.fallback.theme}/{2}/{1}.{2}" />
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.theme}/{2}/{1}.{2}" />
+        <location src="{lm:dispatcher.themer}/themes/{global:dispatcher.fallback.theme}/{2}/{1}.{2}" />
       </select>
     </match>
     <!--  Extracts the style sheet from the contract.  -->
     <match pattern="contract-strip-xsl.xsl">
-      <location
-        src="{lm:dispatcher.home}resource/stylesheets/contract-strip-xsl.xsl"/>
+      <location src="{lm:dispatcher.home}resource/stylesheets/contract-strip-xsl.xsl" />
     </match>
     <match pattern="transform.xml.variable.helper">
-      <location
-        src="{lm:dispatcher.home}resource/stylesheets/variable.helper.xsl"/>
+      <location src="{lm:dispatcher.home}resource/stylesheets/variable.helper.xsl" />
     </match>
     <!-- Id generation -->
     <match pattern="generateId.xsl">
-      <location
-        src="{lm:dispatcher.home}resource/stylesheets/generateId.xsl"/>
+      <location src="{lm:dispatcher.home}resource/stylesheets/generateId.xsl" />
     </match>
     <match pattern="namespace-stripped">
-      <location src="{lm:dispatcher.home}resource/stylesheets/strip_namespaces.xsl"/>
+      <location src="{lm:dispatcher.home}resource/stylesheets/strip_namespaces.xsl" />
     </match>
   </locator>
 </locationmap>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/ls.xmap
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/ls.xmap?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/ls.xmap (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/ls.xmap Thu Aug 27 12:07:38 2009
@@ -16,9 +16,9 @@
   limitations under the License.
 -->
 <map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
-<!-- ls.contracts 
+  <!-- ls.contracts 
       list the default contracts-->
-   <map:pipelines>
+  <map:pipelines>
     <map:pipeline>
       <map:match pattern="ls.contracts.xml">
         <map:generate src="{lm:themer.contracts.dir}" type="xpathdirectory">

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/grammars/link.xlex
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/grammars/link.xlex?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/grammars/link.xlex (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/grammars/link.xlex Thu Aug 27 12:07:38 2009
@@ -16,168 +16,150 @@
   limitations under the License.
 -->
 <lexicon xmlns="http://chaperon.sourceforge.net/schema/lexicon/1.0">
- <!-- (([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? -->
- <lexeme symbol="link">
-  <concat>
-   <concat minOccurs="0" maxOccurs="1">
-     <cstring content="\"/>
-   </concat>
-   <group>
-   <concat>
-    <cclass maxOccurs="*">
-     <cinterval min="A" max="Z"/>
-     <cinterval min="a" max="z"/>
-    </cclass>
-    <cstring content=":"/>
-    <cstring content="/"/>
-   </concat>
- 
-   <concat minOccurs="0">
-    <cstring content="/"/>
-    <cclass minOccurs="0" maxOccurs="*">
-     <cinterval min="A" max="Z"/>
-     <cinterval min="a" max="z"/>
-     <cinterval min="0" max="9"/>
-     <cset content="._-:"/>
-    </cclass>
-   </concat>
- 
-   <cclass minOccurs="0" maxOccurs="*">
-    <cinterval min="A" max="Z"/>
-    <cinterval min="a" max="z"/>
-    <cinterval min="0" max="9"/>
-    <cset content="._-:/"/>
-   </cclass>
-
-   <concat minOccurs="0">
-    <cstring content="?"/>
-    <cclass minOccurs="0" maxOccurs="*">
-     <cinterval min="A" max="Z"/>
-     <cinterval min="a" max="z"/>
-     <cinterval min="0" max="9"/>
-     <cset content="._-:/?"/>
-    </cclass>
-   </concat>
-
-   <concat minOccurs="0">
-    <cstring content="#"/>
-    <cclass minOccurs="0" maxOccurs="*">
-     <cinterval min="A" max="Z"/>
-     <cinterval min="a" max="z"/>
-     <cinterval min="0" max="9"/>
-     <cset content="._-:/?#"/>
-    </cclass>
-   </concat>
-   </group>
-  </concat>
- </lexeme>
-
- <lexeme symbol="cssurl">
-  <concat>
+  <!-- (([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? -->
+  <lexeme symbol="link">
+    <concat>
+      <concat minOccurs="0" maxOccurs="1">
+        <cstring content="\" />
+      </concat>
       <group>
-       <concat>
-        <cstring content="u"/>
-        <cstring content="r"/>
-        <cstring content="l"/>
-       </concat>
-     
-       <concat minOccurs="0" maxOccurs="*">
-        <cstring content=" "/>
-       </concat>
-    
-       <concat>
-        <cstring content="("/>
-       </concat>
-       
-       <concat minOccurs="0" maxOccurs="*">
-        <cstring content=" "/>
-       </concat>
-       
-       <concat minOccurs="0" maxOccurs="1">
-        <cstring content="'"/>
-       </concat>
-      </group>
-      
-      <group>
-       <concat minOccurs="0">
-        <cstring content="/"/>
+        <concat>
+          <cclass maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+          </cclass>
+          <cstring content=":" />
+          <cstring content="/" />
+        </concat>
+        <concat minOccurs="0">
+          <cstring content="/" />
+          <cclass minOccurs="0" maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:" />
+          </cclass>
+        </concat>
         <cclass minOccurs="0" maxOccurs="*">
-         <cinterval min="A" max="Z"/>
-         <cinterval min="a" max="z"/>
-         <cinterval min="0" max="9"/>
-         <cset content="._-:"/>
+          <cinterval min="A" max="Z" />
+          <cinterval min="a" max="z" />
+          <cinterval min="0" max="9" />
+          <cset content="._-:/" />
         </cclass>
-       </concat>
-     
-       <cclass minOccurs="0" maxOccurs="*">
-        <cinterval min="A" max="Z"/>
-        <cinterval min="a" max="z"/>
-        <cinterval min="0" max="9"/>
-        <cset content="._-:/"/>
-       </cclass>
-    
-       <concat minOccurs="0">
-        <cstring content="?"/>
-        <cclass minOccurs="0" maxOccurs="*">
-         <cinterval min="A" max="Z"/>
-         <cinterval min="a" max="z"/>
-         <cinterval min="0" max="9"/>
-         <cset content="._-:/?"/>
-        </cclass>
-       </concat>
-    
-       <concat minOccurs="0">
-        <cstring content="#"/>
+        <concat minOccurs="0">
+          <cstring content="?" />
+          <cclass minOccurs="0" maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:/?" />
+          </cclass>
+        </concat>
+        <concat minOccurs="0">
+          <cstring content="#" />
+          <cclass minOccurs="0" maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:/?#" />
+          </cclass>
+        </concat>
+      </group>
+    </concat>
+  </lexeme>
+  <lexeme symbol="cssurl">
+    <concat>
+      <group>
+        <concat>
+          <cstring content="u" />
+          <cstring content="r" />
+          <cstring content="l" />
+        </concat>
+        <concat minOccurs="0" maxOccurs="*">
+          <cstring content="" />
+        </concat>
+        <concat>
+          <cstring content="(" />
+        </concat>
+        <concat minOccurs="0" maxOccurs="*">
+          <cstring content="" />
+        </concat>
+        <concat minOccurs="0" maxOccurs="1">
+          <cstring content="'" />
+        </concat>
+      </group>
+      <group>
+        <concat minOccurs="0">
+          <cstring content="/" />
+          <cclass minOccurs="0" maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:" />
+          </cclass>
+        </concat>
         <cclass minOccurs="0" maxOccurs="*">
-         <cinterval min="A" max="Z"/>
-         <cinterval min="a" max="z"/>
-         <cinterval min="0" max="9"/>
-         <cset content="._-:/?#"/>
+          <cinterval min="A" max="Z" />
+          <cinterval min="a" max="z" />
+          <cinterval min="0" max="9" />
+          <cset content="._-:/" />
         </cclass>
-       </concat>
+        <concat minOccurs="0">
+          <cstring content="?" />
+          <cclass minOccurs="0" maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:/?" />
+          </cclass>
+        </concat>
+        <concat minOccurs="0">
+          <cstring content="#" />
+          <cclass minOccurs="0" maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:/?#" />
+          </cclass>
+        </concat>
       </group>
-      
       <group>
-       <concat minOccurs="0" maxOccurs="1">
-        <cstring content="'"/>
-       </concat>   
-    
-       <concat minOccurs="0" maxOccurs="*">
-        <cstring content=" "/>
-       </concat>
-    
-       <concat>
-        <cstring content=")"/>
-       </concat>   
+        <concat minOccurs="0" maxOccurs="1">
+          <cstring content="'" />
+        </concat>
+        <concat minOccurs="0" maxOccurs="*">
+          <cstring content="" />
+        </concat>
+        <concat>
+          <cstring content=")" />
+        </concat>
       </group>
-      
-  </concat>
- </lexeme>
- 
- <lexeme symbol="email">
-  <concat>
-   <concat>
-    <concat minOccurs="0" maxOccurs="1">
-     <cstring content="\"/>
     </concat>
-    <group>
-     <cclass maxOccurs="*">
-      <cinterval min="A" max="Z"/>
-      <cinterval min="a" max="z"/>
-      <cinterval min="0" max="9"/>
-      <cset content="._-:"/>
-     </cclass>
-    </group>
-    <cstring content="@"/>
-    <group>
-     <cclass maxOccurs="*">
-      <cinterval min="A" max="Z"/>
-      <cinterval min="a" max="z"/>
-      <cinterval min="0" max="9"/>
-      <cset content="._-:"/>
-     </cclass>
-    </group>
-   </concat>
-  </concat>
- </lexeme>
+  </lexeme>
+  <lexeme symbol="email">
+    <concat>
+      <concat>
+        <concat minOccurs="0" maxOccurs="1">
+          <cstring content="\" />
+        </concat>
+        <group>
+          <cclass maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:" />
+          </cclass>
+        </group>
+        <cstring content="@" />
+        <group>
+          <cclass maxOccurs="*">
+            <cinterval min="A" max="Z" />
+            <cinterval min="a" max="z" />
+            <cinterval min="0" max="9" />
+            <cset content="._-:" />
+          </cclass>
+        </group>
+      </concat>
+    </concat>
+  </lexeme>
 </lexicon>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/stylesheets/pattern2link.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/stylesheets/pattern2link.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/stylesheets/pattern2link.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/chaperon/stylesheets/pattern2link.xsl Thu Aug 27 12:07:38 2009
@@ -15,37 +15,42 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<xsl:stylesheet version="1.0" 
-    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-    xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/2.0">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:lex="http://chaperon.sourceforge.net/schema/lexemes/2.0">
   <xsl:template match="lex:lexeme[@symbol='link']">
     <xsl:choose>
-<!-- it is possible to disable link writing by prefixing by '\' -->
-      <xsl:when test="not( starts-with( @text, '\') )"><a href="{@text}">
-        <xsl:value-of select="@text"/></a>
+      <!-- it is possible to disable link writing by prefixing by '\' -->
+      <xsl:when test="not( starts-with( @text, '\') )">
+        <a href="{@text}">
+          <xsl:value-of select="@text" />
+        </a>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="lex:group[2]"/>
+        <xsl:value-of select="lex:group[2]" />
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
   <xsl:template match="lex:lexeme[@symbol='email']">
     <xsl:choose>
-<!-- it is possible to disable link writing by prefixing by '\' -->
-      <xsl:when test="not( starts-with( @text, '\') )"><a href="mailto:{@text}">
-        <xsl:value-of select="lex:group[2]"/> at <xsl:value-of select="lex:group[3]"/></a>
+      <!-- it is possible to disable link writing by prefixing by '\' -->
+      <xsl:when test="not( starts-with( @text, '\') )">
+        <a href="mailto:{@text}">
+        <xsl:value-of select="lex:group[2]" />at 
+        <xsl:value-of select="lex:group[3]" /></a>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="lex:group[2]"/>@<xsl:value-of select="lex:group[3]"/>
-      </xsl:otherwise>
+      <xsl:value-of select="lex:group[2]" />@ 
+      <xsl:value-of select="lex:group[3]" /></xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-  <xsl:template match="lex:lexeme[@symbol='cssurl']"><a href="{lex:group[3]}">
-    <xsl:value-of select="lex:group[1]"/></a>
+  <xsl:template match="lex:lexeme[@symbol='cssurl']">
+    <a href="{lex:group[3]}">
+      <xsl:value-of select="lex:group[1]" />
+    </a>
   </xsl:template>
   <xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
     <xsl:copy>
-      <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()" />
     </xsl:copy>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/contract-strip-xsl.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/contract-strip-xsl.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/contract-strip-xsl.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/contract-strip-xsl.xsl Thu Aug 27 12:07:38 2009
@@ -15,10 +15,9 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<xsl:stylesheet version="1.0" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  xmlns:forrest="http://apache.org/forrest/templates/1.0">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:forrest="http://apache.org/forrest/templates/1.0">
   <xsl:template match="/">
-    <xsl:copy-of select="forrest:contract/forrest:template/xsl:stylesheet"/>
+    <xsl:copy-of select="forrest:contract/forrest:template/xsl:stylesheet" />
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/dotdots.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/dotdots.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/dotdots.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/dotdots.xsl Thu Aug 27 12:07:38 2009
@@ -36,29 +36,26 @@
 work.
 
 -->
-<xsl:stylesheet
-  version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:template name="dotdots">
-    <xsl:param name="path"/>
-    <xsl:variable name="dirs" select="normalize-space(translate(concat($path, 'x'), ' /\', '_  '))"/>
-<!-- The above does the following:
+    <xsl:param name="path" />
+    <xsl:variable name="dirs"
+    select="normalize-space(translate(concat($path, 'x'), ' /\', '_ '))" />
+    <!-- The above does the following:
        o Adds a trailing character to the path. This prevents us having to deal
          with the special case of ending with '/'
        o Translates all directory separators to ' ', and normalize spaces,
-		 cunningly eliminating duplicate '//'s. We also translate any real
-		 spaces into _ to preserve them.
+                 cunningly eliminating duplicate '//'s. We also translate any real
+                 spaces into _ to preserve them.
     -->
-    <xsl:variable name="remainder" select="substring-after($dirs, ' ')"/>
-    <xsl:if test="$remainder">
-<xsl:text>../</xsl:text>
-      <xsl:call-template name="dotdots">
-        <xsl:with-param name="path" select="translate($remainder, ' ', '/')"/>
-<!-- Translate back to /'s because that's what the template expects. -->
+    <xsl:variable name="remainder" select="substring-after($dirs, ' ')" />
+    <xsl:if test="$remainder"><xsl:text>../</xsl:text><xsl:call-template name="dotdots">
+        <xsl:with-param name="path" select="normalize-space(translate($remainder, ' ', '/'))" />
+        <!-- Translate back to /'s because that's what the template expects. -->
       </xsl:call-template>
     </xsl:if>
   </xsl:template>
-<!--
+  <!--
   Uncomment to test.
   Usage: saxon dotdots.xsl dotdots.xsl path='/my/test/path'
 

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/generateId.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/generateId.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/generateId.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/generateId.xsl Thu Aug 27 12:07:38 2009
@@ -20,20 +20,14 @@
 imported document2html.xsl for details.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<!--  Templates for "toc" mode.  This will generate a complete
+  <!--  Templates for "toc" mode.  This will generate a complete
         Table of Contents for the document.  This will then be used
         by the site2xhtml to generate a Menu ToC and a Page ToC -->
   <xsl:template name="generate-id">
     <xsl:choose>
-      <xsl:when test="@id">
-        <xsl:value-of select="@id"/>
-      </xsl:when>
-      <xsl:when test="title">
-        <xsl:value-of select="title"/>
-      </xsl:when>
-      <xsl:otherwise>
-        <xsl:value-of select="generate-id(.)"/>
-      </xsl:otherwise>
+      <xsl:when test="@id"><xsl:value-of select="@id" /></xsl:when>
+      <xsl:when test="title"><xsl:value-of select="title" /></xsl:when>
+      <xsl:otherwise><xsl:value-of select="generate-id(.)" /></xsl:otherwise>
     </xsl:choose>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/hooks-to-html.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/hooks-to-html.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/hooks-to-html.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/hooks-to-html.xsl Thu Aug 27 12:07:38 2009
@@ -15,54 +15,47 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<xsl:stylesheet version="1.0" 
-  xmlns:forrest="http://apache.org/forrest/templates/1.0" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0"
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:template match="/">
-    <xsl:apply-templates/>
+    <xsl:apply-templates />
   </xsl:template>
-<!--This template will match the different combinations for hooks-->
+  <!--This template will match the different combinations for hooks-->
   <xsl:template match="forrest:hook">
     <xsl:if test="@type='block' or not(@type)">
       <div>
-        <xsl:call-template name="attributes"/>
+        <xsl:call-template name="attributes" />
         <xsl:if test="@nbsp='true'">
-<xsl:text> </xsl:text>
+          <xsl:text> </xsl:text>
         </xsl:if>
-        <xsl:apply-templates/>
+        <xsl:apply-templates />
       </div>
     </xsl:if>
     <xsl:if test="@type='inline'">
       <span>
         <xsl:if test="@name">
-          <xsl:attribute name="id">
-            <xsl:value-of select="@name"/>
-          </xsl:attribute>
+          <xsl:attribute name="id"><xsl:value-of select="@name" /></xsl:attribute>
         </xsl:if>
-        <xsl:call-template name="attributes"/>
+        <xsl:call-template name="attributes" />
         <xsl:if test="@nbsp='true'">
-<xsl:text> </xsl:text>
+          <xsl:text> </xsl:text>
         </xsl:if>
-        <xsl:apply-templates/>
+        <xsl:apply-templates />
       </span>
     </xsl:if>
   </xsl:template>
   <xsl:template name="attributes">
     <xsl:if test="@name">
-      <xsl:attribute name="id">
-        <xsl:value-of select="@name" />
-      </xsl:attribute>
+      <xsl:attribute name="id"><xsl:value-of select="@name" /></xsl:attribute>
     </xsl:if>
     <xsl:if test="@class">
-      <xsl:attribute name="class">
-        <xsl:value-of select="@class" />
-      </xsl:attribute>
+      <xsl:attribute name="class"><xsl:value-of select="@class" /></xsl:attribute>
     </xsl:if>
   </xsl:template>
   <xsl:template match="@*|*|text()|processing-instruction()|comment()">
     <xsl:copy>
-      <xsl:apply-templates 
-        select="@*|*|text()|processing-instruction()|comment()"/>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()" />
     </xsl:copy>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts-to-html.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts-to-html.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts-to-html.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts-to-html.xsl Thu Aug 27 12:07:38 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,76 +15,75 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  xmlns:xhtml="http://www.w3.org/1999/xhtml" 
-  xmlns:dir="http://apache.org/cocoon/directory/2.0" 
-  xmlns:session="http://apache.org/cocoon/session/1.0" 
-  xmlns:forrest="http://apache.org/forrest/templates/1.0" >
-  <xsl:param name="requestedContract" select="'false'"/>
-  <xsl:param name="less" select="'false'"/>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:xhtml="http://www.w3.org/1999/xhtml"
+xmlns:dir="http://apache.org/cocoon/directory/2.0"
+xmlns:session="http://apache.org/cocoon/session/1.0"
+xmlns:forrest="http://apache.org/forrest/templates/1.0">
+  <xsl:param name="requestedContract" select="'false'" />
+  <xsl:param name="less" select="'false'" />
   <xsl:template match="/">
     <xsl:if test="$less='false'">
       <html>
         <head>
-          <title>ls.contract<xsl:if 
-            test="$requestedContract='false'">s</xsl:if>
-            <xsl:if 
-            test="$requestedContract!='false'">&#160;<xsl:value-of 
-            select="$requestedContract" />
-            </xsl:if></title>
+          <title>ls.contract 
+          <xsl:if test="$requestedContract='false'">s</xsl:if>
+          <xsl:if test="$requestedContract!='false'">&#160; 
+          <xsl:value-of select="$requestedContract" /></xsl:if></title>
         </head>
         <body>
           <xsl:choose>
             <xsl:when test="$requestedContract='false'">
-              <xsl:apply-templates/>
+              <xsl:apply-templates />
             </xsl:when>
             <xsl:otherwise>
-              <xsl:apply-templates 
-                select=".//forrest:contract[@name=$requestedContract]"/>
+              <xsl:apply-templates select=".//forrest:contract[@name=$requestedContract]" />
             </xsl:otherwise>
           </xsl:choose>
         </body>
       </html>
     </xsl:if>
     <xsl:if test="$less='true'">
-      <xsl:apply-templates 
-        select=".//forrest:contract[@name=$requestedContract]"/>
+      <xsl:apply-templates select=".//forrest:contract[@name=$requestedContract]" />
     </xsl:if>
   </xsl:template>
   <xsl:template match="forrest:theme">
-    <xsl:variable select="@name" name="name"/>
+    <xsl:variable select="@name" name="name" />
     <p id="{$name}">
-      <title> theme name: <xsl:value-of select="@name" /></title>
+      <title>theme name: 
+      <xsl:value-of select="@name" /></title>
       <xsl:apply-templates select="./forrest:contract">
-        <xsl:with-param select="$name" name="theme"/>
+        <xsl:with-param select="$name" name="theme" />
       </xsl:apply-templates>
     </p>
   </xsl:template>
   <xsl:template match="forrest:contract">
-    <xsl:param name="theme" select="common"/>
+    <xsl:param name="theme" select="common" />
     <xsl:choose>
       <xsl:when test="$requestedContract!='false'">
         <p id="{@name}">
-          <xsl:call-template name="innerBodyLs"/>
+          <xsl:call-template name="innerBodyLs" />
         </p>
       </xsl:when>
       <xsl:otherwise>
         <section id="{$theme}-{@name}">
-          <xsl:call-template name="innerBodyLs"/>
+          <xsl:call-template name="innerBodyLs" />
         </section>
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
   <xsl:template name="innerBodyLs">
-    <title><xsl:value-of select="@name" /></title>
+    <title>
+      <xsl:value-of select="@name" />
+    </title>
     <p class="file">
       <strong>file-name:</strong>
-      <br/>
+      <br />
       <xsl:value-of select="@file-name" />
     </p>
     <p class="description">
       <strong>description:</strong>
-      <br/>
+      <br />
       <xsl:if test="./description/*">
         <xsl:copy-of select="./description/*" />
       </xsl:if>
@@ -96,14 +95,19 @@
       <strong>usage:</strong>
     </p>
     <pre>
-      <xsl:value-of select="./usage" />
-    </pre>
+      
+<xsl:value-of select="./usage" />
+    
+</pre>
     <p class="template-definition">
       <strong>forrest-template definition:</strong>
     </p>
-    <pre>&lt;forrest:template<xsl:apply-templates 
-      select="./forrest:template/@*" />/&gt; </pre>
+    <pre>
+&lt;forrest:template
+<xsl:apply-templates select="./forrest:template/@*" />/&gt; 
+</pre>
   </xsl:template>
-  <xsl:template match="forrest:template/@*">&#160;<xsl:value-of 
-    select="name()"/>="<xsl:value-of select="."/>"</xsl:template>
+  <xsl:template match="forrest:template/@*">&#160; 
+  <xsl:value-of select="name()" />=" 
+  <xsl:value-of select="." />"</xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/ls.contracts.xsl Thu Aug 27 12:07:38 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,12 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  xmlns:dir="http://apache.org/cocoon/directory/2.0" 
-  xmlns:forrest="http://apache.org/forrest/templates/1.0" >
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:dir="http://apache.org/cocoon/directory/2.0"
+xmlns:forrest="http://apache.org/forrest/templates/1.0">
   <xsl:template match="/">
     <forrest:themes xmlns:forrest="http://apache.org/forrest/templates/1.0">
-      <xsl:apply-templates select="dir:directory/dir:directory"/>
+      <xsl:apply-templates select="dir:directory/dir:directory" />
     </forrest:themes>
   </xsl:template>
   <xsl:template match="dir:directory">
@@ -30,14 +30,14 @@
   </xsl:template>
   <xsl:template match="dir:file[./*/*/@name]">
     <forrest:contract name="{./*/*/@name}" file-name="{@name}">
-      <xsl:copy-of select="./*/*/description"/>
-      <xsl:copy-of select="./*/*/usage"/>
-      <xsl:apply-templates select=".//forrest:template"/>
+      <xsl:copy-of select="./*/*/description" />
+      <xsl:copy-of select="./*/*/usage" />
+      <xsl:apply-templates select=".//forrest:template" />
     </forrest:contract>
   </xsl:template>
   <xsl:template match="forrest:template">
     <forrest:template>
-      <xsl:copy-of select="@*"/>
+      <xsl:copy-of select="@*" />
     </forrest:template>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/pathutils.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/pathutils.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/pathutils.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/pathutils.xsl Thu Aug 27 12:07:38 2009
@@ -16,7 +16,7 @@
   limitations under the License.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<!--
+  <!--
 PathUtils.xsl
 
 A set of XSLT templates useful for parsing URI paths:
@@ -27,7 +27,7 @@
 filename-noext: return the file part of a path without its last extension
 
 -->
-<!-- Returns the directory part of a path.  Equivalent to Unix 'dirname'.
+  <!-- Returns the directory part of a path.  Equivalent to Unix 'dirname'.
 Examples:
 '' -> ''
 'foo/index.html' -> 'foo/'
@@ -37,12 +37,11 @@
     <xsl:if test="contains($path, '/')">
       <xsl:value-of select="concat(substring-before($path, '/'), '/')" />
       <xsl:call-template name="dirname">
-        <xsl:with-param name="path"
-        select="substring-after($path, '/')" />
+        <xsl:with-param name="path" select="substring-after($path, '/')" />
       </xsl:call-template>
     </xsl:if>
   </xsl:template>
-<!-- Normalized (..'s eliminated) version of 'dirname' -->
+  <!-- Normalized (..'s eliminated) version of 'dirname' -->
   <xsl:template name="dirname-nz">
     <xsl:param name="path" />
     <xsl:call-template name="normalize">
@@ -53,26 +52,26 @@
       </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
-<!-- Returns the filename part of a path.  Equivalent to Unix 'basename'
+  <!-- Returns the filename part of a path.  Equivalent to Unix 'basename'
 Examples:
 'index.html'  ->  'index.html' 
 'foo/bar/'  ->  '' 
 'foo/bar/index.html'  ->  'index.html' 
 -->
   <xsl:template name="filename">
-    <xsl:param name="path"/>
+    <xsl:param name="path" />
     <xsl:choose>
       <xsl:when test="contains($path, '/')">
         <xsl:call-template name="filename">
-          <xsl:with-param name="path" select="substring-after($path, '/')"/>
+          <xsl:with-param name="path" select="substring-after($path, '/')" />
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="$path"/>
+        <xsl:value-of select="$path" />
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-<!-- Returns the last extension of a filename in a path.
+  <!-- Returns the last extension of a filename in a path.
 Examples:
 'index.html'  ->  '.html' 
 'index.dtdx.html'  ->  '.html' 
@@ -81,57 +80,57 @@
 'foo/bar/index'  ->  '' 
 -->
   <xsl:template name="ext">
-    <xsl:param name="path"/>
-    <xsl:param name="subflag"/>
-<!-- Outermost call? -->
+    <xsl:param name="path" />
+    <xsl:param name="subflag" />
+    <!-- Outermost call? -->
     <xsl:choose>
       <xsl:when test="contains($path, '.')">
         <xsl:call-template name="ext">
-          <xsl:with-param name="path" select="substring-after($path, '.')"/>
-          <xsl:with-param name="subflag" select="'sub'"/>
+          <xsl:with-param name="path" select="substring-after($path, '.')" />
+          <xsl:with-param name="subflag" select="'sub'" />
         </xsl:call-template>
       </xsl:when>
-<!-- Handle extension-less filenames by returning '' -->
+      <!-- Handle extension-less filenames by returning '' -->
       <xsl:when test="not($subflag) and not(contains($path, '.'))">
-<xsl:text/>
+        <xsl:text />
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="concat('.', $path)"/>
+        <xsl:value-of select="concat('.', $path)" />
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-<!-- Returns a filename of a path stripped of its last extension.
+  <!-- Returns a filename of a path stripped of its last extension.
 Examples:
 'foo/bar/index.dtdx.html' -> 'index.dtdx'
 -->
   <xsl:template name="filename-noext">
-    <xsl:param name="path"/>
+    <xsl:param name="path" />
     <xsl:variable name="filename">
       <xsl:call-template name="filename">
-        <xsl:with-param name="path" select="$path"/>
+        <xsl:with-param name="path" select="$path" />
       </xsl:call-template>
     </xsl:variable>
     <xsl:variable name="ext">
       <xsl:call-template name="ext">
-        <xsl:with-param name="path" select="$filename"/>
+        <xsl:with-param name="path" select="$filename" />
       </xsl:call-template>
     </xsl:variable>
-    <xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))"/>
+    <xsl:value-of select="substring($filename, 1, string-length($filename) - string-length($ext))" />
   </xsl:template>
-<!-- Returns a path with the filename stripped of its last extension.
+  <!-- Returns a path with the filename stripped of its last extension.
 Examples:
 'foo/bar/index.dtdx.html' -> 'foo/bar/index.dtdx'
 -->
   <xsl:template name="path-noext">
-    <xsl:param name="path"/>
+    <xsl:param name="path" />
     <xsl:variable name="ext">
       <xsl:call-template name="ext">
-        <xsl:with-param name="path" select="$path"/>
+        <xsl:with-param name="path" select="$path" />
       </xsl:call-template>
     </xsl:variable>
-    <xsl:value-of select="substring($path, 1, string-length($path) - string-length($ext))"/>
+    <xsl:value-of select="substring($path, 1, string-length($path) - string-length($ext))" />
   </xsl:template>
-<!-- Normalized (..'s eliminated) version of 'path-noext' -->
+  <!-- Normalized (..'s eliminated) version of 'path-noext' -->
   <xsl:template name="path-noext-nz">
     <xsl:param name="path" />
     <xsl:call-template name="normalize">
@@ -142,54 +141,54 @@
       </xsl:with-param>
     </xsl:call-template>
   </xsl:template>
-<!-- Returns a path with any fragment identifier ('#...') stripped off
+  <!-- Returns a path with any fragment identifier ('#...') stripped off
 Examples:
 'foo/bar/index.dtdx.html#blah' -> 'foo/bar/index.dtdx.html'
 -->
   <xsl:template name="path-nofrag">
-    <xsl:param name="path"/>
+    <xsl:param name="path" />
     <xsl:if test="not(contains($path, '#'))">
-      <xsl:value-of select="$path"/>
+      <xsl:value-of select="$path" />
     </xsl:if>
     <xsl:if test="contains($path, '#')">
-      <xsl:value-of select="substring-before($path, '#')"/>
+      <xsl:value-of select="substring-before($path, '#')" />
     </xsl:if>
   </xsl:template>
-<!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
+  <!-- Normalizes a path, converting '/' to '\' and eliminating ..'s
 Examples:
 'foo/bar/../baz/index.html' -> foo/baz/index.html'
 -->
   <xsl:template name="normalize">
-    <xsl:param name="path"/>
-<!-- replace all \  with / -->
-    <xsl:variable name="path-" select="translate($path, '\', '/')"/>
+    <xsl:param name="path" />
+    <!-- replace all \  with / -->
+    <xsl:variable name="path-" select="translate($path, '\', '/')" />
     <xsl:choose>
-<!-- process relative refs here -->
+      <!-- process relative refs here -->
       <xsl:when test="contains($path-, '/../')">
-<!--  put part before /../ into $pa: "foo/bar" -->
-        <xsl:variable name="pa" select="substring-before($path-, '/../')"/>
-<!-- put part after first occurrence /../ into $th: "baz/index.html" -->
-        <xsl:variable name="th" select="substring-after($path-, '/../')"/>
-<!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
+        <!--  put part before /../ into $pa: "foo/bar" -->
+        <xsl:variable name="pa" select="substring-before($path-, '/../')" />
+        <!-- put part after first occurrence /../ into $th: "baz/index.html" -->
+        <xsl:variable name="th" select="substring-after($path-, '/../')" />
+        <!-- cut last real directory name before /../ and put rest in $pa- : "foo/"  -->
         <xsl:variable name="pa-">
           <xsl:call-template name="dirname">
-            <xsl:with-param name="path" select="$pa"/>
+            <xsl:with-param name="path" select="$pa" />
           </xsl:call-template>
         </xsl:variable>
-<!-- recombine pieces thus eliminating one .. and one dir step before it
+        <!-- recombine pieces thus eliminating one .. and one dir step before it
               and recurse into this template to eliminate more /../
       -->
-        <xsl:variable name="pa-th" select="concat($pa-, $th)"/>
+        <xsl:variable name="pa-th" select="concat($pa-, $th)" />
         <xsl:call-template name="normalize">
-          <xsl:with-param name="path" select="$pa-th"/>
+          <xsl:with-param name="path" select="$pa-th" />
         </xsl:call-template>
       </xsl:when>
       <xsl:otherwise>
-        <xsl:value-of select="$path-"/>
+        <xsl:value-of select="$path-" />
       </xsl:otherwise>
     </xsl:choose>
   </xsl:template>
-<!--
+  <!--
 Uncomment this to test.
 Usage: saxon pathutils.xsl pathutils.xsl path=foo/bar
 

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/root-strip.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/root-strip.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/root-strip.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/root-strip.xsl Thu Aug 27 12:07:38 2009
@@ -15,10 +15,9 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<xsl:stylesheet version="1.0" 
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
-  xmlns:forrest="http://apache.org/forrest/templates/1.0">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+xmlns:forrest="http://apache.org/forrest/templates/1.0">
   <xsl:template match="/">
-    <xsl:copy-of select="*/*"/>
+    <xsl:copy-of select="*/*" />
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip-dispatcher-remains-html.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip-dispatcher-remains-html.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip-dispatcher-remains-html.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip-dispatcher-remains-html.xsl Thu Aug 27 12:07:38 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.
 -->
-<xsl:stylesheet version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
   <xsl:template match="/">
     <html xmlns="http://www.w3.org/1999/xhtml">
-      <xsl:copy-of select="html/head"/>
-      <xsl:copy-of select="html/body"/>
+      <xsl:copy-of select="html/head" />
+      <xsl:copy-of select="html/body" />
     </html>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip_namespaces.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip_namespaces.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip_namespaces.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/strip_namespaces.xsl Thu Aug 27 12:07:38 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,24 +16,24 @@
   limitations under the License.
 -->
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<!-- FIXME: FOR-555. This might not be the best solution though, but it sure works -->
+  <!-- FIXME: FOR-555. This might not be the best solution though, but it sure works -->
   <xsl:template match="comment()|processing-instruction()">
     <xsl:copy>
-      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()"/>
+      <xsl:apply-templates select="@*|*|text()|processing-instruction()|comment()" />
     </xsl:copy>
   </xsl:template>
-<!-- End fixme FOR-555 -->
+  <!-- End fixme FOR-555 -->
   <xsl:template match="*">
-<!-- remove element prefix (if any) -->
+    <!-- remove element prefix (if any) -->
     <xsl:element name="{local-name()}">
-<!-- process attributes -->
+      <!-- process attributes -->
       <xsl:for-each select="@*">
-<!-- remove attribute prefix (if any) -->
+        <!-- remove attribute prefix (if any) -->
         <xsl:attribute name="{local-name()}">
-          <xsl:value-of select="."/>
+          <xsl:value-of select="." />
         </xsl:attribute>
       </xsl:for-each>
-      <xsl:apply-templates/>
+      <xsl:apply-templates />
     </xsl:element>
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/variable.helper.xsl
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/variable.helper.xsl?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/variable.helper.xsl (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/stylesheets/variable.helper.xsl Thu Aug 27 12:07:38 2009
@@ -16,44 +16,46 @@
   limitations under the License.
 -->
 <xsl:stylesheet version="1.0"
-  xmlns:forrest="http://apache.org/forrest/properties/1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-  <xsl:import href="dotdots.xsl"/>
-  <xsl:import href="pathutils.xsl"/>
-  <xsl:param name="path" select="'test.html'"/>
-  <xsl:param name="theme" select="'notheme'"/>
-<!-- Path (..'s) to the root directory -->
-  <xsl:variable name="root">
+xmlns:forrest="http://apache.org/forrest/properties/1.0"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:import href="dotdots.xsl" />
+  <xsl:import href="pathutils.xsl" />
+  <xsl:param name="path" select="'test.html'" />
+  <xsl:param name="theme" select="'notheme'" />
+  <!-- Path (..'s) to the root directory -->
+  <xsl:variable name="rootRaw">
     <xsl:call-template name="dotdots">
-      <xsl:with-param name="path" select="$path"/>
+      <xsl:with-param name="path" select="$path" />
     </xsl:call-template>
   </xsl:variable>
+  <xsl:variable name="root" select="translate(normalize-space($rootRaw),'&#10;','')"/>
   <xsl:variable name="filename-noext">
     <xsl:call-template name="filename-noext">
-      <xsl:with-param name="path" select="$path"/>
+      <xsl:with-param name="path" select="$path" />
     </xsl:call-template>
   </xsl:variable>
-<!-- Source filename (eg 'foo.xml') of current page -->
+  <!-- Source filename (eg 'foo.xml') of current page -->
   <xsl:variable name="filename">
     <xsl:call-template name="filename">
-      <xsl:with-param name="path" select="$path"/>
+      <xsl:with-param name="path" select="$path" />
     </xsl:call-template>
   </xsl:variable>
   <xsl:variable name="skin-img-dir"
-    select="concat(string($root), 'themes/images')"/>
-  <xsl:variable name="spacer" select="concat($root, 'themer/images/spacer.gif')"/>
+  select="concat($root, 'themes/images')" />
+  <xsl:variable name="spacer"
+  select="concat($root, 'themer/images/spacer.gif')" />
   <xsl:template match="/">
     <properties>
-      <property name="skin-img-dir" value="{$skin-img-dir}"/>
-      <property name="filename" value="{$filename}"/>
-      <property name="filename-noext" value="{$filename-noext}"/>
-      <property name="root" value="{$root}"/>
-      <property name="path" value="{$path}"/>
-      <property name="theme" value="{$theme}"/>
-      <xsl:apply-templates select="forrest:properties/forrest:property"/>
+      <property name="skin-img-dir" value="{normalize-space($skin-img-dir)}" />
+      <property name="filename" value="{normalize-space($filename)}" />
+      <property name="filename-noext" value="{normalize-space($filename-noext)}" />
+      <property name="root" value="{normalize-space($root)}" />
+      <property name="path" value="{normalize-space($path)}" />
+      <property name="theme" value="{normalize-space($theme)}" />
+      <xsl:apply-templates select="forrest:properties/forrest:property" />
     </properties>
   </xsl:template>
   <xsl:template match="forrest:property">
-    <property name="{@name}" value="{@value}"/>
+    <property name="{normalize-space(@name)}" value="{normalize-space(@value)}" />
   </xsl:template>
 </xsl:stylesheet>

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common.structurer.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common.structurer.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common.structurer.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common.structurer.xml Thu Aug 27 12:07:38 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.
 -->
-<forrest:structurer 
-  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:structurer 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}" />
+  <!-- 
     You can group elements (hooks and contracts) to a template 
     and import it from any structurer. 
     The following <jx:import uri="cocoon://prepare.panels.*"/>
@@ -33,7 +33,7 @@
     and can be overriden by
     {properties:resources}/themes/{properties:dispatcher.theme}/html/{1}.vt.xml
 -->
-<!-- HTML View of the request (e.g. index.html)-->
+  <!-- HTML View of the request (e.g. index.html)-->
   <forrest:structure type="html" hooksXpath="/html/body">
     <forrest:contract name="genericMarkup">
       <forrest:property name="genericMarkup">

Modified: forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common/html/branding-css-links.contract.xml
URL: http://svn.apache.org/viewvc/forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common/html/branding-css-links.contract.xml?rev=808385&r1=808384&r2=808385&view=diff
==============================================================================
--- forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common/html/branding-css-links.contract.xml (original)
+++ forrest/branches/dispatcher_rewrite/plugins/org.apache.forrest.plugin.internal.dispatcher/src/cocoon-2.2-block/src/main/resources/COB-INF/resource/themer/themes/common/html/branding-css-links.contract.xml Thu Aug 27 12:07:38 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,179 +15,171 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<forrest:contract 
-  xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
-  xmlns:forrest="http://apache.org/forrest/templates/1.0"
-  name="branding-css-links">
+<forrest:contract xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+xmlns:forrest="http://apache.org/forrest/templates/1.0"
+name="branding-css-links">
   <description>
-    <p>
-      branding-css-links will output html link elements for css usage.
-    </p>
-
-    <p>
-      The contract includes css files which are passed in parameter with the
-      following syntax :
-    </p>
+    <p>branding-css-links will output html link elements for css usage.</p>
+    <p>The contract includes css files which are passed in parameter with the
+    following syntax :</p>
     <source>
-<![CDATA[<css url="layout.]]><em>media</em>.css" [media="screen|print"] [theme="themeName"]<![CDATA[/>]]>
-    </source>
+<![CDATA[<css url="layout.]]>
+<em>media</em>.css" [media="screen|print"] [theme="themeName"] 
+<![CDATA[/>]]>
+</source>
     <ul>
-      <li><strong>url</strong> attribute indicates the name of the css file, the dispatcher
-     searches for this file in the following order :
-        <ul>
-          <li>Does the css file exists in the following directory - if yes, use this one :
-            <source>$PROJECT_HOME/src/documentation/resources/themes/yourtheme/css/</source></li>
-          <li>Otherwise, does the css file exists in the following directory - if yes, use this one :
-            <source>$FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/yourtheme/css/</source></li>
-          <li>Otherwise, does the css file exists in the following directory - if yes, use this one :
-            <source>$FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/common/css/</source></li>
-        </ul>
-     The <strong>url</strong> attribute is required.
-      </li>
-      <li><strong>media</strong> attribute indicates to the browser the stylesheets to use
-     depending on the detination media :
-        <ul>
-          <li><em>screen</em> : the stylesheet is used with the browser displaying the page on the screen,</li>
-          <li><em>print</em> : the stylesheet is used while printing the document - or print preview...</li>
-          <li>othervalues can also be managed by browsers.cf. <a href="http://www.w3.org/TR/REC-CSS2/media.html#media-types" class="fork">W3C Media Types</a>.</li>
-        </ul>
-        <div class="note">
-          <div class="label">Firefox has a bug !</div>
-          <div class="content">
-            <p>
-              There is a bug with firefox which does not manage media attribute
-              while printing, the bug is already declared twice in bugzilla, so
-              we are waiting...
-            </p>
-          </div>
-        </div></li>
-      <li><strong>theme</strong> attribute indicates to the browser for which theme this
-        stylesheet should be used, letting you add several css files
-        corresponding to different themes of the same page.<br/>
-        If omitted, the <strong>theme</strong> attribute take the value of the <code>dispatcher.theme</code> property that you should have defined in your forrest.properties.xml file.
-      </li>
+      <li>
+      <strong>url</strong>attribute indicates the name of the css file, the
+      dispatcher searches for this file in the following order : 
+      <ul>
+        <li>Does the css file exists in the following directory - if yes, use
+        this one : 
+        <source>
+        $PROJECT_HOME/src/documentation/resources/themes/yourtheme/css/</source></li>
+        <li>Otherwise, does the css file exists in the following directory - if
+        yes, use this one : 
+        <source>
+        $FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/yourtheme/css/</source></li>
+        <li>Otherwise, does the css file exists in the following directory - if
+        yes, use this one : 
+        <source>
+        $FORREST_HOME/whiteboard/plugins/org.apache.forrest.themes.core/resources/themes/common/css/</source></li>
+      </ul>The 
+      <strong>url</strong>attribute is required.</li>
+      <li>
+      <strong>media</strong>attribute indicates to the browser the stylesheets
+      to use depending on the detination media : 
+      <ul>
+        <li>
+        <em>screen</em>: the stylesheet is used with the browser displaying the
+        page on the screen,</li>
+        <li>
+        <em>print</em>: the stylesheet is used while printing the document - or
+        print preview...</li>
+        <li>othervalues can also be managed by browsers.cf. 
+        <a href="http://www.w3.org/TR/REC-CSS2/media.html#media-types"
+        class="fork">W3C Media Types</a>.</li>
+      </ul>
+      <div class="note">
+        <div class="label">Firefox has a bug !</div>
+        <div class="content">
+          <p>There is a bug with firefox which does not manage media attribute
+          while printing, the bug is already declared twice in bugzilla, so we
+          are waiting...</p>
+        </div>
+      </div></li>
+      <li>
+      <strong>theme</strong>attribute indicates to the browser for which theme
+      this stylesheet should be used, letting you add several css files
+      corresponding to different themes of the same page. 
+      <br />If omitted, the 
+      <strong>theme</strong>attribute take the value of the 
+      <code>dispatcher.theme</code>property that you should have defined in
+      your forrest.properties.xml file.</li>
     </ul>
   </description>
   <usage>
-<![CDATA[<forrest:contract name="branding-css-links">
+    <![CDATA[<forrest:contract name="branding-css-links">
       <forrest:property name="branding-css-links-input">
         <css url="common.css"/>
         <css if="IE 7" .../>
         <css .../>
       </forrest:property>
     </forrest:contract>]]>
-  </usage>
+</usage>
   <forrest:template xmlns:forrest="http://apache.org/forrest/templates/1.0"
-    name="branding-css-links" inputFormat="xsl">
-    <xsl:stylesheet version="1.1" 
-      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-      xmlns:forrest="http://apache.org/forrest/templates/1.0">
-      <xsl:param name="defaultVariables" select="'test.html'"/>
-      <xsl:param name="branding-css-links-input"/>
-      <xsl:variable name="root" select="$defaultVariables/*[@name='root']/@value"/>
-      <xsl:variable name="theme" select="$defaultVariables/*[@name='theme']/@value"/>
+  name="branding-css-links" inputFormat="xsl">
+    <xsl:stylesheet version="1.1"
+    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+    xmlns:forrest="http://apache.org/forrest/templates/1.0">
+      <xsl:param name="defaultVariables" select="'test.html'" />
+      <xsl:param name="branding-css-links-input" />
+      <xsl:variable name="root"
+      select="$defaultVariables/*[@name='root']/@value" />
+      <xsl:variable name="theme"
+      select="$defaultVariables/*[@name='theme']/@value" />
       <xsl:template match="/">
         <forrest:content>
           <forrest:part xpath="/html/head">
-            <xsl:apply-templates select="$branding-css-links-input/*"/>
+            <xsl:apply-templates select="$branding-css-links-input/*" />
           </forrest:part>
         </forrest:content>
       </xsl:template>
-      <xsl:template 
-        match="css[@url]">
-        <xsl:variable name="if" select="normalize-space(@if)"/>
+      <xsl:template match="css[@url]">
+        <xsl:variable name="if" select="normalize-space(@if)" />
         <xsl:choose>
           <xsl:when test="$if">
-           <xsl:variable name="ifComment"
-            select="concat('[if ',$if,']>')"/>
-            <xsl:comment><xsl:value-of select="$ifComment"/>
-             <xsl:call-template name="printLinkText"/>
-            &lt;![endif]</xsl:comment>
+            <xsl:variable name="ifComment"
+            select="concat('[if ',$if,']&gt;')" />
+            <xsl:comment>
+            <xsl:value-of select="$ifComment" />
+            <xsl:call-template name="printLinkText" />&lt;![endif]</xsl:comment>
           </xsl:when>
           <xsl:otherwise>
-            <xsl:call-template name="printLink"/>
+            <xsl:call-template name="printLink" />
           </xsl:otherwise>
         </xsl:choose>
       </xsl:template>
       <xsl:template name="printLink">
-        <link type="text/css">
-        <xsl:choose>
-          <xsl:when test="@rel">
-            <xsl:attribute name="rel">
-              <xsl:value-of select="normalize-space(@rel)"/>
-            </xsl:attribute>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:attribute name="rel">stylesheet</xsl:attribute>
-          </xsl:otherwise>
-        </xsl:choose>
-        <xsl:choose>
-          <xsl:when test="@theme">
-            <xsl:attribute name="title">
-              <xsl:value-of select="normalize-space(@theme)"/>
-            </xsl:attribute>
-          </xsl:when>
-          <xsl:otherwise>
-            <xsl:attribute name="title">
-              <xsl:value-of select="concat( translate( substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))"/>
-            </xsl:attribute>
-          </xsl:otherwise>
-        </xsl:choose>
         <xsl:variable name="prefix">
           <xsl:choose>
             <xsl:when test="@prefix">
-              <xsl:value-of select="normalize-space(@prefix)"/>
+              <xsl:value-of select="normalize-space(@prefix)" />
+            </xsl:when>
+            <xsl:otherwise>themes/</xsl:otherwise>
+          </xsl:choose>
+        </xsl:variable>
+        <link type="text/css" 
+          href="{concat(normalize-space($root),normalize-space($prefix),normalize-space(@url))}" >
+          <xsl:choose>
+            <xsl:when test="@rel">
+              <xsl:attribute name="rel"><xsl:value-of select="normalize-space(@rel)" />
+              </xsl:attribute>
             </xsl:when>
             <xsl:otherwise>
-                themes/
-              </xsl:otherwise>
+              <xsl:attribute name="rel">stylesheet</xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:choose>
+            <xsl:when test="@theme">
+              <xsl:attribute name="title"><xsl:value-of select="normalize-space(@theme)" />
+              </xsl:attribute>
+            </xsl:when>
+            <xsl:otherwise>
+              <xsl:attribute name="title"><xsl:value-of select="concat(translate(substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))" />
+              </xsl:attribute>
+            </xsl:otherwise>
+          </xsl:choose>
+          <xsl:if test="@media">
+            <xsl:attribute name="media"><xsl:value-of select="normalize-space(@media)" /></xsl:attribute>
+          </xsl:if>
+        </link>
+      </xsl:template>
+      <xsl:template name="printLinkText">
+        <xsl:variable name="prefix">
+          <xsl:choose>
+            <xsl:when test="@prefix"><xsl:value-of select="normalize-space(@prefix)" />
+            </xsl:when>
+            <xsl:otherwise>themes/</xsl:otherwise>
           </xsl:choose>
         </xsl:variable>
-        <xsl:attribute name="href">
-          <xsl:value-of 
-            select="$root"/>
-          <xsl:value-of 
-            select="normalize-space($prefix)"/>
-          <xsl:value-of 
-            select="@url"/>
-        </xsl:attribute>
-        <xsl:if test="@media">
-          <xsl:attribute name="media">
-            <xsl:value-of select="normalize-space(@media)"/>
-          </xsl:attribute>
-        </xsl:if></link>
+        <xsl:variable name="out">&lt;link type="text/css" 
+        <xsl:choose>
+          <xsl:when test="@rel">rel="<xsl:value-of select="normalize-space(@rel)" />"</xsl:when>
+          <xsl:otherwise>rel="stylesheet"</xsl:otherwise>
+        </xsl:choose>
+        <xsl:choose>
+          <xsl:when test="@theme">title="<xsl:value-of select="normalize-space(@theme)" />"</xsl:when>
+          <xsl:otherwise>title="<xsl:value-of select="concat(translate(substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))" />"</xsl:otherwise>
+        </xsl:choose>
+        href="<xsl:value-of select="concat(normalize-space($root),normalize-space($prefix),normalize-space(@url))" />" 
+        <xsl:if test="@media">media="<xsl:value-of select="normalize-space(@media)" />"</xsl:if></xsl:variable>
+        <xsl:variable name="printIt" select="concat(normalize-space($out),'/&gt;')" />
+        <xsl:value-of select="normalize-space($printIt)" />
       </xsl:template>
-        <xsl:template name="printLinkText">
-          <xsl:variable name="out">
-           &lt;link type="text/css"
-            <xsl:choose>
-              <xsl:when test="@rel"> rel="<xsl:value-of select="normalize-space(@rel)"/>" </xsl:when>
-              <xsl:otherwise> rel="stylesheet" </xsl:otherwise>
-            </xsl:choose>
-            <xsl:choose>
-              <xsl:when test="@theme"> title="<xsl:value-of select="normalize-space(@theme)"/>" </xsl:when>
-              <xsl:otherwise> title="<xsl:value-of
-                  select="concat( translate( substring($theme, 1, 1), 'abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'), substring($theme,2))"/>
-                " </xsl:otherwise>
-            </xsl:choose>
-            <xsl:variable name="prefix">
-              <xsl:choose>
-                <xsl:when test="@prefix">
-                  <xsl:value-of select="normalize-space(@prefix)"/>
-                </xsl:when>
-                <xsl:otherwise>themes/</xsl:otherwise>
-              </xsl:choose>
-            </xsl:variable> href="<xsl:value-of select="$root"/>
-            <xsl:value-of select="normalize-space($prefix)"/>
-            <xsl:value-of select="normalize-space(@url)"/>"
-            <xsl:if test="@media"> media="<xsl:value-of select="normalize-space(@media)"/>"</xsl:if> 
-           </xsl:variable>
-         <xsl:variable name="printIt" 
-          select="concat(normalize-space($out),'/>')"/>
-          <xsl:value-of select="normalize-space($printIt)"/></xsl:template>
       <xsl:template match="css[not(@url)]">
         <style type="text/css">
-          <xsl:value-of select="."/>
+          <xsl:value-of select="." />
         </style>
       </xsl:template>
     </xsl:stylesheet>



Mime
View raw message