Mercurial > hg > nginx-site
comparison xsls/varindex.xsls @ 1156:8e8a6a7cff2b
Added variables index.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Wed, 16 Apr 2014 14:22:51 +0400 |
parents | |
children | 1a7a1c79142e |
comparison
equal
deleted
inserted
replaced
1155:07402a11fd8d | 1156:8e8a6a7cff2b |
---|---|
1 <!-- | |
2 Copyright (C) Nginx, Inc. | |
3 --> | |
4 | |
5 X:stylesheet { | |
6 | |
7 X:output method="xml" doctype-system="../../../dtd/article.dtd" encoding="utf-8"; | |
8 | |
9 <!-- | |
10 -- a current directory of a XSLT script is where the script is stored, | |
11 -- but not where XSLT processor has been started to run the script | |
12 --> | |
13 X:param XML = "'../xml'"; | |
14 | |
15 X:param LANG; | |
16 | |
17 X:template = "modules" { | |
18 <article name="{document(concat($XML, '/i18n.xml')) | |
19 /i18n/text[@lang = $LANG]/item[@id='varindex']}" | |
20 link="/{$LANG}/docs/varindex.html" | |
21 lang="{$LANG}"> | |
22 <section> | |
23 <para> | |
24 <varlinks> | |
25 !! "module"; | |
26 </varlinks> | |
27 </para> | |
28 </section> | |
29 </article> | |
30 } | |
31 | |
32 X:template = "module" { | |
33 X:var module="@name" | |
34 X:for-each "document(@name)//tag-name/var" { | |
35 <link doc="{$module}" id="{../@id}">!!;</link> | |
36 } | |
37 } | |
38 | |
39 } |