Mercurial > hg > nginx-site
view xsls/directive.xsls @ 164:c1096d7c62d8
Adding CHANGES.
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 31 Oct 2011 14:57:00 +0000 |
parents | 273d7407de69 |
children | 28ba010fce96 |
line wrap: on
line source
X:stylesheet { X:template = "directive" { <a name="{@name}"/> <!-- <center><h4> !{@name} </h4></center> --> <div class="directive"> <table cellspacing="0"> !! "syntax"; !! "default"; !! "context"; </table> X:if "(@appeared-in)" { <p>This directive appeared in version !{@appeared-in}.</p> } </div> !! "para"; } X:template = "syntax" { X:if "position() = 1" { X:text disable-output-escaping="yes" { <tr> <td> } <strong> !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='syntax']} </strong>: X:text disable-output-escaping="yes" { </td> <td> } } <code> !{../@name} 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> <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" { — } 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> <td> } <strong> !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='context']} </strong>: X:text disable-output-escaping="yes" { </td> <td> } } X:if "count(node()) = 0" { <strong> !{document(concat($XML, '/i18n.xml')) /i18n/text[@lang = $LANG]/item[@id='context.any']} </strong> } else { <code> !!; </code> } X:if "position() != last()" { X:text{, } } else { <br/> X:text disable-output-escaping="yes" { </td> </tr> } } } }