/Docs/minko-docs/class-summary.xslt

https://bitbucket.org/HopeSky/mars_nd2d · Extensible Stylesheet Language Transformations · 204 lines · 201 code · 3 blank · 0 comment · 0 complexity · 35b1e3814a766b2f75709829a9ccaddf MD5 · raw file

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. ADOBE SYSTEMS INCORPORATED
  4. Copyright 2008 Adobe Systems Incorporated
  5. All Rights Reserved.
  6. NOTICE: Adobe permits you to use, modify, and distribute this file
  7. in accordance with the terms of the license agreement accompanying it.
  8. -->
  9. <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://sf.net/saxon" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ifn="urn:internal:functions"
  10. exclude-result-prefixes="saxon xs ifn">
  11. <xsl:import href="asdoc-util.xslt"/>
  12. <xsl:output encoding="UTF-8" method="html" use-character-maps="disable"/>
  13. <xsl:param name="localTitle" select="$localTitle"/>
  14. <xsl:variable name="title" select="concat($asdoc_terms/row[entry[1][p/text() = $localTitle]]/entry[2]/p,' - ',$title-base)"/>
  15. <xsl:param name="overviewsFile" select="'overviews.xml'"/>
  16. <xsl:param name="ditaFileDir" select="''"/>
  17. <xsl:param name="packages_map_name" select="packagemap.xml"/>
  18. <xsl:param name="filter" select="$filter"/>
  19. <xsl:param name="outfile" select="'class-summary'"/>
  20. <xsl:variable name="useFilter">
  21. <xsl:if test="contains($filter,'*')">
  22. <xsl:value-of select="substring-before($filter,'*')"/>
  23. </xsl:if>
  24. <xsl:if test="not(contains($filter,'*'))">
  25. <xsl:value-of select="$filter"/>
  26. </xsl:if>
  27. </xsl:variable>
  28. <xsl:template match="/">
  29. <xsl:copy-of select="$noLiveDocs"/>
  30. <xsl:copy-of select="$docType"/>
  31. <xsl:element name="html">
  32. <head>
  33. <title>
  34. <xsl:value-of select="$asdoc_terms/row[entry[1][p/text() = $localTitle]]/entry[2]/p"/>
  35. <xsl:call-template name="getPageTitlePostFix"/>
  36. </title>
  37. <xsl:call-template name="getStyleLink">
  38. <xsl:with-param name="link" select="asdoc/link"/>
  39. </xsl:call-template>
  40. </head>
  41. <xsl:element name="body">
  42. <xsl:if test="$isEclipse">
  43. <xsl:attribute name="class">
  44. <xsl:text>eclipseBody</xsl:text>
  45. </xsl:attribute>
  46. </xsl:if>
  47. <xsl:call-template name="getTitleScript">
  48. <xsl:with-param name="title" select="$title"/>
  49. </xsl:call-template>
  50. <xsl:call-template name="getLinks2">
  51. <xsl:with-param name="subTitle">
  52. <xsl:call-template name="search-and-replace">
  53. <xsl:with-param name="input" select="$asdoc_terms/row[entry[1][p/text() = $localTitle]]/entry[2]/p"/>
  54. <xsl:with-param name="search-string" select="' '"/>
  55. <xsl:with-param name="replace-string" select="$nbsp"/>
  56. </xsl:call-template>
  57. </xsl:with-param>
  58. <xsl:with-param name="fileName" select="$outfile"/>
  59. <xsl:with-param name="showProperties" select="false()"/>
  60. <xsl:with-param name="showMethods" select="false()"/>
  61. <xsl:with-param name="showAllClasses" select="false()"/>
  62. </xsl:call-template>
  63. <div class="MainContent">
  64. <br/>
  65. <xsl:variable name="overviews" select="document($overviewsFile)/overviews"/>
  66. <p>
  67. <xsl:choose>
  68. <xsl:when test="starts-with($useFilter,'mx.')">
  69. <xsl:value-of disable-output-escaping="yes" select="$overviews/mx-classes/description/."/>
  70. </xsl:when>
  71. <xsl:when test="starts-with($useFilter,'flash.')">
  72. <xsl:value-of disable-output-escaping="yes" select="$overviews/flash-classes/description/."/>
  73. </xsl:when>
  74. <xsl:otherwise>
  75. <xsl:value-of disable-output-escaping="yes" select="$overviews/all-classes/description/."/>
  76. </xsl:otherwise>
  77. </xsl:choose>
  78. </p>
  79. <xsl:for-each select="$overviews/all-classes">
  80. <xsl:call-template name="sees">
  81. <xsl:with-param name="xrefId" select="'all-classes'"/>
  82. </xsl:call-template>
  83. </xsl:for-each>
  84. <br/>
  85. <table cellpadding="3" cellspacing="0" class="summaryTable">
  86. <tr>
  87. <th>
  88. <xsl:value-of select="$nbsp"/>
  89. </th>
  90. <th width="20%">
  91. <xsl:value-of select="$asdoc_terms/row[entry[1][p/text() = 'ClassClass']]/entry[2]/p"/>
  92. </th>
  93. <th width="20%">
  94. <xsl:value-of select="$asdoc_terms/row[entry[1][p/text() = 'PackagePackage']]/entry[2]/p"/>
  95. </th>
  96. <th width="60%">
  97. <xsl:value-of select="$asdoc_terms/row[entry[1][p/text() = 'Description']]/entry[2]/p"/>
  98. </th>
  99. </tr>
  100. <xsl:for-each select="allClasses/apiPackage//apiClassifier[starts-with(../apiName,$useFilter) or ($useFilter='flash.' and ../apiName='__Global__')]">
  101. <xsl:sort select="./apiName" order="ascending" data-type="text" lang="en-US"/>
  102. <xsl:variable name="name" select="./apiName"/>
  103. <xsl:variable name="packageName" select="../apiName"/>
  104. <xsl:variable name="classPath">
  105. <xsl:choose>
  106. <xsl:when test="$packageName='__Global__'">
  107. <xsl:value-of select="'.'"/>
  108. </xsl:when>
  109. <xsl:otherwise>
  110. <xsl:value-of select="translate($packageName,'.','/') "/>
  111. </xsl:otherwise>
  112. </xsl:choose>
  113. </xsl:variable>
  114. <tr class="prow{position() mod 2}">
  115. <td class="summaryTablePaddingCol">
  116. <xsl:value-of select="$nbsp"/>
  117. </td>
  118. <td class="summaryTableSecondCol">
  119. <xsl:choose>
  120. <xsl:when test="$classPath">
  121. <a href="{$classPath}/{$name}.html">
  122. <xsl:if test="./apiClassifierDetail/apiClassifierDef/apiInterface">
  123. <i>
  124. <xsl:value-of select="$name"/>
  125. <xsl:if test="prolog/asMetadata/apiVersion/apiPlatform[@name='AIR'] and not (prolog/asMetadata/apiVersion/apiPlatform[@name='Flash'])">
  126. <xsl:value-of select="$nbsp"/>
  127. <img src="images/AirIcon12x12.gif" width="12" height="12" hspace="0" vspace="0"/>
  128. </xsl:if>
  129. </i>
  130. </xsl:if>
  131. <xsl:if test="not(./apiClassifierDetail/apiClassifierDef/apiInterface)">
  132. <xsl:value-of select="$name"/>
  133. <xsl:if test="prolog/asMetadata/apiVersion/apiPlatform[@name='AIR'] and not (prolog/asMetadata/apiVersion/apiPlatform[@name='Flash'])">
  134. <xsl:value-of select="$nbsp"/>
  135. <img src="images/AirIcon12x12.gif" width="12" height="12" hspace="0" vspace="0"/>
  136. </xsl:if>
  137. </xsl:if>
  138. </a>
  139. <br/>
  140. </xsl:when>
  141. <xsl:otherwise>
  142. <a href="{$classPath}/{$name}.html">
  143. <xsl:if test="apiClassifier[./apiClassifierDetail/apiClassifierDef/apiInterface]">
  144. <i>
  145. <xsl:value-of select="$name"/>
  146. <xsl:if test="prolog/asMetadata/apiVersion/apiPlatform[@name='AIR'] and not (prolog/asMetadata/apiVersion/apiPlatform[@name='Flash'])">
  147. <xsl:value-of select="$nbsp"/>
  148. <img src="images/AirIcon12x12.gif" width="12" height="12" hspace="0" vspace="0"/>
  149. </xsl:if>
  150. </i>
  151. </xsl:if>
  152. <xsl:if test="apiClassifier[not(./apiClassifierDetail/apiClassifierDef/apiInterface)]">
  153. <xsl:value-of select="$name"/>
  154. <xsl:if test="prolog/asMetadata/apiVersion/apiPlatform[@name='AIR'] and not (prolog/asMetadata/apiVersion/apiPlatform[@name='Flash'])">
  155. <xsl:value-of select="$nbsp"/>
  156. <img src="images/AirIcon12x12.gif" width="12" height="12" hspace="0" vspace="0"/>
  157. </xsl:if>
  158. </xsl:if>
  159. </a>
  160. <br/>
  161. </xsl:otherwise>
  162. </xsl:choose>
  163. </td>
  164. <td class="summaryTableCol">
  165. <xsl:if test="$classPath and string-length(normalize-space($classPath)) &gt; 0 and not($classPath='.')">
  166. <a href="{$classPath}/package-detail.html" onclick="javascript:loadClassListFrame('{$classPath}/class-list.html');">
  167. <xsl:value-of select="$packageName"/>
  168. </a>
  169. </xsl:if>
  170. <xsl:if test="not($classPath) or string-length(normalize-space($classPath)) = 0 or $classPath='.'">
  171. <a href="package-detail.html" onclick="javascript:loadClassListFrame('class-list.html');">
  172. <xsl:value-of select="$asdoc_terms/row[entry[1][p/text() = 'TopLevel']]/entry[2]/p"/>
  173. </a>
  174. </xsl:if>
  175. </td>
  176. <td class="summaryTableLastCol">
  177. <xsl:if test="deprecated">
  178. <xsl:apply-templates select="deprecated"/>
  179. </xsl:if>
  180. <xsl:if test="not(deprecated)">
  181. <xsl:if test="string-length(normalize-space(./shortdesc)) &gt; 0">
  182. <xsl:value-of select="./shortdesc" disable-output-escaping="yes"/>
  183. </xsl:if>
  184. <xsl:if test="not(string-length(normalize-space(./shortdesc)) &gt; 0)">
  185. <xsl:value-of select="$nbsp"/>
  186. </xsl:if>
  187. </xsl:if>
  188. </td>
  189. </tr>
  190. </xsl:for-each>
  191. </table>
  192. <p/>
  193. <center class="copyright">
  194. <xsl:copy-of select="$copyright"/>
  195. </center>
  196. </div>
  197. </xsl:element>
  198. </xsl:element>
  199. <xsl:copy-of select="$copyrightComment"/>
  200. </xsl:template>
  201. </xsl:stylesheet>