Project

General

Profile

1
<!--
2
 |
3
 | XSLT REC Compliant Version of IE5 Default Stylesheet
4
 |
5
 | Original version by Jonathan Marsh (jmarsh@microsoft.com)
6
 | http://msdn.microsoft.com/xml/samples/defaultss/defaultss.xsl
7
 |
8
 | Conversion to XSLT 1.0 REC Syntax by Steve Muench (smuench@oracle.com)
9
 |
10
 +-->
11
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
12
   <xsl:output indent="no" method="html"/>
13

    
14
   <xsl:template match="/">
15
      <HTML>
16
<HEAD>
17
<SCRIPT>
18
   <xsl:comment><![CDATA[
19
      function f(e){
20
         if (e.className=="ci") {
21
          if (e.children(0).innerText.indexOf("\n")>0) fix(e,"cb");
22
         }
23
         if (e.className=="di") {
24
          if (e.children(0).innerText.indexOf("\n")>0) fix(e,"db");
25
         } e.id="";
26
      }
27
      function fix(e,cl){
28
        e.className=cl;
29
        e.style.display="block";
30
        j=e.parentElement.children(0);
31
        j.className="c";
32
        k=j.children(0);
33
        k.style.visibility="visible";
34
        k.href="#";
35
      }
36
      function ch(e) {
37
        mark=e.children(0).children(0);
38
        if (mark.innerText=="+") {
39
          mark.innerText="-";
40
          for (var i=1;i<e.children.length;i++) {
41
            e.children(i).style.display="block";
42
          }
43
        }
44
        else if (mark.innerText=="-") {
45
          mark.innerText="+";
46
          for (var i=1;i<e.children.length;i++) {
47
            e.children(i).style.display="none";
48
          }
49
        }
50
      }
51
      function ch2(e) {
52
        mark=e.children(0).children(0);
53
        contents=e.children(1);
54
        if (mark.innerText=="+") {
55
          mark.innerText="-";
56
          if (contents.className=="db"||contents.className=="cb") {
57
            contents.style.display="block";
58
          }
59
          else {
60
            contents.style.display="inline";
61
          }
62
        }
63
        else if (mark.innerText=="-") {
64
          mark.innerText="+";
65
          contents.style.display="none";
66
        }
67
      }
68
      function cl() {
69
        e=window.event.srcElement;
70
        if (e.className!="c") {
71
          e=e.parentElement;
72
          if (e.className!="c") {
73
            return;
74
          }
75
        }
76
        e=e.parentElement;
77
        if (e.className=="e") {
78
                      ch(e);
79
                    }
80
                    if (e.className=="k") {
81
                      ch2(e);
82
                    }
83
                  }
84
                  function ex(){}
85
                  function h(){window.status=" ";}
86
                  document.onclick=cl;
87
              ]]>
88
              </xsl:comment>
89
            </SCRIPT>
90
            
91
     <STYLE>
92
  BODY {font:x-small 'Verdana'; margin-right:1.5em}
93
    .c  {cursor:hand}
94
    .b  {color:red; font-family:'Courier New'; font-weight:bold;
95
         text-decoration:none}
96
    .e  {margin-left:1em; text-indent:-1em; margin-right:1em}
97
    .k  {margin-left:1em; text-indent:-1em; margin-right:1em}
