forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: another sub-directory question - book.xml
Date Tue, 13 May 2003 22:16:16 GMT
Peng, Meimin wrote:

> Hi,
> In my 'tabs.xml', I have the following: <tab label="Samples"
> dir="samples/"/>.
> I also have a book.xml file under samples directory. 
> In book.xml file, I want to have multiple layers for my menus. How to
> apporach it by modify book.xml? Thanks.
> For example: 
> Samples 
> 1.Food
> 	1.1 Veg
> 	1.2 Fruit
> 2.Program
> 	1.1 Java
> 	1.2 .Net
> 	1.3 C++
> 
> Here is the file that I don't know how to modify.

I think you can just have nested <menu> entries:

> <book software="MyProj"  title="MyProj"  copyright="@year@ My Proj"
> xmlns:xlink="http://www.w3.org/1999/xlink">
>   <menu label="Sample">
>     <menu-item label="Food" href="food/"/>

        <menu label="Sub-title">
          <menu-item label="Sub-entry href="index.html"/>
        </menu>

>     <menu-item label="Program" href="program/" />
>   </menu>
>  </book>

Although the XSLT should render that as expected, this isn't valid 
according to the DTD, which only allows one-level menus. You'll have to 
prevent validation of book.xml by adding this to forrest.properties:

forrest.validate.xdocs.excludes=**/book.xml

Or alternatively, use site.xml instead of book.xml, which does all this 
transparently.

--Jeff

> --Zoe
> 



Mime
View raw message