tests-results.xsl 19.2 KB
Newer Older
1
2
3
4
5
6
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">]>

<!--
  ++ Automated Testing Framework (atf)
  ++
Evan Hunt's avatar
Evan Hunt committed
7
  ++ Copyright (c) 2007 The NetBSD Foundation, Inc.
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
  ++ All rights reserved.
  ++
  ++ Redistribution and use in source and binary forms, with or without
  ++ modification, are permitted provided that the following conditions
  ++ are met:
  ++ 1. Redistributions of source code must retain the above copyright
  ++    notice, this list of conditions and the following disclaimer.
  ++ 2. Redistributions in binary form must reproduce the above copyright
  ++    notice, this list of conditions and the following disclaimer in the
  ++    documentation and/or other materials provided with the distribution.
  ++
  ++ THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
  ++ CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
  ++ INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  ++ MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  ++ IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
  ++ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  ++ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
  ++ GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  ++ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
  ++ IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
  ++ OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
  ++ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  -->

<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <!-- Parameters that can be overriden by the user. -->
  <xsl:param name="global.css">tests-results.css</xsl:param>
  <xsl:param name="global.title">ATF Tests Results</xsl:param>

  <xsl:variable name="ntps"
                select="count(tests-results/tp)" />
  <xsl:variable name="ntps-failed"
                select="count(tests-results/tp/failed)" />
  <xsl:variable name="ntcs"
                select="count(tests-results/tp/tc)" />
  <xsl:variable name="ntcs-passed"
                select="count(tests-results/tp/tc/passed)" />
  <xsl:variable name="ntcs-failed"
                select="count(tests-results/tp/tc/failed)" />
  <xsl:variable name="ntcs-skipped"
                select="count(tests-results/tp/tc/skipped)" />
  <xsl:variable name="ntcs-xfail"
                select="count(tests-results/tp/tc/expected_death) +
                        count(tests-results/tp/tc/expected_exit) +
                        count(tests-results/tp/tc/expected_failure) +
                        count(tests-results/tp/tc/expected_signal) +
                        count(tests-results/tp/tc/expected_timeout)" />

  <xsl:template match="/">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()" />
    </xsl:copy>
  </xsl:template>

  <xsl:template match="tests-results">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="Content-Type"
              content="text/html; charset=iso-8859-1" />
        <link rel="stylesheet" type="text/css" href="{$global.css}" />

        <title><xsl:value-of select="$global.title" /></title>
      </head>

      <body>
        <h1><xsl:value-of select="$global.title" /></h1>

        <xsl:call-template name="info-top" />
        <xsl:call-template name="tcs-summary" />
        <xsl:if test="$ntcs-failed > 0">
          <xsl:call-template name="failed-tcs-summary" />
        </xsl:if>
        <xsl:if test="$ntcs-xfail > 0">
          <xsl:call-template name="xfail-tcs-summary" />
        </xsl:if>
        <xsl:if test="$ntcs-skipped > 0">
          <xsl:call-template name="skipped-tcs-summary" />
        </xsl:if>
Evan Hunt's avatar
Evan Hunt committed
89
90
91
        <xsl:if test="$ntps-failed > 0">
          <xsl:call-template name="failed-tps-summary" />
        </xsl:if>
92
93
94
95
96
97
98
99
100
101
102
103
        <xsl:call-template name="info-bottom" />

        <xsl:apply-templates select="tp" mode="details" />
      </body>
    </html>
  </xsl:template>

  <xsl:template name="info-top">
    <h2>Execution summary</h2>

    <table class="summary">
      <tr>
