<?xml version="1.0" encoding="ISO-8859-1" ?> 
<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:toc="http://www.bea.com/help/toc.xsd">

  <xsl:template match="/">
var tocTab = new Array();
tocTab[0] = new Array ("0", "", "../workshop/ovwWorkshopMainTopic.html");
<xsl:apply-templates />
var nCols = 16;
  </xsl:template>

  <xsl:template match="toc:toc-root">
    <xsl:apply-templates />
  </xsl:template>

  <xsl:template match="toc:toc-anchor">
    <xsl:call-template name="any-node" />
  </xsl:template>

  <xsl:template match="toc:toc-node">
    <xsl:call-template name="any-node" />
  </xsl:template>

  <xsl:template name="any-node">
    <xsl:choose>
      <!-- if the entry has a url, give the entry a link -->
      <xsl:when test="@url">
tocTab[<xsl:number level="any" count="toc:toc-anchor|toc:toc-node"/>] = new Array ("<xsl:number level="multiple" count="toc:toc-anchor|toc:toc-node"/>", "<xsl:value-of select="@label" />", "<xsl:value-of select="@url"/>");
        <xsl:apply-templates />
      </xsl:when>
      <xsl:otherwise>
        <!-- use a blank url -->
tocTab[<xsl:number level="any" count="toc:toc-anchor|toc:toc-node"/>] = new Array ("<xsl:number level="multiple" count="toc:toc-anchor|toc:toc-node"/>", "<xsl:value-of select="@label" />", "blank.html");
        <xsl:apply-templates />
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

</xsl:stylesheet>
