Mercurial > hg > nginx-site
annotate xsls/link.xsls @ 277:67ba4bba2656
nginx-1.1.12
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 26 Dec 2011 15:20:49 +0000 |
parents | 7db449e89e92 |
children | 978b9e3897f7 |
rev | line source |
---|---|
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
1 X:stylesheet { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
2 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
3 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
4 <!-- {a href="/en/docs/page.xml" /} --> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
5 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 X:template = "a[starts-with(@href, '/') |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 and string() = '' |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 and contains(@href, '.xml')]" |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 <a> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 X:attribute "href" { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 <!-- |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 -- variables are not allowed in a template match predicate: |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 -- a[starts-with(@href, $DIRNAME) ... ] |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 -- therefore, we have to test this using "if" |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 --> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
19 X:if "starts-with(@href, $DIRNAME)" { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 <!-- convert to a link "docs/page.html" --> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 |
22
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
23 !{ substring-after(document(concat($XML, @href))/article/@link |
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
24 |document(concat($XML, @href))/module/@link, |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 $DIRNAME) } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 } else { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <!-- convert to a link "../../../en/docs/page.html" --> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 |
22
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
30 !{ concat($ROOT, document(concat($XML, @href))/article/@link |
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
31 |document(concat($XML, @href))/module/@link) } |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 } |
123
7db449e89e92
Unified the use of the "name" attribute instead of "title".
Ruslan Ermilov <ru@nginx.com>
parents:
122
diff
changeset
|
34 !{ document(concat($XML, @href))/article/@name |
32
2bcfb5f75e06
Supporting new format of <module> and <section>:
Igor Sysoev <igor@sysoev.ru>
parents:
22
diff
changeset
|
35 |document(concat($XML, @href))/module/@name } |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 </a> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <!-- {a href="/en/docs/page.xml"} TEXT {/a} --> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 X:template = "a[starts-with(@href, '/') |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 and string() |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 and contains(@href, '.xml')]" |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 <a> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 X:attribute "href" { |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 X:if "starts-with(@href, $DIRNAME)" { |
22
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
49 !{ substring-after(document(concat($XML, @href))/article/@link |
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
50 |document(concat($XML, @href))/module/@link, |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
51 $DIRNAME) } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
52 } else { |
22
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
53 !{ concat($ROOT, document(concat($XML, @href))/article/@link |
9d3403f5204d
nginx-1.1.3, ngx_http_mp4_module
Igor Sysoev <igor@sysoev.ru>
parents:
0
diff
changeset
|
54 |document(concat($XML, @href))/module/@link) } |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 !!; |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 </a> |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 X:template = "a" { <a href="{@href}"> !!; </a> } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 X:template = "img" { <img src="{@href}"> !!; </img> } |
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 |
52
666e85596e3c
Added support for <link url="..."> which should eventually replace
Ruslan Ermilov <ru@nginx.com>
parents:
32
diff
changeset
|
65 X:template = "link[@url]" { <a href="{@url}"> !!; </a> } |
666e85596e3c
Added support for <link url="..."> which should eventually replace
Ruslan Ermilov <ru@nginx.com>
parents:
32
diff
changeset
|
66 |
106
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
67 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
|
68 <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
|
69 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
|
70 </a> |
56457a474903
If text of the link is not provided, the @id is used.
Ruslan Ermilov <ru@nginx.com>
parents:
57
diff
changeset
|
71 } |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
72 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
73 X:template = "link[@doc and not(@id)]" { |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
74 <a href="{substring-before(@doc, '.xml')}.html"> !!; </a> |
0
61e04fc01027
Initial import of the nginx.org website.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 } |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
76 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
77 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
|
78 <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
|
79 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
|
80 </a> |
57
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
81 } |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
82 |
12f1de4539b4
Initial English translation of ngx_http_core_module.
Ruslan Ermilov <ru@nginx.com>
parents:
52
diff
changeset
|
83 } |