Author: rgardler
Date: Wed Aug 29 04:54:48 2007
New Revision: 570766

URL: http://svn.apache.org/viewvc?rev=570766&view=rev
Log:
First steps towards handling subsite navigation

Modified:
    forrest/trunk/whiteboard/multipleSites/master/forrest.properties.xml
    
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/locationmap.xml
    
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml
    
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/site.xml
    
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/tabs.xml
    
forrest/trunk/whiteboard/multipleSites/subsite-secondSeed/src/documentation/content/xdocs/site.xml
    
forrest/trunk/whiteboard/multipleSites/subsite-seed/src/documentation/content/xdocs/site.xml

Modified: forrest/trunk/whiteboard/multipleSites/master/forrest.properties.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/master/forrest.properties.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- forrest/trunk/whiteboard/multipleSites/master/forrest.properties.xml 
(original)
+++ forrest/trunk/whiteboard/multipleSites/master/forrest.properties.xml Wed 
Aug 29 04:54:48 2007
@@ -26,4 +26,7 @@
   
   <!-- FIXME: we can't allow absolute locations like this -->
   <property name="subsite.xdocs.seed" 
value="C:\projects\forrest\whiteboard\multipleSites\subsite-seed\src\documentation\content\xdocs"/>
+  
+  <!-- FIXME: we can't allow absolute locations like this -->
+  <property name="subsite.xdocs.secondSeed" 
value="C:\projects\forrest\whiteboard\multipleSites\subsite-secondSeed\src\documentation\content\xdocs"/>
 </properties>

Modified: 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/locationmap.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/locationmap.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/locationmap.xml
 (original)
+++ 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/locationmap.xml
 Wed Aug 29 04:54:48 2007
@@ -30,5 +30,9 @@
         <match pattern="project.seed/**">
             <location src="{properties:subsite.xdocs.seed}/{1}" />
         </match>
+        
+        <match pattern="project.secondSeed/**">
+            <location src="{properties:subsite.xdocs.secondSeed}/{1}" />
+        </match>
     </locator>
 </locationmap>

Modified: 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml
 (original)
+++ 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/index.xml
 Wed Aug 29 04:54:48 2007
@@ -141,7 +141,8 @@
               multple sites version of Forrest.</p>
               
               <ul>
-                <li><a href="seed/index.html">Seed index</a> - the index page 
for the sirst subsite</li>
+                <li><a href="seed/index.html">Seed index</a> - the index page 
for the first subsite</li>
+                <li><a href="secondSeed/index.html">Second seed index</a> - 
the index page for the second subsite</li>
               </ul>
             </section>
         </section>
@@ -167,6 +168,10 @@
 <match pattern="project.seed/**">
     <location src="{properties:subsite.xdocs.seed}/{1}" />
 </match>
+
+<match pattern="project.secondSeed/**">
+    <location src="{properties:subsite.xdocs.secondSeed}/{1}" />
+</match>
               ]]></source>
               
               <p>Note that this snippet uses a new property. This is defined 
in the 
@@ -197,6 +202,46 @@
                   plugin mechanism would work here. That is a content object 
is a new kind of
                   plugin.</p>
                  </section>
+            </section>
+            
+            <section>
+              <title>Navigation</title>
+              <p>Navigation is controlled by the main Forrest project. There 
are two aspects to
+              navigation <code>site.xml</code> and <code>tab.xml</code>.</p>
+              
+              <section>
+                <title>site.xml</title>
+                
+                <p>To include a site.xml file from a contained content object 
simply add something like the
+                following to your master <code>site.xml</code>:</p>
+                
+                <source><![CDATA[
+  <subsite1 label="First Subsite" tab="home" href="seed/">
+    <xi:include href="cocoon://seed/site.xml"/>
+  </subsite1>
+    
+    <xi:include href="cocoon://seed/site.xml"/>
+                ]]></source> 
+                
+                <warning>For this to work your content objects 
<code>site.xml</code> file must define a tab
+                under which the navigation details will be visible. 
+                See <a 
href="https://issues.apache.org/jira/browse/FOR-1042";>FOR-1042</a></warning>
+                
+                <warning>For the second technique to work your content objects 
<code>site.xml</code> 
+                must define a href under which the content can be found, but 
this means the content
+                object will not work in stand alone mode. 
+                See <a 
href="https://issues.apache.org/jira/browse/FOR-1043";>FOR-1043</a></warning>
+                
+                <warning>Conversion of sub site.xml files to navigation 
documents is currently incomplete.
+                See <a 
href="https://issues.apache.org/jira/browse/FOR-1044";>FOR-1044</a></warning>
+                
+              </section>
+              
+              <section>
+                <title>tabs.xml</title>
+                <fixme author="rdg">Subsites should provide sub-tabs for use 
within the master.
+                For now, they are unsupported.</fixme>
+              </section>
             </section>
                
         </section>

