VirtualBox

Changeset 68860 in vbox for trunk/doc


Ignore:
Timestamp:
Sep 25, 2017 8:04:07 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
118114
Message:

iprt,vboxmanage,manual: Try write the iso maker docs as a docbook refentry document. Tried to generalize the vboxmanage refentry output handling, moving it to RTMsg*. Made VBoxManage and IPRT generate their C/H sources in their own Makefiles. Hacked the C/H source generation till it can deal with the rather different RTIsoMaker command structure (no sub or sub-sub command stuff).

Location:
trunk/doc/manual
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/Makefile.kmk

    r68829 r68860  
    4949include $(KBUILD_PATH)/subheader.kmk
    5050
     51ifndef VBOX_DOC_MANUAL_CONFIG_KMK_INCLUDED
     52 include $(PATH_SUB_CURRENT)/Config.kmk
     53endif
     54
    5155
    5256#
     
    8387endif
    8488
    85 # Source and output locations.
    86 VBOX_PATH_MANUAL_SRC     := $(PATH_SUB_CURRENT)
    87 VBOX_PATH_MANUAL_OUTBASE := $(PATH_TARGET)/manual
    88 
    89 # tool locations
    90 ifndef VBOX_OSE
    91  # use docbook from our tools directory
    92  VBOX_PATH_DOCBOOK        ?= $(PATH_DEVTOOLS)/common/DocBook/v1.69.1
    93  VBOX_PATH_DOCBOOK_DTD    ?= $(PATH_DEVTOOLS)/common/docbook-xml/v4.3
    94  VBOX_XML_CATALOG         ?= $(VBOX_PATH_MANUAL_OUTBASE)/catalog
    95  VBOX_XML_CATALOG_DOCBOOK ?= $(VBOX_PATH_MANUAL_OUTBASE)/docbook
    96 else
    97  # use docbook of the build host
    98  VBOX_PATH_DOCBOOK        ?= http://docbook.sourceforge.net/release/xsl/current/
    99 endif
    100 
    101 # xsltproc with the catalog trick if applicable.
    102 ifdef VBOX_XML_CATALOG
    103  VBOX_XSLTPROC_WITH_CAT    = $(REDIRECT) -E "XML_CATALOG_FILES=$(VBOX_XML_CATALOG)" $1 -- \
    104         $(VBOX_XSLTPROC) --nonet --xinclude $(VBOX_XSLTPROC_OPTS)
    105  VBOX_XMLLINT_WITH_CAT     = $(REDIRECT) -E "XML_CATALOG_FILES=$(VBOX_XML_CATALOG)" -- \
    106         $(VBOX_XMLLINT) --nonet --xinclude --noout $(VBOX_XMLLINT_OPTS)
    107 else
    108  VBOX_XSLTPROC_WITH_CAT    = $(if $(1), $(REDIRECT) $1 --,) $(VBOX_XSLTPROC) --nonet --xinclude $(VBOX_XSLTPROC_OPTS)
    109  VBOX_XMLLINT_WITH_CAT     = $(VBOX_XMLLINT) --nonet --xinclude --noout $(VBOX_XMLLINT_OPTS)
    110 endif
     89
    11190
    11291VBOXMANAGEHELP_PATH       ?= $(PATH_STAGE_BIN)/VBoxManageHelp$(SUFF_EXE)
     
    145124VBOX_DOC_XIDL_SRC_TMP  = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/VirtualBox.xidl.tmp
    146125
    147 ##
    148 # Non-pattern-rule approach to editing XSLT files.
    149 # $(evalcall2 def_vbox_replace_paths_in_xslt)
    150 # @param    1   The XSLT source file (relative to Makefile dir).
    151 # @param    2   Optional output subdirectory (leading slash).
    152 define def_vbox_replace_paths_in_xslt
    153 OTHER_CLEAN += $$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1)
    154 $$(VBOX_PATH_MANUAL_OUTBASE)$2/$(notdir $1): $$(VBOX_PATH_MANUAL_SRC)/$1 | $$$$(dir $$$$@)
    155         $$(call MSG_L1,Pre-processing $$(<) to $$(@))
    156         $$(QUIET)$$(SED) \
    157                 -e 's|@VBOX_PATH_DOCBOOK@|$$(VBOX_PATH_DOCBOOK)|g' \
    158                 -e 's|@VBOX_PATH_MANUAL_SRC@|$$(VBOX_PATH_MANUAL_SRC)|g' \
    159                 -e 's|@VBOX_PATH_MANUAL_OUTBASE@|$$(VBOX_PATH_MANUAL_OUTBASE)|g' \
    160                 -e 's|@VBOX_PATH_MANUAL_OUT_LANG@|$$(VBOX_PATH_MANUAL_OUTBASE)$2|g' \
    161                 --output "$$(@)" $$<
    162 endef
    163126
    164127##
     
    189152endef
    190153
    191 ## List of refentry files (manpages).
    192 VBOX_MANUAL_XML_REFENTRY_FILES = \
    193         man_VBoxManage-debugvm.xml \
    194         man_VBoxManage-extpack.xml \
    195         man_VBoxManage-unattended.xml
    196154
    197155
     
    200158#
    201159
    202 BLDDIRS += $(VBOX_PATH_MANUAL_OUTBASE) $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, $(VBOX_MANUAL_LANGUAGES))
     160BLDDIRS += $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/, $(VBOX_MANUAL_LANGUAGES))
    203161
    204162
     
    314272               $(addprefix user_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
    315273               $(patsubst man_%,%.1,$(basename $(VBOX_MANUAL_XML_REFENTRY_FILES))) \
     274               isomakercmd-man.xml \
     275               user_isomakercmd-man.xml \
    316276                $(VBOX_MANUAL_LATEX_FILES_TARGET) \
    317277                $(VBOX_MANUAL_PNG_FILES_$(lang)) \
     
    342302        $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/overview_,$(VBOX_MANUAL_XML_REFENTRY_FILES)) \
    343303        $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml \
    344         $(VBOX_PATH_MANUAL_OUTBASE)/user_AdvancedTopics_VISO_Options.xml \
    345304        $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/UserManual_$(f).pdf) \
    346305        $(foreach f,$(VBOX_MANUAL_ADD_LANGUAGES),$(PATH_STAGE_BIN)/VirtualBox_$(f).chm) \
     
    419378
    420379
    421 #
    422 # To avoid network I/O for fetching DTDs, we generate catalogs mapping the public
    423 # entity IDs to local files.  (Obviously, only done when we have local files.)
    424 #
    425 ifdef VBOX_XML_CATALOG
    426 # Create a catalog file for xsltproc that points to docbook catalog.
    427 $(VBOX_XML_CATALOG): $(MAKEFILE_CURRENT) | $$(dir $$@)
    428         $(call MSG_L1,Creating catalog $@)
    429         $(QUIET)$(RM) -f [email protected] $@
    430         $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
    431         $(QUIET)$(APPEND) [email protected] '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">'
    432         $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
    433         $(QUIET)$(APPEND) [email protected] '  <delegatePublic publicIdStartString="-//OASIS/ENTITIES DocBook XML"      catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
    434         $(QUIET)$(APPEND) [email protected] '  <delegatePublic publicIdStartString="-//OASIS/DTD DocBook XML"           catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
    435         $(QUIET)$(APPEND) [email protected] '  <delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
    436         $(QUIET)$(APPEND) [email protected] '  <delegateURI uriStartString="http://www.oasis-open.org/docbook/"         catalog="file:///$(VBOX_XML_CATALOG_DOCBOOK)"/>'
    437         $(QUIET)$(APPEND) [email protected] '</catalog>'
    438         $(QUIET)$(MV) -f [email protected] $@
    439 
    440 # Create a docbook catalog file for xsltproc that points to the local docbook files.
    441 $(VBOX_XML_CATALOG_DOCBOOK): $(MAKEFILE_CURRENT) | $$(dir $$@)
    442         $(call MSG_L1,Creating catalog $@)
    443         $(QUIET)$(RM) -f [email protected] $@
    444         $(QUIET)$(APPEND) [email protected] '<?xml version="1.0"?>'
    445         $(QUIET)$(APPEND) [email protected] '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">'
    446         $(QUIET)$(APPEND) [email protected] '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">'
    447         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//ELEMENTS DocBook XML Information Pool V4.3//EN"          uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbpoolx.mod"/>'
    448         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//DTD DocBook XML V4.3//EN"                                uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>'
    449         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//DTD DocBook XML V4.4//EN"                                uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/docbookx.dtd"/>'
    450         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//ENTITIES DocBook XML Character Entities V4.3//EN"        uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbcentx.mod"/>'
    451         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//ENTITIES DocBook XML Notations V4.3//EN"                 uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbnotnx.mod"/>'
    452         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//ENTITIES DocBook XML Additional General Entities V4.3//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbgenent.mod"/>'
    453         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//ELEMENTS DocBook XML Document Hierarchy V4.3//EN"        uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/dbhierx.mod"/>'
    454         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//DTD XML Exchange Table Model 19990315//EN"               uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/soextblx.dtd"/>'
    455         $(QUIET)$(APPEND) [email protected] '  <public publicId="-//OASIS//DTD DocBook XML CALS Table Model V4.3//EN"               uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/calstblx.dtd"/>'
    456         $(QUIET)$(APPEND) [email protected] '  <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
    457         $(QUIET)$(APPEND) [email protected] '  <rewriteURI         uriStartString="http://www.oasis-open.org/docbook/xml/4.3" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
    458         $(QUIET)$(APPEND) [email protected] '  <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
    459         $(QUIET)$(APPEND) [email protected] '  <rewriteURI         uriStartString="http://www.oasis-open.org/docbook/xml/4.4" rewritePrefix="file:///$(VBOX_PATH_DOCBOOK_DTD)"/>'
    460         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN"   uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsa.ent"/>'
    461         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN"  uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsb.ent"/>'
    462         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN"        uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsc.ent"/>'
    463         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN" uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsn.ent"/>'
    464         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN"          uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amso.ent"/>'
    465         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN"         uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-amsr.ent"/>'
    466         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Box and Line Drawing//EN"                  uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-box.ent"/>'
    467         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Russian Cyrillic//EN"                      uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr1.ent"/>'
    468         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN"                  uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-cyr2.ent"/>'
    469         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Diacritical Marks//EN"                     uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-dia.ent"/>'
    470         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Greek Letters//EN"                         uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk1.ent"/>'
    471         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Monotoniko Greek//EN"                      uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk2.ent"/>'
    472         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Greek Symbols//EN"                         uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk3.ent"/>'
    473         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN"             uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-grk4.ent"/>'
    474         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Latin 1//EN"                         uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat1.ent"/>'
    475         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Added Latin 2//EN"                         uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-lat2.ent"/>'
    476         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN"           uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-num.ent"/>'
    477         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES Publishing//EN"                            uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-pub.ent"/>'
    478         $(QUIET)$(APPEND) [email protected] '  <public publicId="ISO 8879:1986//ENTITIES General Technical//EN"                     uri="file:///$(VBOX_PATH_DOCBOOK_DTD)/ent/iso-tech.ent"/>'
    479         $(QUIET)$(APPEND) [email protected] '</catalog>'
    480         $(QUIET)$(MV) -f [email protected] $@
    481 endif
    482 
    483380
    484381if defined(VBOX_WITH_DOCS) && (!defined(VBOX_ONLY_BUILD) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_SDK))
     
    520417        $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
    521418        $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/overview_,$$(filter man_VBoxManage%,$$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
    522         $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml \
    523         $(VBOX_PATH_MANUAL_OUTBASE)/user_AdvancedTopics_VISO_Options.xml ))
     419        $(VBOX_PATH_MANUAL_OUTBASE)/user_VBoxManage_CommandsOverview.xml ))
     420
     421# Manual dependency for user_AdvancedTopics.xml.
     422$(foreach lang,$(VBOX_MANUAL_LANGUAGES) \
     423,$(eval $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_AdvancedTopics.xml: $(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/user_isomakercmd-man.xml))
    524424
    525425# Intermediate step to do some variable replacement in the document.
     
    530430# Morph man pages into manual sections.
    531431# $(evalcall2 def_vbox_refentry_to_user_sect1)
    532 # @param    1   The XSLT source file (relative to Makefile dir).
    533 # @param    2   Optional output subdirectory.
     432# @param    1  Language.
     433# @param    2  the refentry xml base file name.
     434# @param    3  the full refentry xml file path.
    534435define def_vbox_refentry_to_user_sect1
    535 $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): \
    536                 $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2) \
     436$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): $(3) \
    537437                $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \
    538438                $$(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) \
     
    543443endef
    544444$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(foreach file,$(VBOX_MANUAL_XML_REFENTRY_FILES) \
    545 , $(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),$(file))))
     445, $(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),$(file),$(VBOX_PATH_MANUAL_SRC)/$(lang)/$(file))))
     446$(foreach lang,$(VBOX_MANUAL_LANGUAGES) \
     447,$(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),isomakercmd-man.xml,$(PATH_ROOT)/src/VBox/Runtime/common/fs/isomakercmd-man.xml))
    546448
    547449
     
    584486               '</sect1>'
    585487
    586 # Generate the VISO option listing.
    587 $(VBOX_PATH_MANUAL_OUTBASE)/user_AdvancedTopics_VISO_Options.xml: $(VBOX_RTISOMAKER) $(MAKEFILE_CURRENT) | $$(dir $$@)
    588         $(call MSG_GENERATE,,$@,)
    589         $(QUIET)$(RM) -f $@ [email protected]
    590         $(QUIET)$(APPEND) -tn "$@" \
    591                 '<?xml version="1.0" encoding="UTF-8"?>' \
    592                '<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">' \
    593                '<sect1> <!-- this will be skipped via xpointer in the include. --> '
    594         $(QUIET)$(REDIRECT) -wo [email protected] -E 'VBOX_LOG_FLAGS=disabled' -E 'VBOX_LOG_DEST=nofile' \
    595                 -- $(VBOX_RTISOMAKER) --help
    596         $(QUIET)$(SED) \
    597                 -e ':a' \
    598                 -e 'N' \
    599                 -e '$(DOLLAR)!ba' \
    600                 -e 's/bldRTIsoMaker/RTIsoMaker/' \
    601                 -e 's/&/\&amp\;/g' \
    602                 -e 's/</\&lt\;/g' \
    603                 -e 's/>/\&gt\;/g' \
    604                 -e 's/\n*$(DOLLAR)/<\/screen>/' \
    605                 -e 's/^/<screen>/' \
    606                 --append $@ [email protected]
    607         $(QUIET)$(RM) -f [email protected]
    608         $(QUIET)$(APPEND) -n "$@" \
    609                '</sect1>'
    610 
    611488
    612489
     
    644521##########################################################################################
    645522
    646 $(foreach f,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$f/UserManual.pdf): \
     523$(foreach lang,$(VBOX_MANUAL_LANGUAGES),$(VBOX_PATH_MANUAL_OUTBASE)/$(lang)/UserManual.pdf): \
    647524                $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.pdf : \
    648525                $(VBOX_PATH_MANUAL_OUTBASE)/%/UserManual.tex \
     
    1029906
    1030907
    1031 #
    1032 # VBoxManage built-in help.
    1033 #
    1034 # Note! Generating the stuff here is a bit annoying, but currently the most
    1035 #       practical way I can come up with.
    1036 #
    1037 OTHERS += \
    1038         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp \
    1039         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h
    1040 OTHER_CLEAN += \
    1041         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp \
    1042         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp.ts \
    1043         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h \
    1044         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h.ts
    1045 help-experiment:: \
    1046         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp \
    1047         $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h
    1048 
    1049 $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-C-help.xsl,)
    1050 $(evalcall2 def_vbox_replace_paths_in_xslt,docbook-refentry-to-H-help.xsl,)
    1051 
    1052 $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-C-help.xsl: $(VBOX_PATH_MANUAL_SRC)/common-formatcfg.xsl # manual dependency.
    1053 
    1054 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp.ts \
    1055 +| $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.cpp: \
    1056                 $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-C-help.xsl \
    1057                 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
    1058                 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
    1059         $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
    1060         $(QUIET)$(APPEND) -tn "$@" \
    1061                 '/* Autogenerated by $<, do not edit! */' \
    1062                 '' \
    1063                 '#include <iprt/types.h>' \
    1064                 '#include "VBoxManageBuiltInHelp.h"' \
    1065                 ''
    1066         $(foreach refentry,$(filter %.xml,$^) \
    1067         ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") $< $(refentry))
    1068         $(QUIET)$(APPEND) -n "$@" \
    1069         '' \
    1070                 'PCREFENTRY     g_apHelpEntries[] = ' \
    1071                 '{'
    1072         $(foreach refentry,$(filter %.xml,$^) \
    1073                 ,$(NLTAB)$(QUIET)$(APPEND) -n "$@" \
    1074                 '    &g_$(subst -,_,$(tolower $(patsubst man_%,%,$(notdir $(basename $(refentry)))))), ')
    1075         $(QUIET)$(APPEND) -n "$@" \
    1076                 '};' \
    1077                 'const uint32_t g_cHelpEntries = RT_ELEMENTS(g_apHelpEntries);' \
    1078                ''
    1079         $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
    1080 # The above APPEND stuff trigger some kind of problem on some boxes when not split up...
    1081 # update: Fixed in SVN (strcpy -> memmove in new_job(), job.c - r2591). Just need to rebuild all platforms.
    1082 
    1083 $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h.ts \
    1084 +| $(VBOX_PATH_MANUAL_OUTBASE)/VBoxManageBuiltInHelp.h: \
    1085                 $(VBOX_PATH_MANUAL_OUTBASE)/docbook-refentry-to-H-help.xsl \
    1086                 $(addprefix $(VBOX_PATH_MANUAL_OUTBASE)/en_US/,$(filter man_VBoxManage-%,$(VBOX_MANUAL_XML_REFENTRY_FILES))) \
    1087                 $(VBOX_XML_CATALOG) $(VBOX_XML_CATALOG_DOCBOOK) $(MAKEFILE) | $$(dir $$@)
    1088         $(call MSG_TOOL,xsltproc $(notdir $(firstword $(filter %.xsl,$^))),,$(filter %.xml,$^),$(patsubst %.ts,%,$@))
    1089         $(QUIET)$(APPEND) -tn "$@" \
    1090                 '/* Autogenerated by $<, do not edit! */' \
    1091                '' \
    1092                '#ifndef ___VBoxManageBuiltInHelp_h___' \
    1093                '#define ___VBoxManageBuiltInHelp_h___' \
    1094                '' \
    1095                '#include <VBox/refentry.h>' \
    1096                '' \
    1097                'RT_C_DECLS_BEGIN' \
    1098                '' \
    1099                'typedef enum HELP_CMD_VBOXMANAGE' \
    1100                '{' \
    1101                '    HELP_CMD_VBOXMANAGE_INVALID = 0,'
    1102         $(foreach refentry,$(filter %.xml,$^) \
    1103         ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
    1104                 --stringparam 'g_sMode' 'cmd' $< $(refentry))
    1105         $(QUIET)$(APPEND) -n "$@" \
    1106                 '    HELP_CMD_VBOXMANAGE_END' \
    1107                 '} HELP_CMD_VBOXMANAGE;'
    1108         $(foreach refentry,$(filter %.xml,$^) \
    1109         ,$(NLTAB)$(QUIET)$(call VBOX_XSLTPROC_WITH_CAT, -a+to "$@") \
    1110                 --stringparam 'g_sMode' 'subcmd' $< $(refentry))
    1111         $(QUIET)$(APPEND) -n "$@" \
    1112                 '' \
    1113                 'extern PCREFENTRY     g_apHelpEntries[];' \
    1114                 'extern const uint32_t g_cHelpEntries;' \
    1115                 '' \
    1116                'RT_C_DECLS_END' \
    1117                 '' \
    1118                 '#endif' \
    1119                ''
    1120         $(QUIET)$(CP) --changed -- "$@" "$(patsubst %.ts,%,$@)"
    1121 
    1122908
    1123909include $(FILE_KBUILD_SUB_FOOTER)
  • trunk/doc/manual/docbook-refentry-to-C-help.xsl

    r56586 r68860  
    7878    <xsl:text>
    7979
    80 static const REFENTRYSTR </xsl:text><xsl:value-of select="$sDataBaseSym"/><xsl:text>_synopsis[] =
     80static const RTMSGREFENTRYSTR </xsl:text><xsl:value-of select="$sDataBaseSym"/><xsl:text>_synopsis[] =
    8181{</xsl:text>
    8282    <xsl:for-each select="./refsynopsisdiv/cmdsynopsis">
     
    104104      -->
    105105    <xsl:text>
    106 static const REFENTRYSTR </xsl:text><xsl:value-of select="$sDataBaseSym"/><xsl:text>_full_help[] =
     106static const RTMSGREFENTRYSTR </xsl:text><xsl:value-of select="$sDataBaseSym"/><xsl:text>_full_help[] =
    107107{</xsl:text>
    108108    <!-- We start by combining the refentry title and the refpurpose into a short description. -->
     
    118118        </xsl:call-template>
    119119        <xsl:text>." },
    120     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     120    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    121121
    122122    <!-- The follows the usage (synopsis) section. -->
    123123    <xsl:text>
    124     {   REFENTRYSTR_SCOPE_GLOBAL,
     124    {   RTMSGREFENTRYSTR_SCOPE_GLOBAL,
    125125        "Usage" },
    126     {   REFENTRYSTR_SCOPE_SAME,
     126    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    127127        "=====" },
    128     {   REFENTRYSTR_SCOPE_SAME,
     128    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    129129        "" },</xsl:text>
    130130        <xsl:apply-templates select="./refsynopsisdiv/node()"/>
     
    140140        <xsl:text>
    141141    {   </xsl:text><xsl:call-template name="calc-scope-refsect1"/><xsl:text>, "" },
    142     {   REFENTRYSTR_SCOPE_SAME,
     142    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    143143        "</xsl:text><xsl:value-of select="$sTitle"/><xsl:text>" },
    144     {   REFENTRYSTR_SCOPE_SAME,
     144    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    145145        "</xsl:text>
    146146        <xsl:value-of select="substring($g_sUnderlineRefSect1, 1, string-length($sTitle))"/>
     
    158158      -->
    159159    <xsl:text>
    160 static const REFENTRY </xsl:text><xsl:value-of select="$sDataBaseSym"/><xsl:text> =
     160static const RTMSGREFENTRY </xsl:text><xsl:value-of select="$sDataBaseSym"/><xsl:text> =
    161161{
    162162    /* .idInternal = */   HELP_CMD_</xsl:text>
    163     <xsl:call-template name="str:to-upper">
    164       <xsl:with-param name="text" select="translate(substring-after(@id, '-'), '-', '_')"/>
    165     </xsl:call-template>
     163    <xsl:choose>
     164      <xsl:when test="contains(@id, '-')">
     165        <xsl:call-template name="str:to-upper">   <!-- Multi level command. -->
     166          <xsl:with-param name="text" select="translate(substring-after(@id, '-'), '-', '_')"/>
     167        </xsl:call-template>
     168      </xsl:when>
     169      <xsl:otherwise>
     170        <xsl:call-template name="str:to-upper">   <!-- Simple command. -->
     171          <xsl:with-param name="text" select="@id"/>
     172        </xsl:call-template>
     173      </xsl:otherwise>
     174    </xsl:choose>
    166175    <xsl:text>,
    167176    /* .Synopsis   = */   { RT_ELEMENTS(</xsl:text>
     
    186195    <xsl:if test="text()"><xsl:message terminate="yes">cmdsynopsis with text is not supported.</xsl:message></xsl:if>
    187196    <xsl:text>
    188     {   </xsl:text><xsl:call-template name="calc-scope-cmdsynopsis"/><xsl:text> | REFENTRYSTR_FLAGS_SYNOPSIS,
     197    {   </xsl:text><xsl:call-template name="calc-scope-cmdsynopsis"/><xsl:text> | RTMSGREFENTRYSTR_FLAGS_SYNOPSIS,
    189198        "</xsl:text><xsl:call-template name="emit-indentation"/><xsl:apply-templates select="*|@*"/><xsl:text>" },</xsl:text>
    190199  </xsl:template>
     
    192201  <xsl:template match="sbr">
    193202    <xsl:text>" },
    194     {   REFENTRYSTR_SCOPE_SAME | REFENTRYSTR_FLAGS_SYNOPSIS,
     203    {   RTMSGREFENTRYSTR_SCOPE_SAME | RTMSGREFENTRYSTR_FLAGS_SYNOPSIS,
    195204        "    </xsl:text><xsl:call-template name="emit-indentation"/> <!-- hardcoded in VBoxManageHelp.cpp too -->
    196205  </xsl:template>
     
    198207  <xsl:template match="cmdsynopsis/command">
    199208    <xsl:text>" },
    200     {   REFENTRYSTR_SCOPE_SAME | REFENTRYSTR_FLAGS_SYNOPSIS,
     209    {   RTMSGREFENTRYSTR_SCOPE_SAME | RTMSGREFENTRYSTR_FLAGS_SYNOPSIS,
    201210        "</xsl:text><xsl:call-template name="emit-indentation"/>
    202211    <xsl:apply-templates select="node()|@*"/>
     
    275284    <xsl:text>
    276285    {   </xsl:text><xsl:call-template name="calc-scope-refsect2"/><xsl:text>, "" },
    277     {   REFENTRYSTR_SCOPE_SAME,
     286    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    278287        "</xsl:text><xsl:call-template name="emit-indentation"/>
    279288    <xsl:value-of select="$sTitle"/>
    280289    <xsl:text>" },
    281     {   REFENTRYSTR_SCOPE_SAME,
     290    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    282291        "</xsl:text><xsl:call-template name="emit-indentation"/>
    283292    <xsl:value-of select="substring($g_sUnderlineRefSect2, 1, string-length($sTitle))"/>
    284293    <xsl:text>" },
    285     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     294    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    286295
    287296    <!-- Format the text in the section -->
     
    293302    <xsl:if test="position() != last()">
    294303      <xsl:text>
    295     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     304    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    296305    </xsl:if>
    297306  </xsl:template>
     
    304313    <xsl:if test="position() != 1 or not(parent::listitem)">
    305314      <xsl:text>
    306     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     315    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    307316    </xsl:if>
    308317    <xsl:call-template name="process-mixed"/>
     
    318327    </xsl:if>
    319328    <xsl:for-each select="./varlistentry">
    320       <xsl:if test="count(*) != 2 or not(term) or not(listitem)">
    321         <xsl:message terminate="yes">Expected exactly one term and one listentry member in varlistentry element.</xsl:message>
     329      <xsl:if test="not(term) or not(listitem) or count(listitem) > 1">
     330        <xsl:message terminate="yes">Expected one or more term members and exactly one listentry member in varlistentry element.</xsl:message>
    322331      </xsl:if>
    323332      <xsl:if test="not(@spacing) or @spacing != 'compact'">
    324333        <xsl:text>
    325     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     334    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    326335      </xsl:if>
    327336      <xsl:apply-templates select="*"/>
     
    361370    <xsl:if test="position() != 1 and (not(@spacing) or @spacing != 'compact')">
    362371      <xsl:text>
    363     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     372    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    364373    </xsl:if>
    365374    <xsl:for-each select="./listitem">
     
    380389    <xsl:if test="position() != 1 and @spaceing != 'compact'">
    381390      <xsl:text>
    382     {   REFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
     391    {   RTMSGREFENTRYSTR_SCOPE_SAME, "" },</xsl:text>
    383392    </xsl:if>
    384393    <xsl:apply-templates select="*"/>
     
    395404
    396405    <xsl:text>
    397     {   REFENTRYSTR_SCOPE_SAME,
     406    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    398407        "</xsl:text>
    399408
     
    426435    <xsl:if test="substring-after($sText,'&#x0a;')">
    427436      <xsl:text>" },
    428     {   REFENTRYSTR_SCOPE_SAME,
     437    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    429438        "</xsl:text>
    430439      <xsl:call-template name="screen_text_line">
     
    608617  <xsl:template name="process-mixed">
    609618    <xsl:text>
    610     {   REFENTRYSTR_SCOPE_SAME,
     619    {   RTMSGREFENTRYSTR_SCOPE_SAME,
    611620        "</xsl:text><xsl:call-template name="emit-indentation"/>
    612621
     
    631640
    632641  <xsl:template name="calc-scope-for-refentry">
    633     <xsl:call-template name="calc-scope-const-from-id"/>
     642    <xsl:text>HELP_SCOPE_</xsl:text>
     643    <xsl:choose>
     644      <xsl:when test="contains(@id, '-')">          <!-- Multi level command. -->
     645        <xsl:call-template name="str:to-upper">
     646          <xsl:with-param name="text" select="translate(substring-after(@id, '-'), '-', '_')"/>
     647        </xsl:call-template>
     648      </xsl:when>
     649      <xsl:otherwise>                               <!-- Single command. -->
     650        <xsl:call-template name="str:to-upper">
     651          <xsl:with-param name="text" select="@id"/>
     652        </xsl:call-template>
     653      </xsl:otherwise>
     654    </xsl:choose>
    634655  </xsl:template>
    635656
     
    638659    <xsl:choose>
    639660      <xsl:when test="title[text() = 'Description']">
    640         <xsl:text>REFENTRYSTR_SCOPE_GLOBAL</xsl:text>
     661        <xsl:text>RTMSGREFENTRYSTR_SCOPE_GLOBAL</xsl:text>
    641662      </xsl:when>
    642663      <xsl:when test="@id or remark[@role='help-scope']">
     
    644665      </xsl:when>
    645666      <xsl:otherwise>
    646         <xsl:text>REFENTRYSTR_SCOPE_GLOBAL</xsl:text>
     667        <xsl:text>RTMSGREFENTRYSTR_SCOPE_GLOBAL</xsl:text>
    647668      </xsl:otherwise>
    648669    </xsl:choose>
     
    656677      </xsl:when>
    657678      <xsl:otherwise>
    658         <xsl:text>REFENTRYSTR_SCOPE_SAME</xsl:text>
     679        <xsl:text>RTMSGREFENTRYSTR_SCOPE_SAME</xsl:text>
    659680      </xsl:otherwise>
    660681    </xsl:choose>
     
    670691      </xsl:when>
    671692      <xsl:otherwise>
    672         <xsl:text>REFENTRYSTR_SCOPE_SAME</xsl:text>
     693        <xsl:text>RTMSGREFENTRYSTR_SCOPE_SAME</xsl:text>
    673694      </xsl:otherwise>
    674695    </xsl:choose>
     
    704725  <xsl:template name="calc-scope-const-from-id">
    705726    <xsl:param name="sId" select="@id"/>
    706     <xsl:variable name="sPrefix" select="concat(substring-before(ancestor::refentry/@id, '-'), '-')"/>
    707     <xsl:if test="not(contains($sId, sPrefix))">
    708       <xsl:message terminate="yes">Expected sId (<xsl:value-of select="$sId"/>) to contain <xsl:value-of select="$sPrefix"/></xsl:message>
    709     </xsl:if>
     727    <xsl:param name="sAncestorId" select="ancestor::refentry/@id"/>
    710728    <xsl:text>HELP_SCOPE_</xsl:text>
    711     <xsl:call-template name="str:to-upper">
    712       <xsl:with-param name="text" select="translate(substring-after($sId, $sPrefix), '-', '_')"/>
    713     </xsl:call-template>
    714   </xsl:template>
    715 
    716   <!-- Turns a remark into one or more scope constant. -->
     729    <xsl:choose>
     730      <xsl:when test="not($sAncestorId)">           <!-- Sanity check. -->
     731        <xsl:message terminate="yes">error: calc-scope-const-from-id is invoked without an refentry ancestor with a id. <xsl:call-template name="get-node-path"/> </xsl:message>
     732      </xsl:when>
     733
     734      <xsl:when test="contains($sAncestorId, '-')"> <!-- Multi level command. -->
     735        <xsl:variable name="sPrefix" select="concat(substring-before($sAncestorId, '-'), '-')"/>
     736        <xsl:if test="not(contains($sId, $sPrefix))">
     737          <xsl:message terminate="yes">Expected sId (<xsl:value-of select="$sId"/>) to contain <xsl:value-of select="$sPrefix"/></xsl:message>
     738        </xsl:if>
     739        <xsl:call-template name="str:to-upper">
     740          <xsl:with-param name="text" select="translate(substring-after($sId, $sPrefix), '-', '_')"/>
     741        </xsl:call-template>
     742      </xsl:when>
     743
     744      <xsl:otherwise>                               <!-- Single command. -->
     745        <xsl:call-template name="str:to-upper">
     746          <xsl:with-param name="text" select="translate($sId, '-', '_')"/>
     747        </xsl:call-template>
     748      </xsl:otherwise>
     749    </xsl:choose>
     750  </xsl:template>
     751
     752  <!-- Turns a remark into one or more scope constants. -->
    717753  <xsl:template name="calc-scope-consts-from-remark">
    718754    <xsl:param name="sCondition" select="remark/@condition"/>
     
    723759    <xsl:choose>
    724760      <xsl:when test="substring-before($sNormalized, ' ') = 'GLOBAL'">
    725         <xsl:text>REFENTRYSTR_SCOPE_GLOBAL</xsl:text>
     761        <xsl:text>RTMSGREFENTRYSTR_SCOPE_GLOBAL</xsl:text>
    726762      </xsl:when>
    727763      <xsl:otherwise>
     
    739775      <xsl:choose>
    740776        <xsl:when test="substring-before($sList, ' ') = 'GLOBAL'">
    741           <xsl:text>| REFENTRYSTR_SCOPE_GLOBAL</xsl:text>
     777          <xsl:text>| RTMSGREFENTRYSTR_SCOPE_GLOBAL</xsl:text>
    742778        </xsl:when>
    743779        <xsl:otherwise>
  • trunk/doc/manual/docbook-refentry-to-H-help.xsl

    r56344 r68860  
    3838    -->
    3939  <xsl:template match="refentry">
     40    <xsl:variable name="RefEntry" select="."/>
     41    <xsl:variable name="sRefEntryId" select="@id"/>
    4042    <xsl:variable name="sBaseNm">
    41       <xsl:call-template name="str:to-upper">
    42         <xsl:with-param name="text" select="translate(substring-after(@id, '-'), '-', '_')"/>
    43       </xsl:call-template>
     43      <xsl:choose>
     44        <xsl:when test="contains($sRefEntryId, '-')">   <!-- Multi level command. -->
     45          <xsl:call-template name="str:to-upper">
     46            <xsl:with-param name="text" select="translate(substring-after($sRefEntryId, '-'), '-', '_')"/>
     47          </xsl:call-template>
     48        </xsl:when>
     49        <xsl:otherwise>                                 <!-- Simple command. -->
     50          <xsl:call-template name="str:to-upper">
     51            <xsl:with-param name="text" select="translate($sRefEntryId, '-', '_')"/>
     52          </xsl:call-template>
     53        </xsl:otherwise>
     54      </xsl:choose>
    4455    </xsl:variable>
    4556
     
    4758      <!-- Generate subcommand enums and defines -->
    4859      <xsl:when test="$g_sMode = 'subcmd'">
     60        <!-- Start enum type and start off with the refentry id. -->
    4961        <xsl:text>
    5062enum
     
    5567        <xsl:text> RT_BIT_32(HELP_SCOPE_</xsl:text><xsl:value-of select="$sBaseNm"/><xsl:text>_BIT)
    5668        HELP_SCOPE_</xsl:text><xsl:value-of select="$sBaseNm"/><xsl:text>_BIT = 0</xsl:text>
    57         <xsl:for-each select="./refsynopsisdiv/cmdsynopsis">
     69
     70        <!-- Synopsis IDs -->
     71        <xsl:for-each select="./refsynopsisdiv/cmdsynopsis[@id != concat('synopsis-', $sRefEntryId)]">
    5872          <xsl:variable name="sSubNm">
    5973            <xsl:text>HELP_SCOPE_</xsl:text>
     
    6478          <xsl:text>,
    6579#define </xsl:text>
    66         <xsl:value-of select="$sSubNm"/>
    67         <xsl:value-of select="substring('                                               ',1,56 - string-length($sSubNm))"/>
    68         <xsl:text> RT_BIT_32(</xsl:text><xsl:value-of select="$sSubNm"/><xsl:text>_BIT)
    69         </xsl:text><xsl:value-of select="$sSubNm"/><xsl:text>_BIT</xsl:text>
     80          <xsl:value-of select="$sSubNm"/>
     81          <xsl:value-of select="substring('                                               ',1,56 - string-length($sSubNm))"/>
     82          <xsl:text> RT_BIT_32(</xsl:text><xsl:value-of select="$sSubNm"/><xsl:text>_BIT)
     83        </xsl:text>
     84          <xsl:value-of select="$sSubNm"/><xsl:text>_BIT</xsl:text>
    7085        </xsl:for-each>
    7186
     87        <!-- Add scoping info for refsect1, refsect2 and refsect3 IDs that aren't part of the synopsis. -->
     88        <xsl:for-each select=".//refsect1[@id] | .//refsect2[@id] | .//refsect3[@id]">
     89          <xsl:variable name="sThisId" select="@id"/>
     90          <xsl:if test="not($RefEntry[@id = $sThisId]) and not($RefEntry/refsynopsisdiv/cmdsynopsis[@id = concat('synopsis-', $sThisId)])">
     91            <xsl:variable name="sSubNm">
     92              <xsl:text>HELP_SCOPE_</xsl:text>
     93              <xsl:choose>
     94                <xsl:when test="contains($sRefEntryId, '-')">   <!-- Multi level command. -->
     95                  <xsl:call-template name="str:to-upper">
     96                    <xsl:with-param name="text" select="translate(substring-after(@id, '-'), '-', '_')"/>
     97                  </xsl:call-template>
     98                </xsl:when>
     99                <xsl:otherwise>                                 <!-- Simple command. -->
     100                  <xsl:call-template name="str:to-upper">
     101                    <xsl:with-param name="text" select="translate(@id, '-', '_')"/>
     102                  </xsl:call-template>
     103                </xsl:otherwise>
     104              </xsl:choose>
     105            </xsl:variable>
     106            <xsl:text>,
     107#define </xsl:text>
     108            <xsl:value-of select="$sSubNm"/>
     109            <xsl:value-of select="substring('                                               ',1,56 - string-length($sSubNm))"/>
     110            <xsl:text> RT_BIT_32(</xsl:text><xsl:value-of select="$sSubNm"/><xsl:text>_BIT)
     111        </xsl:text>
     112            <xsl:value-of select="$sSubNm"/><xsl:text>_BIT</xsl:text>
     113          </xsl:if>
     114        </xsl:for-each>
     115
     116        <!-- Done - complete the enum. -->
    72117        <xsl:text>,
    73     HELP_SCOPE_</xsl:text><xsl:value-of select="$sBaseNm"/><xsl:text>_END
     118        HELP_SCOPE_</xsl:text><xsl:value-of select="$sBaseNm"/><xsl:text>_END
    74119};
    75120</xsl:text>
  • trunk/doc/manual/docbook2latex.xsl

    r59523 r68860  
    582582
    583583  <xsl:template match="varlistentry">
    584     <xsl:if test="not(./term) or not(./listitem) or count(*) != 2">
    585       <xsl:message terminate="yes">Expected exactly one term and one listitem element in the varlistentry.</xsl:message>
    586     </xsl:if>
     584    <xsl:if test="not(./term) or not(./listitem) or count(./listitem) != 1">
     585      <xsl:message terminate="yes">Expected at least one term and one listitem element in the varlistentry.</xsl:message>
     586    </xsl:if>
     587    <!-- TODO: Ideally, I'd like to have each term on a new line. didn't find a simple way of doing that... -->
    587588    <xsl:text>&#x0a;&#x0a;\item[</xsl:text>
    588     <xsl:apply-templates select="term"/>
     589    <xsl:apply-templates select="./term[1]"/>
     590    <xsl:for-each select="./term[position() > 1]">
     591      <xsl:text>,&#x0a; </xsl:text>
     592      <xsl:apply-templates select="."/>
     593    </xsl:for-each>
    589594    <xsl:text>] \hfill \\&#x0a;</xsl:text>
    590595    <xsl:apply-templates select="listitem/*"/>
  • trunk/doc/manual/en_US/user_AdvancedTopics.xml

    r68829 r68860  
    43624362  </sect1>
    43634363
    4364   <sect1 id="viso">
    4365     <title>VISO file format</title>
    4366 
    4367     <para>The VISO files was introduced with VirtualBox 5.2.  They are virtual ISO images,
    4368     i.e. constructed in memory from a bunch of files on the host.  A VISO is just the
    4369     recipe describing how to go about this using a syntax vaguely similar to mkisofs and
    4370     genisoimage.</para>
    4371 
    4372     <para>One requirement, the VISO file must start with one of the
    4373     <option>--iprt-iso-maker-file-marker</option> options. Which of the options
    4374     you use will dicate the quoting and escaping rules used when reading the
    4375     file.  The option takes the image UUID as an argument.</para>
    4376 
    4377     <para>The VISO files are treated as UTF-8 and must not contain any byte order
    4378     marker (BOM).  There is currently no way to comment out lines in a VISO file.</para>
    4379 
    4380 
    4381      <xi:include href="../user_AdvancedTopics_VISO_Options.xml" xpointer="xpointer(/sect1/*)"
    4382        xmlns:xi="http://www.w3.org/2001/XInclude" />
    4383 
    4384 
    4385   </sect1>
     4364  <xi:include href="user_isomakercmd-man.xml"    xpointer="element(/1)" xmlns:xi="http://www.w3.org/2001/XInclude" />
    43864365
    43874366</chapter>
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette