Return-Path: Delivered-To: apmail-xml-forrest-dev-archive@xml.apache.org Received: (qmail 90335 invoked by uid 500); 26 Feb 2003 16:05:28 -0000 Mailing-List: contact forrest-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: forrest-dev@xml.apache.org Delivered-To: mailing list forrest-dev@xml.apache.org Received: (qmail 90312 invoked from network); 26 Feb 2003 16:05:28 -0000 Received: from grunt26.ihug.com.au (203.109.249.146) by daedalus.apache.org with SMTP; 26 Feb 2003 16:05:28 -0000 Received: from p665-apx1.syd.ihug.com.au (expresso.localdomain) [203.173.142.157] by grunt26.ihug.com.au with esmtp (Exim 3.35 #1 (Debian)) id 18o43l-0000yn-00; Thu, 27 Feb 2003 03:05:29 +1100 Received: from jeff by expresso.localdomain with local (Exim 3.35 #1 (Debian)) id 18o44z-00069j-00 for ; Thu, 27 Feb 2003 03:06:45 +1100 Date: Thu, 27 Feb 2003 03:06:44 +1100 From: Jeff Turner To: forrest-dev@xml.apache.org Subject: Re: Site.xml questions. Message-ID: <20030226160644.GA2085@expresso.localdomain> Mail-Followup-To: forrest-dev@xml.apache.org References: <3E5BE11C.3020201@apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3E5BE11C.3020201@apache.org> User-Agent: Mutt/1.4i X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tue, Feb 25, 2003 at 04:33:16PM -0500, Berin Loritsch wrote: > The site.xml is too abstract for me to get my head around. I need some > help understanding how the site.xml relates to the menus for tabs. The HTML is quite deceptive: as you say, it looks like each menu belongs to a tab. Actually, tabs are completely optional, passive things. They simply react to the current path. If the tab's path is the longest one that matches the current page path, then that tab is "on". IOW, don't worry about tabs until you're happy with your site menu. > I have the enclosed site.xml and tabs.xml files, but when I generate my > site, I get nothing in the menu for the tabs. > > Also, I find it anoying that the full Site.xml menu is rendered for the > first level pages. Is there any way to suppress that behavior? Not without sitemap hacking. Yours is a common need though, so we'll have to parametrize this sooner or later. There are two options: 1) Just use book.xml files. This isn't as bad as it sounds, because you can use 'site:' links in book.xml: so you don't have to manually add/delete the ..'s when synching book.xml files. 2) Make a 1-line addition to the sitemap. Here is the relevant pipeline (line 539) which selects the subset of site.xml to render: Here, {1} matches the current relative directory path. The "abs-linkmap" pipeline serves up a site.xml with absolute paths. The "xpath" transformer selects only the node with a matching href path. To limit the tree, we can provide an "exclude" parameter to the xpath transformer. Through trial and error, I found that eliminates the listing of sub-menu contents. It's a pity that menu titles aren't clickable links, or we could prune one step further up the menu tree. --Jeff