- Timestamp:
- Mar 17, 2023 3:34:57 PM (21 months ago)
- Location:
- trunk/doc/manual
- Files:
-
- 1 added
- 2 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/Config.kmk
r98448 r99014 39 39 # 40 40 41 # DITA stuff. 42 VBOX_DITA_CONVERTER_PATH ?= $(PATH_ROOT)/src/libs/dbdita-1.0 43 VBOX_DITA_ORIGINAL_PATH ?= $(PATH_ROOT)/src/libs/dita-ot-1.8.5 44 45 41 46 # Source location. 42 VBOX_PATH_MANUAL_SRC := $(PATH_ROOT)/doc/manual47 VBOX_PATH_MANUAL_SRC := $(PATH_ROOT)/doc/manual 43 48 # Output location. 44 49 VBOX_PATH_MANUAL_OUTBASE := $(PATH_OBJ)/manual … … 379 384 $$(VBOX_PATH_MANUAL_SRC)/$(1)/docbook-refentry-link-replacement-xsl-gen.xsl \ 380 385 $$(VBOX_PATH_MANUAL_SRC)/docbook-refentry-link-replacement-xsl-gen.xsl \ 381 $$(addprefix $$(VBOX_PATH_MANUAL_SRC)/en_US/,$$(VBOX_MANUAL_XML_FILES)) \ 386 $$(VBOX_PATH_MANUAL_SRC)/$(1)/dita-refentry-link-replacement-xsl-gen.xsl \ 387 $$(VBOX_PATH_MANUAL_SRC)/dita-refentry-link-replacement-xsl-gen.xsl \ 388 $$(VBOX_PATH_MANUAL_SRC)/ditamap-to-single-xml.xsl \ 389 $$(VBOX_PATH_MANUAL_SRC)/$(1)/dita/UserManual.ditamap \ 390 $$(wildcard $$(VBOX_PATH_MANUAL_SRC)/$(1)/dita/topics/*.xml) \ 382 391 $$(VBOX_MANUAL_XML_FILES_COMMON) \ 383 392 $$(VBOX_XML_CATALOG) $$(VBOX_XML_CATALOG_DOCBOOK) $$(VBOX_XML_CATALOG_MANUAL) $$(VBOX_XML_ENTITIES) \ … … 393 402 '</catalog>' 394 403 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT,,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT).cat) \ 395 --stringparam 'g_sMode' 'first' --output "$$@" "$$<" $$(filter %UserManual.xml,$$^) 404 --output "[email protected]" "$$(VBOX_PATH_MANUAL_SRC)/ditamap-to-single-xml.xsl" $$(filter %.ditamap,$$^) 405 # $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT,,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT).cat) \ 406 # --path "$$(VBOX_PATH_MANUAL_SRC)/$(1)/dita/topics" \ 407 # --path "$(VBOX_DITA_ORIGINAL_PATH)/dtd/bookmap/dtd" \ 408 # --path "$(VBOX_DITA_ORIGINAL_PATH)/dtd/technicalContent/dtd" \ 409 # --output "[email protected]" "$$(VBOX_PATH_MANUAL_SRC)/ditamap-to-single-xml.xsl" "[email protected]" 410 $$(QUIET)$$(call VBOX_XSLTPROC_WITH_CAT,,$$(VBOX_PATH_MANUAL_OUTBASE)/$(1)/$$(VBOX_XML_XREF_TO_TEXT).cat) \ 411 --path "$$(VBOX_PATH_MANUAL_SRC)/$(1)/dita/topics" \ 412 --path "$(VBOX_DITA_ORIGINAL_PATH)/dtd/bookmap/dtd" \ 413 --path "$(VBOX_DITA_ORIGINAL_PATH)/dtd/technicalContent/dtd" \ 414 --stringparam 'g_sMode' 'first' \ 415 --output "$$@" \ 416 "$$(VBOX_PATH_MANUAL_SRC)/$(1)/dita-refentry-link-replacement-xsl-gen.xsl" \ 417 "[email protected]" 396 418 # Using en-US version as section and chapter names until user manual is translated as well 397 419 $$(foreach x, $$(VBOX_MANUAL_XML_REFENTRY_FILES)\ -
trunk/doc/manual/Makefile.kmk
r99008 r99014 91 91 endif 92 92 93 VBOX_DITA_CONVERTER_PATH = $(PATH_ROOT)/src/libs/dbdita-1.0 94 VBOX_DITA_ORIGINAL_PATH = $(PATH_ROOT)/src/libs/dita-ot-1.8.5 95 VBOX_DITA_PATH = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-1.8.5 93 VBOX_DITA_PATH = $(VBOX_PATH_MANUAL_OUTBASE)/en_US/dita-ot-1.8.5 96 94 97 95 VBOX_QHELP_OUTPUT_FILES = \ -
trunk/doc/manual/dita-refentry-link-replacement-xsl-gen.xsl
r99010 r99014 1 1 <?xml version="1.0"?> 2 2 <!-- 3 d ocbook-refentry-link-replacement-xsl-gen.xsl:3 dita-refentry-link-replacement-xsl-gen.xsl: 4 4 XSLT stylesheet for generate a stylesheet that replaces links 5 5 to the user manual in the manpages. … … 38 38 39 39 <!-- Translatable strings --> 40 <xsl:variable name="sChapter" select="'chapter'"/> 41 <xsl:variable name="sSection" select="'section'"/> 42 <xsl:variable name="sOfManual" select="'of the user manual'"/> 43 <xsl:variable name="sInManual" select="'in the user manual'"/> 40 <xsl:variable name="sChapter" select="'chapter'"/> 41 <xsl:variable name="sSection" select="'section'"/> 42 <xsl:variable name="sInChapter" select="'in chapter'"/> 43 <xsl:variable name="sPreface" select="'in the preface to the user manual'"/> 44 <xsl:variable name="sOfManual" select="'of the user manual'"/> 45 <xsl:variable name="sInManual" select="'in the user manual'"/> 44 46 45 47 … … 49 51 </xsl:template> 50 52 51 52 <!-- Remove all remarks. -->53 <xsl:template match="remark"/>54 53 55 54 <!-- … … 81 80 Produce the transformation templates: 82 81 --> 83 <xsl:template match="chapter [@id]/title">82 <xsl:template match="chapter/topic[@id]/title"> 84 83 <xsl:text> 85 84 <xsl:template match="xref[@linkend='</xsl:text> … … 94 93 </xsl:template> 95 94 96 <xsl:template match="sect1[@id]/title"> 95 <xsl:template match="*/topicwrap/topic[@id]/title"> 96 <xsl:variable name="iDepth" select="count(ancestor-or-self::topicwrap)" /> 97 97 98 <xsl:text><xsl:template match="xref[@linkend='</xsl:text> 98 99 <xsl:value-of select="../@id"/><xsl:text>']"> 99 <xsl:text></xsl:text><xsl:value-of select="$sSection"/><xsl:text> </xsl:text> 100 <xsl:value-of select="count(../../preceding-sibling::chapter) + 1"/><xsl:text>.</xsl:text> 101 <xsl:value-of select="count(../preceding-sibling::sect1) + 1"/> 100 <xsl:text></xsl:text><xsl:value-of select="$sSection"/> 102 101 <xsl:text> "</xsl:text> 103 102 <xsl:value-of select="normalize-space()"/><xsl:text>" </xsl:text> 104 <xsl:value-of select="$sOfManual"/><xsl:text></xsl:text> 103 104 <!-- Currently DITA only does chapter numbering, which mean the poor buggers 105 need to do text searches for the (sub*)section titles. So we emit a 106 'in chapter xx of the user manual' to help out. --> 107 <xsl:choose> 108 <xsl:when test="ancestor-or-self::chapter"> 109 <xsl:value-of select="$sInChapter"/><xsl:text> </xsl:text> 110 <xsl:choose> 111 <xsl:when test="$iDepth = 1"> 112 <xsl:value-of select="count(../../preceding-sibling::chapter) + 1" /> 113 </xsl:when> 114 <xsl:when test="$iDepth = 2"> 115 <xsl:value-of select="count(../../../preceding-sibling::chapter) + 1" /> 116 </xsl:when> 117 <xsl:when test="$iDepth = 3"> 118 <xsl:value-of select="count(../../../../preceding-sibling::chapter) + 1" /> 119 </xsl:when> 120 <xsl:when test="$iDepth = 4"> 121 <xsl:value-of select="count(../../../../../preceding-sibling::chapter) + 1" /> 122 </xsl:when> 123 <xsl:when test="$iDepth = 5"> 124 <xsl:value-of select="count(../../../../../../preceding-sibling::chapter) + 1" /> 125 </xsl:when> 126 <xsl:otherwise> 127 <xsl:message terminate="yes">Too deep topic nesting! <xsl:call-template name="get-node-path"/></xsl:message> 128 </xsl:otherwise> 129 </xsl:choose> 130 <xsl:text> </xsl:text> 131 <xsl:value-of select="$sOfManual"/> 132 </xsl:when> 133 134 <xsl:when test="ancestor-or-self::prefacewrap"> 135 <xsl:if test="$iDepth != 1"> 136 <xsl:message terminate="yes">Too deep preface topic nesting! <xsl:call-template name="get-node-path"/></xsl:message> 137 </xsl:if> 138 <xsl:value-of select="$sPreface"/><xsl:text> </xsl:text> 139 </xsl:when> 140 141 <xsl:otherwise> 142 <xsl:message terminate="yes">Unexpected topicwrap parent: <xsl:call-template name="get-node-path"/></xsl:message> 143 </xsl:otherwise> 144 </xsl:choose> 145 <xsl:text></xsl:text> 105 146 </xsl:template> 106 147 </xsl:text> 107 148 <xsl:apply-templates/> 108 149 </xsl:template> 109 110 <xsl:template match="sect2[@id]/title">111 <xsl:text><xsl:template match="xref[@linkend='</xsl:text>112 <xsl:value-of select="../@id"/><xsl:text>']">113 <xsl:text></xsl:text><xsl:value-of select="$sSection"/><xsl:text> </xsl:text>114 <xsl:value-of select="count(../../../preceding-sibling::chapter) + 1"/><xsl:text>.</xsl:text>115 <xsl:value-of select="count(../../preceding-sibling::sect1) + 1"/><xsl:text>.</xsl:text>116 <xsl:value-of select="count(../preceding-sibling::sect2) + 1"/>117 <xsl:text> "</xsl:text>118 <xsl:value-of select="normalize-space()"/><xsl:text>" </xsl:text>119 <xsl:value-of select="$sOfManual"/><xsl:text></xsl:text>120 </xsl:template>121 </xsl:text>122 <xsl:apply-templates/>123 </xsl:template>124 125 <xsl:template match="sect3[@id]/title">126 <xsl:text><xsl:template match="xref[@linkend='</xsl:text>127 <xsl:value-of select="../@id"/><xsl:text>']">128 <xsl:text></xsl:text><xsl:value-of select="$sSection"/><xsl:text> </xsl:text>129 <xsl:value-of select="count(../../../../preceding-sibling::chapter) + 1"/><xsl:text>.</xsl:text>130 <xsl:value-of select="count(../../../preceding-sibling::sect1) + 1"/><xsl:text>.</xsl:text>131 <xsl:value-of select="count(../../preceding-sibling::sect2) + 1"/><xsl:text>.</xsl:text>132 <xsl:value-of select="count(../preceding-sibling::sect3) + 1"/>133 <xsl:text> "</xsl:text>134 <xsl:value-of select="normalize-space()"/><xsl:text>" </xsl:text>135 <xsl:value-of select="$sOfManual"/><xsl:text></xsl:text>136 </xsl:template>137 </xsl:text>138 <xsl:apply-templates/>139 </xsl:template>140 141 <xsl:template match="preface[@id]/title">142 <xsl:text><xsl:template match="xref[@linkend='</xsl:text>143 <xsl:value-of select="../@id"/><xsl:text>']">144 <xsl:text>"</xsl:text>145 <xsl:value-of select="normalize-space()"/><xsl:text>" </xsl:text>146 <xsl:value-of select="$sOfManual"/><xsl:text></xsl:text>147 </xsl:template>148 </xsl:text>149 <xsl:apply-templates/>150 </xsl:template>151 152 <xsl:template match="refentry[@id]/refentryinfo/title">153 <xsl:text><xsl:template match="xref[@linkend='</xsl:text>154 <xsl:value-of select="../../@id"/><xsl:text>']">155 <xsl:text> "</xsl:text>156 <xsl:value-of select="normalize-space()"/><xsl:text>"</xsl:text>157 </xsl:template>158 </xsl:text>159 <xsl:apply-templates/>160 </xsl:template>161 162 <xsl:template match="refsect2[@id]/title">163 <xsl:text><xsl:template match="xref[@linkend='</xsl:text>164 <xsl:value-of select="../@id"/><xsl:text>']">165 <xsl:text>"</xsl:text>166 <xsl:value-of select="normalize-space()"/><xsl:text>"</xsl:text>167 </xsl:template>168 </xsl:text>169 <xsl:apply-templates/>170 </xsl:template>171 172 150 173 151 <!-- -
trunk/doc/manual/en_US/dita-refentry-link-replacement-xsl-gen.xsl
r99013 r99014 1 1 <?xml version="1.0"?> 2 2 <!-- 3 d ocbook-refentry-link-replacement-xsl-gen.xsl:3 dita-refentry-link-replacement-xsl-gen.xsl: 4 4 XSLT stylesheet for generate a stylesheet that replaces links 5 5 to the user manual in the manpages. … … 33 33 > 34 34 35 <xsl:import href="../d ocbook-refentry-link-replacement-xsl-gen.xsl"/>35 <xsl:import href="../dita-refentry-link-replacement-xsl-gen.xsl"/> 36 36 37 37 <!-- Translated strings -->
Note:
See TracChangeset
for help on using the changeset viewer.