Author: thorsten
Date: Mon Dec  5 04:50:06 2005
New Revision: 354060

URL: http://svn.apache.org/viewcvs?rev=354060&view=rev
Log:
Activated the test.dispatcher to output html instead of xml. This is the first 
pipeline to replace the xsl-magic of the structurer.

Added:
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/stylesheets/hooksMatcher-html.xsl
   (with props)
Modified:
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/locationmap.xml
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/output.xmap

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/locationmap.xml
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/locationmap.xml?rev=354060&r1=354059&r2=354060&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/locationmap.xml
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/locationmap.xml
 Mon Dec  5 04:50:06 2005
@@ -97,6 +97,12 @@
         <location 
src="{defaults:structurer}/resources/stylesheets/contract-strip-xsl.xsl" />
       </select>
     </match>
+    <match pattern="hooks-to-html.xsl">
+      <select type="exists">
+        <location 
src="{project:themer}/resources/stylesheets/hooksMatcher-html.xsl" />
+        <location 
src="{defaults:themer}/resources/stylesheets/hooksMatcher-html.xsl" />
+      </select>
+    </match>
         <!-- contracts (e.g. html) need  to be prepared for their 
stylesheet-aggregation. -->
     <match pattern="contract-property.xsl">
       <select type="exists">

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/output.xmap
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/output.xmap?rev=354060&r1=354059&r2=354060&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/output.xmap
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/output.xmap
 Mon Dec  5 04:50:06 2005
@@ -99,8 +99,9 @@
         <map:generate src="{lm:resolve.structurer.index-foo}" />
         <map:transform type="dispatcher">
           <map:parameter name="type" value="html" />
+          <map:parameter name="hooksTransformer" 
value="{lm:hooks-to-html.xsl}"/>
         </map:transform>
-        <map:serialize />
+        <map:serialize type="xhtml"/>
       </map:match>
       <map:match pattern="test.**">
         <map:generate src="{lm:resolve.structurer.{1}}" />

Added: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/stylesheets/hooksMatcher-html.xsl
URL: 
http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/stylesheets/hooksMatcher-html.xsl?rev=354060&view=auto
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/stylesheets/hooksMatcher-html.xsl
 (added)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/stylesheets/hooksMatcher-html.xsl
 Mon Dec  5 04:50:06 2005
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 2002-2005 The Apache Software Foundation or its licensors,
+  as applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<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:template>
+  <!--This template will match the different combinations for hooks-->
+  <xsl:template match="[EMAIL PROTECTED] and (@type='div' or not(@type) and 
not(@class))]">
+    <div id="[EMAIL PROTECTED]">
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </div>
+  </xsl:template>
+  <xsl:template match="[EMAIL PROTECTED] and (@type='div' or not(@type))]">
+    <div class="[EMAIL PROTECTED]">
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </div>
+  </xsl:template>
+  <xsl:template match="[EMAIL PROTECTED] and @type='span']">
+    <span class="[EMAIL PROTECTED]"> 
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </span>
+  </xsl:template>
+  <xsl:template match="[EMAIL PROTECTED] and @type='span']">
+    <span id="[EMAIL PROTECTED]"> 
+      <xsl:apply-templates/>
+      <xsl:if test="@nbsp='true'">&#160;</xsl:if>
+    </span>
+  </xsl:template>
+  <xsl:template match="@*|*|text()|processing-instruction()|comment()">
+    <xsl:copy>
+      <xsl:apply-templates 
+        select="@*|*|text()|processing-instruction()|comment()"/>
+    </xsl:copy>
+  </xsl:template>
+</xsl:stylesheet>

Propchange: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/stylesheets/hooksMatcher-html.xsl
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to