Mercurial > hg > nginx-site
diff xsls/directive.xsls @ 171:6eeaa9e1f3b5
Made "appeared-in" an element, and added support for
multiple "appeared-in" specifications.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 03 Nov 2011 21:40:27 +0000 |
parents | 28ba010fce96 |
children | 13f4de67fbb6 |
line wrap: on
line diff
--- a/xsls/directive.xsls +++ b/xsls/directive.xsls @@ -9,9 +9,7 @@ X:stylesheet { !! "default"; !! "context"; </table> - X:if "(@appeared-in)" { - <p>This directive appeared in version !{@appeared-in}.</p> - } + !! "appeared-in"; </div> !! "para"; } @@ -119,4 +117,31 @@ X:stylesheet { } } + X:template = "appeared-in" { + X:if "last() = 1" { + <p>This directive appeared in version !!;.</p> + } else { + X:choose { + X:when "position() = 1" { + X:text disable-output-escaping="yes" { + <p> + } + This directive appeared in versions !!; + X:if "last() > 2" { + X:text{, } + } + } + X:when "position() != last()" { + !!; + X:text{, } + } + X:otherwise { + and !!;. + X:text disable-output-escaping="yes" { + </p> + } + } + } + } + } }