You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by "Peng, Meimin" <mp...@atxna.com> on 2003/05/13 18:45:41 UTC

another sub-directory question - book.xml

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. 
<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-item label="Program" href="program/" />
  </menu>
 </book>
--Zoe

CONFIDENTIALITY NOTICE:  The information in this e-mail is privileged and
confidential.  Any use, copying or dissemination of any portion of this
e-mail by or to anyone other than the intended recipient(s) is unauthorized.
If you have received this e-mail in error, please reply to sender and delete
it from your system immediately.

Re: another sub-directory question - book.xml

Posted by Jeff Turner <je...@apache.org>.
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
>