Mercurial > hg > nginx-site
changeset 607:a8f7b93b0a5f
Allow article sections to be nested.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 26 Jul 2012 11:36:34 +0000 |
parents | cb43695220b2 |
children | 34b0e74528a5 |
files | dtd/content.dtd xsls/body.xsls xsls/content.xsls |
diffstat | 3 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/dtd/content.dtd Tue Jul 24 10:18:38 2012 +0000 +++ b/dtd/content.dtd Thu Jul 26 11:36:34 2012 +0000 @@ -4,7 +4,7 @@ --> <!ELEMENT section (para | list | book | download | security | note | - programlisting)* > + programlisting | section)* > <!ATTLIST section id ID #IMPLIED name CDATA #IMPLIED
--- a/xsls/body.xsls Tue Jul 24 10:18:38 2012 +0000 +++ b/xsls/body.xsls Thu Jul 26 11:36:34 2012 +0000 @@ -66,6 +66,10 @@ <table width="100%"><tr><td align="{$INDEX_ALIGN}"> X:for-each "section[@id and @name]" { <a href="#{@id}"> !{@name} </a><br/> + X:for-each "section[@id and @name]" { + X:text{     } + <a href="#{@id}"> !{@name} </a><br/> + } X:if "@id = 'directives'" { X:for-each "directive[@name]" { X:text{     }
--- a/xsls/content.xsls Tue Jul 24 10:18:38 2012 +0000 +++ b/xsls/content.xsls Thu Jul 26 11:36:34 2012 +0000 @@ -10,6 +10,11 @@ !!; } + X:template = "section/section[@id and @name]" { + <a name="{@id}" /> <center><h5> !{@name} </h5></center> + !!; + } + X:template = "section[@id and not(@name)]" { <a name="{@id}" /> !!; @@ -20,6 +25,11 @@ !!; } + X:template = "section/section[not(@id) and @name]" { + <center><h5> !{@name} </h5></center> + !!; + } + X:template = "para" { <p> !!; </p> } X:template = "para[@align]" { <p align="{@align}"> !!; </p> }