changeset 590:05761a8e38f6

Added an option to disable generation of TOC.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 19 Jul 2012 04:56:13 +0000
parents 764fbac1b8b4
children b57657247299
files dtd/article.dtd dtd/module.dtd xsls/body.xsls
diffstat 3 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dtd/article.dtd
+++ b/dtd/article.dtd
@@ -12,6 +12,7 @@
            author       CDATA #IMPLIED
            editor       CDATA #IMPLIED
            translator   CDATA #IMPLIED
+           toc          (yes | no) "yes"
 >
 
 <!ENTITY % content      SYSTEM  "content.dtd" >
--- a/dtd/module.dtd
+++ b/dtd/module.dtd
@@ -10,6 +10,7 @@
             link        CDATA #REQUIRED
             lang        CDATA #REQUIRED
             rev         CDATA #IMPLIED
+            toc         (yes | no) "yes"
 >
 
 <!ELEMENT   section     (directive | para)+ >
--- a/xsls/body.xsls
+++ b/xsls/body.xsls
@@ -39,7 +39,7 @@ X:template body (lang) {
 
     <tr><td valign="top">
 
-        X:if "section[@name]" {
+        X:if "@toc = 'yes' and section[@id and @name]" {
             <table width="100%"><tr><td align="{$INDEX_ALIGN}">
             X:for-each "section[@id and @name]" {
                 <a href="#{@id}"> !{@name} </a><br/>