Mercurial > hg > nginx-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
109:6d801bb6e5ed | 110:40eec261c2a6 |
---|---|
3 X:template = "section[@id and @name]" { | 3 X:template = "section[@id and @name]" { |
4 <a name="{@id}" /> <center><h4> !{@name} </h4></center> | 4 <a name="{@id}" /> <center><h4> !{@name} </h4></center> |
5 !!; | 5 !!; |
6 } | 6 } |
7 | 7 |
8 X:template = "section[not(@id) and @name]" { | 8 X:template = "section[@id and not(@name)]" { |
9 <center><h4> !{@name} </h4></center> | 9 <a name="{@id}" /> |
10 !!; | 10 !!; |
11 } | 11 } |
12 | 12 |
13 X:template = "section[not(@id) and not(@name)]" { !!; } | |
14 | |
15 <!-- legacy section templates --> | 13 <!-- legacy section templates --> |
16 | 14 |
17 X:template = "section[@name and @title]" { | 15 X:template = "section[not(@id) and @name and @title]" { |
18 <a name="{@name}" /> <center><h4> !{@title} </h4></center> | 16 <a name="{@name}" /> <center><h4> !{@title} </h4></center> |
19 !!; | 17 !!; |
20 } | 18 } |
21 | 19 |
22 X:template = "section[not(@name) and @title]" { | 20 X:template = "section[not(@id) and not(@name) and @title]" { |
23 <center><h4> !{@title} </h4></center> | 21 <center><h4> !{@title} </h4></center> |
24 !!; | 22 !!; |
25 } | 23 } |
26 | 24 |
27 X:template = "section[not(@name) and not(@title)]" { !!; } | 25 X:template = "section[not(@id) and not(@name) and not(@title)]" { !!; } |
28 | 26 |
29 <!-- --> | 27 <!-- --> |
30 | 28 |
31 X:template = "para" { <p> !!; </p> } | 29 X:template = "para" { <p> !!; </p> } |
32 | 30 |