Evan Hunt's avatar
Evan Hunt committed
104
105
        <th class="nobr"><p>Item</p></th>
        <th class="nobr"><p>Value</p></th>
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
      </tr>

      <tr class="group">
        <td colspan="2"><p>ATF</p></td>
      </tr>
      <tr class="entry">
        <td><p>Version</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'atf.version']" /></p></td>
      </tr>

      <tr class="group">
        <td colspan="2"><p>Timings</p></td>
      </tr>
      <tr class="entry">
        <td><p>Start time of tests</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'time.start']" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>End time of tests</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'time.end']" /></p></td>
      </tr>

      <tr class="group">
        <td colspan="2"><p>System information</p></td>
      </tr>
      <tr class="entry">
        <td><p>Host name</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'uname.nodename']" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>Operating system</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'uname.sysname']" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>Operating system release</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'uname.release']" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>Operating system version</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'uname.version']" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>Platform</p></td>
        <td><p><xsl:apply-templates
        select="info[@class = 'uname.machine']" /></p></td>
      </tr>

      <tr class="group">
        <td colspan="2"><p>Tests results</p></td>
      </tr>
      <tr class="entry">
        <td><p>Root</p></td>
        <td><p><xsl:value-of
        select="info[@class = 'tests.root']" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>Test programs</p></td>
        <td class="numeric"><p><xsl:value-of select="$ntps" /></p></td>
      </tr>
      <tr class="entry">
        <xsl:choose>
          <xsl:when test="$ntps-failed > 0">
Evan Hunt's avatar
Evan Hunt committed
175
176
            <td><p><a href="#failed-tps-summary">Bogus test
            programs</a></p></td>
177
178
179
180
181
            <td class="numeric-error">
              <p><xsl:value-of select="$ntps-failed" /></p>
            </td>
          </xsl:when>
          <xsl:otherwise>
Evan Hunt's avatar
Evan Hunt committed
182
            <td><p>Bogus test programs</p></td>
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
            <td class="numeric">
              <p><xsl:value-of select="$ntps-failed" /></p>
            </td>
          </xsl:otherwise>
        </xsl:choose>
      </tr>
      <tr class="entry">
        <td><p>Test cases</p></td>
        <td class="numeric"><p><xsl:value-of select="$ntcs" /></p></td>
      </tr>
      <tr class="entry">
        <td><p>Passed test cases</p></td>
        <td class="numeric"><p><xsl:value-of select="$ntcs-passed" /></p></td>
      </tr>
      <tr class="entry">
        <xsl:choose>
          <xsl:when test="$ntcs-failed > 0">
            <td><p><a href="#failed-tcs-summary">Failed test
            cases</a></p></td>
            <td class="numeric-error">
              <p><xsl:value-of select="$ntcs-failed" /></p>
            </td>
          </xsl:when>
          <xsl:otherwise>
            <td><p>Failed test cases</p></td>
            <td class="numeric">
              <p><xsl:value-of select="$ntcs-failed" /></p>
            </td>
          </xsl:otherwise>
        </xsl:choose>
      </tr>
      <tr class="entry">
        <xsl:choose>
          <xsl:when test="$ntcs-xfail > 0">
            <td><p><a href="#xfail-tcs-summary">Expected
            failures</a></p></td>
            <td class="numeric-warning">
              <p><xsl:value-of select="$ntcs-xfail" /></p>
            </td>
          </xsl:when>
          <xsl:otherwise>
            <td><p>Expected failures</p></td>
            <td class="numeric">
              <p><xsl:value-of select="$ntcs-xfail" /></p>
            </td>
          </xsl:otherwise>
        </xsl:choose>
      </tr>
      <tr class="entry">
        <xsl:choose>
          <xsl:when test="$ntcs-skipped > 0">
            <td><p><a href="#skipped-tcs-summary">Skipped test
            cases</a></p></td>
            <td class="numeric-warning">
              <p><xsl:value-of select="$ntcs-skipped" /></p>
            </td>
          </xsl:when>
          <xsl:otherwise>
            <td><p>Skipped test cases</p></td>
            <td class="numeric">
              <p><xsl:value-of select="$ntcs-skipped" /></p>
            </td>
          </xsl:otherwise>
        </xsl:choose>
      </tr>

      <tr class="group">
        <td colspan="2"><p><a href="#execution-details">See more execution
        details</a></p></td>
      </tr>
    </table>
  </xsl:template>

  <xsl:template name="info-bottom">
    <a name="execution-details" />
    <h2 id="execution-details">Execution details</h2>

    <h3>Environment variables</h3>

    <ul>
      <xsl:apply-templates select="info[@class = 'env']">
        <xsl:sort />
      </xsl:apply-templates>
    </ul>
  </xsl:template>

  <xsl:template match="info[@class = 'env']">
    <li>
      <p><xsl:apply-templates /></p>
    </li>
  </xsl:template>

  <xsl:template name="tcs-summary">
    <h2>Test cases summary</h2>

    <table class="tcs-summary">
      <tr>
