Create a single navigation.xml that contains the menu structure for the entire document tree. Add all items and sub-items.
For items that can collapse when you are not browsing them, add collapse="true"
to the item declaration.
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Maven xdoc Plugin">
<title>Maven xdoc Plugin</title>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<menu>
<item name="Alpha" href="/alpha/index.html">
<item name="Alpha One" href="/alpha/one/index.html"/>
<item name="Alpha Two" href="/alpha/two/index.html"/>
</item>
<item name="Beta" href="/beta/index.html" collapse="true">
<item name="Beta One" href="/beta/one/index.html" collapse="true"/>
<item name="Beta Two" href="/beta/two/index.html" collapse="true"/>
</item>
</menu>
</body>
</project>
Now the menus will expand and collapse as you navigate through them.