VirtualBox

Changeset 105474 in vbox for trunk


Ignore:
Timestamp:
Jul 24, 2024 10:35:29 AM (6 months ago)
Author:
vboxsync
Message:

doc/manual: Remove unused XSLT for integrating refentry manpages into docbook documents as sections, including all other places which became less obvious.

Location:
trunk/doc/manual
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/common-formatcfg.xsl

    r99116 r105474  
    107107</xsl:template>
    108108
    109 <!--
    110   refentry related layout tweaks.
    111 
    112   Note! While we could save us all this work by using refsect1..3 and
    113         refsynopsisdiv docbook-refentry-to-manual-sect1.xsl, we'd like to have
    114         a valid XML document and thus do do some extra markup using the role
    115         and condition attributes.  We catch some of it here.  But the XSLT
    116         for specific targets (html, latex, etc) have a few more tweaks
    117         related to this.
    118 
    119         The @role has only one special trick 'not-in-toc' that excludes sections
    120         like 'Synopsis' and 'Description' from the TOCs.
    121 
    122         The @condition records the original refentry element name, i.e. it will
    123         have values like refentry, refsynopsisdiv, refsect1, refsect2 and refsect3.
    124   -->
    125 
    126 <!-- This removes the not-in-toc bits from the toc. -->
    127 <xsl:template match="sect2[@role = 'not-in-toc']"      mode="toc" />
    128 <xsl:template match="sect3[@role = 'not-in-toc']"      mode="toc" />
    129 <xsl:template match="sect4[@role = 'not-in-toc']"      mode="toc" />
    130 <xsl:template match="sect5[@role = 'not-in-toc']"      mode="toc" />
    131 <xsl:template match="section[@role = 'not-in-toc']"    mode="toc" />
    132 <xsl:template match="simplesect[@role = 'not-in-toc']" mode="toc" />
    133 
    134 <!-- This removes unnecessary <dd><dl> stuff caused by the above. -->
    135 <xsl:template match="sect1[sect2/@role = 'not-in-toc']" mode="toc">
    136   <xsl:param name="toc-context" select="."/>
    137   <xsl:call-template name="subtoc">
    138     <xsl:with-param name="toc-context" select="$toc-context"/>
    139     <xsl:with-param name="nodes" select="sect2[@role != 'not-in-toc'] | bridgehead[$bridgehead.in.toc != 0]"/>
    140   </xsl:call-template>
    141 </xsl:template>
    142 
    143 <xsl:template match="sect2[sect3/@role = 'not-in-toc']" mode="toc">
    144   <xsl:param name="toc-context" select="."/>
    145   <xsl:call-template name="subtoc">
    146     <xsl:with-param name="toc-context" select="$toc-context"/>
    147     <xsl:with-param name="nodes" select="sect3[@role != 'not-in-toc'] | bridgehead[$bridgehead.in.toc != 0]"/>
    148   </xsl:call-template>
    149 </xsl:template>
    150 
    151 <!-- This make the refsect* and refsynopsisdiv unnumbered like the default refentry rendering. -->
    152 <xsl:template match="sect2[@condition = 'refsynopsisdiv']
    153                    | sect2[starts-with(@condition, 'refsect')]
    154                    | sect3[starts-with(@condition, 'refsect')]
    155                    | sect4[starts-with(@condition, 'refsect')]
    156                    | sect5[starts-with(@condition, 'refsect')]
    157                    | section[starts-with(@condition, 'refsect')]
    158                    | simplesect[starts-with(@condition, 'refsect')]"
    159   mode="object.title.template"
    160   >
    161     <xsl:call-template name="gentext.template">
    162       <xsl:with-param name="context" select="'title-unnumbered'"/>
    163       <xsl:with-param name="name">
    164         <xsl:call-template name="xpath.location"/>
    165       </xsl:with-param>
    166     </xsl:call-template>
    167 </xsl:template>
    168 
    169109
    170110</xsl:stylesheet>
  • trunk/doc/manual/common-html-formatcfg.xsl

    r98103 r105474  
    122122
    123123
    124 <!-- This is for allow special CSS rules to apply to the refsect stuff. -->
    125 <xsl:template match="sect2[     @role      = 'not-in-toc']/title
    126                    | sect3[     @role      = 'not-in-toc']/title
    127                    | sect4[     @role      = 'not-in-toc']/title
    128                    | sect5[     @role      = 'not-in-toc']/title
    129                    | section[   @role      = 'not-in-toc']/title
    130                    | simplesect[@role      = 'not-in-toc']/title
    131                    | sect1[     @condition = 'refentry']/title
    132                    | sect2[     @condition = 'refentry']/title
    133                    | sect1[     starts-with(@condition, 'refsect')]/title
    134                    | sect2[     starts-with(@condition, 'refsect')]/title
    135                    | sect3[     starts-with(@condition, 'refsect')]/title
    136                    | sect4[     starts-with(@condition, 'refsect')]/title
    137                    | sect5[     starts-with(@condition, 'refsect')]/title
    138                    | section[   starts-with(@condition, 'refsect')]/title
    139                    | simplesect[starts-with(@condition, 'refsect')]/title
    140 " mode="titlepage.mode">
    141   <xsl:element name="div">
    142     <xsl:attribute name="class">
    143       <xsl:value-of select="../@role"/>
    144       <xsl:if test="../@role and ../@condition">
    145         <xsl:text> </xsl:text>
    146       </xsl:if>
    147       <xsl:value-of select="../@condition"/>
    148     </xsl:attribute>
    149     <xsl:apply-imports/>
    150   </xsl:element>
    151 </xsl:template>
    152 
    153 <xsl:template match="sect2[     @role      = 'not-in-toc']
    154                    | sect3[     @role      = 'not-in-toc']
    155                    | sect4[     @role      = 'not-in-toc']
    156                    | sect5[     @role      = 'not-in-toc']
    157                    | section[   @role      = 'not-in-toc']
    158                    | simplesect[@role      = 'not-in-toc']
    159                    | sect1[     @condition = 'refentry']
    160                    | sect2[     @condition = 'refentry']
    161                    | sect1[     starts-with(@condition, 'refsect')]
    162                    | sect2[     starts-with(@condition, 'refsect')]
    163                    | sect3[     starts-with(@condition, 'refsect')]
    164                    | sect4[     starts-with(@condition, 'refsect')]
    165                    | sect5[     starts-with(@condition, 'refsect')]
    166                    | section[   starts-with(@condition, 'refsect')]
    167                    | simplesect[starts-with(@condition, 'refsect')]" >
    168   <xsl:element name="div">
    169     <xsl:attribute name="class">
    170       <xsl:value-of select="@role"/>
    171       <xsl:if test="@role and @condition">
    172         <xsl:text> </xsl:text>
    173       </xsl:if>
    174       <xsl:value-of select="@condition"/>
    175     </xsl:attribute>
    176     <xsl:apply-imports/>
    177   </xsl:element>
    178 </xsl:template>
    179 
    180124<!-- To use CSS to correctly insert hanging indent when soft wrapping and
    181125  <sbr>'ing a synopsis, we must place each command in its own <p>.  The default
  • trunk/doc/manual/docbook-refentry-to-C-help.xsl

    r99513 r105474  
    11<?xml version="1.0"?>
    22<!--
    3     docbook-refentry-to-manual-sect1.xsl:
     3    docbook-refentry-to-C-help.xsl:
    44        XSLT stylesheet for nicking the refsynopsisdiv bit of a
    55        refentry (manpage) for use in the command overview section
  • trunk/doc/manual/docbook-refentry-to-manual-dita.xsl

    r99629 r105474  
    11<?xml version="1.0"?>
    22<!--
    3     docbook-refentry-to-manual-sect1.xsl:
     3    docbook-refentry-to-manual-dita.xsl:
    44        XSLT stylesheet for converting a refentry (manpage)
    55        to dita for use in the user manual.
     
    5050           4.0.x with the latest com.elovirta.pdf plugin (2023-03-xx
    5151           or later), we can enable this by default again. -->
    52 <xsl:param name="g_fReplaceHypens">false</xsl:param>
     52<xsl:param name="g_fReplaceHyphens">true</xsl:param>
    5353
    5454<!-- Render the syntax diagram more as text than as proper markup. -->
     
    769769</xsl:template>
    770770
    771 <!-- replaceable/text() in a cmdsynopsis should have hypens replaced. -->
     771<!-- replaceable/text() in a cmdsynopsis should have hyphens replaced. -->
    772772<xsl:template match="replaceable/text()[ancestor::cmdsynopsis]" >
    773773  <xsl:call-template name="emit-text-with-replacements"/>
     
    10841084
    10851085<!--
    1086  Maybe replace hypens (dashes) with non-breaking ones.
     1086 Maybe replace hyphens (dashes) with non-breaking ones.
    10871087 -->
    10881088<xsl:template name="emit-text-with-replacements">
    10891089  <xsl:param name="a_sText" select="."/>
    10901090  <xsl:choose>
    1091     <xsl:when test="$g_fReplaceHypens = 'true'">
     1091    <xsl:when test="$g_fReplaceHyphens = 'true'">
    10921092      <xsl:call-template name="str:subst">
    10931093          <xsl:with-param name="text" select="$a_sText"/>
  • trunk/doc/manual/docbook2latex.xsl

    r99118 r105474  
    390390        </xsl:call-template>
    391391      </xsl:when>
    392       <xsl:when test="parent::sect2[@role='not-in-toc'] or parent::refsect1 or (parent::section and count(ancestor::section) = 2)">
    393         <xsl:call-template name="title-wrapper">
    394           <xsl:with-param name="texcmd">\subsection*</xsl:with-param>
    395         </xsl:call-template>
    396       </xsl:when>
    397392      <xsl:when test="name(..)='sect2'">
    398393        <xsl:call-template name="title-wrapper">
     
    400395        </xsl:call-template>
    401396      </xsl:when>
    402       <xsl:when test="parent::sect3[@role='not-in-toc'] or parent::refsect2 or (parent::section and count(ancestor::section) = 3)">
    403         <xsl:call-template name="title-wrapper">
    404           <xsl:with-param name="texcmd">\subsubsection*</xsl:with-param>
    405         </xsl:call-template>
    406       </xsl:when>
    407397      <xsl:when test="name(..)='sect3'">
    408398        <xsl:call-template name="title-wrapper">
     
    410400        </xsl:call-template>
    411401      </xsl:when>
    412       <xsl:when test="parent::sect4[@role='not-in-toc'] or parent::refsect3 or (parent::section and count(ancestor::section) = 4)">
    413         <xsl:call-template name="title-wrapper">
    414           <xsl:with-param name="texcmd">\paragraph*</xsl:with-param>
    415         </xsl:call-template>
    416       </xsl:when>
    417402      <xsl:when test="name(..)='sect4'">
    418403        <xsl:call-template name="title-wrapper">
    419404          <xsl:with-param name="texcmd">\paragraph</xsl:with-param>
    420         </xsl:call-template>
    421       </xsl:when>
    422       <xsl:when test="parent::sect5[@role='not-in-toc'] or parent::refsect4 or (parent::section and count(ancestor::section) = 5)">
    423         <xsl:call-template name="title-wrapper">
    424           <xsl:with-param name="texcmd">\subparagraph*</xsl:with-param>
    425405        </xsl:call-template>
    426406      </xsl:when>
  • trunk/doc/manual/ru_RU/docbook-refentry-to-C-help.xsl

    r98103 r105474  
    11<?xml version="1.0"?>
    22<!--
    3     docbook-refentry-to-manual-sect1.xsl:
     3    docbook-refentry-to-C-help.xsl:
    44        XSLT stylesheet for nicking the refsynopsisdiv bit of a
    55        refentry (manpage) for use in the command overview section
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