-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathequipe.xsl
More file actions
128 lines (127 loc) · 5.57 KB
/
Copy pathequipe.xsl
File metadata and controls
128 lines (127 loc) · 5.57 KB
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
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
<!-- L'attribut exclude-result-prefixes de xsl:stylesheet permet d'indiquer que certains espaces de noms ne seront pas utilisés dans le document résultat et que leurs déclarations doivent être omises. Cet attribut contient une liste de préfixes séparés par des espaces.-->
<xsl:output method="xml" version="1.0" omit-xml-declaration="no" indent="yes"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="mypage">
<fo:region-body margin="1in"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="mypage">
<fo:flow flow-name="xsl-region-body">
<fo:block>Bundesliga 2020-2021</fo:block>
<fo:block font-size="10pt">
<fo:table table-layout="fixed" border-style="solid" text-align="center">
<fo:table-column column-width="4cm"/>
<fo:table-column column-width="4cm"/>
<fo:table-column column-width="4cm"/>
<fo:table-column column-width="4cm"/>
<fo:table-header>
<fo:table-row>
<fo:table-cell border-style="solid">
<fo:block>Equipe</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Victoires</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Defaites</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>Classement</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select="statistiques_equipe/equipe">
<xsl:sort select="classement" data-type="number" order="ascending"/>
<xsl:choose>
<xsl:when test="classement < 4">
<fo:table-row background-color="LightGreen">
<fo:table-row>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="equipe"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="victoires"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="defaites"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="classement"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-row>
</xsl:when>
<xsl:when test="classement > 15">
<fo:table-row background-color="#FF7F7F">
<fo:table-row>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="equipe"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="victoires"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="defaites"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="classement"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-row>
</xsl:when>
<xsl:otherwise>
<fo:table-row>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="equipe"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="victoires"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="defaites"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-style="solid">
<fo:block>
<xsl:value-of select="classement"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>