gitlab-ci: update container to bullseye
[mesa-waffle.git] / man / html.xsl
blob1c811bf7b90ad3bc4093ec3ecc890d72ef797474
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 version="1.0">
6 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl"/>
7 <xsl:include href="common.xsl"/>
9 <xsl:output
10 method="html"
11 encoding="UTF-8"
12 indent="yes"/>
14 <xsl:param name="citerefentry.link">1</xsl:param>
15 <xsl:param name="funcsynopsis.style">ansi</xsl:param>
16 <xsl:param name="html.stylesheet">manpage.css</xsl:param>
18 <!--
19 ! Generate urls for citations.
20 !-->
21 <xsl:template name="generate.citerefentry.link">
22 <xsl:choose>
24 <!--
25 ! Link EGL citations to
26 ! href="http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/$refentrytitle.html".
27 !-->
28 <xsl:when test="starts-with(refentrytitle, 'egl')">
29 <xsl:text>http://www.khronos.org/registry/egl/sdk/docs/man/xhtml/</xsl:text>
30 <xsl:value-of select="refentrytitle"/>
31 <xsl:text>.html</xsl:text>
32 </xsl:when>
34 <!--
35 ! Link GLX citations to
36 ! href="http://www.opengl.org/sdk/docs/man2/xhtml/$refentrytitle.xml".
37 !-->
38 <xsl:when test="starts-with(refentrytitle, 'glX')">
39 <xsl:text>http://www.opengl.org/sdk/docs/man2/xhtml/</xsl:text>
40 <xsl:value-of select="refentrytitle"/>
41 <xsl:text>.xml</xsl:text>
42 </xsl:when>
44 <!--
45 ! If a citation's title begins with "waffle_$x", then link it with
46 ! href="waffle_$x.$manvolnum.html". For example, link a citation
47 ! to waffle_context_create(3) with href="waffle_context.3.html".
48 !-->
50 <!-- sorted alphabetically -->
51 <xsl:when test="starts-with(refentrytitle, 'waffle_attrib_list')">
52 <xsl:text>waffle_attrib_list.3.html</xsl:text>
53 </xsl:when>
54 <xsl:when test="starts-with(refentrytitle, 'waffle_config')">
55 <xsl:text>waffle_config.3.html</xsl:text>
56 </xsl:when>
57 <xsl:when test="starts-with(refentrytitle, 'waffle_context')">
58 <xsl:text>waffle_context.3.html</xsl:text>
59 </xsl:when>
60 <xsl:when test="starts-with(refentrytitle, 'waffle_display')">
61 <xsl:text>waffle_display.3.html</xsl:text>
62 </xsl:when>
63 <xsl:when test="starts-with(refentrytitle, 'waffle_dl')">
64 <xsl:text>waffle_dl.3.html</xsl:text>
65 </xsl:when>
66 <xsl:when test="starts-with(refentrytitle, 'waffle_enum')">
67 <xsl:text>waffle_enum.3.html</xsl:text>
68 </xsl:when>
69 <xsl:when test="starts-with(refentrytitle, 'waffle_error')">
70 <xsl:text>waffle_error.3.html</xsl:text>
71 </xsl:when>
72 <xsl:when test="starts-with(refentrytitle, 'waffle_gbm')">
73 <xsl:text>waffle_gbm.3.html</xsl:text>
74 </xsl:when>
75 <xsl:when test="starts-with(refentrytitle, 'waffle_glx')">
76 <xsl:text>waffle_glx.3.html</xsl:text>
77 </xsl:when>
78 <xsl:when test="starts-with(refentrytitle, 'waffle_native')">
79 <xsl:text>waffle_native.3.html</xsl:text>
80 </xsl:when>
81 <xsl:when test="starts-with(refentrytitle, 'waffle_wayland')">
82 <xsl:text>waffle_wayland.3.html</xsl:text>
83 </xsl:when>
84 <xsl:when test="starts-with(refentrytitle, 'waffle_window')">
85 <xsl:text>waffle_window.3.html</xsl:text>
86 </xsl:when>
87 <xsl:when test="starts-with(refentrytitle, 'waffle_xegl')">
88 <xsl:text>waffle_xegl.3.html</xsl:text>
89 </xsl:when>
91 <!--
92 ! If a citation's title begins with "wflinfo", then link it with
93 ! href="wflinfo.$manvolnum.html".
94 !-->
95 <xsl:when test="starts-with(refentrytitle, 'wflinfo')">
96 <xsl:text>wflinfo.1.html</xsl:text>
97 </xsl:when>
99 <!--
100 ! For citations that begin with "waffle" but were not matched above,
101 ! we assume that the citation title is the refentrytitle of a
102 ! manpage. Link with href="$refentrytitle.$manvolnum.html".
103 !-->
104 <xsl:when test="starts-with(refentrytitle, 'waffle')">
105 <xsl:value-of select="refentrytitle"/>
106 <xsl:text>.</xsl:text>
107 <xsl:value-of select="manvolnum"/>
108 <xsl:text>.html</xsl:text>
109 </xsl:when>
111 <!--
112 ! Link all unmatched citations with
113 ! href="http://linuxmanpages.net/manpages/fedora17/man/$manvolnum/$refentrytitle.html".
114 !-->
115 <xsl:otherwise>
116 <xsl:text>http://linuxmanpages.net/manpages/fedora17/man</xsl:text>
117 <xsl:value-of select="manvolnum"/>
118 <xsl:text>/</xsl:text>
119 <xsl:value-of select="refentrytitle"/>
120 <xsl:text>.</xsl:text>
121 <xsl:value-of select="manvolnum"/>
122 <xsl:text>.html</xsl:text>
123 </xsl:otherwise>
124 </xsl:choose>
125 </xsl:template>
127 </xsl:stylesheet>
129 <!--
130 vim:sw=2 ts=2 et: