forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: [USER POLL/VOTE] Defining tabs?
Date Wed, 28 May 2003 12:12:33 GMT

Jeff Turner wrote, On 28/05/2003 11.20:

> On Tue, May 27, 2003 at 03:10:42PM +0200, Nicola Ken Barozzi wrote:
>>Jeff Turner wrote, On 27/05/2003 12.29:
>>>On Mon, May 26, 2003 at 04:49:33PM +0200, Nicola Ken Barozzi wrote:
> ...
>>>Now we've got this node.  We need to discover the associated tab.
>>Wait a sec... eh? I mean, that node *is* the associated tab, no?
>>  <tab sitepath="about/download"/>
>>means we find in site.xml the node
>>  //site/about/download
>>and render from there all the below elements.
> Yes, but that's not the problem.  The problem is, how do we know we're in
> the about/download tab?  We have to infer the current tab from the
> current path.
> Say our current path is "about/download/binaries/index.html".  This path
> belongs to the "about/download" tab.  How can we know that?  What's the
> algorithm in tab2menu.xsl?

Ahh, ok, *that's* what I was missing! 8-)

Theorically, the two solutions are roughly equipollent, as we can make 
that the xpath to the site.xml node is equivalent to pointing via an id. 
So the info is there.

Hmmm, but this is really tricky. The fact is that we have to make a page 
that may not be in site.xml fit there nevertheless, so to be able to 
resolve the tab it applies to.

The algorithm to look for a node with which to resolve the tab would 
look something like this:

1 - search if the page has a tag in site.xml -> got it
2 - else search if there is a node that has a dir that is in
     the path of the file
3 - else simply do not highlight any tab

Or something between these lines. Still not useful for an impl? I know, 
but I haden't thought of this issue yet, that is that pages are not all 
listed in site.xml.

In any case, I'm confused why your approach would solve the issue, as we 
still can have pages that are not in tabs.xml or in site.xml...

> Anyway, just to clarify: technical details aside, I agree with what
> you're suggesting for tabs; it's just that the only implementation I can
> see is an under-the-covers emulation of the @tab-in-site.xml solution.

Yup, I've understood that, but thanks anyway for clarifying :-)

Nicola Ken Barozzi         
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)

View raw message