8223319: Add copyright footer to specs and man pages

Reviewed-by: iris, sspitsyn
This commit is contained in:
Erik Joelsson 2019-05-07 12:32:19 -07:00
parent 1188188ee6
commit 6eb638318a
4 changed files with 123 additions and 80 deletions

View File

@ -32,6 +32,7 @@ include ModuleTools.gmk
include ProcessMarkdown.gmk include ProcessMarkdown.gmk
include ToolsJdk.gmk include ToolsJdk.gmk
include ZipArchive.gmk include ZipArchive.gmk
include TextFileProcessing.gmk
# This is needed to properly setup DOCS_MODULES. # This is needed to properly setup DOCS_MODULES.
$(eval $(call ReadImportMetaData)) $(eval $(call ReadImportMetaData))
@ -64,7 +65,7 @@ MODULES_SOURCE_PATH := $(call PathList, $(call GetModuleSrcPath) \
# URLs # URLs
JAVADOC_BASE_URL := https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&id=homepage JAVADOC_BASE_URL := https://docs.oracle.com/pls/topic/lookup?ctx=javase$(VERSION_NUMBER)&id=homepage
BUG_SUBMIT_URL := https://bugreport.java.com/bugreport/ BUG_SUBMIT_URL := https://bugreport.java.com/bugreport/
COPYRIGHT_URL := {@docroot}/../legal/copyright.html COPYRIGHT_URL := legal/copyright.html
LICENSE_URL := https://www.oracle.com/technetwork/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html LICENSE_URL := https://www.oracle.com/technetwork/java/javase/terms/license/java$(VERSION_NUMBER)speclicense.html
REDISTRIBUTION_URL := https://www.oracle.com/technetwork/java/redist-137594.html REDISTRIBUTION_URL := https://www.oracle.com/technetwork/java/redist-137594.html
@ -148,6 +149,15 @@ else
HEADER_STYLE := style="margin-top: 14px;" HEADER_STYLE := style="margin-top: 14px;"
endif endif
# $1 - Relative prefix to COPYRIGHT_URL
COPYRIGHT_BOTTOM = \
<a href="$(strip $1)$(COPYRIGHT_URL)">Copyright</a> \
&copy; 1993, $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME), \
$(COMPANY_ADDRESS).<br>All rights reserved. \
Use is subject to <a href="$(LICENSE_URL)">license terms</a> and the \
<a href="$(REDISTRIBUTION_URL)">documentation redistribution policy</a>. \
$(DRAFT_MARKER_STR) <!-- Version $(VERSION_STRING) -->
JAVADOC_BOTTOM := \ JAVADOC_BOTTOM := \
<a href="$(BUG_SUBMIT_URL)">Report a bug or suggest an enhancement</a><br> \ <a href="$(BUG_SUBMIT_URL)">Report a bug or suggest an enhancement</a><br> \
For further API reference and developer documentation see the \ For further API reference and developer documentation see the \
@ -157,12 +167,7 @@ JAVADOC_BOTTOM := \
of terms, workarounds, and working code examples.<br> \ of terms, workarounds, and working code examples.<br> \
Java is a trademark or registered trademark of $(FULL_COMPANY_NAME) in \ Java is a trademark or registered trademark of $(FULL_COMPANY_NAME) in \
the US and other countries.<br> \ the US and other countries.<br> \
<a href="$(COPYRIGHT_URL)">Copyright</a> \ $(call COPYRIGHT_BOTTOM, {@docroot}/../)
&copy; 1993, $(COPYRIGHT_YEAR), $(FULL_COMPANY_NAME), \
$(COMPANY_ADDRESS).<br>All rights reserved. \
Use is subject to <a href="$(LICENSE_URL)">license terms</a> and the \
<a href="$(REDISTRIBUTION_URL)">documentation redistribution policy</a>. \
$(DRAFT_MARKER_STR) <!-- Version $(VERSION_STRING) -->
JAVADOC_TOP := \ JAVADOC_TOP := \
<div style="padding: 6px; text-align: center; font-size: 80%; \ <div style="padding: 6px; text-align: center; font-size: 80%; \
@ -500,11 +505,11 @@ JDK_INDEX_TARGETS += $(COPY_DOCS_LEGAL_NOTICES)
################################################################################ ################################################################################
# Copy JDK specs files # Copy JDK specs files
# For all html documentation in $module/share/specs directories, copy it # For all non html/md files in $module/share/specs directories, copy them
# unmodified # unmodified
ALL_MODULES := $(call FindAllModules) ALL_MODULES := $(call FindAllModules)
COPY_SPEC_FILTER := %.html %.gif %.jpg %.mib %.css COPY_SPEC_FILTER := %.gif %.jpg %.mib %.css
$(foreach m, $(ALL_MODULES), \ $(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \ $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
@ -520,6 +525,45 @@ $(foreach m, $(ALL_MODULES), \
) \ ) \
) )
# Create copyright footer files that can be provided as input to pandoc. We
# need different files for different relative paths to the copyright.html
# file. The number 0-2 below represent how many extra directory levels down
# below the specs dir the specs html file is located. Each file name is
# stored in a variable SPECS_BOTTOM_FILE_$n where $n is 0, 1 or 2.
SPECS_BOTTOM = <hr/>$(COPYRIGHT_BOTTOM)
# The legal dir is one ../ below the specs dir, so start with one ../.
specs_bottom_rel_path := ../
$(foreach n, 0 1 2, \
$(eval SPECS_BOTTOM_FILE_$n := $(SUPPORT_OUTPUTDIR)/docs/full-specs-bottom-$n.txt) \
$(eval SPECS_BOTTOM_$n := $(call SPECS_BOTTOM,$(specs_bottom_rel_path))) \
$(eval $(SPECS_BOTTOM_FILE_$n): \
$(call DependOnVariable, SPECS_BOTTOM_$n) ; \
$(PRINTF) '$(SPECS_BOTTOM_$n)' > $$@ \
) \
$(eval specs_bottom_rel_path := $(specs_bottom_rel_path)../) \
)
# For all html files in $module/share/specs directories, copy and add the
# copyright footer.
$(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
$(foreach d, $(SPECS_$m), \
$(foreach f, $(filter %.html, $(call FindFiles, $d)), \
$(eval $m_$f_NOF_SUBDIRS := $(words $(subst /, $(SPACE), $(subst $d, , $(dir $f))))) \
$(eval $m_$f_NAME := PROCESS_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupTextFileProcessing, $($m_$f_NAME), \
SOURCE_FILES := $f, \
SOURCE_BASE_DIR := $d, \
OUTPUT_DIR := $(DOCS_OUTPUTDIR)/specs/, \
REPLACEMENTS := \
</body> => $(SPECS_BOTTOM_$($m_$f_NOF_SUBDIRS))</body>, \
)) \
$(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
) \
) \
)
ifeq ($(ENABLE_PANDOC), true) ifeq ($(ENABLE_PANDOC), true)
# For all markdown files in $module/share/specs directories, convert them to # For all markdown files in $module/share/specs directories, convert them to
# html, if we have pandoc (otherwise we'll just skip this). # html, if we have pandoc (otherwise we'll just skip this).
@ -529,15 +573,19 @@ ifeq ($(ENABLE_PANDOC), true)
$(foreach m, $(ALL_MODULES), \ $(foreach m, $(ALL_MODULES), \
$(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \ $(eval SPECS_$m := $(call FindModuleSpecsDirs, $m)) \
$(foreach d, $(SPECS_$m), \ $(foreach d, $(SPECS_$m), \
$(if $(filter %.md, $(call FindFiles, $d)), \ $(foreach f, $(filter %.md, $(call FindFiles, $d)), \
$(eval $m_$d_NAME := SPECS_TO_HTML_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \ $(eval $m_$f_NOF_SUBDIRS := $(words $(subst /, $(SPACE), $(subst $d, , $(dir $f))))) \
$(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \ $(eval $m_$f_BOTTOM_FILE := $(SPECS_BOTTOM_FILE_$($m_$f_NOF_SUBDIRS))) \
$(eval $m_$f_NAME := SPECS_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
SRC := $d, \ SRC := $d, \
FILES := $(filter %.md, $(call FindFiles, $d)), \ FILES := $f, \
DEST := $(DOCS_OUTPUTDIR)/specs/, \ DEST := $(DOCS_OUTPUTDIR)/specs/, \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
OPTIONS := -A $($m_$f_BOTTOM_FILE), \
EXTRA_DEPS := $($m_$f_BOTTOM_FILE), \
)) \ )) \
$(eval JDK_SPECS_TARGETS += $($($m_$d_NAME))) \ $(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
) \ ) \
) \ ) \
) )
@ -556,19 +604,21 @@ ifeq ($(ENABLE_PANDOC), true)
$(foreach m, $(ALL_MODULES), \ $(foreach m, $(ALL_MODULES), \
$(eval MAN_$m := $(call FindModuleManDirs, $m)) \ $(eval MAN_$m := $(call FindModuleManDirs, $m)) \
$(foreach d, $(MAN_$m), \ $(foreach d, $(MAN_$m), \
$(if $(filter %.md, $(call FindFiles, $d)), \ $(foreach f, $(filter %.md, $(call FindFiles, $d)), \
$(eval $m_$d_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $d, $(TOPDIR)))) \ $(eval $m_$f_NAME := MAN_TO_HTML_$m_$(strip $(call RelativePath, $f, $(TOPDIR)))) \
$(eval $(call SetupProcessMarkdown, $($m_$d_NAME), \ $(eval $(call SetupProcessMarkdown, $($m_$f_NAME), \
SRC := $d, \ SRC := $d, \
FILES := $(filter %.md, $(call FindFiles, $d)), \ FILES := $f, \
DEST := $(DOCS_OUTPUTDIR)/specs/man, \ DEST := $(DOCS_OUTPUTDIR)/specs/man, \
FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \ FILTER := $(PANDOC_HTML_MANPAGE_FILTER), \
CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \ CSS := $(GLOBAL_SPECS_DEFAULT_CSS_FILE), \
REPLACEMENTS := @@VERSION_SHORT@@ => $(VERSION_SHORT), \ REPLACEMENTS := @@VERSION_SHORT@@ => $(VERSION_SHORT), \
OPTIONS := -A $(SPECS_BOTTOM_FILE_1), \
EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \ EXTRA_DEPS := $(PANDOC_HTML_MANPAGE_FILTER) \
$(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT), \ $(PANDOC_HTML_MANPAGE_FILTER_JAVASCRIPT) \
$(SPECS_BOTTOM_FILE_1), \
)) \ )) \
$(eval JDK_SPECS_TARGETS += $($($m_$d_NAME))) \ $(eval JDK_SPECS_TARGETS += $($($m_$f_NAME))) \
) \ ) \
) \ ) \
) )
@ -580,19 +630,23 @@ endif
# Special treatment for generated documentation # Special treatment for generated documentation
JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html JDWP_PROTOCOL := $(SUPPORT_OUTPUTDIR)/gensrc/jdk.jdi/jdwp-protocol.html
$(eval $(call SetupCopyFiles, COPY_JDWP_PROTOCOL, \ $(eval $(call SetupTextFileProcessing, PROCESS_JDWP_PROTOCOL, \
FILES := $(JDWP_PROTOCOL), \ SOURCE_FILES := $(JDWP_PROTOCOL), \
DEST := $(DOCS_OUTPUTDIR)/specs/jdwp, \ OUTPUT_DIR := $(DOCS_OUTPUTDIR)/specs/jdwp, \
REPLACEMENTS := \
</body> => $(SPECS_BOTTOM_1)</body>, \
)) ))
JDK_SPECS_TARGETS += $(COPY_JDWP_PROTOCOL) JDK_SPECS_TARGETS += $(PROCESS_JDWP_PROTOCOL)
# Get jvmti.html from the main jvm variant (all variants' jvmti.html are identical). # Get jvmti.html from the main jvm variant (all variants' jvmti.html are identical).
JVMTI_HTML ?= $(HOTSPOT_OUTPUTDIR)/variant-$(JVM_VARIANT_MAIN)/gensrc/jvmtifiles/jvmti.html JVMTI_HTML ?= $(HOTSPOT_OUTPUTDIR)/variant-$(JVM_VARIANT_MAIN)/gensrc/jvmtifiles/jvmti.html
$(eval $(call SetupCopyFiles, COPY_JVMTI_HTML, \ $(eval $(call SetupTextFileProcessing, PROCESS_JVMTI_HTML, \
FILES := $(JVMTI_HTML), \ SOURCE_FILES := $(JVMTI_HTML), \
DEST := $(DOCS_OUTPUTDIR)/specs, \ OUTPUT_DIR := $(DOCS_OUTPUTDIR)/specs/, \
REPLACEMENTS := \
</body> => $(SPECS_BOTTOM_0)</body>, \
)) ))
JDK_SPECS_TARGETS += $(COPY_JVMTI_HTML) JDK_SPECS_TARGETS += $(PROCESS_JVMTI_HTML)
################################################################################ ################################################################################
# Optional target which bundles all generated javadocs into a zip archive. # Optional target which bundles all generated javadocs into a zip archive.
@ -609,6 +663,10 @@ $(eval $(call SetupZipArchive, BUILD_JAVADOC_ZIP, \
ZIP_TARGETS += $(BUILD_JAVADOC_ZIP) ZIP_TARGETS += $(BUILD_JAVADOC_ZIP)
################################################################################
# Hook to include the corresponding custom file, if present.
$(eval $(call IncludeCustomExtension, Docs-post.gmk))
################################################################################ ################################################################################
docs-jdk-api-javadoc: $(JDK_API_JAVADOC_TARGETS) $(JDK_API_CUSTOM_TARGETS) docs-jdk-api-javadoc: $(JDK_API_JAVADOC_TARGETS) $(JDK_API_CUSTOM_TARGETS)

View File

@ -58,7 +58,7 @@ endef
# OUTPUT_DIR the directory where we store the processed files. # OUTPUT_DIR the directory where we store the processed files.
# OUTPUT_FILE the name of the resulting file. Only allowed if processing a # OUTPUT_FILE the name of the resulting file. Only allowed if processing a
# single file. # single file.
# SOURCE_BASE_DIR a common root to all SOURCE_DIRS. # SOURCE_BASE_DIR a common root to all SOURCE_DIRS or SOURCE_FILES.
# If specified, files will keep the path relative to the base in the # If specified, files will keep the path relative to the base in the
# OUTPUT_DIR. Otherwise, the hierarchy will be flattened into the OUTPUT_DIR. # OUTPUT_DIR. Otherwise, the hierarchy will be flattened into the OUTPUT_DIR.
# INCLUDE_FILES only include files matching these patterns (used only with # INCLUDE_FILES only include files matching these patterns (used only with
@ -84,9 +84,6 @@ define SetupTextFileProcessingBody
ifneq ($$($1_SOURCE_DIRS),) ifneq ($$($1_SOURCE_DIRS),)
$$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1)) $$(error Cannot use both SOURCE_FILES and SOURCE_DIRS (in $1))
endif endif
ifneq ($$($1_SOURCE_BASE_DIR),)
$$(error Cannot use SOURCE_BASE_DIR without SOURCE_DIRS (in $1))
endif
ifneq ($$($1_EXCLUDE_FILES)$$($1_INCLUDE_FILES),) ifneq ($$($1_EXCLUDE_FILES)$$($1_INCLUDE_FILES),)
$$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1)) $$(error Cannot INCLUDE/EXCLUDE_FILES with SOURCE_FILES (in $1))
endif endif
@ -155,9 +152,10 @@ define SetupTextFileProcessingBody
# Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command # Convert the REPLACEMENTS syntax ( A => B ; C => D ; ...) to a sed command
# line (-e "s/A/B/g" -e "s/C/D/g" ...), basically by replacing '=>' with '/' # line (-e "s/A/B/g" -e "s/C/D/g" ...), basically by replacing '=>' with '/'
# and ';' with '/g" -e "s/', and adjusting for edge cases. # and ';' with '/g" -e "s/', and adjusting for edge cases.
# '&' has special meaning in sed so needs to be escaped.
$1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)g' \ $1_REPLACEMENTS_COMMAND_LINE := $(SED) -e 's$$($1_SEP)$$(subst $$(SPACE);$$(SPACE),$$($1_SEP)g' \
-e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)g' \ -e 's$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE),$$($1_SEP),$$(subst $$(SPACE)=>$$(SPACE);$$(SPACE),$$($1_SEP)$$($1_SEP)g' \
-e 's$$($1_SEP),$$(strip $$($1_REPLACEMENTS)))))$$($1_SEP)g' -e 's$$($1_SEP),$$(subst &,\&,$$(strip $$($1_REPLACEMENTS))))))$$($1_SEP)g'
else else
# We don't have any replacements, just pipe the file through cat. # We don't have any replacements, just pipe the file through cat.
$1_REPLACEMENTS_COMMAND_LINE := $(CAT) $1_REPLACEMENTS_COMMAND_LINE := $(CAT)

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="jvmti.xsl"?> <?xml-stylesheet type="text/xsl" href="jvmti.xsl"?>
<!-- <!--
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -24,7 +24,7 @@
--> -->
<!DOCTYPE specification [ <!DOCTYPE specification [
<!ELEMENT specification (title, copyright, intro*, functionsection, errorsection, <!ELEMENT specification (title, intro*, functionsection, errorsection,
eventsection, datasection, issuessection, changehistory)> eventsection, datasection, issuessection, changehistory)>
<!ATTLIST specification label CDATA #REQUIRED <!ATTLIST specification label CDATA #REQUIRED
majorversion CDATA #REQUIRED majorversion CDATA #REQUIRED
@ -34,8 +34,6 @@
<!ELEMENT title (#PCDATA|jvmti|tm)*> <!ELEMENT title (#PCDATA|jvmti|tm)*>
<!ATTLIST title subtitle CDATA #REQUIRED> <!ATTLIST title subtitle CDATA #REQUIRED>
<!ELEMENT copyright ANY>
<!ELEMENT intro ANY> <!ELEMENT intro ANY>
<!ATTLIST intro id CDATA #IMPLIED <!ATTLIST intro id CDATA #IMPLIED
label CDATA ""> label CDATA "">
@ -367,10 +365,6 @@
<tm>JVM</tm> Tool Interface <tm>JVM</tm> Tool Interface
</title> </title>
<copyright>
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved.
</copyright>
<intro id="whatIs" label="What is the JVM Tool Interface?"> <intro id="whatIs" label="What is the JVM Tool Interface?">
The <tm>JVM</tm> Tool Interface (<jvmti/>) The <tm>JVM</tm> Tool Interface (<jvmti/>)
is a programming interface used by development and monitoring tools. is a programming interface used by development and monitoring tools.

View File

@ -1,6 +1,6 @@
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
Copyright (c) 2002, 2018, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it This code is free software; you can redistribute it and/or modify it
@ -20,14 +20,14 @@
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any or visit www.oracle.com if you need additional information or have any
questions. questions.
--> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="jvmtiLib.xsl"/> <xsl:import href="jvmtiLib.xsl"/>
<xsl:output method="html" indent="yes" <xsl:output method="html" indent="yes"
doctype-system="about:legacy-compat"/> doctype-system="about:legacy-compat"/>
<xsl:param name="development"></xsl:param> <xsl:param name="development"></xsl:param>
@ -119,7 +119,7 @@
<li> <li>
<a href="#DataSection"><b>Data Types</b></a> <a href="#DataSection"><b>Data Types</b></a>
<ul> <ul>
<xsl:for-each select="//basetypes"> <xsl:for-each select="//basetypes">
<li> <li>
<a> <a>
<xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
@ -204,7 +204,6 @@
<p id="ChangeHistory"/> <p id="ChangeHistory"/>
<xsl:apply-templates select="changehistory"/> <xsl:apply-templates select="changehistory"/>
</div> </div>
<xsl:apply-templates select="copyright"/>
</body> </body>
</html> </html>
</xsl:template> </xsl:template>
@ -220,12 +219,6 @@
</h3> </h3>
</xsl:template> </xsl:template>
<xsl:template match="copyright">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="functionsection"> <xsl:template match="functionsection">
<div class="sep"/> <div class="sep"/>
<hr class="thick"/> <hr class="thick"/>
@ -286,7 +279,7 @@
<xsl:apply-templates select="$calltypes" mode="index"/> <xsl:apply-templates select="$calltypes" mode="index"/>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:variable name="cattypes" <xsl:variable name="cattypes"
select="(descendant::typedef|descendant::uniontypedef|descendant::capabilitiestypedef|descendant::constants[@kind='enum'])"/> select="(descendant::typedef|descendant::uniontypedef|descendant::capabilitiestypedef|descendant::constants[@kind='enum'])"/>
<xsl:if test="count($cattypes)!=0"> <xsl:if test="count($cattypes)!=0">
<xsl:value-of select="@label"/> types: <xsl:value-of select="@label"/> types:
@ -304,9 +297,9 @@
<xsl:value-of select="@label"/> <xsl:value-of select="@label"/>
</li> </li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:variable name="catconst" <xsl:variable name="catconst"
select="(descendant::constants[@kind!='enum'])"/> select="(descendant::constants[@kind!='enum'])"/>
<xsl:if test="count($catconst)!=0"> <xsl:if test="count($catconst)!=0">
<xsl:value-of select="@label"/> flags and constants: <xsl:value-of select="@label"/> flags and constants:
@ -322,7 +315,7 @@
</a> </a>
</li> </li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:apply-templates select="intro|typedef|uniontypedef|capabilitiestypedef"/> <xsl:apply-templates select="intro|typedef|uniontypedef|capabilitiestypedef"/>
<div class="sep"/> <div class="sep"/>
@ -334,7 +327,7 @@
<xsl:attribute name="id"> <xsl:attribute name="id">
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</xsl:attribute> </xsl:attribute>
</hr> </hr>
<xsl:apply-templates select="synopsis" mode="body"/> <xsl:apply-templates select="synopsis" mode="body"/>
<blockquote> <blockquote>
@ -505,7 +498,7 @@
<xsl:when test="contains(@callbacksafe,'safe')"> <xsl:when test="contains(@callbacksafe,'safe')">
This function may be called from the callbacks to the This function may be called from the callbacks to the
<a href="#Heap">Heap</a> iteration functions, or from the <a href="#Heap">Heap</a> iteration functions, or from the
event handlers for the event handlers for the
<a href="#GarbageCollectionStart"><code>GarbageCollectionStart</code></a>, <a href="#GarbageCollectionStart"><code>GarbageCollectionStart</code></a>,
<a href="#GarbageCollectionFinish"><code>GarbageCollectionFinish</code></a>, <a href="#GarbageCollectionFinish"><code>GarbageCollectionFinish</code></a>,
and <a href="#ObjectFree"><code>ObjectFree</code></a> events. and <a href="#ObjectFree"><code>ObjectFree</code></a> events.
@ -536,7 +529,7 @@
<xsl:for-each select="parameters"> <xsl:for-each select="parameters">
<xsl:apply-templates select="param[position()=1]" mode="signature"/> <xsl:apply-templates select="param[position()=1]" mode="signature"/>
<xsl:for-each select="param[position()>1]"> <xsl:for-each select="param[position()>1]">
<xsl:text>, <xsl:text>,
</xsl:text> </xsl:text>
<xsl:apply-templates select="." mode="signature"/> <xsl:apply-templates select="." mode="signature"/>
</xsl:for-each> </xsl:for-each>
@ -932,7 +925,7 @@ typedef struct {
</a> </a>
<xsl:apply-templates select="description" mode="brief"/> <xsl:apply-templates select="description" mode="brief"/>
</td> </td>
</tr> </tr>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<tr> <tr>
@ -949,12 +942,12 @@ typedef struct {
</a> </a>
<xsl:apply-templates select="description" mode="brief"/> <xsl:apply-templates select="description" mode="brief"/>
</td> </td>
</tr> </tr>
<tr> <tr>
<td> <td>
<pre> <pre>
<xsl:apply-templates select="definition"/> <xsl:apply-templates select="definition"/>
</pre> </pre>
</td> </td>
</tr> </tr>
</xsl:otherwise> </xsl:otherwise>
@ -977,7 +970,7 @@ typedef struct {
<xsl:when test=".=''"> <xsl:when test=".=''">
<code> <code>
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</code> </code>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates/> <xsl:apply-templates/>
@ -994,7 +987,7 @@ typedef struct {
<xsl:when test=".=''"> <xsl:when test=".=''">
<code> <code>
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</code> </code>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates/> <xsl:apply-templates/>
@ -1010,7 +1003,7 @@ typedef struct {
<xsl:when test=".=''"> <xsl:when test=".=''">
<code> <code>
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</code> </code>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates/> <xsl:apply-templates/>
@ -1038,7 +1031,7 @@ typedef struct {
<xsl:template match="eventphaselist"> <xsl:template match="eventphaselist">
<xsl:variable name="phase" select="@phase"/> <xsl:variable name="phase" select="@phase"/>
<ul> <ul>
<xsl:for-each select="//eventsection/event[@phase=$phase]"> <xsl:for-each select="//eventsection/event[@phase=$phase]">
<li> <li>
<a> <a>
<xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="href">#<xsl:value-of select="@id"/></xsl:attribute>
@ -1064,7 +1057,7 @@ typedef struct {
<cite> <cite>
<xsl:text>The Java&#8482; Virtual Machine Specification</xsl:text> <xsl:text>The Java&#8482; Virtual Machine Specification</xsl:text>
<xsl:if test="count(@chapter)=1"> <xsl:if test="count(@chapter)=1">
<xsl:text>, Chapter </xsl:text> <xsl:text>, Chapter </xsl:text>
<xsl:value-of select="@chapter"/> <xsl:value-of select="@chapter"/>
</xsl:if> </xsl:if>
</cite> </cite>
@ -1155,18 +1148,18 @@ typedef struct {
<tr> <tr>
<td colspan="2"> <td colspan="2">
<b>Optional Functionality:</b> might not be implemented for all <b>Optional Functionality:</b> might not be implemented for all
virtual machines. virtual machines.
<xsl:choose> <xsl:choose>
<xsl:when test="count(required)=1"> <xsl:when test="count(required)=1">
The following capability The following capability
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
One of the following capabilities One of the following capabilities
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
(as returned by (as returned by
<a href="#GetCapabilities"><code>GetCapabilities</code></a>) <a href="#GetCapabilities"><code>GetCapabilities</code></a>)
must be true to use this must be true to use this
<xsl:choose> <xsl:choose>
<xsl:when test="ancestor::function"> <xsl:when test="ancestor::function">
function. function.
@ -1322,8 +1315,8 @@ typedef struct {
<xsl:when test="contains($haserrors,'yes')"> <xsl:when test="contains($haserrors,'yes')">
<tr> <tr>
<td colspan="2"> <td colspan="2">
This function returns either a This function returns either a
<a href="#universal-error">universal error</a> <a href="#universal-error">universal error</a>
or one of the following errors or one of the following errors
</td> </td>
</tr> </tr>
@ -1342,7 +1335,7 @@ typedef struct {
<xsl:otherwise> <xsl:otherwise>
<tr> <tr>
<td colspan="{$fullRowColspan}"> <td colspan="{$fullRowColspan}">
This function returns a This function returns a
<a href="#universal-error">universal error</a> <a href="#universal-error">universal error</a>
</td> </td>
</tr> </tr>
@ -1370,7 +1363,7 @@ typedef struct {
<xsl:attribute name="href">#jvmtiCapabilities.<xsl:value-of select="@id"/></xsl:attribute> <xsl:attribute name="href">#jvmtiCapabilities.<xsl:value-of select="@id"/></xsl:attribute>
<code> <code>
<xsl:value-of select="@id"/> <xsl:value-of select="@id"/>
</code> </code>
</a>. </a>.
Use <a href="#AddCapabilities"><code>AddCapabilities</code></a>. Use <a href="#AddCapabilities"><code>AddCapabilities</code></a>.
</td> </td>
@ -1412,7 +1405,7 @@ typedef struct {
</tr> </tr>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="param" mode="errors2"> <xsl:template match="param" mode="errors2">
<xsl:variable name="haserrors2"> <xsl:variable name="haserrors2">
<xsl:apply-templates mode="haserrors2"/> <xsl:apply-templates mode="haserrors2"/>
@ -1439,7 +1432,7 @@ typedef struct {
</tr> </tr>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="description" mode="haserrors"> <xsl:template match="description" mode="haserrors">
</xsl:template> </xsl:template>
@ -1684,7 +1677,7 @@ typedef struct {
</xsl:attribute> </xsl:attribute>
<code> <code>
<xsl:value-of select="ancestor::param/@id"/> <xsl:value-of select="ancestor::param/@id"/>
</code> </code>
</a> </a>
</xsl:template> </xsl:template>
@ -1858,7 +1851,7 @@ typedef struct {
</td> </td>
<td> <td>
<pre> <pre>
<xsl:text>void *reserved</xsl:text> <xsl:text>void *reserved</xsl:text>
<xsl:value-of select="$index"/> <xsl:value-of select="$index"/>
<xsl:text>;</xsl:text> <xsl:text>;</xsl:text>
</pre> </pre>