forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <ferdin...@apache.org>
Subject Re: Define TOC per page, generating TOC for the whole documentation
Date Fri, 18 Nov 2005 11:22:22 GMT

>> Another option would be to add extra-css in skinconfig to hide the
>> toc. To do that on a by-document-bases you'd have to have a class or
>> id-attribute in the body-element so that you could create a selective
>> css-selector.

> That means adding rendering information to the document. Of course the
> renderer could choose to ignore it. It's a workable solution though and
> a little easier to implement than modifying the skin.

I disagree. The class attributes could very well be sematical or
functional markup) and does not violate the separation of concerns
since it only denotes function or meaning whereas the actual rendering
information is stored on extra-css as part of the skin where it
belongs.

Problem might be that the transformations from XDoc to html might not
carry the class attribute all the way into the body tag of the final
document.

> However, modifying the skin is better for Forrest as a whole ;-)

Well I added this alternative because I think it is sometimes a good
idea to utilize what we already have (experiment with it, explain it,
document it) rather than pushing for new developments all the time.

>> Two more work-arounds:
>> 
>> - Forrest will not list headings that are embedded in other elements
>>   such as tables or div in the TOC.

> Not recommended. Using a "feature" like this (some would say "bug like
> this") could result in your page being rendered differently in a future
> version of Forrest.

Yup. Although - given our recent discussion on fixes and changes -
since this is not a bug (because in XDoc grammar h-elements must not
be embedded in divs or tables) any change to that behaviour would have
to made an option, would it not?

>> - You can use p-Elements for the headings that you don't want to show,
>>   add a class="whatYouLike" and format those with extra CSS to look
>>   like a heading. Although, I must admit, this is rather a nasty hack!

> Even worse, now your document no longer has the defined structure it 
> should have.

One of those rare occation where we actually agree on something :-)

--
Ferdinand Soethe


Mime
View raw message