forrest-svn mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgard...@apache.org
Subject svn commit: r326303 - in /forrest/trunk: main/java/org/apache/forrest/locationmap/lm/ main/webapp/ plugins/org.apache.forrest.plugin.output.pdf/ whiteboard/plugins/org.apache.forrest.plugin.input.ecs/src/documentation/content/xdocs/sample/ whiteboard/p...
Date Tue, 18 Oct 2005 23:49:15 GMT
Author: rgardler
Date: Tue Oct 18 16:48:44 2005
New Revision: 326303

URL: http://svn.apache.org/viewcvs?rev=326303&view=rev
Log:
replacing the plugin locationmap mount I accidentally removed

Added:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.ecs/src/documentation/content/xdocs/sample/itemSearch1.ecs.xml
      - copied unchanged from r280444, forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.ecs/src/documentation/content/xdocs/sample/itemSearch1.xml
Removed:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.ecs/src/documentation/content/xdocs/sample/itemSearch1.xml
Modified:
    forrest/trunk/main/java/org/apache/forrest/locationmap/lm/MatchNode.java
    forrest/trunk/main/java/org/apache/forrest/locationmap/lm/SelectNode.java
    forrest/trunk/main/webapp/locationmap.xml
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
    forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/status.xml
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/forrest.properties
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.xhtml.xsl
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/views/default.fv
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap

Modified: forrest/trunk/main/java/org/apache/forrest/locationmap/lm/MatchNode.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/MatchNode.java?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/locationmap/lm/MatchNode.java (original)
+++ forrest/trunk/main/java/org/apache/forrest/locationmap/lm/MatchNode.java Tue Oct 18 16:48:44
2005
@@ -121,19 +121,26 @@
     public String locate(Map om, InvokeContext context) throws Exception {
         
         Parameters parameters = resolveParameters(context,om);
+        if (getLogger().isDebugEnabled()) {
+            getLogger().debug("Examining match: " + m_pattern);
+        }
         Map substitutions = m_matcher.match(m_pattern,om,parameters);
         if (substitutions != null) {
-            if (getLogger().isDebugEnabled()) {
-                getLogger().debug("matched: " + m_pattern);
-            }
             context.pushMap(null,substitutions);
             for (int i = 0; i < m_nodes.length; i++) {
                 String location = m_nodes[i].locate(om,context);
                 if (location != null) {
+                    if (getLogger().isDebugEnabled()) {
+                        getLogger().debug("got location: " + location);
+                    }
                     return location;
                 }
             }
             context.popMap();
+        }
+        
+        if (getLogger().isDebugEnabled()) {
+            getLogger().debug("no appropriate location, continue processing matches");
         }
         return null;
     }

Modified: forrest/trunk/main/java/org/apache/forrest/locationmap/lm/SelectNode.java
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/java/org/apache/forrest/locationmap/lm/SelectNode.java?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/main/java/org/apache/forrest/locationmap/lm/SelectNode.java (original)
+++ forrest/trunk/main/java/org/apache/forrest/locationmap/lm/SelectNode.java Tue Oct 18 16:48:44
2005
@@ -109,17 +109,28 @@
             try {
               location = m_nodes[i].locate(om,context);
               if (m_selector.select(location,om,parameters)) {
-                  if (getLogger().isDebugEnabled()) {
-                      getLogger().debug("selected: " + location);
-                  }
+                  debug("Selected: " + location);
                   return location;
+              } else {
+                  debug("Not selected: " + location);
               }
             } catch (ConfigurationException e) {
-                if (getLogger().isDebugEnabled()) {
-                    getLogger().debug("Ignoring locatoinmap config exception: " + e.getMessage());
-                }
+                    debug("Ignoring locationmap config exception: " + e.getMessage());
             }
         }
+        
         return null;
+    }
+    
+    
+
+    /**
+     * If debugging is turned on then log a debug message.
+     * @param debugString - the debug message
+     */
+    private final void debug(String debugString) {
+      if (getLogger().isDebugEnabled()) {
+        getLogger().debug(debugString);
+      }
     }
 }