Evan Hunt's avatar
Evan Hunt committed
280
281
282
283
        <th class="nobr"><p>Test case</p></th>
        <th class="nobr"><p>Result</p></th>
        <th class="nobr"><p>Reason</p></th>
        <th class="nobr"><p>Duration</p></th>
284
285
286
287
288
289
290
291
292
293
294
295
296
      </tr>
      <xsl:apply-templates select="tp" mode="summary">
        <xsl:with-param name="which">all</xsl:with-param>
      </xsl:apply-templates>
    </table>
  </xsl:template>

  <xsl:template name="xfail-tcs-summary">
    <a name="xfail-tcs-summary" />
    <h2 id="xfail-tcs-summary">Expected failures summary</h2>

    <table class="tcs-summary">
      <tr>
Evan Hunt's avatar
Evan Hunt committed
297
298
299
300
        <th class="nobr"><p>Test case</p></th>
        <th class="nobr"><p>Result</p></th>
        <th class="nobr"><p>Reason</p></th>
        <th class="nobr"><p>Duration</p></th>
301
302
303
304
305
306
307
308
309
310
311
312
313
      </tr>
      <xsl:apply-templates select="tp" mode="summary">
        <xsl:with-param name="which">xfail</xsl:with-param>
      </xsl:apply-templates>
    </table>
  </xsl:template>

  <xsl:template name="failed-tcs-summary">
    <a name="failed-tcs-summary" />
    <h2 id="failed-tcs-summary">Failed test cases summary</h2>

    <table class="tcs-summary">
      <tr>
Evan Hunt's avatar
Evan Hunt committed
314
315
316
317
        <th class="nobr"><p>Test case</p></th>
        <th class="nobr"><p>Result</p></th>
        <th class="nobr"><p>Reason</p></th>
        <th class="nobr"><p>Duration</p></th>
318
319
320
321
322
323
324
      </tr>
      <xsl:apply-templates select="tp" mode="summary">
        <xsl:with-param name="which">failed</xsl:with-param>
      </xsl:apply-templates>
    </table>
  </xsl:template>

Evan Hunt's avatar
Evan Hunt committed
325
326
327
328
329
330
331
332
333
334
335
336
337
338
  <xsl:template name="failed-tps-summary">
    <a name="failed-tps-summary" />
    <h2 id="failed-tps-summary">Bogus test programs summary</h2>

    <table class="tcs-summary">
      <tr>
        <th class="nobr">Test program</th>
      </tr>
      <xsl:apply-templates select="tp" mode="summary">
        <xsl:with-param name="which">bogus</xsl:with-param>
      </xsl:apply-templates>
    </table>
  </xsl:template>

339
340
341
342
343
344
  <xsl:template name="skipped-tcs-summary">
    <a name="skipped-tcs-summary" />
    <h2 id="skipped-tcs-summary">Skipped test cases summary</h2>

    <table class="tcs-summary">
      <tr>
Evan Hunt's avatar
Evan Hunt committed
345
346
347
348
        <th class="nobr"><p>Test case</p></th>
        <th class="nobr"><p>Result</p></th>
        <th class="nobr"><p>Reason</p></th>
        <th class="nobr"><p>Duration</p></th>
