diff xsls/content.xsls @ 110:40eec261c2a6

Added proper support for anonymous sections, notably for the summary. Changed DTD to always require section IDs.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 20 Oct 2011 09:19:41 +0000
parents b2e9c172a156
children 49443032011c
line wrap: on
line diff
--- a/xsls/content.xsls	Thu Oct 20 09:15:04 2011 +0000
+++ b/xsls/content.xsls	Thu Oct 20 09:19:41 2011 +0000
@@ -5,26 +5,24 @@
 	!!;
     }
 
-    X:template = "section[not(@id) and @name]" {
-	<center><h4> !{@name} </h4></center>
+    X:template = "section[@id and not(@name)]" {
+	<a name="{@id}" />
 	!!;
     }
 
-    X:template = "section[not(@id) and not(@name)]" { !!; }
-
     <!-- legacy section templates -->
 
-    X:template = "section[@name and @title]" {
+    X:template = "section[not(@id) and @name and @title]" {
 	<a name="{@name}" /> <center><h4> !{@title} </h4></center>
 	!!;
     }
 
-    X:template = "section[not(@name) and @title]" {
+    X:template = "section[not(@id) and not(@name) and @title]" {
 	<center><h4> !{@title} </h4></center>
 	!!;
     }
 
-    X:template = "section[not(@name) and not(@title)]" { !!; }
+    X:template = "section[not(@id) and not(@name) and not(@title)]" { !!; }
 
     <!-- -->