# HG changeset patch # User Ruslan Ermilov # Date 1342673773 0 # Node ID 05761a8e38f60df96e32a57ef2e1fbde53281bbe # Parent 764fbac1b8b405a4b229da7d231c617ac61a50bf Added an option to disable generation of TOC. diff --git a/dtd/article.dtd b/dtd/article.dtd --- 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" > diff --git a/dtd/module.dtd b/dtd/module.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" > diff --git a/xsls/body.xsls b/xsls/body.xsls --- a/xsls/body.xsls +++ b/xsls/body.xsls @@ -39,7 +39,7 @@ X:template body (lang) { - X:if "section[@name]" { + X:if "@toc = 'yes' and section[@id and @name]" {
X:for-each "section[@id and @name]" { !{@name}