349
350
351
352
353
354
355
356
357
358
359
360
      </tr>
      <xsl:apply-templates select="tp" mode="summary">
        <xsl:with-param name="which">skipped</xsl:with-param>
      </xsl:apply-templates>
    </table>
  </xsl:template>

  <xsl:template match="tp" mode="summary">
    <xsl:param name="which" />

    <xsl:variable name="chosen">
      <xsl:choose>
Evan Hunt's avatar
Evan Hunt committed
361
        <xsl:when test="$which = 'bogus' and failed">yes</xsl:when>
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
        <xsl:when test="$which = 'passed' and tc/passed">yes</xsl:when>
        <xsl:when test="$which = 'failed' and tc/failed">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        tc/expected_death">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        tc/expected_exit">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        tc/expected_failure">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        tc/expected_signal">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        tc/expected_timeout">yes</xsl:when>
        <xsl:when test="$which = 'skipped' and tc/skipped">yes</xsl:when>
        <xsl:when test="$which = 'all'">yes</xsl:when>
        <xsl:otherwise>no</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>

    <xsl:if test="$chosen = 'yes'">
      <tr>
        <td class="tp-id" colspan="3">
          <p><xsl:value-of select="@id" /></p>
        </td>
Evan Hunt's avatar
Evan Hunt committed
385
386
387
        <td class="tp-numeric">
          <p><xsl:value-of select="tp-time" />s</p>
        </td>
388
      </tr>
Evan Hunt's avatar
Evan Hunt committed
389
390
391
392
393
      <xsl:if test="$which != 'bogus'">
        <xsl:apply-templates select="tc" mode="summary">
          <xsl:with-param name="which" select="$which" />
        </xsl:apply-templates>
      </xsl:if>
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
    </xsl:if>
  </xsl:template>

  <xsl:template match="tc" mode="summary">
    <xsl:param name="which" />

    <xsl:variable name="full-id"
                  select="concat(translate(../@id, '/', '_'), '_', @id)" />

    <xsl:variable name="chosen">
      <xsl:choose>
        <xsl:when test="$which = 'passed' and ./passed">yes</xsl:when>
        <xsl:when test="$which = 'failed' and ./failed">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        ./expected_death">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        ./expected_exit">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        ./expected_failure">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        ./expected_signal">yes</xsl:when>
        <xsl:when test="$which = 'xfail' and
                        ./expected_timeout">yes</xsl:when>
        <xsl:when test="$which = 'skipped' and ./skipped">yes</xsl:when>
        <xsl:when test="$which = 'all'">yes</xsl:when>
        <xsl:otherwise>no</xsl:otherwise>
      </xsl:choose>
    </xsl:variable>

    <xsl:if test="$chosen = 'yes'">
      <tr>
        <td class="tc-id">
          <xsl:choose>
            <xsl:when test="expected_death|expected_exit|expected_failure|
                            expected_signal|expected_timeout|failed|skipped">
              <p><a href="#{$full-id}"><xsl:value-of select="@id" /></a></p>
            </xsl:when>
            <xsl:otherwise>
              <p><xsl:value-of select="@id" /></p>
            </xsl:otherwise>
          </xsl:choose>
        </td>
        <xsl:apply-templates select="expected_death|expected_exit|
                                     expected_failure|expected_timeout|
                                     expected_signal|failed|passed|
                                     skipped" mode="tc" />
Evan Hunt's avatar
Evan Hunt committed
440
441
442
        <td class="numeric">
          <p><xsl:value-of select="tc-time" />s</p>
        </td>
443
444
445
446
447
      </tr>
    </xsl:if>
  </xsl:template>

  <xsl:template match="passed" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
448
449
    <td class="tcr-passed"><p class="nobr">Passed</p></td>
    <td class="tcr-reason"><p>N/A</p></td>
450
451
452
  </xsl:template>

  <xsl:template match="expected_death" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
453
454
    <td class="tcr-xfail"><p class="nobr">Expected death</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