Modified: forrest/trunk/main/webapp/locationmap.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/main/webapp/locationmap.xml?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/main/webapp/locationmap.xml (original)
+++ forrest/trunk/main/webapp/locationmap.xml Tue Oct 18 16:48:44 2005
@@ -38,6 +38,14 @@
     <!-- ================================== -->
     <select>
       <mount src="{project:content}locationmap.xml"/>
+    </select>     
+    
+    <!-- ================================== -->
+    <!-- Mount plugin specific locationmap -->
+    <!-- project files                      -->
+    <!-- ================================== -->
+    <select>
+      <mount src="{project:temp-dir}/locationmap.xml"/>
     </select>
     
     <!-- ================================== -->

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/output.xmap Tue Oct 18 16:48:44
2005
@@ -31,6 +31,10 @@
           <map:when test="{project:content.xdocs}/{1}{2}.pdf">
             <map:read src="{project:content.xdocs}/{1}{2}.pdf"/>
           </map:when>
+          <map:when test="{project:content.xdocs}/{1}{2}.fo">
+            <map:generate src="{project:content.xdocs}/{1}{2}.fo"/>
+            <map:serialize type="fo2pdf"/>
+          </map:when>
           <map:otherwise>
             <map:generate src="cocoon://{1}{2}.fo"/>
             <map:serialize type="fo2pdf"/>

Modified: forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/status.xml
URL: http://svn.apache.org/viewcvs/forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/status.xml?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/status.xml (original)
+++ forrest/trunk/plugins/org.apache.forrest.plugin.output.pdf/status.xml Tue Oct 18 16:48:44
2005
@@ -17,11 +17,6 @@
 -->
 <status>
 
-  <developers>
-    <person name="Ross Gardler" email="rgardler@apache.org" id="RDG" />
-    <person name="Volunteer needed" email="dev@forrest.apache.org" id="open"/>
-  </developers>
-
   <!-- Define here the Title of the Context you want to display in the Changes pages.
        id = the context value of actions
        title = Title of the Context

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/forrest.properties
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/forrest.properties?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/forrest.properties
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/forrest.properties
Tue Oct 18 16:48:44 2005
@@ -112,3 +112,6 @@
 # comma separated list (no spaces)
 # Run "forrest available-plugins" for a list of plug-ins currently available
 project.required.plugins=org.apache.forrest.plugin.internal.xhtml2,org.apache.forrest.plugin.input.projectInfo,org.apache.forrest.plugin.output.pdf
+
+project.view.internal.plugin=org.apache.forrest.plugin.internal.xhtml2
+project.theme.plugin=org.apache.forrest.plugin.internal.xhtml2

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/nugget.xsl
Tue Oct 18 16:48:44 2005
@@ -15,21 +15,6 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<!--
-site2xml.xsl is the final stage in XML page production.  It merges HTML from
-document2html.xsl, tab2menu.xsl and book2menu.xsl, and adds the site header,
-footer, searchbar, css etc.  As input, it takes XML of the form:
-
-<elements>
-  <branding/>
-  <search/>
-  <menu/>
-  <content/>
-  <siteinfo/>
-</elements>
-
--->
-
 <xsl:stylesheet version="1.0" 
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
   xmlns:forrest="http://apache.org/forrest/templates/1.0">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.view.xsl
Tue Oct 18 16:48:44 2005
@@ -33,7 +33,14 @@
   </xsl:template>
 
   <xsl:template match="forrest:property[@nugget]">
-    <forrest:property name="{@name}"><xi:include href="cocoon://{url}"/></forrest:property>
+    <xsl:element name="forrest:property">
+      <xsl:attribute name="name">
+        <xsl:value-of select="@name"/>
+      </xsl:attribute>
+       <xsl:element name="xi:include">
+        <xsl:attribute name="href">cocoon://<xsl:value-of select="url/text()"/></xsl:attribute>
+       </xsl:element>
+	  </xsl:element>
   </xsl:template>
 
   <xsl:template match="@*|*|text()|processing-instruction()|comment()">

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.xhtml.xsl
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.xhtml.xsl?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.xhtml.xsl
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/stylesheets/prepare.xhtml.xsl
Tue Oct 18 16:48:44 2005
@@ -115,9 +115,13 @@
                     <alias:call-template name="{@name}-head"/>
                 </xsl:when>
                 <xsl:when test="forrest:properties[@contract=$name]">
