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

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

Subject: [xsl] How to get a multiple TOC HTMLs from Map2HTMTOC.xsl
From: team wise <dfanster@xxxxxxxxx>
Date: Tue, 17 Jul 2012 22:40:56 +0800

Dear list readers,

I have a style sheet called map2htmtoc.XSL stylesheet written in XSLT
1.0, if I need to apply lines of code snippet as follows to generate a
couple of different 'TOC's as HTML,
how to achieve that?

<xsl:template name="generate-toc">
  <html><xsl:value-of select="$newline"/>
  <head><xsl:value-of select="$newline"/>
    <xsl:if test="string-length($contenttarget)>0 and
      <base target="{$contenttarget}"/>
      <xsl:value-of select="$newline"/>
    <!-- initial meta information -->
    <xsl:call-template name="generateCharset"/>   <!-- Set the
character set to UTF-8 -->
    <xsl:call-template name="generateDefaultCopyright"/> <!-- Generate
a default copyright, if needed -->
    <xsl:call-template name="generateDefaultMeta"/> <!-- Standard meta
for security, robots, etc -->
    <xsl:call-template name="copyright"/>         <!-- Generate
copyright, if specified manually -->
    <xsl:call-template name="generateCssLinks"/>  <!-- Generate links
to CSS files -->
    <xsl:call-template name="generateMapTitle"/> <!-- Generate the
<title> element -->
    <xsl:call-template name="gen-user-head" />    <!-- include user's
XSL HEAD processing here -->
    <xsl:call-template name="gen-user-scripts" /> <!-- include user's
XSL javascripts here -->
    <xsl:call-template name="gen-user-styles" />  <!-- include user's
XSL style element and content here -->
  </head><xsl:value-of select="$newline"/>


  <div class="container top">

<div class="header">


<span class="logo">

          <xsl:element name="img">

            <xsl:attribute name="src">../images/logo.png</xsl:attribute>

          <xsl:attribute name="alt">SOY</xsl:attribute>



<a href="index.html" class="title">Help</a></h1>

<div class="nav">

  <xsl:apply-templates select="." mode="generate-dynamic-toc"/>



<div class="section">


<span class="category-name">App</span>

<span class="model-name">"" Application</span>



<div class="main-visual">

<div class="banner">

  <xsl:element name="img">

            <xsl:attribute name="src">../images/p_cover.png</xsl:attribute>

          <xsl:attribute name="alt"></xsl:attribute>




<div class="information pattern2">

<p>This manual used as you have some trouble or you do not know how to
use the "" Application.<br />

<a href="contents/t0900_trademark.html">Trademarks</a>



<div class="return-pagetop">

<a href="#top">

  <xsl:element name="img">


          <xsl:attribute name="alt"></xsl:attribute>

          </xsl:element>Go to Page Top




<div class="footer">

<div class="copyright">2012</div>



<xsl:if test="string-length($OUTPUTCLASS) &gt; 0">
       <xsl:attribute name="class">
         <xsl:value-of select="$OUTPUTCLASS"/>
     <xsl:value-of select="$newline"/>
   </body><xsl:value-of select="$newline"/>

At this point of time, I could implement a variety of  apply-templates
in different modes, subject to conditions, for example,

<xsl:apply-templates select="." mode="generate-dynamic-toc"/>

<xsl:apply-templates select="." mode="generate-dynamic-toc2"/>

<xsl:apply-templates select="." mode="generate-dynamic-toc3"/>

<xsl:apply-templates select="." mode="generate-dynamic-toc4 "/> ,etc,
the current template applys a XSL document instruction to get just one
TOC HTML file.

 <xsl:document href="{$OUTPUTDIR}\{$transformedLngValue}\toc.html">

if I need to get mutiple TOC*.html, what is the right syntax? Does
removing the document instruction make a diferenece?

I greatly appreciate if anyone out there can share your thoughts.

Keep an Exacting Eye for Detail

Current Thread