Author: crossley
Date: Tue Jun  8 03:35:46 2010
New Revision: 952521

URL: http://svn.apache.org/viewvc?rev=952521&view=rev
Log:
Upgrade the Anakia output plugin (now v0.2).
Developed a much better way to configure this plugin.
Removed the need for Dispatcher. So this plugin has no dependencies
and can be easily applied to any site using 0.8 release or newer.

Added:
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/input.xmap
   (with props)
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/resources/stylesheets/linkmap-to-anakiamap.xsl
   (with props)
Modified:
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/build.xml
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/output.xmap
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/index.xml
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/site.xml
    
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/status.xml
    forrest/trunk/whiteboard/plugins/whiteboard-plugins.xml

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/build.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/build.xml?rev=952521&r1=952520&r2=952521&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/build.xml
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/build.xml
 Tue Jun  8 03:35:46 2010
@@ -19,8 +19,8 @@
   <property name="plugin-name" 
value="org.apache.forrest.plugin.output.Anakia"/>
   <property name="forrest.version" value="0.8"/>
   <property name="type" value="output"/>
-  <property name="plugin-version" value="0.1"/>
-  <property name="description" value="Produce output in Anakia xdoc format"/>
+  <property name="plugin-version" value="0.2"/>
+  <property name="description" value="Produce output in Anakia-like xdoc 
format"/>
   <property name="author" value="Apache Forrest Project"/>
   <property name="websiteURL" 
value="http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.Anakia"/>
   <property name="downloadURL" value="http://forrest.apache.org/plugins/"/>

Added: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/input.xmap
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/input.xmap?rev=952521&view=auto
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/input.xmap
 (added)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/input.xmap
 Tue Jun  8 03:35:46 2010
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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.
+-->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
+  <map:pipelines>
+    <map:pipeline>
+      <map:match pattern="anakia-start.xml">
+        <map:generate src="cocoon://linkmap.html"/>
+        <map:transform src="{lm:anakia.transform.linkmap.anakiamap}"/>
+        <map:serialize type="xml"/>
+      </map:match>
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/input.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/output.xmap
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/output.xmap?rev=952521&r1=952520&r2=952521&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/output.xmap
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/output.xmap
 Tue Jun  8 03:35:46 2010
@@ -29,6 +29,8 @@
         <map:transform src="{lm:transform.html.broken-links}"/>
         <map:transform src="{lm:anakia.transform.document.xdoc}"/>
         <map:transform src="{lm:transform.xml.pretty}"/>
+<!-- FIXME: Why does the xinclude namespace need to be stripped? -->
+        <map:transform src="{lm:transform.xml.xml-namespace-stripped}"/>
         <map:serialize type="xml"/>
       </map:match>
     </map:pipeline>

Added: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/resources/stylesheets/linkmap-to-anakiamap.xsl
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/resources/stylesheets/linkmap-to-anakiamap.xsl?rev=952521&view=auto
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/resources/stylesheets/linkmap-to-anakiamap.xsl
 (added)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/resources/stylesheets/linkmap-to-anakiamap.xsl
 Tue Jun  8 03:35:46 2010
@@ -0,0 +1,38 @@
+<?xml version='1.0'?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You 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:xsl="http://www.w3.org/1999/XSL/Transform";>
+  <xsl:template match="body">
+    <ul>
+     <xsl:apply-templates select="//li"/>
+    </ul>
+  </xsl:template>
+  <xsl:template match="li">
+    <xsl:apply-templates select="a|link"/>
+  </xsl:template>
+  <xsl:template match="a|link">
+    <xsl:if test="@href!='' and not(contains(@href, ':')) and contains(@href, 
'.html')">
+      <link>
+        <xsl:attribute name="href">
+          <xsl:value-of 
select="concat(substring-before(@href,'.html'),'.xdoc')" />
+        </xsl:attribute>
+        <xsl:value-of select="."/>
+      </link>
+    </xsl:if>
+  </xsl:template>
+  <xsl:template match="head"/>
+</xsl:stylesheet>

Propchange: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/resources/stylesheets/linkmap-to-anakiamap.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/index.xml?rev=952521&r1=952520&r2=952521&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/index.xml
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/index.xml
 Tue Jun  8 03:35:46 2010
@@ -24,34 +24,75 @@
     <section id="overview">
       <title>Overview</title>
       <p>
-        Produce output in
+        Produce output in Anakia-like "xdoc" format. Enables use of Forrest as
+        a tool for gathering input from various sources, and output a
+        consistent set of xml output documents.
+        The output is similar to
         <a href="http://velocity.apache.org/engine/devel/anakia.html";>Apache 
Velocity Anakia</a>
-        "xdoc" format, for example
-        <a href="site:sample-1">localhost:8888/index.xdoc</a>
+        "xdoc" format.
+        See <a href="site:sample-1">example</a>.
       </p>
+    </section>
+    <section id="howto">
+      <title>Howto</title>
+      <p>
+        In your project's <code>forrest.properties</code> file make the
+        following changes ...
+      </p>
+      <ul>
+        <li>
+          Declare the <code>org.apache.forrest.plugin.output.Anakia</code>
+          plugin at the <code>project.required.plugins</code> property
+          (comma-separated list).
+        </li>
+        <li>
+          Uncomment the <code>project.start-uri</code> property and set it to 
be
+          <code>anakia-start.xml</code>
+        </li>
+      </ul>
       <p>
