OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [docbook-apps] Section TOCs in HTML: Placing after intro text


I was using some old 1.69.1 stylesheets on my laptop. 
I have found that the html/sections.xsl import is not needed when using the 1.76 stylesheets.

--- On Fri, 2/9/11, Bob Stayton <bobs@sagehill.net> wrote:

> From: Bob Stayton <bobs@sagehill.net>
> Subject: Re: [docbook-apps] Section TOCs in HTML: Placing after intro text
> To: "mike 675" <m_mclaug@yahoo.co.uk>, docbook-apps@lists.oasis-open.org
> Date: Friday, 2 September, 2011, 21:17
> I'm a little concerned that you had
> to import the html/sections.xsl stylesheet 
> separately.  That indicates something is not
> configured properly.  If you import 
> html/docbook.xsl (either directly, or indirectly through
> the chunking stylesheet), you 
> should also be importing sections.xsl.
> 
> The template named 'id.warning' has been in the stylesheet
> distributions since version 
> 1.70 and 'common.html.attributes' since 1.75.  If you
> are importing the latest, those 
> templates should automatically be included.
> 
> Can you describe your import setup a bit more?
> 
> Bob Stayton
> Sagehill Enterprises
> bobs@sagehill.net
> 
> 
> ----- Original Message ----- 
> From: "mike 675" <m_mclaug@yahoo.co.uk>
> To: <docbook-apps@lists.oasis-open.org>
> Sent: Friday, September 02, 2011 12:08 PM
> Subject: Re: [docbook-apps] Section TOCs in HTML: Placing
> after intro text
> 
> 
> >
> > I fixed this by updating to the latest stylesheets,
> and importing the
> > html/sections.xsl stylesheet.
> > The fix works, apart from the top-level TOC in a
> chapter. This is still
> > placed before any intro text.
> > I suppose a similar fix, this time matching on
> chapters is required?
> >
> > mike 675 wrote:
> >>
> >> OK. I've gone away and learned more about XSL. So
> I can more or less
> >> follow what is going on in Bob's code.
> >> But I get the following runtime errors about
> call-template:
> >> xsl:call-template : template
> common.html.attributes not found
> >> ...
> >> xsl:call-template : template id.warning not found
> >>
> >> What do I need to include to make these templates
> available?
> >> Thanks
> >> Mike
> >>
> >> Bob Stayton wrote:
> >>>
> >>> Ah, that's correct.  I was thinking toc
> was permitted at the end of a
> >>> section, but
> >>> that's not the case here.  You probably
> didn't want to do it manually
> >>> anyway.  8^)
> >>>
> >>> Here is a customization of the section
> template that does it
> >>> automatically.  Delete
> >>> the "d:" namespace prefixes if you are using
> the non-namespaced
> >>> stylesheets.
> >>>
> >>>
> >>> <xsl:template match="d:section">
> >>>   <xsl:variable name="depth"
> select="count(ancestor::d:section)+1"/>
> >>>
> >>>   <xsl:call-template
> name="id.warning"/>
> >>>
> >>>   <div>
> >>>     <xsl:call-template
> name="common.html.attributes">
> >>>   
>    <xsl:with-param name="inherit"
> select="1"/>
> >>> 
>    </xsl:call-template>
> >>>     <xsl:call-template
> name="section.titlepage"/>
> >>>
> >>>     <xsl:variable
> name="toc.params">
> >>>   
>    <xsl:call-template
> name="find.path.params">
> >>>     
>    <xsl:with-param name="table"
> >>> select="normalize-space($generate.toc)"/>
> >>>   
>    </xsl:call-template>
> >>>     </xsl:variable>
> >>>
> >>> 
>    <xsl:apply-templates
> select="node()[not(self::d:section)]"/>
> >>>
> >>>     <xsl:if
> test="contains($toc.params, 'toc')
> >>>           
>        and $depth &lt;=
> $generate.section.toc.level">
> >>>   
>    <xsl:call-template
> name="section.toc">
> >>>     
>    <xsl:with-param name="toc.title.p"
> select="contains($toc.params,
> >>> 'title')"/>
> >>>   
>    </xsl:call-template>
> >>>   
>    <xsl:call-template
> name="section.toc.separator"/>
> >>>     </xsl:if>
> >>>
> >>> 
>    <xsl:apply-templates
> select="d:section"/>
> >>>
> >>>     <xsl:call-template
> name="process.chunk.footnotes"/>
> >>>   </div>
> >>> </xsl:template>
> >>>
> >>> The first xsl:apply-templates processes all
> children except sub-sections,
> >>> then the
> >>> section toc is processed, and then all section
> children are processed
> >>> with the second
> >>> xsl:apply-templates.
> >>>
> >>> If you are chunking, then be sure to set up
> the customization correctly
> >>> with two files
> >>> as described here:
> >>>
> >>> http://www.sagehill.net/docbookxsl/ChunkingCustomization.html
> >>>
> >>> This customization goes in the customization
> file for single-page output.
> >>> If you put
> >>> it in the customization of chunk.xsl, then it
> won't work.
> >>>
> >>> Bob Stayton
> >>> Sagehill Enterprises
> >>> bobs@sagehill.net
> >>>
> >>>
> >>> ----- Original Message ----- 
> >>> From: "mike 675" <m_mclaug@yahoo.co.uk>
> >>> To: <docbook-apps@lists.oasis-open.org>
> >>> Sent: Wednesday, August 24, 2011 4:21 AM
> >>> Subject: Re: [docbook-apps] Section TOCs in
> HTML: Placing after intro
> >>> text
> >>>
> >>>
> >>>>
> >>>> docBook won't let me insert a <toc/>
> element. the following doc
> >>>> structure is
> >>>> invalid:
> >>>>
> >>>> <section>
> >>>>    <title>Installing ABC
> Software</title>
> >>>>   <para>
> >>>>      This section describes
> the things you must do before
> >>>>     installing ABC.
> >>>>    </para>
> >>>> <para>The following topics are
> covered:</para>
> >>>>    <toc/>
> >>>>
> >>>>    <section>
> >>>>    ...
> >>>>   </section>
> >>>>  <section>
> >>>>    ...
> >>>>   </section>
> >>>>
> >>>> </section>
> >>>>
> >>>>
> >>>> Bob Stayton wrote:
> >>>>>
> >>>>> Hi,
> >>>>> That one is easily supported by the
> stylesheets.  You can put an empty
> >>>>> <toc/> element
> >>>>> where you want the mini-toc to
> appear.
> >>>>>
> >>>>
> >>>> -- 
> >>>> View this message in context:
> >>>> http://old.nabble.com/Section-TOCs-in-HTML%3A-Placing-after-intro-text-tp32317596p32325610.html
> >>>> Sent from the docbook apps mailing list
> archive at Nabble.com.
> >>>>
> >>>>
> >>>>
> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >>>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >>>>
> >>>>
> >>>>
> >>>
> >>>
> >>>
> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> >>> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >>>
> >>>
> >>>
> >>
> >>
> >
> > -- 
> > View this message in context: 
> > http://old.nabble.com/Section-TOCs-in-HTML%3A-Placing-after-intro-text-tp32317596p32389015.html
> > Sent from the docbook apps mailing list archive at
> Nabble.com.
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
> >
> >
> > 
> 
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]