[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] How to get a multiple TOC HTMLs from Map2HTMTOC.xsl

Subject: Re: [xsl] How to get a multiple TOC HTMLs from Map2HTMTOC.xsl
From: team wise <dfanster@xxxxxxxxx>
Date: Wed, 18 Jul 2012 20:24:45 +0800

Hi Matthieu
Sorry for being late in replying, as I found out the message I replied
was bounced back.
Thank you for all the points you made below, indeed my goal is to

dynamically render  a Table of Contents by means of a DITA XML Map
driven approach, i.e. having a DITA Map dumped from our CMS as input,
and then having processed by the stylesheet to generate
                first, a couple of HTMLs by resolving @href referenced
in that DITA XML map
               second, a single TOC ( which is not desired) or a
couple of TOCs in HTML, plus        resources such as Graphics.

At the moment,  the problem I have had with the xhtmltoc.XSL written
in 1.0 is I fail to deliver a full TOC, just the HTML link that tops
the map hierarchy is shown up or rendered. I guess it is something to
do with the Xpath expression.
Thank you all the same,

2012/7/17, Matthieu Ricaud-Dussarget <matthieu.ricaud@xxxxxxxxx>:
> Hi Ray,
> I'm not sure I can clearly understand what you want to do from your big
> sample.
> The relevant part is just :
> <xsl:template name="generate-toc">
>    <html>
>      do somethings ...
>    </html>
> </xsl:template>
> isn't it ?
> Anyway form what I understand you want to output multiple files : with
> XSLT2 you can use many <xsl:result-document> with differents @href.
> How many <xsl:result-document> you use and how to make then be applied
> can depend on xml input (is the information there?), hard code in the
> XSLT, given as param to the transformation, etc.
> Using mode for each <xsl:result-document> is a good idea. Think that you
> can also use mode="#all" or mode="mode1 mode2" if there are templates
> that should be the same.
> By the way, instead of formating the output with <xsl:value-of
> select="$newline"/>, I suggest you use <xsl:output> with good attributes
> (@indent="yes|no", @method="xml|text|xhtml").
> Hope this helps,
> Regards,
> Matthieu.

Current Thread