-
Notifications
You must be signed in to change notification settings - Fork 0
/
msgPOI.XSL
181 lines (169 loc) · 5.74 KB
/
msgPOI.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
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
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
175
176
177
178
179
180
181
<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<!--
style-sheet de présentation des messages BILAN SECOURISTE
-->
<!-- Subroutine that replaces a leading space or tab -->
<!-- with a hard (non-breaking) space -->
<!-- Input: parameter "str", a string -->
<!-- Returns: value of "str" w/ leading space replaced -->
<xsl:template name="replace-leading-space">
<xsl:param name="str"/>
<xsl:variable name="first" select="substring( $str, 1, 1 )"/>
<xsl:choose>
<xsl:when test="$first=' ' or $first='	'">
<xsl:value-of select="concat(' ', substring( $str, 2 ))"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$str"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:output method="html" version="1.0" encoding="ISO-8859-1" indent="yes"/>
<xsl:template match="/">
<html>
<head>
<style type="text/css">
table.msg {
width: 700px;
font-family: Arial, Helvetica, sans-serif;
font-size: .8em;
border-style: solid;
border-width: 1px;
}
table.title {
width: 100%;
font-weight: bold;
text-align: center;
}
th.title {
font-size: 1.2em;
color: blue
}
td.title {
font-size: 2em;
}
td.mode {
color: red;
}
table.pgh {
width: 100%;
border-width: 0;
}
th.pgh {
text-align: center;
background-color: orange;
color: blue;
}
td.lib {
width: 25%;
}
td.zone {
width: 28%;
}
td.val {
width: 8%;
text-align: center;
}
</style>
<script language="Javascript">
function imp1(){window.print();}
function imp2(){
var targetElement;
targetElement = document.getElementById('1') ;
targetElement.style.display = "none" ;
targetElement = document.getElementById('2') ;
targetElement.style.display = "none" ;
window.print();
}
</script>
</head>
<body align="center" width="700px">
<table class="msg">
<tr>
<td>
<table class="title" id="1">
<tr>
<th class="title">ASSOCIATION DEPARTEMENTALE DES RADIOAMATEURS</th>
</tr>
<tr>
<th class="title">AU SERVICE DE LA SECURITE CIVILE</th>
</tr>
<tr>
<td>
<hr size="3" color="blue" />
<hr size="3" color="orange" />
</td>
</tr>
<tr>
<td class="title">MESSAGE</td>
</tr>
<tr>
<td class="mode">
<xsl:if test="msg/mode = 'Exercice'">- EXERCICE - EXERCICE - EXERCICE -</xsl:if>
</td>
</tr>
</table>
<table class="pgh">
<tr>
<th class="pgh" colspan="2">Informations transmission</th>
</tr>
<tr>
<td class="lib">Groupe Date/Heure :</td>
<td><xsl:value-of select="msg/trans/gdh"/> </td>
</tr>
<tr>
<td class="lib">Emis par :</td>
<td><xsl:value-of select="msg/trans/emis"/> </td>
</tr>
<tr>
<td class="lib">Reçu par :</td>
<td><xsl:value-of select="msg/trans/recu"/> </td>
</tr>
<tr>
<td>Instructions particulières :</td>
<td><xsl:value-of select="msg/trans/instr"/> </td>
</tr>
</table>
<table class="pgh">
<tr>
<th class="pgh" colspan="2">Informations Relevé Point particulier</th>
</tr>
<tr>
<td class="lib">Système de coordonnées :</td>
<td><xsl:value-of select="msg/corps/sys"/> </td>
</tr>
<tr>
<td class="lib">Datum :</td>
<td><xsl:value-of select="msg/corps/datum"/> </td>
</tr>
<tr>
<td class="lib">Coordonnées X :</td>
<td><xsl:value-of select="msg/corps/coordx"/> </td>
</tr>
<tr>
<td>Coordonnées Y :</td>
<td><xsl:value-of select="msg/corps/coordy"/> </td>
</tr>
<tr>
<td class="lib">Type du relevé :</td>
<td><xsl:value-of select="msg/corps/typrel"/> </td>
</tr>
<tr>
<td class="lib">Détails :</td>
<td><xsl:value-of select="msg/corps/detail"/> </td>
</tr>
<tr>
<td>Remarques :</td>
<td><xsl:value-of select="msg/corps/txt"/> </td>
</tr>
</table>
</td>
</tr>
<br/>
</table>
<div align="center"><input name="B1" onclick="imp1()" type="button" value="Imprimer Tout"/></div>
<div align="center"><input name="B2" onclick="imp2()" type="button" value="Imprimer Message seul"/></div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>