|
47 | 47 | </b> |
48 | 48 | </p> |
49 | 49 | <ul class="- topic/ul "> |
50 | | - <xsl:for-each select="basecompoundref"> |
| 50 | + <xsl:for-each select="basecompoundref[starts-with(@refid, 'interface')]"> |
| 51 | + <li class="- topic/li "> |
| 52 | + <xsl:call-template name="add-link"> |
| 53 | + <xsl:with-param name="type" select="'topic'"/> |
| 54 | + <xsl:with-param name="href" select="concat('#', dita-ot:name-to-id(.))"/> |
| 55 | + <xsl:with-param name="text" select="."/> |
| 56 | + </xsl:call-template> |
| 57 | + </li> |
| 58 | + </xsl:for-each> |
| 59 | + </ul> |
| 60 | + </xsl:if> |
| 61 | + <xsl:if test="not(starts-with(basecompoundref/@refid, 'interface'))"> |
| 62 | + <p class="- topic/p "> |
| 63 | + <b class="+ topic/ph hi-d/b "> |
| 64 | + <xsl:text>Direct Base Classes:</xsl:text> |
| 65 | + </b> |
| 66 | + </p> |
| 67 | + <ul class="- topic/ul "> |
| 68 | + <xsl:for-each select="basecompoundref[not(starts-with(@refid, 'interface'))]"> |
51 | 69 | <li class="- topic/li "> |
52 | 70 | <xsl:call-template name="add-link"> |
53 | 71 | <xsl:with-param name="type" select="'topic'"/> |
54 | | - <xsl:with-param name="href" select="concat('#', .)"/> |
| 72 | + <xsl:with-param name="href" select="concat('#', dita-ot:name-to-id(.))"/> |
55 | 73 | <xsl:with-param name="text" select="."/> |
56 | 74 | </xsl:call-template> |
57 | 75 | </li> |
|
70 | 88 | <li class="- topic/li "> |
71 | 89 | <xsl:call-template name="add-link"> |
72 | 90 | <xsl:with-param name="type" select="'topic'"/> |
73 | | - <xsl:with-param name="href" select="concat('#', encode-for-uri(.))"/> |
| 91 | + <xsl:with-param name="href" select="concat('#', dita-ot:name-to-id(.))"/> |
74 | 92 | <xsl:with-param name="text" select="."/> |
75 | 93 | </xsl:call-template> |
76 | 94 | </li> |
|
83 | 101 | <xsl:value-of select="concat(@prot, ' class ')"/> |
84 | 102 | <b class="+ topic/ph hi-d/b "><xsl:value-of select="replace(compoundname,'^.*::','')"/></b> |
85 | 103 | <xsl:choose> |
86 | | - <xsl:when test="basecompoundref/@refid"> |
| 104 | + <xsl:when test="basecompoundref"> |
87 | 105 | <xsl:text> extends </xsl:text> |
88 | 106 |
|
89 | 107 | <xsl:for-each select="basecompoundref"> |
90 | 108 | <xsl:variable name="extends" select="@refid"/> |
91 | | - <xsl:variable name="extends-name" select="//compounddef[@id=$extends]/compoundname"/> |
92 | | - <xsl:if test="$extends-name"> |
93 | | - |
94 | | - <xsl:call-template name="add-link"> |
95 | | - <xsl:with-param name="type" select="'topic'"/> |
96 | | - <xsl:with-param |
97 | | - name="href" |
98 | | - select="concat('#', dita-ot:name-to-id($extends-name))" |
99 | | - /> |
100 | | - <xsl:with-param name="text" select="replace(.,'^.*\.','')"/> |
101 | | - </xsl:call-template> |
102 | | - </xsl:if> |
| 109 | + <xsl:variable name="extends-name" select="text()"/> |
| 110 | + <xsl:choose> |
| 111 | + <xsl:when test="$extends-name"> |
| 112 | + <xsl:call-template name="add-link"> |
| 113 | + <xsl:with-param name="type" select="'topic'"/> |
| 114 | + <xsl:with-param |
| 115 | + name="href" |
| 116 | + select="concat('#', dita-ot:name-to-id($extends-name))" |
| 117 | + /> |
| 118 | + <xsl:with-param name="text" select="replace(.,'^.*\.','')"/> |
| 119 | + </xsl:call-template> |
| 120 | + </xsl:when> |
| 121 | + <xsl:otherwise> |
| 122 | + <xsl:value-of select="."/> |
| 123 | + </xsl:otherwise> |
| 124 | + |
| 125 | + </xsl:choose> |
103 | 126 | <xsl:if test="count(basecompoundref) > 1"> |
104 | 127 | <xsl:text> </xsl:text> |
105 | 128 | </xsl:if> |
106 | 129 | </xsl:for-each> |
107 | 130 | </xsl:when> |
108 | | - <xsl:when test="basecompoundref"> |
109 | | - <xsl:value-of select="concat(' extends ', basecompoundref)"/> |
110 | | - </xsl:when> |
111 | 131 | </xsl:choose> |
112 | 132 | </codeblock> |
| 133 | + <xsl:call-template name="parse-brief-description"/> |
113 | 134 | <xsl:call-template name="parse-detailed-description"/> |
114 | 135 |
|
| 136 | + <xsl:if test="sectiondef/memberdef[@kind='typedef' and @prot='public']"> |
| 137 | + <!-- Class typedef Summary --> |
| 138 | + <section class="- topic/section " outputclass="typedefs_summary"> |
| 139 | + <title class="- topic/title "> |
| 140 | + <xsl:text>Types Summary</xsl:text> |
| 141 | + </title> |
| 142 | + <xsl:call-template name="add-typedefs-summary"/> |
| 143 | + </section> |
| 144 | + </xsl:if> |
115 | 145 | <xsl:if test="sectiondef[contains(@kind,'-attrib')]/memberdef[@kind='variable' and @prot='public']"> |
116 | 146 | <!-- Class Field Summary --> |
117 | 147 | <section class="- topic/section " outputclass="fields_summary"> |
|
143 | 173 | <xsl:call-template name="add-inherited-method-summary"/> |
144 | 174 | </section> |
145 | 175 |
|
| 176 | + <xsl:if test="sectiondef/memberdef[@kind='typedef'and @prot='public']"> |
| 177 | + <!-- typedef Detail --> |
| 178 | + <section class="- topic/section " outputclass="typedefs"> |
| 179 | + <xsl:attribute name="id"> |
| 180 | + <xsl:value-of select="concat(compoundname, '_typedefs')"/> |
| 181 | + </xsl:attribute> |
| 182 | + <title class="- topic/title "> |
| 183 | + <xsl:text>Types Detail</xsl:text> |
| 184 | + </title> |
| 185 | + <xsl:apply-templates |
| 186 | + select="sectiondef/memberdef[@kind='typedef' and @prot='public']" |
| 187 | + mode="typedef" |
| 188 | + > |
| 189 | + <xsl:sort select="@id"/> |
| 190 | + </xsl:apply-templates> |
| 191 | + </section> |
| 192 | + </xsl:if> |
| 193 | + |
| 194 | + |
146 | 195 | <xsl:if test="sectiondef[contains(@kind,'-attrib')]/memberdef[@kind='variable'and @prot='public']"> |
147 | 196 | <!-- field Detail --> |
148 | 197 | <section class="- topic/section " outputclass="fields"> |
|
262 | 311 | <xsl:value-of select="$constructor"/> |
263 | 312 | <xsl:call-template name="add-signature"/> |
264 | 313 | </codeblock> |
| 314 | + <xsl:call-template name="parse-brief-description"/> |
265 | 315 | <xsl:choose> |
266 | | - <xsl:when test="detaileddescription/node()"> |
| 316 | + <xsl:when test="detaileddescription/node()"> |
267 | 317 | <xsl:call-template name="parse-detailed-description"/> |
268 | 318 | </xsl:when> |
269 | | - <xsl:otherwise> |
270 | | - <xsl:call-template name="parse-brief-description"/> |
271 | | - </xsl:otherwise> |
272 | 319 | </xsl:choose> |
273 | 320 | <xsl:call-template name="parameter-description"/> |
274 | 321 | </xsl:variable> |
|
369 | 416 | </xsl:call-template> |
370 | 417 | <xsl:value-of select="concat(' ',$field)"/> |
371 | 418 | </codeph> |
| 419 | + <xsl:call-template name="parse-brief-description"/> |
372 | 420 | <xsl:call-template name="parse-detailed-description"/> |
373 | 421 | </xsl:variable> |
374 | 422 |
|
|
388 | 436 | </table> |
389 | 437 | <p class="- topic/p "/> |
390 | 438 | </xsl:template> |
| 439 | + |
| 440 | + |
| 441 | + <!-- |
| 442 | + Typedefs Summary |
| 443 | + --> |
| 444 | + <xsl:template name="add-typedefs-summary"> |
| 445 | + <table class="- topic/table " outputclass="typedefs_summary"> |
| 446 | + <tgroup class="- topic/tgroup " cols="2"> |
| 447 | + <colspec class="- topic/colspec " colname="c1" colnum="1" colwidth="25%"/> |
| 448 | + <colspec class="- topic/colspec " colname="c2" colnum="2" colwidth="75%"/> |
| 449 | + <thead class="- topic/thead "> |
| 450 | + <row class="- topic/row "> |
| 451 | + <entry class="- topic/entry " colname="c1" align="left"> |
| 452 | + <xsl:text>Name</xsl:text> |
| 453 | + </entry> |
| 454 | + <entry class="- topic/entry " colname="c2" align="left"> |
| 455 | + <xsl:text>Description</xsl:text> |
| 456 | + </entry> |
| 457 | + </row> |
| 458 | + </thead> |
| 459 | + <tbody class="- topic/tbody "> |
| 460 | + <xsl:for-each select="sectiondef/memberdef[@kind='typedef' and @prot='public']"> |
| 461 | + <xsl:sort select="name"/> |
| 462 | + <xsl:variable name="field" select="name"/> |
| 463 | + <row class="- topic/row "> |
| 464 | + <entry class="- topic/entry " colname="c1" align="left"> |
| 465 | + <codeph class="+ topic/ph pr-d/codeph "> |
| 466 | + <xsl:attribute name="xtrc" select="concat('codeph:',generate-id(.),'3')"/> |
| 467 | + <xsl:call-template name="add-link"> |
| 468 | + <xsl:with-param name="type" select="'table'"/> |
| 469 | + <xsl:with-param name="href"> |
| 470 | + <xsl:value-of |
| 471 | + select="concat('#', dita-ot:name-to-id(ancestor::compounddef/compoundname), '/typedefs_', $field)" |
| 472 | + /> |
| 473 | + <xsl:if test="count(../memberdef[name=$field])>1"> |
| 474 | + <xsl:value-of select="count(following-sibling::memberdef[name=$field])"/> |
| 475 | + </xsl:if> |
| 476 | + </xsl:with-param> |
| 477 | + <xsl:with-param name="text" select="$field"/> |
| 478 | + </xsl:call-template> |
| 479 | + </codeph> |
| 480 | + </entry> |
| 481 | + <entry class="- topic/entry " colname="c2" align="left"> |
| 482 | + <xsl:if test="normalize-space(briefdescription)!=''"> |
| 483 | + <xsl:value-of select="concat (' - ', briefdescription)"/> |
| 484 | + </xsl:if> |
| 485 | + </entry> |
| 486 | + </row> |
| 487 | + </xsl:for-each> |
| 488 | + </tbody> |
| 489 | + </tgroup> |
| 490 | + </table> |
| 491 | + </xsl:template> |
| 492 | + |
| 493 | + |
| 494 | + <!-- |
| 495 | + typedef Details |
| 496 | + --> |
| 497 | + <xsl:template match="memberdef" mode="typedef"> |
| 498 | + <xsl:variable name="field" select="name"/> |
| 499 | + <xsl:variable name="field_details"> |
| 500 | + <codeph class="+ topic/ph pr-d/codeph "> |
| 501 | + <xsl:attribute name="xtrc" select="concat('codeph:',generate-id(.),'5')"/> |
| 502 | + <xsl:value-of select="concat(' ',./definition)"/> |
| 503 | + </codeph> |
| 504 | + <xsl:call-template name="parse-brief-description"/> |
| 505 | + <xsl:call-template name="parse-detailed-description"/> |
| 506 | + </xsl:variable> |
| 507 | + |
| 508 | + <table class="- topic/table " outputclass="typedef_details"> |
| 509 | + <xsl:attribute name="id"> |
| 510 | + <xsl:value-of select="concat('typedefs_',$field)"/> |
| 511 | + <xsl:if test="count(../memberdef[name=$field])>1"> |
| 512 | + <xsl:value-of select="count(following-sibling::memberdef[name=$field])"/> |
| 513 | + </xsl:if> |
| 514 | + </xsl:attribute> |
| 515 | + <xsl:call-template name="mini-table"> |
| 516 | + <xsl:with-param name="header"> |
| 517 | + <xsl:value-of select="$field"/> |
| 518 | + </xsl:with-param> |
| 519 | + <xsl:with-param name="body" select="$field_details"/> |
| 520 | + </xsl:call-template> |
| 521 | + </table> |
| 522 | + <p class="- topic/p "/> |
| 523 | + </xsl:template> |
| 524 | + |
| 525 | + |
| 526 | + |
| 527 | + |
391 | 528 | </xsl:stylesheet> |
0 commit comments