xbuild: use the AdditionalReferencePath items to locate assemblies
[mono.git] / mcs / tools / mdoc / Resources / defaulttemplate.xsl
1 <?xml version="1.0"?>
2 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3   <xsl:output 
4     encoding="UTF-8"
5     indent="yes"
6     method="xml"
7     omit-xml-declaration="yes" 
8   />
9
10   <xsl:template match="Page">
11     <html>
12       <head>
13         <title>
14           <xsl:value-of select="Title" />
15         </title>
16         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
17         <xsl:call-template name="create-default-style" />
18         <xsl:call-template name="create-default-script" />
19       </head>
20       <body>
21         <!-- HEADER -->
22         <xsl:call-template name="create-default-collection-title" />
23         <xsl:call-template name="create-index" />
24         <xsl:call-template name="create-default-title" />
25         <xsl:call-template name="create-default-summary" />
26         <xsl:call-template name="create-default-signature" />
27         <xsl:call-template name="create-default-remarks" />
28         <xsl:call-template name="create-default-members" />
29         <hr size="1" />
30         <xsl:call-template name="create-default-copyright" />
31       </body>
32     </html>
33   </xsl:template>
34
35   <!-- IDENTITY TRANSFORMATION -->
36   <xsl:template match="@*|node()">
37     <xsl:copy>
38       <xsl:apply-templates select="@*|node()" />
39     </xsl:copy>
40   </xsl:template>
41
42   <xsl:template name="create-default-style">
43     <style>
44       a { text-decoration: none }
45
46       div.SideBar {
47         padding-left: 1em;
48         padding-right: 1em;
49         right: 0;
50         float: right;
51         border: thin solid black;
52         background-color: #f2f2f2;
53       }
54     
55       .CollectionTitle { font-weight: bold }
56       .PageTitle { font-size: 150%; font-weight: bold }
57
58       .Summary { }
59       .Signature { }          
60       .Remarks { }
61       .Members { }
62       .Copyright { }
63       
64       .Section { font-size: 125%; font-weight: bold }
65       p.Summary {
66         margin-left: 1em;
67       }
68       .SectionBox { margin-left: 2em }
69       .NamespaceName { font-size: 105%; font-weight: bold }
70       .NamespaceSumary { }
71       .MemberName { font-size: 115%; font-weight: bold; margin-top: 1em }
72       .Subsection { font-size: 105%; font-weight: bold }
73       .SubsectionBox { margin-left: 2em; margin-bottom: 1em }
74
75       .CodeExampleTable { background-color: #f5f5dd; border: thin solid black; padding: .25em; }
76       
77       .TypesListing {
78         border-collapse: collapse;
79       }
80
81       td {
82         vertical-align: top;
83       }
84       th {
85         text-align: left;
86       }
87
88       .TypesListing td { 
89         margin: 0px;  
90         padding: .25em;
91         border: solid gray 1px;
92       }
93
94       .TypesListing th { 
95         margin: 0px;  
96         padding: .25em;
97         background-color: #f2f2f2;
98         border: solid gray 1px;
99       }
100
101       div.Footer {
102         border-top: 1px solid gray;
103         margin-top: 1.5em;
104         padding-top: 0.6em;
105         text-align: center;
106         color: gray;
107       }
108
109       span.NotEntered /* Documentation for this section has not yet been entered */ {
110         font-style: italic;
111         color: red;     
112       }
113
114       div.Header {
115         background: #B0C4DE;
116         border: double;
117         border-color: white;
118         border-width: 7px;
119         padding: 0.5em;
120       }
121
122       div.Header * {
123         font-size: smaller;
124       }
125
126       div.Note {
127       }
128
129       i.ParamRef {
130       }
131
132       i.subtitle {
133       }
134
135       ul.TypeMembersIndex {
136         text-align: left;
137         background: #F8F8F8;
138       }
139
140       ul.TypeMembersIndex li {
141         display: inline;
142         margin:  0.5em;
143       }
144
145       table.HeaderTable {
146       }
147
148       table.SignatureTable {
149       }
150
151       table.Documentation, table.Enumeration, table.TypeDocumentation {
152         border-collapse: collapse;
153         width: 100%;
154       }
155
156       table.Documentation tr th, table.TypeMembers tr th, table.Enumeration tr th, table.TypeDocumentation tr th {
157         background: whitesmoke;
158         padding: 0.8em;
159         border: 1px solid gray;
160         text-align: left;
161         vertical-align: bottom;
162       }
163
164       table.Documentation tr td, table.TypeMembers tr td, table.Enumeration tr td, table.TypeDocumentation tr td {
165         padding: 0.5em;
166         border: 1px solid gray;
167         text-align: left;
168         vertical-align: top;
169       }
170
171       table.TypeMembers {
172         border: 1px solid #C0C0C0;
173         width: 100%;
174       }
175
176       table.TypeMembers tr td {
177         background: #F8F8F8;
178         border: white;
179       }
180
181       table.Documentation {
182       }
183
184       table.TypeMembers {
185       }
186
187       div.CodeExample {
188         width: 100%;
189         border: 1px solid #DDDDDD;
190         background-color: #F8F8F8;
191       }
192
193       div.CodeExample p {
194         margin: 0.5em;
195         border-bottom: 1px solid #DDDDDD;
196       }
197
198       div.CodeExample div {
199         margin: 0.5em;
200       }
201
202       h4 {
203         margin-bottom: 0;
204       }
205
206       div.Signature {
207         border: 1px solid #C0C0C0;
208         background: #F2F2F2;
209         padding: 1em;
210       }
211     </style>
212   </xsl:template>
213
214   <xsl:template name="create-default-script">
215     <script type="text/JavaScript">
216       function toggle_display (block) {
217         var w = document.getElementById (block);
218         var t = document.getElementById (block + ":toggle");
219         if (w.style.display == "none") {
220           w.style.display = "block";
221           t.innerHTML = "⊟";
222         } else {
223           w.style.display = "none";
224           t.innerHTML = "⊞";
225         }
226       }
227     </script>
228   </xsl:template>
229
230   <xsl:template name="create-index">
231     <xsl:if test="
232         count(PageTitle/@id) &gt; 0 and 
233         count(Signature/@id) &gt; 0 and
234         count(Remarks/@id) &gt; 0 and
235         count(Members/@id) &gt; 0
236         ">
237       <div class="SideBar">
238         <p>
239           <a>
240             <xsl:attribute name="href">
241               <xsl:text>#</xsl:text>
242               <xsl:value-of select="PageTitle/@id" />
243             </xsl:attribute>
244             <xsl:text>Overview</xsl:text>
245           </a>
246         </p>
247         <p>
248           <a>
249             <xsl:attribute name="href">
250               <xsl:text>#</xsl:text>
251               <xsl:value-of select="Signature/@id" />
252             </xsl:attribute>
253             <xsl:text>Signature</xsl:text>
254           </a>
255         </p>
256         <p>
257           <a>
258             <xsl:attribute name="href">
259               <xsl:text>#</xsl:text>
260               <xsl:value-of select="Remarks/@id" />
261             </xsl:attribute>
262             <xsl:text>Remarks</xsl:text>
263           </a>
264         </p>
265         <p>
266           <a href="#Members">Members</a>
267         </p>
268         <p>
269           <a>
270             <xsl:attribute name="href">
271               <xsl:text>#</xsl:text>
272               <xsl:value-of select="Members/@id" />
273             </xsl:attribute>
274             <xsl:text>Member Details</xsl:text>
275           </a>
276         </p>
277       </div>
278     </xsl:if>
279   </xsl:template>
280
281   <xsl:template name="create-default-collection-title">
282     <div class="CollectionTitle">
283       <xsl:apply-templates select="CollectionTitle/node()" />
284     </div>
285   </xsl:template>
286
287   <xsl:template name="create-default-title">
288     <h1 class="PageTitle">
289       <xsl:if test="count(PageTitle/@id) &gt; 0">
290         <xsl:attribute name="id">
291           <xsl:value-of select="PageTitle/@id" />
292         </xsl:attribute>
293       </xsl:if>
294       <xsl:apply-templates select="PageTitle/node()" />
295     </h1>
296   </xsl:template>
297
298   <xsl:template name="create-default-summary">
299     <p class="Summary">
300       <xsl:if test="count(Summary/@id) &gt; 0">
301         <xsl:attribute name="id">
302           <xsl:value-of select="Summary/@id" />
303         </xsl:attribute>
304       </xsl:if>
305       <xsl:apply-templates select="Summary/node()" />
306     </p>
307   </xsl:template>
308
309   <xsl:template name="create-default-signature">
310     <div>
311       <xsl:if test="count(Signature/@id) &gt; 0">
312         <xsl:attribute name="id">
313           <xsl:value-of select="Signature/@id" />
314         </xsl:attribute>
315       </xsl:if>
316       <xsl:apply-templates select="Signature/node()" />
317     </div>
318   </xsl:template>
319
320   <xsl:template name="create-default-remarks">
321     <div class="Remarks">
322       <xsl:if test="count(Remarks/@id) &gt; 0">
323         <xsl:attribute name="id">
324           <xsl:value-of select="Remarks/@id" />
325         </xsl:attribute>
326       </xsl:if>
327       <xsl:apply-templates select="Remarks/node()" />
328     </div>
329   </xsl:template>
330
331   <xsl:template name="create-default-members">
332     <div class="Members">
333       <xsl:if test="count(Members/@id) &gt; 0">
334         <xsl:attribute name="id">
335           <xsl:value-of select="Members/@id" />
336         </xsl:attribute>
337       </xsl:if>
338       <xsl:apply-templates select="Members/node()" />
339     </div>
340   </xsl:template>
341
342   <xsl:template name="create-default-copyright">
343     <div class="Copyright">
344       <xsl:apply-templates select="Copyright/node()" />
345     </div>
346   </xsl:template>
347 </xsl:stylesheet>