forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Howard M. Lewis Ship" <hlshipli...@comcast.net>
Subject Forrest 0.5.1: site.xml, tabs.xml & menus
Date Tue, 01 Jun 2004 15:38:26 GMT
I'm still having trouble with my menu generation.  The best I get is that the my index.html
files
get the complete index (too much, it is selecting all site.xml elements, regardless
of the tab attribute).  On detail pages, I get the correct menus.

Examples:

http://jakarta.apache.org/hivemind/

Contains all the menus (including for the "Module: hivemind" and "Module: hivemind-lib" menus).
It
should just have the project menus.

http://jakarta.apache.org/hivemind/services.html has the correct menu (everything at the project
level should have this menu).

Likewise, the index.html for the hivemind and hivemind-lib menus is off, showing everything
(just
like the root index.html).

http://jakarta.apache.org/hivemind/hivemind/ant/ConstructRegistry.html has the correct menu
(just
the stuff in the "Module: hivemind" menu).


I've enclosed my tabs.xml and site.xml ... obviously, I've been playing with different approaches
and not finding the right one. I tried directory based menus and that was close,
except that the root index.html got no menu at all (and the pages linked only from the root
index.html were not generated).

There seems to be some contention between what the dir and href attributes do and mean, and
I can't
follow whats going on inside all that cocoon and xslt to figure it out. Talk about a steep
learning
curve!  Without the href attribute, the tabs don't display properly (i.e., highlighting the
currently selected tab) for the index.html pages.  At this point, I've been through so many
iteration, I don't know if the dir attribute is needed or not.


tabs.xml:

<!DOCTYPE tabs PUBLIC "-//APACHE//DTD Cocoon Documentation Tab V1.0//EN"
"http://apache.org/forrest/dtd/tab-cocoon-v10.dtd">

<tabs software="HiveMind"
  title="HiveMind Project"
  copyright="Apache Software Foundation"
  xmlns:xlink="http://www.w3.org/1999/xlink">

  <!-- The rules are:
    @dir will always have '/@indexfile' added.
    @indexfile gets appended to @dir if the tab is selected. Defaults to 'index.html'
    @href is not modified unless it is root-relative and obviously specifies a
    directory (ends in '/'), in which case /index.html will be added
    
    HLS NOTE: I don't think the following line is accurate!
    
    If @id's are present, site.xml entries with a matching @tab will be in that tab.
  -->

  <tab label="HiveMind Project" href="index.html" id="project"/>
  
  <tab label="Module: hivemind" dir="hivemind" href="hivemind" id="hivemind"/>
  <tab label="Module: hivemind-lib" dir="hivemind-lib" href="hivemind-lib" id="hivemind-lib"/>
      
 </tabs>


site.xml:

<?xml version="1.0"?>

<!DOCTYPE site
[
<!ENTITY project-report-menu.ent SYSTEM "project-report-menu.ent">
<!ENTITY hivemind-report-menu.ent SYSTEM "hivemind-report-menu.ent">
<!ENTITY hivemind-lib-report-menu.ent SYSTEM "hivemind-lib-report-menu.ent">
]
>

<site xmlns="http://apache.org/forrest/linkmap/1.0" tab="project">
	
	<project label="HiveMind Project">
		<reference label="Reference">
			<services label="Services" href="services.html"/>
			<configurations label="Configurations" href="configurations.html"/>
			<sdl label="Simple Data Language" href="sdl.html"/>
			<hivedoc label="HiveDoc" href="hivedoc.html"/>
			<descriptor label="Module  Descriptor" href="descriptor.html"/>
			<rules label="Contribution Processing Rules" href="rules.html"/>
		</reference>
		
		<downloads href="downloads.html" label="Downloads"/>
		
		<tutorials label="Tutorials and Information">
			<bootstrap label="Bootstrapping the Registry" href="bootstrap.html"/>
			<case1 label="Case Study #1: Panorama Startup" href="case1.html"/>
			<ioc label="Inversion Of Control" href="ioc.html"/>
			<localization label="Localization" href="localization.html"/>
			<multithreading label="Multi-Threading" href="multithreading.html"/>
			<filter label="Servlets" href="filter.html"/>
			<interceptors label="Creating New Interceptors" href="interceptors.html"/>
			<override label="Overriding Services" href="override.html"/>
		</tutorials>
		
		<reports label="Reports">
			&project-report-menu.ent;
		</reports>
	</project>
	
	<hivemind label="Module: hivemind" tab="hivemind" href="hivemind/">
		
		<services label="Services">
		
			<hivemind.BuilderFactory label="BuilderFactory" href="BuilderFactory.html"/>
			<hivemind.LoggingInterceptor label="LoggingInterceptor"
				href="LoggingInterceptor.html"/>
			<hivemind.ShutdownCoordinator label="ShutdownCoordinator"
href="ShutdownCoordinator.html"/>
			<hivemind.ThreadLocalStorage label="ThreadLocalStorage"
href="ThreadLocalStorage.html"/>
		
		</services>
		
		<configs label="Configurations">
			
			<hivemind.ApplicationDefaults label="ApplicationDefaults"
				href="ApplicationDefaults.html"/>
			<hivemind.EagerLoad label="EagerLoad" href="EagerLoad.html"/>
			<hivemind.FactoryDefaults label="FactoryDefaults"
				href="FactoryDefaults.html"/>
			<hivemind.ServiceModels label="ServiceModels" href="ServiceModels.html"/>
			<hivemind.SymbolSources label="SymbolSources" href="SymbolSources.html"/>
			<hivemind.Translators label="Translators" href="Translators.html"/>
			
		</configs>
		
		<anttasks label="Ant Tasks">
		
			<ConstructRegistry label="ConstructRegistry"
href="ant/ConstructRegistry.html"/>
			<ManifestClassPath label="ManifestClassPath"
href="ant/ManifestClassPath.html"/>
		
		</anttasks>
		
		<reports label="Reports">
		&hivemind-report-menu.ent;
		</reports>
		
	</hivemind>
	
	<hivemind.lib label="Module: hivemind.lib" tab="hivemind-lib" href="hivemind-lib/">
	
		<services label="Services">
			<hivemind.lib.EJBProxyFactory label="EJBProxyFactory"
href="EJBProxyFactory.html"/>
			<hivemind.lib.NameLookup label="NameLookup" href="NameLookup.html"/>
			<hivemind.lib.RemoteExceptionCoordinator label="RemoteExceptionCoordinator"
href="RemoteExceptionCoordinator.html"/>
			<hivemind.lib.SpringLookupFactory label="SpringLookupFactory"
href="SpringLookupFactory.html"/>
		</services>	
		
		<reports label="Reports">
		&hivemind-lib-report-menu.ent;
		</reports>
		
	</hivemind.lib>
	
	<complete-site label="Complete Site">
		<complete-html label="HTML" href="site.html"/>
	</complete-site>
	<related label="Related Projects">
		<tapestry label="Tapestry" href="http://jakarta.apache.org/tapestry/"/>
		<spring label="Spring" href="http://www.springframework.org"/>
	</related>
</site>

--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com


Mime
View raw message