455
456
457
  </xsl:template>

  <xsl:template match="expected_exit" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
458
459
    <td class="tcr-xfail"><p class="nobr">Expected exit</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
460
461
462
  </xsl:template>

  <xsl:template match="expected_failure" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
463
464
    <td class="tcr-xfail"><p class="nobr">Expected failure</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
465
466
467
  </xsl:template>

  <xsl:template match="expected_timeout" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
468
469
    <td class="tcr-xfail"><p class="nobr">Expected timeout</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
470
471
472
  </xsl:template>

  <xsl:template match="expected_signal" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
473
474
    <td class="tcr-xfail"><p class="nobr">Expected signal</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
475
476
477
  </xsl:template>

  <xsl:template match="failed" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
478
479
    <td class="tcr-failed"><p class="nobr">Failed</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
480
481
482
  </xsl:template>

  <xsl:template match="skipped" mode="tc">
Evan Hunt's avatar
Evan Hunt committed
483
484
    <td class="tcr-skipped"><p class="nobr">Skipped</p></td>
    <td class="tcr-reason"><p><xsl:apply-templates /></p></td>
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
  </xsl:template>

  <xsl:template match="tp" mode="details">
    <xsl:apply-templates select="tc[expected_death|expected_exit|
                                    expected_failure|expected_signal|
                                    expected_timeout|failed|skipped]"
                         mode="details" />
  </xsl:template>

  <xsl:template match="failed" mode="details">
    <p class="term"><strong>FAILED</strong>: <xsl:apply-templates /></p>
  </xsl:template>

  <xsl:template match="expected_death|expected_exit|expected_failure|
                       expected_signal|expected_timeout" mode="details">
    <p class="term"><strong>XFAIL</strong>: <xsl:apply-templates /></p>
  </xsl:template>

  <xsl:template match="skipped" mode="details">
    <p class="term"><strong>SKIPPED</strong>: <xsl:apply-templates /></p>
  </xsl:template>

  <xsl:template match="tc" mode="details">
    <xsl:variable name="full-id"
                  select="concat(translate(../@id, '/', '_'), '_', @id)" />

    <a name="{$full-id}" />
    <h2 id="{$full-id}">Test case:
    <xsl:value-of select="../@id" /><xsl:text>/</xsl:text>
    <xsl:value-of select="@id" /></h2>

Evan Hunt's avatar
Evan Hunt committed
516
517
518
519
520
    <xsl:if test="tc-time">
      <p class="details">Duration:
      <xsl:apply-templates select="tc-time" mode="details" /></p>
    </xsl:if>

521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
    <h3>Termination reason</h3>
    <xsl:apply-templates select="expected_death|expected_exit|expected_failure|
                                 expected_signal|expected_timeout|
                                 failed|skipped"
                         mode="details" />

    <xsl:if test="so">
      <h3>Standard output stream</h3>
      <pre class="so"><xsl:apply-templates select="so" mode="details" /></pre>
    </xsl:if>

    <xsl:if test="se">
      <h3>Standard error stream</h3>
      <pre class="se"><xsl:apply-templates select="se" mode="details" /></pre>
    </xsl:if>
  </xsl:template>

Evan Hunt's avatar
Evan Hunt committed
538
539
540
541
  <xsl:template match="tc-time" mode="details">
    <xsl:apply-templates /> seconds
  </xsl:template>

542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
  <xsl:template match="so" mode="details">
    <xsl:apply-templates />
    <xsl:if test="position() != last()">
      <xsl:text>
</xsl:text>
    </xsl:if>
  </xsl:template>

  <xsl:template match="se" mode="details">
    <xsl:apply-templates />
    <xsl:if test="position() != last()">
      <xsl:text>
</xsl:text>
    </xsl:if>
  </xsl:template>

  <xsl:template match="@*|node()" priority="-1">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()" />
    </xsl:copy>
  </xsl:template>

</xsl:stylesheet>