forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Moshe Yudkowsky <msha4...@bl.com>
Subject Re: Started getting missing elements in skinconf...
Date Mon, 01 Mar 2004 17:55:00 GMT
cheche@che-che.com wrote:
> Jeff,
> That should not be like that. The optional element is toc not location.
> I have just fixed.
> 
> 
> For some strange reason on
> src/core/context/skins/common/xslt/html/document2html.xsl we define a
> default value of 2:
> 
>  <xsl:variable name="max-depth">
>     <xsl:choose>
>       <xsl:when test="string-length($config-max-depth)&gt;0">
>         <xsl:value-of select="$config-max-depth"/>
>       </xsl:when>
>       <xsl:otherwise>2</xsl:otherwise>
>     </xsl:choose>
>   </xsl:variable>
> 
> 
> So, you can have on your skinconf.xml :
> 
>   <toc location="page"/>
> 
> If we want to have default values, would not be better to do out of the
> stylesheet?.

If we're fooling with the TOC, then here's something else to be parameterized: 
the number of sections to have before generating a toc.

In document2html.xsl, we see:

<xsl:if test="count($tocroot/section) > 0">

Which means that we generate a TOC even if there's only one section on the 
page. I've changed mine to ">1" because I think it's better not to have a TOC 
with only one section on the page.

So if we're nominating candidates for parameterization, I nominate this unnamed 
parameter.

-- 
  Moshe Yudkowsky
  Disaggregate
  2952 W Fargo
  Chicago, IL 60645 USA

  <http://www.Disaggregate.com>

Mime
View raw message