OSDN Git Service

libjava/ChangeLog:
[pf3gnuchains/gcc-fork.git] / libjava / classpath / tools / resource / gnu / classpath / tools / gjdoc / doctranslets / html / deprecated.xsl
1 <?xml version="1.0" encoding="utf-8"?>
2
3 <!-- deprecated.xsl
4      Copyright (C) 2003 Free Software Foundation, Inc.
5      
6      This file is part of GNU Classpath.
7      
8      GNU Classpath is free software; you can redistribute it and/or modify
9      it under the terms of the GNU General Public License as published by
10      the Free Software Foundation; either version 2, or (at your option)
11      any later version.
12       
13      GNU Classpath is distributed in the hope that it will be useful, but
14      WITHOUT ANY WARRANTY; without even the implied warranty of
15      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16      General Public License for more details.
17      
18      You should have received a copy of the GNU General Public License
19      along with GNU Classpath; see the file COPYING.  If not, write to the
20      Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21      02111-1307 USA.
22      -->
23
24 <!-- Creates the deprecation information page for HTML documentation.
25      -->
26
27 <xsl:stylesheet version="1.0"
28   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
29   xmlns:gjdoc="http://www.gnu.org/software/cp-tools/gjdocxml"
30   xmlns:html="http://www.w3.org/TR/REC-html40"
31   xmlns="http://www.w3.org/TR/REC-html40">
32
33   <xsl:include href="html_common.xsl"/>
34
35   <xsl:output method="xml"
36     encoding="utf-8"
37     doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
38     doctype-system="http://www.w3.org/TR/html4/loose.dtd"
39     indent="no"/>
40
41   <xsl:strip-space elements="*"/>
42
43   <xsl:template match="gjdoc:tag[attribute::kind='@see'][attribute::name='@link']">
44     <xsl:call-template name="output_link_tag">
45       <xsl:with-param name="p_contexturl"
46         select="concat(translate(ancestor::gjdoc:classdoc/gjdoc:containingPackage/@name, '.', '/'), '/', ancestor::gjdoc:classdoc/@name,'.html')"/>
47     </xsl:call-template>
48   </xsl:template>
49
50   <xsl:template match="/">
51     <html>
52       <head>
53         <xsl:call-template name="output_title">
54           <xsl:with-param name="p_pagetitle" select="'Deprecated List'"/>
55         </xsl:call-template>
56         <xsl:call-template name="include_common"/>
57       </head>
58       <body class="classdoc" onload="if(parent.contentPageLoaded)parent.contentPageLoaded(document.title)">
59         
60         <!-- Top Navigation Bar -->
61         <xsl:call-template name="output_navbar">
62           <xsl:with-param name="p_show_frames" select="1"/>
63           <xsl:with-param name="p_show_noframes" select="1"/>
64           <xsl:with-param name="p_show_package" select="0"/>
65           <xsl:with-param name="p_show_package_tree" select="0"/>
66           <xsl:with-param name="p_show_full_tree" select="1"/>
67           <xsl:with-param name="p_show_index" select="1"/>
68           <xsl:with-param name="p_show_help" select="1"/>
69           <xsl:with-param name="p_show_deprecated" select="0"/>
70           <xsl:with-param name="p_curr_deprecated" select="1"/>
71           <xsl:with-param name="p_top" select="1"/> 
72         </xsl:call-template>
73
74         <div class="pagebody">
75
76         <h1 class="classdoc-title">Deprecated API</h1>
77
78         <xsl:choose>
79           <xsl:when test="gjdoc:rootdoc/gjdoc:hasDeprecatedInterfaces or gjdoc:rootdoc/gjdoc:hasDeprecatedClasses or gjdoc:rootdoc/gjdoc:hasDeprecatedExceptions or gjdoc:rootdoc/gjdoc:hasDeprecatedErrors or gjdoc:rootdoc/gjdoc:rootdoc/gjdoc:hasDeprecatedMethods or gjdoc:rootdoc/gjdoc:hasDeprecatedFields">
80             <div class="classdoc-tag-section-header">Contents:</div>
81             <dl class="classdoc-list">
82               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedInterfaces">
83                 <dt><a href="#interfaces">Deprecated Interfaces</a></dt>
84               </xsl:if>
85               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedClasses">
86                 <dt><a href="#classes">Deprecated Classes</a></dt>
87               </xsl:if>
88               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedExceptions">
89                 <dt><a href="#exceptions">Deprecated Exceptions</a></dt>
90               </xsl:if>
91               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedErrors">
92                 <dt><a href="#errors">Deprecated Errors</a></dt>
93               </xsl:if>
94               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedFields">
95                 <dt><a href="#fields">Deprecated Fields</a></dt>
96               </xsl:if>
97               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedMethods">
98                 <dt><a href="#methods">Deprecated Methods</a></dt>
99               </xsl:if>
100               <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedConstructors">
101                 <dt><a href="#constructors">Deprecated Constructors</a></dt>
102               </xsl:if>
103             </dl>
104           </xsl:when>
105           <xsl:otherwise>
106             <p>No parts of this API are deprecated.</p>
107           </xsl:otherwise>
108         </xsl:choose>
109
110         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedInterfaces">
111           <a name="interfaces"/>
112           <h1 class="classdoc-header">Deprecated Interfaces</h1>
113
114           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
115             <xsl:variable name="v_currentclass" select="."/>
116             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
117             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/@qualifiedtypename/..">
118               <xsl:if test="gjdoc:isInterface">
119                 <xsl:call-template name="output-deprecated-class"/>
120               </xsl:if>
121             </xsl:for-each>
122           </xsl:for-each>
123         </xsl:if>
124
125         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedClasses">
126           <a name="classes"/>
127           <h1 class="classdoc-header">Deprecated Classes</h1>
128
129           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
130             <xsl:variable name="v_currentclass" select="."/>
131             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
132             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/@qualifiedtypename/..">
133               <xsl:if test="gjdoc:isOrdinaryClass">
134                 <xsl:call-template name="output-deprecated-class"/>
135               </xsl:if>
136             </xsl:for-each>
137           </xsl:for-each>
138         </xsl:if>
139
140         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedExceptions">
141           <a name="exceptions"/>
142           <h1 class="classdoc-header">Deprecated Exceptions</h1>
143           
144           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
145             <xsl:variable name="v_currentclass" select="."/>
146             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
147             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/.">
148               <xsl:if test="gjdoc:isException">
149                 <xsl:call-template name="output-deprecated-class"/>
150               </xsl:if>
151             </xsl:for-each>
152           </xsl:for-each>
153         </xsl:if>
154
155         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedErrors">
156           <a name="errors"/>
157           <h1 class="classdoc-header">Deprecated Errors</h1>
158           
159           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
160             <xsl:variable name="v_currentclass" select="."/>
161             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
162             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/.">
163               <xsl:if test="gjdoc:isError">
164                 <xsl:call-template name="output-deprecated-class"/>
165               </xsl:if>
166             </xsl:for-each>
167           </xsl:for-each>
168         </xsl:if>
169
170         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedFields">
171           <a name="fields"/>
172           <h1 class="classdoc-header">Deprecated Fields</h1>
173
174           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
175             <xsl:variable name="v_currentclass" select="."/>
176             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
177             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/gjdoc:fielddoc/@name">
178               <xsl:call-template name="output-deprecated-member"/>
179             </xsl:for-each>
180           </xsl:for-each>
181         </xsl:if>
182
183         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedMethods">
184           <a name="methods"/>
185           <h1 class="classdoc-header">Deprecated Methods</h1>
186
187           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
188             <xsl:variable name="v_currentclass" select="."/>
189             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
190             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/gjdoc:methoddoc/@name">
191               <xsl:call-template name="output-deprecated-member"/>
192             </xsl:for-each>
193           </xsl:for-each>
194         </xsl:if>
195
196         <xsl:if test="gjdoc:rootdoc/gjdoc:hasDeprecatedConstructors">
197           <a name="constructors"/>
198           <h1 class="classdoc-header">Deprecated Constructors</h1>
199           
200           <xsl:for-each select="gjdoc:rootdoc/gjdoc:classdoc/@qualifiedtypename">
201             <xsl:variable name="v_currentclass" select="."/>
202             <xsl:variable name="v_sub_xml_filename" select="concat(.,'.xml')"/>
203             <xsl:for-each select="document($v_sub_xml_filename,/gjdoc:rootdoc)//gjdoc:classdoc[@qualifiedtypename=$v_currentclass]/gjdoc:constructordoc/@name">
204               <xsl:call-template name="output-deprecated-member"/>
205             </xsl:for-each>
206           </xsl:for-each>
207         </xsl:if>
208         <!-- Bottom Navigation Bar -->
209         <xsl:call-template name="output_navbar">
210           <xsl:with-param name="p_show_frames" select="1"/>
211           <xsl:with-param name="p_show_noframes" select="1"/>
212           <xsl:with-param name="p_show_package" select="0"/>
213           <xsl:with-param name="p_show_package_tree" select="0"/>
214           <xsl:with-param name="p_show_full_tree" select="1"/>
215           <xsl:with-param name="p_show_index" select="1"/>
216           <xsl:with-param name="p_show_help" select="1"/>
217           <xsl:with-param name="p_show_deprecated" select="0"/>
218           <xsl:with-param name="p_curr_deprecated" select="1"/>
219           <xsl:with-param name="p_top" select="0"/> 
220         </xsl:call-template>
221
222         </div>
223       </body>
224     </html>
225   </xsl:template>
226
227   <xsl:template name="output-deprecated-member">
228
229     <xsl:if test="../gjdoc:tags/gjdoc:tag[@kind='@deprecated']">
230       <dl>
231         <dt>
232           <a href="{concat($gjdoc.pathtoroot, translate(ancestor::gjdoc:classdoc/gjdoc:containingPackage/@name, '.', '/'), '/', ancestor::gjdoc:classdoc/@name, '.html#', ., ../gjdoc:signature/@full)}">
233             <xsl:value-of select="concat(ancestor::gjdoc:classdoc/@qualifiedtypename, '.', ., ../gjdoc:signature/@flat)"/>
234           </a>
235         </dt>
236         <dd>
237           <xsl:for-each select="../gjdoc:tags/gjdoc:tag[@kind='@deprecated']/gjdoc:firstSentenceTags/node()">
238             <xsl:apply-templates select="."/>
239           </xsl:for-each>
240         </dd>
241       </dl>
242     </xsl:if>
243     
244   </xsl:template>
245
246   <xsl:template name="output-deprecated-class">
247     <xsl:if test="gjdoc:tags/gjdoc:tag[@kind='@deprecated']">
248       <dl>
249         <dt>
250           <a href="{concat($gjdoc.pathtoroot, translate(gjdoc:containingPackage/@name, '.', '/'), '/', @name, '.html')}"><xsl:value-of select="@qualifiedtypename"/></a>
251         </dt>
252         <dd>
253           <xsl:for-each select="gjdoc:tags/gjdoc:tag[@kind='@deprecated']/gjdoc:firstSentenceTags/node()">
254             <xsl:apply-templates select="."/>
255           </xsl:for-each>
256         </dd>
257       </dl>
258     </xsl:if>    
259   </xsl:template>
260
261 </xsl:stylesheet>