Ticket #1192: doxygen2boostbook.patch

File doxygen2boostbook.patch, 6.6 KB (added by Steven Watanabe, 15 years ago)
  • doxygen2boostbook.xsl

     
    183183    <xsl:param name="in-file"/>
    184184    <xsl:param name="with-namespace-refs"/>
    185185
    186     <xsl:if test="contains(string(location/attribute::file),
    187                            concat('/', $in-file)) ">
     186    <xsl:if test="string(location/attribute::file)=$in-file">
    188187   
    189188      <!-- The short name of this class -->
    190189      <xsl:variable name="name-with-spec">
     
    239238
    240239        <xsl:apply-templates select="briefdescription" mode="passthrough"/>
    241240        <xsl:apply-templates select="detaileddescription" mode="passthrough"/>
    242         <xsl:apply-templates/>
     241        <xsl:apply-templates>
     242          <xsl:with-param name="in-file" select="$in-file"/> 
     243        </xsl:apply-templates>
    243244      </xsl:element>
    244245    </xsl:if>
    245246  </xsl:template>
     
    247248  <xsl:template name="enum">
    248249    <xsl:param name="in-file"/>
    249250
    250     <xsl:if test="contains(string(location/attribute::file),
    251                            concat('/', $in-file))">
     251    <xsl:if test="string(location/attribute::file)=$in-file">
    252252      <xsl:variable name="name">
    253253        <xsl:call-template name="strip-qualifiers">
    254254          <xsl:with-param name="name" select="name"/>
     
    348348        <xsl:apply-templates mode="toplevel">
    349349          <xsl:with-param name="with-namespace-refs"
    350350            select="innernamespace"/>
    351           <xsl:with-param name="in-file" select="string(compoundname)"/>
     351          <xsl:with-param name="in-file" select="location/attribute::file"/>
    352352        </xsl:apply-templates>
    353353      </header>
    354354    </xsl:if>
     
    460460      </xsl:when>
    461461
    462462      <xsl:when test="@kind='function'">
    463         <xsl:call-template name="function" />
     463        <xsl:call-template name="function">
     464          <xsl:with-param name="in-file" select="$in-file"/>
     465        </xsl:call-template>
    464466      </xsl:when>
    465467
    466468      <xsl:when test="@kind='typedef'">
    467         <xsl:call-template name="typedef" />
     469        <xsl:call-template name="typedef">
     470          <xsl:with-param name="in-file" select="$in-file"/>
     471        </xsl:call-template>
    468472      </xsl:when>
    469473
    470474      <xsl:otherwise>
     
    601605        <method-group name="public static functions">
    602606          <xsl:apply-templates>
    603607            <xsl:with-param name="in-section" select="true()"/>
     608            <xsl:with-param name="in-file" select="$in-file"/>
    604609          </xsl:apply-templates>
    605610        </method-group>
    606611      </xsl:when>
     
    609614        <method-group name="protected static functions">
    610615          <xsl:apply-templates>
    611616            <xsl:with-param name="in-section" select="true()"/>
     617            <xsl:with-param name="in-file" select="$in-file"/>
    612618          </xsl:apply-templates>
    613619        </method-group>
    614620      </xsl:when>
     
    617623        <method-group name="private static functions">
    618624          <xsl:apply-templates>
    619625            <xsl:with-param name="in-section" select="true()"/>
     626            <xsl:with-param name="in-file" select="$in-file"/>
    620627          </xsl:apply-templates>
    621628        </method-group>
    622629      </xsl:when>
    623630      <xsl:when test="@kind='public-func'">
    624631        <xsl:variable name="members" select="./memberdef"/>
    625632        <xsl:variable name="num-internal-only">
    626           <xsl:value-of 
     633          <xsl:value-of
    627634            select="count($members[contains(detaileddescription/para,
    628635                                  'INTERNAL ONLY')])"/>
    629636        </xsl:variable>
     
    631638          <method-group name="public member functions">
    632639            <xsl:apply-templates>
    633640              <xsl:with-param name="in-section" select="true()"/>
     641              <xsl:with-param name="in-file" select="$in-file"/>
    634642            </xsl:apply-templates>
    635643          </method-group>
    636644          <xsl:apply-templates/>
     
    640648        <method-group name="protected member functions">
    641649          <xsl:apply-templates>
    642650            <xsl:with-param name="in-section" select="true()"/>
     651            <xsl:with-param name="in-file" select="$in-file"/>
    643652          </xsl:apply-templates>
    644653        </method-group>
    645654        <xsl:apply-templates/>
     
    655664          <method-group name="private member functions">
    656665            <xsl:apply-templates>
    657666              <xsl:with-param name="in-section" select="true()"/>
     667              <xsl:with-param name="in-file" select="$in-file"/>
    658668            </xsl:apply-templates>
    659669          </method-group>
    660670        </xsl:if>
    661671        <xsl:apply-templates/>
    662672      </xsl:when>
    663673      <xsl:when test="@kind='public-static-attrib' or @kind='public-attrib'">
    664         <xsl:apply-templates/>
     674        <xsl:apply-templates>
     675          <xsl:with-param name="in-file" select="$in-file"/>
     676        </xsl:apply-templates>
    665677      </xsl:when>
    666678      <xsl:when test="@kind='public-type'">
    667         <xsl:apply-templates/>
     679        <xsl:apply-templates>
     680          <xsl:with-param name="in-file" select="$in-file"/>
     681        </xsl:apply-templates>
    668682      </xsl:when>
    669683      <xsl:when test="@kind='func'">
    670684        <xsl:apply-templates>
     
    687701        </xsl:apply-templates>
    688702      </xsl:when>
    689703      <xsl:when test="@kind='user-defined'">
    690         <xsl:apply-templates/>
     704        <xsl:apply-templates>
     705          <xsl:with-param name="in-file" select="$in-file"/>
     706        </xsl:apply-templates>
    691707      </xsl:when>
    692708      <xsl:when test="@kind=''">
    693709        <xsl:apply-templates select="memberdef[generate-id() =
     
    791807  <xsl:template name="typedef">
    792808    <xsl:param name="in-file" select="''"/>
    793809
    794     <xsl:if test="contains(string(location/attribute::file),
    795                            concat('/', $in-file))">
     810    <xsl:if test="string(location/attribute::file)=$in-file">
    796811      <!-- TBD: Handle public/protected/private -->
    797812      <typedef>
    798813        <!-- Name of the type -->
     
    921936
    922937    <xsl:variable name="firstpara"
    923938      select="normalize-space(detaileddescription/para[1])"/>
    924     <xsl:if test="contains(string(location/attribute::file),
    925                            concat('/', $in-file))
     939    <xsl:if test="string(location/attribute::file)=$in-file
    926940                  and
    927941                  not($firstpara=normalize-space($boost.doxygen.overload))">
    928942
     
    10961110  <!-- Handle member variables -->
    10971111  <xsl:template name="variable">
    10981112    <xsl:param name="in-file"/>
    1099     <xsl:if test="contains(string(location/attribute::file),
    1100                            concat('/', $in-file))">
     1113    <xsl:if test="string(location/attribute::file)=$in-file">
    11011114    <data-member>
    11021115      <xsl:attribute name="name">
    11031116        <xsl:value-of select="name/text()"/>