changeset 131:8beaff4b3b6b

Empty table was generated if document has no sections, or they are all anonymous.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 21 Oct 2011 14:20:17 +0000
parents 3052a722a1a4
children 1ebe107b3d7e
files xsls/body.xsls
diffstat 1 files changed, 10 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/xsls/body.xsls
+++ b/xsls/body.xsls
@@ -34,17 +34,19 @@ X:template body (lang) {
 
     <tr><td valign="top">
 
-        <table width="100%"><tr><td align="{$INDEX_ALIGN}">
-        X:for-each "section[@id and @name]" {
-            <a href="#{@id}"> !{@name} </a><br/>
-            X:if "@id = 'directives'" {
-                X:for-each "directive[@name]" {
-                    X:text{&#160;&#160;&#160;&#160;&#160;}
-                    <a href="#{@name}"> !{@name} </a><br/>
+        X:if "section[@name]" {
+            <table width="100%"><tr><td align="{$INDEX_ALIGN}">
+            X:for-each "section[@id and @name]" {
+                <a href="#{@id}"> !{@name} </a><br/>
+                X:if "@id = 'directives'" {
+                    X:for-each "directive[@name]" {
+                        X:text{&#160;&#160;&#160;&#160;&#160;}
+                        <a href="#{@name}"> !{@name} </a><br/>
+                    }
                 }
             }
+            </td></tr></table>
         }
-        </td></tr></table>
 
         !!;