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