xsl-list
[Top] [All Lists]

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

2012-07-18 07:24:58
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(_dot_)ricaud(_at_)igs-cp(_dot_)fr>:
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.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>