| 1 |
<?xml version='1.0'?> |
| 2 |
|
| 3 |
|
| 4 |
<xsl:stylesheet |
| 5 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
| 6 |
xmlns:xlink="http://www.w3.org/1999/xlink" |
| 7 |
version="1.0"> |
| 8 |
|
| 9 |
|
| 10 |
<xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"/> |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
<xsl:include href="styles-css.xsl" /> |
| 17 |
<xsl:include href="copyright.inc.xsl" /> |
| 18 |
<xsl:param name="funcsynopsis.style">ansi</xsl:param> |
| 19 |
<xsl:param name="citerefentry.link" select="'1'"></xsl:param> |
| 20 |
<xsl:template name="generate.html.title" /> |
| 21 |
<xsl:output indent="yes"/> |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
<xsl:param name="SpecBaseUrl">http://www.khronos.org/registry/cl/specs/opencl-1.x-latest.pdf#namedest=</xsl:param> |
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
<xsl:template name="generate.citerefentry.link"> |
| 32 |
<xsl:choose> |
| 33 |
<xsl:when test="@href"> |
| 34 |
<xsl:value-of select="@href"/> |
| 35 |
<xsl:text>.html</xsl:text> |
| 36 |
</xsl:when> |
| 37 |
<xsl:otherwise> |
| 38 |
<xsl:value-of select="refentrytitle"/> |
| 39 |
<xsl:text>.html</xsl:text> |
| 40 |
</xsl:otherwise> |
| 41 |
</xsl:choose> |
| 42 |
</xsl:template> |
| 43 |
|
| 44 |
|
| 45 |
<xsl:template match="olink"> |
| 46 |
<xsl:text disable-output-escaping="yes"><a href="</xsl:text> |
| 47 |
<xsl:value-of select="$SpecBaseUrl" /> |
| 48 |
<xsl:value-of select="@uri" /> |
| 49 |
<xsl:text disable-output-escaping="yes">" target="OpenCL Spec"></xsl:text> |
| 50 |
<xsl:value-of select="." /> |
| 51 |
<xsl:text disable-output-escaping="yes"></a></xsl:text> |
| 52 |
</xsl:template> |
| 53 |
|
| 54 |
|
| 55 |
<xsl:template match="ulink"> |
| 56 |
<xsl:text disable-output-escaping="yes"><a href="</xsl:text> |
| 57 |
<xsl:value-of select="@url" /> |
| 58 |
<xsl:text disable-output-escaping="yes">"></xsl:text> |
| 59 |
<xsl:value-of select="." /> |
| 60 |
<xsl:text disable-output-escaping="yes"></a></xsl:text> |
| 61 |
</xsl:template> |
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
<xsl:template match="*" mode="process.root"> |
| 66 |
<xsl:variable name="doc" select="self::*"/> |
| 67 |
<xsl:call-template name="user.preroot"/> |
| 68 |
<xsl:call-template name="root.messages"/> |
| 69 |
|
| 70 |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:pref="http://www.w3.org/2002/Math/preference" pref:renderer="mathplayer-dl"> |
| 71 |
|
| 72 |
<head> |
| 73 |
<xsl:call-template name="system.head.content"> |
| 74 |
<xsl:with-param name="node" select="$doc"/> |
| 75 |
</xsl:call-template> |
| 76 |
|
| 77 |
<xsl:call-template name="head.content"> |
| 78 |
<xsl:with-param name="node" select="$doc"/> |
| 79 |
</xsl:call-template> |
| 80 |
|
| 81 |
<xsl:call-template name="user.head.content"> |
| 82 |
<xsl:with-param name="node" select="$doc"/> |
| 83 |
</xsl:call-template> |
| 84 |
</head> |
| 85 |
|
| 86 |
<body> |
| 87 |
<xsl:call-template name="body.attributes"/> |
| 88 |
<xsl:call-template name="user.header.content"> |
| 89 |
<xsl:with-param name="node" select="$doc"/> |
| 90 |
</xsl:call-template> |
| 91 |
<xsl:apply-templates select="."/> |
| 92 |
<xsl:call-template name="user.footer.content"> |
| 93 |
<xsl:with-param name="node" select="$doc"/> |
| 94 |
</xsl:call-template> |
| 95 |
|
| 96 |
</body> |
| 97 |
</html> |
| 98 |
</xsl:template> |
| 99 |
|
| 100 |
|
| 101 |
<xsl:template match="/"> |
| 102 |
<xsl:processing-instruction name="xml-stylesheet"> |
| 103 |
<xsl:text>type="text/xsl" href="mathml.xsl"</xsl:text> |
| 104 |
</xsl:processing-instruction> |
| 105 |
<xsl:apply-imports/> |
| 106 |
</xsl:template> |
| 107 |
|
| 108 |
|
| 109 |
<xsl:template match="funcdef/replaceable"> |
| 110 |
<xsl:call-template name="inline.italicseq"/> |
| 111 |
</xsl:template> |
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
<xsl:template name="system.head.content"> |
| 116 |
<xsl:param name="node" select="."/> |
| 117 |
<style type="text/css"> |
| 118 |
<xsl:value-of select="$annotation.css"/> |
| 119 |
</style> |
| 120 |
</xsl:template> |
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
<xsl:template name="gentext-refname"> |
| 126 |
<xsl:param name="key" select="local-name(.)"/> |
| 127 |
<xsl:param name="lang"> |
| 128 |
<xsl:call-template name="l10n.language"/> |
| 129 |
</xsl:param> |
| 130 |
<xsl:value-of select="refname"/> |
| 131 |
</xsl:template> |
| 132 |
|
| 133 |
<xsl:template match="refnamediv"> |
| 134 |
<div class="{name(.)}"> |
| 135 |
<xsl:call-template name="anchor"/> |
| 136 |
<xsl:choose> |
| 137 |
<xsl:when test="preceding-sibling::refnamediv"> |
| 138 |
|
| 139 |
</xsl:when> |
| 140 |
<xsl:when test="$refentry.generate.name != 0"> |
| 141 |
<h1> |
| 142 |
<xsl:call-template name="gentext-refname"> |
| 143 |
<xsl:with-param name="key" select="'RefName'"/> |
| 144 |
</xsl:call-template> |
| 145 |
</h1> |
| 146 |
</xsl:when> |
| 147 |
<xsl:when test="$refentry.generate.title != 0"> |
| 148 |
<h2> |
| 149 |
<xsl:choose> |
| 150 |
<xsl:when test="../refmeta/refentrytitle"> |
| 151 |
<xsl:apply-templates select="../refmeta/refentrytitle"/> |
| 152 |
</xsl:when> |
| 153 |
<xsl:otherwise> |
| 154 |
<xsl:apply-templates select="refname[1]"/> |
| 155 |
</xsl:otherwise> |
| 156 |
</xsl:choose> |
| 157 |
</h2> |
| 158 |
</xsl:when> |
| 159 |
</xsl:choose> |
| 160 |
<p> |
| 161 |
<xsl:apply-templates/> |
| 162 |
</p> |
| 163 |
</div> |
| 164 |
</xsl:template> |
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
<xsl:template match="refname" /> |
| 170 |
<xsl:template match="refpurpose"> |
| 171 |
<xsl:apply-templates/> |
| 172 |
</xsl:template> |
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
|
| 177 |
<xsl:template match="link" mode="ansi-tabular"> |
| 178 |
<xsl:apply-templates select="."/> |
| 179 |
</xsl:template> |
| 180 |
|
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
<xsl:template match="funcdef/replaceable" mode="ansi-tabular"> |
| 185 |
<xsl:call-template name="inline.italicseq"/> |
| 186 |
</xsl:template> |
| 187 |
|
| 188 |
<xsl:template match="paramdef/replaceable" mode="ansi-tabular"> |
| 189 |
<xsl:call-template name="inline.italicseq"/> |
| 190 |
</xsl:template> |
| 191 |
|
| 192 |
<xsl:template match="function/replaceable" mode="ansi-nontabular"> |
| 193 |
<xsl:call-template name="inline.italicseq"/> |
| 194 |
</xsl:template> |
| 195 |
|
| 196 |
<xsl:template match="refname/replaceable" mode="kr-nontabular"> |
| 197 |
<xsl:call-template name="inline.italicseq"/> |
| 198 |
</xsl:template> |
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
<xsl:template match="funcprototype" mode="ansi-tabular"> |
| 206 |
<table border="0" summary="Function synopsis" cellspacing="0" cellpadding="0"> |
| 207 |
<xsl:if test="following-sibling::funcprototype"> |
| 208 |
<xsl:attribute name="style">padding-bottom: 1em</xsl:attribute> |
| 209 |
</xsl:if> |
| 210 |
<tr valign="bottom"> |
| 211 |
<td> |
| 212 |
<xsl:apply-templates select="funcdef" mode="ansi-tabular"/> |
| 213 |
<xsl:apply-templates select="(void|varargs|paramdef)[1]" mode="ansi-tabular"/> |
| 214 |
</td> |
| 215 |
</tr> |
| 216 |
<xsl:for-each select="(void|varargs|paramdef)[position() > 1]"> |
| 217 |
<tr valign="top"> |
| 218 |
<td> </td> |
| 219 |
<xsl:apply-templates select="." mode="ansi-tabular"/> |
| 220 |
</tr> |
| 221 |
</xsl:for-each> |
| 222 |
</table> |
| 223 |
</xsl:template> |
| 224 |
|
| 225 |
|
| 226 |
<xsl:template match="paramdef" mode="ansi-tabular"> |
| 227 |
<xsl:choose> |
| 228 |
<xsl:when test="type and funcparams"> |
| 229 |
<td> |
| 230 |
<xsl:apply-templates select="type" mode="kr-tabular-funcsynopsis-mode"/> |
| 231 |
<xsl:text> </xsl:text> |
| 232 |
</td> |
| 233 |
<td> |
| 234 |
<xsl:apply-templates select="type/following-sibling::node()" mode="kr-tabular-funcsynopsis-mode"/> |
| 235 |
</td> |
| 236 |
</xsl:when> |
| 237 |
<xsl:otherwise> |
| 238 |
<td> |
| 239 |
<xsl:apply-templates select="parameter/preceding-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/> |
| 240 |
<xsl:text> </xsl:text> |
| 241 |
|
| 242 |
|
| 243 |
<xsl:apply-templates select="parameter" mode="ansi-tabular"/> |
| 244 |
<xsl:apply-templates select="parameter/following-sibling::node()[not(self::parameter)]" mode="ansi-tabular"/> |
| 245 |
<xsl:choose> |
| 246 |
<xsl:when test="following-sibling::*"> |
| 247 |
<xsl:text>, </xsl:text> |
| 248 |
</xsl:when> |
| 249 |
<xsl:otherwise> |
| 250 |
<code>)</code> |
| 251 |
|
| 252 |
|
| 253 |
</xsl:otherwise> |
| 254 |
</xsl:choose> |
| 255 |
</td> |
| 256 |
</xsl:otherwise> |
| 257 |
</xsl:choose> |
| 258 |
</xsl:template> |
| 259 |
|
| 260 |
|
| 261 |
|
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
<xsl:template match="refsect3"> |
| 266 |
<div class="{name(.)}"> |
| 267 |
<xsl:call-template name="language.attribute"/> |
| 268 |
<xsl:call-template name="anchor"> |
| 269 |
<xsl:with-param name="conditional" select="0"/> |
| 270 |
</xsl:call-template> |
| 271 |
<xsl:apply-templates/> |
| 272 |
<xsl:value-of select="$copyright"/> |
| 273 |
</div> |
| 274 |
</xsl:template> |
| 275 |
</xsl:stylesheet> |