PageRenderTime 29ms CodeModel.GetById 17ms app.highlight 10ms RepoModel.GetById 0ms app.codeStats 0ms

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