forked from nginx/nginx.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvarindex.xsls
40 lines (33 loc) · 865 Bytes
/
varindex.xsls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!--
Copyright (C) Nginx, Inc.
-->
X:stylesheet {
X:output method="xml" doctype-system="../../../dtd/article.dtd" encoding="utf-8"
indent="yes";
<!--
-- a current directory of a XSLT script is where the script is stored,
-- but not where XSLT processor has been started to run the script
-->
X:param XML = "'../xml'";
X:param LANG;
X:template = "modules" {
<article name="{document(concat($XML, '/i18n.xml'))
/i18n/text[@lang = $LANG]/item[@id='varindex']}"
link="/{$LANG}/docs/varindex.html"
lang="{$LANG}">
<section>
<para>
<varlinks>
!! "module";
</varlinks>
</para>
</section>
</article>
}
X:template = "module" {
X:var module="@name"
X:for-each "document(@name)//tag-name/var" {
<link doc="{$module}" id="{../@id}">!!;</link>
}
}
}