-                    <alias:call-template name="{@name}-head">
+                    <alias:call-template name="{@name}-head"  xmlns:forrest="http://apache.org/forrest/templates/1.0">
                         <xsl:for-each select="forrest:properties[@contract=$name]/forrest:property">
-                            <alias:with-param name="{@name}" select="'{normalize-space(.)}'"/>
+                            <xsl:variable name="xpath">
+                            <xsl:value-of select="'/site'"/>
+                            <xsl:call-template name="generateXPath"/>
+                          </xsl:variable>
+                          <alias:with-param name="{@name}" select="{normalize-space($xpath)}"/>
                         </xsl:for-each>
                     </alias:call-template>
                 </xsl:when>
@@ -136,13 +140,22 @@
                 </xsl:when>
                 <xsl:when test="forrest:properties[@contract=$name]">
                     <alias:call-template name="{@name}-body">
-                        <xsl:for-each select="forrest:properties[@contract=$name]/forrest:property">
-                            <alias:with-param name="{@name}" select="'{normalize-space(.)}'"/>
+                        <xsl:for-each select="forrest:properties[@contract=$name]/forrest:property">
                         <xsl:variable name="xpath">
+                            <xsl:value-of select="'/site'"/>
+                            <xsl:call-template name="generateXPath"/>
+                          </xsl:variable>
+                          <alias:with-param name="{@name}" select="{normalize-space($xpath)}"
/>
                         </xsl:for-each>
                     </alias:call-template>
                 </xsl:when>
             </xsl:choose>
-        </xsl:if>
-        
+        </xsl:if>        
     </xsl:template>
+    
+    <xsl:template name="generateXPath">
+      <xsl:for-each select="ancestor::*[name()!='filter']">
+        /<xsl:value-of select="name()"/>[<xsl:number/>]
+      </xsl:for-each>
+      /<xsl:value-of select="name()"/>[<xsl:number/>]
+    </xsl:template> 
 </xsl:stylesheet>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/views/default.fv
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/views/default.fv?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/views/default.fv
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/resources/views/default.fv
Tue Oct 18 16:48:44 2005
@@ -36,12 +36,18 @@
               -->
             </forrest:hook>
             <forrest:hook name="page">
-            <!--
                 <forrest:hook name="leftbar">
-                    <forrest:contract name="nav-section"/>
+                  <forrest:contract name="nav-section">
+                    <forrest:properties contract="nav-section">
+                      <forrest:property name="site-xml" nugget="get.nugget.site.xml">
+                        <url>site.source.xml</url>
+                      </forrest:property>
+                    </forrest:properties>
+                  </forrest:contract>
+                    <!--
                     <forrest:contract name="search-input"/>
+                    -->
                 </forrest:hook>
-                -->
                 <!-- You can group elements to a template and call it from any view.
 	                e.g.
 	                <forrest:hook name="export-link">
@@ -58,8 +64,8 @@
                 <forrest:hook name="content">
                    <forrest:contract name="content-title"/>
                    <!-- <forrest:contract name="content-abstract"/> -->
-                   <!--  <forrest:contract name="content-minitoc"/> -->
-                    <forrest:contract name="content-main"/>
+                   <forrest:contract name="content-minitoc"/>
+                   <forrest:contract name="content-main"/>
                 </forrest:hook>
             </forrest:hook>
         </forrest:hook>

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap
URL: http://svn.apache.org/viewcvs/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap?rev=326303&r1=326302&r2=326303&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap
(original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.xhtml2/structurer.xmap
Tue Oct 18 16:48:44 2005
@@ -381,8 +381,8 @@
       {2} - requested url
   		-->
       <map:match pattern="getStylesheet.*.**">
-        <map:aggregate element="forrest:filter">
-          <map:part src="cocoon://prepare.view.{2}" />
+        <map:aggregate element="filter">
+          <map:part src="cocoon://prepare.view.nugget.{2}" />
           <map:part src="cocoon://prepare.properties.{1}.{2}" />
         </map:aggregate>
         <map:transform src="resources/stylesheets/prepare.{1}.xsl">



Mime
View raw message