You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Bert Van Kets <be...@vankets.com> on 2002/06/03 09:16:59 UTC

Tabs and menu (was: RE: bert skin added)

Thanks David.
I'm working on the menu and tabs now.  The problem I'm having is in knowing 
what file is selected in the sub menu's.  Seems the Cocoon site is still 
having the same problem.

Steven, is your "book.xml on steroids" coping with this problem, or need I 
go further on this?

The Tabs have the same problem.  It's not clear to me whether tabs span a 
sub-directory or a certain number of book.xml files.  I'll have to check 
the archives, unless someone can fill me in here.
What's the selection criteria for the tab?  The most obvious one is "the 
user selected it", but that needs to be stored somewhere.  Where????

Bert

At 13:42 3/06/2002 +1000, you wrote:
>OK this is done now.
>--David
>
>Steven Noels wrote:
> > > David Crossley wrote:
> >
> > > I see that the stylesheet tries to output the document
> > > type declaration by using xsl:output ... However Cocoon
> > > does not do it that way. It is the job of the serializer
> > > to do that.
> >
> > :-(
> >
> > > It is a simple one-line sitemap tweak ...
> > > ---------------------------------------------
> > > diff -r1.1 sitemap.xmap
> > > 29a30
> > > >     <doctype-public>-//W3C//DTD HTML 4.01
> > > Transitional//EN</doctype-public>
> > > ---------------------------------------------
> > >
> > > I have that ready to commit. Is everyone happy to do that?
> > > We discussed this earlier, saying that it was OK to declare
> > > the Public Identifier, but not the System Identifier.
> > > So shall i go ahead?
> >
> > +1
> >
> > </Steven>


Re: Tabs and menu (was: RE: bert skin added)

Posted by Bert Van Kets <be...@vankets.com>.
At 02:25 3/06/2002 -0500, you wrote:
>On Mon, 3 Jun 2002, Bert Van Kets wrote:
>
> > Thanks David.
> > I'm working on the menu and tabs now.  The problem I'm having is in 
> knowing
> > what file is selected in the sub menu's.  Seems the Cocoon site is still
> > having the same problem.
> >
> > Steven, is your "book.xml on steroids" coping with this problem, or need I
> > go further on this?
>
>the idea would be to pass the current request URI as a parameter to the
>book2menu.xsl (nothing special, you get the picture).

I got that running, no prob.  but check out some sub menus on 
xml.apache.org/cocoon and you will see that no menu entry is "selected" 
when you are viewing the content.  We need to go deeper to get the sub 
menus working correctly.

>Why not move the
>tabs in a separate pipeline, too, with an accompagnying book2tabs.xsl.

That is certainly necessary.  I'm working on this.  If you take a directory 
structure to select the correct tab (I did in my project) you have a 
serious limitation on number of directories.  The current directory 
structure is usable, but can we live with this limitation.
In the docs build the selection will be based on root + community/* selection.

Bert


>Using the steroid stuff, we'd move from book.xml to libre.xml - I'll
>commit a sample of its current configuration this afternoon. We're still
>in the process of deciding where libre should go, since it has a scope
>which is broader then forrest/cocoon - it could be possible we post it at
>SF and include a libre.jar in forrest.
>
> > The Tabs have the same problem.  It's not clear to me whether tabs span a
> > sub-directory or a certain number of book.xml files.  I'll have to check
> > the archives, unless someone can fill me in here.
> > What's the selection criteria for the tab?  The most obvious one is "the
> > user selected it", but that needs to be stored somewhere.  Where????
>
>An extra pipeline to start with IMO. I need to run right now, but maybe
>the top level directories in src/documentation/content/xdocs should be
>reflected as tabs... opinions on this?
>
></Steven>


Re: Tabs and menu

Posted by David Crossley <cr...@indexgeo.com.au>.
Bert Van Kets wrote:
> Thanks David.
> I'm working on the menu and tabs now.  The problem I'm having
> is in knowing what file is selected in the sub menu's.

In the documentation pipeline for Cocoon's own xdocs
this is done with the book2menu transformation.
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/documentation/stylesheets/book2menu.xsl
at line 41
it adds a <span class="menuselected"> around the menu item.

The URI of the current page is passed into the stylesheet
via parameter $resource and compared with the href attribute
of the <menu-item>

For some reason this behaviour was dropped when the
initial stylesheets were set up for Forrest.

> Seems the Cocoon site is still having the same problem.

Not sure what you mean here.

> Steven, is your "book.xml on steroids" coping with this problem, or need I 
> go further on this?
> 
> The Tabs have the same problem.  It's not clear to me whether tabs span a 
> sub-directory or a certain number of book.xml files.  I'll have to check 
> the archives, unless someone can fill me in here.
> What's the selection criteria for the tab?  The most obvious one is "the 
> user selected it", but that needs to be stored somewhere.  Where????



Re: Tabs and menu (was: RE: bert skin added)

Posted by Robert Koberg <ro...@koberg.com>.
Steven Noels wrote:

>On Mon, 3 Jun 2002, Bert Van Kets wrote:
>
>  
>
>>Thanks David.
>>I'm working on the menu and tabs now.  The problem I'm having is in knowing 
>>what file is selected in the sub menu's.  Seems the Cocoon site is still 
>>having the same problem.
>>
>>Steven, is your "book.xml on steroids" coping with this problem, or need I 
>>go further on this?
>>    
>>
>
>the idea would be to pass the current request URI as a parameter to the
>book2menu.xsl (nothing special, you get the picture). Why not move the
>tabs in a separate pipeline, too, with an accompagnying book2tabs.xsl.
>

Can this be used to build a snail trail (the linked path to the page, 
e.g.: cocoon : docs : a page)? Does the snail trail have to be hardcoded 
on a content piece?

>
>Using the steroid stuff, we'd move from book.xml to libre.xml - I'll 
>commit a sample of its current configuration this afternoon. We're still 
>in the process of deciding where libre should go, since it has a scope 
>which is broader then forrest/cocoon - it could be possible we post it at 
>SF and include a libre.jar in forrest.
>
>  
>
>>The Tabs have the same problem.  It's not clear to me whether tabs span a 
>>sub-directory or a certain number of book.xml files.  I'll have to check 
>>the archives, unless someone can fill me in here.
>>What's the selection criteria for the tab?  The most obvious one is "the 
>>user selected it", but that needs to be stored somewhere.  Where????
>>    
>>
>
>An extra pipeline to start with IMO. I need to run right now, but maybe
>the top level directories in src/documentation/content/xdocs should be
>reflected as tabs... opinions on this?
>  
>
Does this do anything to address the issue of internal links in content? 
What happens if libre.xml (or any site) gets reorganized? Do you then 
have to go through each content piece and update the links? Using 
chained transformations this way seems to only serve dogma. There is 
much benefit that could be achieved by re-using the libre.xml data (and 
it would be nice if it maintained the same strucutre...) during the 
entire page's transformation.

best,
-Rob


Re: Tabs and menu (was: RE: bert skin added)

Posted by Steven Noels <st...@outerthought.org>.
On Mon, 3 Jun 2002, Bert Van Kets wrote:

> Thanks David.
> I'm working on the menu and tabs now.  The problem I'm having is in knowing 
> what file is selected in the sub menu's.  Seems the Cocoon site is still 
> having the same problem.
> 
> Steven, is your "book.xml on steroids" coping with this problem, or need I 
> go further on this?

the idea would be to pass the current request URI as a parameter to the
book2menu.xsl (nothing special, you get the picture). Why not move the
tabs in a separate pipeline, too, with an accompagnying book2tabs.xsl.

Using the steroid stuff, we'd move from book.xml to libre.xml - I'll 
commit a sample of its current configuration this afternoon. We're still 
in the process of deciding where libre should go, since it has a scope 
which is broader then forrest/cocoon - it could be possible we post it at 
SF and include a libre.jar in forrest.

> The Tabs have the same problem.  It's not clear to me whether tabs span a 
> sub-directory or a certain number of book.xml files.  I'll have to check 
> the archives, unless someone can fill me in here.
> What's the selection criteria for the tab?  The most obvious one is "the 
> user selected it", but that needs to be stored somewhere.  Where????

An extra pipeline to start with IMO. I need to run right now, but maybe
the top level directories in src/documentation/content/xdocs should be
reflected as tabs... opinions on this?

</Steven>