You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Ramon Prades <rp...@porcelanosa.com> on 2003/08/22 12:18:48 UTC

document attributs

Hi all
 
Wouldn't it be a good idea to add a bit mnore control on the final
appearance of the forrest document.
 
One of the things I would like is to be able of telling Forrest when NOT to
generate the TOC at the beginning of the rendered document. Another thing I
think would be useful is to have control on how deep to scan for "title"
elements to generate the above toc (at the moment forrest includes only two
levels).
 
I think this could be done adding a couple of optional attributes to the
root element.
 
For example:
 
<document notoc="true" >
 
This will tell forrest not to generate the TOC for this document.
 
Another example:
 
<document toclevel="3">
 
This will tell forrest to include up to the third level of "title" in the
TOC.
 
Please share your thoughts with the list and if more people find this could
be good I can do it myself and post it here.
 
Thanks
 
Ramon Prades
 

RE: document attributs

Posted by Ramon Prades <rp...@porcelanosa.com>.
Hi Jeff

Sometimes it's useful not to show the mini-TOC. For an example have a look
at the DTD documentation in the Forrest site.
You'll see a few lines with the bullet and nothing else.

This could be solved by telling XSL not to generate the link when when the
title element is empty, but also with the attribute.

For me, the more important attribute is the other one I mentioned in my
first e-mail: toclevel. I have a few very long
documents and I would like to decide how deep should the mini-TOC go. In
fact, a "toclevel=0" would completely remove the mini-TOC.

I think this attribute should be in the document. Someway, this attribute is
qualifying the content, stating which ones are the most relevant levels in
the doc.

Regards.





-----Mensaje original-----
De: Jeff Turner [mailto:jefft@apache.org] 
Enviado el: lunes, 25 de agosto de 2003 12:24
Para: forrest-dev@xml.apache.org
Asunto: Re: document attributs


On Mon, Aug 25, 2003 at 08:18:15AM +0200, Ramon Prades wrote:
> Hi Jeff
> 
> I agree having those attributes in the xml doc is mixing layers, but I 
> still think we need a way to produce slightly different documents. I 
> mean, a flag in skinconf would disable the TOC in all documents, but 
> not in only a few of them.
> 
> Perhaps site.xml is a better place? It would be something like:
> 
>  <index label="Index" href="index.html" notoc="true"/>

What makes a page special, that it does not require a mini-TOC?  That
information (the cause) would be more valuable to record than just
notoc=true (the effect).

--Jeff

> Regards.
> 
> Ramon
> 




Re: document attributs

Posted by Jeff Turner <je...@apache.org>.
On Mon, Aug 25, 2003 at 08:18:15AM +0200, Ramon Prades wrote:
> Hi Jeff
> 
> I agree having those attributes in the xml doc is mixing layers, but I still
> think we need a way to produce slightly different documents. I mean, a flag
> in skinconf would disable the TOC in all documents, but not in only a few of
> them.
> 
> Perhaps site.xml is a better place? It would be something like:
> 
>  <index label="Index" href="index.html" notoc="true"/>

What makes a page special, that it does not require a mini-TOC?  That
information (the cause) would be more valuable to record than just
notoc=true (the effect).

--Jeff

> Regards.
> 
> Ramon
> 

RE: document attributs

Posted by Ramon Prades <rp...@porcelanosa.com>.
Hi Jeff

I agree having those attributes in the xml doc is mixing layers, but I still
think we need a way to produce slightly different documents. I mean, a flag
in skinconf would disable the TOC in all documents, but not in only a few of
them.

Perhaps site.xml is a better place? It would be something like:

 <index label="Index" href="index.html" notoc="true"/>

Regards.

Ramon


-----Mensaje original-----
De: Jeff Turner [mailto:jefft@apache.org] 
Enviado el: sábado, 23 de agosto de 2003 9:52
Para: forrest-dev@xml.apache.org
Asunto: Re: document attributs


On Fri, Aug 22, 2003 at 12:18:48PM +0200, Ramon Prades wrote:
> Hi all
>  
> Wouldn't it be a good idea to add a bit mnore control on the final 
> appearance of the forrest document.
>  
> One of the things I would like is to be able of telling Forrest when 
> NOT to generate the TOC at the beginning of the rendered document. 
> Another thing I think would be useful is to have control on how deep 
> to scan for "title" elements to generate the above toc (at the moment 
> forrest includes only two levels).
>  
> I think this could be done adding a couple of optional attributes to 
> the root element.
>  
> For example:
>  
> <document notoc="true" >
>  
> This will tell forrest not to generate the TOC for this document.
>  
> Another example:
>  
> <document toclevel="3">
>  
> This will tell forrest to include up to the third level of "title" in 
> the TOC.
>  
> Please share your thoughts with the list and if more people find this 
> could be good I can do it myself and post it here.

Sounds nice.

Whether to generate a toc is up to the skin, which is in the presentation
layer. The flag shouldn't be in the XML content, as that mixes concerns.

How about adding a flag to skinconf.xml for this?

--Jeff

> Thanks
>  
> Ramon Prades
>  




Re: document attributs

Posted by Jeff Turner <je...@apache.org>.
On Fri, Aug 22, 2003 at 12:18:48PM +0200, Ramon Prades wrote:
> Hi all
>  
> Wouldn't it be a good idea to add a bit mnore control on the final
> appearance of the forrest document.
>  
> One of the things I would like is to be able of telling Forrest when NOT to
> generate the TOC at the beginning of the rendered document. Another thing I
> think would be useful is to have control on how deep to scan for "title"
> elements to generate the above toc (at the moment forrest includes only two
> levels).
>  
> I think this could be done adding a couple of optional attributes to the
> root element.
>  
> For example:
>  
> <document notoc="true" >
>  
> This will tell forrest not to generate the TOC for this document.
>  
> Another example:
>  
> <document toclevel="3">
>  
> This will tell forrest to include up to the third level of "title" in the
> TOC.
>  
> Please share your thoughts with the list and if more people find this could
> be good I can do it myself and post it here.

Sounds nice.

Whether to generate a toc is up to the skin, which is in the presentation
layer. The flag shouldn't be in the XML content, as that mixes concerns.

How about adding a flag to skinconf.xml for this?

--Jeff

> Thanks
>  
> Ramon Prades
>