You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by ch...@che-che.com on 2004/03/01 18:12:57 UTC

Re: Started getting missing elements in skinconf...

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?.


Cheers,
Cheche



> On Fri, Feb 27, 2004 at 11:50:29AM -0700, Adam R. B. Jack wrote:
> > I keep updating my local forrest in the hope that some version will
enable
> > me to build Jakarta Gump site again, but even with -debug all I ever
get is:
> > 
> >     validate-skinconf:
> >     F:\data\OSS\jakarta-gump\src\documentation\skinconf.xml:122:12:
error:
> > required
> >     elements missing
> > 
> >     BUILD FAILED
> >     F:\data\OSS\forrest\targets\validate.xml:145: Validation failed,
> > messages should
> >      have been provided.
> 
> I get the same error on my 0.5.1 site.  Seems the problem is this commit:
>  
> On Tue, Jan 20, 2004 at 10:10:58PM -0000, cheche@apache.org wrote:
> ...
> >   Log:
> >   Upgrade to Jing version 20030619
> ...
> >   Index: skinconf.rnc
> >   ===================================================================
> >   RCS file:
/home/cvs/xml-forrest/src/core/context/resources/schema/relaxng/skinconf.rnc,v
> >   retrieving revision 1.3
> >   retrieving revision 1.4
> >   diff -u -r1.3 -r1.4
> >   --- skinconf.rnc»···3 Jan 2004 15:35:01 -0000»··1.3
> >   +++ skinconf.rnc»···20 Jan 2004 22:10:58 -0000»·1.4
> >   @@ -29,7 +29,7 @@
> >                element year {text}?,                    # Used in
Copyright
> >                element vendor {text}?,                  # Used in
Copyright
> >                trail?,                                  #
'Breadcrumbs' trail in skins that support it
> >   -            element toc {(attribute level {text}, attribute
location {text})}?, # toc generation
> >   +            element toc {attribute level {text}?, attribute
location {string}?}, # toc generation
> >                colors?,                                 # colors
> >                element extra-css {text}?,               # extra css
to be included in the CSS output
> >                credits?
> 
> Anyone know why 'toc' was made mandatory here, if its children are both
> optional?
> 
> 
> --Jeff
> 
> > 
> > Adam
> 




Re: Started getting missing elements in skinconf...

Posted by Moshe Yudkowsky <ms...@bl.com>.
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>