VirtualBox

Changeset 86612 in vbox for trunk/doc/manual


Ignore:
Timestamp:
Oct 16, 2020 2:48:01 PM (4 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
140985
Message:

FE/Qt: bugref:9831. Adding xsl code for paring toc out of xtml file into qthelp manual file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/xhtml-qhelp.xsl

    r86286 r86612  
    1212  </xsl:text></xsl:variable>
    1313
     14  <xsl:variable name="inputFileName">
     15    <xsl:text>UserManual.xhtml</xsl:text>
     16  </xsl:variable>
     17
    1418  <xsl:template match="/">
    1519    <xsl:element name="QtHelpProject">
     
    2327      <xsl:value-of select="$newline" />
    2428      <xsl:element name="filterSection">
    25         <!-- No keywords and toc for now -->
    26         <!-- <xsl:value-of select="$newline" /> -->
    27         <!-- <xsl:element name="toc"></xsl:element> -->
    28         <!-- <xsl:value-of select="$newline" /> -->
     29        <xsl:value-of select="$newline" />
     30        <xsl:element name="toc">
     31          <xsl:apply-templates select="//xhtml:div[@class='toc']//xhtml:span[@class='chapter']"/>
     32        </xsl:element><!-- toc -->
     33        <xsl:value-of select="$newline" />
    2934        <!-- <xsl:element name="keywords"></xsl:element> -->
    3035        <xsl:value-of select="$newline" />
     
    3944          <!-- ====================single html input file========================== -->
    4045          <xsl:element name="file">
    41             <xsl:text>UserManual.xhtml</xsl:text>
     46            <xsl:value-of select="$inputFileName" />
    4247          </xsl:element>
    4348          <xsl:value-of select="$newline" />
     
    5459  </xsl:template>
    5560
     61  <!-- ===================toc related template(s)====================== -->
    5662  <xsl:template match="xhtml:span[@class='chapter']">
    57     <xsl:element name="file">
    58       <xsl:text>ch</xsl:text>
    59       <xsl:value-of select="format-number(position(), '00')"/>
    60       <xsl:text>.html</xsl:text>
     63    <xsl:element name="section">
     64      <xsl:attribute name="title">
     65        <xsl:value-of select="*" />
     66      </xsl:attribute>
     67      <xsl:attribute name="ref">
     68                    <xsl:value-of select="$inputFileName" /><xsl:value-of select="xhtml:a/@href" />
     69      </xsl:attribute>
    6170    </xsl:element>
    6271    <xsl:value-of select="$newline" />
    6372  </xsl:template>
    64 
     73  <!-- ==============================================================   -->
    6574
    6675  <xsl:template match="//xhtml:img">
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