98
    .t  {color:#990000}
99
    .xt {color:#990099}
100
    .ns {color:red}
101
    .dt {color:green}
102
    .m  {color:blue}
103
    .tx {font-weight:bold}
104
    .db {text-indent:0px; margin-left:1em; margin-top:0px;
105
         margin-bottom:0px;padding-left:.3em;
106
         border-left:1px solid #CCCCCC; font:small Courier}
107
    .di {font:small Courier}
108
    .d  {color:blue}
109
    .pi {color:blue}
110
    .cb {text-indent:0px; margin-left:1em; margin-top:0px;
111
         margin-bottom:0px;padding-left:.3em; font:small Courier;
112
         color:#888888}
113
    .ci {font:small Courier; color:#888888}
114
    PRE {margin:0px; display:inline}
115
 </STYLE>
116
         </HEAD>
117
         <BODY class="st">
118
            <xsl:apply-templates/>
119
         </BODY>
120
      </HTML>
121
   </xsl:template>
122

    
123
   <xsl:template match="processing-instruction()">
124
      <DIV class="e">
125
         <SPAN class="b">
126
            <xsl:call-template name="entity-ref">
127
               <xsl:with-param 
128
                        name="name">nbsp</xsl:with-param>
129
            </xsl:call-template>
130
         </SPAN>
131
         <SPAN class="m">
132
            <xsl:text>&lt;?</xsl:text>
133
         </SPAN>
134
         <SPAN class="pi">
135
            <xsl:value-of select="name(.)"/>
136
            <xsl:value-of select="."/>
137
         </SPAN>
138
         <SPAN class="m">
139
            <xsl:text>?&gt;</xsl:text>
140
         </SPAN>
141
      </DIV>
142
   </xsl:template>
143

    
144
   <xsl:template match="processing-instruction('xml')">
145
      <DIV class="e">
146
         <SPAN class="b">
147
            <xsl:call-template name="entity-ref">
148
               <xsl:with-param 
149
                 name="name">nbsp</xsl:with-param>
150
            </xsl:call-template>
151
         </SPAN>
152
         <SPAN class="m">
153
            <xsl:text>&lt;?</xsl:text>
154
         </SPAN>
155
         <SPAN class="pi">
156
            <xsl:text>xml </xsl:text>
157
            <xsl:for-each select="@*">
158
               <xsl:value-of select="name(.)"/>
159
               <xsl:text>="</xsl:text>
160
               <xsl:value-of select="."/>
161
               <xsl:text>" </xsl:text>
162
            </xsl:for-each>
163
         </SPAN>
164
         <SPAN class="m">
165
            <xsl:text>?&gt;</xsl:text>
166
         </SPAN>
167
      </DIV>
168
   </xsl:template>
169

    
170
   <xsl:template match="@*">
171
      <SPAN>
172
         <xsl:attribute name="class">
173
            <xsl:if test="xsl:*/@*">
174
              <xsl:text>x</xsl:text>
175
            </xsl:if>
176
            <xsl:text>t</xsl:text>
177
         </xsl:attribute>
178
         <xsl:value-of select="name(.)"/>
179
      </SPAN>
180
      <SPAN class="m">="</SPAN>
181
      <B>
182
         <xsl:value-of select="."/>
183
      </B>
184
      <SPAN class="m">"</SPAN>
185
   </xsl:template>
186

    
187
   <xsl:template match="text()">
188
      <DIV class="e">
189
         <SPAN class="b"> </SPAN>
190
         <SPAN class="tx">
191
            <xsl:value-of select="."/>
192
         </SPAN>
193
      </DIV>
194
   </xsl:template>
195

    
196
   <xsl:template match="comment()">
197
      <DIV class="k">
198
         <SPAN>
199
            <A STYLE="visibility:hidden" 
200
                 class="b" onclick="return false" 
201
               onfocus="h()">-</A>
202
            <SPAN class="m">
203
               <xsl:text>&lt;!--</xsl:text>
204
            </SPAN>
205
         </SPAN>
206
         <SPAN class="ci" id="clean">
207
            <PRE>
208
               <xsl:value-of select="."/>
209
            </PRE>
210
         </SPAN>
211
         <SPAN class="b">
212
            <xsl:call-template 
213
               name="entity-ref">
214
               <xsl:with-param 
215
               name="name">nbsp</xsl:with-param>
216
            </xsl:call-template>
217
         </SPAN>
218
         <SPAN class="m">
219
            <xsl:text>--&gt;</xsl:text>
220
         </SPAN>
221
         <SCRIPT>f(clean);</SCRIPT>
222
      </DIV>
223
   </xsl:template>
224

    
225
   <xsl:template match="*">
226
      <DIV class="e">
227
         <DIV STYLE="margin-left:1em;text-indent:-2em">
228
            <SPAN class="b">
229
               <xsl:call-template 
230
                name="entity-ref">
231
                  <xsl:with-param 
232
                 name="name">nbsp</xsl:with-param>
233
               </xsl:call-template>
234
            </SPAN>
235
            <SPAN class="m">&lt;</SPAN>
236
            <SPAN>
237
               <xsl:attribute name="class">
238
                  <xsl:if test="xsl:*">
239
                     <xsl:text>x</xsl:text>
240
                  </xsl:if>
241
                  <xsl:text>t</xsl:text>
242
               </xsl:attribute>
243
               <xsl:value-of select="name(.)"/>
244
               <xsl:if test="@*">
245
                  <xsl:text> </xsl:text>
246
               </xsl:if>
247
            </SPAN>
248
            <xsl:apply-templates select="@*"/>
249
            <SPAN class="m">
250
               <xsl:text>/&gt;</xsl:text>
251
            </SPAN>
252
         </DIV>
253
      </DIV>
254
   </xsl:template>
255

    
256
   <xsl:template match="*[node()]">
257
      <DIV class="e">
258
         <DIV class="c">
259
            <A class="b" href="#" 
260
              onclick="return false" onfocus="h()">-</A>
261
            <SPAN class="m">&lt;</SPAN>
262
            <SPAN>
263
               <xsl:attribute name="class">
264
                  <xsl:if test="xsl:*">
265
                     <xsl:text>x</xsl:text>
266
                  </xsl:if>
267
                  <xsl:text>t</xsl:text>
268
               </xsl:attribute>
269
               <xsl:value-of select="name(.)"/>
270
               <xsl:if test="@*">
271
                  <xsl:text> </xsl:text>
272
               </xsl:if>
273
            </SPAN>
274
            <xsl:apply-templates select="@*"/>
275
            <SPAN class="m">
276
               <xsl:text>&gt;</xsl:text>
277
            </SPAN>
278
         </DIV>
279
         <DIV>
280
            <xsl:apply-templates/>
281
            <DIV>
282
               <SPAN class="b">
283
                  <xsl:call-template name="entity-ref">
284
                     <xsl:with-param 
285
                     name="name">nbsp</xsl:with-param>
286
                  </xsl:call-template>
287
               </SPAN>
288
               <SPAN class="m">
289
                  <xsl:text>&lt;/</xsl:text>
290
               </SPAN>
291
               <SPAN>
292
                  <xsl:attribute name="class">
293
                     <xsl:if test="xsl:*">
294
                        <xsl:text>x</xsl:text>
295
                     </xsl:if>
296
                     <xsl:text>t</xsl:text>
297
                  </xsl:attribute>
298
                  <xsl:value-of select="name(.)"/>
299
               </SPAN>
300
               <SPAN class="m">
301
                  <xsl:text>&gt;</xsl:text>
302
               </SPAN>
303
            </DIV>
304
         </DIV>
305
      </DIV>
306
   </xsl:template>
307

    
308
   <xsl:template match="*[text() and 
309
            not (comment() or processing-instruction())]">
310
      <DIV class="e">
311
         <DIV STYLE="margin-left:1em;text-indent:-2em">
312
            <SPAN class="b">
313
               <xsl:call-template name="entity-ref">
314
                  <xsl:with-param 
315
                        name="name">nbsp</xsl:with-param>
316
               </xsl:call-template>
317
            </SPAN>
318
            <SPAN class="m">
319
               <xsl:text>&lt;</xsl:text>
320
            </SPAN>
321
            <SPAN>
322
               <xsl:attribute name="class">
323
                  <xsl:if test="xsl:*">
324
                     <xsl:text>x</xsl:text>
325
                  </xsl:if>
326
                  <xsl:text>t</xsl:text>
327
               </xsl:attribute>
328
               <xsl:value-of select="name(.)"/>
329
               <xsl:if test="@*">
330
                  <xsl:text> </xsl:text>
331
               </xsl:if>
332
            </SPAN>
333
            <xsl:apply-templates select="@*"/>
334
            <SPAN class="m">
335
               <xsl:text>&gt;</xsl:text>
336
            </SPAN>
337
            <SPAN class="tx">
338
               <xsl:value-of select="."/>
339
            </SPAN>
340
            <SPAN class="m">&lt;/</SPAN>
341
            <SPAN>
342
               <xsl:attribute name="class">
343
                  <xsl:if test="xsl:*">
344
                     <xsl:text>x</xsl:text>
345
                  </xsl:if>
346
                  <xsl:text>t</xsl:text>
347
               </xsl:attribute>
348
               <xsl:value-of select="name(.)"/>
349
            </SPAN>
350
            <SPAN class="m">
351
               <xsl:text>&gt;</xsl:text>
352
            </SPAN>
353
         </DIV>
354
      </DIV>
355
   </xsl:template>
356

    
357
   <xsl:template match="*[*]" priority="20">
358
      <DIV class="e">
359
         <DIV STYLE="margin-left:1em;text-indent:-2em" class="c">
360
            <A class="b" href="#" 
361
              onclick="return false" onfocus="h()">-</A>
362
            <SPAN class="m">&lt;</SPAN>
363
            <SPAN>
364
               <xsl:attribute name="class">
365
                  <xsl:if test="xsl:*">
366
                     <xsl:text>x</xsl:text>
367
                  </xsl:if>
368
                  <xsl:text>t</xsl:text>
369
               </xsl:attribute>
370
               <xsl:value-of select="name(.)"/>
371
               <xsl:if test="@*">
372
                  <xsl:text> </xsl:text>
373
               </xsl:if>
374
            </SPAN>
375
            <xsl:apply-templates select="@*"/>
376
            <SPAN class="m">
377
               <xsl:text>&gt;</xsl:text>
378
            </SPAN>
379
         </DIV>
380
         <DIV>
381
            <xsl:apply-templates/>
382
            <DIV>
383
               <SPAN class="b">
384
                  <xsl:call-template name="entity-ref">
385
                     <xsl:with-param 
386
                    name="name">nbsp</xsl:with-param>
387
                  </xsl:call-template>
388
               </SPAN>
389
               <SPAN class="m">
390
                  <xsl:text>&lt;/</xsl:text>
391
               </SPAN>
392
               <SPAN>
393
                  <xsl:attribute name="class">
394
                     <xsl:if test="xsl:*">
395
                        <xsl:text>x</xsl:text>
396
                     </xsl:if>
397
                     <xsl:text>t</xsl:text>
398
                  </xsl:attribute>
399
                  <xsl:value-of select="name(.)"/>
400
               </SPAN>
401
               <SPAN class="m">
402
                  <xsl:text>&gt;</xsl:text>
403
               </SPAN>
404
            </DIV>
405
         </DIV>
406
      </DIV>
407
   </xsl:template>
408

    
409
   <xsl:template name="entity-ref">
410
      <xsl:param name="name"/>
411
      <xsl:text 
412
      disable-output-escaping="yes">&amp;</xsl:text>
413
      <xsl:value-of select="$name"/>
414
      <xsl:text>;</xsl:text>
415
   </xsl:template>
416

    
417
</xsl:stylesheet>
(8-8/27)