Mercurial > hg > nginx-site
annotate xsls/link.xsls @ 1009:135920b5c61d
Marked strings with entities in japanese translation as literal.
This allows to preserve information and produce correct output if the XML
parser expands entities on input. The markup is similar to english and
russian versions of the document.
author | Vladimir Homutov <vl@nginx.com> |
---|---|
date | Mon, 11 Nov 2013 11:54:16 +0400 |
parents | 9ff0bc734b77 |
children | 8e8a6a7cff2b |
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{ (} |
9ff0bc734b77
In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents:
604
diff
changeset
|
53 !{substring-before(substring-after(@doc, '/'), '.xml')} |
9ff0bc734b77
In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents:
604
diff
changeset
|
54 X:text{)} |
9ff0bc734b77
In alphabetical index of directives, if there are several directives
Ruslan Ermilov <ru@nginx.com>
parents:
604
diff
changeset
|
55 } |
423
04ad7c1b1b04
Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents:
375
diff
changeset
|
56 <br/> |
04ad7c1b1b04
Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents:
375
diff
changeset
|
57 } |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
58 } |
423
04ad7c1b1b04
Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents:
375
diff
changeset
|
59 |
04ad7c1b1b04
Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents:
375
diff
changeset
|
60 } |