annotate src/share/vm/prims/jvmti.xsl @ 13526:f5dd157e3889

8186439: [MVT] ClassFileParser should ignore JVM_ACC_VALUE for class file version < 53.1 Reviewed-by: dsimms
author thartmann
date Mon, 21 Aug 2017 12:26:21 +0200
parents c558850fac57
children f4315a059412
rev   line source
duke@0 1 <?xml version="1.0"?>
duke@0 2 <!--
alanb@10420 3 Copyright (c) 2002, 2016, Oracle and/or its affiliates. All rights reserved.
duke@0 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@0 5
duke@0 6 This code is free software; you can redistribute it and/or modify it
duke@0 7 under the terms of the GNU General Public License version 2 only, as
duke@0 8 published by the Free Software Foundation.
duke@0 9
duke@0 10 This code is distributed in the hope that it will be useful, but WITHOUT
duke@0 11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@0 12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@0 13 version 2 for more details (a copy is included in the LICENSE file that
duke@0 14 accompanied this code).
duke@0 15
duke@0 16 You should have received a copy of the GNU General Public License version
duke@0 17 2 along with this work; if not, write to the Free Software Foundation,
duke@0 18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@0 19
trims@1472 20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1472 21 or visit www.oracle.com if you need additional information or have any
trims@1472 22 questions.
duke@0 23
duke@0 24 -->
duke@0 25
duke@0 26 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
duke@0 27
duke@0 28 <xsl:import href="jvmtiLib.xsl"/>
duke@0 29
duke@0 30 <xsl:output method="html" indent="yes"
duke@0 31 doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
duke@0 32 doctype-system="http://www.w3.org/TR/html4/loose.dtd"/>
duke@0 33
duke@0 34 <xsl:param name="development"></xsl:param>
duke@0 35
duke@0 36 <xsl:template match="specification">
duke@0 37 <html>
duke@0 38 <head>
duke@0 39 <title>
duke@0 40 <xsl:value-of select="@label"/>
duke@0 41 <xsl:text> </xsl:text>
duke@0 42 <xsl:call-template name="showversion"/>
duke@0 43 </title>
duke@0 44 <style type="text/css">
duke@0 45 td.tableHeader {font-size: larger}
duke@0 46 </style>
duke@0 47 </head>
duke@0 48 <body>
duke@0 49 <table border="0" width="100%">
duke@0 50 <tr>
duke@0 51 <td align="center">
duke@0 52 <xsl:apply-templates select="title"/>
duke@0 53 </td>
duke@0 54 </tr>
duke@0 55 </table>
duke@0 56 <ul>
duke@0 57 <li>
duke@0 58 <a href="#SpecificationIntro"><b>Introduction</b></a>
duke@0 59 <ul>
duke@0 60 <xsl:for-each select="intro">
duke@0 61 <li>
duke@0 62 <a>
duke@0 63 <xsl:attribute name="href">#<xsl:value-of select="@id"/>
duke@0 64 </xsl:attribute>
duke@0 65 <b><xsl:value-of select="@label"/></b>
duke@0 66 </a>
duke@0 67 </li>
duke@0 68 </xsl:for-each>
duke@0 69 </ul>
duke@0 70 </li>
duke@0 71 <li>
duke@0 72 <a href="#FunctionSection"><b>Functions</b></a>
duke@0 73 <ul>
duke@0 74 <xsl:for-each select="functionsection/intro">
duke@0 75 <li>
duke@0 76 <a>
duke@0 77 <xsl:attribute name="href">#<xsl:value-of select="@id"/>
duke@0 78 </xsl:attribute>
duke@0 79 <b><xsl:value-of select="@label"/></b>
duke@0 80 </a>
duke@0 81 </li>
duke@0 82 </xsl:for-each>
duke@0 83 <li>
duke@0 84 <a href="#FunctionIndex"><b>Function Index</b></a>
duke@0 85 <ul>
duke@0 86 <xsl:for-each select="functionsection/category">
duke@0 87 <li>
duke@0 88 <a>
duke@0 89 <xsl:attribute name="href">#<xsl:value-of select="@id"/>
duke@0 90 </xsl:attribute>
duke@0 91 <b><xsl:value-of select="@label"/></b>
duke@0 92 </a>
duke@0 93 </li>
duke@0 94 </xsl:for-each>
duke@0 95 </ul>
duke@0 96 </li>
duke@0 97 <li>
duke@0 98 <a href="#ErrorSection"><b>Error Codes</b></a>
duke@0 99 </li>
duke@0 100 </ul>
duke@0 101 </li>
duke@0 102 <li>
duke@0 103 <a href="#EventSection"><b>Events</b></a>
duke@0 104 <ul>
duke@0 105 <li>
duke@0 106 <a href="#EventIndex"><b>Event Index</b></a>
duke@0 107 </li>
duke@0 108 </ul>
duke@0 109 </li>
duke@0 110 <li>
duke@0 111 <a href="#DataSection"><b>Data Types</b></a>
duke@0 112 <ul>
duke@0 113 <xsl:for-each select="//basetypes">
duke@0 114 <li>
duke@0 115 <a>
duke@0 116 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 117 <b>
duke@0 118 <xsl:value-of select="@label"/>
duke@0 119 </b>
duke@0 120 </a>
duke@0 121 </li>
duke@0 122 </xsl:for-each>
duke@0 123 <li>
duke@0 124 <a href="#StructureTypeDefinitions"><b>Structure Type Definitions</b></a>
duke@0 125 </li>
duke@0 126 <li>
duke@0 127 <a href="#FunctionTypeDefinitions"><b>Function Type Definitions</b></a>
duke@0 128 </li>
duke@0 129 <li>
duke@0 130 <a href="#EnumerationDefinitions"><b>Enumeration Definitions</b></a>
duke@0 131 </li>
duke@0 132 <li>
duke@0 133 <a href="#FunctionTable"><b>Function Table</b></a>
duke@0 134 </li>
duke@0 135 </ul>
duke@0 136 </li>
duke@0 137 <li>
duke@0 138 <a href="#ConstantIndex"><b>Constant Index</b></a>
duke@0 139 </li>
duke@0 140 <xsl:if test="$development = 'Show'">
duke@0 141 <li>
duke@0 142 <a href="#SpecificationIssues"><b>Issues</b></a>
duke@0 143 <ul>
duke@0 144 <xsl:for-each select="issuessection/intro">
duke@0 145 <li>
duke@0 146 <a>
duke@0 147 <xsl:attribute name="href">#<xsl:value-of select="@id"/>
duke@0 148 </xsl:attribute>
duke@0 149 <b><xsl:value-of select="@label"/></b>
duke@0 150 </a>
duke@0 151 </li>
duke@0 152 </xsl:for-each>
duke@0 153 </ul>
duke@0 154 </li>
duke@0 155 </xsl:if>
duke@0 156 <li>
duke@0 157 <a href="#ChangeHistory"><b>Change History</b></a>
duke@0 158 </li>
duke@0 159 </ul>
duke@0 160 <!-- end table of contents, begin body -->
duke@0 161 <p/>
duke@0 162 <hr noshade="noshade" size="3"/>
duke@0 163 <p/>
duke@0 164 <p id="SpecificationIntro"/>
duke@0 165 <xsl:apply-templates select="intro"/>
duke@0 166 <p id="FunctionSection"/>
duke@0 167 <xsl:apply-templates select="functionsection"/>
duke@0 168 <p id="ErrorSection"/>
duke@0 169 <xsl:apply-templates select="errorsection"/>
duke@0 170 <p id="DataSection"/>
duke@0 171 <xsl:apply-templates select="datasection"/>
duke@0 172 <p id="EventSection"/>
duke@0 173 <xsl:apply-templates select="eventsection"/>
duke@0 174 <p id="ConstantIndex"/>
duke@0 175 <p/>
duke@0 176 <hr noshade="noshade" size="3"/>
duke@0 177 <h2>
duke@0 178 Constant Index
duke@0 179 </h2>
duke@0 180 <blockquote>
duke@0 181 <xsl:apply-templates select="//constant" mode="index">
duke@0 182 <xsl:sort select="@id"/>
duke@0 183 </xsl:apply-templates>
duke@0 184 </blockquote>
duke@0 185 <xsl:if test="$development = 'Show'">
duke@0 186 <p id="SpecificationIssues"/>
duke@0 187 <p/>
duke@0 188 <hr noshade="noshade" size="3"/>
duke@0 189 <h2>
duke@0 190 <xsl:value-of select="issuessection/@label"/>
duke@0 191 </h2>
duke@0 192 <xsl:apply-templates select="issuessection/intro"/>
duke@0 193 </xsl:if>
duke@0 194 <p id="ChangeHistory"/>
duke@0 195 <xsl:apply-templates select="changehistory"/>
duke@0 196 </body>
duke@0 197 </html>
duke@0 198 </xsl:template>
duke@0 199
duke@0 200 <xsl:template match="title">
duke@0 201 <h1>
duke@0 202 <xsl:apply-templates/>
duke@0 203 </h1>
duke@0 204 <h3>
duke@0 205 <xsl:value-of select="@subtitle"/>
duke@0 206 <xsl:text> </xsl:text>
duke@0 207 <xsl:call-template name="showbasicversion"/>
duke@0 208 </h3>
duke@0 209 </xsl:template>
duke@0 210
duke@0 211 <xsl:template match="functionsection">
duke@0 212 <p/>
duke@0 213 <hr noshade="noshade" size="3"/>
duke@0 214 <h2>
duke@0 215 <xsl:value-of select="@label"/>
duke@0 216 </h2>
duke@0 217 <xsl:apply-templates select="intro"/>
duke@0 218 <h3 id="FunctionIndex">Function Index</h3>
duke@0 219 <ul>
duke@0 220 <xsl:apply-templates select="category" mode="index"/>
duke@0 221 </ul>
duke@0 222 <xsl:apply-templates select="category" mode="body"/>
duke@0 223 </xsl:template>
duke@0 224
duke@0 225 <xsl:template match="category" mode="index">
duke@0 226 <li>
duke@0 227 <a>
duke@0 228 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 229 <b>
duke@0 230 <xsl:value-of select="@label"/>
duke@0 231 </b>
duke@0 232 </a>
duke@0 233 <ul>
duke@0 234 <xsl:apply-templates select="function[count(@hide)=0]" mode="index"/>
duke@0 235 </ul>
duke@0 236 </li>
duke@0 237 </xsl:template>
duke@0 238
duke@0 239 <xsl:template match="function|callback" mode="index">
duke@0 240 <li>
duke@0 241 <a>
duke@0 242 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 243 <xsl:apply-templates select="synopsis" mode="index"/>
duke@0 244 </a>
duke@0 245 </li>
duke@0 246 </xsl:template>
duke@0 247
duke@0 248 <xsl:template match="synopsis" mode="index">
duke@0 249 <xsl:value-of select="."/>
duke@0 250 </xsl:template>
duke@0 251
duke@0 252 <xsl:template match="category" mode="body">
duke@0 253 <p>
duke@0 254 <xsl:attribute name="id">
duke@0 255 <xsl:value-of select="@id"/>
duke@0 256 </xsl:attribute>
duke@0 257 </p>
duke@0 258 <hr noshade="noshade" size="3"/>
duke@0 259 <h2 align="center"><xsl:value-of select="@label"/></h2>
duke@0 260 <xsl:value-of select="@label"/> functions:
duke@0 261 <ul>
duke@0 262 <xsl:apply-templates select="function[count(@hide)=0]" mode="index"/>
duke@0 263 </ul>
duke@0 264 <xsl:variable name="calltypes" select="callback"/>
duke@0 265 <xsl:if test="count($calltypes)!=0">
duke@0 266 <xsl:value-of select="@label"/> function types:
duke@0 267 <ul>
duke@0 268 <xsl:apply-templates select="$calltypes" mode="index"/>
duke@0 269 </ul>
duke@0 270 </xsl:if>
duke@0 271 <xsl:variable name="cattypes"
duke@0 272 select="(descendant::typedef|descendant::uniontypedef|descendant::capabilitiestypedef|descendant::constants[@kind='enum'])"/>
duke@0 273 <xsl:if test="count($cattypes)!=0">
duke@0 274 <xsl:value-of select="@label"/> types:
duke@0 275 <ul>
duke@0 276 <xsl:for-each select="$cattypes">
duke@0 277 <li>
duke@0 278 <a>
duke@0 279 <xsl:attribute name="href">
duke@0 280 <xsl:text>#</xsl:text>
duke@0 281 <xsl:value-of select="@id"/>
duke@0 282 </xsl:attribute>
duke@0 283 <code><xsl:value-of select="@id"/></code>
duke@0 284 </a>
duke@0 285 <xsl:text> - </xsl:text>
duke@0 286 <xsl:value-of select="@label"/>
duke@0 287 </li>
duke@0 288 </xsl:for-each>
duke@0 289 </ul>
duke@0 290 </xsl:if>
duke@0 291 <xsl:variable name="catconst"
duke@0 292 select="(descendant::constants[@kind!='enum'])"/>
duke@0 293 <xsl:if test="count($catconst)!=0">
duke@0 294 <xsl:value-of select="@label"/> flags and constants:
duke@0 295 <ul>
duke@0 296 <xsl:for-each select="$catconst">
duke@0 297 <li>
duke@0 298 <a>
duke@0 299 <xsl:attribute name="href">
duke@0 300 <xsl:text>#</xsl:text>
duke@0 301 <xsl:value-of select="@id"/>
duke@0 302 </xsl:attribute>
duke@0 303 <xsl:value-of select="@label"/>
duke@0 304 </a>
duke@0 305 </li>
duke@0 306 </xsl:for-each>
duke@0 307 </ul>
duke@0 308 </xsl:if>
duke@0 309 <xsl:apply-templates select="intro|typedef|uniontypedef|capabilitiestypedef"/>
duke@0 310 <p/>
duke@0 311 <xsl:apply-templates select="function[count(@hide)=0]|callback" mode="body"/>
duke@0 312 </xsl:template>
duke@0 313
duke@0 314 <xsl:template match="function" mode="body">
duke@0 315 <hr noshade="noshade" width="100%" size="1">
duke@0 316 <xsl:attribute name="id">
duke@0 317 <xsl:value-of select="@id"/>
duke@0 318 </xsl:attribute>
duke@0 319
duke@0 320 </hr>
duke@0 321 <xsl:apply-templates select="synopsis" mode="body"/>
duke@0 322 <blockquote>
duke@0 323 <xsl:apply-templates select="typedef" mode="code"/>
duke@0 324 <xsl:apply-templates select="descendant::constants[@kind='enum']" mode="signature"/>
duke@0 325 <pre>
duke@0 326 <xsl:text>jvmtiError
duke@0 327 </xsl:text>
duke@0 328 <xsl:value-of select="@id"/>(jvmtiEnv* env<xsl:apply-templates select="parameters" mode="signature"/>)</pre>
duke@0 329 </blockquote>
duke@0 330 <xsl:apply-templates select="description"/>
duke@0 331 <xsl:apply-templates select="." mode="generalinfo"/>
duke@0 332 <xsl:apply-templates select="capabilities|eventcapabilities"/>
duke@0 333 <xsl:apply-templates select="typedef" mode="body"/>
duke@0 334 <xsl:apply-templates select="parameters" mode="body"/>
duke@0 335 <xsl:apply-templates select="." mode="errors"/>
duke@0 336 </xsl:template>
duke@0 337
duke@0 338 <xsl:template match="function" mode="generalinfo">
duke@0 339 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 340 <tr bgcolor="#EEEEFF">
duke@0 341 <td >
duke@0 342 <a href="#jvmtiPhase">Phase</a>
duke@0 343 </td>
duke@0 344 <td>
duke@0 345 <a href="#heapCallbacks">Callback Safe</a>
duke@0 346 </td>
duke@0 347 <td>
duke@0 348 <a href="#FunctionTable">Position</a>
duke@0 349 </td>
duke@0 350 <td>
duke@0 351 <a href="#ChangeHistory">Since</a>
duke@0 352 </td>
duke@0 353 </tr>
duke@0 354 <tr>
duke@0 355 <td >
duke@0 356 <xsl:apply-templates select="." mode="phaseinfo"/>
duke@0 357 </td>
duke@0 358 <td>
duke@0 359 <xsl:apply-templates select="." mode="callbacksafeinfo"/>
duke@0 360 </td>
duke@0 361 <td>
duke@0 362 <xsl:value-of select="@num"/>
duke@0 363 </td>
duke@0 364 <td>
duke@0 365 <xsl:value-of select="@since"/>
duke@0 366 </td>
duke@0 367 </tr>
duke@0 368 </table>
duke@0 369 </xsl:template>
duke@0 370
duke@0 371 <xsl:template match="event" mode="generalinfo">
duke@0 372 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 373 <tr bgcolor="#EEEEFF">
duke@0 374 <td >
duke@0 375 <a href="#jvmtiPhase">Phase</a>
duke@0 376 </td>
duke@0 377 <td>
duke@0 378 <a href="#jvmtiEvent">Event Type</a>
duke@0 379 </td>
duke@0 380 <td>
duke@0 381 <a href="#jvmtiEvent">Number</a>
duke@0 382 </td>
duke@0 383 <td>
duke@0 384 <a href="#enablingevents">Enabling</a>
duke@0 385 </td>
duke@0 386 <td>
duke@0 387 <a href="#ChangeHistory">Since</a>
duke@0 388 </td>
duke@0 389 </tr>
duke@0 390 <tr>
duke@0 391 <td >
duke@0 392 <xsl:apply-templates select="." mode="phaseinfo"/>
duke@0 393 </td>
duke@0 394 <td>
duke@0 395 <code><xsl:value-of select="@const"/></code>
duke@0 396 </td>
duke@0 397 <td>
duke@0 398 <xsl:value-of select="@num"/>
duke@0 399 </td>
duke@0 400 <td>
duke@0 401 <code><a href="#SetEventNotificationMode">SetEventNotificationMode</a>(JVMTI_ENABLE,
duke@0 402 <xsl:value-of select="@const"/>, NULL)</code>
duke@0 403 </td>
duke@0 404 <td>
duke@0 405 <xsl:value-of select="@since"/>
duke@0 406 </td>
duke@0 407 </tr>
duke@0 408 </table>
duke@0 409 </xsl:template>
duke@0 410
duke@0 411 <xsl:template match="function" mode="phaseinfo">
duke@0 412 may
duke@0 413 <xsl:choose>
duke@0 414 <xsl:when test="count(@phase) = 0 or @phase = 'live'">
duke@0 415 only be called during the live
duke@0 416 </xsl:when>
duke@0 417 <xsl:otherwise>
duke@0 418 <xsl:choose>
duke@0 419 <xsl:when test="@phase = 'onload'">
duke@0 420 only be called during the OnLoad or the live
duke@0 421 </xsl:when>
duke@0 422 <xsl:otherwise>
duke@0 423 <xsl:choose>
duke@0 424 <xsl:when test="@phase = 'any'">
duke@0 425 be called during any
duke@0 426 </xsl:when>
duke@0 427 <xsl:otherwise>
duke@0 428 <xsl:choose>
duke@0 429 <xsl:when test="@phase = 'start'">
duke@0 430 only be called during the start or the live
duke@0 431 </xsl:when>
duke@0 432 <xsl:otherwise>
duke@0 433 <xsl:choose>
duke@0 434 <xsl:when test="@phase = 'onloadOnly'">
duke@0 435 only be called during the OnLoad
duke@0 436 </xsl:when>
duke@0 437 <xsl:otherwise>
duke@0 438 <xsl:message terminate="yes">
duke@0 439 bad phase - <xsl:value-of select="@phase"/>
duke@0 440 </xsl:message>
duke@0 441 </xsl:otherwise>
duke@0 442 </xsl:choose>
duke@0 443 </xsl:otherwise>
duke@0 444 </xsl:choose>
duke@0 445 </xsl:otherwise>
duke@0 446 </xsl:choose>
duke@0 447 </xsl:otherwise>
duke@0 448 </xsl:choose>
duke@0 449 </xsl:otherwise>
duke@0 450 </xsl:choose>
duke@0 451 phase
duke@0 452 </xsl:template>
duke@0 453
duke@0 454
duke@0 455 <xsl:template match="event" mode="phaseinfo">
duke@0 456 sent
duke@0 457 <xsl:choose>
duke@0 458 <xsl:when test="count(@phase) = 0 or @phase = 'live'">
duke@0 459 only during the live
duke@0 460 </xsl:when>
duke@0 461 <xsl:otherwise>
duke@0 462 <xsl:choose>
duke@0 463 <xsl:when test="@phase = 'any'">
duke@0 464 during the primordial, start or live
duke@0 465 </xsl:when>
duke@0 466 <xsl:otherwise>
duke@0 467 <xsl:choose>
duke@0 468 <xsl:when test="@phase = 'start'">
duke@0 469 during the start or live
duke@0 470 </xsl:when>
duke@0 471 <xsl:otherwise>
duke@0 472 <xsl:message terminate="yes">
duke@0 473 bad phase - <xsl:value-of select="@phase"/>
duke@0 474 </xsl:message>
duke@0 475 </xsl:otherwise>
duke@0 476 </xsl:choose>
duke@0 477 </xsl:otherwise>
duke@0 478 </xsl:choose>
duke@0 479 </xsl:otherwise>
duke@0 480 </xsl:choose>
duke@0 481 phase
duke@0 482 </xsl:template>
duke@0 483
duke@0 484
duke@0 485 <xsl:template match="function" mode="callbacksafeinfo">
duke@0 486 <xsl:choose>
duke@0 487 <xsl:when test="contains(@callbacksafe,'safe')">
duke@0 488 This function may be called from the callbacks to the
duke@0 489 <a href="#Heap">Heap</a> iteration functions, or from the
duke@0 490 event handlers for the
duke@0 491 <a href="#GarbageCollectionStart"><code>GarbageCollectionStart</code></a>,
duke@0 492 <a href="#GarbageCollectionFinish"><code>GarbageCollectionFinish</code></a>,
duke@0 493 and <a href="#ObjectFree"><code>ObjectFree</code></a> events.
duke@0 494 </xsl:when>
duke@0 495 <xsl:otherwise>
duke@0 496 No
duke@0 497 </xsl:otherwise>
duke@0 498 </xsl:choose>
duke@0 499 </xsl:template>
duke@0 500
duke@0 501
duke@0 502 <xsl:template match="callback" mode="body">
duke@0 503 <hr noshade="noshade" width="100%" size="1">
duke@0 504 <xsl:attribute name="id">
duke@0 505 <xsl:value-of select="@id"/>
duke@0 506 </xsl:attribute>
duke@0 507 </hr>
duke@0 508 <xsl:apply-templates select="synopsis" mode="body"/>
duke@0 509 <table cellpadding="0" cellspacing="0" border="0" width="90%" align="center"><tr><td>
duke@0 510 <blockquote>
duke@0 511 <pre>
duke@0 512 <xsl:text>typedef </xsl:text>
duke@0 513 <xsl:apply-templates select="child::*[position()=1]" mode="signature"/>
duke@0 514 <xsl:text> (JNICALL *</xsl:text>
duke@0 515 <xsl:value-of select="@id"/>
duke@0 516 <xsl:text>)
duke@0 517 (</xsl:text>
duke@0 518 <xsl:for-each select="parameters">
duke@0 519 <xsl:apply-templates select="param[position()=1]" mode="signature"/>
duke@0 520 <xsl:for-each select="param[position()>1]">
duke@0 521 <xsl:text>,
duke@0 522 </xsl:text>
duke@0 523 <xsl:apply-templates select="." mode="signature"/>
duke@0 524 </xsl:for-each>
duke@0 525 </xsl:for-each>
duke@0 526 <xsl:text>);</xsl:text>
duke@0 527 </pre>
duke@0 528 </blockquote>
duke@0 529 <xsl:apply-templates select="description"/>
duke@0 530 <xsl:apply-templates select="parameters" mode="body"/>
duke@0 531 </td></tr></table>
duke@0 532 </xsl:template>
duke@0 533
duke@0 534 <xsl:template match="synopsis" mode="body">
duke@0 535 <h3><xsl:value-of select="."/></h3>
duke@0 536 </xsl:template>
duke@0 537
duke@0 538 <xsl:template match="eventsection">
duke@0 539 <p/>
duke@0 540 <hr noshade="noshade" size="3"/>
duke@0 541 <h2>
duke@0 542 <xsl:value-of select="@label"/>
duke@0 543 </h2>
duke@0 544 <xsl:apply-templates select="intro"/>
duke@0 545 <blockquote>
duke@0 546 <pre>
duke@0 547 <xsl:text>
duke@0 548 typedef struct {
duke@0 549 </xsl:text>
duke@0 550 <xsl:call-template name="eventStruct">
duke@0 551 <xsl:with-param name="events" select="event"/>
duke@0 552 <xsl:with-param name="index" select="0"/>
duke@0 553 <xsl:with-param name="started" select="false"/>
duke@0 554 <xsl:with-param name="comment" select="'No'"/>
duke@0 555 </xsl:call-template>
duke@0 556 <xsl:text>} jvmtiEventCallbacks;
duke@0 557 </xsl:text>
duke@0 558 </pre>
duke@0 559 </blockquote>
duke@0 560 <p/>
duke@0 561 <hr noshade="noshade" width="100%" size="1"/>
duke@0 562 <h3 id="EventIndex">Event Index</h3>
duke@0 563 <ul>
duke@0 564 <xsl:apply-templates select="event" mode="index">
duke@0 565 <xsl:sort select="@label"/>
duke@0 566 </xsl:apply-templates>
duke@0 567 </ul>
duke@0 568 <xsl:apply-templates select="event" mode="body"/>
duke@0 569 </xsl:template>
duke@0 570
duke@0 571 <xsl:template match="event" mode="index">
duke@0 572 <li>
duke@0 573 <a>
duke@0 574 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 575 <b>
duke@0 576 <xsl:value-of select="@label"/>
duke@0 577 </b>
duke@0 578 </a>
duke@0 579 </li>
duke@0 580 </xsl:template>
duke@0 581
duke@0 582 <xsl:template match="event" mode="body">
duke@0 583 <p>
duke@0 584 <xsl:attribute name="id">
duke@0 585 <xsl:value-of select="@id"/>
duke@0 586 </xsl:attribute>
duke@0 587 </p>
duke@0 588 <hr noshade="noshade" size="3"/>
duke@0 589 <h2><xsl:value-of select="@label"/></h2>
duke@0 590 <p/>
duke@0 591 <blockquote>
duke@0 592 <xsl:apply-templates select="typedef" mode="code"/>
duke@0 593 <pre>
duke@0 594 <xsl:text>void JNICALL
duke@0 595 </xsl:text>
duke@0 596 <xsl:value-of select="@id"/>(jvmtiEnv *jvmti_env<xsl:apply-templates select="parameters" mode="signature"/>)</pre>
duke@0 597 </blockquote>
duke@0 598 <xsl:apply-templates select="description"/>
duke@0 599 <xsl:apply-templates select="." mode="generalinfo"/>
duke@0 600 <xsl:apply-templates select="typedef" mode="body"/>
duke@0 601 <xsl:apply-templates select="capabilities"/>
duke@0 602 <xsl:apply-templates select="parameters" mode="body"/>
duke@0 603 </xsl:template>
duke@0 604
duke@0 605 <xsl:template match="capabilitiestypedef" mode="code">
duke@0 606 <blockquote>
duke@0 607 <pre>
duke@0 608 <xsl:apply-templates select="." mode="genstruct"/>
duke@0 609 </pre>
duke@0 610 </blockquote>
duke@0 611 </xsl:template>
duke@0 612
duke@0 613 <xsl:template match="typedef" mode="code">
duke@0 614 <pre>
duke@0 615 <xsl:call-template name="gentypedef">
duke@0 616 <xsl:with-param name="tdef" select="."/>
duke@0 617 </xsl:call-template>
duke@0 618 </pre>
duke@0 619 </xsl:template>
duke@0 620
duke@0 621 <xsl:template match="uniontypedef" mode="code">
duke@0 622 <pre>
duke@0 623 <xsl:call-template name="genuniontypedef">
duke@0 624 <xsl:with-param name="tdef" select="."/>
duke@0 625 </xsl:call-template>
duke@0 626 </pre>
duke@0 627 </xsl:template>
duke@0 628
duke@0 629 <xsl:template match="capabilitiestypedef|typedef|uniontypedef" mode="description">
duke@0 630 <xsl:apply-templates select="description"/>
duke@0 631 </xsl:template>
duke@0 632
duke@0 633 <xsl:template match="capabilitiestypedef|typedef|uniontypedef">
duke@0 634 <h4>
duke@0 635 <xsl:attribute name="id">
duke@0 636 <xsl:value-of select="@id"/>
duke@0 637 </xsl:attribute>
duke@0 638 <xsl:value-of select="@label"/>
duke@0 639 </h4>
duke@0 640 <xsl:apply-templates select="." mode="description"/>
duke@0 641 <blockquote>
duke@0 642 <xsl:apply-templates select="." mode="code"/>
duke@0 643 <xsl:apply-templates select="." mode="justbody"/>
duke@0 644 </blockquote>
duke@0 645 </xsl:template>
duke@0 646
duke@0 647 <xsl:template match="constants" mode="signature">
duke@0 648 <pre>
duke@0 649 <xsl:apply-templates select="." mode="enum"/>
duke@0 650 </pre>
duke@0 651 </xsl:template>
duke@0 652
duke@0 653 <xsl:template match="typedef|uniontypedef" mode="body">
duke@0 654 <p>
duke@0 655 <xsl:attribute name="id">
duke@0 656 <xsl:value-of select="@id"/>
duke@0 657 </xsl:attribute>
duke@0 658 </p>
duke@0 659 <xsl:apply-templates select="." mode="justbody"/>
duke@0 660 </xsl:template>
duke@0 661
duke@0 662 <xsl:template match="typedef|uniontypedef" mode="justbody">
duke@0 663 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 664 <tr bgcolor="#CCCCFF">
duke@0 665 <td colspan="3" align="center" class="tableHeader">
duke@0 666 <code><xsl:value-of select="@id"/></code> - <xsl:value-of select="@label"/>
duke@0 667 </td>
duke@0 668 </tr>
duke@0 669 <tr bgcolor="#EEEEFF">
duke@0 670 <td>
duke@0 671 Field
duke@0 672 </td>
duke@0 673 <td>
duke@0 674 Type
duke@0 675 </td>
duke@0 676 <td>
duke@0 677 Description
duke@0 678 </td>
duke@0 679 </tr>
duke@0 680 <xsl:apply-templates select="field" mode="body"/>
duke@0 681 </table>
duke@0 682 </xsl:template>
duke@0 683
duke@0 684 <xsl:template match="capabilitiestypedef" mode="body">
duke@0 685 <p>
duke@0 686 <xsl:attribute name="id">
duke@0 687 <xsl:value-of select="@id"/>
duke@0 688 </xsl:attribute>
duke@0 689 </p>
duke@0 690 <xsl:apply-templates select="." mode="justbody"/>
duke@0 691 </xsl:template>
duke@0 692
duke@0 693 <xsl:template match="capabilitiestypedef" mode="justbody">
duke@0 694 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 695 <tr bgcolor="#CCCCFF">
duke@0 696 <td colspan="3" align="center" class="tableHeader">
duke@0 697 <code><xsl:value-of select="@id"/></code> - <xsl:value-of select="@label"/>
duke@0 698 </td>
duke@0 699 </tr>
duke@0 700 <tr bgcolor="#EEEEFF">
duke@0 701 <td colspan="3">
duke@0 702 All types are <code>unsigned int : 1</code>
duke@0 703 </td>
duke@0 704 </tr>
duke@0 705 <tr bgcolor="#EEEEFF">
duke@0 706 <td>
duke@0 707 Field
duke@0 708 </td>
duke@0 709 <td>
duke@0 710 Description
duke@0 711 </td>
duke@0 712 <td>
duke@0 713 <a href="#ChangeHistory">Since</a>
duke@0 714 </td>
duke@0 715 </tr>
duke@0 716 <xsl:apply-templates select="capabilityfield" mode="body"/>
duke@0 717 </table>
duke@0 718 </xsl:template>
duke@0 719
duke@0 720 <xsl:template match="typedef|uniontypedef|capabilitiestypedef|constants" mode="tableentry">
duke@0 721 <tr>
duke@0 722 <td>
duke@0 723 <a>
duke@0 724 <xsl:attribute name="href">
duke@0 725 <xsl:text>#</xsl:text>
duke@0 726 <xsl:value-of select="@id"/>
duke@0 727 </xsl:attribute>
duke@0 728 <code><xsl:value-of select="@id"/></code>
duke@0 729 </a>
duke@0 730 </td>
duke@0 731 <td>
duke@0 732 <xsl:value-of select="@label"/>
duke@0 733 </td>
duke@0 734 </tr>
duke@0 735 </xsl:template>
duke@0 736
duke@0 737 <xsl:template match="field" mode="body">
duke@0 738 <tr>
duke@0 739 <td>
duke@0 740 <code>
duke@0 741 <xsl:attribute name="id">
duke@0 742 <xsl:value-of select="../@id"/>.<xsl:value-of select="@id"/>
duke@0 743 </xsl:attribute>
duke@0 744 <xsl:value-of select="@id"/>
duke@0 745 </code>
duke@0 746 </td>
duke@0 747 <td>
duke@0 748 <code>
duke@0 749 <xsl:apply-templates select="child::*[position()=1]" mode="link"/>
duke@0 750 </code>
duke@0 751 </td>
duke@0 752 <td>
duke@0 753 <xsl:apply-templates select="description" mode="brief"/>
duke@0 754 </td>
duke@0 755 </tr>
duke@0 756 </xsl:template>
duke@0 757
duke@0 758 <xsl:template match="capabilityfield" mode="body">
duke@0 759 <tr>
duke@0 760 <td>
duke@0 761 <code>
duke@0 762 <xsl:choose>
duke@0 763 <xsl:when test="@disp1!=''">
duke@0 764 <xsl:value-of select="@disp1"/>
duke@0 765 <br></br>
duke@0 766 <xsl:value-of select="@disp2"/>
duke@0 767 </xsl:when>
duke@0 768 <xsl:otherwise>
duke@0 769 <xsl:value-of select="@id"/>
duke@0 770 </xsl:otherwise>
duke@0 771 </xsl:choose>
duke@0 772 </code>
duke@0 773 </td>
duke@0 774 <td>
duke@0 775 <a>
duke@0 776 <xsl:attribute name="name">
duke@0 777 <xsl:value-of select="../@id"/>.<xsl:value-of select="@id"/>
duke@0 778 </xsl:attribute>
duke@0 779 </a>
duke@0 780 <xsl:apply-templates select="description" mode="brief"/>
duke@0 781 </td>
duke@0 782 <td>
duke@0 783 <xsl:value-of select="@since"/>
duke@0 784 </td>
duke@0 785 </tr>
duke@0 786 </xsl:template>
duke@0 787
duke@0 788 <xsl:template match="callback" mode="tableentry">
duke@0 789 <tr>
duke@0 790 <td>
duke@0 791 <a>
duke@0 792 <xsl:attribute name="href">
duke@0 793 <xsl:text>#</xsl:text>
duke@0 794 <xsl:value-of select="@id"/>
duke@0 795 </xsl:attribute>
duke@0 796 <code>
duke@0 797 <xsl:value-of select="@id"/>
duke@0 798 </code>
duke@0 799 </a>
duke@0 800 </td>
duke@0 801 <td>
duke@0 802 <xsl:apply-templates select="synopsis" mode="index"/>
duke@0 803 </td>
duke@0 804 </tr>
duke@0 805 </xsl:template>
duke@0 806
duke@0 807 <xsl:template match="constants">
duke@0 808 <blockquote>
duke@0 809 <a>
duke@0 810 <xsl:attribute name="name">
duke@0 811 <xsl:value-of select="@id"/>
duke@0 812 </xsl:attribute>
duke@0 813 </a>
duke@0 814 <table border="1" cellpadding="3" cellspacing="0">
duke@0 815 <tr bgcolor="#CCCCFF">
duke@0 816 <td colspan="3" align="center" class="tableHeader">
duke@0 817 <xsl:value-of select="@label"/>
duke@0 818 <xsl:if test="@kind='enum'">
duke@0 819 <xsl:text> (</xsl:text>
duke@0 820 <code>
duke@0 821 <xsl:value-of select="@id"/>
duke@0 822 </code>
duke@0 823 <xsl:text>)</xsl:text>
duke@0 824 </xsl:if>
duke@0 825 </td>
duke@0 826 </tr>
duke@0 827 <tr bgcolor="#EEEEFF">
duke@0 828 <td>
duke@0 829 Constant
duke@0 830 </td>
duke@0 831 <td>
duke@0 832 Value
duke@0 833 </td>
duke@0 834 <td>
duke@0 835 Description
duke@0 836 </td>
duke@0 837 </tr>
duke@0 838 <xsl:apply-templates select="constant" mode="body"/>
duke@0 839 </table>
duke@0 840 </blockquote>
duke@0 841 </xsl:template>
duke@0 842
duke@0 843 <xsl:template match="constant" mode="index">
duke@0 844 <a>
duke@0 845 <xsl:attribute name="href">#<xsl:value-of select="@id"/>
duke@0 846 </xsl:attribute>
duke@0 847 <code>
duke@0 848 <xsl:value-of select="@id"/>
duke@0 849 </code>
duke@0 850 </a>
duke@0 851 <br/>
duke@0 852 </xsl:template>
duke@0 853
duke@0 854 <xsl:template match="constant" mode="body">
duke@0 855 <tr>
duke@0 856 <td>
duke@0 857 <code>
duke@0 858 <xsl:attribute name="id">
duke@0 859 <xsl:value-of select="@id"/>
duke@0 860 </xsl:attribute>
duke@0 861 <xsl:value-of select="@id"/>
duke@0 862 </code>
duke@0 863 </td>
duke@0 864 <td align="right">
duke@0 865 <xsl:value-of select="@num"/>
duke@0 866 </td>
duke@0 867 <td>
duke@0 868 <xsl:apply-templates/>
duke@0 869 </td>
duke@0 870 </tr>
duke@0 871 </xsl:template>
duke@0 872
duke@0 873 <xsl:template match="basetypes">
duke@0 874 <p>
duke@0 875 <xsl:attribute name="id">
duke@0 876 <xsl:value-of select="@id"/>
duke@0 877 </xsl:attribute>
duke@0 878 </p>
duke@0 879 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 880 <tr bgcolor="#CCCCFF">
duke@0 881 <td colspan="2" align="center" class="tableHeader">
duke@0 882 <xsl:value-of select="@label"/>
duke@0 883 </td>
duke@0 884 </tr>
duke@0 885 <tr bgcolor="#EEEEFF">
duke@0 886 <td>
duke@0 887 Type
duke@0 888 </td>
duke@0 889 <td>
duke@0 890 Description
duke@0 891 </td>
duke@0 892 </tr>
duke@0 893 <xsl:apply-templates select="basetype" mode="body"/>
duke@0 894 </table>
duke@0 895 </xsl:template>
duke@0 896
duke@0 897 <xsl:template match="basetype" mode="body">
duke@0 898 <xsl:choose>
duke@0 899 <xsl:when test="count(definition)=0">
duke@0 900 <tr>
duke@0 901 <td>
duke@0 902 <code>
duke@0 903 <xsl:value-of select="@id"/>
duke@0 904 </code>
duke@0 905 </td>
duke@0 906 <td>
duke@0 907 <a>
duke@0 908 <xsl:attribute name="name">
duke@0 909 <xsl:value-of select="@id"/>
duke@0 910 </xsl:attribute>
duke@0 911 </a>
duke@0 912 <xsl:apply-templates select="description" mode="brief"/>
duke@0 913 </td>
duke@0 914 </tr>
duke@0 915 </xsl:when>
duke@0 916 <xsl:otherwise>
duke@0 917 <tr>
duke@0 918 <td rowspan="2">
duke@0 919 <code>
duke@0 920 <xsl:value-of select="@id"/>
duke@0 921 </code>
duke@0 922 </td>
duke@0 923 <td>
duke@0 924 <a>
duke@0 925 <xsl:attribute name="name">
duke@0 926 <xsl:value-of select="@id"/>
duke@0 927 </xsl:attribute>
duke@0 928 </a>
duke@0 929 <xsl:apply-templates select="description" mode="brief"/>
duke@0 930 </td>
duke@0 931 </tr>
duke@0 932 <tr>
duke@0 933 <td>
duke@0 934 <pre>
duke@0 935 <xsl:apply-templates select="definition"/>
duke@0 936 </pre>
duke@0 937 </td>
duke@0 938 </tr>
duke@0 939 </xsl:otherwise>
duke@0 940 </xsl:choose>
duke@0 941 </xsl:template>
duke@0 942
duke@0 943 <xsl:template match="description">
duke@0 944 <xsl:apply-templates/>
duke@0 945 <p/>
duke@0 946 </xsl:template>
duke@0 947
duke@0 948 <xsl:template match="description" mode="brief">
duke@0 949 <xsl:apply-templates/>
duke@0 950 </xsl:template>
duke@0 951
duke@0 952 <xsl:template match="fieldlink">
duke@0 953 <a>
duke@0 954 <xsl:attribute name="href">#<xsl:value-of select="@struct"/>.<xsl:value-of select="@id"/></xsl:attribute>
duke@0 955 <xsl:choose>
duke@0 956 <xsl:when test=".=''">
duke@0 957 <code>
duke@0 958 <xsl:value-of select="@id"/>
duke@0 959 </code>
duke@0 960 </xsl:when>
duke@0 961 <xsl:otherwise>
duke@0 962 <xsl:apply-templates/>
duke@0 963 </xsl:otherwise>
duke@0 964 </xsl:choose>
duke@0 965 </a>
duke@0 966 </xsl:template>
duke@0 967
duke@0 968 <xsl:template match="paramlink">
duke@0 969 <a>
duke@0 970 <xsl:attribute name="href">#<xsl:value-of select="ancestor::function/@id|ancestor::event/@id"/>.<xsl:value-of select="@id"/>
duke@0 971 </xsl:attribute>
duke@0 972 <xsl:choose>
duke@0 973 <xsl:when test=".=''">
duke@0 974 <code>
duke@0 975 <xsl:value-of select="@id"/>
duke@0 976 </code>
duke@0 977 </xsl:when>
duke@0 978 <xsl:otherwise>
duke@0 979 <xsl:apply-templates/>
duke@0 980 </xsl:otherwise>
duke@0 981 </xsl:choose>
duke@0 982 </a>
duke@0 983 </xsl:template>
duke@0 984
duke@0 985 <xsl:template match="eventlink|errorlink|typelink|datalink|functionlink">
duke@0 986 <a>
duke@0 987 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 988 <xsl:choose>
duke@0 989 <xsl:when test=".=''">
duke@0 990 <code>
duke@0 991 <xsl:value-of select="@id"/>
duke@0 992 </code>
duke@0 993 </xsl:when>
duke@0 994 <xsl:otherwise>
duke@0 995 <xsl:apply-templates/>
duke@0 996 </xsl:otherwise>
duke@0 997 </xsl:choose>
duke@0 998 </a>
duke@0 999 </xsl:template>
duke@0 1000
duke@0 1001 <xsl:template match="functionphaselist">
duke@0 1002 <xsl:variable name="phase" select="@phase"/>
duke@0 1003 <ul>
duke@0 1004 <xsl:for-each select="/specification/functionsection/category/function[@phase=$phase and count(@hide)=0]">
duke@0 1005 <li>
duke@0 1006 <a>
duke@0 1007 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 1008 <b>
duke@0 1009 <xsl:value-of select="@id"/>
duke@0 1010 </b>
duke@0 1011 </a>
duke@0 1012 </li>
duke@0 1013 </xsl:for-each>
duke@0 1014 </ul>
duke@0 1015 </xsl:template>
duke@0 1016
duke@0 1017 <xsl:template match="eventphaselist">
duke@0 1018 <xsl:variable name="phase" select="@phase"/>
duke@0 1019 <ul>
duke@0 1020 <xsl:for-each select="//eventsection/event[@phase=$phase]">
duke@0 1021 <li>
duke@0 1022 <a>
duke@0 1023 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 1024 <b>
duke@0 1025 <xsl:value-of select="@id"/>
duke@0 1026 </b>
duke@0 1027 </a>
duke@0 1028 </li>
duke@0 1029 </xsl:for-each>
duke@0 1030 </ul>
duke@0 1031 </xsl:template>
duke@0 1032
duke@0 1033 <xsl:template match="externallink">
duke@0 1034 <a>
duke@0 1035 <xsl:attribute name="href">
sspitsyn@12402 1036 <!-- All external links start from the same prefix -->
sspitsyn@12402 1037 <xsl:text>http://docs.oracle.com/javase/</xsl:text>
sspitsyn@12402 1038 <xsl:value-of select="//specification/@majorversion"/>
sspitsyn@12402 1039 <xsl:text>/</xsl:text>
duke@0 1040 <xsl:value-of select="@id"/>
duke@0 1041 </xsl:attribute>
duke@0 1042 <xsl:value-of select="."/>
duke@0 1043 </a>
duke@0 1044 </xsl:template>
duke@0 1045
kamg@2427 1046 <xsl:template match="vmspec">
kamg@2427 1047 <cite>
kamg@2427 1048 <xsl:text>The Java&#8482; Virtual Machine Specification</xsl:text>
kamg@2427 1049 <xsl:if test="count(@chapter)=1">
kamg@2427 1050 <xsl:text>, Chapter </xsl:text>
kamg@2427 1051 <xsl:value-of select="@chapter"/>
kamg@2427 1052 </xsl:if>
kamg@2427 1053 </cite>
duke@0 1054 </xsl:template>
duke@0 1055
duke@0 1056 <xsl:template match="internallink">
duke@0 1057 <a>
duke@0 1058 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 1059 <xsl:apply-templates/>
duke@0 1060 </a>
duke@0 1061 </xsl:template>
duke@0 1062
duke@0 1063 <xsl:template match="parameters" mode="body">
duke@0 1064 <p/>
duke@0 1065 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1066 <tr bgcolor="#CCCCFF">
duke@0 1067 <td colspan="3" align="center" class="tableHeader">
duke@0 1068 Parameters
duke@0 1069 </td>
duke@0 1070 </tr>
duke@0 1071 <tr bgcolor="#EEEEFF">
duke@0 1072 <td>
duke@0 1073 Name
duke@0 1074 </td>
duke@0 1075 <td>
duke@0 1076 Type
duke@0 1077 </td>
duke@0 1078 <td>
duke@0 1079 Description
duke@0 1080 </td>
duke@0 1081 </tr>
duke@0 1082 <xsl:apply-templates select="param[count(jclass/@method)=0]" mode="body"/>
duke@0 1083 </table>
duke@0 1084 </xsl:template>
duke@0 1085
duke@0 1086 <xsl:template match="param" mode="body">
duke@0 1087 <tr>
duke@0 1088 <td>
duke@0 1089 <code>
duke@0 1090 <xsl:attribute name="id">
duke@0 1091 <xsl:value-of select="../../@id"/>.<xsl:value-of select="@id"/>
duke@0 1092 </xsl:attribute>
duke@0 1093 <xsl:value-of select="@id"/>
duke@0 1094 </code>
duke@0 1095 </td>
duke@0 1096 <td>
duke@0 1097 <code>
duke@0 1098 <xsl:apply-templates select="child::*[position()=1]" mode="link"/>
duke@0 1099 </code>
duke@0 1100 </td>
duke@0 1101 <td>
duke@0 1102 <xsl:apply-templates select="description" mode="brief"/>
duke@0 1103 <xsl:if test="count(ancestor::function)=1">
duke@0 1104 <xsl:apply-templates select="child::*[position()=1]" mode="funcdescription"/>
duke@0 1105 </xsl:if>
duke@0 1106 </td>
duke@0 1107 </tr>
duke@0 1108 </xsl:template>
duke@0 1109
duke@0 1110 <xsl:template match="capabilities">
duke@0 1111 <p/>
duke@0 1112 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1113 <tr bgcolor="#CCCCFF">
duke@0 1114 <td colspan="2" align="center" class="tableHeader">
duke@0 1115 Capabilities
duke@0 1116 </td>
duke@0 1117 </tr>
duke@0 1118 <xsl:choose>
duke@0 1119 <xsl:when test="count(required)=0">
duke@0 1120 <tr>
duke@0 1121 <td colspan="2">
duke@0 1122 <b>Required Functionality</b>
duke@0 1123 </td>
duke@0 1124 </tr>
duke@0 1125 </xsl:when>
duke@0 1126 <xsl:otherwise>
duke@0 1127 <tr>
duke@0 1128 <td colspan="2">
duke@0 1129 <b>Optional Functionality:</b> might not be implemented for all
duke@0 1130 virtual machines.
duke@0 1131 <xsl:choose>
duke@0 1132 <xsl:when test="count(required)=1">
duke@0 1133 The following capability
duke@0 1134 </xsl:when>
duke@0 1135 <xsl:otherwise>
duke@0 1136 One of the following capabilities
duke@0 1137 </xsl:otherwise>
duke@0 1138 </xsl:choose>
duke@0 1139 (as returned by
duke@0 1140 <a href="#GetCapabilities"><code>GetCapabilities</code></a>)
duke@0 1141 must be true to use this
duke@0 1142 <xsl:choose>
duke@0 1143 <xsl:when test="ancestor::function">
duke@0 1144 function.
duke@0 1145 </xsl:when>
duke@0 1146 <xsl:otherwise>
duke@0 1147 event.
duke@0 1148 </xsl:otherwise>
duke@0 1149 </xsl:choose>
duke@0 1150 </td>
duke@0 1151 </tr>
duke@0 1152 <tr bgcolor="#EEEEFF">
duke@0 1153 <td >
duke@0 1154 Capability
duke@0 1155 </td>
duke@0 1156 <td>
duke@0 1157 Effect
duke@0 1158 </td>
duke@0 1159 </tr>
duke@0 1160 <xsl:apply-templates select="required"/>
duke@0 1161 </xsl:otherwise>
duke@0 1162 </xsl:choose>
duke@0 1163 <xsl:if test="count(capability)!=0">
duke@0 1164 <tr bgcolor="#CCCCFF">
duke@0 1165 <td colspan="2" align="center">
duke@0 1166 Optional Features
duke@0 1167 </td>
duke@0 1168 </tr>
duke@0 1169 <xsl:if test="count(required)=0">
duke@0 1170 <tr bgcolor="#EEEEFF">
duke@0 1171 <td >
duke@0 1172 Capability
duke@0 1173 </td>
duke@0 1174 <td>
duke@0 1175 Effect
duke@0 1176 </td>
duke@0 1177 </tr>
duke@0 1178 </xsl:if>
duke@0 1179 <xsl:apply-templates select="capability"/>
duke@0 1180 </xsl:if>
duke@0 1181 </table>
duke@0 1182 </xsl:template>
duke@0 1183
duke@0 1184 <xsl:template match="eventcapabilities">
duke@0 1185 <p/>
duke@0 1186 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1187 <tr bgcolor="#CCCCFF">
duke@0 1188 <td colspan="2" align="center" class="tableHeader">
duke@0 1189 Capabilities
duke@0 1190 </td>
duke@0 1191 </tr>
duke@0 1192 <tr>
duke@0 1193 <td colspan="2">
duke@0 1194 <b>Required Functionality</b>
duke@0 1195 </td>
duke@0 1196 </tr>
duke@0 1197 <tr bgcolor="#CCCCFF">
duke@0 1198 <td colspan="2" align="center">
duke@0 1199 Event Enabling Capabilities
duke@0 1200 </td>
duke@0 1201 </tr>
duke@0 1202 <tr bgcolor="#EEEEFF">
duke@0 1203 <td >
duke@0 1204 Capability
duke@0 1205 </td>
duke@0 1206 <td>
duke@0 1207 Events
duke@0 1208 </td>
duke@0 1209 </tr>
duke@0 1210 <xsl:for-each select="//capabilityfield">
duke@0 1211 <xsl:variable name="capa" select="@id"/>
duke@0 1212 <xsl:variable name="events" select="//event[capabilities/required/@id=$capa]"/>
duke@0 1213 <xsl:if test="count($events)">
duke@0 1214 <tr>
duke@0 1215 <td>
duke@0 1216 <a>
duke@0 1217 <xsl:attribute name="href">#jvmtiCapabilities.<xsl:value-of select="@id"/>
duke@0 1218 </xsl:attribute>
duke@0 1219 <code>
duke@0 1220 <xsl:value-of select="@id"/>
duke@0 1221 </code>
duke@0 1222 </a>
duke@0 1223 </td>
duke@0 1224 <td>
duke@0 1225 <xsl:for-each select="$events">
duke@0 1226 <a>
duke@0 1227 <xsl:attribute name="href">#<xsl:value-of select="@id"/>
duke@0 1228 </xsl:attribute>
duke@0 1229 <code>
duke@0 1230 <xsl:value-of select="@id"/>
duke@0 1231 </code>
duke@0 1232 </a>
duke@0 1233 <br/>
duke@0 1234 </xsl:for-each>
duke@0 1235 </td>
duke@0 1236 </tr>
duke@0 1237 </xsl:if>
duke@0 1238 </xsl:for-each>
duke@0 1239 </table>
duke@0 1240 </xsl:template>
duke@0 1241
duke@0 1242 <xsl:template match="capability|required">
duke@0 1243 <tr>
duke@0 1244 <td>
duke@0 1245 <a>
duke@0 1246 <xsl:attribute name="href">#jvmtiCapabilities.<xsl:value-of select="@id"/>
duke@0 1247 </xsl:attribute>
duke@0 1248 <code>
duke@0 1249 <xsl:value-of select="@id"/>
duke@0 1250 </code>
duke@0 1251 </a>
duke@0 1252 </td>
duke@0 1253 <td>
duke@0 1254 <xsl:choose>
duke@0 1255 <xsl:when test=".=''">
duke@0 1256 <xsl:variable name="desiredID" select="@id"/>
duke@0 1257 <xsl:for-each select="//capabilityfield[@id=$desiredID]">
duke@0 1258 <xsl:apply-templates select="description" mode="brief"/>
duke@0 1259 </xsl:for-each>
duke@0 1260 </xsl:when>
duke@0 1261 <xsl:otherwise>
duke@0 1262 <xsl:apply-templates/>
duke@0 1263 </xsl:otherwise>
duke@0 1264 </xsl:choose>
duke@0 1265 </td>
duke@0 1266 </tr>
duke@0 1267 </xsl:template>
duke@0 1268
duke@0 1269 <xsl:template match="function" mode="errors">
duke@0 1270 <xsl:variable name="haserrors">
duke@0 1271 <xsl:apply-templates select="capabilities/required" mode="haserrors"/>
duke@0 1272 <xsl:apply-templates select="errors/error" mode="haserrors"/>
duke@0 1273 <xsl:apply-templates select="parameters/param" mode="haserrors"/>
duke@0 1274 </xsl:variable>
duke@0 1275 <p/>
duke@0 1276 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1277 <tr bgcolor="#CCCCFF">
duke@0 1278 <td colspan="2" align="center" class="tableHeader">
duke@0 1279 Errors
duke@0 1280 </td>
duke@0 1281 </tr>
duke@0 1282 <xsl:choose>
duke@0 1283 <xsl:when test="contains($haserrors,'yes')">
duke@0 1284 <tr>
duke@0 1285 <td colspan="2">
duke@0 1286 This function returns either a
duke@0 1287 <a href="#universal-error">universal error</a>
duke@0 1288 or one of the following errors
duke@0 1289 </td>
duke@0 1290 </tr>
duke@0 1291 <tr bgcolor="#EEEEFF">
duke@0 1292 <td>
duke@0 1293 Error
duke@0 1294 </td>
duke@0 1295 <td>
duke@0 1296 Description
duke@0 1297 </td>
duke@0 1298 </tr>
duke@0 1299 <xsl:apply-templates select="capabilities/required" mode="errors"/>
duke@0 1300 <xsl:apply-templates select="errors/error"/>
duke@0 1301 <xsl:apply-templates select="parameters/param" mode="errors"/>
duke@0 1302 </xsl:when>
duke@0 1303 <xsl:otherwise>
duke@0 1304 <tr>
duke@0 1305 <td colspan="2">
duke@0 1306 This function returns a
duke@0 1307 <a href="#universal-error">universal error</a>
duke@0 1308 </td>
duke@0 1309 </tr>
duke@0 1310 </xsl:otherwise>
duke@0 1311 </xsl:choose>
duke@0 1312 </table>
duke@0 1313 </xsl:template>
duke@0 1314
duke@0 1315 <xsl:template match="required" mode="haserrors">
duke@0 1316 yes
duke@0 1317 </xsl:template>
duke@0 1318
duke@0 1319 <xsl:template match="required" mode="errors">
duke@0 1320 <tr>
duke@0 1321 <td>
duke@0 1322 <a href="#JVMTI_ERROR_MUST_POSSESS_CAPABILITY">
duke@0 1323 <code>
duke@0 1324 JVMTI_ERROR_MUST_POSSESS_CAPABILITY
duke@0 1325 </code>
duke@0 1326 </a>
duke@0 1327 </td>
duke@0 1328 <td>
duke@0 1329 The environment does not possess the capability
duke@0 1330 <a>
duke@0 1331 <xsl:attribute name="href">#jvmtiCapabilities.<xsl:value-of select="@id"/></xsl:attribute>
duke@0 1332 <code>
duke@0 1333 <xsl:value-of select="@id"/>
duke@0 1334 </code>
duke@0 1335 </a>.
duke@0 1336 Use <a href="#AddCapabilities"><code>AddCapabilities</code></a>.
duke@0 1337 </td>
duke@0 1338 </tr>
duke@0 1339 </xsl:template>
duke@0 1340
duke@0 1341 <xsl:template match="param" mode="haserrors">
duke@0 1342 <xsl:apply-templates mode="haserrors"/>
duke@0 1343 </xsl:template>
duke@0 1344
duke@0 1345 <xsl:template match="param" mode="errors">
duke@0 1346 <xsl:apply-templates select="." mode="errors1"/>
duke@0 1347 <xsl:apply-templates select="." mode="errors2"/>
duke@0 1348 </xsl:template>
duke@0 1349
duke@0 1350 <xsl:template match="param" mode="errors1">
duke@0 1351 <xsl:variable name="haserrors">
duke@0 1352 <xsl:apply-templates mode="haserrors"/>
duke@0 1353 </xsl:variable>
duke@0 1354 <xsl:if test="contains($haserrors,'yes')!=0">
duke@0 1355 <xsl:variable name="erroridraw">
duke@0 1356 <xsl:apply-templates mode="errorid"/>
duke@0 1357 </xsl:variable>
duke@0 1358 <xsl:variable name="errorid" select="normalize-space($erroridraw)"/>
duke@0 1359 <tr>
duke@0 1360 <td>
duke@0 1361 <a>
duke@0 1362 <xsl:attribute name="href">#<xsl:value-of select="$errorid"/></xsl:attribute>
duke@0 1363 <code>
duke@0 1364 <xsl:value-of select="$errorid"/>
duke@0 1365 </code>
duke@0 1366 </a>
duke@0 1367 </td>
duke@0 1368 <td>
duke@0 1369 <xsl:apply-templates mode="errordesc">
duke@0 1370 <xsl:with-param name="id" select="@id"/>
duke@0 1371 </xsl:apply-templates>
duke@0 1372 </td>
duke@0 1373 </tr>
duke@0 1374 </xsl:if>
duke@0 1375 </xsl:template>
duke@0 1376
duke@0 1377 <xsl:template match="param" mode="errors2">
duke@0 1378 <xsl:variable name="haserrors2">
duke@0 1379 <xsl:apply-templates mode="haserrors2"/>
duke@0 1380 </xsl:variable>
duke@0 1381 <xsl:if test="contains($haserrors2,'yes')!=0">
duke@0 1382 <xsl:variable name="erroridraw2">
duke@0 1383 <xsl:apply-templates mode="errorid2"/>
duke@0 1384 </xsl:variable>
duke@0 1385 <xsl:variable name="errorid2" select="normalize-space($erroridraw2)"/>
duke@0 1386 <tr>
duke@0 1387 <td>
duke@0 1388 <a>
duke@0 1389 <xsl:attribute name="href">#<xsl:value-of select="$errorid2"/></xsl:attribute>
duke@0 1390 <code>
duke@0 1391 <xsl:value-of select="$errorid2"/>
duke@0 1392 </code>
duke@0 1393 </a>
duke@0 1394 </td>
duke@0 1395 <td>
duke@0 1396 <xsl:apply-templates mode="errordesc2">
duke@0 1397 <xsl:with-param name="id" select="@id"/>
duke@0 1398 </xsl:apply-templates>
duke@0 1399 </td>
duke@0 1400 </tr>
duke@0 1401 </xsl:if>
duke@0 1402 </xsl:template>
duke@0 1403
duke@0 1404 <xsl:template match="description" mode="haserrors">
duke@0 1405 </xsl:template>
duke@0 1406
duke@0 1407 <xsl:template match="description" mode="errorid">
duke@0 1408 </xsl:template>
duke@0 1409
duke@0 1410 <xsl:template match="description" mode="errordesc">
duke@0 1411 </xsl:template>
duke@0 1412
duke@0 1413 <xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|jthread|jthreadGroup|jobject|enum|jlocation" mode="haserrors">
duke@0 1414 yes
duke@0 1415 </xsl:template>
duke@0 1416
duke@0 1417 <xsl:template match="jclass" mode="haserrors">
duke@0 1418 <xsl:if test="count(@method)=0">
duke@0 1419 yes
duke@0 1420 </xsl:if>
duke@0 1421 </xsl:template>
duke@0 1422
duke@0 1423 <xsl:template match="description|jclass|jfieldID|jrawMonitorID|
duke@0 1424 jthreadGroup|jobject|enum|jlocation|jvalue|jchar|jint|jlong|jfloat|jdouble|jboolean|
duke@0 1425 char|uchar|size_t|void|varargs|struct|
duke@0 1426 ptrtype|outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf" mode="haserrors2">
duke@0 1427 </xsl:template>
duke@0 1428
duke@0 1429 <xsl:template match="jmethodID" mode="haserrors2">
duke@0 1430 <xsl:if test="count(@native)=1 and contains(@native,'error')">
duke@0 1431 yes
duke@0 1432 </xsl:if>
duke@0 1433 </xsl:template>
duke@0 1434
duke@0 1435 <xsl:template match="jthread" mode="haserrors2">
duke@0 1436 <xsl:if test="count(@started)=0 or contains(@started,'yes') or @started=''">
duke@0 1437 yes
duke@0 1438 </xsl:if>
duke@0 1439 </xsl:template>
duke@0 1440
duke@0 1441 <xsl:template match="jframeID" mode="haserrors2">
duke@0 1442 yes
duke@0 1443 </xsl:template>
duke@0 1444
duke@0 1445 <xsl:template match="description" mode="errorid2">
duke@0 1446 </xsl:template>
duke@0 1447
duke@0 1448 <xsl:template match="description" mode="errordesc2">
duke@0 1449 </xsl:template>
duke@0 1450
duke@0 1451 <xsl:template match="jmethodID" mode="errorid">
duke@0 1452 <xsl:text>JVMTI_ERROR_INVALID_METHODID</xsl:text>
duke@0 1453 </xsl:template>
duke@0 1454
duke@0 1455 <xsl:template match="jmethodID" mode="errorid2">
duke@0 1456 <xsl:text>JVMTI_ERROR_NATIVE_METHOD</xsl:text>
duke@0 1457 </xsl:template>
duke@0 1458
duke@0 1459 <xsl:template match="jmethodID" mode="errordesc">
duke@0 1460 <xsl:param name="id"/>
duke@0 1461 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1462 <xsl:text> is not a jmethodID.</xsl:text>
duke@0 1463 </xsl:template>
duke@0 1464
duke@0 1465 <xsl:template match="jmethodID" mode="errordesc2">
duke@0 1466 <xsl:param name="id"/>
duke@0 1467 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1468 <xsl:text> is a native method.</xsl:text>
duke@0 1469 </xsl:template>
duke@0 1470
duke@0 1471 <xsl:template match="jfieldID" mode="errorid">
duke@0 1472 <xsl:text>JVMTI_ERROR_INVALID_FIELDID</xsl:text>
duke@0 1473 </xsl:template>
duke@0 1474
duke@0 1475 <xsl:template match="jfieldID" mode="errordesc">
duke@0 1476 <xsl:param name="id"/>
duke@0 1477 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1478 <xsl:text> is not a jfieldID.</xsl:text>
duke@0 1479 </xsl:template>
duke@0 1480
duke@0 1481 <xsl:template match="jframeID" mode="errorid">
duke@0 1482 <xsl:text>JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:text>
duke@0 1483 </xsl:template>
duke@0 1484
duke@0 1485 <xsl:template match="jframeID" mode="errorid2">
duke@0 1486 <xsl:text>JVMTI_ERROR_NO_MORE_FRAMES</xsl:text>
duke@0 1487 </xsl:template>
duke@0 1488
duke@0 1489 <xsl:template match="jframeID" mode="errordesc">
duke@0 1490 <xsl:param name="id"/>
duke@0 1491 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1492 <xsl:text> is less than zero.</xsl:text>
duke@0 1493 </xsl:template>
duke@0 1494
duke@0 1495 <xsl:template match="jframeID" mode="errordesc2">
duke@0 1496 <xsl:param name="id"/>
duke@0 1497 <xsl:text>There are no stack frames at the specified </xsl:text>
duke@0 1498 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1499 <xsl:text>.</xsl:text>
duke@0 1500 </xsl:template>
duke@0 1501
duke@0 1502 <xsl:template match="jrawMonitorID" mode="errorid">
duke@0 1503 <xsl:text>JVMTI_ERROR_INVALID_MONITOR</xsl:text>
duke@0 1504 </xsl:template>
duke@0 1505
duke@0 1506 <xsl:template match="jrawMonitorID" mode="errordesc">
duke@0 1507 <xsl:param name="id"/>
duke@0 1508 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1509 <xsl:text> is not a jrawMonitorID.</xsl:text>
duke@0 1510 </xsl:template>
duke@0 1511
duke@0 1512 <xsl:template match="jclass" mode="errorid">
duke@0 1513 <xsl:text>JVMTI_ERROR_INVALID_CLASS</xsl:text>
duke@0 1514 </xsl:template>
duke@0 1515
duke@0 1516 <xsl:template match="jclass" mode="errordesc">
duke@0 1517 <xsl:param name="id"/>
duke@0 1518 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1519 <xsl:text> is not a class object or the class has been unloaded.</xsl:text>
duke@0 1520 </xsl:template>
duke@0 1521
duke@0 1522 <xsl:template match="jthread" mode="errorid">
duke@0 1523 <xsl:text>JVMTI_ERROR_INVALID_THREAD</xsl:text>
duke@0 1524 </xsl:template>
duke@0 1525
duke@0 1526 <xsl:template match="jthread" mode="errorid2">
duke@0 1527 <xsl:text>JVMTI_ERROR_THREAD_NOT_ALIVE</xsl:text>
duke@0 1528 </xsl:template>
duke@0 1529
duke@0 1530 <xsl:template match="jthread" mode="errordesc">
duke@0 1531 <xsl:param name="id"/>
duke@0 1532 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1533 <xsl:text> is not a thread object.</xsl:text>
duke@0 1534 </xsl:template>
duke@0 1535
duke@0 1536 <xsl:template match="jthread" mode="errordesc2">
duke@0 1537 <xsl:param name="id"/>
duke@0 1538 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1539 <xsl:text> is not live (has not been started or is now dead).</xsl:text>
duke@0 1540 </xsl:template>
duke@0 1541
duke@0 1542 <xsl:template match="jthreadGroup" mode="errorid">
duke@0 1543 <xsl:text>JVMTI_ERROR_INVALID_THREAD_GROUP</xsl:text>
duke@0 1544 </xsl:template>
duke@0 1545
duke@0 1546 <xsl:template match="jthreadGroup" mode="errordesc">
duke@0 1547 <xsl:param name="id"/>
duke@0 1548 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1549 <xsl:text> is not a thread group object.</xsl:text>
duke@0 1550 </xsl:template>
duke@0 1551
duke@0 1552 <xsl:template match="jobject" mode="errorid">
duke@0 1553 <xsl:text>JVMTI_ERROR_INVALID_OBJECT</xsl:text>
duke@0 1554 </xsl:template>
duke@0 1555
duke@0 1556 <xsl:template match="jobject" mode="errordesc">
duke@0 1557 <xsl:param name="id"/>
duke@0 1558 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1559 <xsl:text> is not an object.</xsl:text>
duke@0 1560 </xsl:template>
duke@0 1561
duke@0 1562 <xsl:template match="enum" mode="errorid">
duke@0 1563 <xsl:choose>
duke@0 1564 <xsl:when test=".='jvmtiEvent'">
duke@0 1565 <xsl:text>JVMTI_ERROR_INVALID_EVENT_TYPE</xsl:text>
duke@0 1566 </xsl:when>
duke@0 1567 <xsl:otherwise>
duke@0 1568 <xsl:text>JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:text>
duke@0 1569 </xsl:otherwise>
duke@0 1570 </xsl:choose>
duke@0 1571 </xsl:template>
duke@0 1572
duke@0 1573 <xsl:template match="enum" mode="errordesc">
duke@0 1574 <xsl:param name="id"/>
duke@0 1575 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1576 <xsl:text> is not a </xsl:text>
duke@0 1577 <xsl:value-of select="."/>
duke@0 1578 <xsl:text>.</xsl:text>
duke@0 1579 </xsl:template>
duke@0 1580
duke@0 1581 <xsl:template match="jlocation" mode="errorid">
duke@0 1582 <xsl:text>JVMTI_ERROR_INVALID_LOCATION</xsl:text>
duke@0 1583 </xsl:template>
duke@0 1584
duke@0 1585 <xsl:template match="jlocation" mode="errordesc">
duke@0 1586 <xsl:param name="id"/>
duke@0 1587 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1588 <xsl:text> is not a valid location.</xsl:text>
duke@0 1589 </xsl:template>
duke@0 1590
duke@0 1591 <xsl:template match="jint" mode="haserrors">
duke@0 1592 <xsl:if test="count(@min)=1">
duke@0 1593 yes
duke@0 1594 </xsl:if>
duke@0 1595 </xsl:template>
duke@0 1596
duke@0 1597 <xsl:template match="jint" mode="errorid">
duke@0 1598 <xsl:text>JVMTI_ERROR_ILLEGAL_ARGUMENT</xsl:text>
duke@0 1599 </xsl:template>
duke@0 1600
duke@0 1601 <xsl:template match="jint" mode="errordesc">
duke@0 1602 <xsl:param name="id"/>
duke@0 1603 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1604 <xsl:text> is less than </xsl:text>
duke@0 1605 <code><xsl:value-of select="@min"/></code>
duke@0 1606 <xsl:text>.</xsl:text>
duke@0 1607 </xsl:template>
duke@0 1608
duke@0 1609 <xsl:template match="jvalue|jchar|jlong|jfloat|jdouble|jboolean|char|uchar|size_t|void|varargs|struct" mode="haserrors">
duke@0 1610 </xsl:template>
duke@0 1611
duke@0 1612 <xsl:template match="jvalue|jchar|jlong|jfloat|jdouble|jboolean|char|uchar|size_t|void|varargs|struct" mode="errordesc">
duke@0 1613 <xsl:param name="id"/>
duke@0 1614 <xsl:message terminate="yes">
duke@0 1615 attempt to get error description for <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1616 </xsl:message>
duke@0 1617 </xsl:template>
duke@0 1618
duke@0 1619 <xsl:template match="ptrtype|outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf" mode="haserrors">
duke@0 1620 <xsl:if test="count(nullok)=0">
duke@0 1621 yes
duke@0 1622 </xsl:if>
duke@0 1623 </xsl:template>
duke@0 1624
duke@0 1625 <xsl:template match="ptrtype|outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf" mode="errorid">
duke@0 1626 <xsl:text>JVMTI_ERROR_NULL_POINTER</xsl:text>
duke@0 1627 </xsl:template>
duke@0 1628
duke@0 1629 <xsl:template match="ptrtype|outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf" mode="errordesc">
duke@0 1630 <xsl:param name="id"/>
duke@0 1631 <xsl:if test="count(nullok)=1">
duke@0 1632 <xsl:message terminate="yes">
duke@0 1633 attempt to get error description in null ok case for <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1634 </xsl:message>
duke@0 1635 </xsl:if>
duke@0 1636 <xsl:apply-templates select="." mode="paramlink"/>
duke@0 1637 <xsl:text> is </xsl:text>
duke@0 1638 <code>NULL</code>
duke@0 1639 <xsl:text>.</xsl:text>
duke@0 1640 </xsl:template>
duke@0 1641
duke@0 1642 <xsl:template match="jmethodID|jfieldID|jframeID|jrawMonitorID|jint|jclass|jthread|jthreadGroup|jobject|enum|jlocation|ptrtype|outptr|allocbuf|allocallocbuf|inptr|inbuf|outbuf|vmbuf|agentbuf" mode="paramlink">
duke@0 1643 <a>
duke@0 1644 <xsl:attribute name="href">#<xsl:value-of select="ancestor::function/@id|ancestor::event/@id"/>.<xsl:value-of select="ancestor::param/@id"/>
duke@0 1645 </xsl:attribute>
duke@0 1646 <code>
duke@0 1647 <xsl:value-of select="ancestor::param/@id"/>
duke@0 1648 </code>
duke@0 1649 </a>
duke@0 1650 </xsl:template>
duke@0 1651
duke@0 1652 <xsl:template match="error" mode="haserrors">
duke@0 1653 yes
duke@0 1654 </xsl:template>
duke@0 1655
duke@0 1656 <xsl:template match="error">
duke@0 1657 <tr>
duke@0 1658 <td>
duke@0 1659 <a>
duke@0 1660 <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
duke@0 1661 <code>
duke@0 1662 <xsl:value-of select="@id"/>
duke@0 1663 </code>
duke@0 1664 </a>
duke@0 1665 </td>
duke@0 1666 <td>
duke@0 1667 <xsl:apply-templates/>
duke@0 1668 </td>
duke@0 1669 </tr>
duke@0 1670 </xsl:template>
duke@0 1671
duke@0 1672 <xsl:template match="errorsection">
duke@0 1673 <p/>
duke@0 1674 <hr noshade="noshade" size="3"/>
duke@0 1675 <h2>
duke@0 1676 Errors
duke@0 1677 </h2>
duke@0 1678 <p/>
duke@0 1679 <xsl:apply-templates select="intro"/>
duke@0 1680 <p/>
duke@0 1681 <xsl:apply-templates select="errorcategory"/>
duke@0 1682 <p/>
duke@0 1683 </xsl:template>
duke@0 1684
duke@0 1685 <xsl:template match="datasection">
duke@0 1686 <p/>
duke@0 1687 <hr noshade="noshade" size="3"/>
duke@0 1688 <h2>
duke@0 1689 Data Types
duke@0 1690 </h2>
duke@0 1691 <p/>
duke@0 1692 <xsl:apply-templates select="intro"/>
duke@0 1693 <xsl:apply-templates select="basetypes"/>
duke@0 1694 <p/>
duke@0 1695 <a name="StructureTypeDefinitions"></a>
duke@0 1696 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1697 <tr bgcolor="#CCCCFF">
duke@0 1698 <td colspan="2" align="center" class="tableHeader">
duke@0 1699 Structure Type Definitions
duke@0 1700 </td>
duke@0 1701 </tr>
duke@0 1702 <tr bgcolor="#EEEEFF">
duke@0 1703 <td>
duke@0 1704 Type
duke@0 1705 </td>
duke@0 1706 <td>
duke@0 1707 Description
duke@0 1708 </td>
duke@0 1709 </tr>
duke@0 1710 <xsl:apply-templates select="//typedef|//uniontypedef|//capabilitiestypedef" mode="tableentry">
duke@0 1711 <xsl:sort select="@id"/>
duke@0 1712 </xsl:apply-templates>
duke@0 1713 </table>
duke@0 1714 <p/>
duke@0 1715 <a name="FunctionTypeDefinitions"></a>
duke@0 1716 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1717 <tr bgcolor="#CCCCFF">
duke@0 1718 <td colspan="2" align="center" class="tableHeader">
duke@0 1719 Function Type Definitions
duke@0 1720 </td>
duke@0 1721 </tr>
duke@0 1722 <tr bgcolor="#EEEEFF">
duke@0 1723 <td>
duke@0 1724 Type
duke@0 1725 </td>
duke@0 1726 <td>
duke@0 1727 Description
duke@0 1728 </td>
duke@0 1729 </tr>
duke@0 1730 <xsl:apply-templates select="//callback" mode="tableentry">
duke@0 1731 <xsl:sort select="@id"/>
duke@0 1732 </xsl:apply-templates>
duke@0 1733 </table>
duke@0 1734 <p/>
duke@0 1735 <a name="EnumerationDefinitions"></a>
duke@0 1736 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1737 <tr bgcolor="#CCCCFF">
duke@0 1738 <td colspan="2" align="center" class="tableHeader">
duke@0 1739 Enumeration Definitions
duke@0 1740 </td>
duke@0 1741 </tr>
duke@0 1742 <tr bgcolor="#EEEEFF">
duke@0 1743 <td>
duke@0 1744 Type
duke@0 1745 </td>
duke@0 1746 <td>
duke@0 1747 Description
duke@0 1748 </td>
duke@0 1749 </tr>
duke@0 1750 <xsl:apply-templates select="//constants[@kind='enum']" mode="tableentry">
duke@0 1751 <xsl:sort select="@id"/>
duke@0 1752 </xsl:apply-templates>
duke@0 1753 </table>
duke@0 1754 <p/>
duke@0 1755 <a name="FunctionTable"></a>
duke@0 1756 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1757 <tr bgcolor="#CCCCFF">
duke@0 1758 <td colspan="3" align="center" class="tableHeader">
duke@0 1759 Function Table Layout
duke@0 1760 </td>
duke@0 1761 </tr>
duke@0 1762 <tr bgcolor="#EEEEFF">
duke@0 1763 <td>
duke@0 1764 Position
duke@0 1765 </td>
duke@0 1766 <td>
duke@0 1767 Function
duke@0 1768 </td>
duke@0 1769 <td>
duke@0 1770 Declaration
duke@0 1771 </td>
duke@0 1772 </tr>
duke@0 1773 <xsl:call-template name="funcStruct">
duke@0 1774 <xsl:with-param name="funcs" select="//functionsection/category/function[count(@hide)=0]"/>
duke@0 1775 <xsl:with-param name="index" select="1"/>
duke@0 1776 </xsl:call-template>
duke@0 1777 </table>
duke@0 1778 <p/>
duke@0 1779 </xsl:template>
duke@0 1780
duke@0 1781
duke@0 1782 <xsl:template name="funcStruct">
duke@0 1783 <xsl:param name="funcs"/>
duke@0 1784 <xsl:param name="index"/>
duke@0 1785 <xsl:variable name="thisFunction" select="$funcs[@num=$index]"/>
duke@0 1786 <tr>
duke@0 1787 <td align="right">
duke@0 1788 <xsl:number value="$index" format=" 1"/>
duke@0 1789 </td>
duke@0 1790 <xsl:choose>
duke@0 1791 <xsl:when test="count($thisFunction)=1">
duke@0 1792 <td>
duke@0 1793 <a>
duke@0 1794 <xsl:attribute name="href">
duke@0 1795 <xsl:text>#</xsl:text>
duke@0 1796 <xsl:value-of select="$thisFunction/@id"/>
duke@0 1797 </xsl:attribute>
duke@0 1798 <xsl:value-of select="$thisFunction/synopsis"/>
duke@0 1799 </a>
duke@0 1800 </td>
duke@0 1801 <td>
duke@0 1802 <pre>
duke@0 1803 <xsl:text>jvmtiError (JNICALL *</xsl:text>
duke@0 1804 <xsl:value-of select="$thisFunction/@id"/>
duke@0 1805 <xsl:text>) (jvmtiEnv* env</xsl:text>
duke@0 1806 <xsl:apply-templates select="$thisFunction/parameters" mode="signature">
duke@0 1807 <xsl:with-param name="comma">
alanb@10420 1808 <xsl:text>,&#xA; </xsl:text>
duke@0 1809 </xsl:with-param>
duke@0 1810 </xsl:apply-templates>
duke@0 1811 <xsl:text>);</xsl:text>
duke@0 1812 </pre>
duke@0 1813 </td>
duke@0 1814 </xsl:when>
duke@0 1815 <xsl:otherwise>
duke@0 1816 <xsl:if test="count($thisFunction) != 0">
duke@0 1817 <xsl:message terminate="yes">
duke@0 1818 More than one function has index number <xsl:number value="$index" format=" 1"/>.
duke@0 1819 </xsl:message>
duke@0 1820 </xsl:if>
duke@0 1821 <td>
duke@0 1822 <i>reserved</i>
duke@0 1823 </td>
duke@0 1824 <td>
duke@0 1825 <pre>
duke@0 1826 <xsl:text>void *reserved</xsl:text>
duke@0 1827 <xsl:value-of select="$index"/>
duke@0 1828 <xsl:text>;</xsl:text>
duke@0 1829 </pre>
duke@0 1830 </td>
duke@0 1831 </xsl:otherwise>
duke@0 1832 </xsl:choose>
duke@0 1833 </tr>
duke@0 1834 <xsl:if test="count($funcs[@num &gt; $index]) &gt; 0">
duke@0 1835 <xsl:call-template name="funcStruct">
duke@0 1836 <xsl:with-param name="funcs" select="$funcs"/>
duke@0 1837 <xsl:with-param name="index" select="1+$index"/>
duke@0 1838 </xsl:call-template>
duke@0 1839 </xsl:if>
duke@0 1840 </xsl:template>
duke@0 1841
duke@0 1842
duke@0 1843
duke@0 1844 <xsl:template match="errorcategory">
duke@0 1845 <h3>
duke@0 1846 <xsl:attribute name="id">
duke@0 1847 <xsl:value-of select="@id"/>
duke@0 1848 </xsl:attribute>
duke@0 1849 <xsl:value-of select="@label"/>
duke@0 1850 </h3>
duke@0 1851 <xsl:apply-templates select="intro"/>
duke@0 1852 <p/>
duke@0 1853 <dl>
duke@0 1854 <xsl:apply-templates select="errorid"/>
duke@0 1855 </dl>
duke@0 1856 <p/>
duke@0 1857 </xsl:template>
duke@0 1858
duke@0 1859 <xsl:template match="errorid">
duke@0 1860 <dt>
duke@0 1861 <code>
duke@0 1862 <xsl:attribute name="id">
duke@0 1863 <xsl:value-of select="@id"/>
duke@0 1864 </xsl:attribute>
duke@0 1865 <xsl:value-of select="@id"/> (<xsl:value-of select="@num"/>)
duke@0 1866 </code>
duke@0 1867 </dt>
duke@0 1868 <dd>
duke@0 1869 <xsl:apply-templates/>
duke@0 1870 <p/>
duke@0 1871 </dd>
duke@0 1872 </xsl:template>
duke@0 1873
duke@0 1874 <xsl:template match="changehistory">
duke@0 1875 <p/><hr noshade="noshade" size="3"/>
duke@0 1876 <h2>Change History</h2>
duke@0 1877 Last update: <xsl:value-of select="@update"/><br/>
duke@0 1878 Version: <xsl:call-template name="showversion"/>
duke@0 1879 <p/>
duke@0 1880 <xsl:apply-templates select="intro"/>
duke@0 1881 <p/>
duke@0 1882 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1883 <tr bgcolor="#EEEEFF">
duke@0 1884 <td>
duke@0 1885 <b>Version</b><br/>
duke@0 1886 <b>Date</b>
duke@0 1887 </td>
duke@0 1888 <td>
duke@0 1889 <b>Changes</b>
duke@0 1890 </td>
duke@0 1891 </tr>
duke@0 1892 <xsl:apply-templates select="change"/>
duke@0 1893 </table>
duke@0 1894 </xsl:template>
duke@0 1895
duke@0 1896 <xsl:template match="change">
duke@0 1897 <tr>
duke@0 1898 <td>
duke@0 1899 <xsl:if test="count(@version)">
duke@0 1900 <b>
duke@0 1901 <xsl:value-of select="@version"/>
duke@0 1902 </b>
duke@0 1903 <br/>
duke@0 1904 </xsl:if>
duke@0 1905 <xsl:value-of select="@date"/>
duke@0 1906 </td>
duke@0 1907 <td>
duke@0 1908 <xsl:apply-templates/>
duke@0 1909 </td>
duke@0 1910 </tr>
duke@0 1911 </xsl:template>
duke@0 1912
duke@0 1913 <xsl:template match="intro">
duke@0 1914 <xsl:if test="@id!=''">
duke@0 1915 <xsl:choose>
duke@0 1916 <xsl:when test="@label!=''">
duke@0 1917 <h4>
duke@0 1918 <xsl:attribute name="id">
duke@0 1919 <xsl:value-of select="@id"/>
duke@0 1920 </xsl:attribute>
duke@0 1921 <xsl:value-of select="@label"/>
duke@0 1922 </h4>
duke@0 1923 </xsl:when>
duke@0 1924 <xsl:otherwise>
duke@0 1925 <a>
duke@0 1926 <xsl:attribute name="name">
duke@0 1927 <xsl:value-of select="@id"/>
duke@0 1928 </xsl:attribute>
duke@0 1929 </a>
duke@0 1930 </xsl:otherwise>
duke@0 1931 </xsl:choose>
duke@0 1932 </xsl:if>
duke@0 1933 <xsl:apply-templates/>
duke@0 1934 </xsl:template>
duke@0 1935
duke@0 1936 <xsl:template match="issue">
duke@0 1937 <xsl:if test="$development = 'Show'">
duke@0 1938 <p style="color: red">
duke@0 1939 To be resolved:
duke@0 1940 <xsl:apply-templates/>
duke@0 1941 </p>
duke@0 1942 </xsl:if>
duke@0 1943 </xsl:template>
duke@0 1944
duke@0 1945 <xsl:template match="rationale">
duke@0 1946 <p style="color: purple">
duke@0 1947 Rationale:
duke@0 1948 <xsl:apply-templates/>
duke@0 1949 </p>
duke@0 1950 </xsl:template>
duke@0 1951
duke@0 1952 <xsl:template match="todo">
duke@0 1953 <xsl:if test="$development = 'Show'">
duke@0 1954 <p style="color: green">
duke@0 1955 To do:
duke@0 1956 <xsl:apply-templates/>
duke@0 1957 </p>
duke@0 1958 </xsl:if>
duke@0 1959 </xsl:template>
duke@0 1960
duke@0 1961 <xsl:template match="elide">
duke@0 1962 </xsl:template>
duke@0 1963
duke@0 1964 <xsl:template match="b">
duke@0 1965 <b>
duke@0 1966 <xsl:apply-templates/>
duke@0 1967 </b>
duke@0 1968 </xsl:template>
duke@0 1969
duke@0 1970 <xsl:template match="example">
duke@0 1971 <blockquote>
duke@0 1972 <pre>
duke@0 1973 <xsl:apply-templates/>
duke@0 1974 </pre>
duke@0 1975 </blockquote>
duke@0 1976 </xsl:template>
duke@0 1977
duke@0 1978
duke@0 1979 <xsl:template match="table">
duke@0 1980 <table border="1" cellpadding="3" cellspacing="0" width="100%">
duke@0 1981 <xsl:apply-templates/>
duke@0 1982 </table>
duke@0 1983 </xsl:template>
duke@0 1984
duke@0 1985 <xsl:template match="tr">
duke@0 1986 <tr>
duke@0 1987 <xsl:apply-templates/>
duke@0 1988 </tr>
duke@0 1989 </xsl:template>
duke@0 1990
duke@0 1991 <xsl:template match="td">
duke@0 1992 <td>
duke@0 1993 <xsl:attribute name="align">
duke@0 1994 <xsl:value-of select="@align"/>
duke@0 1995 </xsl:attribute>
duke@0 1996 <xsl:apply-templates/>
duke@0 1997 </td>
duke@0 1998 </xsl:template>
duke@0 1999
duke@0 2000 <xsl:template match="th">
duke@0 2001 <th bgcolor="#EEEEFF">
duke@0 2002 <xsl:attribute name="align">
duke@0 2003 <xsl:value-of select="@align"/>
duke@0 2004 </xsl:attribute>
duke@0 2005 <xsl:apply-templates/>
duke@0 2006 </th>
duke@0 2007 </xsl:template>
duke@0 2008
duke@0 2009 <xsl:template match="dl">
duke@0 2010 <dl>
duke@0 2011 <xsl:apply-templates/>
duke@0 2012 </dl>
duke@0 2013 </xsl:template>
duke@0 2014
duke@0 2015 <xsl:template match="dt">
duke@0 2016 <dt>
duke@0 2017 <xsl:apply-templates/>
duke@0 2018 </dt>
duke@0 2019 </xsl:template>
duke@0 2020
duke@0 2021 <xsl:template match="dd">
duke@0 2022 <dd>
duke@0 2023 <xsl:apply-templates/>
duke@0 2024 </dd>
duke@0 2025 </xsl:template>
duke@0 2026
duke@0 2027 <xsl:template match="p">
duke@0 2028 <p>
duke@0 2029 <xsl:apply-templates/>
duke@0 2030 </p>
duke@0 2031 </xsl:template>
duke@0 2032
duke@0 2033 <xsl:template match="br">
duke@0 2034 <br>
duke@0 2035 <xsl:apply-templates/>
duke@0 2036 </br>
duke@0 2037 </xsl:template>
duke@0 2038
duke@0 2039 <xsl:template match="ul">
duke@0 2040 <ul>
duke@0 2041 <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
duke@0 2042 <xsl:apply-templates/>
duke@0 2043 </ul>
duke@0 2044 </xsl:template>
duke@0 2045
duke@0 2046 <xsl:template match="li">
duke@0 2047 <li>
duke@0 2048 <xsl:apply-templates/>
duke@0 2049 </li>
duke@0 2050 </xsl:template>
duke@0 2051
duke@0 2052 <xsl:template match="code">
duke@0 2053 <code>
duke@0 2054 <xsl:apply-templates/>
duke@0 2055 </code>
duke@0 2056 </xsl:template>
duke@0 2057
duke@0 2058 <xsl:template match="tm">
duke@0 2059 <xsl:apply-templates/>
duke@0 2060 <sup style="font-size: xx-small">
duke@0 2061 <xsl:text>TM</xsl:text>
duke@0 2062 </sup>
duke@0 2063 <xsl:text>&#032;</xsl:text>
duke@0 2064 </xsl:template>
duke@0 2065
duke@0 2066 <xsl:template match="b">
duke@0 2067 <b>
duke@0 2068 <xsl:apply-templates/>
duke@0 2069 </b>
duke@0 2070 </xsl:template>
duke@0 2071
duke@0 2072 <xsl:template match="i">
duke@0 2073 <i>
duke@0 2074 <xsl:apply-templates/>
duke@0 2075 </i>
duke@0 2076 </xsl:template>
duke@0 2077
duke@0 2078 <xsl:template match="space">
duke@0 2079 <xsl:text>&#032;</xsl:text>
duke@0 2080 </xsl:template>
duke@0 2081
duke@0 2082 <xsl:template match="jvmti">
duke@0 2083 <xsl:text>JVM</xsl:text><small style="font-size: xx-small">&#160;</small><xsl:text>TI</xsl:text>
duke@0 2084 </xsl:template>
duke@0 2085
duke@0 2086
duke@0 2087 </xsl:stylesheet>