← Prev in month ← Prev in thread
Next in thread → Next in month →

TOC / document function

From
Joe Hines <>
Date
2007-11-14T19:50:45+00:00
ID
Thread
TOC / document function
I'm trying to import a docbook chapter from an external docbook formatted XML file and am having some trouble with the table of contents.
 
I have the following template in my customization layer:
 
<xsl:template match="chapter[@file]">
  <xsl:variable name="chapterfile" select="document(@file)"/>
  <xsl:apply-templates select="$chapterfile//*"/>
 </xsl:template>
 
And in my XML document have the following line:
 
<chapter file="testdoc.xml"/>
 
The contents of testdoc.xml are:
 
<!DOCTYPE book SYSTEM "file:///C:/xml/docbook-xml-4.5/docbookx.dtd">
<book>
 <chapter>
  <title>TEST</title>
  <section>
   <title>TEST</title>
   <para>
    TEST 1
   </para>
   <para>
    TEST 2
   </para>
...
  </section>
...
</chapter>
</book>
 
 
Running this with xsltproc with the docbook htmlhelp templates, the correct file chunking occurs, and the chapter loaded from testdoc.xml has the correct table of contents and content, BUT the table of contents for the entire book only contains this chapter "Chapter 1" in the book's table of contents, not loading the chapter title, or any of the subsections. I'm trying to get this table of contents working correctly with externally loaded chapters, any ideas?
 
Thanks,
J.
← Prev in month ← Prev in thread
Next in thread → Next in month →