Mercurial > hg > nginx-site
view xsls/directive.xsls @ 1485:f4360f884f2d
Donor added.
author | Maxim Konovalov <maxim@nginx.com> |
---|---|
date | Thu, 21 May 2015 11:02:01 +0000 |
parents | 5188cb06bb13 |
children |
line wrap: on
line source
<!-- Copyright (C) Igor Sysoev Copyright (C) Nginx, Inc. --> X:stylesheet { X:template = "directive" { <a name="{@name}"/> <!-- <center><h4> !{@name} </h4></center> --> <div class="directive"> <table cellspacing="0"> !! "syntax"; !! "default"; !! "context"; </table> !! "appeared-in"; </div> !! "para"; } X:template = "syntax" { X:if "position() = 1" { X:text disable-output-escaping="yes" { <tr> <th> } !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='syntax']} X:text{:} X:text disable-output-escaping="yes" { </th> <td> } } <code> <strong> !{../@name} </strong> X:if "count(node()) != 0" { X:text{ } !!; } X:if "@block = 'yes'" { X:text{ \{ ... \}} } else { X:text{;} } </code> <br/> X:if "position() = last()" { X:text disable-output-escaping="yes" { </td> </tr> } } } X:template = "default" { X:if "position() = 1" { X:text disable-output-escaping="yes" { <tr> <th> } !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='default']} X:text{:} X:text disable-output-escaping="yes" { </th> <td> } } X:if "count(node()) = 0" { — } else { <pre> !{../@name} X:if "count(../syntax[@block='yes'])" { X:text{ \{} !!; X:text{\}} } else { X:text{ } !!; X:text{;} } </pre> } X:if "position() = last()" { X:text disable-output-escaping="yes" { </td> </tr> } } } X:template = "context" { X:if "position() = 1" { X:text disable-output-escaping="yes" { <tr> <th> } !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='context']} X:text{:} X:text disable-output-escaping="yes" { </th> <td> } } <code> X:if "count(node()) = 0" { !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='context.any']} } else { !!; } </code> X:if "position() != last()" { X:text{, } } else { <br/> X:text disable-output-escaping="yes" { </td> </tr> } } } X:template = "appeared-in" { X:if "last() = 1" { <p> !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item [@id='directive.version']} X:text{ } !!;. </p> } else { X:choose { X:when "position() = 1" { X:text disable-output-escaping="yes" { <p> } !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item [@id='directive.versions']} X:text{ } !!; X:if "last() > 2" { X:text{,} } X:text{ } } X:when "position() != last()" { !!; X:text{, } } X:otherwise { !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item [@id='and']} X:text{ } !!;. X:text disable-output-escaping="yes" { </p> } } } } } }