Mercurial > hg > nginx-site
comparison xsls/download.xsls @ 727:b2b10d564893
Simplified nginx versions maintenance by providing only
a single list in versions.xml.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Sat, 13 Oct 2012 18:15:55 +0000 |
parents | 81ad082bc837 |
children | 68e8c8dc9489 |
comparison
equal
deleted
inserted
replaced
726:7b28d6ae4539 | 727:b2b10d564893 |
---|---|
3 Copyright (C) Nginx, Inc. | 3 Copyright (C) Nginx, Inc. |
4 --> | 4 --> |
5 | 5 |
6 X:stylesheet { | 6 X:stylesheet { |
7 | 7 |
8 X:template = "download" { <table width="100%"> !! "item"; </table> } | 8 X:template = "download" { |
9 X:var last="@last" | |
10 X:for-each "document(concat($XML, '/versions.xml')) | |
11 /versions/download[@tag = current()/@tag]" { | |
12 <table width="100%"> | |
13 | |
14 !! "item[position() <= $last]"; | |
15 | |
16 </table> | |
17 } | |
18 } | |
9 | 19 |
10 | 20 |
11 X:template = "download/item[position() <= ../@last]" { | 21 X:template = "download/item" { |
12 <tr> | 22 <tr> |
13 <td width="20%"> | 23 <td width="20%"> |
14 X:if "position() = 1" { | 24 X:if "position() = 1" { |
15 <a> | 25 <a> |
16 X:attribute "href" { X:text{/} !{/article/@lang} X:text{/} !{../@changes} } | 26 X:attribute "href" { |
17 !{../@changes} | 27 X:text{/} !{$LANG} X:text{/CHANGES} |
28 X:if "$LANG != 'en'" { X:text{.} !{$LANG} } | |
29 X:if "../@changes != ''" { X:text{-} !{../@changes} } | |
30 } | |
31 X:text{CHANGES} | |
32 X:if "$LANG != 'en'" { X:text{.} !{$LANG} } | |
33 X:if "../@changes != ''" { X:text{-} !{../@changes} } | |
18 </a> | 34 </a> |
19 } | 35 } |
20 </td> | 36 </td> |
21 | 37 |
22 <td width="20%"> | 38 <td width="20%"> |
60 </td> | 76 </td> |
61 | 77 |
62 </tr> | 78 </tr> |
63 } | 79 } |
64 | 80 |
65 | |
66 X:template = "download/item[position() > ../@last]" { } | |
67 | |
68 } | 81 } |