xsl-list
[Top] [All Lists]

AW: WG: frames?

2003-05-02 00:21:05
Hi!

So, after reading following:

http://www.sagehill.net/xml/docbookxsl/HtmlCustomEx.html#HtmlFrames

and especially this one:

http://lists.oasis-open.org/archives/docbook-apps/200206/msg00082.html


i was able to get exactly that, what i wish and decided to post my solution 
here, maybe somebody need this too. The customization is really short, but it 
was not easy for me to get this.

And here the answer to my question:

1. to supress the TOC in the chunks, delete TOC in the parameter 
        <xsl:param name="generate.toc">

2. Overwrite the default root with 
        <xsl:template match="/">
          <xsl:apply-imports /> 
          add own templates

3. Don't forget to set the correct path

4. To generate frameset and left frame use <xsl:document ...

5. Get only toc in left frame with 
        <xsl:apply-templates mode="toc"/>

Here the code:

<!-- Default target for the Links -->
<xsl:param name="target.window" select="'chunkarea'"/>
<xsl:template name="user.head.content">
  <base  target="{$target.window}"/>
</xsl:template>


<!-- root chunk will be called firstpage -->
<xsl:param name="root.filename" select="firstpage" />

<xsl:template match="/">
  <xsl:apply-imports /> 
  <xsl:call-template name="createFrameMaster" /> 

  <!-- Navigation --> 
  <xsl:message>Writing navigation page</xsl:message>

  <xsl:document href="{$base.dir}navbar.html" method="html">
    <html>
      <head>
      <link rel="stylesheet" href="{$html.stylesheet}" type="text/css" />
      <base target="chunkarea" />
      </head>
      <body>
         <!-- get only the TOC -->
         <xsl:apply-templates mode="toc"/>
      </body>
    </html>
  </xsl:document>
</xsl:template>


<xsl:template name="createFrameMaster">
   <xsl:message>Writing frame master</xsl:message>
  
   <xsl:document href="{$base.dir}index.html" method="html">
     <html>
       <frameset cols="38%,*">
         <frame src="navbar.html" name="navbar"    scrolling="auto" 
framespacing="0"  /> 
         <frame src="index.html"  name="chunkarea" scrolling="auto" /> 
       </frameset>
     </html>
   </xsl:document>
</xsl:template>


CU
Anton

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>
  • AW: WG: frames?, Anton Wardaschko (PA) <=