annotate xsls/link.xsls @ 604:b2db67ca29cc

Made a link to original relative.
author Ruslan Ermilov <ru@nginx.com>
date Fri, 20 Jul 2012 13:14:50 +0000
parents 89a4e934d207
children 9ff0bc734b77
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>
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
51 <br/>
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
52 }
57
12f1de4539b4 Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents: 52
diff changeset
53 }
423
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
54
04ad7c1b1b04 Alphabetical index of directives.
Ruslan Ermilov <ru@nginx.com>
parents: 375
diff changeset
55 }