Michael,
Thank you for your reply. Actually I picked up XSLT 2. (3rd addition) and its been very helpful. I was able to creat e a TOC for my XML project. Now i am stuck on the index.
Taking this example
http://www.xml.com/cookbooks/xsltckb...tion.csp?day=1 I am trying to apply it to my xml files.
Here is some info on the XML element "indexterm"
it has two attributes @id and @name. I am using the @id for cross referencing later.
Thanks for the help.
This is what I have so far
Code:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:saxon="http://icl.com/saxon"
extension-element-prefixes="saxon">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:apply-templates select="*" mode="index"/>
<xsl:apply-templates select="*" mode="content"/>
</xsl:template>
<xsl:template match="JBU:indexterm" mode="index">
<saxon:output href="index.html">
<html>
<head>
<title>Index</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h1>Index</h1>
<xsl:apply-templates mode="index"/>
</body>
</html>
</saxon:output>
</xsl:template>
<xsl:template match="JBU:indexterm" mode="index">
<h2>
<a href="{concat(@name,'.html')}">
<xsl:value-of select="@id"/>
</a>
</h2>
</xsl:template>
<xsl:template match="JBU:indexterm" mode="content">
<saxon:output href="{@name}.html">
<html>
<head>
<title><xsl:value-of select="@id"/> Sales</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<h1><xsl:value-of select="@id"/> Sales</h1>
<ol>
<xsl:apply-templates mode="content"/>
</ol>
</body>
</html>
</saxon:output>
</xsl:template>
</xsl:stylesheet>