-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmondial.xsl
59 lines (55 loc) · 2.27 KB
/
mondial.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
47
48
49
50
51
52
53
54
55
56
57
58
59
<?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="1.0">
<xsl:template match="/">
<html>
<head>
<style>
table {
border: 1px solid black;
border-collapse: collapse;
width:100%;border: 1px solid black;border: 1px solid black;
border-collapse: collapse;
}
th, td{
border: 1px solid black;
border-collapse: collapse;
border: 1px solid black;
border: 1px solid black;
border-collapse: collapse;
}
</style>
</head>
<body>
<table >
<tr>
<th>N</th>
<th>Pays</th>
<th>Population</th>
<th>Relidion</th>
</tr>
<xsl:for-each select="mondial/pays">
<tr>
<th><xsl:value-of
select ="@numero">
</xsl:value-of></th>
<th><xsl:value-of select="@name"/></th>
<xsl:choose>
<xsl:when test="population > 1200"> <th style="background:#FFF;"><xsl:value-of select="population"/></th></xsl:when>
</xsl:choose>
<th>
<xsl:for-each select="religion">
type : <xsl:value-of select="@type"/><br />
nombre : <xsl:value-of select="@nbr"/><br />
</xsl:for-each>
</th>
</tr>
</xsl:for-each>
</table>
<xsl:value-of select="mondial/message"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>