Modified: 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/site.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/site.xml
 (original)
+++ 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/site.xml
 Wed Aug 29 04:54:48 2007
@@ -36,10 +36,19 @@
   always use index.html when you request http://yourHost/
   See FAQ: "How can I use a start-up-page other than index.html?"
 -->
-<site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0"; 
tab="">
+<site 
+  xmlns:xi="http://www.w3.org/2001/XInclude";
+  label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0"; tab="">
   <about label="About" tab="home">
     <index label="Index" href="index.html" description="Welcome to MyProj"/>
   </about>
+  
+  <subsite1 label="First Subsite" tab="home" href="seed/">
+    <xi:include href="cocoon://seed/site.xml"/>
+  </subsite1> 
+  
+  <xi:include href="cocoon://secondSeed/site.xml"/>
+  
   <external-refs>
     <forrest href="http://forrest.apache.org/";>
       <linking href="docs/linking.html"/>

Modified: 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/tabs.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/tabs.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/tabs.xml
 (original)
+++ 
forrest/trunk/whiteboard/multipleSites/master/src/documentation/content/xdocs/tabs.xml
 Wed Aug 29 04:54:48 2007
@@ -19,7 +19,8 @@
 <tabs software="MyProj"
   title="MyProj"
   copyright="Foo"
-  xmlns:xlink="http://www.w3.org/1999/xlink";>
+  xmlns:xlink="http://www.w3.org/1999/xlink";
+  xmlns:xi="http://www.w3.org/2001/XInclude";>
 <!-- The rules for tabs are:
     @dir will always have '/@indexfile' added.
     @indexfile gets appended to @dir if the tab is selected. Defaults to 
'index.html'
@@ -31,6 +32,7 @@
     be displayed when their parent tab is selected.    
   -->
   <tab id="home" label="Home" dir="" indexfile="index.html"/>
+  
 <!-- Add new tabs here, eg:
   <tab label="How-Tos" dir="community/howto/"/>
   <tab label="XML Site" dir="xml-site/"/>

Modified: 
forrest/trunk/whiteboard/multipleSites/subsite-secondSeed/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/subsite-secondSeed/src/documentation/content/xdocs/site.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/multipleSites/subsite-secondSeed/src/documentation/content/xdocs/site.xml
 (original)
+++ 
forrest/trunk/whiteboard/multipleSites/subsite-secondSeed/src/documentation/content/xdocs/site.xml
 Wed Aug 29 04:54:48 2007
@@ -36,8 +36,8 @@
   always use index.html when you request http://yourHost/
   See FAQ: "How can I use a start-up-page other than index.html?"
 -->
-<site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0";
-  tab="">
+<site label="Second Seed" xmlns="http://apache.org/forrest/linkmap/1.0";
+  tab="home" href="secondSeed/" >
   <about label="About">
     <index label="Index" href="index.html" description="Welcome to MyProj"/>
     <linkmap label="Documentation ToC" href="linkmap.html" description="Table 
of Contents for this example site"/>

Modified: 
forrest/trunk/whiteboard/multipleSites/subsite-seed/src/documentation/content/xdocs/site.xml
URL: 
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/multipleSites/subsite-seed/src/documentation/content/xdocs/site.xml?rev=570766&r1=570765&r2=570766&view=diff
==============================================================================
--- 
forrest/trunk/whiteboard/multipleSites/subsite-seed/src/documentation/content/xdocs/site.xml
 (original)
+++ 
forrest/trunk/whiteboard/multipleSites/subsite-seed/src/documentation/content/xdocs/site.xml
 Wed Aug 29 04:54:48 2007
@@ -37,7 +37,7 @@
   See FAQ: "How can I use a start-up-page other than index.html?"
 -->
 <site label="MyProj" href="" xmlns="http://apache.org/forrest/linkmap/1.0";
-  tab="">
+  tab="home">
   <about label="About">
     <index label="Index" href="index.html" description="Welcome to MyProj"/>
     <linkmap label="Documentation ToC" href="linkmap.html" description="Table 
of Contents for this example site"/>