VirtualBox

Ignore:
Timestamp:
Jun 18, 2015 5:44:54 PM (9 years ago)
Author:
vboxsync
Message:

doc/manual: fix SDK reference to be valid docbook XML, needed adjustments in the generator (which produced creative stuff which was severely violating the DTD, e.g. custom attributes which could be easily done properly) and a LOT of manual editing. Content of the manual is essentially the same, the biggest issues were <para> sloppiness and the use of <xref> where <link> is the only solution. Also made the line lengths again as uniform as possible.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/xidl2docbook.xsl

    r46213 r56532  
    66        VirtualBox.xidl.
    77
    8     Copyright (C) 2006-2012 Oracle Corporation
     8    Copyright (C) 2006-2015 Oracle Corporation
    99
    1010    This file is part of VirtualBox Open Source Edition (OSE), as
     
    5454      <xsl:choose>
    5555        <xsl:when test="//interface[@name=$type]">
    56           <xref>
    57             <xsl:attribute name="apiref">yes</xsl:attribute>
     56          <link>
    5857            <xsl:attribute name="linkend">
    5958              <xsl:value-of select="translate($type, ':', '_')" />
    6059            </xsl:attribute>
    6160            <xsl:value-of select="$type" />
    62           </xref>
     61          </link>
    6362        </xsl:when>
    6463        <xsl:when test="//enum[@name=$type]">
    65           <xref>
    66             <xsl:attribute name="apiref">yes</xsl:attribute>
     64          <link>
    6765            <xsl:attribute name="linkend">
    6866              <xsl:value-of select="translate($type, ':', '_')" />
    6967            </xsl:attribute>
    7068            <xsl:value-of select="$type" />
    71           </xref>
     69          </link>
    7270        </xsl:when>
    7371        <xsl:otherwise>
     
    122120          <xsl:choose>
    123121            <xsl:when test="$wsmap='suppress'">
    124               <note>
     122              <para><note><para>
    125123                This interface is not supported in the web service.
    126               </note>
     124              </para></note></para>
    127125            </xsl:when>
    128126            <xsl:when test="$wsmap='struct'">
    129               <note>With the web service, this interface is mapped to a structure. Attributes that return this interface will not return an object, but a complete structure
    130               containing the attributes listed below as structure members.</note>
     127              <para><note><para>With the web service, this interface is mapped to a structure. Attributes that return this interface will not return an object, but a complete structure
     128              containing the attributes listed below as structure members.</para></note></para>
    131129            </xsl:when>
    132130            <xsl:when test="$wsonly='yes'">
    133               <note>This interface is supported in the web service only, not in COM/XPCOM.</note>
     131              <para><note><para>This interface is supported in the web service only, not in COM/XPCOM.</para></note></para>
    134132            </xsl:when>
    135133          </xsl:choose>
    136134
    137135          <xsl:if test="$reportExtends">
    138             <note>
     136            <para><note><para>
    139137                This interface extends
    140                 <xref>
    141                   <xsl:attribute name="apiref">yes</xsl:attribute>
     138                <link>
    142139                  <xsl:attribute name="linkend"><xsl:value-of select="$extends" /></xsl:attribute>
    143140                  <xsl:value-of select="$extends" />
    144                 </xref>
     141                </link>
    145142                and therefore supports all its methods and attributes as well.
    146             </note>
     143            </para></note></para>
    147144          </xsl:if>
    148145
     
    181178                  </programlisting>
    182179                  <xsl:if test="( ($attrtype=($G_setSuppressedInterfaces/@name)) )">
    183                     <note>
     180                    <para><note><para>
    184181                      This attribute is not supported in the web service.
    185                     </note>
     182                    </para></note></para>
    186183                  </xsl:if>
    187184                  <xsl:apply-templates select="desc" />
     
    209206                  <xsl:if test="   (param[@type=($G_setSuppressedInterfaces/@name)])
    210207                                or (param[@mod='ptr'])" >
    211                     <note>
     208                    <para><note><para>
    212209                      This method is not supported in the web service.
    213                     </note>
     210                    </para></note></para>
    214211                  </xsl:if>
    215212                  <!-- make a set of all parameters with in and out direction -->
     
    256253                          </glossterm>
    257254                          <glossdef>
    258                             <para>
    259                               <xsl:apply-templates select="desc" />
    260                             </para>
     255                            <xsl:if test="not(desc)">
     256                              <para/>
     257                            </xsl:if>
     258                            <xsl:apply-templates select="desc" />
    261259                          </glossdef>
    262260                        </glossentry>
     
    320318              </glossterm>
    321319              <glossdef>
     320                <xsl:if test="not(desc)">
     321                  <para/>
     322                </xsl:if>
    322323                <xsl:apply-templates select="desc" />
    323324              </glossdef>
     
    398399
    399400<xsl:template match="desc">
     401  <!-- todo: wrapping the entire content in a single para is actually not
     402       entirely correct, as it contains empty lines denoting new paragraphs -->
     403  <para>
    400404  <xsl:apply-templates />
     405  </para>
    401406</xsl:template>
    402407
     
    411416<!-- <link to="DeviceType::HardDisk"/> -->
    412417<xsl:template match="link">
    413   <xref>
    414     <xsl:attribute name="apiref">yes</xsl:attribute>
     418  <link>
    415419    <xsl:variable name="tmp" select="@to" />
    416420    <xsl:variable name="enumNameFromCombinedName">
     
    493497      </xsl:otherwise>
    494498    </xsl:choose>
    495   </xref>
     499  </link>
    496500</xsl:template>
    497501
     
    502506<xsl:template match="note">
    503507  <xsl:if test="not(@internal='yes')">
    504     <note>
     508    <note><para>
    505509      <xsl:apply-templates />
    506     </note>
     510    </para></note>
    507511  </xsl:if>
    508512</xsl:template>
     
    545549<xsl:template match="li">
    546550  <listitem>
    547     <xsl:apply-templates />
     551    <para>
     552      <xsl:apply-templates />
     553    </para>
    548554  </listitem>
    549555</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