Mercurial > hg > nginx-site
diff xsls/directive.xsls @ 104:3ae68fe2e938
A nicer look for the directive's synopsis section, including i18n
for "syntax", "default", "context", and "any (context)" strings.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Wed, 19 Oct 2011 08:29:21 +0000 |
parents | c76a257f3fd4 |
children | 72524ae53106 |
line wrap: on
line diff
--- a/xsls/directive.xsls +++ b/xsls/directive.xsls @@ -4,11 +4,13 @@ X:stylesheet { <a name="{@name}"/> <!-- <center><h4> !{@name} </h4></center> --> <div class="directive"> + <table cellspacing="0"> !! "syntax"; !! "default"; !! "context"; + </table> X:if "(@appeared-in)" { - <strong>appeared in version</strong>: !{@appeared-in} + <p>This directive appeared in version !{@appeared-in}.</p> } </div> !! "para"; @@ -16,9 +18,19 @@ X:stylesheet { X:template = "syntax" { X:if "position() = 1" { - <strong>syntax</strong>: - } else { - <code>       </code> + X:text disable-output-escaping="yes" { + <tr valign="top"> + <td> + } + <strong> + !{document(concat($XML, '/i18n.xml')) + /i18n/text[@lang = $LANG]/item[@id='syntax']} + </strong>: + X:text disable-output-escaping="yes" { + </td> + <td> + } + <strong>​</strong> } <code> !{../@name} @@ -27,11 +39,28 @@ X:stylesheet { } </code> <br/> + X:if "position() = last()" { + X:text disable-output-escaping="yes" { + </td> + </tr> + } + } } X:template = "default" { X:if "position() = 1" { - <strong>default</strong>: + X:text disable-output-escaping="yes" { + <tr valign="top"> + <td> + } + <strong> + !{document(concat($XML, '/i18n.xml')) + /i18n/text[@lang = $LANG]/item[@id='default']} + </strong>: + X:text disable-output-escaping="yes" { + </td> + <td> + } } X:if "count(node()) = 0" { <strong> @@ -39,17 +68,39 @@ X:stylesheet { /i18n/text[@lang = $LANG]/item[@id='none']} </strong> } else { + <strong>​</strong> <code> !{../@name} X:text{ } !!; </code> } <br/> + X:if "position() = last()" { + X:text disable-output-escaping="yes" { + </td> + </tr> + } + } } X:template = "context" { X:if "position() = 1" { - <strong>context</strong>: + X:text disable-output-escaping="yes" { + <tr valign="top"> + <td> + } + <strong> + !{document(concat($XML, '/i18n.xml')) + /i18n/text[@lang = $LANG]/item[@id='context']} + </strong>: + X:text disable-output-escaping="yes" { + </td> + <td> + } + <strong>​</strong> } - X:if "count(text()) = 0" { - <strong>any</strong> + X:if "count(node()) = 0" { + <strong> + !{document(concat($XML, '/i18n.xml')) + /i18n/text[@lang = $LANG]/item[@id='context.any']} + </strong> } else { <code> !!; </code> } @@ -57,6 +108,10 @@ X:stylesheet { X:text{, } } else { <br/> + X:text disable-output-escaping="yes" { + </td> + </tr> + } } }