comparison xsls/content.xsls @ 607:a8f7b93b0a5f

Allow article sections to be nested.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 26 Jul 2012 11:36:34 +0000
parents 26dc883805ad
children 3b0ea2ab2b24
comparison
equal deleted inserted replaced
606:cb43695220b2 607:a8f7b93b0a5f
8 X:template = "section[@id and @name]" { 8 X:template = "section[@id and @name]" {
9 <a name="{@id}" /> <center><h4> !{@name} </h4></center> 9 <a name="{@id}" /> <center><h4> !{@name} </h4></center>
10 !!; 10 !!;
11 } 11 }
12 12
13 X:template = "section/section[@id and @name]" {
14 <a name="{@id}" /> <center><h5> !{@name} </h5></center>
15 !!;
16 }
17
13 X:template = "section[@id and not(@name)]" { 18 X:template = "section[@id and not(@name)]" {
14 <a name="{@id}" /> 19 <a name="{@id}" />
15 !!; 20 !!;
16 } 21 }
17 22
18 X:template = "section[not(@id) and @name]" { 23 X:template = "section[not(@id) and @name]" {
19 <center><h4> !{@name} </h4></center> 24 <center><h4> !{@name} </h4></center>
25 !!;
26 }
27
28 X:template = "section/section[not(@id) and @name]" {
29 <center><h5> !{@name} </h5></center>
20 !!; 30 !!;
21 } 31 }
22 32
23 X:template = "para" { <p> !!; </p> } 33 X:template = "para" { <p> !!; </p> }
24 34