-        One use of this plugin is to export a Forrest-based site to Anakia
-        "xdoc".
+         Now do '<code>forrest</code>' to build your site as normal.
       </p>
       <p>
-        Forrest can then be used as normal, to draw together source content
-        in various formats, and export a set of consistent documents.
+         Alongside each <code>*.html</code> file there will now be a matching
+         <code>*.xdoc</code> file.
       </p>
     </section>
-    <section id="howto">
-      <title>Howto</title>
+    <section id="explanation">
+      <title>How it works</title>
+      <p>
+        Explanation of how this plugin works
+        and how its output can be enhanced with additional processing.
+      </p>
+      <p>
+        Without touching any of the site source content or navigation system,
+        we need to additionally inject another set of links to be processed.
+        Each html output document will then also have a matching URI with 
+        <code>*.xdoc</code> extension.
+      </p>
+      <p>
+        This is achieved with the <code>input.xmap</code> sitemap. For the
+        requested pipeline <code>anakia-start.xml</code> Forrest will generate
+        the "linkmap" of the site navigation, then apply a transformation
+        to amend each link.
+      </p>
+      <p>
+        This automatically enables the crawler to gather this set of links.
+      </p>
       <p>
-        You need a link from each page to its .xdoc version. The
-        easiest way to do that is with the new whiteboard
-        <a 
href="http://forrest.apache.org/pluginDocs/dev/org.apache.forrest.plugin.internal.dispatcher/";>Dispatcher</a>
-        functionality. Follow the "Quickstart" document. Edit your new 
structurer panels to add
-        a new contract "content-anakia-link" following the existing 
"content-pdf-link".
-        A contract is provided in the o.a.f.plugin.output.Anakia plugin at
-        resources/themes/common/html/content-anakia-link.ft to copy to the 
same place in your project.
+        The <code>output.xmap</code> sitemap then handles each xdoc URI to
+        transform the internal content structure. This plugin provides one
+        stylesheet <code>document-to-xdoc.xsl</code> then applies a core
+        transformation to make the xml output a bit more pretty.
       </p>
       <p>
-        Don't forget to declare the o.a.f.plugin.output.Anakia plugin (and the 
usual Dispatcher
-        plugins) in your project's forrest.properties file.
+        To enhance the output, either amend the 
<code>document-to-xdoc.xsl</code>
+        stylesheet (and please send changes) or insert another transformation
+        of your own. In the <code>output.xmap</code> after the abovementioned
+        transformation, add the line
+        <code>&lt;map:transform src="{lm:anakia.transform.xdoc.mine}"/></code>
+        and add your stylesheet (following the locationmap naming convention) 
at
+        <code>resources/stylesheets/xdoc-to-mine.xsl</code>
       </p>
     </section>
   </body>

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/site.xml?rev=952521&r1=952520&r2=952521&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/site.xml
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/src/documentation/content/xdocs/site.xml
 Tue Jun  8 03:35:46 2010
@@ -39,6 +39,7 @@ See http://forrest.apache.org/docs/linki
   </about>
   <external-refs>
     <forrest href="http://forrest.apache.org/";>
+      <issues href="issues.html"/>
       <linking href="docs/linking.html"/>
       <validation href="docs/validation.html"/>
       <webapp href="docs/your-project.html#webapp"/>

Modified: 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/status.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/status.xml?rev=952521&r1=952520&r2=952521&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/status.xml
 (original)
+++ 
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.Anakia/status.xml
 Tue Jun  8 03:35:46 2010
@@ -30,6 +30,14 @@
     <context id="build" title="Changes to Build"/>
   </contexts>
   <changes>
+    <release version="0.2" date="not-released">
+      <action dev="DC" type="update" context="code">
+        Developed a much better way to configure this plugin.
+        See the <a href="site:about/index">overview</a> page Howto section.
+        Removed the need for Dispatcher. So this plugin has no dependencies
+        and can be easily applied to any site using 0.8 release or newer.
+      </action>
+    </release>
     <release version="0.1" date="not-released">
       <action dev="DC" type="update" context="code">
         Update "content-anakia-link.ft" and instructions to use recent 
development
@@ -47,6 +55,10 @@
   <todo>
     <actions priority="high">
       <action context="code" dev="open">
+        See issues at <a href="ext:forrest/issues">issue tracker</a> in the
+        "Plugin: output.Anakia" Component.
+      </action>
+      <action context="code" dev="open">
         Enable use of the .xml filename extension, rather than the current 
.xdoc
         extension. This requires some work on Forrest internals.
       </action>

Modified: forrest/trunk/whiteboard/plugins/whiteboard-plugins.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/whiteboard-plugins.xml?rev=952521&r1=952520&r2=952521&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/whiteboard-plugins.xml (original)
+++ forrest/trunk/whiteboard/plugins/whiteboard-plugins.xml Tue Jun  8 03:35:46 
2010
@@ -237,9 +237,11 @@
         author="Apache Forrest Project"
         
website="http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.Anakia/";
         url="http://forrest.apache.org/plugins/";
-        version="0.1">
+        version="0.2">
     <description>
-      Produce output in Anakia "xdoc" format.
+      Produce output in Anakia-like "xdoc" format. Enables use of Forrest as a
+      tool for gathering input from various sources, and export a consistent
+      set of xml output documents.
     </description>
     <forrestVersion>0.8</forrestVersion>
   </plugin>