annotate xsls/link.xsls @ 3079:03b5cd59c55f

Changed name in Russian about menu link.
author Maxim Dounin <mdounin@mdounin.ru>
date Tue, 09 Apr 2024 18:26:15 +0300
parents c1d078b13527
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
580
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 491
diff changeset
1 <!--
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 491
diff changeset
2 Copyright (C) Igor Sysoev
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 491
diff changeset
3 Copyright (C) Nginx, Inc.
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 491
diff changeset
4 -->
be54c443235a Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents: 491
diff changeset
5
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
6 X:stylesheet {
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
7
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
8 X:template = "img" { <img src="{@href}"> !!; </img> }
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
9
600
89a4e934d207 Emit a warning with a link to English original if translation is outdated.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
10 X:template = "origin" {
604
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
11 <a>
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
12 X:attribute "href" {
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
13 !root(path = "$ORIGIN")
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
14 !{ concat(substring-before($ORIGIN, '.xml'), '.html') }
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
15 }
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
16 !!;
b2db67ca29cc Made a link to original relative.
Ruslan Ermilov <ru@nginx.com>
parents: 600
diff changeset
17 </a>
600
89a4e934d207 Emit a warning with a link to English original if translation is outdated.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
18 }
89a4e934d207 Emit a warning with a link to English original if translation is outdated.
Ruslan Ermilov <ru@nginx.com>
parents: 580
diff changeset
19
491
5a3362234a4d If text of the link given by URL is not provided, the URL is used.
Ruslan Ermilov <ru@nginx.com>
parents: 423
diff changeset
20 X:template = "link[@url]" {
5a3362234a4d If text of the link given by URL is not provided, the URL is used.
Ruslan Ermilov <ru@nginx.com>
parents: 423
diff changeset
21 <a href="{@url}">
5a3362234a4d If text of the link given by URL is not provided, the URL is used.
Ruslan Ermilov <ru@nginx.com>
parents: 423
diff changeset
22 X:if "count(node()) != 0" { !!; } else { !{@url} }
5a3362234a4d If text of the link given by URL is not provided, the URL is used.
Ruslan Ermilov <ru@nginx.com>
parents: 423
diff changeset
23 </a>
5a3362234a4d If text of the link given by URL is not provided, the URL is used.
Ruslan Ermilov <ru@nginx.com>
parents: 423
diff changeset
24 }
52
666e85596e3c Added support for <link url="..."> which should eventually replace
Ruslan Ermilov <ru@nginx.com>
parents: 32
diff changeset
25
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
26 X:template = "link[@id and not(@doc)]" {
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
27 <a href="#{@id}">
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
28 X:if "count(node()) != 0" { !!; } else { !{@id} }
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
29 </a>
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
30 }
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
31
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
32 X:template = "link[@doc and not(@id)]" {
372
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
33 <a href="{substring-before(@doc, '.xml')}.html">
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
34 X:if "count(node()) != 0" {
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
35 !!;
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
36 } else {
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
37 !{ document(@doc)/article/@name | document(@doc)/module/@name }
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
38 }
978b9e3897f7 For links to documents, use the document name as the link's text by default.
Ruslan Ermilov <ru@nginx.com>
parents: 123
diff changeset
39 </a>
0
61e04fc01027 Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff changeset
40 }
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
41
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
42 X:template = "link[@id and @doc]" {
106
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
43 <a href="{substring-before(@doc, '.xml')}.html#{@id}">
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
44 X:if "count(node()) != 0" { !!; } else { !{@id} }
56457a474903 If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents: 57
diff changeset
45 </a>
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
46 }
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
47
423
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
48 X:template = "links" {
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
49 X:for-each "link", X:sort "@id" {
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
50 <a href="{substring-before(@doc, '.xml')}.html#{@id}">!{@id}</a>
632
9ff0bc734b77 In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents: 604
diff changeset
51 X:if "count(../link[@id = current()/@id]) > 1" {
9ff0bc734b77 In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents: 604
diff changeset
52 X:text{ (}
3037
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
53 X:if "contains(@doc, '/')" {
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
54 !{substring-before(substring-after(@doc, '/'), '.xml')}
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
55 } else {
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
56 !{substring-before(@doc, '.xml')}
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
57 }
632
9ff0bc734b77 In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents: 604
diff changeset
58 X:text{)}
9ff0bc734b77 In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents: 604
diff changeset
59 }
423
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
60 <br/>
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
61 }
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
62 }
423
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
63
1156
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
64 X:template = "varlinks" {
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
65 X:for-each "link", X:sort "@id" {
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
66 <a href="{substring-before(@doc, '.xml')}.html#{@id}">!!;</a>
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
67 X:if "count(../link[@id = current()/@id and @doc != current()/@doc]) > 0" {
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
68 X:text{ (}
3037
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
69 X:if "contains(@doc, '/')" {
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
70 !{substring-before(substring-after(@doc, '/'), '.xml')}
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
71 } else {
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
72 !{substring-before(@doc, '.xml')}
c1d078b13527 Fixed dirindex and varindex for top level modules.
Sergey Kandaurov <pluknet@nginx.com>
parents: 1156
diff changeset
73 }
1156
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
74 X:text{)}
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
75 }
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
76 <br/>
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
77 }
423
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
78 }
1156
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
79
8e8a6a7cff2b Added variables index.
Vladimir Homutov <vl@nginx.com>
parents: 632
diff changeset
80 }