VirtualBox

Changeset 99157 in vbox for trunk


Ignore:
Timestamp:
Mar 23, 2023 11:07:27 PM (22 months ago)
Author:
vboxsync
Message:

manual: Switched to the new refentry to dita converter. bugref:10302

Location:
trunk/doc/manual
Files:
2 deleted
2 edited

Legend:

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

    r99149 r99157  
    394394
    395395
    396  ##
    397  # Create user_isomakercmd-man.xml
    398  #
    399  # @param    1  Language.
    400  # @param    2  the refentry xml base file name.
    401  # @param    3  the full refentry xml file path.
    402  define def_vbox_refentry_to_user_sect1
    403   $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/user_$(2): $(3) \
    404                 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl \
    405                 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) \
    406                 $$(VBOX_XML_ENTITIES) $$(VBOX_VERSION_STAMP) | $$$$(dir $$$$@)
    407         $$(call MSG_TOOL,xsltproc docbook-refentry-to-manual-sect1.xsl,,$3,$$@)
    408         $$(QUIET)$$(RM) -f -- "$$@"
    409         $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --output $$@ $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-sect1.xsl $$<
    410  endef
    411 
    412  $(foreach lang, $(VBOX_MANUAL_ALL_LANGUAGES) \
    413         ,$(evalcall2 def_vbox_refentry_to_user_sect1,$(lang),isomakercmd-man.xml,$(PATH_ROOT)/src/VBox/Runtime/common/fs/isomakercmd-man.xml))
    414 
    415 
    416396 #
    417397 # Shared rules for LaTeX based PDF generation - Only used for SDK & Accessibility.
     
    629609        $$(addprefix $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/, \
    630610        $$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)) \
    631         $$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)_FALLBACK) \
    632         topics/reference.dtd)
     611        $$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)_FALLBACK) )
    633612
    634613  ifneq ($$(VBOX_USER_MANUAL_DITA_SRC_FILES_$(1)),)
     
    645624        $$(QUIET)$$(INSTALL_STAGING) -m 0644 -- "$$<" "$$(@D)/"
    646625  endif
    647 
    648   # Create and empty reference.dtd file as docbook2dita converter mentions it in xml declaration and
    649   # xlst parsing complains when it cannot find it.
    650   $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/reference.dtd: | $$$$(dir $$$$@)
    651         $$(QUIET)$$(TOUCH) -- "$$@"
    652626
    653627 endef
     
    693667        $$(QUIET)$$(VBOX_BLD_PYTHON) "$$<" --output "$$@" @"[email protected]"
    694668
    695   # We must copy over the man_VBoxManage-dhcpserver-dhcpoptions.xml include
    696   # file, so that xsltproc can easily find it when running docbook2dita.xsl.
    697   $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/man_VBoxManage-dhcpserver-dhcpoptions.xml: \
    698                 $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/man_VBoxManage-dhcpserver-dhcpoptions.xml) \
    699                         $$(VBOX_PATH_MANUAL_SRC)/en_US/man_VBoxManage-dhcpserver-dhcpoptions.xml) | $$$$(dir $$$$@)
    700         $$(QUIET)$$(INSTALL_STAGING) -m 0644 -- "$$<" "$$(@D)/"
    701 
    702669  # Accumulated list of conversion output file names to be used as a
    703670  # prerequisite in rules producing a version of the user manual.
    704   VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$1 := \
    705         $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/user_isomakercmd-man.dita
    706 
    707   # Unlike other refentry docbook files user_isomakercmd-man.xml is located
    708   # in the output folder thus a special target for its conversion. Note that
    709   # user_isomakercmd-man.xml does not have refsect hierarchy and hrefs to be pre/post
    710   # processed. So we skip these steps for this file.
    711   $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/user_isomakercmd-man.dita: \
    712                 $$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \
    713                 $$(VBOX_PATH_MANUAL_OUTBASE)/en_US/user_isomakercmd-man.xml | $$$$(dir $$$$@)
    714         $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) \
    715                 --maxdepth 6000 \
    716                 --output "$$@" \
    717                 "$$<" \
    718                 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/user_isomakercmd-man.xml
     671  VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$1 :=
     672
    719673 endef # def_vbox_refentry_to_dita
    720674
     
    722676 # @param 1    Language
    723677 # @param 2    Filename w/o extension.
     678 # @param 3    Alternative fallback filename (for isomakercmd-man.xml).
    724679 define def_vbox_refentry_file_to_dita
    725680  VBOX_USER_MANUAL_CONVERTED_REFENTRY_DITA_FILES_$1 += $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).dita
    726681  $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).dita \
    727682  + $$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml: \
    728                 $$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl \
    729                 $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2).xml) $$(VBOX_PATH_MANUAL_SRC)/en_US/$(2).xml) \
    730                 $$(VBOX_PATH_MANUAL_SRC)/mark_external_urls.xsl \
     683                $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-dita-pre.xsl \
     684                $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-dita.xsl \
    731685                $$(VBOX_PATH_MANUAL_SRC)/add_file_to_id_only_references.py \
    732686                $$(VBOX_USER_MANUAL_ID_MAPPING_FILE_$1) \
    733                 $$(VBOX_PATH_MANUAL_OUTBASE)/$1/dita/topics/man_VBoxManage-dhcpserver-dhcpoptions.xml \
     687                $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2).xml) $(3) $$(VBOX_PATH_MANUAL_SRC)/en_US/$(2).xml) \
    734688                $$(VBOX_XML_CATALOG) \
    735689                $$(VBOX_XML_CATALOG_DOCBOOK) \
     
    738692                $$(VBOX_VERSION_STAMP) \
    739693                | $$$$(dir $$$$@)
    740         $$(call MSG_TOOL,xsltproc docbook2dita.xsl,,$$(firstword $$(filter %.xml,$$^)),$$@)
    741         $$(QUIET)$$(RM) -f "$$@"
    742         $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/refsect2_to_refsect1.py \
    743                 -i $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2).xml) $$(VBOX_PATH_MANUAL_SRC)/en_US/$(2).xml) \
    744                 -o "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml"
    745         $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output "$$@" \
    746                 "$$(VBOX_DITA_CONVERTER_PATH)/db2dita/docbook2dita.xsl" \
     694        $$(call MSG_TOOL,xsltproc docbook-refentry-to-manual-dita[-pre].xsl,,$$(firstword $$(filter %.xml,$$^)),$$@)
     695        $$(QUIET)$$(RM) -f -- "$$@" "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml"
     696        $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) \
     697                --output "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml" \
     698                $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-dita-pre.xsl \
     699                $$(qfirstfile , $$(qwildcard , $$(VBOX_PATH_MANUAL_SRC)/$(1)/$(2).xml) $(3) $$(VBOX_PATH_MANUAL_SRC)/en_US/$(2).xml)
     700        $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) \
     701                --output "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).dita" \
     702                $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-to-manual-dita.xsl \
    747703                "$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/dita/topics/$(2).xml"
    748         $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT) --maxdepth 6000 --output "$$@" \
    749                 "$$(VBOX_PATH_MANUAL_SRC)/mark_external_urls.xsl" "$$@"
    750704        $$(QUIET)$$(VBOX_BLD_PYTHON) $$(VBOX_PATH_MANUAL_SRC)/add_file_to_id_only_references.py \
    751705                --mapping-file "$$(VBOX_USER_MANUAL_ID_MAPPING_FILE_$1)" "$$@"
     
    755709        ,$(evalcall2 def_vbox_refentry_to_dita,$(lang)) \
    756710        $(foreach file, $(basename $(VBOX_MANUAL_XML_REFENTRY_FILES) man_vboximg-mount man_VBoxHeadless) \
    757                 ,$(evalcall2 def_vbox_refentry_file_to_dita,$(lang),$(file))))
     711                ,$(evalcall2 def_vbox_refentry_file_to_dita,$(lang),$(file))) \
     712        $(evalcall2 def_vbox_refentry_file_to_dita,$(lang),user_isomakercmd-man, \
     713                $(PATH_ROOT)/src/VBox/Runtime/common/fs/isomakercmd-man.xml))
     714
     715 ## @todo Make use of docbook-refentry-to-manual-overview.xsl again (after dita conversion)?
    758716
    759717
     
    811769                "/i:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/UserManual.ditamap" \
    812770                "/transtype:xhtml" \
    813         "/filter:$(VBOX_PATH_MANUAL_SRC)/en_US/dita/htmlhelp.ditaval" \
     771                "/filter:$(VBOX_PATH_MANUAL_SRC)/en_US/dita/htmlhelp.ditaval" \
    814772                "/outdir:$(@D)" \
    815773                "/tempdir:$(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita/temp_xhtml_chunks" \
  • trunk/doc/manual/docbook-refentry-to-manual-dita.xsl

    r99156 r99157  
    567567    <xsl:attribute name="scope">external</xsl:attribute> <!-- Just assumes this is external. -->
    568568    <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
     569    <xsl:attribute name="format">html</xsl:attribute>
     570    <xsl:if test="not(starts-with(@url, 'http'))"><xsl:message terminate="yes">ulink url is not http: <xsl:value-of select="@url"/></xsl:message></xsl:if>
    569571  </xsl:element>
    570572</xsl:template>
Note: See TracChangeset for help on using the changeset viewer.

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