-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrapport.xsl
46 lines (45 loc) · 2.12 KB
/
rapport.xsl
1
2
3
4
5
6
7
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<xsl:template match="/">
<html>
<head>
<title>Rapport</title>
</head>
<body>
<table border="1" width="70%">
<tr>
<th>Num</th><th>Date</th><th>Exp</th><th>Dest</th><th>Etat</th>
<th>Montant</th>
</tr>
<xsl:for-each select="rapport/mandat">
<tr>
<td><xsl:value-of select="@num"></xsl:value-of></td>
<td><xsl:value-of select="@date"></xsl:value-of></td>
<td>
<li>CIN:<xsl:value-of select="expediteur/@cin"></xsl:value-of></li>
<li>Nom:<xsl:value-of select="expediteur/@nom"></xsl:value-of></li>
</td>
<td>
<li>CIN:<xsl:value-of select="destinataire/@cin"></xsl:value-of></li>
<li>Nom:<xsl:value-of select="destinataire/@nom"></xsl:value-of></li>
</td>
<td><xsl:value-of select="@etat"></xsl:value-of></td>
<td><xsl:value-of select="@montant"></xsl:value-of></td>
</tr>
</xsl:for-each>
<tr>
<td colspan="5">Total des mandats </td>
<td><xsl:value-of select="sum(rapport/mandat/@montant)"></xsl:value-of></td>
</tr>
<tr>
<td colspan="5">Total des mandats reçus</td>
<td><xsl:value-of select="sum(rapport/mandat[@etat='reçu']/@montant)"></xsl:value-of></td>
</tr>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>