| [12] | 1 | <?xml version="1.0" encoding="utf-8"?> |
|---|
| 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 3 | version="1.0"> |
|---|
| 4 | <!-- Determine the length of a template header synopsis --> |
|---|
| 5 | <xsl:template name="template.synopsis.length"> |
|---|
| 6 | <xsl:variable name="text"> |
|---|
| 7 | <xsl:apply-templates select="template" mode="synopsis"> |
|---|
| 8 | <xsl:with-param name="indentation" select="0"/> |
|---|
| 9 | <xsl:with-param name="wrap" select="false()"/> |
|---|
| 10 | <xsl:with-param name="highlight" select="false()"/> |
|---|
| 11 | </xsl:apply-templates> |
|---|
| 12 | </xsl:variable> |
|---|
| 13 | <xsl:value-of select="string-length($text)"/> |
|---|
| 14 | </xsl:template> |
|---|
| 15 | |
|---|
| 16 | <!-- Determine the length of a template header reference --> |
|---|
| 17 | <xsl:template name="template.reference.length"> |
|---|
| 18 | <xsl:choose> |
|---|
| 19 | <xsl:when test="not(template)"> |
|---|
| 20 | 0 |
|---|
| 21 | </xsl:when> |
|---|
| 22 | <xsl:when test="template/*/purpose"> |
|---|
| 23 | <!-- TBD: The resulting value need only be greater than the number of |
|---|
| 24 | columns. We chose to add 17 because it's funny for C++ |
|---|
| 25 | programmers. :) --> |
|---|
| 26 | <xsl:value-of select="$max-columns + 17"/> |
|---|
| 27 | </xsl:when> |
|---|
| 28 | <xsl:otherwise> |
|---|
| 29 | <xsl:call-template name="template.synopsis.length"/> |
|---|
| 30 | </xsl:otherwise> |
|---|
| 31 | </xsl:choose> |
|---|
| 32 | </xsl:template> |
|---|
| 33 | |
|---|
| 34 | <!-- Output a template header in synopsis mode --> |
|---|
| 35 | <xsl:template match="template" mode="synopsis"> |
|---|
| 36 | <xsl:param name="indentation" select="0"/> |
|---|
| 37 | <xsl:param name="wrap" select="true()"/> |
|---|
| 38 | <xsl:param name="highlight" select="true()"/> |
|---|
| 39 | |
|---|
| 40 | <xsl:call-template name="template.synopsis"> |
|---|
| 41 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 42 | <xsl:with-param name="wrap" select="$wrap"/> |
|---|
| 43 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 44 | </xsl:call-template> |
|---|
| 45 | </xsl:template> |
|---|
| 46 | |
|---|
| 47 | <!-- Output a template header in reference mode --> |
|---|
| 48 | <xsl:template match="template" mode="reference"> |
|---|
| 49 | <xsl:param name="indentation" select="0"/> |
|---|
| 50 | <xsl:param name="highlight" select="true()"/> |
|---|
| 51 | <xsl:call-template name="template.reference"> |
|---|
| 52 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 53 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 54 | </xsl:call-template> |
|---|
| 55 | </xsl:template> |
|---|
| 56 | |
|---|
| 57 | <!-- Emit a template header synopsis --> |
|---|
| 58 | <xsl:template name="template.synopsis"> |
|---|
| 59 | <xsl:param name="indentation" select="0"/> |
|---|
| 60 | <xsl:param name="wrap" select="true()"/> |
|---|
| 61 | <xsl:param name="highlight" select="true()"/> |
|---|
| 62 | |
|---|
| 63 | <xsl:choose> |
|---|
| 64 | <xsl:when test="$highlight"> |
|---|
| 65 | <xsl:call-template name="highlight-keyword"> |
|---|
| 66 | <xsl:with-param name="keyword" select="'template'"/> |
|---|
| 67 | </xsl:call-template> |
|---|
| 68 | </xsl:when> |
|---|
| 69 | <xsl:otherwise> |
|---|
| 70 | <xsl:text>template</xsl:text> |
|---|
| 71 | </xsl:otherwise> |
|---|
| 72 | </xsl:choose> |
|---|
| 73 | <xsl:text><</xsl:text> |
|---|
| 74 | <xsl:call-template name="template.synopsis.parameters"> |
|---|
| 75 | <xsl:with-param name="indentation" select="$indentation + 9"/> |
|---|
| 76 | <xsl:with-param name="wrap" select="$wrap"/> |
|---|
| 77 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 78 | </xsl:call-template> |
|---|
| 79 | <xsl:text>> </xsl:text> |
|---|
| 80 | </xsl:template> |
|---|
| 81 | |
|---|
| 82 | <!-- Display a list of template parameters for a synopsis (no comments) --> |
|---|
| 83 | <xsl:template name="template.synopsis.parameters"> |
|---|
| 84 | <xsl:param name="indentation"/> |
|---|
| 85 | <xsl:param name="wrap" select="true()"/> |
|---|
| 86 | <xsl:param name="highlight" select="true()"/> |
|---|
| 87 | |
|---|
| 88 | <xsl:param name="column" select="$indentation"/> |
|---|
| 89 | <xsl:param name="prefix" select="''"/> |
|---|
| 90 | <xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/> |
|---|
| 91 | <xsl:param name="first-on-line" select="true()"/> |
|---|
| 92 | |
|---|
| 93 | <xsl:if test="$parameters"> |
|---|
| 94 | <!-- Emit the prefix (either a comma-space, or empty if this is |
|---|
| 95 | the first parameter) --> |
|---|
| 96 | <xsl:value-of select="$prefix"/> |
|---|
| 97 | |
|---|
| 98 | <!-- Get the actual parameter and its attributes --> |
|---|
| 99 | <xsl:variable name="parameter" select="$parameters[position()=1]"/> |
|---|
| 100 | <xsl:variable name="rest" select="$parameters[position()!=1]"/> |
|---|
| 101 | |
|---|
| 102 | <!-- Compute the actual text of this parameter --> |
|---|
| 103 | <xsl:variable name="text"> |
|---|
| 104 | <xsl:call-template name="template.parameter"> |
|---|
| 105 | <xsl:with-param name="parameter" select="$parameter"/> |
|---|
| 106 | <xsl:with-param name="is-last" select="not(rest)"/> |
|---|
| 107 | <xsl:with-param name="highlight" select="false()"/> |
|---|
| 108 | </xsl:call-template> |
|---|
| 109 | </xsl:variable> |
|---|
| 110 | |
|---|
| 111 | <!-- Where will this template parameter finish? --> |
|---|
| 112 | <xsl:variable name="end-column" |
|---|
| 113 | select="$column + string-length($prefix) + string-length($text)"/> |
|---|
| 114 | |
|---|
| 115 | <!-- Should the text go on this line or on the next? --> |
|---|
| 116 | <xsl:choose> |
|---|
| 117 | <xsl:when test="$first-on-line or ($end-column < $max-columns) or |
|---|
| 118 | not($wrap)"> |
|---|
| 119 | <!-- Print on this line --> |
|---|
| 120 | <xsl:call-template name="template.parameter"> |
|---|
| 121 | <xsl:with-param name="parameter" select="$parameter"/> |
|---|
| 122 | <xsl:with-param name="is-last" select="not($rest)"/> |
|---|
| 123 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 124 | </xsl:call-template> |
|---|
| 125 | |
|---|
| 126 | <!-- Recurse --> |
|---|
| 127 | <xsl:call-template name="template.synopsis.parameters"> |
|---|
| 128 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 129 | <xsl:with-param name="wrap" select="$wrap"/> |
|---|
| 130 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 131 | <xsl:with-param name="column" select="$end-column"/> |
|---|
| 132 | <xsl:with-param name="prefix" select="', '"/> |
|---|
| 133 | <xsl:with-param name="parameters" select="$rest"/> |
|---|
| 134 | <xsl:with-param name="first-on-line" select="false()"/> |
|---|
| 135 | </xsl:call-template> |
|---|
| 136 | </xsl:when> |
|---|
| 137 | <xsl:otherwise> |
|---|
| 138 | <!-- Print on next line --> |
|---|
| 139 | <xsl:text> </xsl:text> |
|---|
| 140 | <xsl:call-template name="indent"> |
|---|
| 141 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 142 | </xsl:call-template> |
|---|
| 143 | <xsl:call-template name="template.parameter"> |
|---|
| 144 | <xsl:with-param name="parameter" select="$parameter"/> |
|---|
| 145 | <xsl:with-param name="is-last" select="not($rest)"/> |
|---|
| 146 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 147 | </xsl:call-template> |
|---|
| 148 | |
|---|
| 149 | <xsl:call-template name="template.synopsis.parameters"> |
|---|
| 150 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 151 | <xsl:with-param name="wrap" select="$wrap"/> |
|---|
| 152 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 153 | <xsl:with-param name="column" |
|---|
| 154 | select="$indentation + string-length($text)"/> |
|---|
| 155 | <xsl:with-param name="prefix" select="', '"/> |
|---|
| 156 | <xsl:with-param name="parameters" select="$rest"/> |
|---|
| 157 | <xsl:with-param name="first-on-line" select="false()"/> |
|---|
| 158 | </xsl:call-template> |
|---|
| 159 | </xsl:otherwise> |
|---|
| 160 | </xsl:choose> |
|---|
| 161 | </xsl:if> |
|---|
| 162 | </xsl:template> |
|---|
| 163 | |
|---|
| 164 | <!-- Emit a template header reference --> |
|---|
| 165 | <xsl:template name="template.reference"> |
|---|
| 166 | <xsl:param name="indentation" select="0"/> |
|---|
| 167 | <xsl:param name="highlight" select="true()"/> |
|---|
| 168 | |
|---|
| 169 | <xsl:if test="template-type-parameter|template-varargs|template-nontype-parameter"> |
|---|
| 170 | <xsl:choose> |
|---|
| 171 | <xsl:when test="$highlight"> |
|---|
| 172 | <xsl:call-template name="highlight-keyword"> |
|---|
| 173 | <xsl:with-param name="keyword" select="'template'"/> |
|---|
| 174 | </xsl:call-template> |
|---|
| 175 | </xsl:when> |
|---|
| 176 | <xsl:otherwise> |
|---|
| 177 | <xsl:text>template</xsl:text> |
|---|
| 178 | </xsl:otherwise> |
|---|
| 179 | </xsl:choose> |
|---|
| 180 | <xsl:text><</xsl:text> |
|---|
| 181 | <xsl:call-template name="template.reference.parameters"> |
|---|
| 182 | <xsl:with-param name="indentation" select="$indentation + 9"/> |
|---|
| 183 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 184 | </xsl:call-template> |
|---|
| 185 | <xsl:text>> </xsl:text> |
|---|
| 186 | </xsl:if> |
|---|
| 187 | </xsl:template> |
|---|
| 188 | |
|---|
| 189 | <!-- Display a set of template parameters for a reference --> |
|---|
| 190 | <xsl:template name="template.reference.parameters"> |
|---|
| 191 | <xsl:param name="indentation"/> |
|---|
| 192 | <xsl:param name="highlight" select="true()"/> |
|---|
| 193 | <xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/> |
|---|
| 194 | |
|---|
| 195 | <xsl:choose> |
|---|
| 196 | <xsl:when test="$parameters/purpose"> |
|---|
| 197 | <xsl:call-template name="template.reference.parameters.comments"> |
|---|
| 198 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 199 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 200 | </xsl:call-template> |
|---|
| 201 | </xsl:when> |
|---|
| 202 | <xsl:otherwise> |
|---|
| 203 | <xsl:call-template name="template.synopsis.parameters"> |
|---|
| 204 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 205 | <xsl:with-param name="wrap" select="true()"/> |
|---|
| 206 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 207 | </xsl:call-template> |
|---|
| 208 | </xsl:otherwise> |
|---|
| 209 | </xsl:choose> |
|---|
| 210 | </xsl:template> |
|---|
| 211 | |
|---|
| 212 | <!-- Output template parameters when there are comments with the parameters. |
|---|
| 213 | For clarity, we output each template parameter on a separate line. --> |
|---|
| 214 | <xsl:template name="template.reference.parameters.comments"> |
|---|
| 215 | <xsl:param name="indentation"/> |
|---|
| 216 | <xsl:param name="highlight" select="true()"/> |
|---|
| 217 | <xsl:param name="parameters" select="template-type-parameter|template-varargs|template-nontype-parameter"/> |
|---|
| 218 | |
|---|
| 219 | <xsl:if test="$parameters"> |
|---|
| 220 | <!-- Get the actual parameter and its attributes --> |
|---|
| 221 | <xsl:variable name="parameter" select="$parameters[position()=1]"/> |
|---|
| 222 | <xsl:variable name="rest" select="$parameters[position()!=1]"/> |
|---|
| 223 | |
|---|
| 224 | <!-- Display the parameter --> |
|---|
| 225 | <xsl:call-template name="template.parameter"> |
|---|
| 226 | <xsl:with-param name="parameter" select="$parameter"/> |
|---|
| 227 | <xsl:with-param name="is-last" select="not($rest)"/> |
|---|
| 228 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 229 | </xsl:call-template> |
|---|
| 230 | |
|---|
| 231 | <xsl:if test="$rest"> |
|---|
| 232 | <xsl:text>, </xsl:text> |
|---|
| 233 | </xsl:if> |
|---|
| 234 | |
|---|
| 235 | <!-- Display the comment --> |
|---|
| 236 | <xsl:if test="$parameter/purpose"> |
|---|
| 237 | <xsl:call-template name="highlight-comment"> |
|---|
| 238 | <xsl:with-param name="text"> |
|---|
| 239 | <xsl:text> // </xsl:text> |
|---|
| 240 | <xsl:apply-templates |
|---|
| 241 | select="$parameter/purpose/*|$parameter/purpose/text()"/> |
|---|
| 242 | </xsl:with-param> |
|---|
| 243 | </xsl:call-template> |
|---|
| 244 | </xsl:if> |
|---|
| 245 | |
|---|
| 246 | <!-- Indent the next line --> |
|---|
| 247 | <xsl:if test="$parameter/purpose or $rest"> |
|---|
| 248 | <xsl:text> </xsl:text> |
|---|
| 249 | <xsl:call-template name="indent"> |
|---|
| 250 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 251 | </xsl:call-template> |
|---|
| 252 | </xsl:if> |
|---|
| 253 | |
|---|
| 254 | <!-- Recurse to print the rest of the parameters --> |
|---|
| 255 | <xsl:call-template name="template.reference.parameters.comments"> |
|---|
| 256 | <xsl:with-param name="indentation" select="$indentation"/> |
|---|
| 257 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 258 | <xsl:with-param name="parameters" select="$rest"/> |
|---|
| 259 | </xsl:call-template> |
|---|
| 260 | </xsl:if> |
|---|
| 261 | </xsl:template> |
|---|
| 262 | |
|---|
| 263 | <!-- Print a template parameter --> |
|---|
| 264 | <xsl:template name="template.parameter"> |
|---|
| 265 | <xsl:param name="parameter"/> |
|---|
| 266 | <xsl:param name="is-last"/> |
|---|
| 267 | <xsl:param name="highlight" select="true()"/> |
|---|
| 268 | <xsl:apply-templates select="$parameter" |
|---|
| 269 | mode="print.parameter"> |
|---|
| 270 | <xsl:with-param name="parameter" select="$parameter"/> |
|---|
| 271 | <xsl:with-param name="is-last" select="$is-last"/> |
|---|
| 272 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 273 | </xsl:apply-templates> |
|---|
| 274 | </xsl:template> |
|---|
| 275 | |
|---|
| 276 | <xsl:template name="template.parameter.name"> |
|---|
| 277 | <xsl:param name="name" select="@name"/> |
|---|
| 278 | <xsl:param name="highlight" select="true()"/> |
|---|
| 279 | |
|---|
| 280 | <xsl:choose> |
|---|
| 281 | <xsl:when test="$highlight"> |
|---|
| 282 | <xsl:call-template name="concept.link"> |
|---|
| 283 | <xsl:with-param name="name" |
|---|
| 284 | select="translate($name, '0123456789', '')"/> |
|---|
| 285 | <xsl:with-param name="text" select="$name"/> |
|---|
| 286 | <xsl:with-param name="warn" select="false"/> |
|---|
| 287 | </xsl:call-template> |
|---|
| 288 | </xsl:when> |
|---|
| 289 | <xsl:otherwise> |
|---|
| 290 | <xsl:value-of select="$name"/> |
|---|
| 291 | </xsl:otherwise> |
|---|
| 292 | </xsl:choose> |
|---|
| 293 | </xsl:template> |
|---|
| 294 | |
|---|
| 295 | <xsl:template match="template-type-parameter" mode="print.parameter"> |
|---|
| 296 | <xsl:param name="parameter"/> |
|---|
| 297 | <xsl:param name="is-last"/> |
|---|
| 298 | <xsl:param name="highlight"/> |
|---|
| 299 | |
|---|
| 300 | <xsl:choose> |
|---|
| 301 | <xsl:when test="$highlight"> |
|---|
| 302 | <xsl:call-template name="highlight-keyword"> |
|---|
| 303 | <xsl:with-param name="keyword" select="'typename'"/> |
|---|
| 304 | </xsl:call-template> |
|---|
| 305 | </xsl:when> |
|---|
| 306 | <xsl:otherwise> |
|---|
| 307 | <xsl:text>typename</xsl:text> |
|---|
| 308 | </xsl:otherwise> |
|---|
| 309 | </xsl:choose> |
|---|
| 310 | <xsl:text> </xsl:text> |
|---|
| 311 | |
|---|
| 312 | <xsl:call-template name="template.parameter.name"> |
|---|
| 313 | <xsl:with-param name="name" select="$parameter/@name"/> |
|---|
| 314 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 315 | </xsl:call-template> |
|---|
| 316 | |
|---|
| 317 | <xsl:variable name="def"> |
|---|
| 318 | <xsl:choose> |
|---|
| 319 | <xsl:when test="$parameter/@default"> |
|---|
| 320 | <xsl:message> |
|---|
| 321 | <xsl:text>Warning: 'default' attribute of template parameter element is deprecated. Use 'default' element.</xsl:text> |
|---|
| 322 | <xsl:call-template name="print.warning.context"/> |
|---|
| 323 | </xsl:message> |
|---|
| 324 | <xsl:choose> |
|---|
| 325 | <xsl:when test="$highlight and false()"> |
|---|
| 326 | <xsl:call-template name="source-highlight"> |
|---|
| 327 | <xsl:with-param name="text"> |
|---|
| 328 | <xsl:value-of select="$parameter/@default"/> |
|---|
| 329 | </xsl:with-param> |
|---|
| 330 | </xsl:call-template> |
|---|
| 331 | </xsl:when> |
|---|
| 332 | <xsl:otherwise> |
|---|
| 333 | <xsl:value-of select="$parameter/@default"/> |
|---|
| 334 | </xsl:otherwise> |
|---|
| 335 | </xsl:choose> |
|---|
| 336 | </xsl:when> |
|---|
| 337 | <xsl:when test="$parameter/default"> |
|---|
| 338 | <xsl:choose> |
|---|
| 339 | <xsl:when test="$highlight"> |
|---|
| 340 | <xsl:apply-templates |
|---|
| 341 | select="$parameter/default/*|$parameter/default/text()" |
|---|
| 342 | mode="highlight"/> |
|---|
| 343 | </xsl:when> |
|---|
| 344 | <xsl:otherwise> |
|---|
| 345 | <xsl:value-of select="string($parameter/default)"/> |
|---|
| 346 | </xsl:otherwise> |
|---|
| 347 | </xsl:choose> |
|---|
| 348 | </xsl:when> |
|---|
| 349 | </xsl:choose> |
|---|
| 350 | </xsl:variable> |
|---|
| 351 | |
|---|
| 352 | <xsl:if test="not($def='')"> |
|---|
| 353 | <xsl:text> = </xsl:text> |
|---|
| 354 | |
|---|
| 355 | <xsl:copy-of select="$def"/> |
|---|
| 356 | |
|---|
| 357 | <!-- If this is the last parameter, add an extra space to |
|---|
| 358 | avoid printing >> --> |
|---|
| 359 | <xsl:if |
|---|
| 360 | test="$is-last and (substring($def, string-length($def))='>')"> |
|---|
| 361 | <xsl:text> </xsl:text> |
|---|
| 362 | </xsl:if> |
|---|
| 363 | </xsl:if> |
|---|
| 364 | </xsl:template> |
|---|
| 365 | |
|---|
| 366 | <xsl:template match="template-nontype-parameter" mode="print.parameter"> |
|---|
| 367 | <xsl:param name="parameter"/> |
|---|
| 368 | <xsl:param name="is-last"/> |
|---|
| 369 | <xsl:param name="highlight"/> |
|---|
| 370 | |
|---|
| 371 | <xsl:choose> |
|---|
| 372 | <xsl:when test="$highlight"> |
|---|
| 373 | <xsl:call-template name="source-highlight"> |
|---|
| 374 | <xsl:with-param name="text"> |
|---|
| 375 | <xsl:apply-templates |
|---|
| 376 | select="$parameter/type/*|$parameter/type/text()"/> |
|---|
| 377 | </xsl:with-param> |
|---|
| 378 | </xsl:call-template> |
|---|
| 379 | </xsl:when> |
|---|
| 380 | <xsl:otherwise> |
|---|
| 381 | <xsl:value-of select="$parameter/type/*|$parameter/type/text()"/> |
|---|
| 382 | </xsl:otherwise> |
|---|
| 383 | </xsl:choose> |
|---|
| 384 | <xsl:text> </xsl:text> |
|---|
| 385 | |
|---|
| 386 | <xsl:call-template name="template.parameter.name"> |
|---|
| 387 | <xsl:with-param name="name" select="$parameter/@name"/> |
|---|
| 388 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 389 | </xsl:call-template> |
|---|
| 390 | |
|---|
| 391 | <xsl:variable name="def"> |
|---|
| 392 | <xsl:value-of select="string($parameter/default)"/> |
|---|
| 393 | </xsl:variable> |
|---|
| 394 | |
|---|
| 395 | <xsl:if test="not($def='')"> |
|---|
| 396 | <xsl:text> = </xsl:text> |
|---|
| 397 | |
|---|
| 398 | <xsl:choose> |
|---|
| 399 | <xsl:when test="$highlight"> |
|---|
| 400 | <xsl:apply-templates select="$parameter/default/*" mode="highlight"/> |
|---|
| 401 | </xsl:when> |
|---|
| 402 | <xsl:otherwise> |
|---|
| 403 | <xsl:value-of select="$def"/> |
|---|
| 404 | </xsl:otherwise> |
|---|
| 405 | </xsl:choose> |
|---|
| 406 | |
|---|
| 407 | <!-- If this is the last parameter, add an extra space to |
|---|
| 408 | avoid printing >> --> |
|---|
| 409 | <xsl:if |
|---|
| 410 | test="$is-last and (substring($def, string-length($def))='>')"> |
|---|
| 411 | <xsl:text> </xsl:text> |
|---|
| 412 | </xsl:if> |
|---|
| 413 | </xsl:if> |
|---|
| 414 | </xsl:template> |
|---|
| 415 | |
|---|
| 416 | <xsl:template match="template-varargs" mode="print.parameter"> |
|---|
| 417 | <xsl:text>...</xsl:text> |
|---|
| 418 | </xsl:template> |
|---|
| 419 | |
|---|
| 420 | <xsl:template match="specialization"> |
|---|
| 421 | <xsl:param name="highlight" select="true()"/> |
|---|
| 422 | <xsl:text><</xsl:text> |
|---|
| 423 | <xsl:apply-templates select="template-arg"> |
|---|
| 424 | <xsl:with-param name="highlight" select="$highlight"/> |
|---|
| 425 | </xsl:apply-templates> |
|---|
| 426 | <xsl:text>></xsl:text> |
|---|
| 427 | </xsl:template> |
|---|
| 428 | |
|---|
| 429 | <xsl:template match="template-arg"> |
|---|
| 430 | <xsl:if test="position() > 1"> |
|---|
| 431 | <xsl:text>, </xsl:text> |
|---|
| 432 | </xsl:if> |
|---|
| 433 | <xsl:apply-templates mode="highlight"/> |
|---|
| 434 | </xsl:template> |
|---|
| 435 | </xsl:stylesheet> |
|---|
| 436 | |
|---|