Codebase list jaxe / 5499b21
Imported Upstream version 3.3 Samuel Thibault 14 years ago
285 changed file(s) with 5633 addition(s) and 2077 deletion(s). Raw diff Collapse all Expand all
141141
142142 <target name="dist" depends="compile,copy-resources" description="build platform-neutral distribution files">
143143 <mkdir dir="${dist-pc}/lib"/>
144 <jar jarfile="${dist-pc}/lib/Jaxe.jar" basedir="${build.classes}">
144 <jar destfile="${dist-pc}/lib/Jaxe.jar" basedir="${build.classes}">
145145 <manifest>
146146 <attribute name="Built-By" value="${user.name}"/>
147147 <attribute name="Main-Class" value="jaxe.Jaxe"/>
171171 <mkdir dir="${dist-mac}/Jaxe.app/Contents/Resources/ru.lproj"/>
172172 <mkdir dir="${dist-mac}/Jaxe.app/Contents/Resources/es.lproj"/>
173173 <mkdir dir="${dist-mac}/Jaxe.app/Contents/Resources/Java"/>
174 <jar jarfile="${dist-mac}/Jaxe.app/Contents/Resources/Java/Jaxe.jar" basedir="${build.classes}"/>
174 <jar destfile="${dist-mac}/Jaxe.app/Contents/Resources/Java/Jaxe.jar" basedir="${build.classes}"/>
175175 <copy todir="${dist-mac}/Jaxe.app/Contents/Resources/Java">
176176 <fileset dir="source/lib"/>
177177 </copy>
664664 <DOCUMENTATION>
665665 Titre et documentation pour une action d'export
666666 </DOCUMENTATION>
667 <STRINGS_ATTRIBUT attribut="export">
668 <TITRE>export</TITRE>
669 <DOCUMENTATION>
670 Le nom de l'export
671 </DOCUMENTATION>
672 </STRINGS_ATTRIBUT>
667673 </STRINGS_ELEMENT>
668674 </STRINGS>
669675
11891195 <DOCUMENTATION>
11901196 Title and documentation for an export action
11911197 </DOCUMENTATION>
1198 <STRINGS_ATTRIBUT attribut="export">
1199 <TITRE>export</TITRE>
1200 <DOCUMENTATION>
1201 The export name
1202 </DOCUMENTATION>
1203 </STRINGS_ATTRIBUT>
1204 </STRINGS_ELEMENT>
1205 </STRINGS>
1206
1207
1208
1209 <STRINGS langue="ru">
1210 <DESCRIPTION_CONFIG>&#1050;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1103; Jaxe</DESCRIPTION_CONFIG>
1211
1212 <STRINGS_MENU menu="Langage">
1213 <TITRE>&#1071;&#1079;&#1099;&#1082;</TITRE>
1214 <DOCUMENTATION>
1215 &#1048;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103; &#1086; &#1103;&#1079;&#1099;&#1082;&#1077; XML, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1081; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090;&#1089;&#1103; &#1074; &#1076;&#1072;&#1085;&#1085;&#1086;&#1084; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1086;&#1085;&#1085;&#1086;&#1084; &#1092;&#1072;&#1081;&#1083;&#1077;.
1216 </DOCUMENTATION>
1217 </STRINGS_MENU>
1218 <STRINGS_MENU menu="Schéma simple">
1219 <TITRE>&#1055;&#1088;&#1086;&#1089;&#1090;&#1072;&#1103; schema</TITRE>
1220 <DOCUMENTATION>
1221 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;, &#1082;&#1086;&#1075;&#1076;&#1072; &#1074;&#1084;&#1077;&#1089;&#1090;&#1086; &#1074;&#1085;&#1077;&#1096;&#1085;&#1077;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; XML schema
1222 &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1090;&#1089;&#1103; &#1074;&#1089;&#1090;&#1088;&#1086;&#1077;&#1085;&#1085;&#1072;&#1103; &#1091;&#1087;&#1088;&#1086;&#1097;&#1077;&#1085;&#1085;&#1072;&#1103; &#1074;&#1077;&#1088;&#1089;&#1080;&#1103; (&#1076;&#1083;&#1103; &#1089;&#1077;&#1088;&#1100;&#1077;&#1079;&#1085;&#1099;&#1093; &#1079;&#1072;&#1076;&#1072;&#1095;
1223 &#1083;&#1091;&#1095;&#1096;&#1077; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1100; W3C &#1089;&#1090;&#1072;&#1085;&#1076;&#1072;&#1088;&#1090;)
1224 </DOCUMENTATION>
1225 </STRINGS_MENU>
1226 <STRINGS_MENU menu="Enregistrement">
1227 <TITRE>&#1057;&#1086;&#1093;&#1088;&#1072;&#1085;&#1077;&#1085;&#1080;&#1077;</TITRE>
1228 <DOCUMENTATION>
1229 &#1054;&#1087;&#1094;&#1080;&#1080;, &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1102;&#1097;&#1080;&#1077;, &#1082;&#1072;&#1082; &#1073;&#1091;&#1076;&#1077;&#1090; &#1089;&#1086;&#1093;&#1088;&#1072;&#1085;&#1103;&#1090;&#1100;&#1089;&#1103; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;.
1230 </DOCUMENTATION>
1231 </STRINGS_MENU>
1232 <STRINGS_MENU menu="Menus">
1233 <TITRE>&#1052;&#1077;&#1085;&#1102;</TITRE>
1234 <DOCUMENTATION>
1235 &#1042;&#1086; &#1074;&#1088;&#1077;&#1084;&#1103; &#1088;&#1077;&#1076;&#1072;&#1082;&#1090;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1103; &#1092;&#1072;&#1081;&#1083;&#1072; &#1084;&#1077;&#1085;&#1102; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074; &#1089;&#1090;&#1088;&#1080;&#1090;&#1089;&#1103; &#1076;&#1080;&#1085;&#1072;&#1084;&#1080;&#1095;&#1077;&#1089;&#1082;&#1080;
1236 &#1085;&#1072; &#1086;&#1089;&#1085;&#1086;&#1074;&#1072;&#1085;&#1080;&#1080; &#1085;&#1072;&#1089;&#1090;&#1088;&#1086;&#1077;&#1082; &#1074; &#1092;&#1072;&#1081;&#1083;&#1077; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1237 </DOCUMENTATION>
1238 </STRINGS_MENU>
1239 <STRINGS_MENU menu="Affichage">
1240 <TITRE>&#1042;&#1080;&#1076; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;</TITRE>
1241 <DOCUMENTATION>
1242 &#1047;&#1076;&#1077;&#1089;&#1100; &#1074;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1086; &#1085;&#1072;&#1089;&#1090;&#1088;&#1086;&#1080;&#1090;&#1100; &#1074;&#1085;&#1077;&#1096;&#1085;&#1080;&#1081; &#1074;&#1080;&#1076; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074; &#1074; &#1089;&#1072;&#1084;&#1086;&#1084; &#1086;&#1082;&#1085;&#1077; &#1090;&#1077;&#1082;&#1089;&#1090;&#1072;.
1243 </DOCUMENTATION>
1244 </STRINGS_MENU>
1245 <STRINGS_MENU menu="Exports">
1246 <TITRE>&#1069;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;</TITRE>
1247 <DOCUMENTATION>
1248 &#1055;&#1091;&#1085;&#1082;&#1090;&#1099;, &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1102;&#1097;&#1080;&#1077; &#1101;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;, &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1103; &#1087;&#1088;&#1077;&#1086;&#1073;&#1088;&#1072;&#1079;&#1086;&#1074;&#1072;&#1085;&#1080;&#1077; XSLT.
1249 </DOCUMENTATION>
1250 </STRINGS_MENU>
1251 <STRINGS_MENU menu="Textes">
1252 <TITRE>&#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1103;</TITRE>
1253 <DOCUMENTATION>
1254 &#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1103; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1102;&#1090;&#1089;&#1103;, &#1095;&#1090;&#1086;&#1073;&#1099; &#1087;&#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1090;&#1100; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1102; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1102;,
1255 &#1085;&#1072;&#1079;&#1099;&#1074;&#1072;&#1085;&#1080;&#1103; &#1084;&#1077;&#1085;&#1102; &#1080; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074; &#1074; &#1083;&#1086;&#1082;&#1072;&#1083;&#1080;&#1079;&#1086;&#1074;&#1072;&#1085;&#1085;&#1086;&#1084; &#1074;&#1080;&#1076;&#1077;.
1256 </DOCUMENTATION>
1257 </STRINGS_MENU>
1258
1259 <STRINGS_ELEMENT element="CONFIG_JAXE">
1260 <TITRE>&#1050;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1103; Jaxe</TITRE>
1261 <DOCUMENTATION>
1262 &#1050;&#1086;&#1088;&#1077;&#1085;&#1100; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;
1263 </DOCUMENTATION>
1264 </STRINGS_ELEMENT>
1265 <STRINGS_ELEMENT element="LANGAGE">
1266 <TITRE>&#1071;&#1079;&#1099;&#1082;</TITRE>
1267 <DOCUMENTATION>
1268 &#1048;&#1085;&#1092;&#1086;&#1088;&#1084;&#1072;&#1094;&#1080;&#1103; &#1086; &#1103;&#1079;&#1099;&#1082;&#1077; XML
1269 </DOCUMENTATION>
1270 </STRINGS_ELEMENT>
1271 <STRINGS_ELEMENT element="FICHIER_SCHEMA">
1272 <TITRE>&#1060;&#1072;&#1081;&#1083; W3C schema</TITRE>
1273 <DOCUMENTATION>
1274 &#1042;&#1085;&#1077;&#1096;&#1085;&#1080;&#1081; &#1092;&#1072;&#1081;&#1083; W3C schema, &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1102;&#1097;&#1080;&#1081; &#1089;&#1090;&#1088;&#1091;&#1082;&#1090;&#1091;&#1088;&#1091; &#1103;&#1079;&#1099;&#1082;&#1072; XML.
1275 </DOCUMENTATION>
1276 <STRINGS_ATTRIBUT attribut="nom">
1277 <TITRE>&#1048;&#1084;&#1103;/&#1087;&#1091;&#1090;&#1100;</TITRE>
1278 <DOCUMENTATION>
1279 &#1055;&#1091;&#1090;&#1100; &#1076;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1089;&#1093;&#1077;&#1084;&#1099; &#1086;&#1090;&#1085;&#1086;&#1089;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1280 </DOCUMENTATION>
1281 </STRINGS_ATTRIBUT>
1282 </STRINGS_ELEMENT>
1283 <STRINGS_ELEMENT element="SCHEMA_SIMPLE">
1284 <TITRE>&#1055;&#1088;&#1086;&#1089;&#1090;&#1072;&#1103; schema</TITRE>
1285 <DOCUMENTATION>
1286 &#1054;&#1095;&#1077;&#1085;&#1100; &#1091;&#1087;&#1088;&#1086;&#1097;&#1077;&#1085;&#1085;&#1072;&#1103; XML schema. &#1071;&#1074;&#1083;&#1103;&#1077;&#1090;&#1089;&#1103; &#1072;&#1083;&#1100;&#1090;&#1077;&#1088;&#1085;&#1072;&#1090;&#1080;&#1074;&#1086;&#1081;, &#1082;&#1086;&#1075;&#1076;&#1072; &#1085;&#1077;&#1090;
1287 &#1085;&#1077;&#1086;&#1073;&#1093;&#1086;&#1076;&#1080;&#1084;&#1086;&#1089;&#1090;&#1080; &#1074; &#1089;&#1083;&#1086;&#1078;&#1085;&#1086;&#1089;&#1090;&#1080; W3C schema.
1288 </DOCUMENTATION>
1289 </STRINGS_ELEMENT>
1290 <STRINGS_ELEMENT element="ELEMENT">
1291 <TITRE>&#1069;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1292 <DOCUMENTATION>
1293 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072; XML
1294 </DOCUMENTATION>
1295 <STRINGS_ATTRIBUT attribut="nom">
1296 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1297 <DOCUMENTATION>
1298 &#1048;&#1084;&#1103; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;
1299 </DOCUMENTATION>
1300 </STRINGS_ATTRIBUT>
1301 <STRINGS_ATTRIBUT attribut="texte">
1302 <TITRE>&#1058;&#1077;&#1082;&#1089;&#1090;</TITRE>
1303 <DOCUMENTATION>
1304 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090; &#1084;&#1086;&#1078;&#1077;&#1090; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090; &#1089;&#1086;&#1076;&#1077;&#1088;&#1078;&#1072;&#1090;&#1100; &#1090;&#1077;&#1082;&#1089;&#1090; &#1080;&#1083;&#1080; &#1085;&#1077;&#1090;
1305 </DOCUMENTATION>
1306 <TITRE_VALEUR valeur="interdit">&#1047;&#1072;&#1087;&#1088;&#1077;&#1097;&#1077;&#1085;&#1086;</TITRE_VALEUR>
1307 <TITRE_VALEUR valeur="autorise">&#1056;&#1072;&#1079;&#1088;&#1077;&#1096;&#1077;&#1085;&#1086;</TITRE_VALEUR>
1308 </STRINGS_ATTRIBUT>
1309 </STRINGS_ELEMENT>
1310 <STRINGS_ELEMENT element="SOUS-ELEMENT">
1311 <TITRE>&#1055;&#1086;&#1076;&#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1312 <DOCUMENTATION>
1313 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090; &#1074;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1099;&#1077; &#1087;&#1086;&#1076;&#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1099;
1314 </DOCUMENTATION>
1315 <STRINGS_ATTRIBUT attribut="element">
1316 <TITRE>&#1069;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1317 <DOCUMENTATION>
1318 &#1048;&#1084;&#1103; &#1087;&#1086;&#1076;&#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;. &#1057;&#1072;&#1084; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090; &#1076;&#1086;&#1083;&#1078;&#1077;&#1085; &#1073;&#1099;&#1090;&#1100; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085; &#1086;&#1090;&#1076;&#1077;&#1083;&#1100;&#1085;&#1086;.
1319 </DOCUMENTATION>
1320 </STRINGS_ATTRIBUT>
1321 </STRINGS_ELEMENT>
1322 <STRINGS_ELEMENT element="SOUS-ENSEMBLE">
1323 <TITRE>&#1055;&#1086;&#1076;&#1085;&#1072;&#1073;&#1086;&#1088;</TITRE>
1324 <DOCUMENTATION>
1325 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090; &#1084;&#1085;&#1086;&#1078;&#1077;&#1089;&#1090;&#1074;&#1086; &#1074;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1099;&#1093; &#1087;&#1086;&#1076;&#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;.
1326 </DOCUMENTATION>
1327 <STRINGS_ATTRIBUT attribut="ensemble">
1328 <TITRE>&#1053;&#1072;&#1073;&#1086;&#1088;</TITRE>
1329 <DOCUMENTATION>
1330 &#1048;&#1084;&#1103; &#1085;&#1072;&#1073;&#1086;&#1088;&#1072; &#1087;&#1086;&#1076;&#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;. &#1057;&#1072;&#1084; &#1085;&#1072;&#1073;&#1086;&#1088; &#1076;&#1086;&#1083;&#1078;&#1077;&#1085; &#1073;&#1099;&#1090;&#1100; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085; &#1086;&#1090;&#1076;&#1077;&#1083;&#1100;&#1085;&#1086;.
1331 </DOCUMENTATION>
1332 </STRINGS_ATTRIBUT>
1333 </STRINGS_ELEMENT>
1334 <STRINGS_ELEMENT element="ATTRIBUT">
1335 <TITRE>&#1040;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;</TITRE>
1336 <DOCUMENTATION>
1337 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;
1338 </DOCUMENTATION>
1339 <STRINGS_ATTRIBUT attribut="nom">
1340 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1341 <DOCUMENTATION>
1342 &#1048;&#1084;&#1103; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072;
1343 </DOCUMENTATION>
1344 </STRINGS_ATTRIBUT>
1345 <STRINGS_ATTRIBUT attribut="presence">
1346 <TITRE>&#1054;&#1073;&#1103;&#1079;&#1072;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086;&#1089;&#1090;&#1100;</TITRE>
1347 <TITRE_VALEUR valeur="obligatoire">&#1058;&#1088;&#1077;&#1073;&#1091;&#1077;&#1090;&#1089;&#1103;</TITRE_VALEUR>
1348 <TITRE_VALEUR valeur="optionelle">&#1054;&#1087;&#1094;&#1080;&#1086;&#1085;&#1072;&#1083;&#1100;&#1085;&#1086;</TITRE_VALEUR>
1349 </STRINGS_ATTRIBUT>
1350 </STRINGS_ELEMENT>
1351 <STRINGS_ELEMENT element="VALEUR">
1352 <TITRE>&#1047;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077;</TITRE>
1353 <DOCUMENTATION>
1354 &#1042;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1086;&#1077; &#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077;
1355 </DOCUMENTATION>
1356 </STRINGS_ELEMENT>
1357 <STRINGS_ELEMENT element="ENSEMBLE">
1358 <TITRE>&#1053;&#1072;&#1073;&#1086;&#1088;</TITRE>
1359 <DOCUMENTATION>
1360 &#1053;&#1072;&#1073;&#1086;&#1088; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;
1361 </DOCUMENTATION>
1362 <STRINGS_ATTRIBUT attribut="nom">
1363 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1364 <DOCUMENTATION>
1365 &#1048;&#1084;&#1103; &#1085;&#1072;&#1073;&#1086;&#1088;&#1072;
1366 </DOCUMENTATION>
1367 </STRINGS_ATTRIBUT>
1368 </STRINGS_ELEMENT>
1369 <STRINGS_ELEMENT element="RACINE">
1370 <TITRE>&#1050;&#1086;&#1088;&#1077;&#1085;&#1077;&#1074;&#1086;&#1081; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1371 <DOCUMENTATION>
1372 &#1050;&#1086;&#1088;&#1085;&#1077;&#1074;&#1086;&#1081; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090; &#1076;&#1083;&#1103; &#1085;&#1072;&#1089;&#1090;&#1088;&#1072;&#1080;&#1074;&#1072;&#1077;&#1084;&#1086;&#1075;&#1086; &#1103;&#1079;&#1099;&#1082;&#1072; XML.
1373 </DOCUMENTATION>
1374 <STRINGS_ATTRIBUT attribut="element">
1375 <TITRE>&#1069;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1376 <DOCUMENTATION>
1377 &#1048;&#1084;&#1103; &#1082;&#1086;&#1088;&#1085;&#1077;&#1074;&#1086;&#1075;&#1086; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;
1378 </DOCUMENTATION>
1379 </STRINGS_ATTRIBUT>
1380 </STRINGS_ELEMENT>
1381 <STRINGS_ELEMENT element="AUTRE_CONFIG">
1382 <TITRE>&#1044;&#1086;&#1087;. &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1080;</TITRE>
1383 <DOCUMENTATION>
1384 &#1044;&#1086;&#1087;&#1086;&#1083;&#1085;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1099;&#1077; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1086;&#1085;&#1085;&#1099;&#1077; &#1092;&#1072;&#1081;&#1083;&#1099;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; Jaxe &#1073;&#1091;&#1076;&#1077;&#1090;
1385 &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1100; &#1074;&#1084;&#1077;&#1089;&#1090;&#1077; &#1089; &#1101;&#1090;&#1080;&#1084;.
1386 </DOCUMENTATION>
1387 <STRINGS_ATTRIBUT attribut="nom">
1388 <TITRE>&#1048;&#1084;&#1103;/&#1087;&#1091;&#1090;&#1100;</TITRE>
1389 <DOCUMENTATION>
1390 &#1055;&#1091;&#1090;&#1100; &#1082; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1086;&#1085;&#1085;&#1086;&#1084;&#1091; &#1092;&#1072;&#1081;&#1083;&#1091; &#1086;&#1090;&#1085;&#1086;&#1089;&#1080;&#1090;&#1077;&#1083;&#1100;&#1085;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1391 </DOCUMENTATION>
1392 </STRINGS_ATTRIBUT>
1393 </STRINGS_ELEMENT>
1394 <STRINGS_ELEMENT element="ENREGISTREMENT">
1395 <TITRE>&#1054;&#1087;&#1094;&#1080;&#1080; &#1089;&#1086;&#1093;&#1088;&#1072;&#1085;&#1077;&#1085;&#1080;&#1103;</TITRE>
1396 <DOCUMENTATION>
1397 &#1054;&#1087;&#1094;&#1080;&#1080;, &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1102;&#1097;&#1080;&#1077;, &#1082;&#1072;&#1082; &#1073;&#1091;&#1076;&#1077;&#1090; &#1089;&#1086;&#1093;&#1088;&#1072;&#1085;&#1103;&#1090;&#1100;&#1089;&#1103; XML &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090; &#1074; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1080;&#1080; &#1089;
1398 &#1101;&#1090;&#1080;&#1084; &#1092;&#1072;&#1081;&#1083;&#1086;&#1084; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1399 </DOCUMENTATION>
1400 </STRINGS_ELEMENT>
1401 <STRINGS_ELEMENT element="ENCODAGE">
1402 <TITRE>&#1050;&#1086;&#1076;&#1080;&#1088;&#1086;&#1074;&#1082;&#1072;</TITRE>
1403 <DOCUMENTATION>
1404 &#1050;&#1086;&#1076;&#1080;&#1088;&#1086;&#1074;&#1082;&#1072; &#1076;&#1083;&#1103; &#1085;&#1086;&#1074;&#1099;&#1093; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;. &#1055;&#1086; &#1091;&#1084;&#1086;&#1083;&#1095;&#1072;&#1085;&#1080;&#1102; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1090;&#1089;&#1103; ISO-8859-1.
1405 </DOCUMENTATION>
1406 </STRINGS_ELEMENT>
1407 <STRINGS_ELEMENT element="DOCTYPE">
1408 <TITRE>DOCTYPE &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;</TITRE>
1409 <DOCUMENTATION>
1410 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077; DOCTYPE &#1076;&#1083;&#1103; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;, &#1089;&#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1085;&#1099;&#1093; &#1089; &#1087;&#1086;&#1084;&#1086;&#1097;&#1100;&#1102; &#1076;&#1072;&#1085;&#1085;&#1086;&#1075;&#1086;
1411 &#1092;&#1072;&#1081;&#1083;&#1072; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1412 </DOCUMENTATION>
1413 <STRINGS_ATTRIBUT attribut="publicId">
1414 <TITRE>publicId</TITRE>
1415 </STRINGS_ATTRIBUT>
1416 <STRINGS_ATTRIBUT attribut="systemId">
1417 <TITRE>systemId</TITRE>
1418 </STRINGS_ATTRIBUT>
1419 </STRINGS_ELEMENT>
1420 <STRINGS_ELEMENT element="PREFIXE_ESPACE">
1421 <TITRE>&#1055;&#1088;&#1077;&#1092;&#1080;&#1082;&#1089; &#1087;&#1088;&#1086;&#1089;&#1090;&#1088;&#1072;&#1085;&#1089;&#1090;&#1074;&#1072; &#1080;&#1084;&#1077;&#1085;</TITRE>
1422 <DOCUMENTATION>
1423 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1080;&#1090;&#1100; &#1087;&#1088;&#1077;&#1092;&#1080;&#1082;&#1089; &#1087;&#1088;&#1086;&#1089;&#1090;&#1088;&#1072;&#1085;&#1089;&#1090;&#1074;&#1072; &#1080;&#1084;&#1077;&#1085;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1081; &#1073;&#1091;&#1076;&#1077;&#1090; &#1087;&#1088;&#1080;&#1089;&#1074;&#1086;&#1077;&#1085; &#1082;&#1086; &#1074;&#1089;&#1077;&#1084; &#1092;&#1072;&#1081;&#1083;&#1072;&#1084;,
1424 &#1089;&#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1085;&#1099;&#1084; &#1089; &#1087;&#1086;&#1084;&#1086;&#1097;&#1100;&#1102; &#1076;&#1072;&#1085;&#1085;&#1086;&#1075;&#1086; &#1092;&#1072;&#1081;&#1083;&#1072; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1425 </DOCUMENTATION>
1426 <STRINGS_ATTRIBUT attribut="prefixe">
1427 <TITRE>&#1055;&#1088;&#1077;&#1092;&#1080;&#1082;&#1089;</TITRE>
1428 <DOCUMENTATION>
1429 Prefix to use
1430 </DOCUMENTATION>
1431 </STRINGS_ATTRIBUT>
1432 <STRINGS_ATTRIBUT attribut="uri">
1433 <TITRE>uri</TITRE>
1434 <DOCUMENTATION>
1435 The corresponding namespace
1436 </DOCUMENTATION>
1437 </STRINGS_ATTRIBUT>
1438 </STRINGS_ELEMENT>
1439 <STRINGS_ELEMENT element="MENUS">
1440 <TITRE>&#1054;&#1087;&#1094;&#1080;&#1080; &#1084;&#1077;&#1085;&#1102;</TITRE>
1441 <DOCUMENTATION>
1442 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1080;&#1077; &#1086;&#1087;&#1094;&#1080;&#1081; &#1076;&#1083;&#1103; &#1084;&#1077;&#1085;&#1102;, &#1089; &#1087;&#1086;&#1084;&#1086;&#1097;&#1100;&#1102; &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1075;&#1086; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1100; &#1089;&#1084;&#1086;&#1078;&#1077;&#1090; &#1074;&#1089;&#1090;&#1072;&#1074;&#1083;&#1103;&#1090;&#1100;
1443 &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1099; &#1074; &#1092;&#1086;&#1088;&#1084;&#1080;&#1088;&#1091;&#1077;&#1084;&#1099;&#1081; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090; &#1080; &#1074;&#1099;&#1079;&#1099;&#1074;&#1072;&#1090;&#1100; &#1082;&#1072;&#1089;&#1090;&#1086;&#1084;&#1080;&#1079;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1085;&#1099;&#1077; &#1092;&#1091;&#1085;&#1082;&#1094;&#1080;&#1080;.
1444 </DOCUMENTATION>
1445 </STRINGS_ELEMENT>
1446 <STRINGS_ELEMENT element="MENU">
1447 <TITRE>&#1044;&#1086;&#1073;. &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1448 <DOCUMENTATION>
1449 &#1044;&#1086;&#1073;&#1072;&#1074;&#1083;&#1077;&#1085;&#1080;&#1077; &#1085;&#1086;&#1074;&#1086;&#1075;&#1086; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072; &#1080; &#1076;&#1088;&#1091;&#1075;&#1080;&#1093; &#1091;&#1079;&#1083;&#1086;&#1074;.
1450 </DOCUMENTATION>
1451 <STRINGS_ATTRIBUT attribut="nom">
1452 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1453 <DOCUMENTATION>
1454 Menu name, used to refer to the menu when a title is defined.
1455 The name is used as a title if no title is defined.
1456 Beware to avoid using element names, to avoid ambiguities in the menu titles.
1457 </DOCUMENTATION>
1458 </STRINGS_ATTRIBUT>
1459 </STRINGS_ELEMENT>
1460 <STRINGS_ELEMENT element="MENU_INSERTION">
1461 <TITRE>Insertion menu</TITRE>
1462 <DOCUMENTATION>
1463 Menu to insert a node into the document (XML elements,
1464 processing instructions, or XML comments)
1465 </DOCUMENTATION>
1466 <STRINGS_ATTRIBUT attribut="nom">
1467 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1468 <DOCUMENTATION>
1469 The name of the node. Is also used as a reference to define a title.
1470 The name is used as a title if no title is defined.
1471 </DOCUMENTATION>
1472 </STRINGS_ATTRIBUT>
1473 <STRINGS_ATTRIBUT attribut="type_noeud">
1474 <TITRE>&#1058;&#1080;&#1087; &#1091;&#1079;&#1083;&#1072;</TITRE>
1475 <DOCUMENTATION>
1476 &#1058;&#1080;&#1087; &#1091;&#1079;&#1083;&#1072; XML
1477 </DOCUMENTATION>
1478 <TITRE_VALEUR valeur="element">&#1069;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE_VALEUR>
1479 <TITRE_VALEUR valeur="instruction">&#1048;&#1085;&#1089;&#1090;&#1088;&#1091;&#1082;&#1094;&#1080;&#1103;</TITRE_VALEUR>
1480 <TITRE_VALEUR valeur="commentaire">&#1050;&#1086;&#1084;&#1084;&#1077;&#1085;&#1090;&#1072;&#1088;&#1080;&#1081;</TITRE_VALEUR>
1481 </STRINGS_ATTRIBUT>
1482 <STRINGS_ATTRIBUT attribut="raccourci">
1483 <TITRE>&#1050;&#1086;&#1084;&#1073;&#1080;&#1085;&#1072;&#1094;&#1080;&#1103; &#1082;&#1083;&#1072;&#1074;&#1080;&#1096;</TITRE>
1484 <DOCUMENTATION>
1485 &#1050;&#1083;&#1072;&#1074;&#1080;&#1096;&#1085;&#1072;&#1103; &#1082;&#1086;&#1084;&#1073;&#1080;&#1085;&#1072;&#1094;&#1080;&#1103; &#1073;&#1099;&#1089;&#1090;&#1088;&#1086;&#1075;&#1086; &#1074;&#1099;&#1079;&#1086;&#1074;&#1072;, &#1087;&#1088;&#1080;&#1074;&#1086;&#1076;&#1103;&#1097;&#1072;&#1103; &#1082; &#1074;&#1099;&#1079;&#1086;&#1074;&#1091; &#1101;&#1090;&#1086;&#1075;&#1086; &#1087;&#1091;&#1085;&#1082;&#1090;&#1072; &#1084;&#1077;&#1085;&#1102;.
1486 </DOCUMENTATION>
1487 </STRINGS_ATTRIBUT>
1488 </STRINGS_ELEMENT>
1489 <STRINGS_ELEMENT element="MENU_FONCTION">
1490 <TITRE>&#1044;&#1086;&#1073;. &#1074;&#1099;&#1079;&#1086;&#1074; &#1092;&#1091;&#1085;&#1082;&#1094;&#1080;&#1080;</TITRE>
1491 <DOCUMENTATION>
1492 &#1044;&#1086;&#1073;&#1072;&#1074;&#1083;&#1077;&#1085;&#1080;&#1077; &#1087;&#1091;&#1085;&#1082;&#1090;&#1072; &#1084;&#1077;&#1085;&#1102;, &#1087;&#1088;&#1080; &#1074;&#1099;&#1073;&#1086;&#1088;&#1077; &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1075;&#1086; &#1073;&#1091;&#1076;&#1077;&#1090; &#1074;&#1099;&#1079;&#1099;&#1074;&#1072;&#1090;&#1100;&#1089;&#1103; &#1092;&#1091;&#1085;&#1082;&#1094;&#1080;&#1103;,
1493 &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1085;&#1072;&#1103; &#1082;&#1072;&#1082; &#1087;&#1083;&#1072;&#1075;&#1080;&#1085;.
1494 </DOCUMENTATION>
1495 <STRINGS_ATTRIBUT attribut="nom">
1496 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1497 <DOCUMENTATION>
1498 The function name. Used as a reference to define a title.
1499 The name is used as a title if no title is defined.
1500 Beware to avoid using element names, to avoid ambiguities in the menu titles.
1501 </DOCUMENTATION>
1502 </STRINGS_ATTRIBUT>
1503 <STRINGS_ATTRIBUT attribut="classe">
1504 <TITRE>&#1050;&#1083;&#1072;&#1089;&#1089;</TITRE>
1505 <DOCUMENTATION>
1506 Java &#1082;&#1083;&#1072;&#1089;&#1089; &#1092;&#1091;&#1085;&#1082;&#1094;&#1080;&#1080;
1507 </DOCUMENTATION>
1508 </STRINGS_ATTRIBUT>
1509 <STRINGS_ATTRIBUT attribut="raccourci">
1510 <TITRE>&#1050;&#1086;&#1084;&#1073;&#1080;&#1085;&#1072;&#1094;&#1080;&#1103; &#1082;&#1083;&#1072;&#1074;&#1080;&#1096;</TITRE>
1511 <DOCUMENTATION>
1512 &#1050;&#1083;&#1072;&#1074;&#1080;&#1096;&#1085;&#1072;&#1103; &#1082;&#1086;&#1084;&#1073;&#1080;&#1085;&#1072;&#1094;&#1080;&#1103; &#1073;&#1099;&#1089;&#1090;&#1088;&#1086;&#1075;&#1086; &#1074;&#1099;&#1079;&#1086;&#1074;&#1072;, &#1087;&#1088;&#1080;&#1074;&#1086;&#1076;&#1103;&#1097;&#1072;&#1103; &#1082; &#1074;&#1099;&#1079;&#1086;&#1074;&#1091; &#1101;&#1090;&#1086;&#1075;&#1086; &#1087;&#1091;&#1085;&#1082;&#1090;&#1072; &#1084;&#1077;&#1085;&#1102;.
1513 </DOCUMENTATION>
1514 </STRINGS_ATTRIBUT>
1515 </STRINGS_ELEMENT>
1516 <STRINGS_ELEMENT element="PARAMETRE">
1517 <TITRE>&#1055;&#1072;&#1088;&#1072;&#1084;&#1077;&#1090;&#1088;</TITRE>
1518 <DOCUMENTATION>
1519 &#1055;&#1072;&#1088;&#1072;&#1084;&#1077;&#1090;&#1088; &#1074; &#1074;&#1080;&#1076;&#1077; &#1087;&#1072;&#1088;&#1099; &#1080;&#1084;&#1103;/&#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077;
1520 </DOCUMENTATION>
1521 <STRINGS_ATTRIBUT attribut="nom">
1522 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1523 </STRINGS_ATTRIBUT>
1524 <STRINGS_ATTRIBUT attribut="valeur">
1525 <TITRE>&#1047;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077;</TITRE>
1526 </STRINGS_ATTRIBUT>
1527 </STRINGS_ELEMENT>
1528 <STRINGS_ELEMENT element="SEPARATEUR">
1529 <TITRE>&#1056;&#1072;&#1079;&#1076;&#1077;&#1083;&#1080;&#1090;&#1077;&#1083;&#1100;</TITRE>
1530 <DOCUMENTATION>
1531 &#1057; &#1087;&#1086;&#1084;&#1086;&#1097;&#1100;&#1102; &#1088;&#1072;&#1079;&#1076;&#1077;&#1083;&#1080;&#1090;&#1077;&#1083;&#1103; &#1084;&#1086;&#1078;&#1085;&#1086; &#1076;&#1086;&#1073;&#1072;&#1074;&#1080;&#1090;&#1100; &#1095;&#1077;&#1088;&#1090;&#1091; &#1084;&#1077;&#1078;&#1076;&#1091; &#1087;&#1091;&#1085;&#1082;&#1090;&#1072;&#1084;&#1080; &#1084;&#1077;&#1085;&#1102;.
1532 </DOCUMENTATION>
1533 </STRINGS_ELEMENT>
1534 <STRINGS_ELEMENT element="AFFICHAGE_NOEUDS">
1535 <TITRE>&#1054;&#1087;&#1094;&#1080;&#1080; &#1074;&#1080;&#1076;&#1072;</TITRE>
1536 <DOCUMENTATION>
1537 &#1054;&#1087;&#1094;&#1080;&#1080;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1077; &#1073;&#1091;&#1076;&#1091;&#1090; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1090;&#1100;, &#1082;&#1072;&#1082; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1100; &#1091;&#1074;&#1080;&#1076;&#1080;&#1090; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1099;
1538 &#1074;&#1086; &#1074;&#1088;&#1077;&#1084;&#1103; &#1088;&#1077;&#1076;&#1072;&#1082;&#1090;&#1080;&#1088;&#1086;&#1074;&#1072;&#1085;&#1080;&#1103; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;.
1539 </DOCUMENTATION>
1540 </STRINGS_ELEMENT>
1541 <STRINGS_ELEMENT element="AFFICHAGE_ELEMENT">
1542 <TITRE>&#1042;&#1080;&#1076; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;</TITRE>
1543 <DOCUMENTATION>
1544 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090;, &#1082;&#1072;&#1082; &#1073;&#1091;&#1076;&#1077;&#1090; &#1074;&#1099;&#1075;&#1083;&#1103;&#1076;&#1077;&#1090;&#1100; XML &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090; &#1074; Jaxe.
1545 &#1055;&#1086;&#1078;&#1072;&#1083;&#1091;&#1081;&#1089;&#1090;&#1072; &#1086;&#1073;&#1088;&#1072;&#1090;&#1080;&#1090;&#1077;&#1089;&#1100; &#1082; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1080;, &#1095;&#1090;&#1086;&#1073;&#1099; &#1087;&#1086;&#1085;&#1103;&#1090;&#1100;, &#1089; &#1082;&#1072;&#1082;&#1080;&#1084;&#1080; &#1090;&#1080;&#1087;&#1072;&#1084;&#1080;
1546 &#1082;&#1072;&#1082;&#1080;&#1077; &#1087;&#1072;&#1088;&#1072;&#1084;&#1077;&#1090;&#1088;&#1099; &#1084;&#1086;&#1075;&#1091;&#1090; &#1087;&#1088;&#1080;&#1084;&#1077;&#1085;&#1103;&#1090;&#1100;&#1089;&#1103;.
1547 </DOCUMENTATION>
1548 <STRINGS_ATTRIBUT attribut="element">
1549 <TITRE>&#1048;&#1084;&#1103;</TITRE>
1550 <DOCUMENTATION>
1551 &#1048;&#1084;&#1103; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;. &#1057;&#1072;&#1084; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090; &#1076;&#1086;&#1083;&#1078;&#1077;&#1085; &#1073;&#1099;&#1090;&#1100; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085; &#1074; &#1089;&#1093;&#1077;&#1084;&#1077;.
1552 </DOCUMENTATION>
1553 </STRINGS_ATTRIBUT>
1554 <STRINGS_ATTRIBUT attribut="type">
1555 <TITRE>&#1058;&#1080;&#1087;</TITRE>
1556 <DOCUMENTATION>
1557 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090; &#1090;&#1080;&#1087; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;.
1558 &#1044;&#1083;&#1103; &#1088;&#1103;&#1076;&#1072; &#1090;&#1080;&#1087;&#1086;&#1074; &#1085;&#1077;&#1086;&#1073;&#1093;&#1086;&#1076;&#1080;&#1084;&#1086; &#1091;&#1082;&#1072;&#1079;&#1072;&#1090;&#1100; &#1087;&#1072;&#1088;&#1072;&#1084;&#1077;&#1090;&#1088;&#1099;. &#1054;&#1073;&#1088;&#1072;&#1090;&#1080;&#1090;&#1077;&#1089;&#1100; &#1087;&#1086;&#1078;&#1072;&#1083;&#1091;&#1081;&#1089;&#1090;&#1072;
1559 &#1082; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1080;, &#1095;&#1090;&#1086;&#1073;&#1099; &#1087;&#1086;&#1085;&#1103;&#1090;&#1100;, &#1082;&#1072;&#1082;&#1080;&#1077; &#1087;&#1072;&#1088;&#1072;&#1084;&#1077;&#1090;&#1088;&#1099;, &#1082;&#1072;&#1082;&#1086;&#1084;&#1091; &#1090;&#1080;&#1087;&#1091; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1090;.
1560 </DOCUMENTATION>
1561 <TITRE_VALEUR valeur="division">division</TITRE_VALEUR>
1562 <TITRE_VALEUR valeur="zone">area</TITRE_VALEUR>
1563 <TITRE_VALEUR valeur="string">string</TITRE_VALEUR>
1564 <TITRE_VALEUR valeur="vide">empty</TITRE_VALEUR>
1565 <TITRE_VALEUR valeur="tableau">table</TITRE_VALEUR>
1566 <TITRE_VALEUR valeur="tabletexte">text table</TITRE_VALEUR>
1567 <TITRE_VALEUR valeur="typesimple">simple type</TITRE_VALEUR>
1568 <TITRE_VALEUR valeur="style">style</TITRE_VALEUR>
1569 <TITRE_VALEUR valeur="fichier">file</TITRE_VALEUR>
1570 <TITRE_VALEUR valeur="symbole">symbol</TITRE_VALEUR>
1571 <TITRE_VALEUR valeur="liste">list</TITRE_VALEUR>
1572 <TITRE_VALEUR valeur="item">item</TITRE_VALEUR>
1573 <TITRE_VALEUR valeur="equation">equation</TITRE_VALEUR>
1574 <TITRE_VALEUR valeur="formulaire">form</TITRE_VALEUR>
1575 <TITRE_VALEUR valeur="plugin">plugin</TITRE_VALEUR>
1576 </STRINGS_ATTRIBUT>
1577 </STRINGS_ELEMENT>
1578 <STRINGS_ELEMENT element="VALEUR_SUGGEREE">
1579 <TITRE>&#1047;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1103; &#1087;&#1086;-&#1091;&#1084;&#1086;&#1083;&#1095;&#1072;&#1085;&#1080;&#1102;</TITRE>
1580 <DOCUMENTATION>
1581 &#1058;&#1086; &#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1077; &#1080;&#1079; &#1074;&#1089;&#1077;&#1093; &#1074;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1099;&#1093;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1077; &#1073;&#1091;&#1076;&#1077;&#1090; &#1087;&#1077;&#1088;&#1074;&#1099;&#1084; &#1087;&#1088;&#1077;&#1076;&#1083;&#1086;&#1078;&#1077;&#1085;&#1086; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1102;.
1582 </DOCUMENTATION>
1583 </STRINGS_ELEMENT>
1584 <STRINGS_ELEMENT element="AFFICHAGE_ATTRIBUT">
1585 <TITRE>&#1042;&#1080;&#1076; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072;</TITRE>
1586 <DOCUMENTATION>
1587 &#1054;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1103;&#1077;&#1090;, &#1082;&#1072;&#1082; &#1073;&#1091;&#1076;&#1077;&#1090; &#1074;&#1099;&#1075;&#1083;&#1103;&#1076;&#1077;&#1090;&#1100; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;.
1588 Currently, only supports attribute values that can be suggested when
1589 the values are not fixed by the schema.
1590 </DOCUMENTATION>
1591 <STRINGS_ATTRIBUT attribut="attribut">
1592 <TITRE>&#1040;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;</TITRE>
1593 <DOCUMENTATION>
1594 &#1048;&#1084;&#1103; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072; (&#1076;&#1086;&#1083;&#1078;&#1085;&#1086; &#1073;&#1099;&#1090;&#1100; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1086; &#1074; &#1089;&#1093;&#1077;&#1084;&#1077;).
1595 </DOCUMENTATION>
1596 </STRINGS_ATTRIBUT>
1597 </STRINGS_ELEMENT>
1598 <STRINGS_ELEMENT element="PLUGIN_INSTRUCTION">
1599 <TITRE>Jaxe Plugin</TITRE>
1600 <DOCUMENTATION>
1601 &#1048;&#1085;&#1086;&#1075;&#1076;&#1072; &#1074;&#1080;&#1076;&#1086;&#1074; &#1089;&#1090;&#1072;&#1085;&#1076;&#1072;&#1088;&#1090;&#1085;&#1099;&#1093; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1086;&#1074;, &#1087;&#1086;&#1089;&#1090;&#1072;&#1074;&#1083;&#1103;&#1077;&#1084;&#1099;&#1093; Jaxe-&#1086;&#1084; &#1086;&#1082;&#1072;&#1079;&#1099;&#1074;&#1072;&#1077;&#1090;&#1089;&#1103;
1602 &#1085;&#1077;&#1076;&#1086;&#1089;&#1090;&#1072;&#1090;&#1086;&#1095;&#1085;&#1086;. &#1042; &#1090;&#1072;&#1082;&#1086;&#1081; &#1089;&#1080;&#1090;&#1091;&#1072;&#1094;&#1080;&#1080; &#1091; &#1088;&#1072;&#1079;&#1088;&#1072;&#1073;&#1086;&#1090;&#1095;&#1080;&#1082;&#1072; &#1077;&#1089;&#1090;&#1100; &#1074;&#1086;&#1079;&#1084;&#1086;&#1078;&#1085;&#1086;&#1089;&#1090;&#1100; &#1089;&#1086;&#1079;&#1076;&#1072;&#1090;&#1100;
1603 &#1089;&#1074;&#1086;&#1080; &#1086;&#1089;&#1086;&#1073;&#1099;&#1077; &#1074;&#1080;&#1076;&#1099; &#1074; &#1092;&#1086;&#1088;&#1084;&#1077; &#1082;&#1083;&#1072;&#1089;&#1089;&#1072;, &#1086;&#1090;&#1085;&#1072;&#1089;&#1083;&#1077;&#1076;&#1086;&#1074;&#1072;&#1085;&#1085;&#1086;&#1075;&#1086; &#1086;&#1090; "jaxe.Elements".
1604 &#1055;&#1086;&#1076;&#1082;&#1083;&#1102;&#1095;&#1072;&#1077;&#1090;&#1089;&#1103; &#1090;&#1072;&#1082;&#1086;&#1081; &#1074;&#1080;&#1076; &#1089; &#1087;&#1086;&#1084;&#1086;&#1097;&#1100;&#1102; &#1076;&#1072;&#1085;&#1085;&#1086;&#1081; &#1080;&#1085;&#1089;&#1090;&#1088;&#1091;&#1082;&#1094;&#1080;&#1080;.
1605 </DOCUMENTATION>
1606 <STRINGS_ATTRIBUT attribut="cible">
1607 <TITRE>target</TITRE>
1608 <DOCUMENTATION>
1609 Processing instruction target (name of the node)
1610 </DOCUMENTATION>
1611 </STRINGS_ATTRIBUT>
1612 </STRINGS_ELEMENT>
1613 <STRINGS_ELEMENT element="PLUGIN_COMMENTAIRE">
1614 <TITRE>XML comment plugin</TITRE>
1615 <DOCUMENTATION>
1616 Plugin to use to display XML comments
1617 </DOCUMENTATION>
1618 </STRINGS_ELEMENT>
1619 <STRINGS_ELEMENT element="EXPORTS">
1620 <TITRE>&#1054;&#1087;&#1094;&#1080;&#1080; &#1101;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;&#1072;</TITRE>
1621 <DOCUMENTATION>
1622 A set of export methods, to XML or HTML documents,
1623 using XSLT transforms.
1624 </DOCUMENTATION>
1625 </STRINGS_ELEMENT>
1626 <STRINGS_ELEMENT element="EXPORT">
1627 <TITRE>Export</TITRE>
1628 <DOCUMENTATION>
1629 Informations to display an HTML preview or export to another XML language,
1630 with a list of successive XSLT transforms. The output can also be a PDF file
1631 if XSL-FO is used in the last XSLT transform.
1632 </DOCUMENTATION>
1633 <STRINGS_ATTRIBUT attribut="nom">
1634 <TITRE>name</TITRE>
1635 <DOCUMENTATION>
1636 Export name. Used as a title if no title is defined.
1637 </DOCUMENTATION>
1638 </STRINGS_ATTRIBUT>
1639 <STRINGS_ATTRIBUT attribut="sortie">
1640 <TITRE>output</TITRE>
1641 </STRINGS_ATTRIBUT>
1642 </STRINGS_ELEMENT>
1643 <STRINGS_ELEMENT element="FICHIER_XSL">
1644 <TITRE>&#1060;&#1072;&#1081;&#1083; XSL</TITRE>
1645 <DOCUMENTATION>
1646 &#1060;&#1072;&#1081;&#1083; XSL &#1087;&#1088;&#1077;&#1086;&#1073;&#1088;&#1072;&#1079;&#1086;&#1074;&#1072;&#1085;&#1080;&#1103;.
1647 </DOCUMENTATION>
1648 <STRINGS_ATTRIBUT attribut="nom">
1649 <TITRE>&#1048;&#1084;&#1103;/&#1087;&#1091;&#1090;&#1100;</TITRE>
1650 <DOCUMENTATION>
1651 &#1055;&#1091;&#1090;&#1100; &#1076;&#1086; XSL &#1092;&#1072;&#1081;&#1083;&#1072;, &#1085;&#1072;&#1095;&#1080;&#1085;&#1072;&#1103; &#1086;&#1090; &#1092;&#1072;&#1081;&#1083;&#1072; &#1082;&#1086;&#1085;&#1092;&#1080;&#1075;&#1091;&#1088;&#1072;&#1094;&#1080;&#1080;.
1652 </DOCUMENTATION>
1653 </STRINGS_ATTRIBUT>
1654 </STRINGS_ELEMENT>
1655 <STRINGS_ELEMENT element="STRINGS">
1656 <TITRE>&#1054;&#1087;&#1094;&#1080;&#1080; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1103;</TITRE>
1657 <DOCUMENTATION>
1658 &#1042;&#1089;&#1077; &#1083;&#1086;&#1082;&#1072;&#1083;&#1080;&#1079;&#1086;&#1074;&#1072;&#1085;&#1085;&#1099;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1103; &#1084;&#1077;&#1085;&#1102;, &#1079;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1082;&#1086;&#1074;, &#1087;&#1086;&#1076;&#1089;&#1082;&#1072;&#1079;&#1086;&#1082; &#1080; &#1090;.&#1087;.
1659 </DOCUMENTATION>
1660 <STRINGS_ATTRIBUT attribut="langue">
1661 <TITRE>&#1071;&#1079;&#1099;&#1082;</TITRE>
1662 <DOCUMENTATION>
1663 &#1050;&#1086;&#1076; &#1103;&#1079;&#1099;&#1082;&#1072; &#1076;&#1083;&#1103; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1081; &#1074; &#1092;&#1086;&#1088;&#1084;&#1072;&#1090;&#1077; ISO-639 (2 &#1089;&#1080;&#1084;&#1074;&#1086;&#1083;&#1072; &#1074; &#1085;&#1080;&#1078;&#1085;&#1077;&#1084; &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1077;)
1664 </DOCUMENTATION>
1665 </STRINGS_ATTRIBUT>
1666 <STRINGS_ATTRIBUT attribut="pays">
1667 <TITRE>&#1057;&#1090;&#1088;&#1072;&#1085;&#1072;</TITRE>
1668 <DOCUMENTATION>
1669 &#1050;&#1086;&#1076; &#1089;&#1090;&#1088;&#1072;&#1085;&#1099; &#1074; &#1092;&#1086;&#1088;&#1084;&#1072;&#1090;&#1077; ISO-3166 (2 &#1089;&#1080;&#1084;&#1074;&#1086;&#1083;&#1072; &#1074; &#1074;&#1077;&#1088;&#1085;&#1077;&#1084; &#1088;&#1077;&#1075;&#1080;&#1089;&#1090;&#1088;&#1077;)
1670 </DOCUMENTATION>
1671 </STRINGS_ATTRIBUT>
1672 </STRINGS_ELEMENT>
1673 <STRINGS_ELEMENT element="DESCRIPTION_CONFIG">
1674 <TITRE>&#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1092;&#1072;&#1081;&#1083;&#1072; &#1085;&#1072;&#1089;&#1090;&#1088;&#1086;&#1077;&#1082;</TITRE>
1675 <DOCUMENTATION>
1676 &#1050;&#1088;&#1072;&#1090;&#1082;&#1086;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077;, &#1085;&#1072; &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1077; &#1073;&#1091;&#1076;&#1077;&#1090; &#1086;&#1088;&#1080;&#1077;&#1085;&#1090;&#1080;&#1088;&#1086;&#1074;&#1072;&#1090;&#1100;&#1089;&#1103; &#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1077;&#1083;&#1100;, &#1087;&#1088;&#1080;
1677 &#1074;&#1099;&#1073;&#1086;&#1088;&#1077; &#1085;&#1072;&#1089;&#1090;&#1088;&#1086;&#1077;&#1082; &#1076;&#1083;&#1103; &#1085;&#1086;&#1074;&#1086;&#1075;&#1086; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;.
1678 </DOCUMENTATION>
1679 </STRINGS_ELEMENT>
1680 <STRINGS_ELEMENT element="STRINGS_MENU">
1681 <TITRE>&#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1084;&#1077;&#1085;&#1102;</TITRE>
1682 <DOCUMENTATION>
1683 &#1047;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1086;&#1082; &#1080; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1103; &#1076;&#1083;&#1103; &#1084;&#1077;&#1085;&#1102;. &#1045;&#1089;&#1083;&#1080; &#1090;&#1072;&#1082;&#1086;&#1074;&#1099;&#1077; &#1085;&#1077; &#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1099;, &#1090;&#1086; &#1074;
1684 &#1082;&#1072;&#1095;&#1077;&#1089;&#1090;&#1074;&#1077; &#1079;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1082;&#1072; &#1080; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1080; &#1073;&#1091;&#1076;&#1091;&#1090; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1085;&#1099; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1097;&#1080;&#1077;
1685 &#1080;&#1079; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1103; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;.
1686 </DOCUMENTATION>
1687 <STRINGS_ATTRIBUT attribut="menu">
1688 <TITRE>&#1052;&#1077;&#1085;&#1102;</TITRE>
1689 <DOCUMENTATION>
1690 &#1048;&#1084;&#1103; &#1084;&#1077;&#1085;&#1102;
1691 </DOCUMENTATION>
1692 </STRINGS_ATTRIBUT>
1693 </STRINGS_ELEMENT>
1694 <STRINGS_ELEMENT element="TITRE">
1695 <TITRE>&#1047;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1086;&#1082;</TITRE>
1696 <DOCUMENTATION>
1697 Title
1698 </DOCUMENTATION>
1699 </STRINGS_ELEMENT>
1700 <STRINGS_ELEMENT element="DOCUMENTATION">
1701 <TITRE>&#1044;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1103;</TITRE>
1702 <DOCUMENTATION>
1703 &#1053;&#1077;&#1073;&#1086;&#1083;&#1100;&#1096;&#1086;&#1077; &#1090;&#1077;&#1082;&#1089;&#1090;&#1086;&#1074;&#1086;&#1077; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1086;&#1077; &#1073;&#1091;&#1076;&#1077;&#1090; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1086;&#1074;&#1072;&#1090;&#1100;&#1089;&#1103;
1704 &#1074; &#1082;&#1072;&#1095;&#1077;&#1089;&#1090;&#1074;&#1077; online &#1087;&#1086;&#1076;&#1089;&#1082;&#1072;&#1079;&#1082;&#1080;.
1705 </DOCUMENTATION>
1706 </STRINGS_ELEMENT>
1707 <STRINGS_ELEMENT element="STRINGS_ELEMENT">
1708 <TITRE>&#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;</TITRE>
1709 <DOCUMENTATION>
1710 &#1047;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1086;&#1082; &#1080; &#1076;&#1086;&#1082;&#1091;&#1084;&#1077;&#1085;&#1090;&#1072;&#1094;&#1080;&#1103; &#1076;&#1083;&#1103; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;. &#1069;&#1090;&#1086; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1080;&#1089;&#1087;&#1086;&#1083;&#1100;&#1079;&#1091;&#1077;&#1090;&#1089;&#1103; &#1082;&#1072;&#1082; &#1076;&#1083;&#1103;
1711 &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;, &#1090;&#1072;&#1082; &#1080; &#1076;&#1083;&#1103; &#1084;&#1077;&#1085;&#1102;, &#1074; &#1089;&#1083;&#1091;&#1095;&#1072;&#1077;, &#1077;&#1089;&#1083;&#1080; &#1074; &#1084;&#1077;&#1085;&#1102; &#1086;&#1085;&#1086; &#1085;&#1077; &#1087;&#1077;&#1088;&#1077;&#1086;&#1087;&#1088;&#1077;&#1076;&#1077;&#1083;&#1077;&#1085;&#1086;.
1712 </DOCUMENTATION>
1713 <STRINGS_ATTRIBUT attribut="element">
1714 <TITRE>&#1069;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;</TITRE>
1715 <DOCUMENTATION>
1716 &#1048;&#1084;&#1103; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;
1717 </DOCUMENTATION>
1718 </STRINGS_ATTRIBUT>
1719 </STRINGS_ELEMENT>
1720 <STRINGS_ELEMENT element="STRINGS_ATTRIBUT">
1721 <TITRE>&#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072;</TITRE>
1722 <DOCUMENTATION>
1723 Title and documentation for an attribute.
1724 Titles can also be defined for attribute values.
1725 </DOCUMENTATION>
1726 <STRINGS_ATTRIBUT attribut="attribut">
1727 <TITRE>&#1040;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;</TITRE>
1728 <DOCUMENTATION>
1729 &#1048;&#1084;&#1103; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072;
1730 </DOCUMENTATION>
1731 </STRINGS_ATTRIBUT>
1732 </STRINGS_ELEMENT>
1733 <STRINGS_ELEMENT element="TITRE_VALEUR">
1734 <TITRE>&#1058;&#1077;&#1082;&#1089;&#1090; &#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1103;</TITRE>
1735 <DOCUMENTATION>
1736 &#1058;&#1077;&#1082;&#1089;&#1090;, &#1082;&#1086;&#1090;&#1086;&#1088;&#1099;&#1081; &#1073;&#1091;&#1076;&#1077;&#1090; &#1074;&#1080;&#1076;&#1077;&#1085; &#1076;&#1083;&#1103; &#1089;&#1086;&#1086;&#1090;&#1074;&#1077;&#1090;&#1089;&#1090;&#1074;&#1091;&#1102;&#1097;&#1077;&#1075;&#1086; &#1079;&#1085;&#1072;&#1095;&#1077;&#1085;&#1080;&#1103; &#1072;&#1090;&#1088;&#1080;&#1073;&#1091;&#1090;&#1072; &#1080;&#1083;&#1080; &#1101;&#1083;&#1077;&#1084;&#1077;&#1085;&#1090;&#1072;
1737 </DOCUMENTATION>
1738 </STRINGS_ELEMENT>
1739 <STRINGS_ELEMENT element="STRINGS_EXPORT">
1740 <TITRE>&#1054;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1101;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;&#1072;</TITRE>
1741 <DOCUMENTATION>
1742 &#1047;&#1072;&#1075;&#1086;&#1083;&#1086;&#1074;&#1086;&#1082; &#1080; &#1086;&#1087;&#1080;&#1089;&#1072;&#1085;&#1080;&#1077; &#1076;&#1083;&#1103; &#1076;&#1077;&#1081;&#1089;&#1090;&#1074;&#1080;&#1103; &#1101;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;&#1072;.
1743 </DOCUMENTATION>
1744 <STRINGS_ATTRIBUT attribut="export">
1745 <TITRE>&#1069;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;</TITRE>
1746 <DOCUMENTATION>
1747 &#1048;&#1084;&#1103; &#1101;&#1082;&#1089;&#1087;&#1086;&#1088;&#1090;&#1072;
1748 </DOCUMENTATION>
1749 </STRINGS_ATTRIBUT>
11921750 </STRINGS_ELEMENT>
11931751 </STRINGS>
11941752 </CONFIG_JAXE>
77 <!-- it features what Jaxe understands of XML schemas -->
88 <!-- but keeps about compatible (this simplified schema is actually a valid XML schema) -->
99
10 <xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN">
10 <xs:schema targetNamespace="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="EN">
1111
1212 <!-- <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"> -->
1313 <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd">
9393 </xs:complexType>
9494 </xs:element>
9595
96 <xs:simpleType name="allNNI">
97 <xs:annotation><xs:documentation>
98 for maxOccurs</xs:documentation></xs:annotation>
99 <xs:union memberTypes="xs:nonNegativeInteger">
100 <xs:simpleType>
101 <xs:restriction base="xs:NMTOKEN">
102 <xs:enumeration value="unbounded"/>
103 </xs:restriction>
104 </xs:simpleType>
105 </xs:union>
106 </xs:simpleType>
107
96108 <xs:attributeGroup name="occurs">
97109 <xs:annotation><xs:documentation>
98110 for all particles</xs:documentation></xs:annotation>
99111 <xs:attribute name="minOccurs" type="xs:nonNegativeInteger" use="optional" default="1"/>
100 <xs:attribute name="maxOccurs" type="xs:string" use="optional" default="1"/>
112 <xs:attribute name="maxOccurs" type="xs:allNNI" use="optional" default="1"/>
101113 </xs:attributeGroup>
102114
103115 <xs:attributeGroup name="defRef">
104116 <xs:annotation><xs:documentation>
105117 for element, group and attributeGroup,
106118 which both define and reference</xs:documentation></xs:annotation>
107 <xs:attribute name="name" type="xs:string"/>
108 <xs:attribute name="ref" type="xs:string"/>
119 <xs:attribute name="name" type="xs:NCName"/>
120 <xs:attribute name="ref" type="xs:QName"/>
109121 </xs:attributeGroup>
110122
111123 <xs:group name="typeDefParticle">
113125 <xs:documentation>
114126 'complexType' uses this</xs:documentation></xs:annotation>
115127 <xs:choice>
116 <xs:element ref="xs:group"/>
128 <xs:element name="group" type="xs:groupRef"/>
117129 <xs:element ref="xs:choice"/>
118130 <xs:element ref="xs:sequence"/>
119131 </xs:choice>
120132 </xs:group>
121133
122134
135 <xs:group name="nestedParticle">
136 <xs:choice>
137 <xs:element name="element" type="xs:localElement"/>
138 <xs:element name="group" type="xs:groupRef"/>
139 <xs:element ref="xs:choice"/>
140 <xs:element ref="xs:sequence"/>
141 <xs:element ref="xs:any"/>
142 </xs:choice>
143 </xs:group>
144
123145 <xs:group name="particle">
124146 <xs:choice>
125 <xs:element ref="xs:element"/>
126 <xs:element ref="xs:group"/>
147 <xs:element name="element" type="xs:localElement"/>
148 <xs:element name="group" type="xs:groupRef"/>
127149 <xs:element ref="xs:choice"/>
128150 <xs:element ref="xs:sequence"/>
151 <xs:element ref="xs:any"/>
129152 </xs:choice>
130153 </xs:group>
131154
155 <xs:complexType name="attribute">
156 <xs:complexContent>
157 <xs:extension base="xs:annotated">
158 <xs:sequence>
159 <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
160 </xs:sequence>
161 <xs:attributeGroup ref="xs:defRef"/>
162 <xs:attribute name="type" type="xs:QName"/>
163 <xs:attribute name="use" use="optional" default="optional">
164 <xs:simpleType>
165 <xs:restriction base="xs:NMTOKEN">
166 <xs:enumeration value="prohibited"/>
167 <xs:enumeration value="optional"/>
168 <xs:enumeration value="required"/>
169 </xs:restriction>
170 </xs:simpleType>
171 </xs:attribute>
172 <xs:attribute name="default" type="xs:string"/>
173 <xs:attribute name="fixed" type="xs:string"/>
174 </xs:extension>
175 </xs:complexContent>
176 </xs:complexType>
177
178 <xs:complexType name="topLevelAttribute">
179 <xs:complexContent>
180 <xs:restriction base="xs:attribute">
181 <xs:sequence>
182 <xs:element ref="xs:annotation" minOccurs="0"/>
183 <xs:element name="simpleType" minOccurs="0" type="xs:localSimpleType"/>
184 </xs:sequence>
185 <xs:attribute name="ref" use="prohibited"/>
186 <xs:attribute name="use" use="prohibited"/>
187 <xs:attribute name="name" use="required" type="xs:NCName"/>
188 </xs:restriction>
189 </xs:complexContent>
190 </xs:complexType>
191
132192 <xs:group name="attrDecls">
133193 <xs:sequence>
134194 <xs:choice minOccurs="0" maxOccurs="unbounded">
135 <xs:element ref="xs:attribute"/>
136 <xs:element ref="xs:attributeGroup"/>
195 <xs:element name="attribute" type="xs:attribute"/>
196 <xs:element name="attributeGroup" type="xs:attributeGroupRef"/>
137197 </xs:choice>
138198 </xs:sequence>
139199 </xs:group>
149209 </xs:choice>
150210 </xs:group>
151211
152 <xs:element name="extension">
153 <xs:annotation>
154 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexContent"/>
155 </xs:annotation>
156 <xs:complexType>
212 <xs:complexType name="complexType" abstract="true">
213 <xs:complexContent>
214 <xs:extension base="xs:annotated">
215 <xs:group ref="xs:complexTypeModel"/>
216 <xs:attribute name="name" type="xs:NCName">
217 <xs:annotation>
218 <xs:documentation>
219 Will be restricted to required or forbidden</xs:documentation>
220 </xs:annotation>
221 </xs:attribute>
222 <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
223 <xs:annotation>
224 <xs:documentation>
225 Not allowed if simpleContent child is chosen.
226 May be overriden by setting on complexContent child.</xs:documentation>
227 </xs:annotation>
228 </xs:attribute>
229 <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
230 </xs:extension>
231 </xs:complexContent>
232 </xs:complexType>
233
234 <xs:complexType name="topLevelComplexType">
235 <xs:complexContent>
236 <xs:restriction base="xs:complexType">
237 <xs:sequence>
238 <xs:element ref="xs:annotation" minOccurs="0"/>
239 <xs:group ref="xs:complexTypeModel"/>
240 </xs:sequence>
241 <xs:attribute name="name" type="xs:NCName" use="required"/>
242 </xs:restriction>
243 </xs:complexContent>
244 </xs:complexType>
245
246 <xs:complexType name="localComplexType">
247 <xs:complexContent>
248 <xs:restriction base="xs:complexType">
249 <xs:sequence>
250 <xs:element ref="xs:annotation" minOccurs="0"/>
251 <xs:group ref="xs:complexTypeModel"/>
252 </xs:sequence>
253 <xs:attribute name="name" use="prohibited"/>
254 <xs:attribute name="abstract" use="prohibited"/>
255 </xs:restriction>
256 </xs:complexContent>
257 </xs:complexType>
258
259 <xs:complexType name="restrictionType">
260 <xs:complexContent>
261 <xs:extension base="xs:annotated">
262 <xs:sequence>
263 <xs:choice minOccurs="0">
264 <xs:group ref="xs:typeDefParticle"/>
265 <xs:group ref="xs:simpleRestrictionModel"/>
266 </xs:choice>
267 <xs:group ref="xs:attrDecls"/>
268 </xs:sequence>
269 <xs:attribute name="base" type="xs:QName" use="required"/>
270 </xs:extension>
271 </xs:complexContent>
272 </xs:complexType>
273
274 <xs:complexType name="complexRestrictionType">
275 <xs:complexContent>
276 <xs:restriction base="xs:restrictionType">
277 <xs:sequence>
278 <xs:element ref="xs:annotation" minOccurs="0"/>
279 <xs:choice minOccurs="0">
280 <xs:annotation>
281 <xs:documentation>This choice is added simply to
282 make this a valid restriction per the REC</xs:documentation>
283 </xs:annotation>
284 <xs:group ref="xs:typeDefParticle"/>
285 </xs:choice>
286 <xs:group ref="xs:attrDecls"/>
287 </xs:sequence>
288 </xs:restriction>
289 </xs:complexContent>
290 </xs:complexType>
291
292 <xs:complexType name="extensionType">
157293 <xs:complexContent>
158294 <xs:extension base="xs:annotated">
159295 <xs:sequence>
160296 <xs:group ref="xs:typeDefParticle" minOccurs="0"/>
161297 <xs:group ref="xs:attrDecls"/>
162298 </xs:sequence>
163 <xs:attribute name="base" type="xs:string" use="required"/>
299 <xs:attribute name="base" type="xs:QName" use="required"/>
164300 </xs:extension>
165 </xs:complexContent>
166 </xs:complexType>
167 </xs:element>
301 </xs:complexContent>
302 </xs:complexType>
168303
169304 <xs:element name="complexContent">
170305 <xs:annotation>
173308 <xs:complexType>
174309 <xs:complexContent>
175310 <xs:extension base="xs:annotated">
176 <xs:sequence>
177 <xs:element ref="xs:extension"/>
178 </xs:sequence>
311 <xs:choice>
312 <xs:element name="restriction" type="xs:complexRestrictionType"/>
313 <xs:element name="extension" type="xs:extensionType"/>
314 </xs:choice>
179315 <xs:attribute name="mixed" type="xs:boolean">
180316 <xs:annotation>
181317 <xs:documentation>
186322 </xs:complexContent>
187323 </xs:complexType>
188324 </xs:element>
325
326 <xs:complexType name="simpleRestrictionType">
327 <xs:complexContent>
328 <xs:restriction base="xs:restrictionType">
329 <xs:sequence>
330 <xs:element ref="xs:annotation" minOccurs="0"/>
331 <xs:choice minOccurs="0">
332 <xs:annotation>
333 <xs:documentation>This choice is added simply to
334 make this a valid restriction per the REC</xs:documentation>
335 </xs:annotation>
336 <xs:group ref="xs:simpleRestrictionModel"/>
337 </xs:choice>
338 <xs:group ref="xs:attrDecls"/>
339 </xs:sequence>
340 </xs:restriction>
341 </xs:complexContent>
342 </xs:complexType>
343
344 <xs:complexType name="simpleExtensionType">
345 <xs:complexContent>
346 <xs:restriction base="xs:extensionType">
347 <xs:sequence>
348 <xs:annotation>
349 <xs:documentation>
350 No typeDefParticle group reference</xs:documentation>
351 </xs:annotation>
352 <xs:element ref="xs:annotation" minOccurs="0"/>
353 <xs:group ref="xs:attrDecls"/>
354 </xs:sequence>
355 </xs:restriction>
356 </xs:complexContent>
357 </xs:complexType>
189358
190359 <xs:element name="simpleContent">
191360 <xs:annotation>
195364 <xs:complexContent>
196365 <xs:extension base="xs:annotated">
197366 <xs:choice>
198 <xs:element ref="xs:extension"/>
367 <xs:element name="restriction" type="xs:simpleRestrictionType"/>
368 <xs:element name="extension" type="xs:simpleExtensionType"/>
199369 </xs:choice>
200370 </xs:extension>
201371 </xs:complexContent>
202372 </xs:complexType>
203373 </xs:element>
204374
205 <xs:element name="complexType">
375 <xs:element name="complexType" type="xs:topLevelComplexType">
206376 <xs:annotation>
207377 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-complexType"/>
208378 </xs:annotation>
209 <xs:complexType>
379 </xs:element>
380
381 <xs:complexType name="element" abstract="true">
382 <xs:annotation>
383 <xs:documentation>
384 The element element can be used either
385 at the top level to define an element-type binding globally,
386 or within a content model to either reference a globally-defined
387 element or type or declare an element-type binding locally.
388 The ref form is not allowed at the top level.</xs:documentation>
389 </xs:annotation>
390
210391 <xs:complexContent>
211392 <xs:extension base="xs:annotated">
212 <xs:group ref="xs:complexTypeModel"/>
213 <xs:attribute name="name" type="xs:string">
214 <xs:annotation>
215 <xs:documentation>
216 Will be restricted to required or forbidden</xs:documentation>
217 </xs:annotation>
218 </xs:attribute>
219 <xs:attribute name="mixed" type="xs:boolean" use="optional" default="false">
220 <xs:annotation>
221 <xs:documentation>
222 Not allowed if simpleContent child is chosen.
223 May be overriden by setting on complexContent child.</xs:documentation>
224 </xs:annotation>
225 </xs:attribute>
226 </xs:extension>
227 </xs:complexContent>
228 </xs:complexType>
229 </xs:element>
230
231
232 <xs:element name="element">
233 <xs:annotation>
234 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
235 </xs:annotation>
236 <xs:complexType>
237 <xs:complexContent>
238 <xs:extension base="xs:annotated">
239393 <xs:sequence>
240394 <xs:choice minOccurs="0">
241 <xs:element ref="xs:simpleType"/>
242 <xs:element ref="xs:complexType"/>
395 <xs:element name="simpleType" type="xs:localSimpleType"/>
396 <xs:element name="complexType" type="xs:localComplexType"/>
243397 </xs:choice>
244398 </xs:sequence>
245399 <xs:attributeGroup ref="xs:defRef"/>
246 <xs:attribute name="type" type="xs:string"/>
400 <xs:attribute name="type" type="xs:QName"/>
401 <xs:attribute name="substitutionGroup" type="xs:QName"/>
247402 <xs:attributeGroup ref="xs:occurs"/>
248403 <xs:attribute name="default" type="xs:string"/>
249404 <xs:attribute name="fixed" type="xs:string"/>
405 <xs:attribute name="abstract" type="xs:boolean" use="optional" default="false"/>
406 <xs:attribute name="form" type="xs:formChoice"/>
250407 </xs:extension>
251408 </xs:complexContent>
252409 </xs:complexType>
410
411 <xs:complexType name="topLevelElement">
412 <xs:complexContent>
413 <xs:restriction base="xs:element">
414 <xs:sequence>
415 <xs:element ref="xs:annotation" minOccurs="0"/>
416 <xs:choice minOccurs="0">
417 <xs:element name="simpleType" type="xs:localSimpleType"/>
418 <xs:element name="complexType" type="xs:localComplexType"/>
419 </xs:choice>
420 </xs:sequence>
421 <xs:attribute name="name" use="required" type="xs:NCName"/>
422 <xs:attribute name="ref" use="prohibited"/>
423 <xs:attribute name="form" use="prohibited"/>
424 <xs:attribute name="minOccurs" use="prohibited"/>
425 <xs:attribute name="maxOccurs" use="prohibited"/>
426 </xs:restriction>
427 </xs:complexContent>
428 </xs:complexType>
429
430 <xs:complexType name="localElement">
431 <xs:complexContent>
432 <xs:restriction base="xs:element">
433 <xs:sequence>
434 <xs:element ref="xs:annotation" minOccurs="0"/>
435 <xs:choice minOccurs="0">
436 <xs:element name="simpleType" type="xs:localSimpleType"/>
437 <xs:element name="complexType" type="xs:localComplexType"/>
438 </xs:choice>
439 </xs:sequence>
440 <xs:attribute name="substitutionGroup" use="prohibited"/>
441 <xs:attribute name="abstract" use="prohibited"/>
442 </xs:restriction>
443 </xs:complexContent>
444 </xs:complexType>
445
446 <xs:element name="element" type="xs:topLevelElement">
447 <xs:annotation>
448 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-element"/>
449 </xs:annotation>
253450 </xs:element>
254451
255 <xs:complexType name="explicitGroup">
452 <xs:complexType name="group" abstract="true">
256453 <xs:annotation>
257454 <xs:documentation>
258 group type for the three kinds of group</xs:documentation>
455 group type for explicit groups, named top-level groups and
456 group references</xs:documentation>
259457 </xs:annotation>
260458 <xs:complexContent>
261459 <xs:extension base="xs:annotated">
262460 <xs:group ref="xs:particle" minOccurs="0" maxOccurs="unbounded"/>
263 <xs:attributeGroup ref="xs:occurs"/>
264 </xs:extension>
265 </xs:complexContent>
266 </xs:complexType>
267
268 <xs:element name="choice" type="xs:explicitGroup">
269 <xs:annotation>
270 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
271 </xs:annotation>
272 </xs:element>
273
274 <xs:element name="sequence" type="xs:explicitGroup">
275 <xs:annotation>
276 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
277 </xs:annotation>
278 </xs:element>
279
280 <xs:element name="group">
281 <xs:annotation>
282 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
283 </xs:annotation>
284 <xs:complexType>
285 <xs:complexContent>
286 <xs:extension base="xs:annotated">
287 <xs:choice minOccurs="0" maxOccurs="1">
288 <xs:element ref="xs:choice"/>
289 <xs:element ref="xs:sequence"/>
290 </xs:choice>
291461 <xs:attributeGroup ref="xs:defRef"/>
292462 <xs:attributeGroup ref="xs:occurs"/>
293463 </xs:extension>
294464 </xs:complexContent>
295465 </xs:complexType>
466
467 <xs:complexType name="realGroup">
468 <xs:complexContent>
469 <xs:restriction base="xs:group">
470 <xs:sequence>
471 <xs:element ref="xs:annotation" minOccurs="0"/>
472 <xs:choice minOccurs="0" maxOccurs="1">
473 <xs:element ref="xs:choice"/>
474 <xs:element ref="xs:sequence"/>
475 </xs:choice>
476 </xs:sequence>
477 </xs:restriction>
478 </xs:complexContent>
479 </xs:complexType>
480
481 <xs:complexType name="namedGroup">
482 <xs:complexContent>
483 <xs:restriction base="xs:realGroup">
484 <xs:sequence>
485 <xs:element ref="xs:annotation" minOccurs="0"/>
486 <xs:choice minOccurs="1" maxOccurs="1">
487 <xs:element name="choice" type="xs:simpleExplicitGroup"/>
488 <xs:element name="sequence" type="xs:simpleExplicitGroup"/>
489 </xs:choice>
490 </xs:sequence>
491 <xs:attribute name="name" use="required" type="xs:NCName"/>
492 <xs:attribute name="ref" use="prohibited"/>
493 <xs:attribute name="minOccurs" use="prohibited"/>
494 <xs:attribute name="maxOccurs" use="prohibited"/>
495 </xs:restriction>
496 </xs:complexContent>
497 </xs:complexType>
498
499 <xs:complexType name="groupRef">
500 <xs:complexContent>
501 <xs:restriction base="xs:realGroup">
502 <xs:sequence>
503 <xs:element ref="xs:annotation" minOccurs="0"/>
504 </xs:sequence>
505 <xs:attribute name="ref" use="required" type="xs:QName"/>
506 <xs:attribute name="name" use="prohibited"/>
507 </xs:restriction>
508 </xs:complexContent>
509 </xs:complexType>
510
511 <xs:complexType name="explicitGroup">
512 <xs:annotation>
513 <xs:documentation>
514 group type for the three kinds of group</xs:documentation>
515 </xs:annotation>
516 <xs:complexContent>
517 <xs:restriction base="xs:group">
518 <xs:sequence>
519 <xs:element ref="xs:annotation" minOccurs="0"/>
520 <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
521 </xs:sequence>
522 <xs:attribute name="name" type="xs:NCName" use="prohibited"/>
523 <xs:attribute name="ref" type="xs:QName" use="prohibited"/>
524 </xs:restriction>
525 </xs:complexContent>
526 </xs:complexType>
527
528 <xs:complexType name="simpleExplicitGroup">
529 <xs:complexContent>
530 <xs:restriction base="xs:explicitGroup">
531 <xs:sequence>
532 <xs:element ref="xs:annotation" minOccurs="0"/>
533 <xs:group ref="xs:nestedParticle" minOccurs="0" maxOccurs="unbounded"/>
534 </xs:sequence>
535 <xs:attribute name="minOccurs" use="prohibited"/>
536 <xs:attribute name="maxOccurs" use="prohibited"/>
537 </xs:restriction>
538 </xs:complexContent>
539 </xs:complexType>
540
541 <xs:element name="choice" type="xs:explicitGroup">
542 <xs:annotation>
543 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-choice"/>
544 </xs:annotation>
296545 </xs:element>
297546
547 <xs:element name="sequence" type="xs:explicitGroup">
548 <xs:annotation>
549 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-sequence"/>
550 </xs:annotation>
551 </xs:element>
552
553 <xs:element name="group" type="xs:namedGroup">
554 <xs:annotation>
555 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-group"/>
556 </xs:annotation>
557 </xs:element>
558
298559 <xs:complexType name="wildcard">
299560 <xs:complexContent>
300561 <xs:extension base="xs:annotated">
301 <xs:attribute name="namespace" type="xs:string" use="optional" default="##any"/>
562 <xs:attribute name="namespace" type="xs:namespaceList" use="optional" default="##any"/>
302563 <xs:attribute name="processContents" use="optional" default="strict">
303564 <xs:simpleType>
304565 <xs:restriction base="xs:NMTOKEN">
311572 </xs:extension>
312573 </xs:complexContent>
313574 </xs:complexType>
314
575
315576 <xs:element name="any">
316577 <xs:annotation>
317578 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-any"/>
324585 </xs:complexContent>
325586 </xs:complexType>
326587 </xs:element>
327
328 <xs:element name="attribute">
588
589 <xs:annotation>
590 <xs:documentation>
591 simple type for the value of the 'namespace' attr of
592 'any' and 'anyAttribute'</xs:documentation>
593 </xs:annotation>
594 <xs:annotation>
595 <xs:documentation>
596 Value is
597 ##any - - any non-conflicting WFXML/attribute at all
598
599 ##other - - any non-conflicting WFXML/attribute from
600 namespace other than targetNS
601
602 ##local - - any unqualified non-conflicting WFXML/attribute
603
604 one or - - any non-conflicting WFXML/attribute from
605 more URI the listed namespaces
606 references
607 (space separated)
608
609 ##targetNamespace or ##local may appear in the above list, to
610 refer to the targetNamespace of the enclosing
611 schema or an absent targetNamespace respectively</xs:documentation>
612 </xs:annotation>
613
614 <xs:simpleType name="namespaceList">
615 <xs:annotation>
616 <xs:documentation>
617 A utility type, not for public use</xs:documentation>
618 </xs:annotation>
619 <xs:union>
620 <xs:simpleType>
621 <xs:restriction base="xs:token">
622 <xs:enumeration value="##any"/>
623 <xs:enumeration value="##other"/>
624 </xs:restriction>
625 </xs:simpleType>
626 <xs:simpleType>
627 <xs:list>
628 <xs:simpleType>
629 <xs:union memberTypes="xs:anyURI">
630 <xs:simpleType>
631 <xs:restriction base="xs:token">
632 <xs:enumeration value="##targetNamespace"/>
633 <xs:enumeration value="##local"/>
634 </xs:restriction>
635 </xs:simpleType>
636 </xs:union>
637 </xs:simpleType>
638 </xs:list>
639 </xs:simpleType>
640 </xs:union>
641 </xs:simpleType>
642
643 <xs:element name="attribute" type="xs:topLevelAttribute">
329644 <xs:annotation>
330645 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attribute"/>
331646 </xs:annotation>
332 <xs:complexType>
333 <xs:complexContent>
334 <xs:extension base="xs:annotated">
335 <xs:sequence>
336 <xs:element ref="xs:simpleType" minOccurs="0"/>
337 </xs:sequence>
338 <xs:attributeGroup ref="xs:defRef"/>
339 <xs:attribute name="type" type="xs:string"/>
340 <xs:attribute name="use" use="optional" default="optional">
341 <xs:simpleType>
342 <xs:restriction base="xs:NMTOKEN">
343 <xs:enumeration value="optional"/>
344 <xs:enumeration value="required"/>
345 </xs:restriction>
346 </xs:simpleType>
347 </xs:attribute>
348 <xs:attribute name="default" type="xs:string"/>
349 <xs:attribute name="fixed" type="xs:string"/>
350 </xs:extension>
351 </xs:complexContent>
352 </xs:complexType>
353 </xs:element>
354
355 <xs:element name="attributeGroup">
356 <xs:annotation>
357 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
358 </xs:annotation>
359 <xs:complexType>
647 </xs:element>
648
649 <xs:complexType name="attributeGroup" abstract="true">
360650 <xs:complexContent>
361651 <xs:extension base="xs:annotated">
362652 <xs:group ref="xs:attrDecls"/>
364654 </xs:extension>
365655 </xs:complexContent>
366656 </xs:complexType>
657
658 <xs:complexType name="namedAttributeGroup">
659 <xs:complexContent>
660 <xs:restriction base="xs:attributeGroup">
661 <xs:sequence>
662 <xs:element ref="xs:annotation" minOccurs="0"/>
663 <xs:group ref="xs:attrDecls"/>
664 </xs:sequence>
665 <xs:attribute name="name" use="required" type="xs:NCName"/>
666 <xs:attribute name="ref" use="prohibited"/>
667 </xs:restriction>
668 </xs:complexContent>
669 </xs:complexType>
670
671 <xs:complexType name="attributeGroupRef">
672 <xs:complexContent>
673 <xs:restriction base="xs:attributeGroup">
674 <xs:sequence>
675 <xs:element ref="xs:annotation" minOccurs="0"/>
676 </xs:sequence>
677 <xs:attribute name="ref" use="required" type="xs:QName"/>
678 <xs:attribute name="name" use="prohibited"/>
679 </xs:restriction>
680 </xs:complexContent>
681 </xs:complexType>
682
683 <xs:element name="attributeGroup" type="xs:namedAttributeGroup">
684 <xs:annotation>
685 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-attributeGroup"/>
686 </xs:annotation>
367687 </xs:element>
368
688
369689 <xs:element name="include">
370690 <xs:annotation>
371691 <xs:documentation source="http://www.w3.org/TR/xmlschema-1/#element-include"/>
386706 <xs:complexType>
387707 <xs:complexContent>
388708 <xs:extension base="xs:annotated">
389 <xs:attribute name="namespace" type="xs:string"/>
709 <xs:attribute name="namespace" type="xs:anyURI"/>
390710 <xs:attribute name="schemaLocation" type="xs:anyURI"/>
391711 </xs:extension>
392712 </xs:complexContent>
414734 </xs:complexType>
415735 </xs:element>
416736
417 <!-- xerces does not accept xs:anySimpleType here, so we have to comment it out,
418 but JETypeSimple supports these types -->
419 <!--
737
420738 <xs:simpleType name="string">
421739 <xs:annotation>
422740 <xs:documentation
631949 </xs:restriction>
632950 </xs:simpleType>
633951
952 <xs:simpleType name="IDREFS">
953 <xs:annotation>
954 <xs:documentation
955 source="http://www.w3.org/TR/xmlschema-2/#IDREFS"/>
956 </xs:annotation>
957 <xs:restriction>
958 <xs:simpleType>
959 <xs:list itemType="xs:IDREF"/>
960 </xs:simpleType>
961 <xs:minLength value="1"/>
962 </xs:restriction>
963 </xs:simpleType>
964
965 <xs:simpleType name="ENTITIES">
966 <xs:annotation>
967 <xs:documentation
968 source="http://www.w3.org/TR/xmlschema-2/#ENTITIES"/>
969 </xs:annotation>
970 <xs:restriction>
971 <xs:simpleType>
972 <xs:list itemType="xs:ENTITY"/>
973 </xs:simpleType>
974 <xs:minLength value="1"/>
975 </xs:restriction>
976 </xs:simpleType>
977
634978 <xs:simpleType name="NMTOKEN">
635979 <xs:annotation>
636980 <xs:documentation
648992 </xs:restriction>
649993 </xs:simpleType>
650994
995 <xs:simpleType name="NMTOKENS">
996 <xs:annotation>
997 <xs:documentation
998 source="http://www.w3.org/TR/xmlschema-2/#NMTOKENS"/>
999 </xs:annotation>
1000 <xs:restriction>
1001 <xs:simpleType>
1002 <xs:list itemType="xs:NMTOKEN"/>
1003 </xs:simpleType>
1004 <xs:minLength value="1"/>
1005 </xs:restriction>
1006 </xs:simpleType>
1007
6511008 <xs:simpleType name="Name">
6521009 <xs:annotation>
6531010 <xs:documentation
6821039 </xs:restriction>
6831040 </xs:simpleType>
6841041
1042 <xs:simpleType name="ID">
1043 <xs:annotation>
1044 <xs:documentation
1045 source="http://www.w3.org/TR/xmlschema-2/#ID"/>
1046 </xs:annotation>
1047 <xs:restriction base="xs:NCName"/>
1048 </xs:simpleType>
1049
1050 <xs:simpleType name="IDREF">
1051 <xs:annotation>
1052 <xs:documentation
1053 source="http://www.w3.org/TR/xmlschema-2/#IDREF"/>
1054 </xs:annotation>
1055 <xs:restriction base="xs:NCName"/>
1056 </xs:simpleType>
1057
1058 <xs:simpleType name="ENTITY">
1059 <xs:annotation>
1060 <xs:documentation
1061 source="http://www.w3.org/TR/xmlschema-2/#ENTITY"/>
1062 </xs:annotation>
1063 <xs:restriction base="xs:NCName"/>
1064 </xs:simpleType>
1065
6851066 <xs:simpleType name="integer">
6861067 <xs:annotation>
6871068 <xs:documentation
8151196 <xs:minInclusive value="1"/>
8161197 </xs:restriction>
8171198 </xs:simpleType>
818 -->
819 <xs:element name="simpleType">
820 <xs:annotation>
821 <xs:documentation
822 source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
823 </xs:annotation>
824 <xs:complexType>
1199
1200 <xs:group name="simpleDerivation">
1201 <xs:choice>
1202 <xs:element ref="xs:restriction"/>
1203 <xs:element ref="xs:list"/>
1204 <xs:element ref="xs:union"/>
1205 </xs:choice>
1206 </xs:group>
1207
1208 <xs:complexType name="simpleType" abstract="true">
8251209 <xs:complexContent>
8261210 <xs:extension base="xs:annotated">
827 <xs:sequence>
828 <xs:element ref="xs:restriction"/>
829 </xs:sequence>
1211 <xs:group ref="xs:simpleDerivation"/>
8301212 <xs:attribute name="name" type="xs:NCName">
8311213 <xs:annotation>
8321214 <xs:documentation>
8371219 </xs:extension>
8381220 </xs:complexContent>
8391221 </xs:complexType>
1222
1223 <xs:complexType name="topLevelSimpleType">
1224 <xs:complexContent>
1225 <xs:restriction base="xs:simpleType">
1226 <xs:sequence>
1227 <xs:element ref="xs:annotation" minOccurs="0"/>
1228 <xs:group ref="xs:simpleDerivation"/>
1229 </xs:sequence>
1230 <xs:attribute name="name" use="required"
1231 type="xs:NCName">
1232 <xs:annotation>
1233 <xs:documentation>
1234 Required at the top level
1235 </xs:documentation>
1236 </xs:annotation>
1237 </xs:attribute>
1238 </xs:restriction>
1239 </xs:complexContent>
1240 </xs:complexType>
1241
1242 <xs:complexType name="localSimpleType">
1243 <xs:complexContent>
1244 <xs:restriction base="xs:simpleType">
1245 <xs:sequence>
1246 <xs:element ref="xs:annotation" minOccurs="0"/>
1247 <xs:group ref="xs:simpleDerivation"/>
1248 </xs:sequence>
1249 <xs:attribute name="name" use="prohibited">
1250 <xs:annotation>
1251 <xs:documentation>
1252 Forbidden when nested
1253 </xs:documentation>
1254 </xs:annotation>
1255 </xs:attribute>
1256 </xs:restriction>
1257 </xs:complexContent>
1258 </xs:complexType>
1259
1260 <xs:element name="simpleType" type="xs:topLevelSimpleType">
1261 <xs:annotation>
1262 <xs:documentation
1263 source="http://www.w3.org/TR/xmlschema-2/#element-simpleType"/>
1264 </xs:annotation>
8401265 </xs:element>
8411266
8421267 <xs:group name="facets">
8641289
8651290 <xs:group name="simpleRestrictionModel">
8661291 <xs:sequence>
867 <xs:element ref="xs:simpleType" minOccurs="0"/>
1292 <xs:element name="simpleType" type="xs:localSimpleType" minOccurs="0"/>
8681293 <xs:group ref="xs:facets" minOccurs="0" maxOccurs="unbounded"/>
8691294 </xs:sequence>
8701295 </xs:group>
8871312 </xs:complexType>
8881313 </xs:element>
8891314
1315 <xs:element name="list">
1316 <xs:complexType>
1317 <xs:annotation>
1318 <xs:documentation
1319 source="http://www.w3.org/TR/xmlschema-2/#element-list">
1320 itemType attribute and simpleType child are mutually
1321 exclusive, but one or other is required
1322 </xs:documentation>
1323 </xs:annotation>
1324 <xs:complexContent>
1325 <xs:extension base="xs:annotated">
1326 <xs:sequence>
1327 <xs:element name="simpleType" type="xs:localSimpleType"
1328 minOccurs="0"/>
1329 </xs:sequence>
1330 <xs:attribute name="itemType" type="xs:QName" use="optional"/>
1331 </xs:extension>
1332 </xs:complexContent>
1333 </xs:complexType>
1334 </xs:element>
1335
1336 <xs:element name="union">
1337 <xs:complexType>
1338 <xs:annotation>
1339 <xs:documentation
1340 source="http://www.w3.org/TR/xmlschema-2/#element-union">
1341 memberTypes attribute must be non-empty or there must be
1342 at least one simpleType child
1343 </xs:documentation>
1344 </xs:annotation>
1345 <xs:complexContent>
1346 <xs:extension base="xs:annotated">
1347 <xs:sequence>
1348 <xs:element name="simpleType" type="xs:localSimpleType"
1349 minOccurs="0" maxOccurs="unbounded"/>
1350 </xs:sequence>
1351 <xs:attribute name="memberTypes" use="optional">
1352 <xs:simpleType>
1353 <xs:list itemType="xs:QName"/>
1354 </xs:simpleType>
1355 </xs:attribute>
1356 </xs:extension>
1357 </xs:complexContent>
1358 </xs:complexType>
1359 </xs:element>
1360
8901361 <xs:complexType name="facet">
8911362 <xs:complexContent>
8921363 <xs:extension base="xs:annotated">
9231394 </xs:annotation>
9241395 </xs:element>
9251396
926 <xs:element name="totalDigits" type="xs:facet">
1397 <xs:complexType name="numFacet">
1398 <xs:complexContent>
1399 <xs:restriction base="xs:facet">
1400 <xs:sequence>
1401 <xs:element ref="xs:annotation" minOccurs="0"/>
1402 </xs:sequence>
1403 <xs:attribute name="value" type="xs:nonNegativeInteger" use="required"/>
1404 </xs:restriction>
1405 </xs:complexContent>
1406 </xs:complexType>
1407
1408 <xs:element name="totalDigits" type="xs:numFacet">
9271409 <xs:annotation>
9281410 <xs:documentation
9291411 source="http://www.w3.org/TR/xmlschema-2/#element-totalDigits"/>
9301412 </xs:annotation>
9311413 </xs:element>
932 <xs:element name="fractionDigits" type="xs:facet">
1414 <xs:element name="fractionDigits" type="xs:numFacet">
9331415 <xs:annotation>
9341416 <xs:documentation
9351417 source="http://www.w3.org/TR/xmlschema-2/#element-fractionDigits"/>
9361418 </xs:annotation>
9371419 </xs:element>
9381420
939 <xs:element name="length" type="xs:facet">
1421 <xs:element name="length" type="xs:numFacet">
9401422 <xs:annotation>
9411423 <xs:documentation
9421424 source="http://www.w3.org/TR/xmlschema-2/#element-length"/>
9431425 </xs:annotation>
9441426 </xs:element>
945 <xs:element name="minLength" type="xs:facet">
1427 <xs:element name="minLength" type="xs:numFacet">
9461428 <xs:annotation>
9471429 <xs:documentation
9481430 source="http://www.w3.org/TR/xmlschema-2/#element-minLength"/>
9491431 </xs:annotation>
9501432 </xs:element>
951 <xs:element name="maxLength" type="xs:facet">
1433 <xs:element name="maxLength" type="xs:numFacet">
9521434 <xs:annotation>
9531435 <xs:documentation
9541436 source="http://www.w3.org/TR/xmlschema-2/#element-maxLength"/>
3737 <MENU_INSERTION nom="cite" type_noeud="element"/>
3838 <MENU_INSERTION nom="code" type_noeud="element"/>
3939 <MENU_INSERTION nom="style" type_noeud="element"/>
40 <MENU_INSERTION nom="commentaire" type_noeud="commentaire"/>
4041 </MENU>
4142 <MENU nom="listes_tables">
4243 <MENU_INSERTION nom="ul" type_noeud="element"/>
271272 <STRINGS_MENU menu="style">
272273 <TITRE>style</TITRE>
273274 </STRINGS_MENU>
275 <STRINGS_MENU menu="commentaire">
276 <TITRE>XML comment</TITRE>
277 </STRINGS_MENU>
274278
275279 <STRINGS_MENU menu="listes_tables">
276280 <TITRE>Lists and Tables</TITRE>
337341 </STRINGS_MENU>
338342 <STRINGS_MENU menu="normal">
339343 <TITRE>standard</TITRE>
344 <DOCUMENTATION>
345 Removes all the styles in the selected text
346 </DOCUMENTATION>
340347 </STRINGS_MENU>
341348 <STRINGS_MENU menu="sup">
342349 <TITRE>superscript</TITRE>
448455 <STRINGS_MENU menu="style">
449456 <TITRE>Style (style)</TITRE>
450457 </STRINGS_MENU>
458 <STRINGS_MENU menu="commentaire">
459 <TITRE>Commentaire XML</TITRE>
460 </STRINGS_MENU>
451461
452462 <STRINGS_MENU menu="listes_tables">
453463 <TITRE>Listes/Tables</TITRE>
514524 </STRINGS_MENU>
515525 <STRINGS_MENU menu="normal">
516526 <TITRE>Sans style</TITRE>
527 <DOCUMENTATION>
528 Retire tous les styles du texte sélectionné, le transformant en texte normal
529 </DOCUMENTATION>
517530 </STRINGS_MENU>
518531 <STRINGS_MENU menu="sup">
519532 <TITRE>Exposant (sup)</TITRE>
3030 </MENU>
3131 <MENU nom="types">
3232 <MENU_INSERTION nom="restriction" type_noeud="element"/>
33 <MENU_INSERTION nom="list"/>
34 <MENU_INSERTION nom="union"/>
3335 <MENU_INSERTION nom="enumeration" type_noeud="element"/>
3436 <MENU_INSERTION nom="minExclusive" type_noeud="element"/>
3537 <MENU_INSERTION nom="minInclusive" type_noeud="element"/>
99101 <AFFICHAGE_ELEMENT element="restriction" type="zone">
100102 <PARAMETRE nom="attributsVisibles" valeur="true"/>
101103 </AFFICHAGE_ELEMENT>
104 <AFFICHAGE_ELEMENT element="list" type="zone">
105 <PARAMETRE nom="attributsVisibles" valeur="true"/>
106 </AFFICHAGE_ELEMENT>
107 <AFFICHAGE_ELEMENT element="union" type="zone">
108 <PARAMETRE nom="attributsVisibles" valeur="true"/>
109 </AFFICHAGE_ELEMENT>
102110 <AFFICHAGE_ELEMENT element="enumeration" type="vide">
103111 <PARAMETRE nom="attributsVisibles" valeur="true"/>
104112 </AFFICHAGE_ELEMENT>
221229 <STRINGS_ELEMENT element="restriction">
222230 <TITRE>Restriction</TITRE>
223231 </STRINGS_ELEMENT>
232 <STRINGS_ELEMENT element="list">
233 <TITRE>List</TITRE>
234 </STRINGS_ELEMENT>
235 <STRINGS_ELEMENT element="union">
236 <TITRE>Union</TITRE>
237 </STRINGS_ELEMENT>
224238 <STRINGS_ELEMENT element="enumeration">
225239 <TITRE>Enumeration</TITRE>
226240 </STRINGS_ELEMENT>
333347 <STRINGS_ELEMENT element="restriction">
334348 <TITRE>Restriction</TITRE>
335349 </STRINGS_ELEMENT>
350 <STRINGS_ELEMENT element="list">
351 <TITRE>Liste</TITRE>
352 </STRINGS_ELEMENT>
353 <STRINGS_ELEMENT element="union">
354 <TITRE>Union</TITRE>
355 </STRINGS_ELEMENT>
336356 <STRINGS_ELEMENT element="enumeration">
337357 <TITRE>Enumération</TITRE>
338358 </STRINGS_ELEMENT>
3030 <xs:choice maxOccurs="unbounded">
3131 <xs:element ref="PAGE"/>
3232 <xs:element ref="REFXPAGES"/>
33 <xs:element ref="XPAGES"/>
3334 </xs:choice>
3435 </xs:sequence>
3536 </xs:complexType>
119120 </xs:complexType>
120121 </xs:element>
121122
122 <xs:element name="INTERFACE">
123 <xs:element name="INTERFACE" type="xs:string">
123124 <xs:annotation>
124125 <xs:documentation>
125126 Interface des pages.
126127 </xs:documentation>
127128 </xs:annotation>
128 <xs:simpleType>
129 <xs:restriction base="xs:string">
130 <xs:enumeration value="bois"/>
131 <xs:enumeration value="etoiles"/>
132 <xs:enumeration value="marbre"/>
133 <xs:enumeration value="parchemin"/>
134 <xs:enumeration value="peinture"/>
135 </xs:restriction>
136 </xs:simpleType>
137129 </xs:element>
138130
139131 <xs:element name="LANGUE">
187179 <xs:element ref="APPLET"/>
188180 <xs:element ref="FLASH"/>
189181 <xs:element ref="COMMENTAIRE"/>
182 <xs:element ref="CODE"/>
183 <xs:element ref="EXERCICE"/>
184 <xs:element ref="QCM"/>
190185 </xs:choice>
191186 <xs:attribute name="label" type="typeLabel" use="required">
192187 <xs:annotation>
229224 <xs:element ref="APPLET"/>
230225 <xs:element ref="FLASH"/>
231226 <xs:element ref="COMMENTAIRE"/>
227 <xs:element ref="CODE"/>
228 <xs:element ref="EXERCICE"/>
229 <xs:element ref="QCM"/>
232230 </xs:choice>
233231 <xs:attribute name="titre" type="xs:string" use="optional">
234232 <xs:annotation>
277275 </xs:annotation>
278276 <xs:complexType>
279277 <xs:sequence>
280 <xs:choice maxOccurs="unbounded">
281 <xs:element ref="LIENPAGE"/>
282 <xs:element ref="LIENWEB"/>
283 <xs:element ref="FICHIER"/>
284 </xs:choice>
278 <xs:element ref="FICHIER" maxOccurs="unbounded"/>
285279 <xs:element minOccurs="0" ref="LEGENDE"/>
286280 <xs:element minOccurs="0" ref="CREDIT"/>
287281 </xs:sequence>
309303 </xs:restriction>
310304 </xs:simpleType>
311305 </xs:attribute>
306 <xs:attribute name="label" type="typeLabel" use="optional">
307 <xs:annotation>
308 <xs:documentation>
309 Label permettant de faire un lien vers l'image.
310 </xs:documentation>
311 </xs:annotation>
312 </xs:attribute>
312313 </xs:complexType>
313314 </xs:element>
314315
315316 <xs:element name="LEGENDE">
316317 <xs:annotation>
317318 <xs:documentation>
318 Légende d'un tableau ou d'une figure
319 Légende
319320 </xs:documentation>
320321 </xs:annotation>
321322 <xs:complexType mixed="true">
334335 il est nécessaire de passer par l'élément ENVIMAGE.
335336 </xs:documentation>
336337 </xs:annotation>
337 <xs:complexType mixed="true">
338 <xs:complexType>
338339 <xs:attribute name="nom" type="xs:string" use="required"/>
339340 </xs:complexType>
340341 </xs:element>
492493 <xs:element name="ITEM">
493494 <xs:annotation>
494495 <xs:documentation>
495 Elément d'une liste à points ou numérotée
496 Elément d'une liste
496497 </xs:documentation>
497498 </xs:annotation>
498499 <xs:complexType mixed="true">
665666 </xs:element>
666667
667668
669 <!-- Exercices -->
670
671 <xs:element name="EXERCICE">
672 <xs:annotation>
673 <xs:documentation>
674 Exercice de type questions-réponses
675 </xs:documentation>
676 </xs:annotation>
677 <xs:complexType>
678 <xs:sequence>
679 <xs:element ref="ENONCE" minOccurs="0"/>
680 <xs:element ref="DIFFICULTE" minOccurs="0"/>
681 <xs:element ref="TEMPS" minOccurs="0"/>
682 <xs:element ref="QUESTION" maxOccurs="unbounded"/>
683 </xs:sequence>
684 <xs:attribute name="titre" type="xs:string" use="optional"/>
685 <xs:attribute name="type" use="optional" default="évaluation">
686 <xs:annotation>
687 <xs:documentation>
688 Type d'exercice. Les solutions des exercices de type "évaluation" ne sont
689 affichées qu'avec la sortie "solutions", alors que les solutions des exercices
690 de type "auto-évaluation" sont toujours affichées.
691 </xs:documentation>
692 </xs:annotation>
693 <xs:simpleType>
694 <xs:restriction base="xs:string">
695 <xs:enumeration value="évaluation"/>
696 <xs:enumeration value="auto-évaluation"/>
697 </xs:restriction>
698 </xs:simpleType>
699 </xs:attribute>
700 </xs:complexType>
701 </xs:element>
702
703 <xs:element name="ENONCE">
704 <xs:annotation>
705 <xs:documentation>
706 Enoncé d'un exercice ou d'une question
707 </xs:documentation>
708 </xs:annotation>
709 <xs:complexType>
710 <xs:choice minOccurs="0" maxOccurs="unbounded">
711 <xs:element ref="SECTION"/>
712 <xs:element ref="PARAGRAPHE"/>
713 <xs:element ref="LISTE"/>
714 <xs:element ref="TABLEAU"/>
715 <xs:element ref="ENVIMAGE"/>
716 <xs:element ref="APPLET"/>
717 <xs:element ref="FLASH"/>
718 </xs:choice>
719 </xs:complexType>
720 </xs:element>
721
722 <xs:element name="DIFFICULTE">
723 <xs:annotation>
724 <xs:documentation>
725 indication du niveau de difficulté :
726 * : facile, ou application directe du cours
727 ** : moyen
728 *** : difficile
729 </xs:documentation>
730 </xs:annotation>
731 <xs:simpleType>
732 <xs:restriction base="xs:string">
733 <xs:enumeration value="*"/>
734 <xs:enumeration value="**"/>
735 <xs:enumeration value="***"/>
736 </xs:restriction>
737 </xs:simpleType>
738 </xs:element>
739
740 <xs:element name="TEMPS" type="xs:string">
741 <xs:annotation>
742 <xs:documentation>
743 temps indicatif nécessaire pour résoudre l'exercice
744 </xs:documentation>
745 </xs:annotation>
746 </xs:element>
747
748 <xs:element name="QUESTION">
749 <xs:annotation>
750 <xs:documentation>
751 Question d'un exercice, avec un énoncé, éventuellement des aides, une solution,
752 et éventuellement des points.
753 </xs:documentation>
754 </xs:annotation>
755 <xs:complexType>
756 <xs:sequence>
757 <xs:element ref="ENONCE"/>
758 <xs:element ref="AIDE" minOccurs="0" maxOccurs="unbounded"/>
759 <xs:element ref="SOLUTION" minOccurs="0"/>
760 <xs:element ref="POINTS" minOccurs="0"/>
761 </xs:sequence>
762 </xs:complexType>
763 </xs:element>
764
765 <xs:element name="SOLUTION">
766 <xs:complexType>
767 <xs:choice minOccurs="0" maxOccurs="unbounded">
768 <xs:element ref="SECTION"/>
769 <xs:element ref="PARAGRAPHE"/>
770 <xs:element ref="LISTE"/>
771 <xs:element ref="TABLEAU"/>
772 <xs:element ref="ENVIMAGE"/>
773 <xs:element ref="APPLET"/>
774 <xs:element ref="FLASH"/>
775 </xs:choice>
776 </xs:complexType>
777 </xs:element>
778
779 <xs:element name="POINTS" type="xs:float">
780 <xs:annotation>
781 <xs:documentation>
782 Nombre de points gagnés si la réponse est correcte.
783 </xs:documentation>
784 </xs:annotation>
785 </xs:element>
786
787 <xs:element name="QCM">
788 <xs:annotation>
789 <xs:documentation>
790 Questionnaire à choix multiples, avec des commentaires affichés
791 après le choix de l'utilisateur.
792 </xs:documentation>
793 </xs:annotation>
794 <xs:complexType>
795 <xs:sequence>
796 <xs:element ref="ENONCE" minOccurs="0"/>
797 <xs:element ref="DIFFICULTE" minOccurs="0"/>
798 <xs:element ref="TEMPS" minOccurs="0"/>
799 <xs:element ref="QUESTIONQCM" maxOccurs="unbounded"/>
800 </xs:sequence>
801 <xs:attribute name="titre" type="xs:string" use="optional"/>
802 </xs:complexType>
803 </xs:element>
804
805 <xs:element name="AIDE">
806 <xs:annotation>
807 <xs:documentation>
808 Aide d'un exercice.
809 </xs:documentation>
810 </xs:annotation>
811 <xs:complexType>
812 <xs:choice minOccurs="0" maxOccurs="unbounded">
813 <xs:element ref="PARAGRAPHE"/>
814 <xs:element ref="LISTE"/>
815 <xs:element ref="TABLEAU"/>
816 <xs:element ref="ENVIMAGE"/>
817 <xs:element ref="APPLET"/>
818 <xs:element ref="FLASH"/>
819 </xs:choice>
820 </xs:complexType>
821 </xs:element>
822
823 <xs:element name="QUESTIONQCM">
824 <xs:annotation>
825 <xs:documentation>
826 Question d'un QCM, avec un énoncé, éventuellement des aides,
827 et les réponses possibles.
828 </xs:documentation>
829 </xs:annotation>
830 <xs:complexType>
831 <xs:sequence>
832 <xs:element ref="ENONCEQCM"/>
833 <xs:element ref="AIDE" minOccurs="0" maxOccurs="unbounded"/>
834 <xs:element ref="REPONSEQCM" maxOccurs="unbounded"/>
835 </xs:sequence>
836 </xs:complexType>
837 </xs:element>
838
839 <xs:element name="ENONCEQCM">
840 <xs:annotation>
841 <xs:documentation>
842 Enoncé d'un QCM (texte très court)
843 </xs:documentation>
844 </xs:annotation>
845 <xs:complexType mixed="true">
846 <xs:choice maxOccurs="unbounded" minOccurs="0">
847 <xs:group ref="texte"/>
848 </xs:choice>
849 </xs:complexType>
850 </xs:element>
851
852 <xs:element name="REPONSEQCM">
853 <xs:annotation>
854 <xs:documentation>
855 Réponse possible à un QCM.
856 Contient le texte de la réponse (TEXTEREP)
857 et un commentaire (COMMENTAIREREP) à afficher si la réponse donnée est incorrecte.
858 L'attribut bonne indique si la réponse est bonne ou pas.
859 </xs:documentation>
860 </xs:annotation>
861 <xs:complexType>
862 <xs:sequence>
863 <xs:element ref="TEXTEREP"/>
864 <xs:element ref="COMMENTAIREREP" minOccurs="0"/>
865 </xs:sequence>
866 <xs:attribute use="required" name="bonne">
867 <xs:simpleType>
868 <xs:restriction base="xs:string">
869 <xs:enumeration value="non"/>
870 <xs:enumeration value="oui"/>
871 </xs:restriction>
872 </xs:simpleType>
873 </xs:attribute>
874 </xs:complexType>
875 </xs:element>
876
877 <xs:element name="TEXTEREP">
878 <xs:annotation>
879 <xs:documentation>
880 Texte de la réponse
881 </xs:documentation>
882 </xs:annotation>
883 <xs:complexType mixed="true">
884 <xs:choice minOccurs="0" maxOccurs="unbounded">
885 <xs:group ref="texte"/>
886 </xs:choice>
887 </xs:complexType>
888 </xs:element>
889
890 <xs:element name="COMMENTAIREREP" type="xs:string">
891 <xs:annotation>
892 <xs:documentation>
893 Commentaire à afficher si la réponse donnée est incorrecte
894 </xs:documentation>
895 </xs:annotation>
896 </xs:element>
897
898
668899 <!-- Eléments mélangés à du texte -->
669900
670901 <xs:group name="texte">
676907 <xs:choice>
677908 <xs:element ref="LIENPAGE"/>
678909 <xs:element ref="LIENWEB"/>
910 <xs:element ref="LIENIMAGE"/>
679911 <xs:element ref="FICHIER"/>
912 <xs:element ref="SYMBOLE"/>
680913 <xs:element ref="EQUATION"/>
681914 <xs:element ref="EQUATEX"/>
682915 <xs:element ref="GLOSSAIRE"/>
712945 <xs:element ref="FICHIER"/>
713946 <xs:element ref="EM"/>
714947 </xs:choice>
715 <xs:attribute name="contribution" type="xs:string" use="optional">
948 <xs:attribute name="contribution" type="typeLabel" use="optional">
716949 <xs:annotation>
717950 <xs:documentation>
718951 Le label de la contribution. Vide si on veut faire un lien vers la même contribution.
719952 </xs:documentation>
720953 </xs:annotation>
721954 </xs:attribute>
722 <xs:attribute name="page" type="xs:string" use="optional">
955 <xs:attribute name="page" type="typeLabel" use="optional">
723956 <xs:annotation>
724957 <xs:documentation>
725958 Le label de la page. Vide si on veut faire un lien vers la première page de la contribution.
748981 </xs:documentation>
749982 </xs:annotation>
750983 </xs:attribute>
984 </xs:complexType>
985 </xs:element>
986
987 <xs:element name="LIENIMAGE">
988 <xs:annotation>
989 <xs:documentation>
990 Lien vers un environnement d'image dans la même page.
991 Doit contenir du texte ou un fichier sur lequel sera placé le lien.
992 </xs:documentation>
993 </xs:annotation>
994 <xs:complexType mixed="true">
995 <xs:choice maxOccurs="unbounded" minOccurs="0">
996 <xs:element ref="FICHIER"/>
997 <xs:element ref="EM"/>
998 </xs:choice>
999 <xs:attribute name="label" type="typeLabel" use="required">
1000 <xs:annotation>
1001 <xs:documentation>
1002 Label de l'environnement d'image (qui doit se trouver dans la même page).
1003 </xs:documentation>
1004 </xs:annotation>
1005 </xs:attribute>
1006 </xs:complexType>
1007 </xs:element>
1008
1009 <xs:element name="SYMBOLE">
1010 <xs:annotation>
1011 <xs:documentation>
1012 Lettre grecque ou petite image à incorporer dans le texte, parmi
1013 les symboles de Jaxe.
1014 </xs:documentation>
1015 </xs:annotation>
1016 <xs:complexType>
1017 <xs:attribute name="nom" type="xs:string" use="required"/>
7511018 </xs:complexType>
7521019 </xs:element>
7531020
8141081 </xs:complexType>
8151082 </xs:element>
8161083
817 <xs:element name="EM" type="xs:string">
1084 <xs:element name="EM">
8181085 <xs:annotation>
8191086 <xs:documentation>
8201087 Emphase (généralement transformé en italique à l'affichage)
8211088 </xs:documentation>
8221089 </xs:annotation>
1090 <xs:complexType mixed="true">
1091 <xs:choice maxOccurs="unbounded" minOccurs="0">
1092 <xs:element ref="SUP"/>
1093 <xs:element ref="SUB"/>
1094 </xs:choice>
1095 </xs:complexType>
8231096 </xs:element>
8241097
8251098 <xs:element name="CODE" type="xs:string">
1616
1717 <xsl:variable name="uri-chemin-xml"><xsl:call-template name="rep-uri"><xsl:with-param name="chemin" select="$jaxe-uri-xml"/></xsl:call-template></xsl:variable>
1818
19 <xsl:template match="XPAGES">
20 <xsl:variable name="contribution"><xsl:choose>
21 <xsl:when test="parent::XPAGES">non</xsl:when>
22 <xsl:otherwise>oui</xsl:otherwise>
23 </xsl:choose></xsl:variable>
24 <xsl:variable name="labelfichiers"><xsl:choose>
25 <xsl:when test="parent::XPAGES"><xsl:value-of select="ancestor::XPAGES[count(parent::XPAGES)=0]/INFORMATIONS/LABEL"/></xsl:when>
26 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/></xsl:otherwise>
27 </xsl:choose></xsl:variable>
28 <XPAGES contribution="{$contribution}" labelfichiers="{$labelfichiers}">
29 <xsl:apply-templates/>
30 </XPAGES>
31 </xsl:template>
32
1933 <xsl:template match="REFXPAGES">
2034 <xsl:variable name="contrib" select="concat($uri-chemin-xml, $sep, '..', $sep, @label, $sep, @label, '.xml')"/>
21 <XPAGES>
35 <XPAGES contribution="oui" labelfichiers="{@label}">
2236 <xsl:for-each select="document($contrib)/*">
2337 <xsl:apply-templates/>
2438 </xsl:for-each>
66
77 <xsl:param name="jaxe-fichier-xml"/>
88 <xsl:param name="jaxe-fichier-xsl"/>
9 <xsl:param name="jaxe-fichier-destination"/>
10 <xsl:param name="jaxe-uri-destination"/>
911
1012 <!-- Recopie du fichier XML, copie des fichiers, réduction des images, création de images.xml -->
1113 <!-- (on ne peut pas faire ça dans XPAGES3.xsl à cause de la valeur différente pour output method) -->
2325 <xsl:variable name="chemin-xsl"><xsl:call-template name="rep-fichier"><xsl:with-param name="chemin" select="$jaxe-fichier-xsl"/></xsl:call-template></xsl:variable>
2426
2527 <!-- chemin du répertoire dans lequel les fichiers HTML seront générés -->
26 <xsl:param name="chemin-site"><xsl:value-of select="concat($chemin-xml, $sep, 'site')"/></xsl:param>
28 <xsl:param name="chemin-site"><xsl:choose>
29 <xsl:when test="$jaxe-fichier-destination!=''"><xsl:call-template name="rep-fichier"><xsl:with-param name="chemin" select="$jaxe-fichier-destination"/></xsl:call-template></xsl:when>
30 <xsl:otherwise><xsl:value-of select="$chemin-xml"/></xsl:otherwise>
31 </xsl:choose><xsl:value-of select="concat($sep, 'site')"/></xsl:param>
2732
2833 <!-- chemin du répertoire contribXML (dans lequel se trouvent toutes les contributions) -->
2934 <xsl:variable name="chemin-contrib"><xsl:call-template name="rep-fichier"><xsl:with-param name="chemin" select="$chemin-xml"/></xsl:call-template></xsl:variable>
6368 <xsl:template name="copier-fichiers-contrib">
6469 <xsl:if test="function-available('faire-images:copierDossierContrib')">
6570 <xsl:for-each select="//XPAGES">
66 <xsl:variable name="label-ensemble" select="INFORMATIONS/LABEL"/>
67 <xsl:if test="$label-ensemble!=''">
68 <xsl:variable name="res" select="faire-images:copierDossierContrib(string(concat($chemin-contrib, $sep, $label-ensemble)), string($chemin-site))"/>
71 <xsl:variable name="label-fichiers" select="@labelfichiers"/>
72 <xsl:if test="$label-fichiers!='' and not(preceding-sibling::XPAGES/@labelfichiers=$label-fichiers)">
73 <xsl:variable name="res" select="faire-images:copierDossierContrib(string(concat($chemin-contrib, $sep, $label-fichiers)), string($chemin-site))"/>
6974 <xsl:if test="$res!='ok'">
70 <xsl:message>Erreur à la copie du dossier contrib <xsl:value-of select="$label-ensemble"/></xsl:message>
75 <xsl:message>Erreur à la copie du dossier contrib <xsl:value-of select="$label-fichiers"/></xsl:message>
7176 </xsl:if>
7277 </xsl:if>
7378 </xsl:for-each>
100105 </xsl:text>
101106 <xsl:for-each select="//FICHIER[@nom!='']|//LOGO[@fichier!='']">
102107 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
108 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
103109 <xsl:variable name="localisation"><xsl:choose>
104110 <xsl:when test="parent::ENVIMAGE and ../@localisation!=''"><xsl:value-of select="../@localisation"/></xsl:when>
105111 <xsl:otherwise>texte</xsl:otherwise>
106112 </xsl:choose></xsl:variable>
107 <xsl:variable name="dossierfichier" select="concat($chemin-contrib, $sep, $label-ensemble)"/>
108 <xsl:variable name="dossier-res" select="concat($chemin-site, '/pages_', $label-ensemble)"/>
113 <xsl:variable name="dossierfichier" select="concat($chemin-contrib, $sep, $label-fichiers)"/>
114 <xsl:variable name="dossier-res" select="concat($chemin-site, '/pages_', $label-fichiers)"/>
109115 <xsl:variable name="res" select="faire-images:transfo(string($dossierfichier), string(@nom|@fichier), string($localisation), string($dossier-res))"/>
110116 <xsl:if test="faire-images:resok($res)='erreur'">
111 <xsl:message>Erreur à la réduction de l'image <xsl:value-of select="@nom|@fichier"/> de la contrib <xsl:value-of select="$label-ensemble"/></xsl:message>
117 <xsl:message>Erreur à la réduction de l'image <xsl:value-of select="@nom|@fichier"/> de la contrib <xsl:value-of select="$label-fichiers"/></xsl:message>
112118 </xsl:if>
113119 <xsl:variable name="redim"><xsl:choose>
114120 <xsl:when test="faire-images:resok($res)='réduit'">oui</xsl:when>
115121 <xsl:otherwise>non</xsl:otherwise>
116122 </xsl:choose></xsl:variable>
117 <IMAGE nom="{@nom|@fichier}" contrib="{$label-ensemble}" localisation="{$localisation}" redim="{$redim}" largeur1="{faire-images:largeur1($res)}" hauteur1="{faire-images:hauteur1($res)}">
123 <IMAGE nom="{@nom|@fichier}" contrib="{$label-fichiers}" localisation="{$localisation}" redim="{$redim}" largeur1="{faire-images:largeur1($res)}" hauteur1="{faire-images:hauteur1($res)}">
118124 <xsl:if test="$redim='oui'">
119125 <xsl:attribute name="largeur2"><xsl:value-of select="faire-images:largeur2($res)"/></xsl:attribute>
120126 <xsl:attribute name="hauteur2"><xsl:value-of select="faire-images:hauteur2($res)"/></xsl:attribute>
121127 </xsl:if>
122128 </IMAGE><xsl:text>
123129 </xsl:text>
130 <!-- réduction pour l'impression (localisation: texte) -->
131 <xsl:if test="$localisation!='texte'">
132 <xsl:variable name="res2" select="faire-images:transfo(string($dossierfichier), string(@nom|@fichier), string('texte'), string($dossier-res))"/>
133 <xsl:if test="faire-images:resok($res2)='erreur'">
134 <xsl:message>Erreur à la réduction pour l'impression de l'image <xsl:value-of select="@nom|@fichier"/> de la contrib <xsl:value-of select="$label-fichiers"/></xsl:message>
135 </xsl:if>
136 <xsl:variable name="redim2"><xsl:choose>
137 <xsl:when test="faire-images:resok($res2)='réduit'">oui</xsl:when>
138 <xsl:otherwise>non</xsl:otherwise>
139 </xsl:choose></xsl:variable>
140 <IMAGE nom="{@nom|@fichier}" contrib="{$label-fichiers}" localisation="texte" redim="{$redim2}" largeur1="{faire-images:largeur1($res2)}" hauteur1="{faire-images:hauteur1($res2)}">
141 <xsl:if test="$redim2='oui'">
142 <xsl:attribute name="largeur2"><xsl:value-of select="faire-images:largeur2($res2)"/></xsl:attribute>
143 <xsl:attribute name="hauteur2"><xsl:value-of select="faire-images:hauteur2($res2)"/></xsl:attribute>
144 </xsl:if>
145 </IMAGE><xsl:text>
146 </xsl:text>
147 </xsl:if>
124148 </xsl:for-each>
125149 </IMAGES>
126150 </xsl:with-param>
133157 <xsl:for-each select="//EQUATION | //EQUATEX">
134158 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
135159 <xsl:variable name="numero"><xsl:number from="XPAGES" count="EQUATION|EQUATEX" level="any"/></xsl:variable>
136 <xsl:variable name="dossier-res" select="concat($chemin-site, '/pages_', $label-ensemble)"/>
160 <xsl:variable name="dossier-res" select="concat($chemin-site, '/pages_', ancestor::XPAGES[1]/@labelfichiers)"/>
137161 <xsl:variable name="res" select="faire-images:creerImageEquation(string(.), string($numero), string($label-ensemble), string($dossier-res))"/>
138162 <xsl:if test="$res!='ok'">
139163 <xsl:message>Erreur à la copie du dossier contrib <xsl:value-of select="$label-ensemble"/></xsl:message>
66 <xsl:param name="jaxe-fichier-xml"/>
77 <xsl:param name="jaxe-fichier-xsl"/>
88 <xsl:param name="jaxe-uri-xml"/>
9 <xsl:param name="affichage">web</xsl:param> <!-- web / impression -->
9 <xsl:param name="jaxe-fichier-destination"/>
10 <xsl:param name="jaxe-uri-destination"/>
11
12 <xsl:param name="sortie">public</xsl:param> <!-- public|production -->
13 <!-- les solutions des exercices d'évaluation et les commentaires sont affichées si sortie=production -->
1014
1115 <!-- séparateur de chemins ( / ou \ ) -->
1216 <xsl:variable name="sep"><xsl:choose>
2226 <xsl:variable name="chemin-xsl"><xsl:call-template name="rep-fichier"><xsl:with-param name="chemin" select="$jaxe-fichier-xsl"/></xsl:call-template></xsl:variable>
2327
2428 <!-- chemin du répertoire dans lequel les fichiers HTML seront générés -->
25 <xsl:param name="chemin-site"><xsl:value-of select="concat($chemin-xml, $sep, 'site')"/></xsl:param>
26 <xsl:param name="uri-site"><xsl:value-of select="concat($uri-chemin-xml, '/site')"/></xsl:param>
29 <xsl:param name="chemin-site"><xsl:choose>
30 <xsl:when test="$jaxe-fichier-destination!=''"><xsl:call-template name="rep-fichier"><xsl:with-param name="chemin" select="$jaxe-fichier-destination"/></xsl:call-template></xsl:when>
31 <xsl:otherwise><xsl:value-of select="$chemin-xml"/></xsl:otherwise>
32 </xsl:choose><xsl:value-of select="concat($sep, 'site')"/></xsl:param>
33 <xsl:param name="uri-site"><xsl:choose>
34 <xsl:when test="$jaxe-uri-destination!=''"><xsl:call-template name="rep-uri"><xsl:with-param name="chemin" select="$jaxe-uri-destination"/></xsl:call-template></xsl:when>
35 <xsl:otherwise><xsl:value-of select="$uri-chemin-xml"/></xsl:otherwise>
36 </xsl:choose>/site</xsl:param>
37
38 <xsl:param name="rubriques">oui</xsl:param> <!-- oui/non -->
2739
2840 <!-- chemin du répertoire contribXML (dans lequel se trouvent toutes les contributions) -->
2941 <xsl:variable name="chemin-contrib"><xsl:call-template name="rep-fichier"><xsl:with-param name="chemin" select="$chemin-xml"/></xsl:call-template></xsl:variable>
3042
31 <xsl:variable name="feuille-de-style"><xsl:choose>
32 <xsl:when test="$affichage='web'">style.css</xsl:when>
33 <xsl:otherwise>style_impression.css</xsl:otherwise> <!-- à faire -->
34 </xsl:choose></xsl:variable>
43 <xsl:variable name="feuille-de-style">style.css</xsl:variable>
3544
3645 <xsl:variable name="interface_par_defaut">peinture</xsl:variable>
3746
4453 <xsl:variable name="messages" select="document(concat($chemin-xsl, '/XPAGES_messages_', $langue, '.xml'))/messages"/>
4554
4655
47
56
4857 <xsl:template match="/">
4958
5059 <!-- nom du fichier XML (qui doit être égal au label de l'ensemble) -->
6372
6473 <xsl:call-template name="infos-erreurs"/>
6574
75 <xsl:call-template name="fichier-index"/>
76
77 <xsl:if test="$nomrep = XPAGES/INFORMATIONS/LABEL and $nomfichierxml = concat($nomrep, '.xml')">
78
79 <xsl:apply-templates/>
80
81 <p><a href="site/index.html"><xsl:value-of select="$messages/message[@label='aller à la page d_accueil du site']"/></a></p>
82 <p><a href="site/pages_{XPAGES/INFORMATIONS/LABEL}/sommaire.html"><xsl:value-of select="$messages/message[@label='aller au sommaire']"/></a></p>
83 <p><a href="site/pages_{XPAGES/INFORMATIONS/LABEL}/impression.html"><xsl:value-of select="$messages/message[@label='aller à la page d_impression']"/></a></p>
84 </xsl:if>
85
86 </body>
87 </html>
88
89 <xsl:if test="$sortie='production'">
90 <xsl:call-template name="mauvais-liens"/>
91 <xsl:call-template name="labels"/>
92 <xsl:call-template name="commentaires"/>
93 <xsl:call-template name="credits"/>
94 </xsl:if>
95 </xsl:template>
96
97
98 <xsl:template name="infos-erreurs">
99 <!-- nom du fichier XML (qui doit être égal au label de l'ensemble) -->
100 <xsl:variable name="nomfichierxml"><xsl:call-template name="nom-fichier">
101 <xsl:with-param name="chemin" select="$jaxe-fichier-xml"/>
102 </xsl:call-template></xsl:variable>
103
104 <!-- nom du répertoire du fichier XML (qui doit être égal au label de l'ensemble) -->
105 <xsl:variable name="nomrep"><xsl:call-template name="nom-fichier"><xsl:with-param name="chemin" select="$chemin-xml"/></xsl:call-template></xsl:variable>
106
107 <xsl:choose>
108 <xsl:when test="count(/XPAGES/INFORMATIONS) = 0">
109 <p><b><xsl:value-of select="$messages/message[@label='Attention !']"/></b>&#xA0;<xsl:value-of select="$messages/message[@label='L_élément INFORMATIONS est obligatoire sous la racine XPAGE. C_est un élément à insérer en premier dans le document, et qui permet de spécifier son label et son titre.']"/></p>
110 </xsl:when>
111
112 <xsl:when test="count(/XPAGES/INFORMATIONS/LABEL) = 0">
113 <p><b><xsl:value-of select="$messages/message[@label='Attention !']"/></b>&#xA0;<xsl:value-of select="$messages/message[@label='Le label est obligatoire dans les informations. Il permet d_identifier le document, et de faire des liens vers ce document depuis d_autres documents XPAGES. Ce label doit correspondre au nom du fichier XML et au nom du dossier parent.']"/></p>
114 </xsl:when>
115
116 <xsl:when test="$nomrep != /XPAGES/INFORMATIONS/LABEL or $nomfichierxml != concat($nomrep, '.xml')">
117 <p><b><xsl:value-of select="$messages/message[@label='Attention !']"/></b>&#xA0;<xsl:value-of select="$messages/message[@label='Le nom du dossier doit être égal au label du document, et le nom du fichier XML doit être le label avec l_extension .xml.']"/></p>
118 <p><xsl:value-of select="$messages/message[@label='Actuellement, le nom du dossier est']"/>&#xA0;<tt><xsl:value-of select="$nomrep"/></tt><xsl:value-of select="$messages/message[@label=', le label du document est']"/>&#xA0;<tt><xsl:value-of select="/XPAGES/INFORMATIONS/LABEL"/></tt><xsl:value-of select="$messages/message[@label=', et le nom du fichier est']"/>&#xA0;<tt><xsl:value-of select="$nomfichierxml"/></tt></p>
119 </xsl:when>
120 </xsl:choose>
121 </xsl:template>
122
123
124 <xsl:template name="fichier-index">
66125 <!-- fichier site/index.html -->
67126 <xsl:for-each select="/XPAGES">
68127 <xsl:choose>
86145 </xsl:otherwise>
87146 </xsl:choose>
88147 </xsl:for-each>
89
90 <xsl:if test="$nomrep = XPAGES/INFORMATIONS/LABEL and $nomfichierxml = concat($nomrep, '.xml')">
91
92 <xsl:apply-templates/>
93
94 <xsl:choose>
95 <xsl:when test="$affichage='web'">
96 <p><a href="site/index.html"><xsl:value-of select="$messages/message[@label='aller à la page d_accueil du site']"/></a></p>
97 <p><a href="site/pages_{XPAGES/INFORMATIONS/LABEL}/sommaire.html"><xsl:value-of select="$messages/message[@label='aller au sommaire']"/></a></p>
98 </xsl:when>
99 <xsl:otherwise>
100 <p><a href="site/pages_{XPAGES/INFORMATIONS/LABEL}/impression.html"><xsl:value-of select="$messages/message[@label='aller à la page d_impression']"/></a></p>
101 </xsl:otherwise>
102 </xsl:choose>
103 </xsl:if>
104
105 </body>
106 </html>
107 </xsl:template>
108
109
110 <xsl:template name="infos-erreurs">
111 <!-- nom du fichier XML (qui doit être égal au label de l'ensemble) -->
112 <xsl:variable name="nomfichierxml"><xsl:call-template name="nom-fichier">
113 <xsl:with-param name="chemin" select="$jaxe-fichier-xml"/>
114 </xsl:call-template></xsl:variable>
115
116 <!-- nom du répertoire du fichier XML (qui doit être égal au label de l'ensemble) -->
117 <xsl:variable name="nomrep"><xsl:call-template name="nom-fichier"><xsl:with-param name="chemin" select="$chemin-xml"/></xsl:call-template></xsl:variable>
118
119 <xsl:choose>
120 <xsl:when test="count(/XPAGES/INFORMATIONS) = 0">
121 <p><b><xsl:value-of select="$messages/message[@label='Attention !']"/></b>&#xA0;<xsl:value-of select="$messages/message[@label='L_élément INFORMATIONS est obligatoire sous la racine XPAGE. C_est un élément à insérer en premier dans le document, et qui permet de spécifier son label et son titre.']"/></p>
122 </xsl:when>
123
124 <xsl:when test="count(/XPAGES/INFORMATIONS/LABEL) = 0">
125 <p><b><xsl:value-of select="$messages/message[@label='Attention !']"/></b>&#xA0;<xsl:value-of select="$messages/message[@label='Le label est obligatoire dans les informations. Il permet d_identifier le document, et de faire des liens vers ce document depuis d_autres documents XPAGES. Ce label doit correspondre au nom du fichier XML et au nom du dossier parent.']"/></p>
126 </xsl:when>
127
128 <xsl:when test="$nomrep != /XPAGES/INFORMATIONS/LABEL or $nomfichierxml != concat($nomrep, '.xml')">
129 <p><b><xsl:value-of select="$messages/message[@label='Attention !']"/></b>&#xA0;<xsl:value-of select="$messages/message[@label='Le nom du dossier doit être égal au label du document, et le nom du fichier XML doit être le label avec l_extension .xml.']"/></p>
130 <p><xsl:value-of select="$messages/message[@label='Actuellement, le nom du dossier est']"/>&#xA0;<tt><xsl:value-of select="$nomrep"/></tt><xsl:value-of select="$messages/message[@label=', le label du document est']"/>&#xA0;<tt><xsl:value-of select="/XPAGES/INFORMATIONS/LABEL"/></tt><xsl:value-of select="$messages/message[@label=', et le nom du fichier est']"/>&#xA0;<tt><xsl:value-of select="$nomfichierxml"/></tt></p>
131 </xsl:when>
132 </xsl:choose>
133148 </xsl:template>
134149
135150
136151 <xsl:template match="XPAGES">
137152
138153 <xsl:variable name="prefixe">../</xsl:variable>
139 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
154 <xsl:variable name="interface">interface/<xsl:choose>
140155 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
141156 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
142157 </xsl:choose></xsl:variable>
143158
144 <xsl:choose>
145 <xsl:when test="$affichage='web'">
146
159 <xsl:variable name="nom-fichier-index"><xsl:choose>
160 <xsl:when test="@contribution='oui'">index.html</xsl:when>
161 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
162 </xsl:choose></xsl:variable>
163 <xsl:if test="@contribution!='oui' or count(PAGE[@label='index'])=0">
164 <xsl:call-template name="ecrire-fichier">
165 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', @labelfichiers, $sep, $nom-fichier-index)"/>
166 <xsl:with-param name="contenu">
167 <xsl:call-template name="page-index">
168 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
169 </xsl:call-template>
170 </xsl:with-param>
171 </xsl:call-template>
172 </xsl:if>
173
174 <xsl:apply-templates select="PAGE|XPAGES"/>
175
176 <xsl:for-each select="PAGE//EXERCICE | PAGE//QCM">
177 <xsl:call-template name="fichiers-aide">
178 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
179 </xsl:call-template>
180 </xsl:for-each>
181
182 <xsl:if test="count(ancestor::XPAGES)=0">
183 <xsl:call-template name="ecrire-fichier">
184 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', INFORMATIONS/LABEL, $sep, 'sommaire.html')"/>
185 <xsl:with-param name="contenu">
186 <xsl:call-template name="page-sommaire">
187 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
188 </xsl:call-template>
189 </xsl:with-param>
190 </xsl:call-template>
191
192 <xsl:if test="//GLOSSAIRE">
147193 <xsl:call-template name="ecrire-fichier">
148 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', INFORMATIONS/LABEL, $sep, 'index.html')"/>
194 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', INFORMATIONS/LABEL, $sep, 'glossaire.html')"/>
149195 <xsl:with-param name="contenu">
150 <xsl:call-template name="page-index">
196 <xsl:call-template name="page-glossaire">
151197 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
152198 </xsl:call-template>
153199 </xsl:with-param>
154200 </xsl:call-template>
155
156 <xsl:apply-templates select="PAGE[@label!='index']|XPAGES"/>
157
158 <xsl:call-template name="ecrire-fichier">
159 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', INFORMATIONS/LABEL, $sep, 'sommaire.html')"/>
160 <xsl:with-param name="contenu">
161 <xsl:call-template name="page-sommaire"/>
162 </xsl:with-param>
201 </xsl:if>
202 </xsl:if>
203
204 <xsl:for-each select="PAGE//ENVIMAGE/FICHIER">
205 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
206 <xsl:variable name="nomfichier" select="@nom"/>
207 <xsl:variable name="localisation" select="../@localisation"/>
208 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@largeur1"/>
209 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@hauteur1"/>
210 <xsl:variable name="redim" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@redim"/>
211 <xsl:if test="($redim='oui' or $localisation='icône') and count(preceding::FICHIER[@nom=$nomfichier and ancestor::XPAGES[1]/@labelfichiers=$label-fichiers])=0">
212 <!-- les vidéos ne peuvent pas être redimensionnées mais il faut un fichier HTML si elles sont en icône -->
213 <xsl:call-template name="html-figure">
214 <xsl:with-param name="interface" select="$interface"/>
215 <xsl:with-param name="largeur1" select="$largeur1"/>
216 <xsl:with-param name="hauteur1" select="$hauteur1"/>
163217 </xsl:call-template>
164
165 <xsl:if test="//GLOSSAIRE">
166 <xsl:call-template name="ecrire-fichier">
167 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', INFORMATIONS/LABEL, $sep, 'glossaire.html')"/>
168 <xsl:with-param name="contenu">
169 <xsl:call-template name="page-glossaire"/>
170 </xsl:with-param>
171 </xsl:call-template>
172 </xsl:if>
173
174 <xsl:if test="count(ancestor::XPAGES)=0">
175 <xsl:for-each select="//ENVIMAGE/FICHIER[1]">
176 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
177 <xsl:variable name="nomfichier" select="@nom"/>
178 <xsl:variable name="localisation" select="../@localisation"/>
179 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@largeur1"/>
180 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@hauteur1"/>
181 <xsl:variable name="redim" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@redim"/>
182 <xsl:if test="($redim='oui' or $localisation='icône') and count(preceding::FICHIER[@nom=$nomfichier and ancestor::XPAGES[1]/INFORMATIONS/LABEL=$label-ensemble])=0">
183 <!-- les vidéos ne peuvent pas être redimensionnées mais il faut un fichier HTML si elles sont en icône -->
184 <xsl:call-template name="html-figure">
185 <xsl:with-param name="largeur1" select="$largeur1"/>
186 <xsl:with-param name="hauteur1" select="$hauteur1"/>
187 </xsl:call-template>
188 </xsl:if>
189 </xsl:for-each>
190 </xsl:if>
191 </xsl:when>
192
193 <xsl:otherwise>
194 <xsl:choose>
195 <xsl:when test="count(ancestor::XPAGES)=0">
196 <xsl:call-template name="ecrire-fichier">
197 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', INFORMATIONS/LABEL, $sep, 'impression.html')"/>
198 <xsl:with-param name="contenu">
199 <html>
200 <head>
201 <title><xsl:value-of select="$messages/message[@label='Page pour l_impression']"/></title>
202 <link type="text/css" rel="stylesheet" href="{$interface}/{$feuille-de-style}"/>
203 </head>
204 <body>
205 <xsl:apply-templates select="PAGE|XPAGES"/>
206 </body>
207 </html>
208 </xsl:with-param>
209 </xsl:call-template>
210 </xsl:when>
211 <xsl:otherwise>
212 <xsl:apply-templates select="PAGE|XPAGES"/>
213 </xsl:otherwise>
214 </xsl:choose>
215 </xsl:otherwise>
216 </xsl:choose>
218 </xsl:if>
219 </xsl:for-each>
220
221 <xsl:variable name="nom-fichier-impression"><xsl:choose>
222 <xsl:when test="@contribution='oui'">impression.html</xsl:when>
223 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_impression.html</xsl:otherwise>
224 </xsl:choose></xsl:variable>
225 <xsl:call-template name="ecrire-fichier">
226 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', @labelfichiers, $sep, $nom-fichier-impression)"/>
227 <xsl:with-param name="contenu">
228 <xsl:call-template name="contenu-impression">
229 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
230 </xsl:call-template>
231 </xsl:with-param>
232 </xsl:call-template>
217233
218234 </xsl:template>
219235
258274 <xsl:if test="INFORMATIONS/TITRE!=''">
259275 <title><xsl:value-of select="INFORMATIONS/TITRE"/></title>
260276 </xsl:if>
261 <link type="text/css" rel="stylesheet" href="{$interface}/{$feuille-de-style}"/>
277 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/{$feuille-de-style}"/>
262278 <xsl:for-each select="preceding::PAGE[1]">
263 <link rel="Prev" href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html"/>
279 <link rel="Prev" href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html"/>
264280 </xsl:for-each>
265281 <xsl:variable name="nb" select="count(ancestor-or-self::XPAGES)"/>
266282 <link rel="Contents" href="{$prefixe}pages_{ancestor-or-self::XPAGES[$nb]/INFORMATIONS/LABEL}/sommaire.html"/>
267283 <link rel="Start" href="{PAGE[1]/@label}.html"/>
268284 <xsl:for-each select="PAGE[1]">
269 <link rel="Next" href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html"/>
285 <link rel="Next" href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html"/>
270286 </xsl:for-each>
271287 <xsl:choose>
272288 <xsl:when test="count(ancestor::XPAGES) &gt; 1">
273 <link rel="Up" href="{$prefixe}pages_{ancestor::XPAGES[1]/INFORMATIONS/LABEL}/index.html"/>
289 <xsl:for-each select="ancestor::XPAGES[1]">
290 <xsl:variable name="nom-fichier-index"><xsl:choose>
291 <xsl:when test="@contribution='oui'">index.html</xsl:when>
292 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
293 </xsl:choose></xsl:variable>
294 <link rel="Up" href="{$prefixe}pages_{INFORMATIONS/LABEL}/{$nom-fichier-index}"/>
295 </xsl:for-each>
274296 </xsl:when>
275297 <xsl:otherwise>
276298 <link rel="Up" href="{$prefixe}index.html"/>
278300 </xsl:choose>
279301 </head>
280302 <body class="page">
281 <xsl:call-template name="contenu-body"/>
303 <xsl:call-template name="contenu-body">
304 <xsl:with-param name="interface" select="$interface"/>
305 </xsl:call-template>
282306 </body>
283307 </html>
284308 </xsl:template>
297321 </xsl:choose></a>
298322 </xsl:when>
299323 <xsl:when test="self::XPAGES">
300 <a href="{$prefixe}pages_{INFORMATIONS/LABEL}/{PAGE[1]/@label}.html" class="lien"><xsl:value-of select="INFORMATIONS/TITRE"/></a>
324 <xsl:choose>
325 <xsl:when test="*[self::PAGE|self::XPAGES][1][self::PAGE]">
326 <a href="{$prefixe}pages_{@labelfichiers}/{PAGE[1]/@label}.html" class="lien"><xsl:value-of select="INFORMATIONS/TITRE"/></a>
327 </xsl:when>
328 <xsl:otherwise>
329 <xsl:variable name="nom-fichier-index"><xsl:choose>
330 <xsl:when test="@contribution='oui'">index.html</xsl:when>
331 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
332 </xsl:choose></xsl:variable>
333 <a href="{$prefixe}pages_{ancestor-or-self::XPAGES[1]/@labelfichiers}/{$nom-fichier-index}" class="lien"><xsl:value-of select="INFORMATIONS/TITRE"/></a>
334 </xsl:otherwise>
335 </xsl:choose>
301336 </xsl:when>
302337 </xsl:choose>
303338 </li>
307342
308343
309344 <xsl:template match="PAGE">
310 <xsl:choose>
311 <xsl:when test="$affichage='web'">
312 <xsl:call-template name="ecrire-fichier">
313 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', ../INFORMATIONS/LABEL, $sep, @label,'.html')"/>
314 <xsl:with-param name="contenu">
315 <xsl:call-template name="contenu-page"/>
316 </xsl:with-param>
317 </xsl:call-template>
318 </xsl:when>
319 <xsl:otherwise>
320 <xsl:call-template name="contenu-body"/>
321 <div style="page-break-after: always"/> <!-- pour les navigateurs comprenant CSS 2 -->
322 </xsl:otherwise>
323 </xsl:choose>
345 <xsl:variable name="label-contrib" select="ancestor::XPAGES[1]/@labelfichiers"/>
346 <xsl:call-template name="ecrire-fichier">
347 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', $label-contrib, $sep, @label,'.html')"/>
348 <xsl:with-param name="contenu">
349 <xsl:call-template name="contenu-page"/>
350 </xsl:with-param>
351 </xsl:call-template>
324352 </xsl:template>
325353
326354
327355 <xsl:template name="contenu-page">
328356 <xsl:variable name="prefixe">../</xsl:variable>
329 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
357 <xsl:variable name="interface">interface/<xsl:choose>
330358 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
331359 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
332360 </xsl:choose></xsl:variable>
340368 <title>page <xsl:value-of select="position()"/></title>
341369 </xsl:otherwise>
342370 </xsl:choose>
343 <link type="text/css" rel="stylesheet" href="{$interface}/{$feuille-de-style}"/>
344 <xsl:for-each select="preceding::PAGE[1]">
345 <link rel="Prev" href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html"/>
371 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/{$feuille-de-style}"/>
372 <xsl:for-each select="preceding::PAGE[1][@label!='index' or count(ancestor::XPAGES) &gt; 1]">
373 <link rel="Prev" href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html"/>
346374 </xsl:for-each>
347 <link rel="Contents" href="index.html"/>
348 <xsl:for-each select="following::PAGE[1]">
349 <link rel="Next" href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html"/>
375 <xsl:variable name="nom-fichier-index-parent"><xsl:choose>
376 <xsl:when test="../@contribution='oui'">index.html</xsl:when>
377 <xsl:otherwise><xsl:value-of select="../INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
378 </xsl:choose></xsl:variable>
379 <link rel="Contents" href="{$nom-fichier-index-parent}"/>
380 <xsl:for-each select="descendant::PAGE[1] | following::PAGE[1]">
381 <link rel="Next" href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html"/>
350382 </xsl:for-each>
351383 <xsl:choose>
352384 <xsl:when test="count(ancestor::XPAGES) &gt; 1">
353 <link rel="Up" href="{$prefixe}pages_{ancestor::XPAGES[1]/INFORMATIONS/LABEL}/index.html"/>
385 <link rel="Up" href="{$nom-fichier-index-parent}"/>
354386 </xsl:when>
355387 <xsl:otherwise>
356388 <link rel="Up" href="{$prefixe}index.html"/>
358390 </xsl:choose>
359391 <!-- ce meta est ajouté automatiquement -->
360392 <!--<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>-->
393 <xsl:if test=".//QCM">
394 <xsl:call-template name="script-qcm"/>
395 </xsl:if>
396 <xsl:if test=".//ENVIMAGE[@localisation='page']">
397 <xsl:call-template name="script-imagettes">
398 <xsl:with-param name="interface" select="$interface"/>
399 </xsl:call-template>
400 </xsl:if>
361401 </head>
362402 <body class="page">
363 <xsl:call-template name="contenu-body"/>
403 <xsl:call-template name="contenu-body">
404 <xsl:with-param name="interface" select="$interface"/>
405 </xsl:call-template>
364406 </body>
365407 </html>
366408 </xsl:template>
379421 </xsl:template>
380422
381423
424 <xsl:template name="zone_sommaire">
425 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
426 <xsl:param name="prefixe">../</xsl:param>
427 <div class="zone_sommaire">
428 <div class="zone_mininav">
429 <table width="100%"><tr>
430 <xsl:variable name="nb" select="count(ancestor-or-self::XPAGES)"/>
431 <td align="center">
432 <a href="{$prefixe}index.html" title="{$messages/message[@label='Entrée du site']}"><img src="{$prefixe}{$interface}/home.gif" width="25" height="25" alt="{$messages/message[@label='Entrée du site']}" border="0"/></a>
433 </td>
434 <td align="center">
435 <a href="{$prefixe}pages_{ancestor-or-self::XPAGES[$nb]/INFORMATIONS/LABEL}/sommaire.html" title="{$messages/message[@label='Sommaire']}"><img src="{$prefixe}{$interface}/sommaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Sommaire']}"/></a>
436 </td>
437 <xsl:if test="//GLOSSAIRE">
438 <td align="center">
439 <a href="{$prefixe}pages_{ancestor-or-self::XPAGES[$nb]/INFORMATIONS/LABEL}/glossaire.html" title="{$messages/message[@label='Glossaire']}"><img src="{$prefixe}{$interface}/glossaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Glossaire']}"/></a>
440 </td>
441 </xsl:if>
442 <td align="center">
443 <xsl:for-each select="ancestor-or-self::XPAGES[1]">
444 <xsl:variable name="nom-fichier-impression"><xsl:choose>
445 <xsl:when test="@contribution='oui'">impression.html</xsl:when>
446 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_impression.html</xsl:otherwise>
447 </xsl:choose></xsl:variable>
448 <a href="{$prefixe}pages_{@labelfichiers}/{$nom-fichier-impression}" title="{INFORMATIONS/TITRE} : {$messages/message[@label='Page pour l_impression']}" target="_blank"><img src="{$prefixe}{$interface}/impression.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Page pour l_impression']}"/></a>
449 </xsl:for-each>
450 </td>
451 <td align="center">
452 <xsl:for-each select="preceding::PAGE[1][@label!='index' or count(ancestor::XPAGES) &gt; 1]">
453 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html" accesskey="j" title="{$messages/message[@label='Page précédente']}"><img src="{$prefixe}{$interface}/petiteflechegauche.gif" width="25" height="16" alt="&lt;-" border="0"/></a>
454 </xsl:for-each>
455 </td>
456 <td align="center">
457 <xsl:for-each select="./descendant::PAGE[1] | following::PAGE[current()/self::PAGE and position()=1]">
458 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html" accesskey="l" title="{$messages/message[@label='Page suivante']}"><img src="{$prefixe}{$interface}/petiteflechedroite.gif" width="25" height="16" alt="-&gt;" border="0"/></a>
459 </xsl:for-each>
460 </td>
461 </tr></table>
462 </div>
463
464 <xsl:call-template name="sommaire-page">
465 <xsl:with-param name="interface" select="$interface"/>
466 </xsl:call-template>
467 </div>
468 </xsl:template>
469
470
471 <xsl:template name="zone_titre">
472 <div class="zone_titre">
473 <xsl:variable name="titre"><xsl:choose>
474 <xsl:when test="self::XPAGES"><xsl:value-of select="INFORMATIONS/TITRE"/></xsl:when>
475 <xsl:otherwise><xsl:value-of select="@titre"/></xsl:otherwise>
476 </xsl:choose></xsl:variable>
477 <table cellspacing="0" cellpadding="0"><tr>
478 <td><h1><xsl:value-of select="$titre"/></h1></td>
479 </tr></table>
480 </div>
481 </xsl:template>
482
483
382484 <xsl:template name="contenu-body">
485 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
383486
384487 <!--
385488 Organisation des divs:
400503 -->
401504
402505 <xsl:variable name="prefixe">../</xsl:variable>
403 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
404 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
405 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
406 </xsl:choose></xsl:variable>
407506
408507 <xsl:call-template name="zone_logo"/>
409508
410509 <xsl:call-template name="zone_bandeau"/>
411510
412 <xsl:if test="count(ancestor-or-self::XPAGES[last()]/XPAGES) &gt; 1">
511 <xsl:if test="count(ancestor-or-self::XPAGES[last()]/XPAGES) &gt; 1 and $rubriques='oui'">
413512 <xsl:call-template name="zone_rubriques"/>
414513 </xsl:if>
415514
416 <div class="zone_sommaire">
417 <div class="zone_mininav">
418 <table width="100%"><tr>
419 <xsl:variable name="nb" select="count(ancestor-or-self::XPAGES)"/>
420 <td align="center">
421 <a href="{$prefixe}index.html" title="{$messages/message[@label='entrée du site']}"><img src="{$interface}/home.gif" width="25" height="25" alt="{$messages/message[@label='entrée du site']}" border="0"/></a>
422 </td>
423 <td align="center">
424 <a href="{$prefixe}pages_{ancestor-or-self::XPAGES[$nb]/INFORMATIONS/LABEL}/sommaire.html" title="{$messages/message[@label='Sommaire']}"><img src="{$interface}/sommaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Sommaire']}"/></a>
425 </td>
426 <xsl:if test="//GLOSSAIRE">
427 <td align="center">
428 <a href="{$prefixe}pages_{ancestor-or-self::XPAGES[$nb]/INFORMATIONS/LABEL}/glossaire.html" title="{$messages/message[@label='Glossaire']}"><img src="{$interface}/glossaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Glossaire']}"/></a>
429 </td>
430 </xsl:if>
431 <td align="center">
432 <xsl:for-each select="preceding::PAGE[1][@label!='index']">
433 <a href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html" accesskey="j" title="{$messages/message[@label='Page précédente']}"><img src="{$interface}/petiteflechegauche.gif" width="25" height="16" alt="&lt;-" border="0"/></a>
434 </xsl:for-each>
435 </td>
436
437 <td align="center">
438 <xsl:for-each select="PAGE[1] | following::PAGE[current()/self::PAGE and position()=1]">
439 <a href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html" accesskey="l" title="{$messages/message[@label='Page suivante']}"><img src="{$interface}/petiteflechedroite.gif" width="25" height="16" alt="-&gt;" border="0"/></a>
440 </xsl:for-each>
441 </td>
442 </tr></table>
443 </div>
444
445 <xsl:call-template name="sommaire-page"/>
446 </div>
447
448 <div class="zone_titre">
449 <xsl:variable name="titre"><xsl:choose>
450 <xsl:when test="self::XPAGES"><xsl:value-of select="INFORMATIONS/TITRE"/></xsl:when>
451 <xsl:otherwise><xsl:value-of select="@titre"/></xsl:otherwise>
452 </xsl:choose></xsl:variable>
453 <table cellspacing="0" cellpadding="0"><tr>
454 <td><h1><xsl:value-of select="$titre"/></h1></td>
455 </tr></table>
456 </div>
515 <xsl:call-template name="zone_sommaire">
516 <xsl:with-param name="interface" select="$interface"/>
517 </xsl:call-template>
518
519 <xsl:call-template name="zone_titre"/>
457520
458521 <div class="zone_contenu">
459522
475538 <xsl:if test=".//ENVIMAGE[@localisation='page']">
476539 <xsl:call-template name="figures-page">
477540 <xsl:with-param name="prefixe"><xsl:value-of select="$prefixe"/></xsl:with-param>
541 <xsl:with-param name="interface" select="$interface"/>
478542 </xsl:call-template>
479543 </xsl:if>
480544 <div class="zone_texte">
481 <xsl:apply-templates/>
545 <xsl:apply-templates>
546 <xsl:with-param name="affichage" select="'web'"/>
547 <xsl:with-param name="interface" select="$interface"/>
548 </xsl:apply-templates>
482549 </div>
483550 </xsl:otherwise>
484551 </xsl:choose>
488555 <div class="zone_liens">
489556 <table width="100%"><tr>
490557 <td>
491 <xsl:for-each select="preceding::PAGE[1][@label!='index']">
492 <a href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html" title="{$messages/message[@label='Page précédente']}"><img src="{$interface}/flechegauche.gif" width="48" height="31" alt="{$messages/message[@label='Page précédente']}" border="0"/></a>
558 <xsl:for-each select="preceding::PAGE[1][@label!='index' or count(ancestor::XPAGES) &gt; 1]">
559 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html" title="{$messages/message[@label='Page précédente']}"><img src="{$prefixe}{$interface}/flechegauche.gif" width="48" height="31" alt="{$messages/message[@label='Page précédente']}" border="0"/></a>
493560 </xsl:for-each>
494561 </td>
495562 <td align="right">
496 <xsl:for-each select="PAGE[1] | following::PAGE[current()/self::PAGE and position()=1]">
497 <a href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html" title="{$messages/message[@label='Page suivante']}"><img src="{$interface}/flechedroite.gif" width="48" height="31" alt="{$messages/message[@label='Page suivante']}" border="0"/></a>
563 <xsl:for-each select="./descendant::PAGE[1] | following::PAGE[current()/self::PAGE and position()=1]">
564 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html" title="{$messages/message[@label='Page suivante']}"><img src="{$prefixe}{$interface}/flechedroite.gif" width="48" height="31" alt="{$messages/message[@label='Page suivante']}" border="0"/></a>
498565 </xsl:for-each>
499566 </td>
500567 </tr></table>
501568 </div>
502569 </div>
570 </xsl:template>
571
572
573 <xsl:template name="contenu-impression">
574 <xsl:param name="interface"/>
575 <xsl:variable name="prefixe">../</xsl:variable>
576
577 <html>
578 <head>
579 <title><xsl:value-of select="concat(INFORMATIONS/TITRE, ' : ', $messages/message[@label='Page pour l_impression'])"/></title>
580 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/{$feuille-de-style}"/>
581 </head>
582 <body>
583 <h1><xsl:value-of select="INFORMATIONS/TITRE"/></h1>
584 <xsl:if test="count(INFORMATIONS/AUTEUR) &gt; 0">
585 <div class="auteurs">
586 <xsl:call-template name="auteurs"/>
587 </div>
588 </xsl:if>
589 <ul>
590 <xsl:apply-templates select="PAGE[@label!='index']|XPAGES" mode="sommaire-impression"/>
591 </ul>
592 <hr/>
593 <div style="page-break-after: always"/>
594 <xsl:for-each select=".//*[self::XPAGES|self::PAGE]">
595 <xsl:choose>
596 <xsl:when test="self::XPAGES">
597 <h1><xsl:value-of select="INFORMATIONS/TITRE"/></h1>
598
599 <xsl:if test="count(INFORMATIONS/AUTEUR) &gt; 0">
600 <div class="auteurs">
601 <xsl:call-template name="auteurs"/>
602 </div>
603 </xsl:if>
604 <hr/>
605 </xsl:when>
606 <xsl:otherwise>
607 <h1><xsl:value-of select="@titre"/></h1>
608
609 <div class="zone_texte">
610 <xsl:apply-templates>
611 <xsl:with-param name="affichage" select="'impression'"/>
612 <xsl:with-param name="interface" select="$interface"/>
613 </xsl:apply-templates>
614 </div>
615
616 <div class="spacer"></div>
617 <xsl:if test="position()!=last()">
618 <hr/>
619 <xsl:if test="count(following-sibling::PAGE)=0">
620 <div style="page-break-after: always"/> <!-- pour les navigateurs comprenant CSS 2 -->
621 </xsl:if>
622 </xsl:if>
623 </xsl:otherwise>
624 </xsl:choose>
625 </xsl:for-each>
626
627 <xsl:if test=".//QCM">
628 <hr/>
629 <div style="page-break-after: always"/>
630
631 <h2>Réponses aux QCM</h2>
632 <xsl:for-each select=".//QCM">
633 <tt>page <xsl:value-of select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>/<xsl:value-of select="ancestor::PAGE/@label"/></tt><br/>
634 <b>QCM
635 <xsl:if test="@titre!=''">
636 <xsl:text> </xsl:text>'<xsl:value-of select="@titre"/>'
637 </xsl:if>
638 </b>
639 <ul>
640 <xsl:for-each select="QUESTIONQCM">
641 <li>Question <xsl:value-of select="position()"/><br/>
642 <xsl:for-each select="REPONSEQCM[@bonne='oui']">
643 <i>Solution : </i> réponse <xsl:number from="QCM" count="REPONSEQCM"/>)
644 <xsl:if test="COMMENTAIREREP!=''">
645 <xsl:text> </xsl:text>(<xsl:value-of select="COMMENTAIREREP"/>)
646 </xsl:if>
647 <br/>
648 </xsl:for-each>
649 </li>
650 </xsl:for-each>
651 </ul>
652 </xsl:for-each>
653 </xsl:if>
654
655 <xsl:if test=".//EXERCICE[@type='auto-évaluation'] or (.//EXERCICE and $sortie='production') or .//EXERCICE/QUESTION/AIDE">
656 <hr/>
657 <div style="page-break-after: always"/>
658
659 <h2>Réponses aux exercices</h2>
660 <xsl:for-each select=".//EXERCICE[count(QUESTION/AIDE) &gt; 0 or ((@type='auto-évaluation' or $sortie='production') and count(QUESTION/SOLUTION) &gt; 0)]">
661 <xsl:if test="position() &gt; 1">
662 <hr/>
663 </xsl:if>
664 <tt>page <xsl:value-of select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>/<xsl:value-of select="ancestor::PAGE/@label"/></tt><br/>
665 <h3>Exercice
666 <xsl:if test="@titre!=''">
667 <xsl:text> </xsl:text>'<xsl:value-of select="@titre"/>'
668 </xsl:if>
669 </h3>
670 <ul>
671 <xsl:for-each select="QUESTION">
672 <li><b>Question <xsl:value-of select="position()"/></b><br/>
673 <xsl:for-each select="AIDE">
674 <i>Aide : </i> <xsl:apply-templates/><br/>
675 </xsl:for-each>
676 <xsl:if test="../@type='auto-évaluation' or $sortie='production'">
677 <xsl:for-each select="SOLUTION">
678 <i>Solution : </i> <xsl:apply-templates/><br/>
679 </xsl:for-each>
680 </xsl:if>
681 </li>
682 </xsl:for-each>
683 </ul>
684 </xsl:for-each>
685 </xsl:if>
686 </body>
687 </html>
688 </xsl:template>
689
690 <xsl:template match="XPAGES" mode="sommaire-impression">
691 <li>
692 <xsl:value-of select="INFORMATIONS/TITRE"/>
693 <ul>
694 <xsl:apply-templates select="PAGE[@label!='index']|XPAGES" mode="sommaire-impression"/>
695 </ul>
696 </li>
697 </xsl:template>
698
699 <xsl:template match="PAGE" mode="sommaire-impression">
700 <li><xsl:value-of select="@titre"/></li>
503701 </xsl:template>
504702
505703
518716 </xsl:call-template>
519717 </xsl:when>
520718 <xsl:when test="$pos &gt; 1">
521 <img height="11" width="11" alt="-" border="0" src="{$interface}/listeactive.gif"/>
522 <xsl:for-each select="ancestor-or-self::XPAGES[$pos]">
523 <a href="{$prefixe}pages_{INFORMATIONS/LABEL}/{PAGE[1]/@label}.html" class="sommaire2">&#xA0;<xsl:value-of select="INFORMATIONS/TITRE"/></a>
719 <img height="11" width="11" alt="-" border="0" src="{$prefixe}{$interface}/listeactive.gif"/>
720 <xsl:for-each select="ancestor-or-self::XPAGES[position()=$pos]">
721 <xsl:choose>
722 <xsl:when test="*[self::PAGE|self::XPAGES][1][self::PAGE]">
723 <a href="{$prefixe}pages_{@labelfichiers}/{PAGE[1]/@label}.html" class="sommaire2">&#xA0;<xsl:value-of select="INFORMATIONS/TITRE"/></a>
724 </xsl:when>
725 <xsl:otherwise>
726 <xsl:variable name="nom-fichier-index"><xsl:choose>
727 <xsl:when test="@contribution='oui'">index.html</xsl:when>
728 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
729 </xsl:choose></xsl:variable>
730 <a href="{$prefixe}pages_{@labelfichiers}/{$nom-fichier-index}" class="sommaire2">&#xA0;<xsl:value-of select="INFORMATIONS/TITRE"/></a>
731 </xsl:otherwise>
732 </xsl:choose>
524733 </xsl:for-each>
525734 <div class="divsommaire">
526735 <xsl:call-template name="sous-sommaire">
531740 </xsl:when>
532741 <xsl:when test="self::XPAGES">
533742 <div class="fondsel1sommaire">
534 <img height="11" width="11" alt="-" border="0" src="{$interface}/listeactive.gif"/>&#xA0;<span class="sommaire2select"><xsl:value-of select="INFORMATIONS/TITRE"/></span>
743 <img height="11" width="11" alt="-" border="0" src="{$prefixe}{$interface}/listeactive.gif"/>&#xA0;<span class="sommaire2select"><xsl:value-of select="INFORMATIONS/TITRE"/></span>
535744 <div class="divsommaire">
536745 <xsl:for-each select="PAGE|XPAGES">
537746 <xsl:call-template name="element-sommaire">
544753 <xsl:otherwise>
545754 <div class="fondsel1sommaire">
546755 <xsl:for-each select="ancestor::XPAGES[2]">
547 <a href="{$prefixe}pages_{INFORMATIONS/LABEL}/{PAGE[1]/@label}.html"><img height="11" width="11" alt="-" border="0" src="{$interface}/listeactive.gif"/></a>
756 <xsl:choose>
757 <xsl:when test="*[self::PAGE|self::XPAGES][1][self::PAGE]">
758 <a href="{$prefixe}pages_{@labelfichiers}/{PAGE[1]/@label}.html"><img height="11" width="11" alt="-" border="0" src="{$prefixe}{$interface}/listeactive.gif"/></a>
759 </xsl:when>
760 <xsl:otherwise>
761 <xsl:variable name="nom-fichier-index"><xsl:choose>
762 <xsl:when test="@contribution='oui'">index.html</xsl:when>
763 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
764 </xsl:choose></xsl:variable>
765 <a href="{$prefixe}pages_{@labelfichiers}/{$nom-fichier-index}"><img height="11" width="11" alt="-" border="0" src="{$prefixe}{$interface}/listeactive.gif"/></a>
766 </xsl:otherwise>
767 </xsl:choose>
548768 </xsl:for-each>
549 <span class="sommaire2">&#xA0;<xsl:value-of select="../INFORMATIONS/TITRE"/></span>
769 <a href="{$prefixe}pages_{../@labelfichiers}/{../PAGE[1]/@label}.html" class="sommaire2">&#xA0;<xsl:value-of select="../INFORMATIONS/TITRE"/></a>
550770 <div class="divsommaire">
551771 <xsl:variable name="labelpage" select="@label"/>
552 <xsl:for-each select="../*[self::PAGE or self::XPAGES]">
772 <xsl:for-each select="../*[(self::PAGE and @label!='index') or self::XPAGES]">
553773 <xsl:call-template name="element-sommaire">
554774 <xsl:with-param name="labelpage"><xsl:value-of select="$labelpage"/></xsl:with-param>
555775 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
573793 </div>
574794 </xsl:when>
575795 <xsl:when test="self::XPAGES">
576 <div class="fondsel1sommaire"><img src="{$interface}/listeinactive.gif" border="0" alt="+" width="11" height="11"/>
577 <a href="{$prefixe}pages_{INFORMATIONS/LABEL}/{PAGE[1]/@label}.html" class="sommaire2">&#xA0;<xsl:value-of select="INFORMATIONS/TITRE"/></a></div>
796 <div class="fondsel1sommaire"><img src="{$prefixe}{$interface}/listeinactive.gif" border="0" alt="+" width="11" height="11"/>
797 <xsl:choose>
798 <xsl:when test="*[self::PAGE|self::XPAGES][1][self::PAGE]">
799 <a href="{$prefixe}pages_{@labelfichiers}/{PAGE[1]/@label}.html" class="sommaire3">&#xA0;<xsl:value-of select="INFORMATIONS/TITRE"/></a>
800 </xsl:when>
801 <xsl:otherwise>
802 <a href="{$prefixe}pages_{INFORMATIONS/LABEL}/index.html" class="sommaire3">&#xA0;<xsl:value-of select="INFORMATIONS/TITRE"/></a>
803 </xsl:otherwise>
804 </xsl:choose>
805 </div>
578806 </xsl:when>
579807 <xsl:otherwise>
580808 <div class="fondsel1sommaire">
581 <a href="{$prefixe}pages_{../INFORMATIONS/LABEL}/{@label}.html" class="sommairepage">&#x2022; <xsl:value-of select="@titre"/></a>
809 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html" class="sommairepage">&#x2022; <xsl:value-of select="@titre"/></a>
582810 </div>
583811 </xsl:otherwise>
584812 </xsl:choose>
585813 </xsl:template>
586814
587815 <xsl:template name="sommaire-page">
588 <xsl:variable name="prefixe">../</xsl:variable>
589 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
590 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
591 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
592 </xsl:choose></xsl:variable>
816 <xsl:param name="interface"/>
593817 <div class="sommaire">
594818 <xsl:call-template name="sous-sommaire">
595819 <xsl:with-param name="pos"><xsl:value-of select="count(ancestor::XPAGES)"/></xsl:with-param>
605829 </xsl:template>
606830
607831 <xsl:template match="TITRE">
832 <!-- template inutilisé -->
608833 <h1><xsl:value-of select="."/></h1>
609834 </xsl:template>
610835
612837 <xsl:for-each select="ancestor-or-self::XPAGES[1]/INFORMATIONS">
613838 <xsl:choose>
614839 <xsl:when test="count(AUTEUR)=1">
615 <xsl:value-of select="$messages/message[@label='Auteur:']"/> <em><xsl:value-of select="AUTEUR"/></em><br/>
840 <xsl:value-of select="$messages/message[@label='Auteur:']"/><xsl:text> </xsl:text>
841 <em><xsl:value-of select="AUTEUR"/></em><br/>
616842 </xsl:when>
617843 <xsl:when test="count(AUTEUR)&gt;1">
618 <xsl:value-of select="$messages/message[@label='Auteurs:']"/>
844 <xsl:value-of select="$messages/message[@label='Auteurs:']"/><xsl:text> </xsl:text>
619845 <em><xsl:for-each select="AUTEUR"><xsl:value-of select="."/><xsl:if test="position()!=last()">, </xsl:if></xsl:for-each></em><br/>
620846 </xsl:when>
621847 </xsl:choose>
634860 <!-- Eléments de bloc -->
635861
636862 <xsl:template match="SECTION">
863 <xsl:param name="affichage">web</xsl:param>
864 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
637865 <xsl:variable name="classe"><xsl:choose>
638866 <xsl:when test="(@role='introduction' or @role='conclusion' or @role='exercice') and @importance='grande'"><xsl:value-of select="@role"/></xsl:when>
639867 <xsl:when test="@importance='grande'">section_cadre</xsl:when>
647875 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
648876 <xsl:otherwise>../</xsl:otherwise>
649877 </xsl:choose></xsl:variable>
650 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
651 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
652 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
653 </xsl:choose></xsl:variable>
654 <img src="{$interface}/icones_sections/{@role}.png" width="40" height="40" alt="{@role}" class="icone_section"/>
878 <img src="{$prefixe}{$interface}/icones_sections/{@role}.png" width="40" height="40" alt="{@role}" class="icone_section"/>
655879 </xsl:if>
656880 <xsl:value-of select="@titre"/>
657881 </xsl:element>
658882 </xsl:if>
659 <xsl:apply-templates/>
883 <xsl:apply-templates>
884 <xsl:with-param name="affichage" select="$affichage"/>
885 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
886 </xsl:apply-templates>
660887 </div>
661888 </xsl:template>
662889
717944
718945
719946 <xsl:template match="ENVIMAGE">
947 <xsl:param name="affichage">web</xsl:param>
948 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
720949 <xsl:variable name="prefixe"><xsl:choose>
721950 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
722951 <xsl:otherwise>../</xsl:otherwise>
723952 </xsl:choose></xsl:variable>
724 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
725 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
726 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
727 </xsl:choose></xsl:variable>
728953 <xsl:choose>
729 <xsl:when test="@localisation='icône'">
954 <xsl:when test="@localisation='icône' and $affichage='web'">
730955 <xsl:for-each select="FICHIER[1]">
731 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
732 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=current()/@nom]/@largeur1"/>
733 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=current()/@nom]/@hauteur1"/>
734 <xsl:variable name="fichierhtml" select="concat('html_images/', translate(@nom, '/\\', '__'), '.html')"/>
956 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
957 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=current()/@nom]/@largeur1"/>
958 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=current()/@nom]/@hauteur1"/>
959 <xsl:variable name="fichierhtml" select="concat($prefixe,'pages_', $label-fichiers, '/', 'html_images/', translate(@nom, '/\\', '__'), '.html')"/>
735960 <xsl:variable name="format"><xsl:call-template name="format-fichier">
736961 <xsl:with-param name="nom" select="@nom"/>
737962 </xsl:call-template></xsl:variable>
738963 <xsl:choose>
739964 <xsl:when test="$format='PNG' or $format='GIF' or $format='JPEG'">
740 <a href="{$fichierhtml}" target="blank" onclick="window.open('{$fichierhtml}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,resizable=no,width={$largeur1+35},height={$hauteur1+200}'); return false"><img alt="{@nom}" src="{$prefixe}pages_{$label-ensemble}/images_icone/{@nom}" align="right" border="0" class="iconeimage"/></a>
965 <xsl:variable name="largeur2" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=current()/@nom]/@largeur2"/>
966 <xsl:variable name="hauteur2" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=current()/@nom]/@hauteur2"/>
967 <a href="{$fichierhtml}" target="_blank" onclick="window.open('{$fichierhtml}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,resizable=no,width={$largeur1+35},height={$hauteur1+200}'); return false"><img alt="{@nom}" src="{$prefixe}pages_{$label-fichiers}/images_icone/{@nom}" width="{$largeur2}" height="{$hauteur2}" align="right" border="0" class="iconeimage"/></a>
741968 </xsl:when>
742 <xsl:when test="$format='MPEG'">
743 <a href="{$fichierhtml}" target="blank" onclick="window.open('{$fichierhtml}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no, width={$largeur1+35},height={$hauteur1+200}'); return false"><img src="{$interface}/video.gif" width="50" height="50" alt="vidéo MPEG" align="right" border="0"/></a>
969 <xsl:when test="$format='MPEG' or $format='OGG'">
970 <a href="{$fichierhtml}" target="_blank" onclick="window.open('{$fichierhtml}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no, width={$largeur1+35},height={$hauteur1+200}'); return false"><img src="{$prefixe}{$interface}/video.gif" width="50" height="50" alt="vidéo" align="right" border="0"/></a>
744971 </xsl:when>
745972 <xsl:otherwise><xsl:value-of select="$messages/message[@label='format inconnu (vérifier l_extension du nom du fichier)']"/></xsl:otherwise>
746973 </xsl:choose>
747974 <!-- html-figure est maintenant appelé plus haut pour éviter les imbrications de ecrire-fichier -->
748975 </xsl:for-each>
749976 </xsl:when>
750 <xsl:when test="@localisation!='page'">
977 <xsl:when test="@localisation!='page' or $affichage='impression'">
978 <xsl:call-template name="contenu-envimage">
979 <xsl:with-param name="affichage" select="$affichage"/>
980 <xsl:with-param name="prefixe"><xsl:value-of select="$prefixe"/></xsl:with-param>
981 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
982 </xsl:call-template>
983 </xsl:when>
984 </xsl:choose>
985 </xsl:template>
986
987
988 <xsl:template name="script-imagettes">
989 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
990 <xsl:param name="prefixe">../</xsl:param>
991 <script type="text/javascript" language="JavaScript">
992 <xsl:comment>
993 function imagette(n) {
994 var imagettes = document.getElementById('imagettes');
995 if (imagettes != null) {
996 var liste = imagettes.getElementsByTagName('a');
997 for (var i=0; i &lt; liste.length; i++) {
998 if (i+1 == n) {
999 var img = liste[i].getElementsByTagName('img')[0];
1000 img.src = '<xsl:value-of select="concat($prefixe, $interface)"/>/imagesel.gif';
1001 var div = document.getElementById('figure'+(i+1));
1002 div.style.display = 'block';
1003 } else {
1004 var img = liste[i].getElementsByTagName('img')[0];
1005 img.src = '<xsl:value-of select="concat($prefixe, $interface)"/>/image.gif';
1006 var div = document.getElementById('figure'+(i+1));
1007 div.style.display='none';
1008 }
1009 }
1010 }
1011 }
1012 //</xsl:comment>
1013 </script>
1014 </xsl:template>
1015
1016
1017 <!-- création de l'encart pour la figure en page, appelé par contenu-body -->
1018 <xsl:template name="figures-page">
1019 <xsl:param name="prefixe">../</xsl:param>
1020 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
1021 <div class="zone_figure">
1022 <xsl:if test="count(.//ENVIMAGE[@localisation='page']) &gt; 1">
1023 <div id="imagettes">
1024 <xsl:for-each select=".//ENVIMAGE[@localisation='page']">
1025 <a href="#" onclick="imagette({position()}); return false;"><xsl:choose>
1026 <xsl:when test="position()=1">
1027 <img src="{$prefixe}{$interface}/imagesel.gif" width="59" height="52" alt="image {position()}" border="0"/>
1028 </xsl:when>
1029 <xsl:otherwise>
1030 <img src="{$prefixe}{$interface}/image.gif" width="59" height="52" alt="image {position()}" border="0"/>
1031 </xsl:otherwise>
1032 </xsl:choose></a>
1033 </xsl:for-each>
1034 </div>
1035 </xsl:if>
1036 <xsl:for-each select=".//ENVIMAGE[@localisation='page']">
7511037 <xsl:call-template name="contenu-envimage">
7521038 <xsl:with-param name="prefixe"><xsl:value-of select="$prefixe"/></xsl:with-param>
7531039 </xsl:call-template>
754 </xsl:when>
755 </xsl:choose>
756 </xsl:template>
757
758
759 <!-- création de l'encart pour la figure en page, appelé par contenu-body -->
760 <xsl:template name="figures-page">
1040 </xsl:for-each>
1041 </div>
1042 </xsl:template>
1043
1044 <xsl:template name="contenu-envimage">
1045 <xsl:param name="affichage">web</xsl:param>
7611046 <xsl:param name="prefixe">../</xsl:param>
762 <xsl:for-each select=".//ENVIMAGE[@localisation='page']">
763 <div class="zone_figure">
764 <xsl:call-template name="contenu-envimage">
765 <xsl:with-param name="prefixe"><xsl:value-of select="$prefixe"/></xsl:with-param>
766 </xsl:call-template>
767 </div>
768 </xsl:for-each>
769 </xsl:template>
770
771 <xsl:template name="contenu-envimage">
772 <xsl:param name="prefixe">../</xsl:param>
1047 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
7731048 <xsl:variable name="classe-div"><xsl:choose>
774 <xsl:when test="@localisation='page'">cadre_zone_figure</xsl:when>
1049 <xsl:when test="@localisation='page' and $affichage='web'">cadre_zone_figure</xsl:when>
7751050 <xsl:otherwise>cadre_figure_texte</xsl:otherwise>
7761051 </xsl:choose></xsl:variable>
1052 <xsl:if test="$classe-div='cadre_figure_texte' and @label!=''">
1053 <a name="{@label}"/>
1054 </xsl:if>
7771055 <div class="{$classe-div}">
1056 <xsl:if test="@localisation='page' and $affichage='web'">
1057 <xsl:attribute name="id">figure<xsl:value-of select="count(preceding-sibling::ENVIMAGE[@localisation='page'])+1"/></xsl:attribute>
1058 <xsl:if test="count(preceding-sibling::ENVIMAGE[@localisation='page']) &gt; 0">
1059 <xsl:attribute name="style">display:none;</xsl:attribute>
1060 </xsl:if>
1061 </xsl:if>
7781062 <xsl:if test="@titre!=''">
7791063 <div class="titrefigure"><xsl:value-of select="@titre"/></div>
7801064 </xsl:if>
7811065
782 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
1066 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
7831067 <xsl:for-each select="FICHIER">
7841068 <xsl:variable name="nomfichier" select="@nom"/>
785 <xsl:variable name="localisation" select="../@localisation"/>
786 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@largeur1"/>
787 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@hauteur1"/>
788 <xsl:variable name="redim" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@redim"/>
1069 <xsl:variable name="localisation"><xsl:choose>
1070 <xsl:when test="$affichage='impression'">texte</xsl:when>
1071 <xsl:otherwise><xsl:value-of select="../@localisation"/></xsl:otherwise>
1072 </xsl:choose></xsl:variable>
1073 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@largeur1"/>
1074 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@hauteur1"/>
1075 <xsl:variable name="redim" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@redim"/>
7891076 <xsl:variable name="format"><xsl:call-template name="format-fichier">
7901077 <xsl:with-param name="nom" select="@nom"/>
7911078 </xsl:call-template></xsl:variable>
7921079 <xsl:choose>
7931080 <xsl:when test="$redim='oui'">
794 <xsl:variable name="largeur2" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@largeur2"/>
795 <xsl:variable name="hauteur2" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=$nomfichier and @localisation=$localisation]/@hauteur2"/>
796 <xsl:variable name="href" select="concat('html_images/', translate($nomfichier, '/\\', '__'), '.html')"/>
1081 <xsl:variable name="largeur2" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@largeur2"/>
1082 <xsl:variable name="hauteur2" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nomfichier and @localisation=$localisation]/@hauteur2"/>
1083 <xsl:variable name="href" select="concat($prefixe, 'pages_', $label-fichiers, '/', 'html_images/', translate($nomfichier, '/\\', '__'), '.html')"/>
7971084 <xsl:choose>
7981085 <xsl:when test="$format='PNG' or $format='GIF' or $format='JPEG'">
799 <a href="{$href}" target="blank" onclick="window.open('{$href}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,resizable=no,width={$largeur1+35},height={$hauteur1+200}'); return false"><img alt="{$nomfichier}" src="{$prefixe}pages_{$label-ensemble}/images_{$localisation}/{$nomfichier}" width="{$largeur2}" height="{$hauteur2}" border="0"/></a>
1086 <a href="{$href}" target="_blank" onclick="window.open('{$href}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,resizable=no,width={$largeur1+35},height={$hauteur1+200}'); return false"><img alt="{$nomfichier}" src="{$prefixe}pages_{$label-fichiers}/images_{$localisation}/{$nomfichier}" width="{$largeur2}" height="{$hauteur2}" border="0"/></a>
8001087 </xsl:when>
8011088 <xsl:when test="$format='MPEG'">
802 <embed src="{$prefixe}pages_{$label-ensemble}/images_{$localisation}/{$nomfichier}" width="{$largeur2}" height="{$hauteur2}">
1089 <embed src="{$prefixe}pages_{$label-fichiers}/images_{$localisation}/{$nomfichier}" width="{$largeur2}" height="{$hauteur2}">
8031090 <noembed><xsl:value-of select="$messages/message[@label='Erreur: ce navigateur ne gère pas EMBED']"/></noembed>
8041091 </embed>
8051092 </xsl:when>
8091096 <xsl:otherwise>
8101097 <xsl:choose>
8111098 <xsl:when test="$format='PNG' or $format='GIF' or $format='JPEG'">
812 <img alt="{$nomfichier}" src="{$prefixe}pages_{$label-ensemble}/{$nomfichier}" width="{$largeur1}" height="{$hauteur1}"/>
1099 <img alt="{$nomfichier}" src="{$prefixe}pages_{$label-fichiers}/{$nomfichier}" width="{$largeur1}" height="{$hauteur1}"/>
8131100 </xsl:when>
8141101 <xsl:when test="$format='MPEG'">
815 <embed src="{$prefixe}pages_{$label-ensemble}/{$nomfichier}" width="{$largeur1}" height="{$hauteur1}">
816 <noembed><xsl:value-of select="$messages/message[@label='Erreur: ce navigateur ne gère pas EMBED']"/></noembed>
817 </embed>
1102 <xsl:choose>
1103 <xsl:when test="$affichage='web'">
1104 <embed src="{$prefixe}pages_{$label-fichiers}/{$nomfichier}" width="{$largeur1}" height="{$hauteur1}">
1105 <noembed><xsl:value-of select="$messages/message[@label='Erreur: ce navigateur ne gère pas EMBED']"/></noembed>
1106 </embed>
1107 </xsl:when>
1108 <xsl:otherwise>
1109 <p><img src="{$prefixe}{$interface}/video.gif" width="50" height="50" alt="vidéo MPEG" border="0"/></p>
1110 </xsl:otherwise>
1111 </xsl:choose>
1112 </xsl:when>
1113 <xsl:when test="$format='OGG'">
1114 <xsl:choose>
1115 <xsl:when test="$affichage='web'">
1116 <applet code="com.fluendo.player.Cortado.class" width="{$largeur1}" height="{$hauteur1 + 16}" codebase="{$prefixe}" archive="interface/applets/cortado.jar">
1117 <param name="url" value="{$prefixe}pages_{$label-fichiers}/{$nomfichier}"/>
1118 <param name="seekable" value="false"/>
1119 <param name="autoPlay" value="false"/>
1120 <param name="showStatus" value="show"/>
1121 <param name="statusHeight" value="16"/>
1122 <xsl:value-of select="$messages/message[@label='Java n_est pas activé.']"/>
1123 </applet>
1124 </xsl:when>
1125 <xsl:otherwise>
1126 <p><img src="{$prefixe}{$interface}/video.gif" width="50" height="50" alt="vidéo OGG" border="0"/></p>
1127 </xsl:otherwise>
1128 </xsl:choose>
8181129 </xsl:when>
8191130 <xsl:otherwise><xsl:value-of select="$messages/message[@label='format inconnu (vérifier l_extension du nom du fichier)']"/></xsl:otherwise>
8201131 </xsl:choose>
8271138
8281139 <!-- création du fichier HTML pour la grande image -->
8291140 <xsl:template name="html-figure">
1141 <xsl:param name="interface"/>
8301142 <xsl:param name="largeur1"/>
8311143 <xsl:param name="hauteur1"/>
832 <xsl:variable name="interface">../../interface/<xsl:choose>
833 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
834 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
835 </xsl:choose></xsl:variable>
1144 <xsl:variable name="prefixe">../../</xsl:variable>
8361145 <xsl:variable name="cheminfichier" select="@nom"/>
8371146 <xsl:variable name="nomfichier"><xsl:call-template name="nom-fichier">
8381147 <xsl:with-param name="chemin" select="$cheminfichier"/>
8401149 <xsl:variable name="format"><xsl:call-template name="format-fichier">
8411150 <xsl:with-param name="nom" select="$nomfichier"/>
8421151 </xsl:call-template></xsl:variable>
1152 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
8431153 <xsl:call-template name="ecrire-fichier">
844 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', ancestor::XPAGES[1]/INFORMATIONS/LABEL, $sep, 'html_images', $sep, translate($cheminfichier, '/\\', '__'), '.html')"/>
1154 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'pages_', $label-fichiers, $sep, 'html_images', $sep, translate($cheminfichier, '/\\', '__'), '.html')"/>
8451155 <xsl:with-param name="contenu">
8461156 <html>
8471157 <head>
8481158 <title><xsl:value-of select="../@titre"/></title>
849 <link type="text/css" rel="stylesheet" href="{$interface}/{$feuille-de-style}"/>
1159 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/{$feuille-de-style}"/>
8501160 </head>
851 <body bgcolor="#FFFFFF" text="#000000">
1161 <body>
8521162 <div align="center">
8531163 <xsl:if test="../@titre!=''">
8541164 <div class="titrefigure"><xsl:value-of select="../@titre"/></div>
8641174 </xsl:when>
8651175 <xsl:otherwise><xsl:value-of select="$messages/message[@label='format inconnu (vérifier l_extension du nom du fichier)']"/></xsl:otherwise>
8661176 </xsl:choose>
867 <xsl:apply-templates select="../LEGENDE|../CREDIT"/>
1177 <xsl:apply-templates select="../LEGENDE">
1178 <xsl:with-param name="prefixe">../../</xsl:with-param>
1179 </xsl:apply-templates>
1180 <xsl:apply-templates select="../CREDIT"/>
8681181 </div>
8691182 </body>
8701183 </html>
8781191 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
8791192 <xsl:otherwise>../</xsl:otherwise>
8801193 </xsl:choose></xsl:variable>
881 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
882 <img alt="{@nom}" src="{$prefixe}pages_{$label-ensemble}/{@nom}"/>
1194 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
1195 <img alt="{@nom}" src="{$prefixe}pages_{$label-fichiers}/{@nom}"/>
8831196 </xsl:template>
8841197
8851198
8861199 <xsl:template match="LEGENDE">
1200 <xsl:param name="prefixe"><xsl:choose>
1201 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
1202 <xsl:otherwise>../</xsl:otherwise>
1203 </xsl:choose></xsl:param>
8871204 <div class="legende">
888 <xsl:apply-templates/>
1205 <xsl:apply-templates>
1206 <xsl:with-param name="prefixe" select="$prefixe"/>
1207 </xsl:apply-templates>
8891208 </div>
8901209 </xsl:template>
8911210
8961215
8971216
8981217 <xsl:template match="APPLET|FLASH">
1218 <xsl:param name="affichage">web</xsl:param>
1219 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
8991220 <xsl:variable name="prefixe"><xsl:choose>
9001221 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
9011222 <xsl:otherwise>../</xsl:otherwise>
9021223 </xsl:choose></xsl:variable>
903 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
904 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
905 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
906 </xsl:choose></xsl:variable>
9071224
9081225 <xsl:choose>
909 <xsl:when test="@localisation='icône' and $affichage='web'">
910 <xsl:variable name="rep" select="concat($chemin-site, '/', 'pages_', ancestor::XPAGES[1]/INFORMATIONS/LABEL)"/>
911 <xsl:variable name="numero"><xsl:number level="any" from="XPAGES" count="APPLET|FLASH"/></xsl:variable>
1226 <xsl:when test="$affichage='impression'">
1227 <xsl:variable name="icone"><xsl:choose>
1228 <xsl:when test="self::APPLET">applet.gif</xsl:when>
1229 <xsl:when test="self::FLASH">flash.gif</xsl:when>
1230 </xsl:choose></xsl:variable>
1231 <p><img src="{$prefixe}{$interface}/{$icone}" width="45" height="45" border="0" alt="{$icone}"/></p>
1232 </xsl:when>
1233 <xsl:when test="@localisation='icône'">
1234 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
1235 <xsl:variable name="rep" select="concat($chemin-site, '/', 'pages_', $label-fichiers)"/>
1236 <xsl:variable name="numero"><xsl:number level="any" from="XPAGES[@contribution='oui']" count="APPLET|FLASH"/></xsl:variable>
9121237 <xsl:variable name="nomfichiermedia"><xsl:value-of select="concat('media',$numero)"/>.html</xsl:variable>
9131238 <xsl:variable name="fichiermedia"><xsl:value-of select="concat($rep,$sep,$nomfichiermedia)"/></xsl:variable>
9141239 <xsl:variable name="icone"><xsl:choose>
9151240 <xsl:when test="self::APPLET">applet.gif</xsl:when>
9161241 <xsl:when test="self::FLASH">flash.gif</xsl:when>
9171242 </xsl:choose></xsl:variable>
918 <br/><a href="{$nomfichiermedia}" target="blank"><img src="{$interface}/{$icone}" width="45" height="45" border="0" alt="{$icone}"/></a>
1243 <br/><a href="{$nomfichiermedia}" target="_blank"><img src="{$prefixe}{$interface}/{$icone}" width="45" height="45" border="0" alt="{$icone}"/></a>
9191244 <xsl:call-template name="ecrire-fichier">
9201245 <xsl:with-param name="fichier" select="$fichiermedia"/>
9211246 <xsl:with-param name="contenu">
9221247 <html>
9231248 <head>
9241249 <title><xsl:value-of select="concat('applet ',$numero)"/></title>
925 <link type="text/css" rel="stylesheet" href="{$interface}/{$feuille-de-style}"/>
1250 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/{$feuille-de-style}"/>
9261251 </head>
9271252 <body>
9281253 <xsl:call-template name="contenu-media">
929 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
9301254 <xsl:with-param name="prefixe"><xsl:value-of select="$prefixe"/></xsl:with-param>
9311255 </xsl:call-template>
9321256 </body>
9341258 </xsl:with-param>
9351259 </xsl:call-template>
9361260 </xsl:when>
937 <xsl:when test="@localisation='page' and $affichage='web'">
1261 <xsl:when test="@localisation='page'">
9381262 <div class="zone_figure">
9391263 <xsl:call-template name="contenu-media">
940 <xsl:with-param name="interface"><xsl:value-of select="$interface"/></xsl:with-param>
9411264 <xsl:with-param name="prefixe"><xsl:value-of select="$prefixe"/></xsl:with-param>
9421265 </xsl:call-template>
9431266 </div>
9521275 </xsl:template>
9531276
9541277 <xsl:template name="contenu-media">
955 <xsl:param name="interface"/>
9561278 <xsl:param name="prefixe">../</xsl:param>
9571279
9581280 <xsl:variable name="classe-div"><xsl:choose>
9671289 <div class="titrefigure"><xsl:value-of select="@titre"/></div>
9681290 </xsl:if>
9691291 <xsl:choose>
970 <xsl:when test="self::APPLET and $affichage='web'">
1292 <xsl:when test="self::APPLET">
9711293 <applet code="{@classe}" archive="{@archive}" width="{@largeur}" height="{@hauteur}">
9721294 <xsl:apply-templates select="PARAM"/>
9731295 <xsl:value-of select="$messages/message[@label='Java n_est pas activé.']"/>
9741296 </applet>
9751297 </xsl:when>
976 <xsl:when test="self::FLASH and $affichage='web'">
1298 <xsl:when test="self::FLASH">
9771299 <object type="application/x-shockwave-flash" data="{@fichier}" width="{@largeur}" height="{@hauteur}" title="{@titre}">
9781300 <param name="movie" value="{@fichier}"/>
9791301 <xsl:variable name="parametres"><xsl:for-each select="PARAM">
9851307 <xsl:value-of select="$messages/message[@label='Erreur: plugin Flash absent ou désactivé ?']"/>
9861308 </object>
9871309 </xsl:when>
988 <xsl:otherwise>
989 <xsl:variable name="icone"><xsl:choose>
990 <xsl:when test="self::APPLET">applet.gif</xsl:when>
991 <xsl:when test="self::FLASH">flash.gif</xsl:when>
992 </xsl:choose></xsl:variable>
993 <img src="{$interface}/{$icone}" width="45" height="45" border="0" alt="{$icone}"/>
994 </xsl:otherwise>
9951310 </xsl:choose>
9961311 <xsl:apply-templates select="LEGENDE"/>
9971312 <xsl:apply-templates select="CREDIT"/>
10051320
10061321
10071322 <xsl:template match="COMMENTAIRE">
1323 <xsl:if test="$sortie='production'">
1324 <div class="commentaire">
1325 <xsl:value-of select="."/>
1326 </div>
1327 </xsl:if>
1328 </xsl:template>
1329
1330
1331 <!-- Exercices -->
1332
1333 <xsl:template match="EXERCICE">
1334 <xsl:param name="affichage">web</xsl:param>
1335 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
1336 <xsl:variable name="prefixe"><xsl:choose>
1337 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
1338 <xsl:otherwise>../</xsl:otherwise>
1339 </xsl:choose></xsl:variable>
1340 <div class="exercice">
1341 <xsl:element name="h{count(ancestor::SECTION)+2}">
1342 <img src="{$prefixe}{$interface}/icones_sections/exercice.png" width="40" height="40" alt="exercice" class="icone_section"/>
1343 <xsl:choose>
1344 <xsl:when test="@titre!=''"><xsl:value-of select="@titre"/></xsl:when>
1345 <xsl:otherwise><xsl:value-of select="$messages/message[@label='Exercice']"/></xsl:otherwise>
1346 </xsl:choose>
1347 </xsl:element>
1348 <xsl:if test="DIFFICULTE | TEMPS">
1349 <p>
1350 <xsl:if test="DIFFICULTE">
1351 <xsl:value-of select="concat($messages/message[@label='Difficulté :'], ' ', DIFFICULTE)"/>&#xA0;&#xA0;
1352 </xsl:if>
1353 <xsl:if test="TEMPS">
1354 <xsl:value-of select="concat($messages/message[@label='Temps :'], ' ', TEMPS)"/>
1355 </xsl:if>
1356 </p>
1357 </xsl:if>
1358 <xsl:apply-templates select="ENONCE">
1359 <xsl:with-param name="affichage" select="$affichage"/>
1360 <xsl:with-param name="interface" select="$interface"/>
1361 </xsl:apply-templates>
1362 <xsl:apply-templates select="QUESTION">
1363 <xsl:with-param name="affichage" select="$affichage"/>
1364 </xsl:apply-templates>
1365 </div>
1366 </xsl:template>
1367
1368 <xsl:template match="ENONCE">
1369 <xsl:param name="affichage">web</xsl:param>
1370 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
1371 <xsl:apply-templates>
1372 <xsl:with-param name="affichage" select="$affichage"/>
1373 <xsl:with-param name="interface" select="$interface"/>
1374 </xsl:apply-templates>
1375 </xsl:template>
1376
1377 <xsl:template match="QUESTION">
1378 <xsl:param name="affichage">web</xsl:param>
1379 <xsl:variable name="numquestion"><xsl:number level="any" from="EXERCICE" count="QUESTION"/></xsl:variable>
1380 <div class="question">
1381 <b><xsl:value-of select="concat($messages/message[@label='Question'], ' ', $numquestion)"/>)</b>
1382 <xsl:apply-templates select="ENONCE"/>
1383 <p>
1384 <xsl:if test="$affichage='web'">
1385 <xsl:apply-templates select="AIDE" mode="lien"/>
1386 </xsl:if>
1387 <xsl:if test="$affichage='web' and (../@type='auto-évaluation' or $sortie='production')">
1388 <xsl:apply-templates select="SOLUTION" mode="lien"/>
1389 </xsl:if>
1390 <xsl:apply-templates select="POINTS"/>
1391 </p>
1392 </div>
1393 </xsl:template>
1394
1395 <xsl:template match="AIDE" mode="lien">
1396 <xsl:variable name="numaide"><xsl:number level="any" from="XPAGES[@contribution='oui']" count="AIDE | SOLUTION"/></xsl:variable>
1397
1398 <xsl:variable name="nomFichier" select="concat('aide',$numaide,'.html')"/>
1399 <a href="{$nomFichier}" class="lienaide" onclick="w=window.open('{$nomFichier}','aide_solution','scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,height=400,width=600'); w.focus(); return false"><xsl:value-of select="$messages/message[@label='Aide']"/></a>&#xA0;&#xA0;
1400 </xsl:template>
1401
1402 <xsl:template match="AIDE">
1403 <xsl:apply-templates/>
1404 </xsl:template>
1405
1406 <xsl:template match="SOLUTION" mode="lien">
1407 <xsl:variable name="numaide">
1408 <xsl:number level="any" from="XPAGES[@contribution='oui']" count="AIDE | SOLUTION"/>
1409 </xsl:variable>
1410 <xsl:variable name="nomFichier" select="concat('aide',$numaide,'.html')"/>
1411 <a href="{$nomFichier}" class="liensolution" onclick="w=window.open('{$nomFichier}','aide_solution','scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,height=400,width=600'); w.focus(); return false"><xsl:value-of select="$messages/message[@label='Solution']"/></a>&#xA0;&#xA0;
1412 </xsl:template>
1413
1414 <xsl:template match="SOLUTION">
1415 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
1416 <xsl:apply-templates>
1417 <xsl:with-param name="interface" select="$interface"/>
1418 </xsl:apply-templates>
1419 </xsl:template>
1420
1421 <xsl:template match="POINTS">
1422 [<em><xsl:value-of select="concat(., ' ', $messages/message[@label='points'])"/></em>]
1423 </xsl:template>
1424
1425
1426 <xsl:template match="QCM">
1427 <xsl:param name="affichage">web</xsl:param>
1428 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
1429 <xsl:variable name="prefixe"><xsl:choose>
1430 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
1431 <xsl:otherwise>../</xsl:otherwise>
1432 </xsl:choose></xsl:variable>
1433 <div class="qcm">
1434 <xsl:element name="h{count(ancestor::SECTION)+2}">
1435 <img src="{$prefixe}{$interface}/icones_sections/qcm.png" width="40" height="40" alt="qcm" class="icone_section"/>
1436 <xsl:choose>
1437 <xsl:when test="@titre!=''"><xsl:value-of select="@titre"/></xsl:when>
1438 <xsl:otherwise><xsl:value-of select="$messages/message[@label='QCM']"/></xsl:otherwise>
1439 </xsl:choose>
1440 </xsl:element>
1441 <xsl:apply-templates select="ENONCE"/>
1442 <xsl:if test="DIFFICULTE | TEMPS">
1443 <p>
1444 <xsl:if test="DIFFICULTE">
1445 <xsl:value-of select="concat($messages/message[@label='Difficulté :'], ' ', DIFFICULTE)"/>&#xA0;&#xA0;
1446 </xsl:if>
1447 <xsl:if test="TEMPS">
1448 <xsl:value-of select="concat($messages/message[@label='Temps :'], ' ', TEMPS)"/>
1449 </xsl:if>
1450 </p>
1451 </xsl:if>
1452 <xsl:choose>
1453 <xsl:when test="$affichage='web'">
1454 <xsl:variable name="numqcm"><xsl:number level="any" from="XPAGES" count="QCM" /></xsl:variable>
1455 <!-- remarque: le onsubmit ne marchera pas sur de vieux navigateurs, mais c'est le seul
1456 moyen d'avoir un code valide -->
1457 <form name="qcm{$numqcm}" action="#" onsubmit="resultat({$numqcm}); return false">
1458 <xsl:apply-templates select="QUESTIONQCM"/>
1459 <br/>
1460 <input value="{$messages/message[@label='Solution']}" type="submit"/>&#xA0;
1461 </form>
1462 </xsl:when>
1463 <xsl:otherwise>
1464 <xsl:apply-templates select="QUESTIONQCM"/>
1465 </xsl:otherwise>
1466 </xsl:choose>
1467 </div>
1468 </xsl:template>
1469
1470 <xsl:template name="script-qcm">
1471 <script language="JavaScript" type="text/javascript">
1472 <xsl:comment>
1473 function resultat(numqcm)
1474 {
1475 var reponses='';
1476 var valrep='';
1477 var numq='';
1478
1479 <xsl:variable name="reponses">
1480 var formulaire = document.forms[numqcm-1];
1481 for (var irep=0; irep &lt; formulaire.elements.length; irep++) {
1482 if (formulaire.elements[irep].checked) {
1483 valrep = formulaire.elements[irep].value;
1484 numq = formulaire.elements[irep].name.substring(4);
1485 if (valrep.substring(0,1)=='V')
1486 reponses = reponses + '<xsl:value-of select="$messages/message[@label='Question']"/> ' + numq + ' : <xsl:value-of select="$messages/message[@label='juste']"/> : ' + valrep.substring(1) + '\n';
1487 else
1488 reponses = reponses + 'Question ' + numq + ' : <xsl:value-of select="$messages/message[@label='faux']"/> : ' + valrep.substring(1) + '\n';
1489 }
1490 }
1491 </xsl:variable>
1492
1493 <xsl:value-of select="$reponses"/>
1494
1495 alert(reponses);
1496 }
1497 //</xsl:comment>
1498 <xsl:text>
1499 </xsl:text>
1500 </script>
1501 </xsl:template>
1502
1503 <xsl:template match="QUESTIONQCM">
1504 <div class="questionqcm">
1505 <xsl:apply-templates select="ENONCEQCM"/>
1506 <xsl:apply-templates select="REPONSEQCM"/>
1507 <br/>
1508 <xsl:apply-templates select="AIDE" mode="lien"/>
1509 </div>
1510 </xsl:template>
1511
1512 <xsl:template match="ENONCEQCM">
1513 <xsl:variable name="numquestion"><xsl:number level="any" from="QCM" count="QUESTIONQCM"/></xsl:variable>
1514 <!--<div class="enonceqcm">-->
1515 <xsl:value-of select="$numquestion"/>)&#xA0;<xsl:apply-templates/>
1516 <!--</div>-->
1517 </xsl:template>
1518
1519 <xsl:template match="REPONSEQCM">
1520 <br/>
1521 <xsl:variable name="vraifaux"><xsl:choose>
1522 <xsl:when test="@bonne='oui'">V</xsl:when>
1523 <xsl:when test="@bonne='non'">F</xsl:when>
1524 <xsl:otherwise><xsl:choose>
1525 <xsl:when test="COMMENTAIREREP='ok'">V</xsl:when>
1526 <xsl:otherwise>F</xsl:otherwise>
1527 </xsl:choose></xsl:otherwise>
1528 </xsl:choose></xsl:variable>
1529 <xsl:variable name="numquestion"><xsl:number level="any" from="QCM" count="QUESTIONQCM" /></xsl:variable>
1530 <input type="radio" name="repq{$numquestion}" value="{$vraifaux}{normalize-space(COMMENTAIREREP)}"/>
1531 <xsl:apply-templates/>
1532 </xsl:template>
1533
1534 <xsl:template match="TEXTEREP">
1535 <span class="reptexte">
1536 <xsl:apply-templates/>
1537 </span>
1538 </xsl:template>
1539
1540 <xsl:template match="COMMENTAIREREP">
1541 </xsl:template>
1542
1543 <xsl:template name="fichiers-aide">
1544 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
1545 <xsl:variable name="prefixe">../</xsl:variable>
1546 <xsl:variable name="rep" select="concat($chemin-site, $sep, 'pages_', ancestor::XPAGES[1]/@labelfichiers)"/>
1547 <xsl:for-each select=".//AIDE | .//SOLUTION">
1548 <xsl:if test="self::AIDE or $sortie='production'">
1549 <xsl:variable name="numaide">
1550 <xsl:number level="any" from="XPAGES[@contribution='oui']" count="AIDE | SOLUTION"/>
1551 </xsl:variable>
1552 <xsl:call-template name="ecrire-fichier">
1553 <xsl:with-param name="fichier" select="concat($rep,'/aide',$numaide,'.html')"/>
1554 <xsl:with-param name="contenu">
1555 <html>
1556 <head>
1557 <title><xsl:value-of select="name()"/></title>
1558 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/style.css"/>
1559 <!-- ne marche pas avec IE6 (la fenêtre se ferme quand on clique sur la barre de défilement)
1560 <script language="JavaScript" type="text/javascript">
1561 window.onblur = fermeture;
1562 function fermeture() { window.close(); }
1563 </script>
1564 -->
1565 </head>
1566 <body>
1567 <xsl:apply-templates>
1568 <xsl:with-param name="interface" select="$interface"/>
1569 </xsl:apply-templates>
1570 <br/>
1571 <br/>
1572 <div align="center">
1573 <form action="">
1574 <input onclick="window.close()" value="{$messages/message[@label='Fermer']}" type="button"/>
1575 </form>
1576 </div>
1577 </body>
1578 </html>
1579 </xsl:with-param>
1580 </xsl:call-template>
1581 </xsl:if>
1582 </xsl:for-each>
10081583 </xsl:template>
10091584
10101585
10161591 <xsl:otherwise>../</xsl:otherwise>
10171592 </xsl:choose></xsl:variable>
10181593 <xsl:choose>
1594 <xsl:when test="(@contribution='' or not(@contribution)) and ancestor::PAGE[@label='index'] and count(ancestor::XPAGES)=1">
1595 <a href="{concat($prefixe, 'pages_', ancestor::XPAGES[1]/@labelfichiers, '/', @page, '.html')}" class="lien"><xsl:apply-templates/></a>
1596 </xsl:when>
10191597 <xsl:when test="@contribution='' or not(@contribution)">
10201598 <a href="{@page}.html" class="lien"><xsl:apply-templates/></a>
10211599 </xsl:when>
10221600 <xsl:when test="@page='' or not(@page)">
1023 <a href="{concat($prefixe,'pages_',@contribution,'/',//XPAGES[INFORMATIONS/LABEL=current()/@contribution]/PAGE[1]/@label,'.html')}" class="lien"><xsl:apply-templates/></a>
1601 <a href="{concat($prefixe,'pages_', //XPAGES[INFORMATIONS/LABEL=current()/@contribution]/@labelfichiers, '/', //XPAGES[INFORMATIONS/LABEL=current()/@contribution]/PAGE[1]/@label,'.html')}" class="lien"><xsl:apply-templates/></a>
10241602 </xsl:when>
10251603 <xsl:otherwise>
1026 <a href="{concat($prefixe,'pages_',@contribution,'/',@page,'.html')}" class="lien"><xsl:apply-templates/></a>
1604 <a href="{concat($prefixe, 'pages_', //XPAGES[INFORMATIONS/LABEL=current()/@contribution]/@labelfichiers, '/', @page, '.html')}" class="lien"><xsl:apply-templates/></a>
10271605 </xsl:otherwise>
10281606 </xsl:choose>
10291607 </xsl:template>
10341612 </xsl:template>
10351613
10361614
1615 <xsl:template match="LIENIMAGE">
1616 <xsl:variable name="label" select="@label"/>
1617 <xsl:choose>
1618 <xsl:when test="ancestor::PAGE[1]//ENVIMAGE[@label=$label]">
1619 <xsl:variable name="localisation" select="ancestor::PAGE[1]//ENVIMAGE[@label=$label][1]/@localisation"/>
1620 <xsl:choose>
1621 <xsl:when test="$localisation='icône'">
1622 <xsl:variable name="nom" select="ancestor::PAGE[1]//ENVIMAGE[@label=$label][1]/FICHIER[1]/@nom"/>
1623 <xsl:variable name="lien" select="concat('../pages_', ancestor::XPAGES[1]/@labelfichiers, '/', 'html_images/', translate($nom, '/\\', '__'), '.html')"/>
1624 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
1625 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nom]/@largeur1"/>
1626 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-fichiers and @nom=$nom]/@hauteur1"/>
1627 <a href="{$lien}" class="lienimage" target="_blank" onclick="window.open('{$lien}', '', 'scrollbars=yes,scrolling=auto,toolbar=no,directories=no,menubar=no,status=no,width={$largeur1+35},height={$hauteur1+200}'); return false"><xsl:apply-templates/></a>
1628 </xsl:when>
1629 <xsl:when test="$localisation='page'">
1630 <xsl:variable name="position" select="count(ancestor::PAGE[1]//ENVIMAGE[@label=$label][1]/preceding-sibling::ENVIMAGE[@localisation='page'])+1"/>
1631 <a href="#" onclick="imagette({$position}); return false;" class="lienimage"><xsl:apply-templates/></a>
1632 </xsl:when>
1633 <xsl:otherwise>
1634 <a href="#{$label}" class="lienimage"><xsl:apply-templates/></a>
1635 </xsl:otherwise>
1636 </xsl:choose>
1637 </xsl:when>
1638 <xsl:otherwise>
1639 <a href="???" class="lienimage"><xsl:apply-templates/></a>
1640 </xsl:otherwise>
1641 </xsl:choose>
1642 </xsl:template>
1643
1644
1645 <xsl:template name="sortie-symbole">
1646 <xsl:param name="nomlettre"/>
1647 <xsl:param name="prefixe"/>
1648
1649 <xsl:variable name="nomsansext" select="substring-before($nomlettre,'.')"/>
1650 <xsl:choose>
1651 <!-- pour chaque symbole on donne l'équivalent sous forme de caractère UNICODE,
1652 ou d'une image pour les caractères qui ne s'affichent pas bien partout -->
1653 <xsl:when test="$nomsansext='Alpha'">&#x391;</xsl:when>
1654 <xsl:when test="$nomsansext='Beta'">&#x392;</xsl:when>
1655 <xsl:when test="$nomsansext='Gamma'">&#x393;</xsl:when>
1656 <xsl:when test="$nomsansext='Delta'">&#x394;</xsl:when>
1657 <xsl:when test="$nomsansext='Epsilon'">&#x395;</xsl:when>
1658 <xsl:when test="$nomsansext='Zeta'">&#x396;</xsl:when>
1659 <xsl:when test="$nomsansext='Eta'">&#x397;</xsl:when>
1660 <xsl:when test="$nomsansext='Theta'">&#x398;</xsl:when>
1661 <xsl:when test="$nomsansext='Iota'">&#x399;</xsl:when>
1662 <xsl:when test="$nomsansext='Kappa'">&#x39A;</xsl:when>
1663 <xsl:when test="$nomsansext='Lambda'">&#x39B;</xsl:when>
1664 <xsl:when test="$nomsansext='Mu'">&#x39C;</xsl:when>
1665 <xsl:when test="$nomsansext='Nu'">&#x39D;</xsl:when>
1666 <xsl:when test="$nomsansext='Xi'">&#x39E;</xsl:when>
1667 <xsl:when test="$nomsansext='Omicron'">&#x39F;</xsl:when>
1668 <xsl:when test="$nomsansext='Pi'">&#x3A0;</xsl:when>
1669 <xsl:when test="$nomsansext='Rho'">&#x3A1;</xsl:when>
1670 <xsl:when test="$nomsansext='Sigma'">&#x3A3;</xsl:when>
1671 <xsl:when test="$nomsansext='Tau'">&#x3A4;</xsl:when>
1672 <xsl:when test="$nomsansext='Upsilon'">&#x3A5;</xsl:when>
1673 <xsl:when test="$nomsansext='Phi'">&#x3A6;</xsl:when>
1674 <xsl:when test="$nomsansext='Chi'">&#x3A7;</xsl:when>
1675 <xsl:when test="$nomsansext='Psi'">&#x3A8;</xsl:when>
1676 <xsl:when test="$nomsansext='Omega'">&#x3A9;</xsl:when>
1677 <xsl:when test="$nomsansext='alpha'">&#x3B1;</xsl:when>
1678 <xsl:when test="$nomsansext='beta'">&#x3B2;</xsl:when>
1679 <xsl:when test="$nomsansext='gamma'">&#x3B3;</xsl:when>
1680 <xsl:when test="$nomsansext='delta'">&#x3B4;</xsl:when>
1681 <xsl:when test="$nomsansext='epsilon'">&#x3B5;</xsl:when>
1682 <xsl:when test="$nomsansext='zeta'">&#x3B6;</xsl:when>
1683 <xsl:when test="$nomsansext='eta'">&#x3B7;</xsl:when>
1684 <xsl:when test="$nomsansext='theta'">&#x3B8;</xsl:when>
1685 <xsl:when test="$nomsansext='iota'">&#x3B9;</xsl:when>
1686 <!--<xsl:when test="$nomsansext='kappa'">&#x3BA;</xsl:when> 03BA confondu avec 03F0 sur MacOS à cause de la police Times -->
1687 <xsl:when test="$nomsansext='lambda'">&#x3BB;</xsl:when>
1688 <xsl:when test="$nomsansext='mu'">&#x3BC;</xsl:when>
1689 <xsl:when test="$nomsansext='nu'">&#x3BD;</xsl:when>
1690 <xsl:when test="$nomsansext='xi'">&#x3BE;</xsl:when>
1691 <xsl:when test="$nomsansext='omicron'">&#x3BF;</xsl:when>
1692 <xsl:when test="$nomsansext='pi'">&#x3C0;</xsl:when>
1693 <xsl:when test="$nomsansext='rho'">&#x3C1;</xsl:when>
1694 <!--<xsl:when test="$nomsansext='sigmaf'">&#x3C2;</xsl:when> pas bien affiché sur Firefox Mac -->
1695 <xsl:when test="$nomsansext='sigma'">&#x3C3;</xsl:when>
1696 <xsl:when test="$nomsansext='tau'">&#x3C4;</xsl:when>
1697 <xsl:when test="$nomsansext='upsilon'">&#x3C5;</xsl:when>
1698 <!--<xsl:when test="$nomsansext='phi'">&#x3D5;</xsl:when> phi = unicode 03C6 != 03D5, inversé sur MacOS à cause de la police Times, 03D5 ne s'affiche pas sur IE6 XP -->
1699 <!--<xsl:when test="$nomsansext='phi2'">&#x3C6;</xsl:when> unicode 03C6 != 03D5, inversé sur MacOS -->
1700 <xsl:when test="$nomsansext='chi'">&#x3C7;</xsl:when>
1701 <xsl:when test="$nomsansext='psi'">&#x3C8;</xsl:when>
1702 <xsl:when test="$nomsansext='omega'">&#x3C9;</xsl:when>
1703 <!--<xsl:when test="$nomsansext='thetasym'">&#x3D1;</xsl:when> pas bien affiché sur IE6 Windows et Firefox Mac -->
1704 <!--<xsl:when test="$nomsansext='upsih'">&#x3D2;</xsl:when> pas bien affiché sur IE6 Windows -->
1705 <!--<xsl:when test="$nomsansext='piv'">&#x3D6;</xsl:when> pas bien affiché sur IE6 Windows et Firefox Mac -->
1706
1707 <xsl:when test="$nomsansext='asymp'">&#x2248;</xsl:when>
1708 <xsl:when test="$nomsansext='cap'">&#x2229;</xsl:when>
1709 <!-- <xsl:when test="$nomsansext='cup'">&#x222A;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1710 <!-- <xsl:when test="$nomsansext='exist'">&#x2203;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1711 <!-- <xsl:when test="$nomsansext='forall'">&#x2200;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1712 <xsl:when test="$nomsansext='ge'">&#x2265;</xsl:when>
1713 <xsl:when test="$nomsansext='harr'">&#x2194;</xsl:when>
1714 <!-- <xsl:when test="$nomsansext='hdarr'">&#x21D4;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1715 <xsl:when test="$nomsansext='infin'">&#x221E;</xsl:when>
1716 <!-- <xsl:when test="$nomsansext='isin'">&#x2208;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1717 <xsl:when test="$nomsansext='larr'">&#x2190;</xsl:when>
1718 <!-- ldarr = symbole HTML lArr ne s'affiche pas avec IE 6 -->
1719 <xsl:when test="$nomsansext='le'">&#x2264;</xsl:when>
1720 <!-- <xsl:when test="$nomsansext='nabla'">&#x2207;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1721 <xsl:when test="$nomsansext='ne'">&#x2260;</xsl:when>
1722 <xsl:when test="$nomsansext='not'">&#xAC;</xsl:when>
1723 <xsl:when test="$nomsansext='part'">&#x2202;</xsl:when>
1724 <xsl:when test="$nomsansext='plusmn'">&#xB1;</xsl:when>
1725 <xsl:when test="$nomsansext='rarr'">&#x2192;</xsl:when>
1726 <!-- <xsl:when test="$nomsansext='rdarr'">&#x21D2;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1727 <!-- sim ne s'affiche pas sur IE6 et IE7 XP-->
1728 <!-- <xsl:when test="$nomsansext='sub'">&#x2282;</xsl:when> ne s'affiche pas sur IE6 et IE7 XP -->
1729
1730 <xsl:otherwise>
1731 <img src="{$prefixe}interface/{@nom}" border="0" alt="{$nomlettre}" class="maths"/>
1732 </xsl:otherwise>
1733 </xsl:choose>
1734 </xsl:template>
1735
1736 <xsl:template match="SYMBOLE">
1737 <xsl:variable name="nomlettre"><xsl:call-template name="nom-fichier"><xsl:with-param name="chemin" select="@nom"/></xsl:call-template></xsl:variable>
1738 <xsl:variable name="prefixe"><xsl:choose>
1739 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
1740 <xsl:otherwise>../</xsl:otherwise>
1741 </xsl:choose></xsl:variable>
1742 <xsl:call-template name="sortie-symbole">
1743 <xsl:with-param name="nomlettre" select="$nomlettre"/>
1744 <xsl:with-param name="prefixe" select="$prefixe"/>
1745 </xsl:call-template>
1746 </xsl:template>
1747
1748
10371749 <xsl:template match="EQUATION|EQUATEX">
1750 <xsl:param name="prefixe"><xsl:choose>
1751 <xsl:when test="ancestor::ENVIMAGE[@localisation='icône']">../../</xsl:when>
1752 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
1753 <xsl:otherwise>../</xsl:otherwise>
1754 </xsl:choose></xsl:param>
10381755 <xsl:variable name="label-ensemble" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
1756 <xsl:variable name="label-fichiers" select="ancestor::XPAGES[1]/@labelfichiers"/>
10391757 <!--
10401758 <xsl:variable name="largeur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=current()/@image]/@largeur1"/>
10411759 <xsl:variable name="hauteur1" select="document(concat($uri-site, '/images.xml'))/IMAGES/IMAGE[@contrib=$label-ensemble and @nom=current()/@image]/@hauteur1"/>
10421760 pour l'instant les dimensions ne sont pas dans ce fichier
10431761 -->
10441762 <xsl:variable name="numero"><xsl:number from="XPAGES" count="EQUATION|EQUATEX" level="any"/></xsl:variable>
1045 <xsl:variable name="prefixe"><xsl:choose>
1046 <xsl:when test="ancestor::ENVIMAGE[@localisation='icône']">../../</xsl:when>
1047 <xsl:when test="ancestor::PAGE[@label='index']"></xsl:when>
1048 <xsl:otherwise>../</xsl:otherwise>
1049 </xsl:choose></xsl:variable>
1050 <img alt="{@texte}" src="{$prefixe}pages_{$label-ensemble}/equations_{$label-ensemble}/equation{$numero}.png" class="maths"/>
1763 <img alt="{@texte}" src="{$prefixe}pages_{$label-fichiers}/equations_{$label-ensemble}/equation{$numero}.png" class="maths"/>
10511764 </xsl:template>
10521765
10531766
10621775 </xsl:choose></xsl:variable>
10631776 <xsl:variable name="definition"><xsl:choose>
10641777 <xsl:when test="normalize-space(.)!=''"><xsl:value-of select="."/></xsl:when>
1065 <xsl:otherwise><xsl:value-of select="//GLOSSAIRE[@ref=$motref]"/></xsl:otherwise>
1778 <xsl:otherwise><xsl:value-of select="//GLOSSAIRE[@ref=$motref and normalize-space(.)!='']"/></xsl:otherwise>
10661779 </xsl:choose></xsl:variable>
10671780 <xsl:variable name="motreftrans" select="translate($motref,' אגיטךמןפצש�','_aaeeeiioouu')"/>
1068 <a href="{$prefixe}pages_{ancestor::XPAGES[last()]/INFORMATIONS/LABEL}/glossaire.html#{$motreftrans}" title="{$definition}" class="glossaire" target="blank"><xsl:value-of select="@mot"/></a>
1781 <a href="{$prefixe}pages_{ancestor::XPAGES[last()]/INFORMATIONS/LABEL}/glossaire.html#{$motreftrans}" title="{$definition}" class="glossaire" target="_blank"><xsl:value-of select="@mot"/></a>
10691782 </xsl:template>
10701783
10711784
10851798
10861799
10871800 <xsl:template match="CODE">
1088 <tt><xsl:apply-templates/></tt>
1801 <xsl:choose>
1802 <xsl:when test="parent::PAGE or parent::SECTION">
1803 <pre>
1804 <xsl:apply-templates/>
1805 </pre>
1806 </xsl:when>
1807 <xsl:otherwise><tt><xsl:apply-templates/></tt></xsl:otherwise>
1808 </xsl:choose>
10891809 </xsl:template>
10901810
10911811
10951815
10961816 <!-- Page d'entrée du site -->
10971817
1098 <xsl:template name="page-entree">
1818 <xsl:template name="page-entree">
10991819 <xsl:variable name="interface">interface/<xsl:choose>
11001820 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
11011821 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
11041824 <head>
11051825 <title><xsl:value-of select="ancestor-or-self::XPAGES[last()]/INFORMATIONS/TITRE"/></title>
11061826 <link type="text/css" rel="stylesheet" href="{$interface}/style.css"/>
1827 <xsl:if test=".//ENVIMAGE[@localisation='page']">
1828 <xsl:call-template name="script-imagettes">
1829 <xsl:with-param name="interface" select="$interface"/>
1830 <xsl:with-param name="prefixe"></xsl:with-param>
1831 </xsl:call-template>
1832 </xsl:if>
11071833 </head>
11081834
11091835 <body class="page">
11131839
11141840 <xsl:call-template name="zone_bandeau"/>
11151841
1116 <xsl:if test="count(ancestor-or-self::XPAGES[last()]/XPAGES) &gt; 1">
1842 <xsl:if test="count(ancestor-or-self::XPAGES[last()]/XPAGES) &gt; 1 and $rubriques='oui'">
11171843 <xsl:call-template name="zone_rubriques">
11181844 <xsl:with-param name="prefixe"></xsl:with-param>
11191845 </xsl:call-template>
11371863 </div>
11381864
11391865 <div class="zone_contenu_entree">
1140 <!-- pb de chemin vers html_images
11411866 <xsl:if test=".//ENVIMAGE[@localisation='page']">
11421867 <xsl:call-template name="figures-page">
11431868 <xsl:with-param name="prefixe"></xsl:with-param>
11441869 </xsl:call-template>
11451870 </xsl:if>
1146 -->
11471871 <div class="zone_texte">
11481872 <xsl:call-template name="infos-erreurs"/>
11491873 <xsl:choose>
11631887
11641888 <!-- Sommaire et Glossaire du site -->
11651889
1166 <xsl:template name="page-sommaire">
1890 <xsl:template name="page-sommaire">
1891 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
11671892 <xsl:variable name="prefixe">../</xsl:variable>
1168 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
1169 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
1170 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
1171 </xsl:choose></xsl:variable>
11721893 <html>
11731894 <head>
11741895 <title><xsl:value-of select="$messages/message[@label='Sommaire']"/></title>
1175 <link type="text/css" rel="stylesheet" href="{$interface}/style.css"/>
1896 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/style.css"/>
11761897 </head>
11771898
11781899 <body class="page">
11801901
11811902 <xsl:call-template name="zone_bandeau"/>
11821903
1183 <xsl:if test="count(XPAGES) &gt; 1">
1904 <xsl:if test="count(XPAGES) &gt; 1 and $rubriques='oui'">
11841905 <xsl:call-template name="zone_rubriques"/>
11851906 </xsl:if>
11861907
11871908 <div class="zone_sommaire">
11881909 <div class="zone_outils">
1189 <a href="{$prefixe}index.html" title="{$messages/message[@label='entrée du site']}"><img src="{$interface}/home.gif" width="25" height="25" alt="home" border="0"/></a>
1910 <a href="{$prefixe}index.html" title="{$messages/message[@label='Entrée du site']}"><img src="{$prefixe}{$interface}/home.gif" width="25" height="25" alt="home" border="0"/></a>
11901911 <xsl:if test="//GLOSSAIRE">
11911912 &#xA0;&#xA0;
1192 <a href="glossaire.html" title="{$messages/message[@label='Glossaire']}"><img src="{$interface}/glossaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Glossaire']}"/></a>
1913 <a href="glossaire.html" title="{$messages/message[@label='Glossaire']}"><img src="{$prefixe}{$interface}/glossaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Glossaire']}"/></a>
11931914 </xsl:if>
11941915 </div>
11951916
12131934 </xsl:template>
12141935
12151936 <xsl:template match="XPAGES" mode="sommaire-site">
1937 <xsl:param name="prefixe">../</xsl:param>
1938 <li>
1939 <xsl:variable name="nom-fichier-index"><xsl:choose>
1940 <xsl:when test="@contribution='oui'">index.html</xsl:when>
1941 <xsl:otherwise><xsl:value-of select="INFORMATIONS/LABEL"/>_index.html</xsl:otherwise>
1942 </xsl:choose></xsl:variable>
1943 <a href="{$prefixe}pages_{@labelfichiers}/{$nom-fichier-index}" class="sommaire2"><xsl:value-of select="INFORMATIONS/TITRE"/></a>
1944 <xsl:if test="count(ancestor::XPAGES) &lt; 3">
1945 <ul>
1946 <xsl:apply-templates select="PAGE[@label!='index']|XPAGES" mode="sommaire-site">
1947 <xsl:with-param name="prefixe" select="$prefixe"/>
1948 </xsl:apply-templates>
1949 </ul>
1950 </xsl:if>
1951 </li>
1952 </xsl:template>
1953
1954 <xsl:template match="PAGE" mode="sommaire-site">
1955 <xsl:param name="prefixe">../</xsl:param>
1956 <li>
1957 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/@labelfichiers}/{@label}.html" class="sommairepage"><xsl:value-of select="@titre"/></a>
1958 </li>
1959 </xsl:template>
1960
1961
1962 <xsl:template name="page-glossaire">
1963 <xsl:param name="interface">interface/<xsl:value-of select="$interface_par_defaut"/></xsl:param>
12161964 <xsl:variable name="prefixe">../</xsl:variable>
1217 <li>
1218 <a href="{$prefixe}pages_{INFORMATIONS/LABEL}/index.html" class="sommaire2"><xsl:value-of select="INFORMATIONS/TITRE"/></a>
1219 <ul>
1220 <xsl:apply-templates select="PAGE|XPAGES" mode="sommaire-site"/>
1221 </ul>
1222 </li>
1223 </xsl:template>
1224
1225 <xsl:template match="PAGE" mode="sommaire-site">
1226 <xsl:variable name="prefixe">../</xsl:variable>
1227 <li>
1228 <a href="{$prefixe}pages_{ancestor::XPAGES[1]/INFORMATIONS/LABEL}/{@label}.html" class="sommairepage"><xsl:value-of select="@titre"/></a>
1229 </li>
1230 </xsl:template>
1231
1232
1233 <xsl:template name="page-glossaire">
1234 <xsl:variable name="prefixe">../</xsl:variable>
1235 <xsl:variable name="interface"><xsl:value-of select="$prefixe"/>interface/<xsl:choose>
1236 <xsl:when test="count(ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!='']) &gt; 0"><xsl:value-of select="ancestor-or-self::XPAGES[INFORMATIONS/INTERFACE!=''][1]/INFORMATIONS/INTERFACE"/></xsl:when>
1237 <xsl:otherwise><xsl:value-of select="$interface_par_defaut"/></xsl:otherwise>
1238 </xsl:choose></xsl:variable>
12391965 <html>
12401966 <head>
12411967 <title><xsl:value-of select="$messages/message[@label='Glossaire']"/></title>
1242 <link type="text/css" rel="stylesheet" href="{$interface}/style.css"/>
1968 <link type="text/css" rel="stylesheet" href="{$prefixe}{$interface}/style.css"/>
12431969 </head>
12441970 <body class="page">
12451971 <xsl:call-template name="zone_logo"/>
12461972
12471973 <xsl:call-template name="zone_bandeau"/>
12481974
1249 <xsl:if test="count(XPAGES) &gt; 1">
1975 <xsl:if test="count(XPAGES) &gt; 1 and $rubriques='oui'">
12501976 <xsl:call-template name="zone_rubriques"/>
12511977 </xsl:if>
12521978
12531979 <div class="zone_sommaire">
12541980 <div class="zone_outils">
1255 <a href="{$prefixe}index.html" title="{$messages/message[@label='entrée du site']}"><img src="{$interface}/home.gif" width="25" height="25" alt="{$messages/message[@label='entrée du site']}" border="0"/></a>
1981 <a href="{$prefixe}index.html" title="{$messages/message[@label='Entrée du site']}"><img src="{$prefixe}{$interface}/home.gif" width="25" height="25" alt="{$messages/message[@label='Entrée du site']}" border="0"/></a>
12561982 &#xA0;&#xA0;
1257 <a href="sommaire.html" title="{$messages/message[@label='Sommaire']}"><img src="{$interface}/sommaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Sommaire']}"/></a>
1983 <a href="sommaire.html" title="{$messages/message[@label='Sommaire']}"><img src="{$prefixe}{$interface}/sommaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Sommaire']}"/></a>
12581984 &#xA0;&#xA0;
1259 <img src="{$interface}/glossaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Glossaire']}"/>
1985 <img src="{$prefixe}{$interface}/glossaire_petit.gif" width="25" height="25" border="0" alt="{$messages/message[@label='Glossaire']}"/>
12601986 </div>
12611987
12621988 </div>
12812007
12822008
12832009 <xsl:template name="lettres-glossaire">
1284 <xsl:param name="lettres"/>
2010 <xsl:param name="lettres"/>
12852011
12862012 <xsl:variable name="lettre" select="substring($lettres,1,1)"/>
12872013
1288 <h2>- <xsl:value-of select="$lettre"/> -</h2>
1289 <dl>
1290 <xsl:apply-templates select="//GLOSSAIRE[translate(substring(@ref,1,1),'aàbcçdeéèêfghiïîjklmnoôpqrstuùvwxyz','AABCCDEEEEFGHIIIJKLMNOOPQRSTUUVWXYZ')=$lettre or (not(@ref) and translate(substring(@mot,1,1),'aàbcçdeéèêfghiïîjklmnoôpqrstuùvwxyz','AABCCDEEEEFGHIIIJKLMNOOPQRSTUUVWXYZ')=$lettre)]" mode="glossaire-site">
1291 <xsl:sort select="concat(@ref,@mot)"/>
1292 </xsl:apply-templates>
2014 <h2>- <xsl:value-of select="$lettre"/> -</h2>
2015 <dl>
2016 <xsl:apply-templates select="//GLOSSAIRE[translate(substring(@ref,1,1),'aàbcçdeéèêfghiïîjklmnoôpqrstuùvwxyz','AABCCDEEEEFGHIIIJKLMNOOPQRSTUUVWXYZ')=$lettre or (not(@ref) and translate(substring(@mot,1,1),'aàbcçdeéèêfghiïîjklmnoôpqrstuùvwxyz','AABCCDEEEEFGHIIIJKLMNOOPQRSTUUVWXYZ')=$lettre)]" mode="glossaire-site">
2017 <xsl:sort select="concat(@ref,@mot)"/>
2018 </xsl:apply-templates>
12932019 </dl>
12942020 <xsl:if test="string-length($lettres)&gt;1">
12952021 <xsl:call-template name="lettres-glossaire">
13182044
13192045 <xsl:template name="format-fichier">
13202046 <!-- renvoit le format supposé d'un fichier d'image/animation à partir de son nom, en utilisant l'extension -->
1321 <!-- formats reconnus: PNG, JPEG, GIF, MPEG, MNG -->
2047 <!-- formats reconnus: PNG, JPEG, GIF, MPEG, OGG -->
13222048 <!-- renvoit '?' si le format n'est pas reconnu -->
13232049 <xsl:param name="nom"/>
13242050 <xsl:variable name="ext"><xsl:call-template name="extension-fichier"><xsl:with-param name="nom" select="$nom"/></xsl:call-template></xsl:variable>
13282054 <xsl:when test="$extmin='jpg' or $extmin='jpeg'">JPEG</xsl:when>
13292055 <xsl:when test="$extmin='gif'">GIF</xsl:when>
13302056 <xsl:when test="$extmin='mpg' or $extmin='mpeg'">MPEG</xsl:when>
1331 <xsl:when test="$extmin='mng'">MNG</xsl:when>
2057 <xsl:when test="$extmin='ogg' or $extmin='ogv'">OGG</xsl:when>
13322058 <xsl:otherwise>?</xsl:otherwise>
13332059 </xsl:choose>
13342060 </xsl:template>
14232149 </xsl:choose>
14242150 </xsl:template>
14252151
2152 <xsl:template name="mauvais-liens">
2153 <xsl:call-template name="ecrire-fichier">
2154 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'mauvais_liens.html')"/>
2155 <xsl:with-param name="contenu">
2156 <html>
2157 <head>
2158 <title><xsl:value-of select="$messages/message[@label='Liste des liens non résolus']"/></title>
2159 </head>
2160 <body>
2161 <div align="center"><h1><xsl:value-of select="$messages/message[@label='Liste des liens non résolus']"/></h1></div>
2162 <ul>
2163 <xsl:apply-templates select=".//LIENPAGE" mode="mauvais-liens"/>
2164 <xsl:apply-templates select=".//LIENIMAGE" mode="mauvais-liens"/>
2165 </ul>
2166 <p></p>
2167 <div align="center"><h1><xsl:value-of select="$messages/message[@label='Mots du glossaire non définis']"/></h1></div>
2168 <ul>
2169 <xsl:apply-templates select=".//GLOSSAIRE" mode="mauvais-liens">
2170 <xsl:sort select="@ref|@mot"/>
2171 </xsl:apply-templates>
2172 </ul>
2173 <p></p>
2174 <div align="center"><h1><xsl:value-of select="$messages/message[@label='Mots du glossaire définis plus d_une fois']"/></h1></div>
2175 <ul>
2176 <xsl:apply-templates select=".//GLOSSAIRE" mode="doublons">
2177 <xsl:sort select="@ref|@mot"/>
2178 </xsl:apply-templates>
2179 </ul>
2180 </body>
2181 </html>
2182 </xsl:with-param>
2183 </xsl:call-template>
2184 </xsl:template>
2185
2186 <xsl:template match="LIENPAGE" mode="mauvais-liens">
2187 <xsl:variable name="page" select="@page"/>
2188 <xsl:variable name="contribution" select="@contribution"/>
2189 <xsl:choose>
2190 <xsl:when test="@contribution='' or not(@contribution)">
2191 <xsl:if test="count(ancestor::XPAGES[1]//PAGE[@label=$page]) != 1">
2192 <li>
2193 <a href="{concat('pages_',ancestor::XPAGES[1]/@labelfichiers)}/{ancestor::PAGE/@label}.html" class="lien"><xsl:value-of select="$messages/message[@label='page']"/>
2194 <xsl:value-of select="@page"/><xsl:text> </xsl:text><xsl:value-of select="$messages/message[@label='de la même contribution']"/></a>
2195 <br/>
2196 </li>
2197 </xsl:if>
2198 </xsl:when>
2199 <xsl:when test="@page='' or not(@page)">
2200 <xsl:if test="count(//XPAGES[INFORMATIONS/LABEL=$contribution]) != 1">
2201 <li>
2202 <a href="{concat('pages_',ancestor::XPAGES[1]/@labelfichiers)}/{ancestor::PAGE/@label}.html" class="lien"><xsl:value-of select="$messages/message[@label='contribution']"/>
2203 <xsl:text> </xsl:text>
2204 <xsl:value-of select="@contribution"/></a>
2205 <xsl:if test="count(//XPAGES[INFORMATIONS/LABEL=$contribution]) &gt; 1">
2206 <xsl:text> </xsl:text>
2207 <xsl:value-of select="$messages/message[@label='(il y a plus d_une contribution avec ce label)']"/>
2208 </xsl:if>
2209 <br/>
2210 </li>
2211 </xsl:if>
2212 </xsl:when>
2213 <xsl:otherwise>
2214 <xsl:if test="count(//XPAGES[INFORMATIONS/LABEL=$contribution]/PAGE[@label=$page]) != 1">
2215 <li>
2216 <xsl:value-of select="$messages/message[@label='page']"/><xsl:text> </xsl:text>
2217 <a href="{concat('pages_',ancestor::XPAGES[1]/@labelfichiers)}/{ancestor::PAGE/@label}.html" class="lien"><xsl:value-of select="concat($contribution, '/', $page)"/></a>
2218 <br/>
2219 </li>
2220 </xsl:if>
2221 </xsl:otherwise>
2222 </xsl:choose>
2223 </xsl:template>
2224
2225 <xsl:template match="LIENIMAGE" mode="mauvais-liens">
2226 <xsl:variable name="label" select="@label"/>
2227 <xsl:variable name="contribution" select="ancestor::XPAGES[1]/INFORMATIONS/LABEL"/>
2228 <xsl:variable name="page" select="ancestor::PAGE[1]/@label"/>
2229 <xsl:if test="count(//XPAGES[INFORMATIONS/LABEL=$contribution]/PAGE[@label=$page]//ENVIMAGE[@label=$label]) != 1">
2230 <li>
2231 <xsl:value-of select="$messages/message[@label='Lien vers l_image']"/><xsl:text> </xsl:text>
2232 <xsl:value-of select="$label"/><xsl:text> </xsl:text>
2233 <xsl:value-of select="$messages/message[@label='à la page']"/><xsl:text> </xsl:text>
2234 <a href="{concat('pages_',$contribution,'/',$page,'.html')}" class="lien"><xsl:value-of select="concat($contribution, '/', $page)"/></a>
2235 <br/>
2236 </li>
2237 </xsl:if>
2238 </xsl:template>
2239
2240 <xsl:template match="GLOSSAIRE" mode="mauvais-liens">
2241 <xsl:variable name="motref"><xsl:choose>
2242 <xsl:when test="@ref!=''"><xsl:value-of select="@ref"/></xsl:when>
2243 <xsl:otherwise><xsl:value-of select="@mot"/></xsl:otherwise>
2244 </xsl:choose></xsl:variable>
2245 <xsl:if test="$motref != ''">
2246 <xsl:if test="normalize-space(.)=''">
2247 <xsl:if test="count(//GLOSSAIRE[(@ref=$motref or @mot=$motref) and normalize-space(.)!=''])=0">
2248 <li><xsl:value-of select="$motref"/> (<xsl:value-of select="$messages/message[@label='utilisé page']"/><xsl:text> </xsl:text><xsl:value-of select="concat(ancestor::XPAGES[1]/INFORMATIONS/LABEL, '_', ancestor::PAGE[1]/@label)"/>)</li>
2249 </xsl:if>
2250 </xsl:if>
2251 </xsl:if>
2252 </xsl:template>
2253
2254 <xsl:template match="GLOSSAIRE" mode="doublons">
2255 <xsl:variable name="motref"><xsl:choose>
2256 <xsl:when test="@ref!=''"><xsl:value-of select="@ref"/></xsl:when>
2257 <xsl:otherwise><xsl:value-of select="@mot"/></xsl:otherwise>
2258 </xsl:choose></xsl:variable>
2259 <xsl:if test="$motref != ''">
2260 <xsl:if test="normalize-space(.)!=''">
2261 <xsl:if test="count(//GLOSSAIRE[(@ref=$motref or (not(@ref) and @mot=$motref)) and normalize-space(.)!=''])&gt;1">
2262 <li><xsl:value-of select="$motref"/> (<xsl:value-of select="$messages/message[@label='utilisé page']"/><xsl:text> </xsl:text><xsl:value-of select="concat(ancestor::XPAGES[1]/INFORMATIONS/LABEL, '_', ancestor::PAGE[1]/@label)"/>)</li>
2263 </xsl:if>
2264 </xsl:if>
2265 </xsl:if>
2266 </xsl:template>
2267
2268 <xsl:template name="labels">
2269 <xsl:call-template name="ecrire-fichier">
2270 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'labels.html')"/>
2271 <xsl:with-param name="contenu">
2272 <html>
2273 <head>
2274 <title><xsl:value-of select="$messages/message[@label='Labels utilisés']"/></title>
2275 </head>
2276 <body>
2277 <p>
2278 <a href="#erreurs"><xsl:value-of select="$messages/message[@label='Erreurs']"/></a><xsl:text> - </xsl:text>
2279 <a href="#contributions"><xsl:value-of select="$messages/message[@label='Contributions']"/></a><xsl:text> - </xsl:text>
2280 <a href="#pages"><xsl:value-of select="$messages/message[@label='Pages']"/></a><xsl:text> - </xsl:text>
2281 <a href="#index"><xsl:value-of select="$messages/message[@label='Index']"/></a>
2282 </p>
2283
2284 <hr/>
2285
2286 <xsl:call-template name="labels-erreurs"/>
2287
2288 <hr/>
2289
2290 <a name="contributions"/>
2291 <h2><xsl:value-of select="$messages/message[@label='Contributions']"/></h2>
2292 <xsl:call-template name="labels-xpages"/>
2293
2294 <hr/>
2295
2296 <a name="pages"/>
2297 <h2><xsl:value-of select="$messages/message[@label='Pages']"/></h2>
2298 <xsl:call-template name="labels-pages"/>
2299
2300 <hr/>
2301
2302 <a name="index"/>
2303 <h1><xsl:value-of select="$messages/message[@label='Index']"/></h1>
2304 <xsl:for-each select="//XPAGES | //PAGE">
2305 <xsl:sort select="INFORMATIONS/LABEL|@label"/>
2306 <xsl:variable name="label" select="INFORMATIONS/LABEL|@label"/>
2307 <xsl:variable name="titre" select="INFORMATIONS/TITRE|@titre"/>
2308 <xsl:variable name="type" select="translate(name(),'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')"/>
2309 &#xA0;&#xA0;&#xA0;&#xA0;
2310 <xsl:choose>
2311 <xsl:when test="$label!=''"><a href="#{$type}{$label}"><tt><xsl:value-of select="$label"/></tt></a></xsl:when>
2312 <xsl:otherwise><em><xsl:value-of select="$messages/message[@label='sans label']"/></em></xsl:otherwise>
2313 </xsl:choose>
2314 &#xA0;&#xA0;&#xA0;&#xA0;
2315 <xsl:value-of select="$type"/> &quot;<xsl:value-of select="$titre"/>&quot;<br/>
2316 </xsl:for-each>
2317 </body>
2318 </html>
2319 </xsl:with-param>
2320 </xsl:call-template>
2321 </xsl:template>
2322
2323 <xsl:template name="labels-xpages">
2324 <xsl:if test="XPAGES">
2325 <ul>
2326 <xsl:for-each select="XPAGES">
2327 <li><a name="xpages{INFORMATIONS/LABEL}"/>XPAGES &quot;<xsl:value-of select="INFORMATIONS/TITRE"/>&quot;: <tt><xsl:value-of select="INFORMATIONS/LABEL"/></tt></li>
2328 <xsl:call-template name="labels-xpages"/>
2329 </xsl:for-each>
2330 </ul>
2331 </xsl:if>
2332 </xsl:template>
2333
2334 <xsl:template name="labels-pages">
2335 <xsl:if test="XPAGES|PAGE">
2336 <ul>
2337 <xsl:for-each select="*[self::XPAGES|self::PAGE]">
2338 <xsl:choose>
2339 <xsl:when test="self::XPAGES">
2340 <li><a name="xpages{INFORMATIONS/LABEL}"/>XPAGES &quot;<xsl:value-of select="INFORMATIONS/TITRE"/>&quot;: <tt><xsl:value-of select="INFORMATIONS/LABEL"/></tt></li>
2341 </xsl:when>
2342 <xsl:when test="self::PAGE">
2343 <li><a name="page{@label}"/>PAGE &quot;<xsl:value-of select="@titre"/>&quot;: <tt><xsl:value-of select="@label"/></tt></li>
2344 </xsl:when>
2345 </xsl:choose>
2346 <xsl:call-template name="labels-pages"/>
2347 </xsl:for-each>
2348 </ul>
2349 </xsl:if>
2350 </xsl:template>
2351
2352 <xsl:template name="labels-erreurs">
2353 <a name="erreurs"/>
2354 <h1><xsl:value-of select="$messages/message[@label='Erreurs']"/></h1>
2355 <p><xsl:value-of select="$messages/message[@label='Un lien utilisant un label avec un doublon ne fonctionnera pas, et apparaîtra sur la page des']"/>
2356 <xsl:text> </xsl:text><a href="mauvais_liens.html"><xsl:value-of select="$messages/message[@label='mauvais liens']"/></a>.</p>
2357 <xsl:if test="//XPAGES[@label=following::XPAGES/@label]">
2358 <h2><xsl:value-of select="$messages/message[@label='Doublons d_ensembles XPAGES']"/></h2>
2359 <ul>
2360 <xsl:for-each select="//XPAGES">
2361 <xsl:if test="count(//XPAGES[@label=current()/@label])&gt;1">
2362 <li>XPAGES &quot;<xsl:value-of select="INFORMATIONS/TITRE"/>&quot;: <tt><xsl:value-of select="INFORMATIONS/LABEL"/></tt>
2363 <xsl:text> - </xsl:text>
2364 <a href="#xpages{@label}"><xsl:value-of select="$messages/message[@label='lien vers le premier avec ce label']"/></a></li>
2365 </xsl:if>
2366 </xsl:for-each>
2367 </ul>
2368 </xsl:if>
2369 <xsl:if test="//PAGE[@label=following::PAGE/@label]">
2370 <h2><xsl:value-of select="$messages/message[@label='Doublons de pages']"/></h2>
2371 <ul>
2372 <xsl:for-each select="//PAGE">
2373 <xsl:if test="count(//PAGE[@label=current()/@label])&gt;1">
2374 <li><xsl:value-of select="$messages/message[@label='page']"/> &quot;<xsl:value-of select="@titre"/>&quot;: <tt><xsl:value-of select="@label"/></tt> - <a href="#page{@label}"><xsl:value-of select="$messages/message[@label='lien vers la première avec ce label']"/></a></li>
2375 </xsl:if>
2376 </xsl:for-each>
2377 </ul>
2378 </xsl:if>
2379 <xsl:if test="//XPAGES[normalize-space(translate(INFORMATIONS/LABEL,'abcdefghijklmnopqrstuvwxyz0123456789-',' '))!=''] or //PAGE[normalize-space(translate(@label,'abcdefghijklmnopqrstuvwxyz0123456789-',' '))!=''] or //ENVIMAGE[@label!='' and normalize-space(translate(@label,'abcdefghijklmnopqrstuvwxyz0123456789-',' '))!='']">
2380 <h2><xsl:value-of select="$messages/message[@label='Labels invalides']"/></h2>
2381 <ul>
2382 <xsl:for-each select="//XPAGES">
2383 <xsl:if test="normalize-space(translate(INFORMATIONS/LABEL,'abcdefghijklmnopqrstuvwxyz0123456789-',' '))!=''">
2384 <li><xsl:value-of select="name()"/> &quot;<xsl:value-of select="INFORMATIONS/TITRE"/>&quot;:
2385 <tt><xsl:value-of select="INFORMATIONS/LABEL"/></tt></li>
2386 </xsl:if>
2387 </xsl:for-each>
2388 <xsl:for-each select="//PAGE|//ENVIMAGE[@label!='']">
2389 <xsl:if test="normalize-space(translate(@label,'abcdefghijklmnopqrstuvwxyz0123456789-',' '))!=''">
2390 <li><xsl:value-of select="name()"/> &quot;<xsl:value-of select="@titre"/>&quot;:
2391 <tt><xsl:value-of select="@label"/></tt></li>
2392 </xsl:if>
2393 </xsl:for-each>
2394 </ul>
2395 </xsl:if>
2396 </xsl:template>
2397
2398 <xsl:template name="commentaires">
2399 <xsl:call-template name="ecrire-fichier">
2400 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'commentaires.html')"/>
2401 <xsl:with-param name="contenu">
2402 <html>
2403 <head>
2404 <title><xsl:value-of select="$messages/message[@label='Commentaires des auteurs']"/></title>
2405 </head>
2406 <body>
2407 <h1><xsl:value-of select="$messages/message[@label='Commentaires des auteurs']"/></h1>
2408 <ul>
2409 <xsl:for-each select="//COMMENTAIRE">
2410 <li><xsl:apply-templates/> - <xsl:value-of select="$messages/message[@label='page']"/><xsl:text> </xsl:text><a href="pages_{concat(ancestor::XPAGES[1]/@labelfichiers, '/', ancestor::PAGE[1]/@label, '.html')}"><xsl:value-of select="ancestor::PAGE/@titre"/></a></li>
2411 </xsl:for-each>
2412 </ul>
2413 </body>
2414 </html>
2415 </xsl:with-param>
2416 </xsl:call-template>
2417 </xsl:template>
2418
2419 <xsl:template name="credits">
2420 <xsl:call-template name="ecrire-fichier">
2421 <xsl:with-param name="fichier" select="concat($chemin-site, $sep, 'credits.html')"/>
2422 <xsl:with-param name="contenu">
2423 <html>
2424 <head>
2425 <title><xsl:value-of select="$messages/message[@label='Liste des images et des crédits, triée par crédit']"/></title>
2426 </head>
2427 <body>
2428 <h1><xsl:value-of select="$messages/message[@label='Liste des images et des crédits, triée par crédit']"/></h1>
2429 <table border="1">
2430 <tr>
2431 <th><xsl:value-of select="$messages/message[@label='Crédit']"/></th>
2432 <th><xsl:value-of select="$messages/message[@label='Image']"/></th>
2433 <th><xsl:value-of select="$messages/message[@label='Titre']"/></th>
2434 <th><xsl:value-of select="$messages/message[@label='Nom fichier']"/></th>
2435 <th><xsl:value-of select="$messages/message[@label='Légende']"/></th>
2436 <th><xsl:value-of select="$messages/message[@label='page']"/></th>
2437 </tr>
2438 <xsl:apply-templates select=".//ENVIMAGE" mode="credits">
2439 <xsl:sort select="CREDIT"/>
2440 </xsl:apply-templates>
2441 </table>
2442 </body>
2443 </html>
2444 </xsl:with-param>
2445 </xsl:call-template>
2446 </xsl:template>
2447
2448 <xsl:template match="ENVIMAGE" mode="credits">
2449 <tr>
2450 <xsl:variable name="nomf"><xsl:choose>
2451 <xsl:when test="contains(FICHIER[1]/@nom, '.mpg') or contains(FICHIER[1]/@nom, '.mpeg') or contains(FICHIER[1]/@nom, '.mng')"><xsl:value-of select="$messages/message[@label='animation']"/>animation</xsl:when>
2452 <xsl:otherwise><xsl:value-of select="FICHIER[1]/@nom"/></xsl:otherwise>
2453 </xsl:choose></xsl:variable>
2454 <xsl:variable name="url" select="concat('pages_', ancestor::XPAGES[1]/@labelfichiers, '/', ancestor::PAGE[1]/@label, '.html')"/>
2455 <td><xsl:value-of select="CREDIT"/></td>
2456 <td><a href="{$url}"><xsl:choose>
2457 <xsl:when test="$nomf='animation'"><xsl:value-of select="$messages/message[@label='animation']"/></xsl:when>
2458 <xsl:otherwise><img src="{concat('pages_', ancestor::XPAGES[1]/@labelfichiers, '/', $nomf)}" width="200"/></xsl:otherwise>
2459 </xsl:choose></a></td>
2460 <td><xsl:value-of select="@titre"/></td>
2461 <td><xsl:value-of select="FICHIER[1]/@nom"/></td>
2462 <td><xsl:apply-templates select="LEGENDE"/></td>
2463 <td><a href="{$url}"><xsl:value-of select="ancestor::PAGE[1]/@titre"/></a></td>
2464 </tr>
2465 </xsl:template>
2466
14262467 </xsl:stylesheet>
2727 <MENU_INSERTION nom="FLASH" type_noeud="element"/>
2828 <MENU_INSERTION nom="PARAM" type_noeud="element"/>
2929 </MENU>
30 <MENU nom="Exercices">
31 <MENU_INSERTION nom="EXERCICE"/>
32 <MENU_INSERTION nom="ENONCE" type_noeud="element"/>
33 <MENU_INSERTION nom="DIFFICULTE"/>
34 <MENU_INSERTION nom="TEMPS"/>
35 <MENU_INSERTION nom="QUESTION"/>
36 <MENU_INSERTION nom="AIDE" type_noeud="element"/>
37 <MENU_INSERTION nom="SOLUTION"/>
38 <MENU_INSERTION nom="POINTS"/>
39 <MENU_INSERTION nom="QCM" type_noeud="element"/>
40 <MENU_INSERTION nom="ENONCEQCM"/>
41 <MENU_INSERTION nom="QUESTIONQCM" type_noeud="element"/>
42 <MENU_INSERTION nom="REPONSEQCM"/>
43 <MENU_INSERTION nom="TEXTEREP" type_noeud="element"/>
44 <MENU_INSERTION nom="COMMENTAIREREP" type_noeud="element"/>
45 </MENU>
3046 <MENU nom="Autres">
3147 <MENU_INSERTION nom="LIENPAGE" type_noeud="element"/>
3248 <MENU_INSERTION nom="LIENWEB" type_noeud="element"/>
3349 <MENU_INSERTION nom="GLOSSAIRE" type_noeud="element"/>
50 <MENU_INSERTION nom="SYMBOLE"/>
3451 <MENU_INSERTION nom="EQUATION" raccourci="E" type_noeud="element"/>
3552 <MENU_INSERTION nom="EQUATEX" raccourci="T" type_noeud="element"/>
3653 <MENU_INSERTION nom="CODE" type_noeud="element"/>
7087 <VALEUR_SUGGEREE>complement</VALEUR_SUGGEREE>
7188 <VALEUR_SUGGEREE>methode</VALEUR_SUGGEREE>
7289 <VALEUR_SUGGEREE>activite</VALEUR_SUGGEREE>
73 <VALEUR_SUGGEREE>exercice</VALEUR_SUGGEREE>
7490 <VALEUR_SUGGEREE>bibliographie</VALEUR_SUGGEREE>
7591 <VALEUR_SUGGEREE>autre</VALEUR_SUGGEREE>
7692 </AFFICHAGE_ATTRIBUT>
85101 <AFFICHAGE_ELEMENT element="LOGO" type="vide">
86102 <PARAMETRE nom="srcAtt" valeur="fichier"/>
87103 </AFFICHAGE_ELEMENT>
88 <AFFICHAGE_ELEMENT element="INTERFACE" type="typesimple"/>
104 <AFFICHAGE_ELEMENT element="INTERFACE" type="typesimple">
105 <VALEUR_SUGGEREE>bois</VALEUR_SUGGEREE>
106 <VALEUR_SUGGEREE>etoiles</VALEUR_SUGGEREE>
107 <VALEUR_SUGGEREE>marbre</VALEUR_SUGGEREE>
108 <VALEUR_SUGGEREE>parchemin</VALEUR_SUGGEREE>
109 <VALEUR_SUGGEREE>peinture</VALEUR_SUGGEREE>
110 </AFFICHAGE_ELEMENT>
89111 <AFFICHAGE_ELEMENT element="LANGUE" type="typesimple"/>
90112 <AFFICHAGE_ELEMENT element="TABLEAU" type="tabletexte">
91113 <PARAMETRE nom="trTag" valeur="TR"/>
121143 <AFFICHAGE_ELEMENT element="PARAM" type="vide">
122144 <PARAMETRE nom="titreAtt" valeur="nom"/>
123145 </AFFICHAGE_ELEMENT>
146
147 <AFFICHAGE_ELEMENT element="EXERCICE" type="zone">
148 <PARAMETRE nom="titreAtt" valeur="titre"/>
149 </AFFICHAGE_ELEMENT>
150 <AFFICHAGE_ELEMENT element="ENONCE" type="zone"/>
151 <AFFICHAGE_ELEMENT element="DIFFICULTE" type="typesimple"/>
152 <AFFICHAGE_ELEMENT element="TEMPS" type="typesimple"/>
153 <AFFICHAGE_ELEMENT element="QUESTION" type="zone"/>
154 <AFFICHAGE_ELEMENT element="AIDE" type="zone"/>
155 <AFFICHAGE_ELEMENT element="SOLUTION" type="zone"/>
156 <AFFICHAGE_ELEMENT element="POINTS" type="typesimple"/>
157 <AFFICHAGE_ELEMENT element="QCM" type="zone">
158 <PARAMETRE nom="titreAtt" valeur="titre"/>
159 </AFFICHAGE_ELEMENT>
160 <AFFICHAGE_ELEMENT element="QUESTIONQCM" type="zone"/><AFFICHAGE_ELEMENT element="ENONCEQCM" type="zone"/>
161 <AFFICHAGE_ELEMENT element="REPONSEQCM" type="zone"/>
162 <AFFICHAGE_ELEMENT element="TEXTEREP" type="zone"/>
163 <AFFICHAGE_ELEMENT element="COMMENTAIREREP" type="zone"/>
164
124165 <AFFICHAGE_ELEMENT element="LIENPAGE" type="string"/>
125166 <AFFICHAGE_ELEMENT element="LIENWEB" type="string"/>
126167 <AFFICHAGE_ELEMENT element="GLOSSAIRE" type="string">
127168 <PARAMETRE nom="titreAtt" valeur="mot"/>
169 </AFFICHAGE_ELEMENT>
170 <AFFICHAGE_ELEMENT element="SYMBOLE" type="symbole">
171 <PARAMETRE nom="srcAtt" valeur="nom"/>
128172 </AFFICHAGE_ELEMENT>
129173 <AFFICHAGE_ELEMENT element="EQUATION" type="plugin">
130174 <PARAMETRE nom="classe" valeur="xpages.JEEquationMemoire"/>
154198 </AFFICHAGE_NOEUDS>
155199
156200 <EXPORTS>
157 <EXPORT nom="HTML" sortie="HTML">
201 <EXPORT nom="Site public..." sortie="HTML">
158202 <FICHIER_XSL nom="XPAGES1.xsl">
159203 <PARAMETRE nom="jaxe-uri-xml" valeur="*"/>
160204 </FICHIER_XSL>
161205 <FICHIER_XSL nom="XPAGES2.xsl">
162206 <PARAMETRE nom="jaxe-fichier-xml" valeur="*"/>
163207 <PARAMETRE nom="jaxe-fichier-xsl" valeur="*"/>
208 <PARAMETRE nom="jaxe-fichier-destination" valeur="*"/>
209 <PARAMETRE nom="jaxe-uri-destination" valeur="*"/>
164210 </FICHIER_XSL>
165211 <FICHIER_XSL nom="XPAGES3.xsl">
166212 <PARAMETRE nom="jaxe-fichier-xml" valeur="*"/>
167213 <PARAMETRE nom="jaxe-fichier-xsl" valeur="*"/>
168214 <PARAMETRE nom="jaxe-uri-xml" valeur="*"/>
215 <PARAMETRE nom="jaxe-fichier-destination" valeur="*"/>
216 <PARAMETRE nom="jaxe-uri-destination" valeur="*"/>
169217 <PARAMETRE nom="affichage" valeur="web"/>
218 <PARAMETRE nom="sortie" valeur="public"/>
219 </FICHIER_XSL>
220 </EXPORT>
221 <EXPORT nom="Site de production..." sortie="HTML">
222 <FICHIER_XSL nom="XPAGES1.xsl">
223 <PARAMETRE nom="jaxe-uri-xml" valeur="*"/>
224 </FICHIER_XSL>
225 <FICHIER_XSL nom="XPAGES2.xsl">
226 <PARAMETRE nom="jaxe-fichier-xml" valeur="*"/>
227 <PARAMETRE nom="jaxe-fichier-xsl" valeur="*"/>
228 <PARAMETRE nom="jaxe-fichier-destination" valeur="*"/>
229 <PARAMETRE nom="jaxe-uri-destination" valeur="*"/>
230 </FICHIER_XSL>
231 <FICHIER_XSL nom="XPAGES3.xsl">
232 <PARAMETRE nom="jaxe-fichier-xml" valeur="*"/>
233 <PARAMETRE nom="jaxe-fichier-xsl" valeur="*"/>
234 <PARAMETRE nom="jaxe-uri-xml" valeur="*"/>
235 <PARAMETRE nom="jaxe-fichier-destination" valeur="*"/>
236 <PARAMETRE nom="jaxe-uri-destination" valeur="*"/>
237 <PARAMETRE nom="affichage" valeur="web"/>
238 <PARAMETRE nom="sortie" valeur="production"/>
170239 </FICHIER_XSL>
171240 </EXPORT>
172241 </EXPORTS>
195264 <STRINGS_MENU menu="Normal">
196265 <TITRE>Sans style</TITRE>
197266 </STRINGS_MENU>
267 <STRINGS_MENU menu="Plugins">
268 <TITRE>Plugins</TITRE>
269 </STRINGS_MENU>
198270
199271 <STRINGS_ELEMENT element="XPAGES">
200 <TITRE>Racine du document</TITRE>
272 <TITRE>Ensemble XPAGES</TITRE>
201273 <DOCUMENTATION>
202274 Un ensemble de pages qui se suivent, sur un sujet donné.
203275 </DOCUMENTATION>
344416 <TITRE_VALEUR valeur="complement">complément</TITRE_VALEUR>
345417 <TITRE_VALEUR valeur="methode">méthode</TITRE_VALEUR>
346418 <TITRE_VALEUR valeur="activite">activité</TITRE_VALEUR>
347 <TITRE_VALEUR valeur="exercice">exercice</TITRE_VALEUR>
348419 <TITRE_VALEUR valeur="bibliographie">bibliographie</TITRE_VALEUR>
349420 <TITRE_VALEUR valeur="autre">autre</TITRE_VALEUR>
350421 </STRINGS_ATTRIBUT>
442513 </DOCUMENTATION>
443514 </STRINGS_ELEMENT>
444515 <STRINGS_ELEMENT element="ITEM">
445 <TITRE>élément de liste</TITRE>
516 <TITRE>Elément de liste</TITRE>
446517 <DOCUMENTATION>
447518 Elément d'une liste
448519 </DOCUMENTATION>
606677 </STRINGS_ATTRIBUT>
607678 </STRINGS_ELEMENT>
608679
680 <STRINGS_ELEMENT element="EXERCICE">
681 <TITRE>Exercice</TITRE>
682 <DOCUMENTATION>
683 Exercice de type questions-réponses
684 </DOCUMENTATION>
685 <STRINGS_ATTRIBUT attribut="titre">
686 <TITRE>titre</TITRE>
687 </STRINGS_ATTRIBUT>
688 </STRINGS_ELEMENT>
689 <STRINGS_ELEMENT element="DIFFICULTE">
690 <TITRE>Difficulté</TITRE>
691 <DOCUMENTATION>
692 Indication du niveau de difficulté :
693 * : facile, ou application directe du cours
694 ** : moyen
695 *** : difficile
696 </DOCUMENTATION>
697 </STRINGS_ELEMENT>
698 <STRINGS_ELEMENT element="TEMPS">
699 <TITRE>Temps</TITRE>
700 <DOCUMENTATION>
701 Temps indicatif nécessaire pour résoudre l'exercice
702 </DOCUMENTATION>
703 </STRINGS_ELEMENT>
704 <STRINGS_ELEMENT element="QUESTION">
705 <TITRE>Question</TITRE>
706 <DOCUMENTATION>
707 Question d'un exercice, avec un énoncé, éventuellement des aides, une solution, et éventuellement des points.
708 </DOCUMENTATION>
709 </STRINGS_ELEMENT>
710 <STRINGS_ELEMENT element="ENONCE">
711 <TITRE>Enoncé</TITRE>
712 <DOCUMENTATION>
713 Enoncé d'un exercice ou d'une question
714 </DOCUMENTATION>
715 </STRINGS_ELEMENT>
716 <STRINGS_ELEMENT element="AIDE">
717 <TITRE>Aide</TITRE>
718 <DOCUMENTATION>
719 Aide d'un exercice
720 </DOCUMENTATION>
721 </STRINGS_ELEMENT>
722 <STRINGS_ELEMENT element="SOLUTION">
723 <TITRE>Solution</TITRE>
724 </STRINGS_ELEMENT>
725 <STRINGS_ELEMENT element="POINTS">
726 <TITRE>Points</TITRE>
727 <DOCUMENTATION>
728 Nombre de points gagnés si la réponse est correcte.
729 </DOCUMENTATION>
730 </STRINGS_ELEMENT>
731 <STRINGS_ELEMENT element="QCM">
732 <TITRE>QCM</TITRE>
733 <DOCUMENTATION>
734 Questionnaire à choix multiples, avec des commentaires affichés après le choix de l'utilisateur.
735 </DOCUMENTATION>
736 <STRINGS_ATTRIBUT attribut="titre">
737 <TITRE>titre</TITRE>
738 </STRINGS_ATTRIBUT>
739 </STRINGS_ELEMENT>
740 <STRINGS_ELEMENT element="QUESTIONQCM">
741 <TITRE>Question de QCM</TITRE>
742 <DOCUMENTATION>
743 Question d'un QCM, avec un énoncé, éventuellement des aides, et les réponses possibles.
744 </DOCUMENTATION>
745 </STRINGS_ELEMENT>
746 <STRINGS_ELEMENT element="ENONCEQCM">
747 <TITRE>Enoncé de question</TITRE>
748 <DOCUMENTATION>
749 Enoncé d'une question de QCM (texte court)
750 </DOCUMENTATION>
751 </STRINGS_ELEMENT>
752 <STRINGS_ELEMENT element="REPONSEQCM">
753 <TITRE>Réponse de QCM</TITRE>
754 <DOCUMENTATION>
755 Réponse possible à un QCM.
756 Contient le texte de la réponse et un commentaire à afficher si la réponse donnée est incorrecte.
757 L'attribut bonne indique si la réponse est bonne ou pas.
758 </DOCUMENTATION>
759 <STRINGS_ATTRIBUT attribut="bonne">
760 <TITRE>bonne</TITRE>
761 <TITRE_VALEUR valeur="non">non</TITRE_VALEUR>
762 <TITRE_VALEUR valeur="oui">oui</TITRE_VALEUR>
763 </STRINGS_ATTRIBUT>
764 </STRINGS_ELEMENT>
765 <STRINGS_ELEMENT element="TEXTEREP">
766 <TITRE>Texte de réponse</TITRE>
767 <DOCUMENTATION>
768 Texte de la réponse
769 </DOCUMENTATION>
770 </STRINGS_ELEMENT>
771 <STRINGS_ELEMENT element="COMMENTAIREREP">
772 <TITRE>Commentaire de réponse</TITRE>
773 <DOCUMENTATION>
774 Commentaire à afficher après le choix de l'utilisateur (en particulier si la réponse donnée est incorrecte).
775 </DOCUMENTATION>
776 </STRINGS_ELEMENT>
777
609778 <STRINGS_ELEMENT element="LIENPAGE">
610779 <TITRE>Lien vers page interne</TITRE>
611780 <DOCUMENTATION>
636805 <TITRE>url</TITRE>
637806 <DOCUMENTATION>
638807 Adresse de la page web. Doit commencer par "http://".
808 </DOCUMENTATION>
809 </STRINGS_ATTRIBUT>
810 </STRINGS_ELEMENT>
811 <STRINGS_ELEMENT element="LIENIMAGE">
812 <TITRE>Lien vers image</TITRE>
813 <DOCUMENTATION>
814 Lien vers un environnement d'image dans la même page.
815 Doit contenir du texte ou un fichier sur lequel sera placé le lien.
816 </DOCUMENTATION>
817 <STRINGS_ATTRIBUT attribut="url">
818 <TITRE>label</TITRE>
819 <DOCUMENTATION>
820 Label de l'environnement d'image (qui doit se trouver dans la même page).
639821 </DOCUMENTATION>
640822 </STRINGS_ATTRIBUT>
641823 </STRINGS_ELEMENT>
660842 </DOCUMENTATION>
661843 </STRINGS_ATTRIBUT>
662844 </STRINGS_ELEMENT>
845 <STRINGS_ELEMENT element="SYMBOLE">
846 <TITRE>Symbole</TITRE>
847 <DOCUMENTATION>
848 Lettre grecque ou petite image à incorporer dans le texte.
849 </DOCUMENTATION>
850 </STRINGS_ELEMENT>
663851 <STRINGS_ELEMENT element="EQUATION">
664852 <TITRE>Equation</TITRE>
665853 <DOCUMENTATION>
707895 </DOCUMENTATION>
708896 </STRINGS_ELEMENT>
709897 <STRINGS_ELEMENT element="NBSP">
710 <TITRE>espace insécable</TITRE>
898 <TITRE>Espace insécable</TITRE>
711899 <DOCUMENTATION>
712900 Espace insécable
713901 </DOCUMENTATION>
757945 <STRINGS_MENU menu="Normal">
758946 <TITRE>Normal</TITRE>
759947 </STRINGS_MENU>
948 <STRINGS_MENU menu="Plugins">
949 <TITRE>Plugins</TITRE>
950 </STRINGS_MENU>
760951
761952 <STRINGS_ELEMENT element="XPAGES">
762 <TITRE>Document root</TITRE>
953 <TITRE>XPAGES set</TITRE>
763954 <DOCUMENTATION>
764955 A set of pages on a given subject.
765956 </DOCUMENTATION>
9061097 <TITRE_VALEUR valeur="complement">additional_information</TITRE_VALEUR>
9071098 <TITRE_VALEUR valeur="methode">method</TITRE_VALEUR>
9081099 <TITRE_VALEUR valeur="activite">activity</TITRE_VALEUR>
909 <TITRE_VALEUR valeur="exercice">exercise</TITRE_VALEUR>
9101100 <TITRE_VALEUR valeur="bibliographie">bibliography</TITRE_VALEUR>
9111101 <TITRE_VALEUR valeur="autre">other</TITRE_VALEUR>
9121102 </STRINGS_ATTRIBUT>
11681358 </STRINGS_ATTRIBUT>
11691359 </STRINGS_ELEMENT>
11701360
1361 <STRINGS_ELEMENT element="EXERCICE">
1362 <TITRE>Exercise</TITRE>
1363 <DOCUMENTATION>
1364 Exercise with questions and answers
1365 </DOCUMENTATION>
1366 <STRINGS_ATTRIBUT attribut="titre">
1367 <TITRE>title</TITRE>
1368 </STRINGS_ATTRIBUT>
1369 </STRINGS_ELEMENT>
1370 <STRINGS_ELEMENT element="DIFFICULTE">
1371 <TITRE>Difficulty</TITRE>
1372 <DOCUMENTATION>
1373 gives an idea of the difficulty :
1374 * : easy, direct application of the lecture
1375 ** : medium
1376 *** : hard
1377 </DOCUMENTATION>
1378 </STRINGS_ELEMENT>
1379 <STRINGS_ELEMENT element="TEMPS">
1380 <TITRE>Time</TITRE>
1381 <DOCUMENTATION>
1382 Indicative time to solve the exercise
1383 </DOCUMENTATION>
1384 </STRINGS_ELEMENT>
1385 <STRINGS_ELEMENT element="QUESTION">
1386 <TITRE>Question</TITRE>
1387 <DOCUMENTATION>
1388 Exercise question, with the terms, optional helps, a solution, and optional points.
1389 </DOCUMENTATION>
1390 </STRINGS_ELEMENT>
1391 <STRINGS_ELEMENT element="ENONCE">
1392 <TITRE>Terms</TITRE>
1393 <DOCUMENTATION>
1394 Terms of an exercise or a question
1395 </DOCUMENTATION>
1396 </STRINGS_ELEMENT>
1397 <STRINGS_ELEMENT element="AIDE">
1398 <TITRE>Help</TITRE>
1399 <DOCUMENTATION>
1400 Help for a question
1401 </DOCUMENTATION>
1402 </STRINGS_ELEMENT>
1403 <STRINGS_ELEMENT element="SOLUTION">
1404 <TITRE>Solution</TITRE>
1405 </STRINGS_ELEMENT>
1406 <STRINGS_ELEMENT element="POINTS">
1407 <TITRE>Points</TITRE>
1408 <DOCUMENTATION>
1409 Awarded points if the answer is correct
1410 </DOCUMENTATION>
1411 </STRINGS_ELEMENT>
1412 <STRINGS_ELEMENT element="QCM">
1413 <TITRE>Quiz</TITRE>
1414 <DOCUMENTATION>
1415 Quiz with comments displayed depending on the user's answer
1416 </DOCUMENTATION>
1417 <STRINGS_ATTRIBUT attribut="titre">
1418 <TITRE>title</TITRE>
1419 </STRINGS_ATTRIBUT>
1420 </STRINGS_ELEMENT>
1421 <STRINGS_ELEMENT element="QUESTIONQCM">
1422 <TITRE>Quiz question</TITRE>
1423 <DOCUMENTATION>
1424 Quiz question, with the terms, optional helps, and possible answers.
1425 </DOCUMENTATION>
1426 </STRINGS_ELEMENT>
1427 <STRINGS_ELEMENT element="ENONCEQCM">
1428 <TITRE>Question terms</TITRE>
1429 <DOCUMENTATION>
1430 Quiz question terms (short text)
1431 </DOCUMENTATION>
1432 </STRINGS_ELEMENT>
1433 <STRINGS_ELEMENT element="REPONSEQCM">
1434 <TITRE>Quiz answer</TITRE>
1435 <DOCUMENTATION>
1436 Possible answer for a quiz. Contains the text of the answer and a comment to display after a choice. The "right" attribute tells if the answer is right or wrong.
1437 </DOCUMENTATION>
1438 <STRINGS_ATTRIBUT attribut="bonne">
1439 <TITRE>correct</TITRE>
1440 <TITRE_VALEUR valeur="non">no</TITRE_VALEUR>
1441 <TITRE_VALEUR valeur="oui">yes</TITRE_VALEUR>
1442 </STRINGS_ATTRIBUT>
1443 </STRINGS_ELEMENT>
1444 <STRINGS_ELEMENT element="TEXTEREP">
1445 <TITRE>Answer text</TITRE>
1446 </STRINGS_ELEMENT>
1447 <STRINGS_ELEMENT element="COMMENTAIREREP">
1448 <TITRE>Answer comment</TITRE>
1449 <DOCUMENTATION>
1450 Comment to display after a choice (especially if the answer in wrong).
1451 </DOCUMENTATION>
1452 </STRINGS_ELEMENT>
1453
11711454 <STRINGS_ELEMENT element="LIENPAGE">
11721455 <TITRE>Link to internal page</TITRE>
11731456 <DOCUMENTATION>
12011484 </DOCUMENTATION>
12021485 </STRINGS_ATTRIBUT>
12031486 </STRINGS_ELEMENT>
1487 <STRINGS_ELEMENT element="LIENIMAGE">
1488 <TITRE>Image link</TITRE>
1489 <DOCUMENTATION>
1490 Link to an image environnement in the same page.
1491 Must contain text or a file upon which the link will be displayed.
1492 </DOCUMENTATION>
1493 <STRINGS_ATTRIBUT attribut="url">
1494 <TITRE>label</TITRE>
1495 <DOCUMENTATION>
1496 Label for the image environnement (which must be in the same page).
1497 </DOCUMENTATION>
1498 </STRINGS_ATTRIBUT>
1499 </STRINGS_ELEMENT>
12041500 <STRINGS_ELEMENT element="GLOSSAIRE">
12051501 <TITRE>Glossary word</TITRE>
12061502 <DOCUMENTATION>
12201516 Reference word in the glossary, if different from the displayed word.
12211517 </DOCUMENTATION>
12221518 </STRINGS_ATTRIBUT>
1519 </STRINGS_ELEMENT>
1520 <STRINGS_ELEMENT element="SYMBOLE">
1521 <TITRE>Symbol</TITRE>
1522 <DOCUMENTATION>
1523 Greek letter or small image to insert in the text.
1524 </DOCUMENTATION>
12231525 </STRINGS_ELEMENT>
12241526 <STRINGS_ELEMENT element="EQUATION">
12251527 <TITRE>Equation</TITRE>
8585
8686 .zone_titre {
8787 margin-left: 220px;
88 margin-top: 1em;
88 margin-top: 1.5em;
8989 margin-bottom: 1em;
9090 text-align: center;
9191 }
9595 margin-right: auto;
9696 }
9797
98 .zone_titre h1 {
98 h1 {
9999 color: #753500;
100100 background-image: url(blanc_transparent.png);
101101 font-family : Arial, Helvetica, sans-serif;
157157 background-color: #F6F4B9;
158158 }
159159
160 .sommaire3 {
161 font-family : Arial, Helvetica, sans-serif;
162 text-decoration: none;
163 font-size: 100%;
164 color: #753500;
165 }
166
160167 .sommairepage {
161168 font-family : Arial, Helvetica, sans-serif;
162169 text-decoration: none;
165172 }
166173
167174 :hover.sommaire2 {
175 color: #D08570;
176 }
177 :hover.sommaire3 {
168178 color: #D08570;
169179 }
170180 :hover.sommairepage {
224234
225235 .zone_figure {
226236 float: right;
237 clear: right;
227238 width: 308px;
228239 margin-left: 10px;
229240 margin-bottom: 5px;
233244 padding: 3px;
234245 border: solid black 1px;
235246 background-color: #FFFFFF;
247 text-align: center;
236248 }
237249
238250 .cadre_figure_texte {
300312 zoom: 100%; /* pour eviter un bug de IE */
301313 }
302314
303 .exercice {
315 .exercice, .qcm {
304316 background-color: #FFFDF2;
305317 border: solid thin black;
306318 padding: 0em 0.7em 0.7em 0.7em;
437449 background-color: #F6F4B9;
438450 }
439451
452 a.lienimage {
453 font-size: 100%;
454 font-weight: bold;
455 text-decoration: none;
456 color: #006030;
457 }
458
459 div#imagettes {
460 text-align: right;
461 }
462
440463 img.icone_section {
441464 vertical-align: middle;
442465 margin-right: 5px;
443466 }
467
468 a.lienaide {
469 font-size: 75%;
470 font-family: Arial, Helvetica, sans-serif;
471 font-weight: bold;
472 color: #804020;
473 text-decoration: none ;
474 }
475
476 a.liensolution {
477 font-size: 75%;
478 font-family: Arial, Helvetica, sans-serif;
479 font-weight: bold;
480 color: #903000;
481 text-decoration: none ;
482 }
483
484 div.questionqcm
485 {
486 background-color: #FFF9E5;
487 padding: 5px;
488 margin-bottom: 0.5em;
489 }
490
491 span.reptexte
492 {
493 font-family: sans-serif;
494 font-size: 80%;
495 }
496
497 .commentaire {
498 font-weight: bold;
499 font-style: italic;
500 color: #FF0000;
501 }
9393
9494 .zone_titre {
9595 margin-left: 220px;
96 margin-top: 1em;
96 margin-top: 1.5em;
9797 margin-bottom: 1em;
9898 text-align: center;
9999 }
103103 margin-right: auto;
104104 }
105105
106 .zone_titre h1 {
106 h1 {
107107 color: #202020;
108108 background-image: url(blanc_transparent.png);
109109 font-family : Arial, Helvetica, sans-serif;
163163 background-color: #505050;
164164 }
165165
166 .sommaire3 {
167 font-family : Arial, Helvetica, sans-serif;
168 text-decoration: none;
169 font-size: 100%;
170 color: #E0E0E0;
171 }
172
166173 .sommairepage {
167174 font-family : Arial, Helvetica, sans-serif;
168175 text-decoration: none;
171178 }
172179
173180 :hover.sommaire2 {
181 color: #F6F4B9;
182 }
183 :hover.sommaire3 {
174184 color: #F6F4B9;
175185 }
176186 :hover.sommairepage {
230240
231241 .zone_figure {
232242 float: right;
243 clear: right;
233244 width: 308px;
234245 margin-left: 10px;
235246 margin-bottom: 5px;
239250 padding: 3px;
240251 border: solid black 1px;
241252 background-color: #FFFFFF;
253 text-align: center;
242254 }
243255
244256 .cadre_figure_texte {
306318 zoom: 100%; /* pour eviter un bug de IE */
307319 }
308320
309 .exercice {
321 .exercice, .qcm {
310322 background: #F5F5F5;
311323 border: solid thin black;
312324 padding: 0em 0.7em 0.7em 0.7em;
451463 background-color: #F6F4B9;
452464 }
453465
466 a.lienimage {
467 font-size: 100%;
468 font-weight: bold;
469 text-decoration: none;
470 color: #106030;
471 }
472
473 :hover.lienimage {
474 background-color: #F6F4B9;
475 }
476
477 div#imagettes {
478 text-align: right;
479 }
480
454481 img.icone_section {
455482 vertical-align: middle;
456483 margin-right: 5px;
457484 }
485
486 a.lienaide {
487 font-size: 75%;
488 font-family: Arial, Helvetica, sans-serif;
489 font-weight: bold;
490 color: #202020;
491 text-decoration: none ;
492 }
493
494 a.liensolution {
495 font-size: 75%;
496 font-family: Arial, Helvetica, sans-serif;
497 font-weight: bold;
498 color: #202020;
499 text-decoration: none ;
500 }
501
502 div.questionqcm
503 {
504 background-color: #E9E9E9;
505 padding: 5px;
506 margin-bottom: 0.5em;
507 }
508
509 span.reptexte
510 {
511 font-family: sans-serif;
512 font-size: 80%;
513 }
514
515 .commentaire {
516 font-weight: bold;
517 font-style: italic;
518 color: #FF0000;
519 }
9393
9494 .zone_titre {
9595 margin-left: 220px;
96 margin-top: 1em;
96 margin-top: 1.5em;
9797 margin-bottom: 1em;
9898 text-align: center;
9999 }
103103 margin-right: auto;
104104 }
105105
106 .zone_titre h1 {
106 h1 {
107107 color: #202020;
108108 background-image: url(blanc_transparent.png);
109109 font-family : Arial, Helvetica, sans-serif;
163163 background-color: #505050;
164164 }
165165
166 .sommaire3 {
167 font-family : Arial, Helvetica, sans-serif;
168 text-decoration: none;
169 font-size: 100%;
170 color: #E0E0E0;
171 }
172
166173 .sommairepage {
167174 font-family : Arial, Helvetica, sans-serif;
168175 text-decoration: none;
171178 }
172179
173180 :hover.sommaire2 {
181 color: #F6F4B9;
182 }
183 :hover.sommaire3 {
174184 color: #F6F4B9;
175185 }
176186 :hover.sommairepage {
229239
230240 .zone_figure {
231241 float: right;
242 clear: right;
232243 width: 308px;
233244 margin-left: 10px;
234245 margin-bottom: 5px;
238249 padding: 3px;
239250 border: solid black 1px;
240251 background-color: #FFFFFF;
252 text-align: center;
241253 }
242254
243255 .cadre_figure_texte {
305317 zoom: 100%; /* pour eviter un bug de IE */
306318 }
307319
308 .exercice {
320 .exercice, .qcm {
309321 background: #F5F5F5;
310322 border: solid thin black;
311323 padding: 0em 0.7em 0.7em 0.7em;
450462 background-color: #F6F4B9;
451463 }
452464
465 a.lienimage {
466 font-size: 100%;
467 font-weight: bold;
468 text-decoration: none;
469 color: #007755;
470 }
471
472 :hover.lienimage {
473 background-color: #F6F4B9;
474 }
475
476 div#imagettes {
477 text-align: right;
478 }
479
453480 img.icone_section {
454481 vertical-align: middle;
455482 margin-right: 5px;
456483 }
484
485 a.lienaide {
486 font-size: 75%;
487 font-family: Arial, Helvetica, sans-serif;
488 font-weight: bold;
489 color: #202020;
490 text-decoration: none ;
491 }
492
493 a.liensolution {
494 font-size: 75%;
495 font-family: Arial, Helvetica, sans-serif;
496 font-weight: bold;
497 color: #202020;
498 text-decoration: none ;
499 }
500
501 div.questionqcm
502 {
503 background-color: #E9E9E9;
504 padding: 5px;
505 margin-bottom: 0.5em;
506 }
507
508 span.reptexte
509 {
510 font-family: sans-serif;
511 font-size: 80%;
512 }
513
514 .commentaire {
515 font-weight: bold;
516 font-style: italic;
517 color: #FF0000;
518 }
8585
8686 .zone_titre {
8787 margin-left: 220px;
88 margin-top: 1em;
88 margin-top: 1.5em;
8989 margin-bottom: 1em;
9090 text-align: center;
9191 }
9595 margin-right: auto;
9696 }
9797
98 .zone_titre h1 {
98 h1 {
9999 color: #753500;
100100 background-image: url(blanc_transparent.png);
101101 font-family : Arial, Helvetica, sans-serif;
157157 background-color: #F6F4B9;
158158 }
159159
160 .sommaire3 {
161 font-family : Arial, Helvetica, sans-serif;
162 text-decoration: none;
163 font-size: 100%;
164 color: #753500;
165 }
166
160167 .sommairepage {
161168 font-family : Arial, Helvetica, sans-serif;
162169 text-decoration: none;
165172 }
166173
167174 :hover.sommaire2 {
175 color: #D08570;
176 }
177 :hover.sommaire3 {
168178 color: #D08570;
169179 }
170180 :hover.sommairepage {
224234
225235 .zone_figure {
226236 float: right;
237 clear: right;
227238 width: 308px;
228239 margin-left: 10px;
229240 margin-bottom: 5px;
233244 padding: 3px;
234245 border: solid black 1px;
235246 background-color: #FFFFFF;
247 text-align: center;
236248 }
237249
238250 .cadre_figure_texte {
300312 zoom: 100%; /* pour eviter un bug de IE */
301313 }
302314
303 .exercice {
315 .exercice, .qcm {
304316 background-color: #FFFDF2;
305317 border: solid thin black;
306318 padding: 0em 0.7em 0.7em 0.7em;
437449 background-color: #F6F4B9;
438450 }
439451
452 a.lienimage {
453 font-size: 100%;
454 font-weight: bold;
455 text-decoration: none;
456 color: #006030;
457 }
458
459 div#imagettes {
460 text-align: right;
461 }
462
440463 img.icone_section {
441464 vertical-align: middle;
442465 margin-right: 5px;
443466 }
467
468 a.lienaide {
469 font-size: 75%;
470 font-family: Arial, Helvetica, sans-serif;
471 font-weight: bold;
472 color: #804020;
473 text-decoration: none ;
474 }
475
476 a.liensolution {
477 font-size: 75%;
478 font-family: Arial, Helvetica, sans-serif;
479 font-weight: bold;
480 color: #903000;
481 text-decoration: none ;
482 }
483
484 div.questionqcm
485 {
486 background-color: #FFF9E5;
487 padding: 5px;
488 margin-bottom: 0.5em;
489 }
490
491 span.reptexte
492 {
493 font-family: sans-serif;
494 font-size: 80%;
495 }
496
497 .commentaire {
498 font-weight: bold;
499 font-style: italic;
500 color: #FF0000;
501 }
8585
8686 .zone_titre {
8787 margin-left: 220px;
88 margin-top: 1em;
88 margin-top: 1.5em;
8989 margin-bottom: 1em;
9090 text-align: center;
9191 }
9595 margin-right: auto;
9696 }
9797
98 .zone_titre h1 {
98 h1 {
9999 color: #001070;
100100 background-image: url(blanc_transparent.png);
101101 font-family : Arial, Helvetica, sans-serif;
158158 background-color: #F6F4B9;
159159 }
160160
161 .sommaire3 {
162 font-family : Arial, Helvetica, sans-serif;
163 text-decoration: none;
164 font-size: 100%;
165 color: #0000FF;
166 }
167
161168 .sommairepage {
162169 font-family : Arial, Helvetica, sans-serif;
163170 text-decoration: none;
166173 }
167174
168175 :hover.sommaire2 {
176 color: #7B7BFF;
177 }
178 :hover.sommaire3 {
169179 color: #7B7BFF;
170180 }
171181 :hover.sommairepage {
225235
226236 .zone_figure {
227237 float: right;
238 clear: right;
228239 width: 308px;
229240 margin-left: 10px;
230241 margin-bottom: 5px;
234245 padding: 3px;
235246 border: solid black 1px;
236247 background-color: #FFFFFF;
248 text-align: center;
237249 }
238250
239251 .cadre_figure_texte {
301313 zoom: 100%; /* pour eviter un bug de IE */
302314 }
303315
304 .exercice {
316 .exercice, .qcm {
305317 background: #F2F2FF;
306318 border: solid thin black;
307319 padding: 0em 0.7em 0.7em 0.7em;
439451 background-color: #F6F4B9;
440452 }
441453
454 a.lienimage {
455 font-size: 100%;
456 font-weight: bold;
457 text-decoration: none;
458 color: #007755;
459 }
460
461 div#imagettes {
462 text-align: right;
463 }
464
442465 img.icone_section {
443466 vertical-align: middle;
444467 margin-right: 5px;
445468 }
469
470 a.lienaide {
471 font-size: 75%;
472 font-family: Arial, Helvetica, sans-serif;
473 font-weight: bold;
474 color: #0065CD;
475 text-decoration: none;
476 }
477
478 a.liensolution {
479 font-size: 75%;
480 font-family: Arial, Helvetica, sans-serif;
481 font-weight: bold;
482 color: #0000FF;
483 text-decoration: none;
484 }
485
486 div.questionqcm
487 {
488 background-color: #F5F5FF;
489 padding: 5px;
490 margin-bottom: 0.5em;
491 }
492
493 span.reptexte
494 {
495 font-family: sans-serif;
496 font-size: 80%;
497 }
498
499 .commentaire {
500 font-weight: bold;
501 font-style: italic;
502 color: #FF0000;
503 }
1212 <message label=", et le nom du fichier est">, and the name of the file is</message>
1313 <message label="Page pour l_impression">Page for printing</message>
1414 <message label="page">page</message>
15 <message label="entrée du site">Home page</message>
15 <message label="Entrée du site">Home page</message>
1616 <message label="Sommaire">Summary</message>
1717 <message label="Glossaire">Glossary</message>
1818 <message label="Page précédente">Previous page</message>
2828 <message label="Erreur: plugin Flash absent ou désactivé ?">Error: Flash plugin not installed or enabled ?</message>
2929 <message label="Vous pouvez définir une page d_accueil du site en créant une page avec le label _index_.">You can create a site home page by creating a page with the &apos;index&apos; label.</message>
3030 <message label="Impossible de créer un fichier avec le processeur XSLT de">Could not create a file with the following XSLT processor:</message>
31 <message label="Exercice">Exercise</message>
32 <message label="Difficulté :">Difficulty :</message>
33 <message label="Temps :">Time :</message>
34 <message label="Question">Question</message>
35 <message label="Aide">Help</message>
36 <message label="Solution">Solution</message>
37 <message label="points">points</message>
38 <message label="QCM">Quiz</message>
39 <message label="juste">right</message>
40 <message label="faux">wrong</message>
41 <message label="Fermer">Close</message>
42 <message label="Liste des liens non résolus">List of unresolved links</message>
43 <message label="Mots du glossaire non définis">Undefined glossary words</message>
44 <message label="Mots du glossaire définis plus d_une fois">Glossary words defined more than once</message>
45 <message label="de la même contribution">in the same contribution</message>
46 <message label="contribution">contribution</message>
47 <message label="(il y a plus d_une contribution avec ce label)">(there is more than one contribution with this label)</message>
48 <message label="Lien vers l_image">Link to the image</message>
49 <message label="à la page">at page</message>
50 <message label="utilisé page">used page</message>
51 <message label="Labels utilisés">Used labels</message>
52 <message label="Erreurs">Errors</message>
53 <message label="Contributions">Contributions</message>
54 <message label="Pages">Pages</message>
55 <message label="Index">Index</message>
56 <message label="sans label">wihtout label</message>
57 <message label="Un lien utilisant un label avec un doublon ne fonctionnera pas, et apparaîtra sur la page des">A link using a label with a duplicated will not work, and will appear on the page of the</message>
58 <message label="mauvais liens">broken links</message>
59 <message label="Doublons d_ensembles XPAGES">XPAGES set duplicates</message>
60 <message label="lien vers le premier avec ce label">link to the first with this label</message>
61 <message label="Doublons de pages">Pages duplicates</message>
62 <message label="lien vers la première avec ce label">link to the first with this label</message>
63 <message label="Labels invalides">Invalid labels</message>
64 <message label="Commentaires des auteurs">Author comments</message>
65 <message label="Liste des images et des crédits, triée par crédit">List of images and copyrights, sorted by copyright</message>
66 <message label="Crédit">Copyright</message>
67 <message label="Image">Image</message>
68 <message label="Titre">Title</message>
69 <message label="Nom fichier">File name</message>
70 <message label="Légende">Legend</message>
71 <message label="animation">animation</message>
3172 </messages>
1212 <message label=", et le nom du fichier est">, et le nom du fichier est</message>
1313 <message label="Page pour l_impression">Page pour l&apos;impression</message>
1414 <message label="page">page</message>
15 <message label="entrée du site">entrée du site</message>
15 <message label="Entrée du site">Entrée du site</message>
1616 <message label="Sommaire">Sommaire</message>
1717 <message label="Glossaire">Glossaire</message>
1818 <message label="Page précédente">Page précédente</message>
2828 <message label="Erreur: plugin Flash absent ou désactivé ?">Erreur: plugin Flash absent ou désactivé ?</message>
2929 <message label="Vous pouvez définir une page d_accueil du site en créant une page avec le label _index_.">Vous pouvez définir une page d&apos;accueil du site en créant une page avec le label &apos;index&apos;.</message>
3030 <message label="Impossible de créer un fichier avec le processeur XSLT de">Impossible de créer un fichier avec le processeur XSLT de</message>
31 <message label="Exercice">Exercice</message>
32 <message label="Difficulté :">Difficulté :</message>
33 <message label="Temps :">Temps :</message>
34 <message label="Question">Question</message>
35 <message label="Aide">Aide</message>
36 <message label="Solution">Solution</message>
37 <message label="points">points</message>
38 <message label="QCM">QCM</message>
39 <message label="juste">juste</message>
40 <message label="faux">faux</message>
41 <message label="Fermer">Fermer</message>
42 <message label="Liste des liens non résolus">Liste des liens non résolus</message>
43 <message label="Mots du glossaire non définis">Mots du glossaire non définis</message>
44 <message label="Mots du glossaire définis plus d_une fois">Mots du glossaire définis plus d&apos;une fois</message>
45 <message label="de la même contribution">de la même contribution</message>
46 <message label="contribution">contribution</message>
47 <message label="(il y a plus d_une contribution avec ce label)">(il y a plus d&apos;une contribution avec ce label)</message>
48 <message label="Lien vers l_image">Lien vers l&apos;image</message>
49 <message label="à la page">à la page</message>
50 <message label="utilisé page">utilisé page</message>
51 <message label="Labels utilisés">Labels utilisés</message>
52 <message label="Erreurs">Erreurs</message>
53 <message label="Contributions">Contributions</message>
54 <message label="Pages">Pages</message>
55 <message label="Index">Index</message>
56 <message label="sans label">sans label</message>
57 <message label="Un lien utilisant un label avec un doublon ne fonctionnera pas, et apparaîtra sur la page des">Un lien utilisant un label avec un doublon ne fonctionnera pas, et apparaîtra sur la page des</message>
58 <message label="mauvais liens">mauvais liens</message>
59 <message label="Doublons d_ensembles XPAGES">Doublons d&apos;ensembles XPAGES</message>
60 <message label="lien vers le premier avec ce label">lien vers le premier avec ce label</message>
61 <message label="Doublons de pages">Doublons de pages</message>
62 <message label="lien vers la première avec ce label">lien vers la première avec ce label</message>
63 <message label="Labels invalides">Labels invalides</message>
64 <message label="Commentaires des auteurs">Commentaires des auteurs</message>
65 <message label="Liste des images et des crédits, triée par crédit">Liste des images et des crédits, triée par crédit</message>
66 <message label="Crédit">Crédit</message>
67 <message label="Image">Image</message>
68 <message label="Titre">Titre</message>
69 <message label="Nom fichier">Nom fichier</message>
70 <message label="Légende">Légende</message>
71 <message label="animation">animation</message>
3172 </messages>
Binary diff not shown
4343 public ActionFonction(final JaxeDocument doc, final String titre, final String classe, final Element fctdef) {
4444 super(titre);
4545 this.doc = doc;
46 Class c;
46 Class<?> c;
4747 try {
4848 c = Class.forName(classe, true, JEFactory.getPluginClassLoader());
4949 } catch (final Exception ex) {
139139 l.fill = GridBagConstraints.HORIZONTAL;
140140 l.weighty = 0;
141141 l.insets = new Insets(0, 0, 0, 5);
142
143 final ArrayList<Element> attrlist = _doc.cfg.listeAttributs(ref);
142
143 final Config conf = _doc.cfg.getRefConf(ref);
144 final ArrayList<Element> attrlist = conf.listeAttributs(ref);
144145 for (final Element att : attrlist) {
145 final String st = _doc.cfg.nomAttribut(att);
146 final String title = _doc.cfg.titreAttribut(ref, att);
147 final String ns = _doc.cfg.espaceAttribut(att);
146 final String st = conf.nomAttribut(att);
147 final String title = conf.titreAttribut(ref, att);
148 final String ns = conf.espaceAttribut(att);
148149 String elval = el.getAttribute(st);
149150
150 String documentation = _doc.cfg.documentationAttribut(ref, att);
151 String documentation = conf.documentationAttribut(ref, att);
151152 if (documentation != null) {
152153 final JButton baide = new JButton(new ActionAide(att, ref));
153154 baide.setFont(baide.getFont().deriveFont((float)9));
169170 }
170171
171172 final JLabel label = new JLabel(title);
172 if (_doc.cfg.estObligatoire(att))
173 if (conf.estObligatoire(att))
173174 label.setForeground(new Color(150, 0, 0)); // rouge foncé
174175 else
175176 label.setForeground(new Color(0, 100, 0)); // vert foncé
176177
177178 attribPanel.add(label, l);
178179
179 final ArrayList<String> lval = _doc.cfg.listeValeursAttribut(att);
180 final String defaut = _doc.cfg.valeurParDefaut(att);
180 final ArrayList<String> lval = conf.listeValeursAttribut(att);
181 final String defaut = conf.valeurParDefaut(att);
181182 if ("".equals(elval) && defaut != null && el.getAttributeNode(st) == null)
182183 elval = defaut;
183184 if (lval != null) {
184185 final ElementComboBox popup = new ElementComboBox(el, st, ns);
185 if (!_doc.cfg.estObligatoire(att))
186 if (!conf.estObligatoire(att))
186187 popup.addValue("", "");
187188 for (final String sval : lval)
188 popup.addValue(sval, _doc.cfg.titreValeurAttribut(ref, att, sval));
189 popup.addValue(sval, conf.titreValeurAttribut(ref, att, sval));
189190 popup.setValue(elval);
190191 popup.startListener();
191192 attribPanel.add(popup, c);
192193 } else {
193 final ArrayList<String> lvs = _doc.cfg.listeValeursSuggereesAttribut(ref, att);
194 final ArrayList<String> lvs = conf.listeValeursSuggereesAttribut(ref, att);
194195 if (lvs != null && lvs.size() > 0) {
195196 final ElementComboBox popup = new ElementComboBox(el, st, ns);
196197 popup.setEditable(true);
197 if (!_doc.cfg.estObligatoire(att))
198 if (!conf.estObligatoire(att))
198199 popup.addValue("", "");
199200 for (final String sval : lvs)
200 popup.addValue(sval, _doc.cfg.titreValeurAttribut(ref, att, sval));
201 popup.addValue(sval, conf.titreValeurAttribut(ref, att, sval));
201202 popup.setValue(elval);
202203 popup.startListener();
203204 attribPanel.add(popup, c);
382382 d.width += fleche;
383383 final FontMetrics fm = getFontMetrics(police);
384384 d.width += fm.stringWidth(texte);
385 if (attributsVisibles && typeBalise != FIN) {
385 if (attributsVisibles && typeBalise != FIN && je.refElement != null) {
386386 final NamedNodeMap listeAttributs = je.noeud.getAttributes();
387 final ArrayList<Element> latt;
388387 final Config cfg = je.doc.cfg;
389 if (je.refElement != null)
390 latt = cfg.listeAttributs(je.refElement);
391 else
392 latt = null;
393 for (int i=0; i<listeAttributs.getLength(); i++) {
394 final Attr att = (Attr)listeAttributs.item(i);
395 String titreAtt = att.getName();
396 String titreVal = att.getValue();
397 if (latt != null) {
398 final String nomAtt = att.getName();
399 for (Element refatt : latt)
400 if (nomAtt.equals(cfg.nomAttribut(refatt))) {
401 titreAtt = cfg.titreAttribut(je.refElement, refatt);
402 titreVal = cfg.titreValeurAttribut(je.refElement, refatt, att.getValue());
403 break;
404 }
388 final ArrayList<Element> latt = cfg.listeAttributs(je.refElement);
389 for (Element refatt : latt) {
390 final Node natt = listeAttributs.getNamedItemNS(cfg.espaceAttribut(refatt),
391 cfg.nomAttribut(refatt));
392 if (natt != null) {
393 String titreAtt = natt.getNodeName();
394 String titreVal = natt.getNodeValue();
395 titreAtt = cfg.titreAttribut(je.refElement, refatt);
396 titreVal = cfg.titreValeurAttribut(je.refElement, refatt, titreVal);
397 d.width += fm.stringWidth(" " + titreAtt + "=" + titreVal);
405398 }
406 d.width += fm.stringWidth(" " + titreAtt + "=" + titreVal);
407399 }
408400 }
409401 if (je.doc.textPane.iconeValide)
555547 px += fm.stringWidth(texteAffiche);
556548
557549 // attributs
558 if (attributsVisibles && typeBalise != FIN) {
550 if (attributsVisibles && typeBalise != FIN && je.refElement != null) {
559551 int pxmax = dim.width - bords.right - 1;
560552 if (je.doc.textPane.iconeValide)
561553 pxmax -= 20;
565557 final Color vertFonce = new Color(0, 70, 0);
566558 final Color bleuFonce = new Color(0, 0, 150);
567559 final NamedNodeMap listeAttributs = je.noeud.getAttributes();
568 final ArrayList<Element> latt;
569 if (je.refElement != null)
570 latt = je.doc.cfg.listeAttributs(je.refElement);
571 else
572 latt = null;
573 for (int i=0; i<listeAttributs.getLength(); i++) {
574 px += fm.stringWidth(" ");
575 final Attr att = (Attr)listeAttributs.item(i);
576 String titreAtt = att.getName();
577 String titreVal = att.getValue();
578 if (latt != null) {
579 final String nomAtt = att.getName();
580 for (Element refatt : latt)
581 if (nomAtt.equals(je.doc.cfg.nomAttribut(refatt))) {
582 titreAtt = je.doc.cfg.titreAttribut(je.refElement, refatt);
583 titreVal = je.doc.cfg.titreValeurAttribut(je.refElement, refatt, att.getValue());
584 break;
585 }
560 final ArrayList<Element> latt = je.doc.cfg.listeAttributs(je.refElement);
561 for (Element refatt : latt) {
562 final Node natt = listeAttributs.getNamedItemNS(je.doc.cfg.espaceAttribut(refatt),
563 je.doc.cfg.nomAttribut(refatt));
564 if (natt != null) {
565 px += fm.stringWidth(" ");
566 String titreAtt = je.doc.cfg.titreAttribut(je.refElement, refatt);
567 String titreVal = je.doc.cfg.titreValeurAttribut(je.refElement, refatt, natt.getNodeValue());
568 final String texteAtt = titreAtt + "=" + titreVal;
569 if (px + fm.stringWidth(texteAtt) > pxmax) {
570 g.drawString("...", px, py);
571 px += fm.stringWidth("...");
572 break;
573 }
574 g.setColor(bleuFonce);
575 g.drawString(titreAtt, px, py);
576 px += fm.stringWidth(titreAtt);
577 g.setColor(Color.black);
578 g.drawString("=", px, py);
579 px += fm.stringWidth("=");
580 g.setColor(vertFonce);
581 g.drawString(titreVal, px, py);
582 px += fm.stringWidth(titreVal);
586583 }
587 final String texteAtt = titreAtt + "=" + titreVal;
588 if (px + fm.stringWidth(texteAtt) > pxmax) {
589 g.drawString("...", px, py);
590 px += fm.stringWidth("...");
591 break;
592 }
593 g.setColor(bleuFonce);
594 g.drawString(titreAtt, px, py);
595 px += fm.stringWidth(titreAtt);
596 g.setColor(Color.black);
597 g.drawString("=", px, py);
598 px += fm.stringWidth("=");
599 g.setColor(vertFonce);
600 g.drawString(titreVal, px, py);
601 px += fm.stringWidth(titreVal);
602584 }
603585 }
604586 g.setFont(tmpFont);
139139 * @param lireSchema faire un chargement en mémoire du schéma (false uniquement pour chercher une Config
140140 * en fonction de la racine d'un document)
141141 */
142 public Config(final String nomFichierCfg, final boolean lireSchema) {
143 super();
142 public Config(final String nomFichierCfg, final boolean lireSchema) throws JaxeException {
144143 try {
145144 initialisation(new File(nomFichierCfg).toURI().toURL(), lireSchema);
146145 } catch (final MalformedURLException ex) {
147146 LOG.error("Config("+nomFichierCfg+","+lireSchema+") : MalformedURLException: " + ex.getMessage(), ex);
147 throw new JaxeException("Erreur à la construction de l'URL pour " + nomFichierCfg, ex);
148148 }
149149 }
150150
155155 * @param lireSchema faire un chargement en mémoire du schéma (false uniquement pour chercher une Config
156156 * en fonction de la racine d'un document)
157157 */
158 public Config(final URL urlFichierCfg, final boolean lireSchema) {
159 super();
158 public Config(final URL urlFichierCfg, final boolean lireSchema) throws JaxeException {
160159 initialisation(urlFichierCfg, lireSchema);
161160 }
162161
163 private void initialisation(final URL urlFichierCfg, final boolean lireSchema) {
162 private void initialisation(final URL urlFichierCfg, final boolean lireSchema) throws JaxeException {
164163 if (urlFichierCfg == null) {
165164 jaxecfg = null;
166165 return;
176175 final DocumentBuilder parser = DocumentBuilderFactory.newInstance().newDocumentBuilder();
177176 final String furl = urlFichierCfg.toExternalForm();
178177 configdoc = parser.parse(furl);
179 } catch (final Exception e) {
180 LOG.error("initialisation: lecture de " + urlFichierCfg.toExternalForm(), e);
181 return;
178 } catch (final Exception ex) {
179 LOG.error("Config: initialisation: lecture de " + urlFichierCfg.toExternalForm(), ex);
180 throw new JaxeException("Erreur à la lecture de " + urlFichierCfg.toExternalForm(), ex);
182181 }
183182
184183 final String resource;
191190
192191 configdoc = transformationConfig(configdoc);
193192 if (configdoc == null) {
194 LOG.error("initialisation: erreur à la transformation du fichier de config");
195 return;
193 LOG.error("Config: initialisation: erreur à la transformation du fichier de config " + urlFichierCfg.toExternalForm());
194 throw new JaxeException("Erreur à la transformation du fichier de config " + urlFichierCfg.getFile());
196195 }
197196
198197 jaxecfg = configdoc.getDocumentElement();
207206 else
208207 urlAutreConfig = new URL(cfgdir.toExternalForm() + "/" + elconfig.getAttribute("nom"));
209208 } catch (final MalformedURLException ex) {
210 LOG.error("initialisation : MalformedURLException: " + ex.getMessage(), ex);
209 LOG.error("Config: initialisation: MalformedURLException: " + ex.getMessage(), ex);
211210 urlAutreConfig = null;
212211 }
213 final Config autreConfig = new Config(urlAutreConfig, true);
214 autresConfigs.add(autreConfig);
212 try {
213 final Config autreConfig = new Config(urlAutreConfig, true);
214 autresConfigs.add(autreConfig);
215 } catch (JaxeException ex) {
216 }
215217 elconfig = nextElement(elconfig, "AUTRE_CONFIG");
216218 }
217219
236238 if (noms == null) {
237239 final Element schema_simple = findElement(getLangage(), "SCHEMA_SIMPLE");
238240 if (schema_simple == null) {
239 LOG.error("Erreur : aucun schéma n'est défini dans le fichier de config " + urlFichierCfg);
240 return;
241 LOG.error("Config: initialisation: Aucun schéma XML n'est défini dans le fichier de config " + urlFichierCfg.toExternalForm());
242 throw new JaxeException("Erreur : aucun schéma XML n'est défini dans le fichier de config " + urlFichierCfg.getFile());
241243 }
242244 schema = new SchemaSimple(schema_simple, this);
243245 schemaURL = null;
251253 else
252254 schemaURL = new URL(noms);
253255 } catch (final MalformedURLException ex) {
254 System.err.println("MalformedURLException: " + ex.getMessage());
256 LOG.error("Config: initialisation: MalformedURLException: " + ex.getMessage());
255257 }
256258 if (noms.endsWith(".rng"))
257259 schema = new SchemaRelaxNG(schemaURL, this);
10231025 final String nom = fonction.getAttribute("nom");
10241026 final String titre = titreMenu(nom);
10251027 item = jmenu.add(new ActionFonction(doc, titre, classe, fonction));
1028 String itemdoc = documentationMenu(nom);
1029 if (itemdoc != null) {
1030 itemdoc = formatageDoc(itemdoc);
1031 item.setToolTipText(itemdoc);
1032 }
10261033 } else if ("MENU".equals(nodename)) {
10271034 item = creationMenu(doc, (Element)menunode);
10281035 jmenu.add(item);
11751182 if (espace == null)
11761183 return(null);
11771184 return(prefixeEspace(espace));
1185 }
1186
1187 /**
1188 * Renvoie la liste des valeurs possibles pour un élément, à partir de sa référence.
1189 * Renvoie null s'il y a un nombre infini de valeurs possibles.
1190 */
1191 public ArrayList<String> listeValeursElement(final Element refElement) {
1192 final ArrayList<String> liste = schema.listeValeursElement(refElement);
1193 return(liste);
11781194 }
11791195
11801196 /**
18261842 */
18271843 public ArrayList<String> listeValeursAttribut(final Element refAttribut) {
18281844 final ArrayList<String> liste = schema.listeValeursAttribut(refAttribut);
1829 if (liste == null)
1830 return(null);
18311845 return(liste);
18321846 }
18331847
291291 if (aideAttribut) {
292292 refElementsParents = new ArrayList<Element>();
293293 refElementsParents.add(refElementParent);
294 final String[] nomParent = new String[1];
295 nomParent[0] = cfg.nomElement(refElementParent);
296 listeParents.setListData(nomParent);
294 final String[] titreParent = new String[1];
295 titreParent[0] = cfg.titreElement(refElementParent);
296 listeParents.setListData(titreParent);
297297 } else {
298298 refElementsParents = cfg.listeElementsParents(refNoeud);
299299 final String[] titres = new String[refElementsParents.size()];
5050 JFrame jframe;
5151 JaxeDocument doc;
5252 ArrayList<Element> latt;
53 Config conf;
5354
5455 public DialogueAttributs(final JFrame jframe, final JaxeDocument doc, final String titre, final Element refElement, final Element el) {
5556 super(jframe, titre, true);
5758 this.doc = doc;
5859 this.refElement = refElement;
5960 this.el = el;
60 latt = doc.cfg.listeAttributs(refElement);
61 conf = doc.cfg.getRefConf(refElement);
62 latt = conf.listeAttributs(refElement);
6163 final int natt = latt.size();
6264 noms = new String[natt];
6365 final String[] titres = new String[natt];
6870 tbval = new JLabel[natt];
6971 for (int i=0; i<natt; i++) {
7072 final Element att = latt.get(i);
71 noms[i] = doc.cfg.nomAttribut(att);
72 titres[i] = doc.cfg.titreAttribut(refElement, att);
73 espaces[i] = doc.cfg.espaceAttribut(att);
74 documentation[i] = doc.cfg.documentationAttribut(refElement, att);
73 noms[i] = conf.nomAttribut(att);
74 titres[i] = conf.titreAttribut(refElement, att);
75 espaces[i] = conf.espaceAttribut(att);
76 documentation[i] = conf.documentationAttribut(refElement, att);
7577 if (documentation[i] != null) {
7678 avecdoc = true;
77 documentation[i] = doc.cfg.formatageDoc(documentation[i]);
79 documentation[i] = conf.formatageDoc(documentation[i]);
7880 }
7981 String elval = el.getAttribute(noms[i]);
80 defauts[i] = doc.cfg.valeurParDefaut(att);
82 defauts[i] = conf.valeurParDefaut(att);
8183 if ("".equals(elval) && defauts[i] != null && el.getAttributeNode(noms[i]) == null)
8284 elval = defauts[i];
83 final ArrayList<String> lval = doc.cfg.listeValeursAttribut(att);
85 final ArrayList<String> lval = conf.listeValeursAttribut(att);
8486 if (lval != null && lval.size() > 0) {
8587 final JComboBox popup = new JComboBox();
8688 champs[i] = popup;
8890 popup.addItem("");
8991 for (int j=0; j<lval.size(); j++) {
9092 final String sval = lval.get(j);
91 popup.addItem(doc.cfg.titreValeurAttribut(refElement, att, sval));
93 popup.addItem(conf.titreValeurAttribut(refElement, att, sval));
9294 if (sval.equals(elval)) {
9395 if (defauts[i] == null)
9496 popup.setSelectedIndex(j+1);
98100 }
99101 popup.addItemListener(this);
100102 } else {
101 final ArrayList<String> lvs = doc.cfg.listeValeursSuggereesAttribut(refElement, att);
103 final ArrayList<String> lvs = conf.listeValeursSuggereesAttribut(refElement, att);
102104 if (lvs != null && lvs.size() > 0) {
103105 final JComboBox popup = new JComboBox();
104106 popup.setEditable(true);
108110 int indexsel = -1;
109111 for (int j=0; j<lvs.size(); j++) {
110112 final String sval = lvs.get(j);
111 popup.addItem(doc.cfg.titreValeurAttribut(refElement, att, sval));
113 popup.addItem(conf.titreValeurAttribut(refElement, att, sval));
112114 if (sval.equals(elval)) {
113115 if (defauts[i] == null)
114116 indexsel = j+1;
134136 }
135137 }
136138 final boolean attvalide;
137 if ("".equals(elval) && !doc.cfg.estObligatoire(att))
139 if ("".equals(elval) && !conf.estObligatoire(att))
138140 attvalide = true;
139141 else
140 attvalide = doc.cfg.attributValide(att, elval);
142 attvalide = conf.attributValide(att, elval);
141143 final ImageIcon icone;
142144 if (attvalide)
143145 icone = iconeValide;
179181 for (int i=0; i<titres.length; i++) {
180182 final JLabel label = new JLabel(titres[i]);
181183 final Element att = latt.get(i);
182 if (doc.cfg.estObligatoire(att))
184 if (conf.estObligatoire(att))
183185 label.setForeground(new Color(150, 0, 0)); // rouge foncé
184186 else
185187 label.setForeground(new Color(0, 100, 0)); // vert foncé
349351 indexval = index - 1;
350352 else
351353 indexval = index;
352 final boolean attvalide = !(indexval < 0 && doc.cfg.estObligatoire(att));
354 final boolean attvalide = !(indexval < 0 && conf.estObligatoire(att));
353355 final ImageIcon icone;
354356 if (!attvalide)
355357 icone = iconeInvalide;
367369 final String valeur = ((JTextComponent)champs[i]).getText();
368370 final boolean attvalide;
369371 final Element att = latt.get(i);
370 if ("".equals(valeur) && !doc.cfg.estObligatoire(att))
372 if ("".equals(valeur) && !conf.estObligatoire(att))
371373 attvalide = true;
372374 else
373 attvalide = doc.cfg.attributValide(att, valeur);
375 attvalide = conf.attributValide(att, valeur);
374376 final ImageIcon icone;
375377 if (!attvalide) {
376378 icone = iconeInvalide;
405407 final String valeur;
406408 if (indexval >= 0) {
407409 final Element att = latt.get(i);
408 ArrayList<String> lval = doc.cfg.listeValeursAttribut(att);
410 ArrayList<String> lval = conf.listeValeursAttribut(att);
409411 if (lval == null || lval.size() == 0)
410 lval = doc.cfg.listeValeursSuggereesAttribut(refElement, att);
412 lval = conf.listeValeursSuggereesAttribut(refElement, att);
411413 valeur = lval.get(indexval);
412414 } else
413415 valeur = (String)combo.getSelectedItem();
442444 final String[] rep = lireReponses();
443445 for (int i=0; i<latt.size(); i++) {
444446 final Element att = latt.get(i);
445 if (doc.cfg.estObligatoire(att) && (rep[i] == null ||
447 if (conf.estObligatoire(att) && (rep[i] == null ||
446448 "".equals(rep[i]))) {
447449 getToolkit().beep();
448450 if (champs[i] instanceof JTextComponent)
483485 this.attref = attref;
484486 }
485487 public void actionPerformed(final ActionEvent e) {
486 JOptionPane.showMessageDialog(doc.jframe, doc.cfg.documentationAttribut(refElement, attref),
487 doc.cfg.titreAttribut(refElement, attref), JOptionPane.INFORMATION_MESSAGE);
488 String attdoc = conf.documentationAttribut(refElement, attref);
489 if (attdoc != null)
490 attdoc = conf.formatageDoc(attdoc);
491 JOptionPane.showMessageDialog(doc.jframe, attdoc,
492 conf.titreAttribut(refElement, attref), JOptionPane.INFORMATION_MESSAGE);
488493 }
489494 }
490495
+0
-135
source/jaxe/ErrorHandler.java less more
0 /*
1 Jaxe - Editeur XML en Java
2
3 Copyright (C) 2008 Observatoire de Paris-Meudon
4
5 Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2 de la licence, ou encore (à votre choix) toute version ultérieure.
6
7 Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence Publique Générale GNU .
8
9 Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.
10 */
11 package jaxe;
12
13 import java.awt.Toolkit;
14 import java.util.ArrayList;
15 import java.util.Iterator;
16
17 import javax.swing.JOptionPane;
18
19 import org.apache.log4j.Logger;
20 import org.w3c.dom.Element;
21
22 /**
23 * The Default ErrorHandler
24 * @author tasche
25 */
26 public class ErrorHandler implements ErrorHandlerIf {
27 /**
28 * Logger for this class
29 */
30 private static final Logger LOG = Logger.getLogger(ErrorHandler.class);
31
32 private final JaxeDocument doc;
33
34 /**
35 * @param document
36 */
37 public ErrorHandler(final JaxeDocument document) {
38 doc = document;
39 }
40
41 public void childNotAllowedInParentdef(final Element parentdef, final Element defbalise) {
42 final ArrayList<String> autorisees = doc.cfg.nomsSousElements(parentdef);
43 final StringBuilder infos = new StringBuilder();
44 infos.append(JaxeResourceBundle.getRB().getString("insertion.BalisesAutorisees"));
45 infos.append(" ");
46 infos.append(doc.cfg.nomElement(parentdef));
47 infos.append(":");
48 infos.append(Jaxe.newline);
49 final StringBuilder infos1 = new StringBuilder();
50 int nbnl = 0;
51 final Iterator<String> autIt = autorisees.iterator();
52 while (autIt.hasNext()) {
53 infos1.append(autIt.next());
54 if (autIt.hasNext()) {
55 infos1.append(", ");
56 }
57 if (nbnl < infos1.length()/80) {
58 infos1.append(Jaxe.newline);
59 nbnl++;
60 }
61 }
62 infos.append(infos1);
63 if (defbalise != null) {
64 infos.append(Jaxe.newline);
65 infos.append(Jaxe.newline);
66 infos.append(JaxeResourceBundle.getRB().getString("insertion.BalisesParents"));
67 infos.append(" ");
68 infos.append(doc.cfg.nomElement(defbalise));
69 infos.append(": ");
70 infos.append(Jaxe.newline);
71 final ArrayList<String> lparents = doc.cfg.nomsParents(defbalise);
72 final StringBuilder infos2 = new StringBuilder();
73 nbnl = 0;
74 final Iterator<String> parIt = lparents.iterator();
75 while (parIt.hasNext()) {
76 infos2.append(parIt.next());
77 if (parIt.hasNext()) {
78 infos2.append(", ");
79 }
80 if (nbnl < infos2.length()/80) {
81 infos2.append(Jaxe.newline);
82 nbnl++;
83 }
84 }
85 infos.append(infos2);
86 }
87 JOptionPane.showMessageDialog(doc.textPane.jframe, infos.toString(),
88 JaxeResourceBundle.getRB().getString("insertion.InsertionBalise"), JOptionPane.ERROR_MESSAGE);
89 }
90
91 public void childNotAllowed(final String expr, final JaxeElement parent, final Element defbalise) {
92 final StringBuilder infos = new StringBuilder();
93 infos.append(JaxeResourceBundle.getRB().getString("insertion.Expression"));
94 infos.append(" ");
95 infos.append(expr);
96
97 if (infos.length() > 90) {
98 int p=0;
99 for (int i=0; i<infos.length(); i++) {
100 if (i-p > 80 && (infos.charAt(i) == ' ' || infos.charAt(i) == '|')) {
101 infos.insert(i, "\n");
102 p = i;
103 }
104 }
105 }
106 JOptionPane.showMessageDialog(doc.textPane.jframe, infos.toString(),
107 JaxeResourceBundle.getRB().getString("insertion.InsertionBalise"), JOptionPane.ERROR_MESSAGE);
108 }
109
110 public void notInRootError(final Element defbalise) {
111 Toolkit.getDefaultToolkit().beep();
112 JOptionPane.showMessageDialog(doc.textPane.jframe,
113 JaxeResourceBundle.getRB().getString("insertion.SousRacine"),
114 JaxeResourceBundle.getRB().getString("insertion.InsertionBalise"),
115 JOptionPane.ERROR_MESSAGE);
116 }
117
118 public void editNotAllowed(final JaxeElement parent, final Element defbalise) {
119 Toolkit.getDefaultToolkit().beep();
120 JOptionPane.showMessageDialog(doc.textPane.jframe,
121 JaxeResourceBundle.getRB().getString("insertion.EditionInterdite") +
122 " " + parent.noeud.getNodeName(),
123 JaxeResourceBundle.getRB().getString("insertion.InsertionBalise"),
124 JOptionPane.ERROR_MESSAGE);
125 }
126
127 public void textNotAllowed(final JaxeElement element) {
128 final String infos = JaxeResourceBundle.getRB().getString("erreur.InsertionInterdite") + " " + element.noeud.getNodeName();
129 JOptionPane.showMessageDialog(doc.textPane.jframe, infos,
130 JaxeResourceBundle.getRB().getString("document.Insertion"), JOptionPane.ERROR_MESSAGE);
131
132 }
133
134 }
+0
-52
source/jaxe/ErrorHandlerIf.java less more
0 /*
1 * Created on 17.02.2004
2 */
3 package jaxe;
4
5 import org.w3c.dom.Element;
6
7 /**
8 * The Errorhandler shows the Errors to the Users.
9 * It can be overwritten to add better Errorhandling, like
10 * displaying Tips.
11 *
12 * @author tasche
13 *
14 * @deprecated Use InterfaceGestionErreurs instead
15 */
16 @Deprecated
17 public interface ErrorHandlerIf {
18 /**
19 * The User tried to add an Element before or after the Root-Element
20 * @param defbalise Element the User tried to add
21 */
22 public void notInRootError(Element defbalise);
23
24 /**
25 * The User tried to add an Element in an Node that is not editable
26 * @param parent This node was edited
27 * @param defbalise This node was not inserted
28 */
29 public void editNotAllowed(JaxeElement parent, Element defbalise);
30
31 /**
32 * A child was not inserted because it is not allowed in the parent-node
33 * @param parentdef Parent
34 * @param defbalise Child that should have been inserted
35 */
36 public void childNotAllowedInParentdef(Element parentdef, Element defbalise);
37
38 /**
39 * The childis not allowed in the Parent-Node
40 * @param expr Expr what is allowed in the Parent-Node
41 * @param parent The Parent
42 * @param defbalise The child that should have been inserted
43 */
44 public void childNotAllowed(String expr, JaxeElement parent, Element defbalise);
45
46 /**
47 * It is not allowed to insert Text into this Element
48 * @param element no Text allowed here
49 */
50 public void textNotAllowed(JaxeElement element);
51 }
+0
-45
source/jaxe/ErrorHandlerWrapper.java less more
0 /*
1 Jaxe - Editeur XML en Java
2
3 Copyright (C) 2008 Observatoire de Paris-Meudon
4
5 Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2 de la licence, ou encore (à votre choix) toute version ultérieure.
6
7 Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence Publique Générale GNU .
8
9 Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.
10 */
11 package jaxe;
12
13 import org.w3c.dom.Element;
14
15 public class ErrorHandlerWrapper implements InterfaceGestionErreurs {
16
17 private final ErrorHandlerIf _errorHandler;
18
19 public ErrorHandlerWrapper(final ErrorHandlerIf errorHandler) {
20 _errorHandler = errorHandler;
21 }
22
23 public void editionInterdite(final JaxeElement parent, final Element refElement) {
24 _errorHandler.editNotAllowed(parent, refElement);
25 }
26
27 public void enfantInterditSousParent(final JaxeElement parent, final Element refElement) {
28 _errorHandler.childNotAllowedInParentdef((Element) parent.noeud, refElement);
29 }
30
31 public void insertionImpossible(final String expr, final JaxeElement parent, final Element refElement) {
32 _errorHandler.childNotAllowed(expr, parent, refElement);
33 }
34
35 public void pasSousLaRacine(final Element refElement) {
36 _errorHandler.notInRootError(refElement);
37
38 }
39
40 public void texteInterdit(final JaxeElement parent) {
41 _errorHandler.textNotAllowed(parent);
42 }
43
44 }
7676 }
7777
7878 private void dialogueEnregistrement() {
79 if (System.getProperty("os.name").startsWith("Mac OS") && doc.jframe instanceof JaxeFrame) // pour éviter un bug avec FileDialog et cmd-v
80 ((JaxeFrame)doc.jframe).getJaxeMenuBar().setEnabled(false);
7981 FileDialog fd = new FileDialog(doc.jframe, null, FileDialog.SAVE);
8082 fd.setVisible(true);
83 if (System.getProperty("os.name").startsWith("Mac OS") && doc.jframe instanceof JaxeFrame)
84 ((JaxeFrame)doc.jframe).getJaxeMenuBar().setEnabled(true);
8185 final String sf = fd.getFile();
8286 if (sf != null) {
8387 File f = new File(fd.getDirectory(), sf);
98102 }
99103 }
100104
101 public File transformation(final File fichierFinal) {
105 public void transformation(final File fichierFinal) {
106 transformation(fichierFinal, null);
107 }
108
109 public void transformation(final File fichierFinal, final HTMLFrame htmlFrame) {
110 ThreadTransformation th = new ThreadTransformation(fichierFinal, htmlFrame);
111 th.start();
112 }
113
114 class ThreadTransformation extends Thread {
115 private File fichierFinal;
116 private HTMLFrame htmlFrame;
117 ThreadTransformation(final File fichierFinal, final HTMLFrame htmlFrame) {
118 this.fichierFinal = fichierFinal;
119 this.htmlFrame = htmlFrame;
120 }
121 @Override
122 public void run() {
123 transformation2(fichierFinal, htmlFrame);
124 }
125 }
126
127 private void transformation2(final File fichierFinal, final HTMLFrame htmlFrame) {
102128 org.w3c.dom.Document XMLdoc = doc.DOMdoc;
103129 File outFile = null;
104130 // les feuilles de styles sont utilisées les unes à la suite des autres
105131 final ArrayList<File> listeFichiers = doc.cfg.listeFichiersExport(refExport) ;
106 for (int i = 0; i < listeFichiers.size(); i++) {
107 final boolean dernierFichier = (i == listeFichiers.size() - 1);
108 final File xslFile = listeFichiers.get(i);
109 if (xslFile == null) {
110 JOptionPane.showMessageDialog(doc.jframe, JaxeResourceBundle.getRB().getString("erreur.XSLNonTrouve"),
111 JaxeResourceBundle.getRB().getString("erreur.Erreur"), JOptionPane.ERROR_MESSAGE);
112 return(outFile);
132 final DialogueAttente attente;
133 if (listeFichiers.size() > 1)
134 attente = new DialogueAttente(doc.jframe, doc.cfg.titreExport(refExport), 0, listeFichiers.size());
135 else
136 attente = new DialogueAttente(doc.jframe, doc.cfg.titreExport(refExport));
137 attente.setVisible(true);
138 try {
139 for (int i = 0; i < listeFichiers.size(); i++) {
140 final boolean dernierFichier = (i == listeFichiers.size() - 1);
141 final File xslFile = listeFichiers.get(i);
142 if (xslFile == null) {
143 JOptionPane.showMessageDialog(doc.jframe, JaxeResourceBundle.getRB().getString("erreur.XSLNonTrouve"),
144 JaxeResourceBundle.getRB().getString("erreur.Erreur"), JOptionPane.ERROR_MESSAGE);
145 return;
146 }
147 try {
148 // pour les classes dans le dossier des plugins, qui peuvent être utilisées comme extensions,
149 // on utilise le ClassLoader avec les plugins
150 if (Thread.currentThread().getContextClassLoader() != JEFactory.getPluginClassLoader())
151 Thread.currentThread().setContextClassLoader(JEFactory.getPluginClassLoader());
152
153 final TransformerFactory tFactory = TransformerFactory.newInstance() ;
154 tFactory.setErrorListener(new MyErrorListener());
155 final Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile)) ;
156 final Map<String, String> parametres = doc.cfg.getXSLParam(xslFile) ;
157 for (final Entry<String, String> parametre : parametres.entrySet()) {
158 if ("jaxe-fichier-xml".equals(parametre.getKey()))
159 transformer.setParameter("jaxe-fichier-xml", doc.fsave.getAbsolutePath());
160 else if ("jaxe-uri-xml".equals(parametre.getKey()))
161 transformer.setParameter("jaxe-uri-xml", doc.fsave.toURI().toASCIIString());
162 else if ("jaxe-fichier-xsl".equals(parametre.getKey()))
163 transformer.setParameter("jaxe-fichier-xsl", xslFile.getAbsolutePath());
164 else if ("jaxe-uri-xsl".equals(parametre.getKey()))
165 transformer.setParameter("jaxe-uri-xsl", xslFile.toURI().toASCIIString());
166 else if ("jaxe-fichier-destination".equals(parametre.getKey()))
167 transformer.setParameter("jaxe-fichier-destination", fichierFinal.getAbsolutePath());
168 else if ("jaxe-uri-destination".equals(parametre.getKey()))
169 transformer.setParameter("jaxe-uri-destination", fichierFinal.toURI().toASCIIString());
170 else
171 transformer.setParameter(parametre.getKey(),parametre.getValue()) ;
172 }
173 if (dernierFichier)
174 outFile = fichierFinal;
175 else {
176 outFile = java.io.File.createTempFile("tmp",".xml") ;
177 outFile.deleteOnExit() ;
178 }
179 final DOMSource ds = new DOMSource(XMLdoc);
180 if (doc.fsave != null)
181 ds.setSystemId(doc.fsave.toURI().toURL().toExternalForm());
182 final FileOutputStream fos = new FileOutputStream(outFile);
183 Result res;
184 if (dernierFichier && "PDF".equals(doc.cfg.sortieExport(refExport))) {
185 final Fop fop = FopFactory.newInstance().newFop(MimeConstants.MIME_PDF, fos);
186 res = new SAXResult(fop.getDefaultHandler());
187 } else
188 res = new StreamResult(fos);
189 transformer.transform(ds, res);
190 fos.close();
191 } catch (final Exception ex) {
192 afficherErreur(ex);
193 return;
194 }
195
196 if (!dernierFichier) {
197 try {
198 final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
199 dbf.setNamespaceAware(true);
200 final DocumentBuilder parser = dbf.newDocumentBuilder();
201 XMLdoc = parser.parse(outFile);
202 } catch (final Exception e) {
203 LOG.error("miseAJour()", e);
204 return;
205 }
206 }
207 if (listeFichiers.size() > 1)
208 attente.setProgress(i+1);
113209 }
114 try {
115 // pour les classes dans le dossier des plugins, qui peuvent être utilisées comme extensions,
116 // on utilise le ClassLoader avec les plugins
117 if (Thread.currentThread().getContextClassLoader() != JEFactory.getPluginClassLoader())
118 Thread.currentThread().setContextClassLoader(JEFactory.getPluginClassLoader());
119
120 final TransformerFactory tFactory = TransformerFactory.newInstance() ;
121 tFactory.setErrorListener(new MyErrorListener());
122 final Transformer transformer = tFactory.newTransformer(new StreamSource(xslFile)) ;
123 final Map<String, String> parametres = doc.cfg.getXSLParam(xslFile) ;
124 for (final Entry<String, String> parametre : parametres.entrySet()) {
125 if ("jaxe-fichier-xml".equals(parametre.getKey()))
126 transformer.setParameter("jaxe-fichier-xml", doc.fsave.getAbsolutePath());
127 else if ("jaxe-uri-xml".equals(parametre.getKey()))
128 transformer.setParameter("jaxe-uri-xml", doc.fsave.toURI().toASCIIString());
129 else if ("jaxe-fichier-xsl".equals(parametre.getKey()))
130 transformer.setParameter("jaxe-fichier-xsl", xslFile.getAbsolutePath());
131 else if ("jaxe-uri-xsl".equals(parametre.getKey()))
132 transformer.setParameter("jaxe-uri-xsl", xslFile.toURI().toASCIIString());
133 else
134 transformer.setParameter(parametre.getKey(),parametre.getValue()) ;
135 }
136 if (dernierFichier)
137 outFile = fichierFinal;
138 else {
139 outFile = java.io.File.createTempFile("tmp",".xml") ;
140 outFile.deleteOnExit() ;
141 }
142 final DOMSource ds = new DOMSource(XMLdoc);
143 if (doc.fsave != null)
144 ds.setSystemId(doc.fsave.toURI().toURL().toExternalForm());
145 final FileOutputStream fos = new FileOutputStream(outFile);
146 Result res;
147 if (dernierFichier && "PDF".equals(doc.cfg.sortieExport(refExport))) {
148 final Fop fop = FopFactory.newInstance().newFop(MimeConstants.MIME_PDF, fos);
149 res = new SAXResult(fop.getDefaultHandler());
150 } else
151 res = new StreamResult(fos);
152 transformer.transform(ds, res);
153 fos.close();
154 } catch (final Exception ex) {
155 afficherErreur(ex);
156 return(outFile);
157 }
158
159 if (!dernierFichier) {
160 try {
161 final DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
162 dbf.setNamespaceAware(true);
163 final DocumentBuilder parser = dbf.newDocumentBuilder();
164 XMLdoc = parser.parse(outFile);
165 } catch (final Exception e) {
166 LOG.error("miseAJour()", e);
167 return(outFile);
168 }
169 }
170 }
171 return(outFile);
210 } finally {
211 attente.setVisible(false);
212 if (htmlFrame != null)
213 htmlFrame.afficherHTML(outFile);
214 }
172215 }
173216
174217 private void afficherErreur(final Exception ex) {
142142 if (listeExportsHTML == null || listeExportsHTML.size() == 0)
143143 return;
144144 final Export exp = new Export(doc, listeExportsHTML.get(0));
145 final File outFile = exp.transformation(fichierHTML(doc.fsave));
146
145 exp.transformation(fichierHTML(doc.fsave), this); // appelle afficherHTML à la fin
146 }
147
148 public void afficherHTML(final File outFile) {
147149 try {
148150 affichage(); // pour refaire textPane, sinon update marche pas
149151 if (outFile != null) {
6868 * (sous forme de texte simple, ou de HTML 3 pour faire des sauts de lignes)
6969 */
7070 public String documentationElement(final Element refElement);
71
72 /**
73 * Renvoie la liste des valeurs possibles pour un élément, à partir de sa référence.
74 * Renvoie null s'il y a un nombre infini de valeurs possibles ou si l'élément n'a pas un type simple.
75 */
76 public ArrayList<String> listeValeursElement(final Element refElement);
7177
7278 /**
7379 * Renvoie la liste des espaces de noms (String) utilisés par ce schéma.
136136 if ("plugin".equals(typeAffichage)) {
137137 final String classid = doc.cfg.valeurParametreElement(refElement, typeNoeud, nom, "classe", null);
138138 try {
139 final Class c = Class.forName(classid, true, pluginClassLoader);
139 final Class<?> c = Class.forName(classid, true, pluginClassLoader);
140140 Constructor cons = null;
141141 try {
142142 cons = c.getConstructor(JaxeDocument.class);
118118 private final List<JaxeEditListenerIf> _editListener;
119119
120120 private boolean _ignorer = false;
121
122 private ErrorHandlerIf errorHandler;
123
121
122
124123 public JaxeDocument() {
125124 super();
126125 setDefaultStyle();
130129 public JaxeDocument(final String nomFichierCfg) {
131130 super();
132131 this.nomFichierCfg = nomFichierCfg;
133 if (nomFichierCfg != null) cfg = new Config(nomFichierCfg, true);
132 if (nomFichierCfg != null) {
133 try {
134 cfg = new Config(nomFichierCfg, true);
135 } catch (JaxeException ex) {
136 JOptionPane.showMessageDialog(jframe, ex.getMessage(),
137 rb.getString("erreur.Erreur"), JOptionPane.ERROR_MESSAGE);
138 cfg = null;
139 }
140 }
134141 setDefaultStyle();
135142 _editListener = new ArrayList<JaxeEditListenerIf>();
136143 }
147154 this.textPane = textPane;
148155 this.nomFichierCfg = nomFichierCfg;
149156 jframe = textPane.jframe;
150 if (nomFichierCfg != null) cfg = new Config(nomFichierCfg, true);
157 if (nomFichierCfg != null) {
158 try {
159 cfg = new Config(nomFichierCfg, true);
160 } catch (JaxeException ex) {
161 JOptionPane.showMessageDialog(jframe, ex.getMessage(),
162 rb.getString("erreur.Erreur"), JOptionPane.ERROR_MESSAGE);
163 cfg = null;
164 }
165 }
151166 setDefaultStyle();
152167 _editListener = new ArrayList<JaxeEditListenerIf>();
153 }
154
155 /**
156 * Sets the Errorhandler for this Document
157 *
158 * @param error
159 * Errorhandler
160 * @deprecated
161 */
162 public void setErrorHandler(final ErrorHandlerIf error) {
163 errorHandler = error;
164 gestionErreurs = new ErrorHandlerWrapper(error);
165 }
166
167 /**
168 * Returns the ErrorHandler for this Document
169 *
170 * @return ErrorHandler
171 * @deprecated
172 */
173 public ErrorHandlerIf getErrorHandler() {
174 return errorHandler;
175 // return(null);
176168 }
177169
178170 /**
396388
397389 if (urlFichierCfg != null) {
398390 nomFichierCfg = urlFichierCfg.getPath();
399 cfg = new Config(urlFichierCfg, true);
391 try {
392 cfg = new Config(urlFichierCfg, true);
393 } catch (JaxeException ex) {
394 JOptionPane.showMessageDialog(jframe, ex.getMessage(),
395 rb.getString("erreur.Erreur"), JOptionPane.ERROR_MESSAGE);
396 cfg = null;
397 }
400398 } else
401399 nomFichierCfg = null;
402400
403 if (urlFichierCfg == null)
401 if (urlFichierCfg == null || cfg == null)
404402 rootJE = new JEInconnu(this);
405403 else {
406404 final Element refracine = cfg.getElementRef(rootel);
626624 final URL cfgURL = cfgFile.toURI().toURL();
627625 final ArrayList<String> noms = Config.nomsElementsRacine(cfgURL);
628626 if (noms.contains(Config.localValue(rootel.getTagName()))) {
629 final Config cfgTest = new Config(cfgURL, true);
630 final String rootns = rootel.getNamespaceURI();
631 final String cfgns = cfgTest.espaceCible();
632 if ((rootns != null && rootns.equals(cfgns)) ||
633 (rootns == null && (cfgns == null || "".equals(cfgns)))) {
634 nomFichierCfg = cfgFile.getPath();
635 cfg = cfgTest;
636 break;
627 try {
628 final Config cfgTest = new Config(cfgURL, true);
629 final String rootns = rootel.getNamespaceURI();
630 final String cfgns = cfgTest.espaceCible();
631 if ((rootns != null && rootns.equals(cfgns)) ||
632 (rootns == null && (cfgns == null || "".equals(cfgns)))) {
633 nomFichierCfg = cfgFile.getPath();
634 cfg = cfgTest;
635 break;
636 }
637 } catch (JaxeException ex) {
637638 }
638639 }
639640 } catch (final MalformedURLException ex) {
0 /**
1 * (c) Lexis Nexis Deutschland, 2004
2 */
0 /*
1 Jaxe - Editeur XML en Java
2
3 Copyright (C) Lexis Nexis Deutschland, 2004
4
5 Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2 de la licence, ou encore (à votre choix) toute version ultérieure.
6
7 Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence Publique Générale GNU .
8
9 Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.
10 */
11
312 package jaxe;
413
514 import org.apache.log4j.Logger;
0 /**
1 * (c) Lexis Nexis Deutschland, 2004
2 */
0 /*
1 Jaxe - Editeur XML en Java
2
3 Copyright (C) Lexis Nexis Deutschland, 2004
4
5 Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2 de la licence, ou encore (à votre choix) toute version ultérieure.
6
7 Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence Publique Générale GNU .
8
9 Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.
10 */
11
312 package jaxe;
413
514 import javax.swing.text.Position;
7676
7777 public JaxeDocument doc;
7878
79 public ArrayList<Object> jcomps = new ArrayList<Object>(); // de JComponent ou Icon
80
81 public ArrayList<Position> compos = new ArrayList<Position>(); // de Position (positions des
79 public ArrayList<Object> jcomps = null; // de JComponent ou Icon
80
81 public ArrayList<Position> compos = null; // de Position (positions des
8282 // composants)
8383
8484 private boolean effacementAutorise = true;
169169 * plus du texte
170170 */
171171 public ArrayList<Object> getComponents() {
172 if (jcomps == null)
173 return(new ArrayList<Object>());
172174 return jcomps;
173175 }
174176
176178 * Renvoit la liste des positions dans le texte des composants graphiques
177179 */
178180 public ArrayList<Position> getComponentPositions() {
181 if (compos == null)
182 return(new ArrayList<Position>());
179183 return compos;
180184 }
181185
230234 StyleConstants.setComponent(s, comp);
231235 try {
232236 doc.insertString(pos.getOffset(), "*", s, false);
237 if (jcomps == null)
238 jcomps = new ArrayList<Object>(2);
233239 jcomps.add(comp);
240 if (compos == null)
241 compos = new ArrayList<Position>(2);
234242 compos.add(doc.createPosition(pos.getOffset() - 1));
235243 if (debut == null) debut = doc.createPosition(offsetdebut);
236244 fin = doc.createPosition(offsetdebut);
252260 StyleConstants.setIcon(s, icon);
253261 try {
254262 doc.insertString(pos.getOffset(), "*", s, false);
263 if (jcomps == null)
264 jcomps = new ArrayList<Object>(2);
255265 jcomps.add(icon);
266 if (compos == null)
267 compos = new ArrayList<Position>(2);
256268 compos.add(doc.createPosition(pos.getOffset() - 1));
257269 if (debut == null) debut = doc.createPosition(offsetdebut);
258270 fin = doc.createPosition(offsetdebut);
427439 je.effacer();
428440 }
429441 }
430 for (final Object o : jcomps) {
431 if (o instanceof JComponent && ((JComponent) o).getParent() != null) {
432 final JComponent comp = (JComponent) o;
433 comp.getParent().remove(comp);
434 }
435 }
436 jcomps = new ArrayList<Object>();
437 compos = new ArrayList<Position>();
442 if (jcomps != null) {
443 for (final Object o : jcomps) {
444 if (o instanceof JComponent && ((JComponent) o).getParent() != null) {
445 final JComponent comp = (JComponent) o;
446 comp.getParent().remove(comp);
447 }
448 }
449 jcomps = null;
450 }
451 compos = null;
438452 }
439453
440454 /**
726740 newje = oldje;
727741 newje.debut = null;
728742 newje.fin = null;
729 newje.jcomps = new ArrayList<Object>();
730 newje.compos = new ArrayList<Position>();
743 newje.jcomps = null;
744 newje.compos = null;
731745 } else
732746 newje = JEFactory.createJE(doc, elref, n.getNodeName(), typeNoeud, n);
733747 newje.creer(newpos, n);
782796 return result;
783797 }
784798
785 public boolean hasProcessing(final Node n) {
799 public static boolean hasProcessing(final Node n) {
786800 boolean result = false;
787801 final Node child = n.getFirstChild();
788802 if (child != null) {
795809 return result;
796810 }
797811
798 public ProcessingInstruction getProcessing(final Node n) {
812 public static ProcessingInstruction getProcessing(final Node n) {
799813 ProcessingInstruction result = null;
800814 final Node child = n.getFirstChild();
801815 if (child != null) {
10331047 * Sélection de la zone de texte où se trouve cet élément
10341048 */
10351049 public void selection(final boolean select) {
1036 for (final Object comp : jcomps) {
1037 if (comp instanceof Balise)
1038 ((Balise) comp).selection(select);
1050 if (jcomps != null) {
1051 for (final Object comp : jcomps) {
1052 if (comp instanceof Balise)
1053 ((Balise) comp).selection(select);
1054 }
10391055 }
10401056 for (Node n = noeud.getFirstChild(); n != null; n = n.getNextSibling()) {
10411057 final JaxeElement je = doc.getElementForNode(n);
10441060 }
10451061 }
10461062
1047 public boolean sameStyle(final JaxeElement source, final JaxeElement target) {
1063 public static boolean sameStyle(final JaxeElement source, final JaxeElement target) {
10481064 if (!(source instanceof JEStyle && target instanceof JEStyle))
10491065 return false;
10501066 final List<String> s1 = new ArrayList<String>();
12011217 }
12021218
12031219
1204 protected String getString(final String key) {
1205 return (JaxeResourceBundle.getRB().getString(key));
1220 protected static String getString(final String key) {
1221 return(JaxeResourceBundle.getRB().getString(key));
12061222 }
12071223
12081224 public void changerStyle(final String style, final int offset, final int longueur) {
12391255 }
12401256 }
12411257
1242 private Color obtenezCouleur(final String arg, Color result) {
1258 private static Color obtenezCouleur(final String arg, Color result) {
12431259 final Matcher m = COLOR_PATTERN.matcher(arg);
12441260 if (m.matches()) {
12451261 boolean error = false;
0 /*
1 Jaxe - Editeur XML en Java
2
3 Copyright (C) 2009 Observatoire de Paris-Meudon
4
5 Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2 de la licence, ou encore (à votre choix) toute version ultérieure.
6
7 Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence Publique Générale GNU .
8
9 Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.
10 */
11
12 package jaxe;
13
14 public class JaxeException extends Exception {
15
16 public JaxeException(final String message) {
17 super(message);
18 }
19
20 public JaxeException(final Exception ex) {
21 super(ex);
22 }
23
24 public JaxeException(final String message, final Exception ex) {
25 super(message, ex);
26 }
27
28 }
587587 }
588588
589589 public void enregistrerSous() {
590 if (System.getProperty("os.name").startsWith("Mac OS")) // pour éviter un bug avec FileDialog et cmd-v
591 menuBar.setEnabled(false);
590592 FileDialog fd = new FileDialog(this, null, FileDialog.SAVE);
591593 if (System.getProperty("os.name").indexOf("Linux") != -1 && JaxeMenuBar.dernierRepertoire != null)
592594 fd.setDirectory(JaxeMenuBar.dernierRepertoire);
593595 fd.setVisible(true);
596 if (System.getProperty("os.name").startsWith("Mac OS"))
597 menuBar.setEnabled(true);
594598 final String sf = fd.getFile();
595599 if (sf != null) {
596600 JaxeMenuBar.dernierRepertoire = fd.getDirectory();
774778 } else
775779 action.setEnabled(true);
776780 }
781 } else if (action instanceof ActionFonction) {
782 action.setEnabled(true);
783 anyenab = true;
777784 } else if (item instanceof JMenu)
778785 anyenab = majMenu((JMenu)item, parentconf, autorisees) || anyenab;
779786 }
425425 final ArrayList<Element> exportsPDF = doc.cfg.listeExports("PDF");
426426 if (exportsPDF != null)
427427 exports.addAll(exportsPDF);
428 final ArrayList<Element> exportsHTML = doc.cfg.listeExports("HTML");
429 if (exportsHTML != null && exportsHTML.size() > 1)
430 exports.addAll(exportsHTML);
428431 if (exports != null && exports.size() > 0) {
429432 int pos = 6;
430433 fileMenu.insertSeparator(pos++);
340340
341341 ActionAide(final Element refElement) {
342342 super(JaxeResourceBundle.getRB().getString("aide.element") + " "
343 + doc.cfg.nomElement(refElement));
343 + doc.cfg.titreElement(refElement));
344344 this.refElement = refElement;
345345 }
346346
513513 return;
514514 }
515515 // bidouille pour afficher la position en haut de la fenêtre
516 try {
517 doc.textPane.scrollRectToVisible(doc.textPane.modelToView(doc.getLength()));
518 final Rectangle rDebut = new Rectangle(ptDebut);
519 doc.textPane.scrollRectToVisible(rDebut);
520 } catch (final BadLocationException ex) {
521 LOG.error("JaxeTextPane.allerElement scrollRectToVisible", ex);
522 }
516 final Rectangle rDebut = new Rectangle(ptDebut);
517 rDebut.height = doc.textPane.getVisibleRect().height - 1;
518 doc.textPane.scrollRectToVisible(rDebut);
523519 }
524520
525521 public void debutIgnorerEdition() {
6464
6565 @Override
6666 public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
67 if (!(comp instanceof JaxeTextPane))
68 return(false);
6769 final JTextComponent c = (JTextComponent)comp;
6870 if (!(c.isEditable() && c.isEnabled()))
6971 return false;
177179 if (parent != null && (parent instanceof JETexte ||
178180 (parent.debut.getOffset() == pos && !(parent instanceof JESwing))))
179181 parent = parent.getParent();
180 if (frag != null && (parent == null || !(parent instanceof JECommentaire || parent instanceof JECData)))
181 return(tp.doc.coller(frag, ppos));
182 else if (reffichier != null && data instanceof Image && tp.doc.fsave != null)
182 if (frag != null && (parent == null || !(parent instanceof JECommentaire || parent instanceof JECData))) {
183 boolean effaceSelection = false;
184 if (tp.getSelectionStart() != tp.getSelectionEnd()) {
185 effaceSelection = true;
186 tp.debutEditionSpeciale(JaxeResourceBundle.getRB().getString("menus.Coller"), false);
187 tp.doc.remove(tp.getSelectionStart(), tp.getSelectionEnd() - tp.getSelectionStart());
188 }
189 final boolean accept = tp.doc.coller(frag, ppos);
190 if (effaceSelection) {
191 tp.finEditionSpeciale();
192 if (!accept)
193 tp.undo();
194 }
195 return(accept);
196 } else if (reffichier != null && data instanceof Image && tp.doc.fsave != null)
183197 JEFichier.collerImage((Image)data, tp.doc, ppos, reffichier);
184198 else if (reffichier != null &&
185199 flavor.getMimeType().startsWith("image/x-pict") &&
210210 développé dans le cadre du projet <i>Astrophysique sur Mesure</i><br><br> \
211211 avec la participation de contributeurs sur SourceForge<br><br> \
212212 Licence GPL <br><br> \
213 Version 3.2 <br><br> \
213 Version 3.3 <br><br> \
214214 <font size="-1"><tt>http://jaxe.sourceforge.net/Jaxe.html</tt></font></div></html>
215215
216216 # validation
210210 Entwickelt für das Projekt <i>Astrophysique sur Mesure</i><br><br> \
211211 mit der Hilfe von Unterstützern per SourceForge<br><br> \
212212 Licence GPL <br><br> \
213 Version 3.2 <br><br> \
213 Version 3.3 <br><br> \
214214 <font size="-1"><tt>http://jaxe.sourceforge.net/</tt></font></div></html>
215215
216216 # validation
210210 developed for the project <i>Astrophysique sur Mesure</i><br><br> \
211211 with the help of SourceForge contributors<br><br> \
212212 GPL Licence<br><br> \
213 Version 3.2 <br><br> \
213 Version 3.3 <br><br> \
214214 <font size="-1"><tt>http://jaxe.sourceforge.net/</tt></font></div></html>
215215
216216 # validation
205205 valeur = valor
206206
207207 # About dialog
208 apropos.texte = <html><div align\="center"> Jaxe - <b>Ja</b>va <b>X</b>ML <b>E</b>ditor<br><br> desarrolloado por el proyecto <i>Astrophysique sur Mesure</i><br><br> con la ayuda de SourceForge contributors<br><br> GPL Licence<br><br> Version 3.2 <br><br> <font size\="-1"><tt>http\://jaxe.sourceforge.net/</tt></font></div></html>
208 apropos.texte = <html><div align\="center"> \
209 Jaxe - <b>Ja</b>va <b>X</b>ML <b>E</b>ditor<br><br> \
210 desarrolloado por el proyecto <i>Astrophysique sur Mesure</i><br><br> \
211 con la ayuda de SourceForge contributors<br><br> \
212 GPL Licence<br><br> \
213 Version 3.3 <br><br> \
214 <font size\="-1"><tt>http\://jaxe.sourceforge.net/</tt></font></div></html>
209215
210216 # validation
211217 validation.Validation = Validación
210210 desenvolvido pelo projeto <i>Astrophysique sur Mesure</i><br><br> \
211211 com a ajuda dos contribuidores SourceForge <br><br> \
212212 Licença GPL<br><br> \
213 Versão 3.2 <br><br> \
213 Versão 3.3 <br><br> \
214214 <font size="-1"><tt>http://jaxe.sourceforge.net/</tt></font></div></html>
215215
216216 # validation
210210 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <i>Astrophysique sur Mesure</i><br><br> \
211211 \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u043f\u043e\u043c\u043e\u0449\u043d\u0438\u043a\u0430\u043c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 SourceForge <br><br> \
212212 \u041b\u0438\u0446\u0435\u043d\u0437\u0438\u044f GPL<br><br> \
213 Version 3.2 <br><br> \
213 Version 3.3 <br><br> \
214214 <font size="-1"><tt>http://jaxe.sourceforge.net/</tt></font></div></html>
215215
216216 # validation
0 /**
1 * (c) Lexis Nexis Deutschland, 2005
2 */
0 /*
1 Jaxe - Editeur XML en Java
2
3 Copyright (C) Lexis Nexis Deutschland, 2005
4
5 Ce programme est un logiciel libre ; vous pouvez le redistribuer et/ou le modifier conformément aux dispositions de la Licence Publique Générale GNU, telle que publiée par la Free Software Foundation ; version 2 de la licence, ou encore (à votre choix) toute version ultérieure.
6
7 Ce programme est distribué dans l'espoir qu'il sera utile, mais SANS AUCUNE GARANTIE ; sans même la garantie implicite de COMMERCIALISATION ou D'ADAPTATION A UN OBJET PARTICULIER. Pour plus de détail, voir la Licence Publique Générale GNU .
8
9 Vous devez avoir reçu un exemplaire de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation Inc., 675 Mass Ave, Cambridge, MA 02139, Etats-Unis.
10 */
11
312 package jaxe;
413
514 import org.apache.log4j.Logger;
317317 enfant = enfant.getNextSibling();
318318 }
319319 return(null);
320 }
321
322 /**
323 * Renvoie la liste des valeurs possibles pour un élément, à partir de sa référence.
324 * Renvoie null s'il y a un nombre infini de valeurs possibles ou si l'élément n'a pas un type simple.
325 */
326 public ArrayList<String> listeValeursElement(final Element refElement) {
327 final LinkedHashSet<String> liste = new LinkedHashSet<String>();
328 Node enfant = refElement.getFirstChild();
329 while (enfant != null) {
330 if (enfant.getNodeType() == Node.ELEMENT_NODE) {
331 final String nom = enfant.getNodeName();
332 if (nom.equals("choice")) {
333 ArrayList<String> liste2 = listeValeursAttribut((Element)enfant);
334 if (liste2 != null)
335 liste.addAll(liste2);
336 } else if (nom.equals("value"))
337 liste.add(enfant.getFirstChild().getNodeValue());
338 }
339 enfant = enfant.getNextSibling();
340 }
341 if (liste.size() == 0)
342 return(null);
343 return(new ArrayList<String>(liste));
320344 }
321345
322346 /**
9191 * (sous forme de texte simple, ou de HTML 3 pour faire des sauts de lignes)
9292 */
9393 public String documentationElement(final Element refElement) {
94 return(null);
95 }
96
97 /**
98 * Renvoie la liste des valeurs possibles pour un élément, à partir de sa référence.
99 * Renvoie null s'il y a un nombre infini de valeurs possibles ou si l'élément n'a pas un type simple.
100 */
101 public ArrayList<String> listeValeursElement(final Element refElement) {
94102 return(null);
95103 }
96104
204204 */
205205 public String documentationElement(final Element refElement) {
206206 return(sDocumentation(refElement));
207 }
208
209 /**
210 * Renvoie la liste des valeurs possibles pour un élément, à partir de sa référence.
211 * Renvoie null s'il y a un nombre infini de valeurs possibles ou si l'élément n'a pas un type simple.
212 */
213 public ArrayList<String> listeValeursElement(final Element refElement) {
214 if (!"".equals(refElement.getAttribute("fixed"))) {
215 final ArrayList<String> fixedval = new ArrayList<String>();
216 fixedval.add(refElement.getAttribute("fixed"));
217 return(fixedval);
218 }
219 final ArrayList<Element> lst = enfants(refElement, "simpleType");
220 if (lst.size() > 0)
221 return(enumerationDuType(lst.get(0)));
222 else if (!"".equals(refElement.getAttribute("type"))) {
223 final String type = refElement.getAttribute("type");
224 final String tns = refElement.lookupNamespaceURI(prefixeString(type));
225 return(enumerationDuType(type, tns));
226 } else
227 return(null);
207228 }
208229
209230 /**
549570 }
550571
551572 /**
573 * Renvoie la liste des valeurs possibles pour un type simple ou complexe.
574 * Renvoie null s'il y a un nombre infini de valeurs possibles.
575 * Paramètres : nom du type (potentiellement avec le préfixe), et espace de noms
576 */
577 private ArrayList<String> enumerationDuType(final String type, final String tns) {
578 final String stype = localValue(type);
579 if (schemaNamespace.equals(tns)) {
580 if ("boolean".equals(stype)) {
581 final String[] tvalbool = {"true", "false", "1", "0"};
582 final ArrayList<String> valbool = new ArrayList<String>(Arrays.asList(tvalbool));
583 return(valbool);
584 } else if (!schemaNamespace.equals(targetNamespace))
585 return(null);
586 }
587 final Element st = chercherPremier(TypeObjetSchema.SIMPLETYPE, stype, tns);
588 if (st != null)
589 return(enumerationDuType(st));
590 final Element ct = chercherPremier(TypeObjetSchema.COMPLEXTYPE, stype, tns);
591 if (ct != null) {
592 final ArrayList<Element> lsc = enfants(ct, "simpleContent");
593 if (lsc.size() > 0) {
594 final Element simpleContent = lsc.get(0);
595 final ArrayList<Element> lext = enfants(simpleContent, "extension");
596 if (lext.size() > 0) {
597 final Element extension = lext.get(0);
598 final String type_ext = extension.getAttribute("base");
599 final String tns_ext = extension.lookupNamespaceURI(prefixeString(type_ext));
600 return(enumerationDuType(type_ext, tns_ext));
601 } else
602 return(enumerationDuType(simpleContent));
603 } else
604 return(null);
605 } else {
606 LOG.error("enumerationDuType(String, String): type introuvable: " + type + " " + tns);
607 return(null);
608 }
609 }
610
611 /**
612 * Renvoie la liste des valeurs possibles pour un type simple.
613 * Renvoie null s'il y a un nombre infini de valeurs possibles.
614 */
615 private ArrayList<String> enumerationDuType(final Element simpleType) {
616 final ArrayList<Element> lrest = enfants(simpleType, "restriction");
617 if (lrest.size() > 0) {
618 final Element restriction = lrest.get(0);
619 final ArrayList<Element> lenum = enfants(restriction, "enumeration");
620 if (lenum.size() > 0) {
621 final ArrayList<String> liste = new ArrayList<String>();
622 for (Element enumeration : lenum) {
623 final String sval = enumeration.getAttribute("value");
624 liste.add(sval);
625 }
626 return(liste);
627 } else
628 return(null);
629 }
630 final ArrayList<Element> lunion = enfants(simpleType, "union");
631 if (lunion.size() > 0) {
632 final Element union = lunion.get(0);
633 final ArrayList<String> liste = new ArrayList<String>();
634 final ArrayList<Element> lst = enfants(union, "simpleType");
635 for (Element st : lst) {
636 final ArrayList<String> listest = enumerationDuType(st);
637 if (listest == null)
638 return(null);
639 liste.addAll(listest);
640 }
641 final String memberTypes = union.getAttribute("memberTypes");
642 if (!"".equals(memberTypes)) {
643 final String[] types = memberTypes.split("\\s");
644 for (String type : types) {
645 final String tns = simpleType.lookupNamespaceURI(prefixeString(type));
646 final ArrayList<String> listest = enumerationDuType(type, tns);
647 if (listest == null)
648 return(null);
649 liste.addAll(listest);
650 }
651 }
652 return(liste);
653 }
654 return(null);
655 }
656
657 /**
552658 * Renvoie la liste des valeurs possibles pour un attribut, à partir de sa référence.
553659 * Renvoie null s'il y a un nombre infini de valeurs possibles.
554660 */
558664 fixedval.add(refAttribut.getAttribute("fixed"));
559665 return(fixedval);
560666 }
561 NodeList lval = refAttribut.getElementsByTagNameNS(schemaNamespace, "enumeration"); // pas très rigoureux
562 if (lval.getLength() == 0) {
563 lval = null;
564 if (!"".equals(refAttribut.getAttribute("type"))) {
565 final String type = refAttribut.getAttribute("type");
566 final String stype = localValue(type);
567 final String tns = refAttribut.lookupNamespaceURI(prefixeString(type));
568 if (schemaNamespace.equals(tns) && "boolean".equals(stype)) {
569 final String[] tvalbool = {"true", "false", "1", "0"};
570 final ArrayList<String> valbool = new ArrayList<String>(Arrays.asList(tvalbool));
571 return(valbool);
572 }
573 final Element st = chercherPremier(TypeObjetSchema.SIMPLETYPE, stype, tns);
574 if (st != null)
575 lval = st.getElementsByTagNameNS(schemaNamespace, "enumeration");
576 }
577 if (lval == null || lval.getLength() == 0)
578 return(null);
579 }
580 final ArrayList<String> liste = new ArrayList<String>();
581 for (int i=0; i<lval.getLength(); i++) {
582 final Element val = (Element)lval.item(i);
583 final String sval = val.getAttribute("value");
584 liste.add(sval);
585 }
586 return(liste);
667 final ArrayList<Element> lst = enfants(refAttribut, "simpleType");
668 if (lst.size() > 0)
669 return(enumerationDuType(lst.get(0)));
670 else if (!"".equals(refAttribut.getAttribute("type"))) {
671 final String type = refAttribut.getAttribute("type");
672 final String tns = refAttribut.lookupNamespaceURI(prefixeString(type));
673 return(enumerationDuType(type, tns));
674 } else
675 return(null);
587676 }
588677
589678 /**
688777 * Renvoie true si l'élément dont on donne la référence peut contenir du texte
689778 */
690779 public boolean contientDuTexte(final Element refElement) {
691 if ("element".equals(refElement.getLocalName())) {
692 // si le type fait partie des schémas XML (comme "string" ou "anyURI")
693 // on considère que c'est du texte
694 final Element schemael = refElement.getOwnerDocument().getDocumentElement();
695 final String prefixeSchema = schemael.getPrefix();
696 final String stype = refElement.getAttribute("type");
697 if (!"".equals(stype)) {
698 final String prefixe = prefixeString(stype);
699 if (prefixe == null && prefixeSchema == null ||
700 prefixe != null && prefixe.equals(prefixeSchema))
701 return(true);
702 }
703 }
704780 if ("element".equals(refElement.getLocalName()) && !refElement.getAttribute("type").equals("")) {
705 // complexType
706781 final String type = refElement.getAttribute("type");
707782 final String stype = localValue(type);
708783 final String tns = refElement.lookupNamespaceURI(prefixeString(type));
784 // si le type fait partie des schémas XML (comme "string" ou "anyURI")
785 // on considère que c'est du texte (sauf si le schéma est le schéma des schémas)
786 if (!schemaNamespace.equals(targetNamespace) && schemaNamespace.equals(tns))
787 return(true);
788 // complexType
709789 final Element ct = chercherPremier(TypeObjetSchema.COMPLEXTYPE, stype, tns);
710790 if (ct != null) {
711791 if ("true".equals(ct.getAttribute("mixed")))
13561436 final Element sousb = (Element)item;
13571437 if (!"annotation".equals(sousb.getLocalName())) {
13581438 regexp2 = expressionReguliere(sousb, 2, modechoice, modevisu, modepasnul, 0, modevalid, annulable2);
1439 if (regexp2 != null && !"".equals(regexp2)) {
1440 if (modechoice) {
1441 if (builder.length() > 0)
1442 builder.append("|");
1443 builder.append(regexp2);
1444 } else {
1445 if (!(modevisu || modevalid) && !annulable2[0]) {
1446 annulable2[0] = true;
1447 if (regexp2.endsWith(")")) {
1448 builder.append(regexp2);
1449 builder.append("?");
1450 } else {
1451 builder.append("(");
1452 builder.append(regexp2);
1453 builder.append(")?");
1454 }
1455 if (!modevisu)
1456 builder.append("+");
1457 } else {
1458 if (builder.length() > 0 && modevisu)
1459 builder.append(", ");
1460 builder.append(regexp2);
1461 }
1462 }
1463 }
13591464 annulable[0] = annulable[0] && annulable2[0];
13601465 break;
13611466 }
13621467 }
13631468 item = item.getNextSibling();
1364 }
1365 if (regexp2 != null && !"".equals(regexp2)) {
1366 if (builder.length() > 0 && modevisu) {
1367 builder.append(", ");
1368 }
1369 builder.append(regexp2);
13701469 }
13711470 }
13721471 // System.out.println("-> " + builder.toString());
15191618 liste.addAll(sCtAttributs(ct, pile));
15201619 }
15211620 final ArrayList<Element> restattr = sCtAttributs(rest, pile);
1522 final ArrayList<Element> aretirer = new ArrayList<Element>();
1523 for (final Element att : restattr) {
1621 for (int i=0; i<liste.size(); i++) {
1622 final Element att = liste.get(i);
15241623 final String nomatt = att.getAttribute("name");
1525 for (final Element att2 : liste) {
1624 for (final Element att2 : restattr) {
15261625 final String nomatt2 = att2.getAttribute("name");
1527 if (nomatt2.equals(nomatt))
1528 aretirer.add(att2);
1626 if (nomatt2.equals(nomatt)) {
1627 if ("prohibited".equals(att2.getAttribute("use"))) {
1628 liste.remove(i);
1629 i--;
1630 } else
1631 liste.set(i, att2);
1632 }
15291633 }
15301634 }
1531 for (final Element att : aretirer)
1532 liste.remove(att);
1533 for (final Element att : restattr)
1534 if (!"prohibited".equals(att.getAttribute("use")))
1535 liste.add(att);
15361635 }
15371636 }
15381637 }
6262 private Style styleTexte;
6363 private Style styleEntite;
6464 private Style styleCommentaire;
65 private DialogueRechercher dlgRecherche;
65 private DialogueRechercher dlgRecherche = null;
6666 static String texteRecherche = null;
6767
6868 public SourceFrame(final JaxeDocument jdoc, final JaxeFrame jframe) {
118118 }
119119
120120 public void miseAJour() {
121 if (dlgRecherche != null) {
122 if (dlgRecherche.isVisible())
123 dlgRecherche.setVisible(false);
124 dlgRecherche = null;
125 }
121126 try {
122127 final BufferedReader in = new BufferedReader(jdoc.getReader());
123128 textPane.read(in, null);
207207 protected Node chercherOriginal(final Node clone) {
208208 final ArrayList<Integer> numeros = new ArrayList<Integer>();
209209 Node n1 = clone;
210 while (n1.getNodeType() != Node.DOCUMENT_NODE) {
210 while (n1 != null && n1.getNodeType() != Node.DOCUMENT_NODE) {
211211 Node n2 = n1.getPreviousSibling();
212212 int i = 0;
213213 while (n2 != null) {
3737 private static final Logger LOG = Logger.getLogger(VerifTypeSimple.class);
3838
3939 private final boolean required;
40 protected String baseType = null;
41 protected ArrayList<String> enumeration = null; // de String
42 protected ArrayList<String> patterns = null; // de String
43 protected ArrayList<Restriction> restrictions = null; // de Restriction
40 private String fixed = null;
41 private Contraintes contraintes;
4442 private static final HashMap<String, Pattern> PATTERN_CACHE = new HashMap<String, Pattern>();
4543 // protected PatternCompiler compiler;
4644 // protected PatternMatcher matcher;
5452 final String stype = snodedef.getAttribute("type");
5553 final String sReq = snodedef.getAttribute("use");
5654 required = "required".equals(sReq);
57 if (!"".equals(stype)) {
58 final String schemaPrefix = snodedef.getPrefix();
55 if (!"".equals(stype))
56 contraintes = new Contraintes(cfg, stype, snodedef);
57 else {
58 Node n = snodedef.getFirstChild();
59 while (n != null) {
60 if (n instanceof Element && n.getLocalName().equals("simpleType")) {
61 contraintes = new Contraintes(cfg, (Element)n);
62 } else if (n instanceof Element && n.getLocalName().equals("complexType")) {
63 Node n2 = n.getFirstChild();
64 while (n2 != null) {
65 if (n2 instanceof Element && n2.getLocalName().equals("simpleContent"))
66 contraintes = new Contraintes(cfg, (Element)n2);
67 n2 = n2.getNextSibling();
68 }
69 }
70 n = n.getNextSibling();
71 }
72
73 }
74 final String fixedval = snodedef.getAttribute("fixed");
75 if (!"".equals(fixedval))
76 fixed = fixedval;
77 }
78
79 /**
80 * Renvoit le type de base (sans préciser les éventuelles restrictions).
81 */
82 public String getBaseType() {
83 if (contraintes == null)
84 return(null);
85 else
86 return(contraintes.getBaseType());
87 }
88
89 /**
90 * Renvoit la liste de valeurs possibles, ou null s'il n'y en a pas.
91 */
92 public ArrayList<String> getEnumeration() {
93 if (contraintes == null) {
94 if (fixed != null) {
95 final ArrayList<String> enumeration = new ArrayList<String>();
96 enumeration.add(fixed);
97 enumeration.add("");
98 return(enumeration);
99 }
100 return(null);
101 } else {
102 ArrayList<String> enumeration = contraintes.getEnumeration();
103 if (fixed != null) {
104 if (enumeration == null)
105 enumeration = new ArrayList<String>();
106 if (!enumeration.contains(fixed))
107 enumeration.add(fixed);
108 if (!enumeration.contains(""))
109 enumeration.add("");
110 }
111 return(enumeration);
112 }
113 }
114
115 /**
116 * Renvoit true si la valeur est valide par rapport à la définition du type simple.
117 */
118 public boolean estValide(final String valeur) {
119 if (fixed != null && !fixed.equals(valeur))
120 return(false);
121 if (contraintes == null)
122 return(true);
123 return(contraintes.valide(valeur));
124 }
125
126
127 class Contraintes {
128 private String baseType = null;
129 private ArrayList<String> enumeration = null;
130 private ArrayList<String> patterns = null;
131 private ArrayList<Restriction> restrictions = null;
132 private Union union = null;
133 private Liste liste = null;
134
135 // prend en paramètre un élément simpleType ou simpleContent
136 public Contraintes(final Config cfg, final Element st) {
137 lireTypeEtRestrictions(cfg, st);
138 }
139
140 // prend en paramètre le nom d'un type avec son préfixe, et un élément du schéma pour résoudre le préfixe en espace de noms
141 public Contraintes(final Config cfg, final String stype, final Element nref) {
142 lireTypeEtRestrictions(cfg, stype, nref);
143 }
144
145 protected void lireTypeEtRestrictions(final Config cfg, final Element st) {
146 Element restel = null;
147 Node n = st.getFirstChild();
148 while (n != null) {
149 if (n instanceof Element && (n.getLocalName().equals("restriction") || n.getLocalName().equals("extension") ||
150 n.getLocalName().equals("union") || n.getLocalName().equals("list"))) {
151 restel = (Element)n;
152 break;
153 }
154 n = n.getNextSibling();
155 }
156 if (restel == null)
157 return;
158 if (restel.getLocalName().equals("restriction")) {
159 baseType = restel.getAttribute("base");
160 if (baseType.indexOf(':') != -1)
161 baseType = baseType.substring(baseType.indexOf(':') + 1);
162 Node n2 = restel.getFirstChild();
163 while (n2 != null) {
164 if (n2 instanceof Element)
165 lireRestriction((Element)n2);
166 n2 = n2.getNextSibling();
167 }
168 } else if (restel.getLocalName().equals("extension")) {
169 baseType = restel.getAttribute("base");
170 lireTypeEtRestrictions(cfg, baseType, st);
171 } else if (restel.getLocalName().equals("union")) {
172 union = new Union(cfg, restel);
173 enumeration = union.getEnumeration();
174 } else if (restel.getLocalName().equals("list")) {
175 liste = new Liste(cfg, restel);
176 enumeration = null;
177 }
178 }
179
180 protected void lireTypeEtRestrictions(final Config cfg, final String stype, final Element nref) {
181 final String targetNamespace = cfg.espaceCible();
182 final boolean metaschema = targetNamespace != null && targetNamespace.equals(nref.getNamespaceURI());
183 final String schemaPrefix = nref.getPrefix();
59184 final int indp = stype.indexOf(':');
60 if (indp == -1 && schemaPrefix == null ||
61 indp != -1 && stype.substring(0, indp).equals(schemaPrefix)) {
185 if (!metaschema && ((indp == -1 && schemaPrefix == null) ||
186 (indp != -1 && stype.substring(0, indp).equals(schemaPrefix)))) {
62187 baseType = stype.substring(indp+1);
63188 } else {
64189 String nomType, tns;
65190 if (indp == -1) {
66191 nomType = stype;
67 tns = snodedef.lookupNamespaceURI(null);
192 tns = nref.lookupNamespaceURI(null);
68193 } else {
69194 nomType = stype.substring(indp+1);
70 tns = snodedef.lookupNamespaceURI(stype.substring(0, indp));
195 tns = nref.lookupNamespaceURI(stype.substring(0, indp));
71196 }
72197 final Element eltype = cfg.getSchemaTypeElement(nomType, tns);
73198 if (eltype == null)
77202 Node n = eltype.getFirstChild();
78203 while (n != null) {
79204 if (n instanceof Element && n.getLocalName().equals("simpleContent"))
80 lireTypeEtRestrictions((Element)n);
205 lireTypeEtRestrictions(cfg, (Element)n);
81206 n = n.getNextSibling();
82207 }
83208 } else if (eltype.getLocalName().equals("simpleType"))
84 lireTypeEtRestrictions(eltype);
85 }
86 } else {
87 Node n = snodedef.getFirstChild();
209 lireTypeEtRestrictions(cfg, eltype);
210 }
211 }
212
213 // prend en paramètre un élément enfant de l'élément restriction
214 protected void lireRestriction(final Element facet) {
215 if (facet.getLocalName().equals("enumeration")) {
216 final String val = facet.getAttribute("value");
217 if (enumeration == null)
218 enumeration = new ArrayList<String>();
219 enumeration.add(val);
220 } else if (facet.getLocalName().equals("pattern")) {
221 String val = facet.getAttribute("value");
222 if (patterns == null)
223 patterns = new ArrayList<String>();
224 // remplacements très approximatifs de \i, \I, \c et \C
225 val = remplacer(val, "\\i", "[^<>&#!/?'\",0-9.\\-\\s]");
226 val = remplacer(val, "\\I", "[^a-zA-Z]");
227 val = remplacer(val, "\\c", "[^<>&#!/?'\",\\s]");
228 val = remplacer(val, "\\C", "\\W");
229 patterns.add(val);
230 } else {
231 final String val = facet.getAttribute("value");
232 if (restrictions == null)
233 restrictions = new ArrayList<Restriction>();
234 restrictions.add(new Restriction(facet.getLocalName(), val));
235 }
236 }
237
238 protected String remplacer(String s, final String sremp, final String spar) {
239 int ind = s.indexOf(sremp);
240 while (ind != -1) {
241 s = s.substring(0, ind) + spar + s.substring(ind + sremp.length());
242 ind = s.indexOf(sremp);
243 }
244 return(s);
245 }
246
247 protected boolean valide(final String valeur) {
248 // vérif required
249 if ((valeur == null || "".equals(valeur)) && required)
250 return false;
251
252 // vérif union
253 if (union != null)
254 return(union.valide(valeur));
255
256 // vérif liste
257 if (liste != null)
258 return(liste.valide(valeur));
259
260 // vérif baseType
261 if (baseType != null && !verifType(baseType, valeur))
262 return(false);
263
264 // vérif enumerations
265 if (enumeration != null) {
266 if (valeur == null)
267 return(false);
268 boolean trouve = false;
269 for (final String en : enumeration)
270 if (valeur.equals(en)) {
271 trouve = true;
272 break;
273 }
274 if (!trouve)
275 return(false);
276 }
277 // vérif patterns
278 if (patterns != null) {
279 boolean trouve = false;
280 for (final String pattern : patterns)
281 if (verifExpr(valeur, pattern)) {
282 trouve = true;
283 break;
284 }
285 if (!trouve)
286 return(false);
287 }
288 // vérif restrictions
289 if (restrictions != null) {
290 for (final Restriction res : restrictions) {
291 if (!res.valide(valeur))
292 return(false);
293 }
294 }
295 return(true);
296 }
297
298 protected boolean verifType(final String type, final String valeur) {
299 if ("string".equals(type))
300 return(true);
301 else if ("normalizedString".equals(type))
302 return(verifExpr(valeur, "[^\\t\\r\\n]*"));
303 else if ("token".equals(type)) {
304 if (valeur.indexOf('\n') != -1 || valeur.indexOf('\r') != -1 ||
305 valeur.indexOf('\t') != -1 || valeur.indexOf(" ") != -1)
306 return(false);
307 return(!valeur.startsWith(" ") && !valeur.endsWith(" "));
308 } else if ("base64Binary".equals(type))
309 return(verifExpr(valeur, "(([a-zA-Z0-9+/=]\\s?){4})*"));
310 else if ("hexBinary".equals(type))
311 return(verifExpr(valeur, "(([0-9a-fA-F]){2})*"));
312 else if ("integer".equals(type))
313 return(verifExpr(valeur, "[+\\-]?\\d+"));
314 else if ("positiveInteger".equals(type))
315 return(verifExpr(valeur, "\\+?0*[1-9]\\d*"));
316 else if ("negativeInteger".equals(type))
317 return(verifExpr(valeur, "-0*[1-9]\\d*"));
318 else if ("nonNegativeInteger".equals(type))
319 return(verifExpr(valeur, "(-0+)|(\\+?\\d+)"));
320 else if ("nonPositiveInteger".equals(type))
321 return(verifExpr(valeur, "(\\+?0+)|(-\\d+)"));
322 else if ("long".equals(type)) {
323 if (!verifExpr(valeur, "[+\\-]?\\d+"))
324 return(false);
325 try {
326 final BigInteger big = new BigInteger(valeur);
327 final BigInteger max = new BigInteger("9223372036854775807");
328 final BigInteger min = new BigInteger("-9223372036854775808");
329 if (big.compareTo(max) > 0)
330 return(false);
331 if (big.compareTo(min) < 0)
332 return(false);
333 return(true);
334 } catch (final NumberFormatException ex) {
335 LOG.error("verifType(String, String) - NumberFormatException", ex);
336 return(false);
337 }
338 } else if ("unsignedLong".equals(type)) {
339 if (!verifExpr(valeur, "\\d+"))
340 return(false);
341 try {
342 final BigInteger big = new BigInteger(valeur);
343 final BigInteger max = new BigInteger("18446744073709551615");
344 return(big.compareTo(max) <= 0);
345 } catch (final NumberFormatException ex) {
346 LOG.error("verifType(String, String) - NumberFormatException", ex);
347 return(false);
348 }
349 } else if ("int".equals(type)) {
350 if (!verifExpr(valeur, "[+\\-]?\\d+"))
351 return(false);
352 try {
353 final long val = Long.parseLong(valeur);
354 return(val <= 2147483647l && val >= -2147483648l);
355 } catch (final NumberFormatException ex) {
356 LOG.error("verifType(String, String) - NumberFormatException", ex);
357 return(false);
358 }
359 } else if ("unsignedInt".equals(type)) {
360 if (!verifExpr(valeur, "\\d+"))
361 return(false);
362 try {
363 final long val = Long.parseLong(valeur);
364 return(val <= 4294967295l && val >= 0);
365 } catch (final NumberFormatException ex) {
366 LOG.error("verifType(String, String) - NumberFormatException", ex);
367 return(false);
368 }
369 } else if ("short".equals(type)) {
370 if (!verifExpr(valeur, "[+\\-]?\\d+"))
371 return(false);
372 try {
373 final int val = Integer.parseInt(valeur);
374 return(val <= 32767 && val >= -32768);
375 } catch (final NumberFormatException ex) {
376 LOG.error("verifType(String, String) - NumberFormatException", ex);
377 return(false);
378 }
379 } else if ("unsignedShort".equals(type)) {
380 if (!verifExpr(valeur, "\\d+"))
381 return(false);
382 try {
383 final int val = Integer.parseInt(valeur);
384 return(val <= 65535 && val >= 0);
385 } catch (final NumberFormatException ex) {
386 LOG.error("verifType(String, String) - NumberFormatException", ex);
387 return(false);
388 }
389 } else if ("byte".equals(type)) {
390 if (!verifExpr(valeur, "[+\\-]?\\d+"))
391 return(false);
392 try {
393 final int val = Integer.parseInt(valeur);
394 return(val <= 127 && val >= -128);
395 } catch (final NumberFormatException ex) {
396 LOG.error("verifType(String, String) - NumberFormatException", ex);
397 return(false);
398 }
399 } else if ("unsignedByte".equals(type)) {
400 if (!verifExpr(valeur, "\\d+"))
401 return(false);
402 try {
403 final int val = Integer.parseInt(valeur);
404 return(val <= 255 && val >= 0);
405 } catch (final NumberFormatException ex) {
406 LOG.error("verifType(String, String) - NumberFormatException", ex);
407 return(false);
408 }
409 } else if ("decimal".equals(type)) {
410 return(verifExpr(valeur, "[+\\-]?\\d+\\.?\\d*"));
411 } else if ("float".equals(type)) {
412 if (!verifExpr(valeur, "(-?INF)|(NaN)|([+\\-]?\\d+\\.?\\d*([eE][+\\-]?\\d{1,3})?)"))
413 return(false);
414 if ("INF".equals(valeur) || "-INF".equals(valeur)) // "Infinity" en Java
415 return(true);
416 try {
417 Float.parseFloat(valeur);
418 return(true);
419 } catch (final NumberFormatException ex) {
420 return(false);
421 }
422 } else if ("double".equals(type)) {
423 if (!verifExpr(valeur, "(-?INF)|(NaN)|([+\\-]?\\d+\\.?\\d*([eE][+\\-]?\\d{1,3})?)"))
424 return(false);
425 if ("INF".equals(valeur) || "-INF".equals(valeur))
426 return(true);
427 try {
428 Double.parseDouble(valeur);
429 return(true);
430 } catch (final NumberFormatException ex) {
431 return(false);
432 }
433 } else if ("boolean".equals(type))
434 return(verifExpr(valeur, "(true)|(false)|1|0"));
435 else if ("duration".equals(type))
436 return(verifExpr(valeur, "-?P(\\d{1,4}Y)?(\\d{1,2}M)?(\\d{1,2}D)?T?(\\d{1,2}H)?(\\d{1,2}M)?(\\d{1,2}(\\.\\d+)?S)?"));
437 else if ("dateTime".equals(type))
438 return(verifExpr(valeur, "-?\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?(([+\\-][01]\\d:\\d{2})|Z)?"));
439 else if ("date".equals(type))
440 return(verifExpr(valeur, "-?\\d{4}-[01]\\d-[0-3]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
441 else if ("time".equals(type))
442 return(verifExpr(valeur, "[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?(([+\\-][01]\\d:\\d{2})|Z)?"));
443 else if ("gYear".equals(type))
444 return(verifExpr(valeur, "-?\\d{4}(([+\\-][01]\\d:\\d{2})|Z)?"));
445 else if ("gYearMonth".equals(type))
446 return(verifExpr(valeur, "-?\\d{4}-[01]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
447 else if ("gMonth".equals(type))
448 return(verifExpr(valeur, "--[01]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
449 else if ("gMonthDay".equals(type))
450 return(verifExpr(valeur, "--[01]\\d-[0-3]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
451 else if ("gDay".equals(type))
452 return(verifExpr(valeur, "---[0-3]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
453 else if ("Name".equals(type))
454 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s][^<>&#!/?'\",\\s]*")); // en fait plus restrictif: \i\c*
455 else if ("QName".equals(type))
456 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s][^<>&#!/?'\",\\s]*")); // en fait plus restrictif
457 else if ("NCName".equals(type))
458 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // en fait plus restrictif: [\i-[:]][\c-[:]]*
459 else if ("anyURI".equals(type))
460 return(true);
461 //return(verifExpr(valeur, "([^:/?#]+:)?(//[^/?#]*)?[^?#]*(\\?[^#]*)?(#.*)?"));
462 // pb: cette expression autorise tout!
463 // (mais les RFC 2396 et 2732 ne restreignent rien)
464 else if ("language".equals(type))
465 return(verifExpr(valeur, "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"));
466 else if ("ID".equals(type))
467 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // comme NCName
468 else if ("IDREF".equals(type))
469 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // comme NCName
470 else if ("IDREFS".equals(type))
471 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:]*"));
472 else if ("ENTITY".equals(type))
473 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // comme NCName
474 else if ("ENTITIES".equals(type))
475 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:]*")); // comme IDREFS
476 else if ("NOTATION".equals(type))
477 return(verifExpr(valeur, "[^0-9.\\-\\s][^\\s]*(\\s[^0-9.\\-\\s][^\\s]*)*"));
478 // la facette enumeration est obligatoire -> contrainte supplémentaire
479 else if ("NMTOKEN".equals(type))
480 return(verifExpr(valeur, "[^<>&#!/?'\",\\s]+")); // en fait plus restrictif: \c+
481 else if ("NMTOKENS".equals(type))
482 return(verifExpr(valeur, "[^<>&#!/?'\",]+")); // en fait plus restrictif
483 else
484 return(true);
485 }
486
487 protected boolean verifExpr(final String valeur, final String regexp) {
488 try {
489 // final Pattern r = compiler.compile("^" + regexp + "$");
490 // on pourrait utiliser un cache, comme dans Config
491 // final String regex = "^" + regex + "$";
492 Pattern r = PATTERN_CACHE.get(regexp);
493 if (r == null) {
494 r = Pattern.compile("^" + regexp + "$");
495 PATTERN_CACHE.put(regexp, r);
496 return r.matcher(valeur).matches();
497 }
498 // return(matcher.matches(valeur, r));
499 // } catch (final MalformedPatternException ex) {
500 return r.matcher(valeur).matches();
501 } catch (final PatternSyntaxException ex) {
502 LOG.error("verifExpr(String, String): " + regexp, ex);
503 return(true);
504 }
505 }
506
507 protected String getBaseType() {
508 return(baseType);
509 }
510
511 protected ArrayList<String> getEnumeration() {
512 return(enumeration);
513 }
514 }
515
516
517 class Union {
518 private ArrayList<Contraintes> contraintes = null;
519
520 public Union(final Config cfg, final Element u) {
521 contraintes = new ArrayList<Contraintes>();
522 Node n = u.getFirstChild();
523 while (n != null) {
524 if (n instanceof Element && n.getLocalName().equals("simpleType"))
525 contraintes.add(new Contraintes(cfg, (Element)n));
526 n = n.getNextSibling();
527 }
528 final String memberTypes = u.getAttribute("memberTypes");
529 if (!"".equals(memberTypes)) {
530 final String[] types = memberTypes.split("\\s");
531 for (String type : types)
532 contraintes.add(new Contraintes(cfg, type, u));
533 }
534 }
535
536 protected boolean valide(final String valeur) {
537 if (contraintes == null)
538 return(true);
539 for (Contraintes c : contraintes)
540 if (c.valide(valeur))
541 return(true);
542 return(false);
543 }
544
545 protected ArrayList<String> getEnumeration() {
546 ArrayList<String> enumeration = null;
547 for (Contraintes c : contraintes) {
548 ArrayList<String> ec = c.getEnumeration();
549 if (ec == null)
550 return(null);
551 else {
552 if (enumeration == null)
553 enumeration = new ArrayList<String>();
554 enumeration.addAll(ec);
555 }
556 }
557 return(enumeration);
558 }
559 }
560
561
562 class Liste {
563 private Contraintes contraintesItem = null;
564
565 public Liste(final Config cfg, final Element u) {
566 contraintesItem = null;
567 Node n = u.getFirstChild();
88568 while (n != null) {
89569 if (n instanceof Element && n.getLocalName().equals("simpleType")) {
90 lireTypeEtRestrictions((Element)n);
91 } else if (n instanceof Element && n.getLocalName().equals("complexType")) {
92 Node n2 = n.getFirstChild();
93 while (n2 != null) {
94 if (n2 instanceof Element && n2.getLocalName().equals("simpleContent"))
95 lireTypeEtRestrictions((Element)n2);
96 n2 = n2.getNextSibling();
97 }
570 contraintesItem = new Contraintes(cfg, (Element)n);
571 break;
98572 }
99573 n = n.getNextSibling();
100574 }
101
102 }
103 final String fixed = snodedef.getAttribute("fixed");
104 if (!"".equals(fixed)) {
105 enumeration = new ArrayList<String>();
106 enumeration.add("");
107 enumeration.add(fixed);
108 }
109 }
110
111 /**
112 * Renvoit le type de base (sans préciser les éventuelles restrictions).
113 */
114 public String getBaseType() {
115 return(baseType);
116 }
117
118 /**
119 * Renvoit la liste de valeurs possibles, ou null s'il n'y en a pas.
120 */
121 public ArrayList<String> getEnumeration() {
122 return(enumeration);
123 }
124
125 /**
126 * Renvoit true si la valeur est valide par rapport à la définition du type simple.
127 */
128 public boolean estValide(final String valeur) {
129 // vérif baseType
130 if ((valeur == null || "".equals(valeur)) && required) {
131 return false;
132 }
133 if (!verifType(baseType, valeur))
134 return(false);
135 // vérif enumerations
136 if (enumeration != null) {
137 if (valeur == null)
138 return(false);
139 boolean trouve = false;
140 for (final String en : enumeration)
141 if (valeur.equals(en)) {
142 trouve = true;
143 break;
144 }
145 if (!trouve)
146 return(false);
147 }
148 // vérif patterns
149 if (patterns != null) {
150 boolean trouve = false;
151 for (final String pattern : patterns)
152 if (verifExpr(valeur, pattern)) {
153 trouve = true;
154 break;
155 }
156 if (!trouve)
157 return(false);
158 }
159 // vérif restrictions
160 if (restrictions != null) {
161 for (final Restriction res : restrictions) {
162 if (!res.valide(valeur))
163 return(false);
164 }
165 }
166 return(true);
167 }
168
169 // prend en paramètre un élément simpleType ou simpleContent
170 protected void lireTypeEtRestrictions(final Element st) {
171 Element restel = null;
172 Node n = st.getFirstChild();
173 while (n != null) {
174 if (n instanceof Element && (n.getLocalName().equals("restriction") || n.getLocalName().equals("extension"))) {
175 restel = (Element)n;
176 break;
177 }
178 n = n.getNextSibling();
179 }
180 if (restel == null)
181 return;
182 baseType = restel.getAttribute("base");
183 if (baseType.indexOf(':') != -1)
184 baseType = baseType.substring(baseType.indexOf(':') + 1);
185 if (restel.getLocalName().equals("restriction")) {
186 Node n2 = restel.getFirstChild();
187 while (n2 != null) {
188 if (n2 instanceof Element)
189 lireRestriction((Element)n2);
190 n2 = n2.getNextSibling();
191 }
192 }
193 }
194
195 // prend en paramètre un élément enfant de l'élément restriction
196 protected void lireRestriction(final Element facet) {
197 if (facet.getLocalName().equals("enumeration")) {
198 final String val = facet.getAttribute("value");
199 if (enumeration == null)
200 enumeration = new ArrayList<String>();
201 enumeration.add(val);
202 } else if (facet.getLocalName().equals("pattern")) {
203 String val = facet.getAttribute("value");
204 if (patterns == null)
205 patterns = new ArrayList<String>();
206 // remplacements très approximatifs de \i, \I, \c et \C
207 val = remplacer(val, "\\i", "[^<>&#!/?'\",0-9.\\-\\s]");
208 val = remplacer(val, "\\I", "[^a-zA-Z]");
209 val = remplacer(val, "\\c", "[^<>&#!/?'\",\\s]");
210 val = remplacer(val, "\\C", "\\W");
211 patterns.add(val);
212 } else {
213 final String val = facet.getAttribute("value");
214 if (restrictions == null)
215 restrictions = new ArrayList<Restriction>();
216 restrictions.add(new Restriction(facet.getLocalName(), val));
217 }
218 }
219
220 protected String remplacer(String s, final String sremp, final String spar) {
221 int ind = s.indexOf(sremp);
222 while (ind != -1) {
223 s = s.substring(0, ind) + spar + s.substring(ind + sremp.length());
224 ind = s.indexOf(sremp);
225 }
226 return(s);
227 }
228
229 protected boolean verifType(final String type, final String valeur) {
230 if ("string".equals(type))
575 if (contraintesItem == null) {
576 final String itemType = u.getAttribute("itemType");
577 if (!"".equals(itemType))
578 contraintesItem = new Contraintes(cfg, itemType, u);
579 }
580 }
581
582 protected boolean valide(final String valeur) {
583 if (contraintesItem == null)
584 return(true);
585 final String[] items = valeur.trim().split("\\s");
586 for (String item : items)
587 if (!contraintesItem.valide(item))
588 return(false);
231589 return(true);
232 else if ("normalizedString".equals(type))
233 return(verifExpr(valeur, "[^\\t\\r\\n]*"));
234 else if ("token".equals(type)) {
235 if (valeur.indexOf('\n') != -1 || valeur.indexOf('\r') != -1 ||
236 valeur.indexOf('\t') != -1 || valeur.indexOf(" ") != -1)
237 return(false);
238 return(!valeur.startsWith(" ") && !valeur.endsWith(" "));
239 } else if ("base64Binary".equals(type))
240 return(verifExpr(valeur, "(([a-zA-Z0-9+/=]\\s?){4})*"));
241 else if ("hexBinary".equals(type))
242 return(verifExpr(valeur, "(([0-9a-fA-F]){2})*"));
243 else if ("integer".equals(type))
244 return(verifExpr(valeur, "[+\\-]?\\d+"));
245 else if ("positiveInteger".equals(type))
246 return(verifExpr(valeur, "\\+?0*[1-9]\\d*"));
247 else if ("negativeInteger".equals(type))
248 return(verifExpr(valeur, "-0*[1-9]\\d*"));
249 else if ("nonNegativeInteger".equals(type))
250 return(verifExpr(valeur, "(-0+)|(\\+?\\d+)"));
251 else if ("nonPositiveInteger".equals(type))
252 return(verifExpr(valeur, "(\\+?0+)|(-\\d+)"));
253 else if ("long".equals(type)) {
254 if (!verifExpr(valeur, "[+\\-]?\\d+"))
255 return(false);
256 try {
257 final BigInteger big = new BigInteger(valeur);
258 final BigInteger max = new BigInteger("9223372036854775807");
259 final BigInteger min = new BigInteger("-9223372036854775808");
260 if (big.compareTo(max) > 0)
261 return(false);
262 if (big.compareTo(min) < 0)
263 return(false);
264 return(true);
265 } catch (final NumberFormatException ex) {
266 LOG.error("verifType(String, String) - NumberFormatException", ex);
267 return(false);
268 }
269 } else if ("unsignedLong".equals(type)) {
270 if (!verifExpr(valeur, "\\d+"))
271 return(false);
272 try {
273 final BigInteger big = new BigInteger(valeur);
274 final BigInteger max = new BigInteger("18446744073709551615");
275 return(big.compareTo(max) <= 0);
276 } catch (final NumberFormatException ex) {
277 LOG.error("verifType(String, String) - NumberFormatException", ex);
278 return(false);
279 }
280 } else if ("int".equals(type)) {
281 if (!verifExpr(valeur, "[+\\-]?\\d+"))
282 return(false);
283 try {
284 final long val = Long.parseLong(valeur);
285 return(val <= 2147483647l && val >= -2147483648l);
286 } catch (final NumberFormatException ex) {
287 LOG.error("verifType(String, String) - NumberFormatException", ex);
288 return(false);
289 }
290 } else if ("unsignedInt".equals(type)) {
291 if (!verifExpr(valeur, "\\d+"))
292 return(false);
293 try {
294 final long val = Long.parseLong(valeur);
295 return(val <= 4294967295l && val >= 0);
296 } catch (final NumberFormatException ex) {
297 LOG.error("verifType(String, String) - NumberFormatException", ex);
298 return(false);
299 }
300 } else if ("short".equals(type)) {
301 if (!verifExpr(valeur, "[+\\-]?\\d+"))
302 return(false);
303 try {
304 final int val = Integer.parseInt(valeur);
305 return(val <= 32767 && val >= -32768);
306 } catch (final NumberFormatException ex) {
307 LOG.error("verifType(String, String) - NumberFormatException", ex);
308 return(false);
309 }
310 } else if ("unsignedShort".equals(type)) {
311 if (!verifExpr(valeur, "\\d+"))
312 return(false);
313 try {
314 final int val = Integer.parseInt(valeur);
315 return(val <= 65535 && val >= 0);
316 } catch (final NumberFormatException ex) {
317 LOG.error("verifType(String, String) - NumberFormatException", ex);
318 return(false);
319 }
320 } else if ("byte".equals(type)) {
321 if (!verifExpr(valeur, "[+\\-]?\\d+"))
322 return(false);
323 try {
324 final int val = Integer.parseInt(valeur);
325 return(val <= 127 && val >= -128);
326 } catch (final NumberFormatException ex) {
327 LOG.error("verifType(String, String) - NumberFormatException", ex);
328 return(false);
329 }
330 } else if ("unsignedByte".equals(type)) {
331 if (!verifExpr(valeur, "\\d+"))
332 return(false);
333 try {
334 final int val = Integer.parseInt(valeur);
335 return(val <= 255 && val >= 0);
336 } catch (final NumberFormatException ex) {
337 LOG.error("verifType(String, String) - NumberFormatException", ex);
338 return(false);
339 }
340 } else if ("decimal".equals(type)) {
341 return(verifExpr(valeur, "[+\\-]?\\d+\\.?\\d*"));
342 } else if ("float".equals(type)) {
343 if (!verifExpr(valeur, "(-?INF)|(NaN)|([+\\-]?\\d+\\.?\\d*([eE][+\\-]?\\d{1,3})?)"))
344 return(false);
345 if ("INF".equals(valeur) || "-INF".equals(valeur)) // "Infinity" en Java
346 return(true);
347 try {
348 Float.parseFloat(valeur);
349 return(true);
350 } catch (final NumberFormatException ex) {
351 return(false);
352 }
353 } else if ("double".equals(type)) {
354 if (!verifExpr(valeur, "(-?INF)|(NaN)|([+\\-]?\\d+\\.?\\d*([eE][+\\-]?\\d{1,3})?)"))
355 return(false);
356 if ("INF".equals(valeur) || "-INF".equals(valeur))
357 return(true);
358 try {
359 Double.parseDouble(valeur);
360 return(true);
361 } catch (final NumberFormatException ex) {
362 return(false);
363 }
364 } else if ("boolean".equals(type))
365 return(verifExpr(valeur, "(true)|(false)|1|0"));
366 else if ("duration".equals(type))
367 return(verifExpr(valeur, "-?P(\\d{1,4}Y)?(\\d{1,2}M)?(\\d{1,2}D)?T?(\\d{1,2}H)?(\\d{1,2}M)?(\\d{1,2}(\\.\\d+)?S)?"));
368 else if ("dateTime".equals(type))
369 return(verifExpr(valeur, "-?\\d{4}-[01]\\d-[0-3]\\dT[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?(([+\\-][01]\\d:\\d{2})|Z)?"));
370 else if ("date".equals(type))
371 return(verifExpr(valeur, "-?\\d{4}-[01]\\d-[0-3]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
372 else if ("time".equals(type))
373 return(verifExpr(valeur, "[0-2]\\d:[0-5]\\d:[0-5]\\d(\\.\\d+)?(([+\\-][01]\\d:\\d{2})|Z)?"));
374 else if ("gYear".equals(type))
375 return(verifExpr(valeur, "-?\\d{4}(([+\\-][01]\\d:\\d{2})|Z)?"));
376 else if ("gYearMonth".equals(type))
377 return(verifExpr(valeur, "-?\\d{4}-[01]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
378 else if ("gMonth".equals(type))
379 return(verifExpr(valeur, "--[01]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
380 else if ("gMonthDay".equals(type))
381 return(verifExpr(valeur, "--[01]\\d-[0-3]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
382 else if ("gDay".equals(type))
383 return(verifExpr(valeur, "---[0-3]\\d(([+\\-][01]\\d:\\d{2})|Z)?"));
384 else if ("Name".equals(type))
385 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s][^<>&#!/?'\",\\s]*")); // en fait plus restrictif: \i\c*
386 else if ("QName".equals(type))
387 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s][^<>&#!/?'\",\\s]*")); // en fait plus restrictif
388 else if ("NCName".equals(type))
389 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // en fait plus restrictif: [\i-[:]][\c-[:]]*
390 else if ("anyURI".equals(type))
391 return(true);
392 //return(verifExpr(valeur, "([^:/?#]+:)?(//[^/?#]*)?[^?#]*(\\?[^#]*)?(#.*)?"));
393 // pb: cette expression autorise tout!
394 // (mais les RFC 2396 et 2732 ne restreignent rien)
395 else if ("language".equals(type))
396 return(verifExpr(valeur, "[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*"));
397 else if ("ID".equals(type))
398 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // comme NCName
399 else if ("IDREF".equals(type))
400 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // comme NCName
401 else if ("IDREFS".equals(type))
402 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:]*"));
403 else if ("ENTITY".equals(type))
404 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:\\s]*")); // comme NCName
405 else if ("ENTITIES".equals(type))
406 return(verifExpr(valeur, "[^<>&#!/?'\",0-9.\\-\\s:][^<>&#!/?'\",:]*")); // comme IDREFS
407 else if ("NOTATION".equals(type))
408 return(verifExpr(valeur, "[^0-9.\\-\\s][^\\s]*(\\s[^0-9.\\-\\s][^\\s]*)*"));
409 // la facette enumeration est obligatoire -> contrainte supplémentaire
410 else if ("NMTOKEN".equals(type))
411 return(verifExpr(valeur, "[^<>&#!/?'\",\\s]+")); // en fait plus restrictif: \c+
412 else if ("NMTOKENS".equals(type))
413 return(verifExpr(valeur, "[^<>&#!/?'\",]+")); // en fait plus restrictif
414 else
415 return(true);
416 }
417
418 protected boolean verifExpr(final String valeur, final String regexp) {
419 try {
420 // final Pattern r = compiler.compile("^" + regexp + "$");
421 // on pourrait utiliser un cache, comme dans Config
422 // final String regex = "^" + regex + "$";
423 Pattern r = PATTERN_CACHE.get(regexp);
424 if (r == null) {
425 r = Pattern.compile("^" + regexp + "$");
426 PATTERN_CACHE.put(regexp, r);
427 return r.matcher(valeur).matches();
428 }
429 // return(matcher.matches(valeur, r));
430 // } catch (final MalformedPatternException ex) {
431 return r.matcher(valeur).matches();
432 } catch (final PatternSyntaxException ex) {
433 LOG.error("verifExpr(String, String): " + regexp, ex);
434 return(true);
435 }
436 }
590 }
591
592 protected ArrayList<String> getEnumeration() {
593 return(null);
594 }
595 }
596
437597
438598 class Restriction {
439599 private final String nom;
458618 return(valeur.length() <= iparam);
459619 else if ("maxInclusive".equals(nom)) {
460620 try {
461 final int val = Integer.parseInt(valeur);
621 final double val = Double.parseDouble(valeur);
462622 return(val <= iparam);
463623 } catch (final NumberFormatException ex) {
464624 return(false);
465625 }
466626 } else if ("maxExclusive".equals(nom)) {
467627 try {
468 final int val = Integer.parseInt(valeur);
628 final double val = Double.parseDouble(valeur);
469629 return(val < iparam);
470630 } catch (final NumberFormatException ex) {
471631 return(false);
472632 }
473633 } else if ("minInclusive".equals(nom)) {
474634 try {
475 final int val = Integer.parseInt(valeur);
635 final double val = Double.parseDouble(valeur);
476636 return(val >= iparam);
477637 } catch (final NumberFormatException ex) {
478638 return(false);
479639 }
480640 } else if ("minExclusive".equals(nom)) {
481641 try {
482 final int val = Integer.parseInt(valeur);
642 final double val = Double.parseDouble(valeur);
483643 return(val > iparam);
484644 } catch (final NumberFormatException ex) {
485645 return(false);
4545 import jaxe.JaxeElement;
4646 import jaxe.VerifTypeSimple;
4747
48 import org.w3c.dom.Attr;
4849 import org.w3c.dom.Element;
50 import org.w3c.dom.NamedNodeMap;
4951 import org.w3c.dom.Node;
5052 import org.w3c.dom.NodeList;
5153
5355 * Affichage pour JEFormulaire (affichage d'un élément sous forme d'un formulaire).
5456 * Attention, le nombre de descendants possibles ne doit pas être infini !
5557 */
56 public class AffichageFormulaire implements DocumentListener, ActionListener, ItemListener {
58 public class AffichageFormulaire implements DocumentListener, ItemListener {
5759 /**
5860 * Logger for this class
5961 */
6668 private static final ImageIcon iconeAttributs = new ImageIcon(ImageKeeper.loadImage("images/attributs.gif", true));
6769 private static final int profondeurMax = 10;
6870
69 final private Element refElement;
70 private Element el;
71 final private AffichageFormulaire affParent;
71 final private Element refNoeud; // référence de l'élément ou de l'attribut
72 private Node noeud; // élément ou attribut affiché (null si c'est un nouveau)
73 final private boolean attribut; // true s'il s'agit d'un attribut
74 final private AffichageFormulaire affParent; // affichage de l'élément parent (obligatoire pour un attribut)
7275 final private JaxeDocument doc;
7376 final private Config cfg;
74 private ArrayList<Element> enfants;
77 private ArrayList<Node> enfants;
7578 private JComponent comp = null;
7679 private final VerifTypeSimple verif;
7780 private final ArrayList<Element> refEnfantsPossibles;
81 private final ArrayList<Element> refAttributsPossibles;
7882 private JLabel labelTitre = null;
7983 private JPanel panelElement = null;
8084 private JPanel panelEnfants = null;
8488 private ArrayList<AffichageFormulaire> affEnfants = null;
8589 private ArrayList<String> listeValeurs = null;
8690
91
8792 public AffichageFormulaire(final Element refElement, final Element el, final AffichageFormulaire affParent,
8893 final JaxeDocument doc) {
89 this.refElement = refElement;
90 this.el = el;
94 this(refElement, el, affParent, doc, false);
95 }
96
97 public AffichageFormulaire(final Element refNoeud, final Node noeud, final AffichageFormulaire affParent,
98 final JaxeDocument doc, final boolean attribut) {
99 this.refNoeud = refNoeud;
100 this.noeud = noeud;
91101 this.affParent = affParent;
92102 this.doc = doc;
93103 this.cfg = doc.cfg;
104 this.attribut = attribut;
94105 if (affParent == null)
95106 profondeur = 0;
96107 else
97108 profondeur = affParent.getProfondeur() + 1;
98 refEnfantsPossibles = cfg.listeSousElements(refElement);
109 if (!attribut) {
110 refAttributsPossibles = cfg.listeAttributs(refNoeud);
111 refEnfantsPossibles = cfg.listeSousElements(refNoeud);
112 } else {
113 refAttributsPossibles = null;
114 refEnfantsPossibles = null;
115 }
99116
100117 lireEnfants();
101118 if (avecEnfants())
102119 verif = null;
103120 else
104 verif = cfg.getVerifTypeSimple(refElement); // sera null si ce n'est pas un schéma W3C
105 }
106
107 /**
108 * Lecture du tableau des éléments enfants.
121 verif = cfg.getVerifTypeSimple(refNoeud); // sera null si ce n'est pas un schéma W3C
122 }
123
124 /**
125 * Lecture du tableau des attributs et des éléments enfants.
109126 */
110127 private void lireEnfants() {
111 if (el == null) {
128 if (attribut || noeud == null) {
112129 enfants = null;
113130 return;
114131 }
115 enfants = new ArrayList<Element>();
116 final NodeList nl = el.getChildNodes();
132 enfants = new ArrayList<Node>();
133 final NamedNodeMap listeAttr = noeud.getAttributes();
134 for (int i=0; i<listeAttr.getLength(); i++)
135 enfants.add(listeAttr.item(i));
136 final NodeList nl = ((Element)noeud).getChildNodes();
117137 for (int i=0; i<nl.getLength(); i++) {
118138 final Node n = nl.item(i);
119139 if (n.getNodeType() == Node.ELEMENT_NODE)
120 enfants.add((Element)n);
121 }
122 }
123
124 /**
125 * Renvoit true si le nombre d'enfants possible est supérieur à 0.
140 enfants.add(n);
141 }
142 }
143
144 /**
145 * Renvoit true si le nombre d'attributs et d'enfants possible est supérieur à 0.
126146 */
127147 private boolean avecEnfants() {
128 return(refEnfantsPossibles.size() > 0);
148 return((refAttributsPossibles != null && refAttributsPossibles.size() > 0) ||
149 (refEnfantsPossibles != null && refEnfantsPossibles.size() > 0));
129150 }
130151
131152 /**
142163 private JPanel getPanel(final boolean dernier) {
143164 panelEnfants = new JPanel(new GridBagLayout());
144165 panelElement = new JPanel(new BorderLayout());
145 if (affParent != null && affParent.enfantsMultiples(refElement)) {
166 if (!attribut && affParent != null && affParent.enfantsMultiples(refNoeud)) {
146167 final JPanel panelBoutons = new JPanel(new BorderLayout());
147168 if (dernier) {
148169 final JButton boutonPlus = new JButton("+");
176197 panelElement = new JPanel(new BorderLayout());
177198 panelElement.setOpaque(false);
178199 panelElement.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
179 panelEnfants.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(cfg.titreElement(refElement)),
200 panelEnfants.setBorder(BorderFactory.createCompoundBorder(BorderFactory.createTitledBorder(getTitre()),
180201 BorderFactory.createEmptyBorder(5, 5, 5, 5)));
181202 panelElement.add(panelEnfants, BorderLayout.CENTER);
182203 }
187208 * Panel avec le titre de l'élément, et les boutons d'aide et d'attributs de l'élément
188209 */
189210 private JPanel getPanelTitre() {
190 final JButton baide = new JButton(new ActionAide(refElement));
211 final JButton baide = new JButton(new ActionAide(refNoeud));
191212 baide.setFont(baide.getFont().deriveFont((float)9));
192213 if (System.getProperty("os.name").startsWith("Mac OS")) {
193214 baide.setText("?");
201222 baide.setBorderPainted(false);
202223 baide.setContentAreaFilled(false);
203224 }
204 String documentation = cfg.documentation(refElement);
205 if (documentation != null) {
206 documentation = "<html><body>" + documentation.replaceAll("\n", "<br>") + "</body></html>";
225 String documentation = getDocumentation();
226 if (documentation != null)
207227 baide.setToolTipText(documentation);
208 }
209228 final JPanel panelTitre = new JPanel();
210229 panelTitre.add(baide);
211 if (aDesAttributs()) {
212 final JButton battr = new JButton(iconeAttributs);
213 if (System.getProperty("os.name").startsWith("Mac OS") &&
214 "10.5".compareTo(System.getProperty("os.version")) > 0)
215 battr.putClientProperty("JButton.buttonType", "toolbar");
216 else
217 battr.setMargin( new java.awt.Insets(0, 0, 0, 0) );
218 battr.addActionListener(this);
219 battr.setActionCommand("attributs");
220 panelTitre.add(battr);
221 }
222 final JLabel labelTitre = new JLabel(cfg.titreElement(refElement));
230 final JLabel labelTitre = new JLabel(getTitre());
223231 Color couleurTitre;
224232 if (affParent != null) {
225 if (affParent.elementObligatoire(refElement))
233 if (obligatoire())
226234 couleurTitre = couleurObligatoire;
227235 else
228236 couleurTitre = couleurFacultatif;
247255 affEnfants = new ArrayList<AffichageFormulaire>();
248256 final GridBagConstraints c = new GridBagConstraints();
249257 int pos = 0;
250 for (final Element refEnfantPossible : refEnfantsPossibles) {
251 boolean unEnfant = false;
252 if (enfants != null) {
253 final int enfantsSize = enfants.size();
254 for (int i=0; i<enfantsSize; i++) {
255 final Element elEnfant = enfants.get(i);
256 final Element refEnfant = cfg.getElementRef(elEnfant);
257 if (refEnfant == refEnfantPossible) {
258 final AffichageFormulaire affEnfant = new AffichageFormulaire(refEnfant, elEnfant, this, doc);
259 affEnfants.add(affEnfant);
260 final boolean dernier = (refAjout == null &&
261 !(i+1 < enfantsSize && cfg.getElementRef(enfants.get(i+1)) == refEnfant));
262 placerAffichage(affEnfant, panelEnfants, c, pos++, dernier);
263 unEnfant = true;
258 if (!attribut) {
259 for (final Element refAttributPossible : refAttributsPossibles) {
260 Node nEnfant = null;
261 if (enfants != null) {
262 for (Node enfanti : enfants) {
263 if (enfanti instanceof Attr) {
264 final String nomAtt = enfanti.getNodeName();
265 final String espaceAtt = enfanti.getNamespaceURI();
266 boolean match = nomAtt.equals(cfg.nomAttribut(refAttributPossible));
267 final String espace2 = cfg.espaceAttribut(refAttributPossible);
268 match = match && ((espaceAtt == null && espace2 == null) || (espaceAtt != null && espaceAtt.equals(espace2)));
269 if (match)
270 nEnfant = enfanti;
271 }
264272 }
265273 }
266 }
267 if (!unEnfant || refEnfantPossible == refAjout) {
268 final AffichageFormulaire affEnfant = new AffichageFormulaire(refEnfantPossible, null, this, doc);
274 final AffichageFormulaire affEnfant = new AffichageFormulaire(refAttributPossible, nEnfant, this, doc, true);
269275 affEnfants.add(affEnfant);
270 placerAffichage(affEnfant, panelEnfants, c, pos++, true);
276 placerAffichage(affEnfant, panelEnfants, c, pos++, false);
277 }
278 for (final Element refEnfantPossible : refEnfantsPossibles) {
279 boolean unEnfant = false;
280 if (enfants != null) {
281 final int enfantsSize = enfants.size();
282 for (int i=0; i<enfantsSize; i++) {
283 final Node nEnfant = enfants.get(i);
284 if (nEnfant instanceof Element) {
285 final Element refEnfant;
286 refEnfant = cfg.getElementRef((Element)nEnfant);
287 if (refEnfant == refEnfantPossible) {
288 final AffichageFormulaire affEnfant = new AffichageFormulaire(refEnfant, nEnfant, this, doc, false);
289 affEnfants.add(affEnfant);
290 final Element refip1;
291 if (i+1 < enfantsSize) {
292 final Node enfantip1 = enfants.get(i+1);
293 if (enfantip1 instanceof Element)
294 refip1 = cfg.getElementRef((Element)enfantip1);
295 else
296 refip1 = null;
297 } else
298 refip1 = null;
299 final boolean dernier = (refAjout == null && refip1 != refEnfant);
300 placerAffichage(affEnfant, panelEnfants, c, pos++, dernier);
301 unEnfant = true;
302 }
303 }
304 }
305 }
306 if (!unEnfant || refEnfantPossible == refAjout) {
307 final AffichageFormulaire affEnfant = new AffichageFormulaire(refEnfantPossible, null, this, doc, false);
308 affEnfants.add(affEnfant);
309 placerAffichage(affEnfant, panelEnfants, c, pos++, true);
310 }
271311 }
272312 }
273313 }
307347 }
308348
309349 /**
310 * Renvoit le nom de l'élément, optionnellement avec une valeur d'attribut spécifié par le paramètre titreAtt
311 */
312 private String getStringLabelTitre() {
313 final StringBuilder titreAtt = new StringBuilder(cfg.titreElement(refElement));
314 if (el != null) {
315 final ArrayList<String> attributsTitre = cfg.getParametresElement(refElement).get("titreAtt");
316 if (attributsTitre != null)
317 for (final String nomAtt : attributsTitre) {
318 final String valeurAtt = el.getAttribute(nomAtt);
319 if (!"".equals(valeurAtt)) {
320 titreAtt.append(" '").append(valeurAtt).append("'");
321 break;
322 }
323 }
324 }
325 return(titreAtt.toString());
326 }
327
328 /**
329350 * Renvoit le JPanel de gauche, avec le titre du champ.
330351 * Utilisé dans le cas où il n'y a pas d'enfants.
331352 */
332353 private JPanel getPanelGauche() {
333354 panelGauche = new JPanel(new FlowLayout(FlowLayout.LEFT));
334 final JButton baide = new JButton(new ActionAide(refElement));
355 final JButton baide = new JButton(new ActionAide(refNoeud));
335356 baide.setFont(baide.getFont().deriveFont((float)9));
336357 if (System.getProperty("os.name").startsWith("Mac OS")) {
337358 baide.setText("?");
345366 baide.setBorderPainted(false);
346367 baide.setContentAreaFilled(false);
347368 }
348 String documentation = cfg.documentation(refElement);
349 if (documentation != null) {
350 documentation = "<html><body>" + documentation.replaceAll("\n", "<br>") + "</body></html>";
369 String documentation = getDocumentation();
370 if (documentation != null)
351371 baide.setToolTipText(documentation);
352 }
372 if (documentation == null && attribut)
373 baide.setEnabled(false);
353374 panelGauche.add(baide);
354 if (aDesAttributs()) {
355 final JButton battr = new JButton(iconeAttributs);
356 if (System.getProperty("os.name").startsWith("Mac OS") &&
357 "10.5".compareTo(System.getProperty("os.version")) > 0)
358 battr.putClientProperty("JButton.buttonType", "toolbar");
359 else
360 battr.setMargin( new java.awt.Insets(0, 0, 0, 0) );
361 battr.addActionListener(this);
362 battr.setActionCommand("attributs");
363 panelGauche.add(battr);
364 }
365 labelTitre = new JLabel(getStringLabelTitre());
375 labelTitre = new JLabel(getTitre());
366376 if (affParent != null) {
367 if (affParent.elementObligatoire(refElement))
377 if (obligatoire())
368378 labelTitre.setForeground(couleurObligatoire);
369379 else
370380 labelTitre.setForeground(couleurFacultatif);
380390 private JPanel getPanelDroite(final boolean dernier) {
381391 panelDroite = new JPanel(new BorderLayout());
382392 String valeur = "";
383 if (el != null) {
384 final Node firstChild = el.getFirstChild();
385 if (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE)
386 valeur = firstChild.getNodeValue();
387 }
388 if (cfg.contientDuTexte(refElement)) {
393 if (noeud != null) {
394 if (attribut)
395 valeur = noeud.getNodeValue();
396 else {
397 final Node firstChild = ((Element)noeud).getFirstChild();
398 if (firstChild != null && firstChild.getNodeType() == Node.TEXT_NODE)
399 valeur = firstChild.getNodeValue();
400 }
401 }
402 if (attribut || cfg.contientDuTexte(refNoeud)) {
389403 String baseType = null;
390404 ArrayList<String> enumeration = null;
391405 if (verif != null) {
393407 enumeration = verif.getEnumeration();
394408 }
395409 if ("boolean".equals(baseType)) {
396 final String titre = cfg.titreElement(refElement);
410 final String titre = getTitre();
397411 final JCheckBox cb = new JCheckBox(titre);
398412 if ("true".equals(valeur.trim()) || "1".equals(valeur.trim()))
399413 cb.setSelected(true);
403417 listeValeurs = new ArrayList<String>(enumeration);
404418 if (!listeValeurs.contains(valeur))
405419 listeValeurs.add(valeur);
406 if (!affParent.elementObligatoire(refElement) && !listeValeurs.contains(""))
420 if (!obligatoire() && !listeValeurs.contains(""))
407421 listeValeurs.add("");
408422 final List<String> titresValeurs = new ArrayList<String>(listeValeurs.size());
409 for (final String val : listeValeurs)
410 titresValeurs.add(cfg.titreValeurElement(refElement, val));
423 for (final String val : listeValeurs) {
424 final String titreValeur;
425 if (attribut) {
426 final Element refParent = affParent.getNoeudRef();
427 titreValeur = cfg.titreValeurAttribut(refParent, refNoeud, val);
428 } else
429 titreValeur = cfg.titreValeurElement(refNoeud, val);
430 titresValeurs.add(titreValeur);
431 }
411432 final JComboBox cb = new JComboBox(titresValeurs.toArray());
412 cb.setSelectedItem(cfg.titreValeurElement(refElement, valeur));
433 final String titreValeur;
434 if (attribut) {
435 final Element refParent = affParent.getNoeudRef();
436 titreValeur = cfg.titreValeurAttribut(refParent, refNoeud, valeur);
437 } else
438 titreValeur = cfg.titreValeurElement(refNoeud, valeur);
439 cb.setSelectedItem(titreValeur);
413440 cb.addItemListener(this);
414441 comp = cb;
415442 } else {
416 final ArrayList<String> listeValeursSuggerees = doc.cfg.listeValeursSuggereesElement(refElement);
443 final ArrayList<String> listeValeursSuggerees;
444 if (attribut) {
445 final Element refParent = affParent.getNoeudRef();
446 listeValeursSuggerees = doc.cfg.listeValeursSuggereesAttribut(refParent, refNoeud);
447 } else
448 listeValeursSuggerees = doc.cfg.listeValeursSuggereesElement(refNoeud);
417449 if (listeValeursSuggerees != null && listeValeursSuggerees.size() > 0) {
418450 listeValeurs = new ArrayList<String>(listeValeursSuggerees);
419451 if (!listeValeurs.contains(valeur))
420452 listeValeurs.add(valeur);
421453 final List<String> titresValeurs = new ArrayList<String>(listeValeurs.size());
422 for (final String val : listeValeurs)
423 titresValeurs.add(cfg.titreValeurElement(refElement, val));
454 for (final String val : listeValeurs) {
455 final String titreValeur;
456 if (attribut) {
457 final Element refParent = affParent.getNoeudRef();
458 titreValeur = cfg.titreValeurAttribut(refParent, refNoeud, val);
459 } else
460 titreValeur = cfg.titreValeurElement(refNoeud, val);
461 titresValeurs.add(titreValeur);
462 }
424463 final JComboBox cb = new JComboBox(titresValeurs.toArray());
425464 cb.setEditable(true);
426 cb.setSelectedItem(cfg.titreValeurElement(refElement, valeur));
465 final String titreValeur;
466 if (attribut) {
467 final Element refParent = affParent.getNoeudRef();
468 titreValeur = cfg.titreValeurAttribut(refParent, refNoeud, valeur);
469 } else
470 titreValeur = cfg.titreValeurElement(refNoeud, valeur);
471 cb.setSelectedItem(titreValeur);
427472 cb.addItemListener(this);
428473 comp = cb;
429474 } else {
436481 if (verif != null && !"".equals(valeur))
437482 setValidite(verif.estValide(valeur));
438483 }
439 if (affParent != null && affParent.enfantsMultiples(refElement)) {
484 if (!attribut && affParent != null && affParent.enfantsMultiples(refNoeud)) {
440485 final JPanel panelBoutons = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
441486 if (dernier) {
442487 final JButton boutonPlus = new JButton("+");
480525 if (valeur == null)
481526 valeur = "";
482527 doc.setModif(true);
483 if (el == null && !"".equals(valeur))
484 creerElement();
485 else if (el != null && "".equals(valeur) && affParent != null) {
486 effacerElement();
528 if (noeud == null && !"".equals(valeur))
529 creerNoeud();
530 else if (noeud != null && "".equals(valeur) && affParent != null) {
531 effacerNoeud();
487532 return;
488533 }
489 if (el != null) {
534 if (!attribut) {
535 final Element el = (Element)noeud;
490536 final Node firstChild = el.getFirstChild();
491537 if (firstChild == null) {
492538 final Node textnode = el.getOwnerDocument().createTextNode(valeur);
495541 firstChild.setNodeValue(valeur);
496542 else
497543 LOG.error("AffichageFormulaire.enregistrerChangement : pas de noeud texte pour enregistrer le champ");
544 } else {
545 final Element elparent = (Element)affParent.getNoeud();
546 final String nom = cfg.nomAttribut(refNoeud);
547 final String espace = cfg.espaceAttribut(refNoeud);
548 elparent.setAttributeNS(espace, nom, valeur);
498549 }
499550 if (verif != null)
500551 setValidite("".equals(valeur) || verif.estValide(valeur));
540591 }
541592
542593 /**
543 * Renvoit l'élément DOM.
544 */
545 private Element getElement() {
546 return(el);
594 * Renvoit le noeud DOM.
595 */
596 private Node getNoeud() {
597 return(noeud);
547598 }
548599
549600 /**
550601 * Renvoit la référence de l'élément dans le schéma.
551602 */
552 private Element getElementRef() {
553 return(refElement);
603 private Element getNoeudRef() {
604 return(refNoeud);
605 }
606
607 private String getTitre() {
608 if (attribut) {
609 final Element refParent = affParent.getNoeudRef();
610 return(cfg.titreAttribut(refParent, refNoeud));
611 } else
612 return(cfg.titreElement(refNoeud));
613 }
614
615 private String getDocumentation() {
616 String documentation;
617 if (attribut) {
618 final Element refParent = affParent.getNoeudRef();
619 documentation = cfg.documentationAttribut(refParent, refNoeud);
620 } else
621 documentation = cfg.documentation(refNoeud);
622 if (documentation != null)
623 documentation = "<html><body>" + documentation.replaceAll("\n", "<br>") + "</body></html>";
624 return(documentation);
554625 }
555626
556627 /**
563634 /**
564635 * Crée l'élément DOM correspondant à l'affichage, si nécessaire en créant l'élément DOM parent.
565636 */
566 private void creerElement() {
567 el = JaxeElement.nouvelElementDOM(doc, refElement);
568 Element elparent = affParent.getElement();
569 if (elparent == null) {
570 affParent.creerElement();
571 elparent = affParent.getElement();
572 elparent.appendChild( el.getOwnerDocument().createTextNode("\n") );
573 }
574 final Element suivant = affParent.trouverSuivant(refElement);
575 final Node textnode = el.getOwnerDocument().createTextNode("\n");
576 if (suivant == null) {
577 elparent.appendChild(el);
578 elparent.appendChild(textnode);
637 private void creerNoeud() {
638 if (attribut) {
639 Element elparent = (Element)affParent.getNoeud();
640 if (elparent == null) {
641 affParent.creerNoeud();
642 elparent = (Element)affParent.getNoeud();
643 }
644 final String nom = cfg.nomAttribut(refNoeud);
645 final String espace = cfg.espaceAttribut(refNoeud);
646 elparent.setAttributeNS(espace, nom, "");
647 noeud = elparent.getAttributeNodeNS(espace, nom);
579648 } else {
580 elparent.insertBefore(el, suivant);
581 elparent.insertBefore(textnode, suivant);
649 noeud = JaxeElement.nouvelElementDOM(doc, refNoeud);
650 Element elparent = (Element)affParent.getNoeud();
651 if (elparent == null) {
652 affParent.creerNoeud();
653 elparent = (Element)affParent.getNoeud();
654 elparent.appendChild( noeud.getOwnerDocument().createTextNode("\n") );
655 }
656 final Element suivant = affParent.trouverSuivant(refNoeud);
657 final Node textnode = noeud.getOwnerDocument().createTextNode("\n");
658 if (suivant == null) {
659 elparent.appendChild(noeud);
660 elparent.appendChild(textnode);
661 } else {
662 elparent.insertBefore(noeud, suivant);
663 elparent.insertBefore(textnode, suivant);
664 }
582665 }
583666 affParent.lireEnfants();
584667 doc.textPane.miseAJourArbre();
585668 }
586669
587670 /**
588 * Renvoit l'élément enfant se trouvant après la place où se trouverait l'enfant de référence ref.
671 * Renvoie l'élément enfant se trouvant après la place où se trouverait l'enfant de référence ref.
589672 * (permet d'insérer un futur élément de référence ref par rapport à l'élément suivant)
590673 */
591674 private Element trouverSuivant(final Element ref) {
594677 return(null);
595678 if (enfants == null)
596679 return(null);
597 for (final Element elEnfant : enfants) {
598 final Element refEnfant = cfg.getElementRef(elEnfant);
599 final int ind2 = refEnfantsPossibles.indexOf(refEnfant);
600 if (ind2 > ind)
601 return(elEnfant);
680 for (final Node nEnfant : enfants) {
681 if (nEnfant instanceof Element) {
682 final Element refEnfant = cfg.getElementRef((Element)nEnfant);
683 final int ind2 = refEnfantsPossibles.indexOf(refEnfant);
684 if (ind2 > ind)
685 return((Element)nEnfant);
686 }
602687 }
603688 return(null);
604689 }
605690
606691 /**
607 * Efface l'élément DOM, et son parent s'il devient vide.
608 */
609 private void effacerElement() {
610 final Node textNode = el.getNextSibling();
611 affParent.getElement().removeChild(el);
612 if (textNode.getNodeType() == Node.TEXT_NODE)
613 affParent.getElement().removeChild(textNode);
614 el = null;
692 * Efface le noeud DOM, et son parent s'il devient vide.
693 */
694 private void effacerNoeud() {
695 final Element elparent = (Element)affParent.getNoeud();
696 if (attribut) {
697 final String nom = cfg.nomAttribut(refNoeud);
698 final String espace = cfg.espaceAttribut(refNoeud);
699 elparent.removeAttributeNS(espace, nom);
700 } else {
701 final Node textNode = noeud.getNextSibling();
702 elparent.removeChild(noeud);
703 if (textNode.getNodeType() == Node.TEXT_NODE)
704 elparent.removeChild(textNode);
705 }
706 noeud = null;
615707 affParent.testEffacementParent();
616708 doc.textPane.miseAJourArbre();
617709 }
621713 */
622714 private void testEffacementParent() {
623715 lireEnfants();
624 if (enfants.size() == 0 && el != null && affParent != null)
625 effacerElement();
716 if (enfants.size() == 0 && noeud != null && affParent != null)
717 effacerNoeud();
626718 }
627719
628720 /**
629721 * Renvoit true si l'élément peut avoir des enfants multiples avec la référence ref (sequence ou choice).
630722 */
631723 private boolean enfantsMultiples(final Element ref) {
724 if (attribut)
725 return(false);
632726 if (cfg.getSchema() == null)
633727 return(true);
634 return(cfg.getSchema().enfantsMultiples(refElement, ref));
728 return(cfg.getSchema().enfantsMultiples(refNoeud, ref));
729 }
730
731 /**
732 * Renvoit true si l'élément ou l'attribut est obligatoire
733 */
734 private boolean obligatoire() {
735 if (attribut)
736 return(cfg.estObligatoire(refNoeud));
737 return(affParent.elementObligatoire(refNoeud));
635738 }
636739
637740 /**
640743 private boolean elementObligatoire(final Element ref) {
641744 if (cfg.getSchema() == null)
642745 return(false);
643 return(cfg.getSchema().elementObligatoire(refElement, ref));
644 }
645
646 /**
647 * Renvoit true si l'élément a des attributs.
648 */
649 private boolean aDesAttributs() {
650 final ArrayList<Element> latt = cfg.listeAttributs(refElement);
651 return (latt != null && latt.size() > 0);
746 return(cfg.getSchema().elementObligatoire(refNoeud, ref));
652747 }
653748
654749 /**
655750 * Mise à jour de l'affichage causée par le changement dans un sous-affichage.
656751 */
657752 private void ajouterAffichageEnfant(final AffichageFormulaire aff) {
658 majPanel(aff.getElementRef());
753 majPanel(aff.getNoeudRef());
659754 }
660755
661756 /**
662757 * Retire un élément et son affichage ( bouton - )
663758 */
664759 private void retirerAffichageEnfant(final AffichageFormulaire aff) {
665 if (aff.getElement() != null)
666 aff.effacerElement();
760 if (aff.getNoeud() != null)
761 aff.effacerNoeud();
667762 majPanel(null);
668 }
669
670 public void actionPerformed(final ActionEvent e) {
671 final String cmd = e.getActionCommand();
672 if ("attributs".equals(cmd))
673 afficherDialogueAttributs();
674763 }
675764
676765 public void itemStateChanged(final ItemEvent e) {
677766 enregistrerChangement();
678767 }
679768
680 /**
681 * Affiche le dialogue d'édition des attributs.
682 */
683 public void afficherDialogueAttributs() {
684 boolean creation;
685 if (el == null) {
686 creerElement();
687 creation = true;
688 } else
689 creation = false;
690 final DialogueAttributs dlg = new DialogueAttributs(doc.jframe, doc,
691 cfg.titreElement(refElement), refElement, el);
692 if (dlg.afficher()) {
693 dlg.enregistrerReponses();
694 if (labelTitre != null)
695 labelTitre.setText(getStringLabelTitre());
696 } else if (creation)
697 effacerElement();
698 dlg.dispose();
699 }
700
701769 public Point getPointEnfant(final Element enfant) {
702 if (el == enfant) {
770 if (noeud == enfant) {
703771 return(getPoint());
704772 } else if (affEnfants != null) {
705773 for (final AffichageFormulaire affEnfant : affEnfants) {
708776 final Point monPoint = getPoint();
709777 if (monPoint != null)
710778 pt.translate(monPoint.x, monPoint.y);
779 final Point ptEnfants = panelEnfants.getLocation();
780 pt.translate(ptEnfants.x, ptEnfants.y);
711781 return(pt);
712782 }
713783 }
736806 }
737807
738808 class ActionAide extends AbstractAction {
739 Element refElement;
740 ActionAide(final Element refElement) {
809 Element refNoeud;
810 ActionAide(final Element refNoeud) {
741811 super();
742 this.refElement = refElement;
812 this.refNoeud = refNoeud;
743813 }
744814 public void actionPerformed(final ActionEvent e) {
745 final DialogueAideElement dlg = new DialogueAideElement(refElement, cfg.getRefConf(refElement),
746 (JFrame)doc.textPane.getTopLevelAncestor());
815 final DialogueAideElement dlg;
816 if (attribut) {
817 final Element refParent = affParent.getNoeudRef();
818 dlg = new DialogueAideElement(refNoeud, refParent, cfg.getRefConf(refParent),
819 (JFrame)doc.textPane.getTopLevelAncestor());
820 } else {
821 dlg = new DialogueAideElement(refNoeud, cfg.getRefConf(refNoeud),
822 (JFrame)doc.textPane.getTopLevelAncestor());
823 }
747824 dlg.setVisible(true);
748825 }
749826 }
118118 final String baseURL = urlListe.toString().substring(0, urlListe.toString().indexOf("symboles/liste.txt"));
119119 urlIcone = new URL(baseURL + liste[i].getPath());
120120 } else
121 urlIcone = liste[i].toURL();
121 urlIcone = liste[i].toURI().toURL();
122122 } catch (MalformedURLException ex) {
123123 LOG.error(ex);
124124 break;
132132 // création ou mise à jour du label
133133 if (label == null)
134134 label = new JLabel();
135 else
136 label.setEnabled(true);
135137 if (urlimg == null || (fimg != null && (!fimg.exists() || !fimg.isFile()))) {
136138 label.setText(getString("erreur.FichierNonTrouve") + ": " + nomf);
137139 label.setIcon(null);
5555 JaxeResourceBundle.getRB().getString("inconnu.NomElement"),
5656 JaxeResourceBundle.getRB().getString("inconnu.NouvelleBalise"), JOptionPane.QUESTION_MESSAGE);
5757
58 final Node newel = nouvelElementDOM(doc, "element", nom);
58 //final Node newel = nouvelElementDOM(doc, "element", nom); (deprecated method)
59 final Node newel = doc.DOMdoc.createElementNS(null, nom);
5960
6061 return newel;
6162 }
3434
3535 public JESymbole(final JaxeDocument doc) {
3636 super(doc);
37 alignementY = (float)0.70;
38 // 70% du composant au-dessus de la base de la ligne
39 // donc pas parfait (il faudrait se placer par rapport au milieu vertical d'un 'x'
40 // et non par rapport à la base de la ligne pour obtenir un résulat parfait,
41 // mais ce n'est pas possible avec Swing)
3742 }
3843
3944 @Override
191191 }
192192
193193 protected TableModel makeTableModel(final Element el) {
194 final Vector<Vector> v = new Vector<Vector>();
194 final Vector<Vector<Object>> v = new Vector<Vector<Object>>();
195195 final Vector<String> ventete = new Vector<String>();
196196 int nligne = 0;
197197 for (Node n=el.getFirstChild(); n != null; n=n.getNextSibling()) {
198198 if (n.getNodeType() == Node.ELEMENT_NODE) {
199199 final String bal = n.getNodeName();
200200 if (bal.equals(TRtag)) {
201 final Vector<String> v2 = new Vector<String>();
201 final Vector<Object> v2 = new Vector<Object>();
202202 for (Node n2=n.getFirstChild(); n2 != null; n2=n2.getNextSibling()) {
203203 if (n2.getNodeType() == Node.ELEMENT_NODE) {
204204 final String bal2 = n2.getNodeName();
228228 }
229229
230230 class MyTableModel extends AbstractTableModel {
231 Vector<Vector> rowData;
231 Vector<Vector<Object>> rowData;
232232 Vector<String> columnNames;
233 public MyTableModel(final Vector<Vector> rowData, final Vector<String> columnNames) {
233 public MyTableModel(final Vector<Vector<Object>> rowData, final Vector<String> columnNames) {
234234 this.rowData = rowData;
235235 this.columnNames = columnNames;
236236 }
749749 champs[0] = new JTextField(10);
750750 champs[1] = new JTextField(10);
751751
752 final DialogueChamps dlg = new DialogueChamps(doc.jframe, JaxeResourceBundle.getRB()
752 final DialogueChamps dlg_dim = new DialogueChamps(doc.jframe, JaxeResourceBundle.getRB()
753753 .getString("table.NouvelleBalise"), titres, champs);
754 if (!dlg.afficher())
754 if (!dlg_dim.afficher())
755755 return null;
756756
757757 final int nlignes;
779779 avecEntete = false;
780780
781781 final Element newel = nouvelElementDOM(doc, refElement);
782 if (newel == null) return null;
782 if (newel == null)
783 return null;
784 final ArrayList<Element> latt = doc.cfg.listeAttributs(refElement);
785 if (latt != null && latt.size() > 0) {
786 final DialogueAttributs dlg = new DialogueAttributs(doc.jframe, doc,
787 JaxeResourceBundle.getRB().getString("zone.NouvelleBalise") + " " + doc.cfg.titreElement(refElement), refElement, newel);
788 if (!dlg.afficher())
789 return null;
790 dlg.enregistrerReponses();
791 }
783792 Node textnode = doc.DOMdoc.createTextNode(newline);
784793 newel.appendChild(textnode);
785794 for (int i = 0; i < nlignes; i++) {
9292
9393 // lecture de la valeur de l'élément
9494 final Node child = noeud.getFirstChild();
95 String valeur = null;
95 String valeur;
9696 if (child != null)
9797 valeur = child.getNodeValue();
98 else
99 valeur = "";
98100
99101 // création du composant Swing
100102 String baseType = null;
305307 if (((JCheckBox)comp).isSelected())
306308 return "true";
307309 return "false";
308 } else if (comp instanceof JComboBox)
309 return listeValeurs.get(((JComboBox)comp).getSelectedIndex());
310 } else if (comp instanceof JComboBox) {
311 final int index = ((JComboBox)comp).getSelectedIndex();
312 if (index == -1)
313 return(null);
314 else
315 return listeValeurs.get(index);
316 }
310317 return ((JTextField)comp).getText();
311318 }
312319
3636 import jaxe.equations.element.MathUnderOver;
3737
3838 /**
39 * Constructeur pour une expression mathématique linéaire (style maple)
39 * Analyseur d'équation avec la syntaxe particulière de Jaxe.
40 * L'analyse se fait en 2 étape :
41 * - parsing du string avec l'équation, avec la création de structures en mémoire représentant le sens mathématique de l'expression
42 * - transformation en MathML présentationnel
4043 */
4144 public class StringMathBuilder {
4245 /**
107110 rootElement = new MathRootElement();
108111 final String s2 = ajParentheses(replaceSpecial(s));
109112 if (!s.equals("")) {
110 final MathElement me = parser(s2, false);
113 final JEQ jeq = parser(s2);
114 final MathElement me;
115 if (jeq == null)
116 me = null;
117 else
118 me = jeq.versMathML();
111119 rootElement.addMathElement(me);
112120 }
113121 }
235243 return s;
236244 }
237245
238 public MathElement parser(String s, final boolean parentheses) {
246 public JEQ parser(String s) {
239247 if (s == null || "".equals(s))
240248 return null;
241249
242 boolean ajparentheses = false;
243250 if (s.charAt(0) == '(' && s.charAt(s.length()-1) == ')') {
244251 int pp = 0;
245252 for (int i=1; i<s.length()-1; i++) {
250257 if (pp == -1)
251258 break;
252259 }
253 if (pp != -1) {
260 if (pp != -1)
254261 s = s.substring(1, s.length()-1);
255 if (parentheses)
256 ajparentheses = true;
257 }
258262 }
259263
260264 int indop = -1;
275279 } catch (final PatternSyntaxException ex) {
276280 nb = false;
277281 }
278 if (nb) {
279 final MathNumber mn = new MathNumber();
280 mn.addText(s);
281 return mn;
282 }
282 if (nb)
283 return(new JEQNombre(s));
283284 final int indf = s.indexOf('(');
284285 if (indf != -1 && s.charAt(s.length()-1) == ')') {
285286 // nomfct(p1; p2; ...) ou (nomfctcomplexe)(p1; p2; ...) ?
298299 pp--;
299300 }
300301 String nomfct = null;
301 MathElement mfct = null;
302 JEQ nom = null;
302303 if (indf2 == -1) {
303 nomfct = s.substring(0,indf);
304 nom = new JEQVariable(s.substring(0,indf));
304305 s = s.substring(indf+1, s.length()-1);
305306 } else {
306 mfct = parser(s.substring(0, indf2), false);
307 nom = parser(s.substring(0, indf2));
307308 s = s.substring(indf2+1, s.length()-1);
308309 }
309310 // recherche des paramètres
310 final Vector<MathElement> vp = new Vector<MathElement>(); // of MathElement
311 final Vector<JEQ> vp = new Vector<JEQ>();
311312 //indv = s.indexOf(';'); marche pas avec f(g(a;b);c)
312313 int indv = -1;
313314 pp = 0;
322323 pp--;
323324 }
324325 if (indv == -1)
325 vp.add(parser(s.trim(), false));
326 vp.add(parser(s.trim()));
326327 else
327328 while (indv != -1) {
328 vp.add(parser(s.substring(0,indv).trim(), false));
329 vp.add(parser(s.substring(0,indv).trim()));
329330 s = s.substring(indv+1);
330331 indv = -1;
331332 pp = 0;
340341 pp--;
341342 }
342343 if (indv == -1)
343 vp.add(parser(s.trim(), false));
344 vp.add(parser(s.trim()));
344345 }
345 // transformation en MathML
346 MathElement p1, p2, p3, p4;
347 if (vp.size() > 0)
348 p1 = vp.get(0);
349 else
350 p1 = null;
351 if (vp.size() > 1)
352 p2 = vp.get(1);
353 else
354 p2 = null;
355 if (vp.size() > 2)
356 p3 = vp.get(2);
357 else
358 p3 = null;
359 if (vp.size() > 3)
360 p4 = vp.get(3);
361 else
362 p4 = null;
363 MathElement me;
364 if ("sqrt".equals(nomfct) || "racine".equals(nomfct)) {
365 me = new MathSqrt();
366 me.addMathElement(p1);
367 } else if ("exp".equals(nomfct)) {
368 me = new MathSup();
369 final MathIdentifier mi = new MathIdentifier();
370 mi.addText("e");
371 me.addMathElement(mi);
372 me.addMathElement(p1);
373 } else if ("abs".equals(nomfct)) {
374 me = new MathRow();
375 MathOperator mo = new MathOperator();
376 mo.addText("|");
377 me.addMathElement(mo);
378 me.addMathElement(p1);
346 return(new JEQFonction(nom, vp));
347 } else
348 return(new JEQVariable(s));
349 }
350
351 final char op = s.charAt(indop);
352 final String s1 = s.substring(0,indop).trim();
353 JEQ p1;
354 if (s1.equals(""))
355 p1 = null;
356 else
357 p1 = parser(s1);
358 final String s2 = s.substring(indop+1).trim();
359 JEQ p2;
360 if (s2.equals(""))
361 p2 = null;
362 else
363 p2 = parser(s2);
364
365 return(new JEQOperation(op, p1, p2));
366 }
367
368 private static MathElement elemOrQuestion(final JEQ jeq) {
369 if (jeq != null)
370 return jeq.versMathML();
371 final MathText mtext = new MathText();
372 mtext.addText("?");
373 return mtext;
374 }
375
376
377 interface JEQ {
378 public MathElement versMathML();
379 public void setUnites();
380 }
381
382 class JEQFonction implements JEQ {
383 JEQ nom;
384 Vector<JEQ> vp;
385 boolean unites;
386 public JEQFonction(final JEQ nom, final Vector<JEQ> arguments) {
387 this.nom = nom;
388 vp = arguments;
389 unites = ("unité".equals(getNomFct()) || "unit".equals(getNomFct()));
390 if (unites)
391 setUnites();
392 }
393 public void setUnites() {
394 unites = true;
395 for (JEQ param : vp)
396 if (param != null)
397 param.setUnites();
398 }
399 public String getNomFct() {
400 if (nom instanceof JEQVariable)
401 return(((JEQVariable)nom).nom);
402 else
403 return(null);
404 }
405 public MathElement versMathML() {
406 JEQ p1, p2, p3, p4;
407 if (vp.size() > 0)
408 p1 = vp.get(0);
409 else
410 p1 = null;
411 if (vp.size() > 1)
412 p2 = vp.get(1);
413 else
414 p2 = null;
415 if (vp.size() > 2)
416 p3 = vp.get(2);
417 else
418 p3 = null;
419 if (vp.size() > 3)
420 p4 = vp.get(3);
421 else
422 p4 = null;
423 String nomfct = getNomFct();
424 MathElement me;
425 if ("sqrt".equals(nomfct) || "racine".equals(nomfct)) {
426 me = new MathSqrt();
427 me.addMathElement(p1.versMathML());
428 } else if ("exp".equals(nomfct)) {
429 me = new MathSup();
430 final MathIdentifier mi = new MathIdentifier();
431 mi.addText("e");
432 me.addMathElement(mi);
433 me.addMathElement(p1.versMathML());
434 } else if ("abs".equals(nomfct)) {
435 me = new MathRow();
436 MathOperator mo = new MathOperator();
437 mo.addText("|");
438 me.addMathElement(mo);
439 me.addMathElement(p1.versMathML());
440 mo = new MathOperator();
441 mo.addText("|");
442 me.addMathElement(mo);
443 } else if ("fact".equals(nomfct) || "factorielle".equals(nomfct)
444 || "factorial".equals(nomfct)) {
445 me = new MathRow();
446 MathOperator mo;
447 if (!(p1 instanceof JEQVariable || p1 instanceof JEQNombre)) {
379448 mo = new MathOperator();
380 mo.addText("|");
381 me.addMathElement(mo);
382 } else if ("fact".equals(nomfct) || "factorielle".equals(nomfct)
383 || "factorial".equals(nomfct)) {
384 me = new MathRow();
385 MathOperator mo;
386 if (!(p1 instanceof MathIdentifier || p1 instanceof MathNumber)) {
387 mo = new MathOperator();
388 mo.addText("(");
389 me.addMathElement(mo);
390 }
391 me.addMathElement(p1);
392 if (!(p1 instanceof MathIdentifier || p1 instanceof MathNumber)) {
393 mo = new MathOperator();
394 mo.addText(")");
395 me.addMathElement(mo);
396 }
397 mo = new MathOperator();
398 mo.addText("!");
399 me.addMathElement(mo);
400 } else if ("int".equals(nomfct) || "intégrale".equals(nomfct)) {
401 me = new MathRow();
402 MathOperator mo = new MathOperator();
403 mo.addText("\u222B");
404 mo.setStretchy(true);
405 if (p3 != null && p4 != null) {
406 final MathUnderOver munderover = new MathUnderOver();
407 munderover.addMathElement(mo);
408 munderover.addMathElement(elemOrQuestion(p3));
409 munderover.addMathElement(elemOrQuestion(p4));
410 me.addMathElement(munderover);
411 } else if (p3 != null) {
412 final MathUnder munder = new MathUnder();
413 munder.addMathElement(mo);
414 munder.addMathElement(elemOrQuestion(p3));
415 me.addMathElement(munder);
416 } else if (p4 != null) {
417 final MathOver mover = new MathOver();
418 mover.addMathElement(mo);
419 mover.addMathElement(elemOrQuestion(p4));
420 me.addMathElement(mover);
421 } else
422 me.addMathElement(mo);
423 final MathRow mrow = new MathRow();
424 mrow.addMathElement(elemOrQuestion(p1));
425 // <mo> &InvisibleTimes; </mo>
426 if (p2 != null) {
427 mo = new MathOperator();
428 mo.addText("d"); // &DifferentialD;
429 mrow.addMathElement(mo);
430 mrow.addMathElement(p2);
431 }
432 me.addMathElement(mrow);
433 } else if ("prod".equals(nomfct) || "sum".equals(nomfct) ||
434 "produit".equals(nomfct) || "somme".equals(nomfct)) {
435 me = new MathRow();
436 final MathUnderOver munderover = new MathUnderOver();
437 final MathOperator mo = new MathOperator();
438 if ("prod".equals(nomfct) || "produit".equals(nomfct))
439 mo.addText("\u220F");
440 else if ("sum".equals(nomfct) || "somme".equals(nomfct))
441 mo.addText("\u2211");
442 mo.setStretchy(true);
443 munderover.addMathElement(mo);
444 munderover.addMathElement(elemOrQuestion(p2));
445 munderover.addMathElement(elemOrQuestion(p3));
446 me.addMathElement(munderover);
447 final MathRow mrow = new MathRow();
448 mrow.addMathElement(elemOrQuestion(p1));
449 me.addMathElement(mrow);
450 } else if ("over".equals(nomfct) || "dessus".equals(nomfct)) {
451 final MathOver mover = new MathOver();
452 mover.addMathElement(elemOrQuestion(p1));
453 mover.addMathElement(elemOrQuestion(p2));
454 me = mover;
455 } else if ("subsup".equals(nomfct)) {
456 final MathSubSup msubsup = new MathSubSup();
457 msubsup.addMathElement(elemOrQuestion(p1));
458 msubsup.addMathElement(elemOrQuestion(p2));
459 msubsup.addMathElement(elemOrQuestion(p3));
460 me = msubsup;
461 } else if ("accent".equals(nomfct)) {
462 final MathOver mover = new MathOver();
463 mover.setAccent(true);
464 mover.addMathElement(elemOrQuestion(p1));
465 mover.addMathElement(elemOrQuestion(p2));
466 me = mover;
467 } else if ("matrix".equals(nomfct) || "matrice".equals(nomfct)) {
468 me = new MathRow();
469 MathOperator mo = new MathOperator();
470449 mo.addText("(");
471450 me.addMathElement(mo);
472 final MathTable mtable = new MathTable();
473 for (final MathElement mel : vp)
474 mtable.addMathElement(elemOrQuestion(mel));
475 me.addMathElement(mtable);
451 }
452 me.addMathElement(p1.versMathML());
453 if (!(p1 instanceof JEQVariable || p1 instanceof JEQNombre)) {
476454 mo = new MathOperator();
477455 mo.addText(")");
478456 me.addMathElement(mo);
479 } else if ("system".equals(nomfct) || "système".equals(nomfct)) {
480 me = new MathRow();
481 final MathOperator mo = new MathOperator();
482 mo.addText("{");
457 }
458 mo = new MathOperator();
459 mo.addText("!");
460 me.addMathElement(mo);
461 } else if ("int".equals(nomfct) || "intégrale".equals(nomfct)) {
462 me = new MathRow();
463 MathOperator mo = new MathOperator();
464 mo.addText("\u222B");
465 mo.setStretchy(true);
466 if (p3 != null && p4 != null) {
467 final MathUnderOver munderover = new MathUnderOver();
468 munderover.addMathElement(mo);
469 munderover.addMathElement(elemOrQuestion(p3));
470 munderover.addMathElement(elemOrQuestion(p4));
471 me.addMathElement(munderover);
472 } else if (p3 != null) {
473 final MathUnder munder = new MathUnder();
474 munder.addMathElement(mo);
475 munder.addMathElement(elemOrQuestion(p3));
476 me.addMathElement(munder);
477 } else if (p4 != null) {
478 final MathOver mover = new MathOver();
479 mover.addMathElement(mo);
480 mover.addMathElement(elemOrQuestion(p4));
481 me.addMathElement(mover);
482 } else
483483 me.addMathElement(mo);
484 final MathTable mtable = new MathTable();
485 for (final MathElement mel : vp) {
486 final MathRow mrow = new MathRow();
487 final MathTableData mtd = new MathTableData();
488 mtd.setColumnAlign("left");
489 mtd.addMathElement(elemOrQuestion(mel));
490 mrow.addMathElement(mtd);
491 mtable.addMathElement(mrow);
484 final MathRow mrow = new MathRow();
485 mrow.addMathElement(elemOrQuestion(p1));
486 // <mo> &InvisibleTimes; </mo>
487 if (p2 != null) {
488 mo = new MathOperator();
489 mo.addText("d"); // &DifferentialD;
490 mrow.addMathElement(mo);
491 mrow.addMathElement(p2.versMathML());
492 }
493 me.addMathElement(mrow);
494 } else if ("prod".equals(nomfct) || "sum".equals(nomfct) ||
495 "produit".equals(nomfct) || "somme".equals(nomfct)) {
496 me = new MathRow();
497 final MathUnderOver munderover = new MathUnderOver();
498 final MathOperator mo = new MathOperator();
499 if ("prod".equals(nomfct) || "produit".equals(nomfct))
500 mo.addText("\u220F");
501 else if ("sum".equals(nomfct) || "somme".equals(nomfct))
502 mo.addText("\u2211");
503 mo.setStretchy(true);
504 munderover.addMathElement(mo);
505 munderover.addMathElement(elemOrQuestion(p2));
506 munderover.addMathElement(elemOrQuestion(p3));
507 me.addMathElement(munderover);
508 final MathRow mrow = new MathRow();
509 mrow.addMathElement(elemOrQuestion(p1));
510 me.addMathElement(mrow);
511 } else if ("over".equals(nomfct) || "dessus".equals(nomfct)) {
512 final MathOver mover = new MathOver();
513 mover.addMathElement(elemOrQuestion(p1));
514 mover.addMathElement(elemOrQuestion(p2));
515 me = mover;
516 } else if ("subsup".equals(nomfct)) {
517 final MathSubSup msubsup = new MathSubSup();
518 msubsup.addMathElement(elemOrQuestion(p1));
519 msubsup.addMathElement(elemOrQuestion(p2));
520 msubsup.addMathElement(elemOrQuestion(p3));
521 me = msubsup;
522 } else if ("accent".equals(nomfct)) {
523 final MathOver mover = new MathOver();
524 mover.setAccent(true);
525 mover.addMathElement(elemOrQuestion(p1));
526 mover.addMathElement(elemOrQuestion(p2));
527 me = mover;
528 } else if ("matrix".equals(nomfct) || "matrice".equals(nomfct)) {
529 me = new MathRow();
530 MathOperator mo = new MathOperator();
531 mo.addText("(");
532 me.addMathElement(mo);
533 final MathTable mtable = new MathTable();
534 for (final JEQ mel : vp)
535 mtable.addMathElement(elemOrQuestion(mel));
536 me.addMathElement(mtable);
537 mo = new MathOperator();
538 mo.addText(")");
539 me.addMathElement(mo);
540 } else if ("system".equals(nomfct) || "système".equals(nomfct)) {
541 me = new MathRow();
542 final MathOperator mo = new MathOperator();
543 mo.addText("{");
544 me.addMathElement(mo);
545 final MathTable mtable = new MathTable();
546 for (final JEQ mel : vp) {
547 final MathRow mrow = new MathRow();
548 final MathTableData mtd = new MathTableData();
549 mtd.setColumnAlign("left");
550 mtd.addMathElement(elemOrQuestion(mel));
551 mrow.addMathElement(mtd);
552 mtable.addMathElement(mrow);
553 }
554 me.addMathElement(mtable);
555 } else if ("line".equals(nomfct) || "ligne".equals(nomfct)) {
556 me = new MathTableRow();
557 for (final JEQ mel : vp) {
558 final MathTableData mtd = new MathTableData();
559 mtd.addMathElement(elemOrQuestion(mel));
560 me.addMathElement(mtd);
561 }
562 } else if ("slash".equals(nomfct)) {
563 me = new MathRow();
564 me.addMathElement(elemOrQuestion(p1));
565 final MathOperator mo = new MathOperator();
566 mo.addText("/"); // could be \u2215
567 me.addMathElement(mo);
568 me.addMathElement(elemOrQuestion(p2));
569 } else if ("frac".equals(nomfct) || "fraction".equals(nomfct)) {
570 final MathFrac mfrac = new MathFrac();
571 mfrac.addMathElement(elemOrQuestion(p1));
572 mfrac.addMathElement(elemOrQuestion(p2));
573 me = mfrac;
574 } else if ("pscalaire".equals(nomfct) || "scalarp".equals(nomfct)) {
575 final MathRow mrow = new MathRow();
576 mrow.addMathElement(elemOrQuestion(p1));
577 final MathOperator mo = new MathOperator();
578 mo.addText(".");
579 mrow.addMathElement(mo);
580 mrow.addMathElement(elemOrQuestion(p2));
581 return mrow;
582 } else if ("dtemps".equals(nomfct) || "timed".equals(nomfct)) {
583 final MathOver mover = new MathOver();
584 mover.setAccent(true);
585 mover.addMathElement(elemOrQuestion(p1));
586 MathText mt = new MathText();
587 if (p2 instanceof JEQNombre) {
588 try {
589 final int n = Integer.parseInt(((JEQNombre)p2).valeur);
590 String spts = "";
591 for (int i=0; i<n; i++)
592 spts = spts + '.';
593 mt.addText(spts);
594 } catch (final NumberFormatException ex) {
595 mt.addText("?");
492596 }
493 me.addMathElement(mtable);
494 } else if ("line".equals(nomfct) || "ligne".equals(nomfct)) {
495 me = new MathTableRow();
496 for (final MathElement mel : vp) {
497 final MathTableData mtd = new MathTableData();
498 mtd.addMathElement(elemOrQuestion(mel));
499 me.addMathElement(mtd);
500 }
501 } else if ("slash".equals(nomfct)) {
502 me = new MathRow();
503 me.addMathElement(elemOrQuestion(p1));
504 final MathOperator mo = new MathOperator();
505 mo.addText("/"); // could be \u2215
506 me.addMathElement(mo);
507 me.addMathElement(elemOrQuestion(p2));
508 } else if ("frac".equals(nomfct) || "fraction".equals(nomfct)) {
509 final MathFrac mfrac = new MathFrac();
510 mfrac.addMathElement(elemOrQuestion(p1));
511 mfrac.addMathElement(elemOrQuestion(p2));
512 me = mfrac;
513 } else if ("pscalaire".equals(nomfct) || "scalarp".equals(nomfct)) {
514 final MathRow mrow = new MathRow();
515 mrow.addMathElement(elemOrQuestion(p1));
516 final MathOperator mo = new MathOperator();
517 mo.addText(".");
518 mrow.addMathElement(mo);
519 mrow.addMathElement(elemOrQuestion(p2));
520 return mrow;
521 } else if ("dtemps".equals(nomfct) || "timed".equals(nomfct)) {
522 final MathOver mover = new MathOver();
523 mover.setAccent(true);
524 mover.addMathElement(elemOrQuestion(p1));
525 if (p2 instanceof MathNumber) {
526 try {
527 final int n = Integer.parseInt(p2.getText());
528 p2 = new MathText();
529 String spts = "";
530 for (int i=0; i<n; i++)
531 spts = spts + '.';
532 p2.addText(spts);
533 } catch (final NumberFormatException ex) {
534 p2 = null;
597 } else
598 mt.addText("?");
599 mover.addMathElement(mt);
600 me = mover;
601 } else if ("unité".equals(nomfct) || "unit".equals(nomfct)) {
602 final MathRow mrow = new MathRow();
603 mrow.addMathElement(elemOrQuestion(p1));
604 final MathOperator mo = new MathOperator();
605 mo.addText(" ");
606 mrow.addMathElement(mo);
607 mrow.addMathElement(elemOrQuestion(p2));
608 return mrow;
609 } else {
610 me = new MathRow();
611 boolean par = true;
612 if (nom instanceof JEQVariable) {
613 MathText mt = new MathText();
614 for (final String[] element : symbols)
615 if (element[0].equals(nomfct)) {
616 nomfct = element[1];
617 break;
535618 }
536 } else
537 p2 = null;
538 mover.addMathElement(elemOrQuestion(p2));
539 me = mover;
540 } else if ("unité".equals(nomfct) || "unit".equals(nomfct)) {
541 final MathRow mrow = new MathRow();
542 mrow.addMathElement(elemOrQuestion(p1));
543 final MathOperator mo = new MathOperator();
544 mo.addText(" ");
545 mrow.addMathElement(mo);
546 mrow.addMathElement(ident2text(elemOrQuestion(p2))); // les unités ne doivent pas être en italique
547 return mrow;
548 } else {
549 me = new MathRow();
550 boolean par = true;
551 if (mfct == null) {
552 mfct = new MathText();
553 for (final String[] element : symbols)
554 if (element[0].equals(nomfct)) {
555 nomfct = element[1];
619 mt.addText(nomfct);
620 if (p2 == null && p1 instanceof JEQVariable)
621 for (final String element : fctnopar)
622 if (element.equals(nomfct)) {
623 par = false;
556624 break;
557625 }
558 mfct.addText(nomfct);
559 if (p2 == null && p1 instanceof MathIdentifier)
560 for (final String element : fctnopar)
561 if (element.equals(nomfct)) {
562 par = false;
563 break;
564 }
626 me.addMathElement(mt);
627 } else
628 me.addMathElement(nom.versMathML());
629 if (par) {
630 final MathOperator mo = new MathOperator();
631 mo.addText("("); // \u2061 = &ApplyFunction; serait mieux mais pas reconnu
632 me.addMathElement(mo);
633 }
634 me.addMathElement(p1.versMathML());
635 for (int i=1; i<vp.size(); i++) { // ATTENTION, LA BOUCLE COMMENCE A 1
636 final MathOperator mo = new MathOperator();
637 mo.addText(";");
638 me.addMathElement(mo);
639 me.addMathElement(vp.get(i).versMathML());
640 }
641 if (par) {
642 final MathOperator mo = new MathOperator();
643 mo.addText(")");
644 me.addMathElement(mo);
645 } else {
646 final MathText mtext = new MathText();
647 mtext.addText("\u00A0"); // nbsp, mspace serait mieux
648 me.addMathElement(mtext);
649 }
650 }
651 return me;
652 }
653 }
654
655 class JEQOperation implements JEQ {
656 char op;
657 JEQ p1, p2;
658 boolean unites;
659 public JEQOperation(final char operateur, final JEQ p1, final JEQ p2) {
660 op = operateur;
661 this.p1 = p1;
662 this.p2 = p2;
663 unites = false;
664 }
665 public void setUnites() {
666 unites = true;
667 if (p1 != null)
668 p1.setUnites();
669 if (p2 != null)
670 p2.setUnites();
671 }
672 public MathElement versMathML() {
673 if (op == '/') {
674 final MathFrac mfrac = new MathFrac();
675 mfrac.addMathElement(elemOrQuestion(p1));
676 mfrac.addMathElement(elemOrQuestion(p2));
677 return mfrac;
678 } else if (op == '^') {
679 final MathSup msup = new MathSup();
680 boolean par;
681 if (p1 instanceof JEQFonction) {
682 String nomfct = ((JEQFonction)p1).getNomFct();
683 if ("sqrt".equals(nomfct) || "racine".equals(nomfct))
684 par = false;
685 else if ("abs".equals(nomfct))
686 par = false;
687 else if ("matrice".equals(nomfct))
688 par = false;
689 else if ("dtemps".equals(nomfct) || "timed".equals(nomfct))
690 par = false;
691 else
692 par = true;
693 } else if (p1 instanceof JEQOperation) {
694 char op = ((JEQOperation)p1).op;
695 if (op == '_')
696 par = false;
697 else
698 par = true;
699
700 } else
701 par = false;
702 MathElement me1;
703 if (par)
704 me1 = ajPar(p1.versMathML());
705 else
706 me1 = elemOrQuestion(p1);
707 msup.addMathElement(me1);
708 msup.addMathElement(elemOrQuestion(p2));
709 return msup;
710 } else if (op == '_') {
711 final MathSub msub = new MathSub();
712 msub.addMathElement(elemOrQuestion(p1));
713 msub.addMathElement(elemOrQuestion(p2));
714 return msub;
715 } else if (op == '*') {
716 final MathRow mrow = new MathRow();
717 MathElement me1 = elemOrQuestion(p1);
718 if (p1 instanceof JEQOperation && "+-".indexOf(((JEQOperation)p1).op) != -1)
719 me1 = ajPar(me1);
720 mrow.addMathElement(me1);
721
722 JEQ dernierDansP1 = p1;
723 if (p1 != null)
724 while (dernierDansP1 instanceof JEQOperation && ((JEQOperation)dernierDansP1).p2 != null) {
725 dernierDansP1 = ((JEQOperation)dernierDansP1).p2;
565726 }
566 me.addMathElement(mfct);
567 if (par) {
727 final boolean p1nombre = dernierDansP1 instanceof JEQNombre;
728 JEQ premierDansP2 = p2;
729 if (p2 != null)
730 while (premierDansP2 instanceof JEQOperation && ((JEQOperation)premierDansP2).p1 != null) {
731 premierDansP2 = ((JEQOperation)premierDansP2).p1;
732 }
733 final boolean p2nombre = premierDansP2 instanceof JEQNombre;
734 boolean pscalaire1 = false;
735 if (p1 instanceof JEQFonction) {
736 final String nomfct = ((JEQFonction)p1).getNomFct();
737 if ("pscalaire".equals(nomfct) || "scalarp".equals(nomfct))
738 pscalaire1 = true;
739 }
740 boolean pscalaire2 = false;
741 if (p2 instanceof JEQFonction) {
742 final String nomfct = ((JEQFonction)p2).getNomFct();
743 if ("pscalaire".equals(nomfct) || "scalarp".equals(nomfct))
744 pscalaire2 = true;
745 }
746 if ((p1nombre && p2nombre) || (pscalaire1 && pscalaire2)) {
747 final MathOperator mo = new MathOperator();
748 mo.addText("×");
749 mrow.addMathElement(mo);
750 } else {
751 if (unites) {
568752 final MathOperator mo = new MathOperator();
569 mo.addText("("); // \u2061 = &ApplyFunction; serait mieux mais pas reconnu
570 me.addMathElement(mo);
753 mo.addText(".");
754 mrow.addMathElement(mo);
571755 }
572 me.addMathElement(p1);
573 for (int i=1; i<vp.size(); i++) { // ATTENTION, LA BOUCLE COMMENCE A 1
574 final MathOperator mo = new MathOperator();
575 mo.addText(";");
576 me.addMathElement(mo);
577 me.addMathElement(vp.get(i));
578 }
579 if (par) {
580 final MathOperator mo = new MathOperator();
581 mo.addText(")");
582 me.addMathElement(mo);
583 } else {
584 final MathText mtext = new MathText();
585 mtext.addText("\u00A0"); // nbsp, mspace serait mieux
586 me.addMathElement(mtext);
587 }
588 }
589 return me;
590 } else if ("hat".equals(s) || "chapeau".equals(s)) {
756 // else <mo> &InvisibleTimes; </mo>
757 }
758
759 MathElement me2 = elemOrQuestion(p2);
760 if (p2 instanceof JEQOperation && "+-".indexOf(((JEQOperation)p2).op) != -1)
761 me2 = ajPar(me2);
762 mrow.addMathElement(me2);
763 return mrow;
764 } else if (op == '-') {
765 final MathRow mrow = new MathRow();
766 if (p1 != null)
767 mrow.addMathElement(p1.versMathML());
768 final MathOperator mo = new MathOperator();
769 mo.addText("-");
770 mrow.addMathElement(mo);
771 if (p2 != null) {
772 MathElement me2 = p2.versMathML();
773 if (p2 instanceof JEQOperation && "+-".indexOf(((JEQOperation)p2).op) != -1)
774 me2 = ajPar(me2);
775 mrow.addMathElement(me2);
776 }
777 return mrow;
778 } else {
779 final MathRow mrow = new MathRow();
780 if (p1 != null)
781 mrow.addMathElement(p1.versMathML());
782 final MathOperator mo = new MathOperator();
783 mo.addText(Character.toString(op));
784 if ("=\u2260\u2248\u2264\u2265\u226A\u226B".indexOf(op) != -1) {
785 // espace autour des opérateurs d'égalité
786 mo.setLspace(0.5);
787 mo.setRspace(0.5);
788 }
789 mrow.addMathElement(mo);
790 if (p2 != null)
791 mrow.addMathElement(p2.versMathML());
792 return mrow;
793 }
794 }
795 private MathElement ajPar(final MathElement me) {
796 final MathRow mrow = new MathRow();
797 MathOperator mo = new MathOperator();
798 mo.addText("(");
799 mrow.addMathElement(mo);
800 mrow.addMathElement(me);
801 mo = new MathOperator();
802 mo.addText(")");
803 mrow.addMathElement(mo);
804 return mrow;
805 }
806 }
807
808 class JEQNombre implements JEQ {
809 String valeur;
810 public JEQNombre(final String valeur) {
811 this.valeur = valeur;
812 }
813 public void setUnites() {
814 }
815 public MathElement versMathML() {
816 final MathNumber mn = new MathNumber();
817 mn.addText(valeur);
818 return mn;
819 }
820 }
821
822 class JEQVariable implements JEQ {
823 String nom;
824 boolean unites;
825 public JEQVariable(final String nom) {
826 this.nom = nom;
827 unites = false;
828 }
829 public void setUnites() {
830 unites = true;
831 }
832 public MathElement versMathML() {
833 if ("hat".equals(nom) || "chapeau".equals(nom)) {
591834 final MathOperator mo = new MathOperator();
592835 mo.setStretchy(true);
593836 mo.addText("^");
594837 return mo;
595 } else if ("bar".equals(s) || "barre".equals(s)) {
838 } else if ("bar".equals(nom) || "barre".equals(nom)) {
596839 final MathOperator mo = new MathOperator();
597840 mo.setStretchy(true);
598841 mo.addText("\u00AF");
599842 return mo;
600843 } else {
844 String s = nom;
601845 for (final String[] element : symbols)
602846 if (element[0].equals(s)) {
603847 s = element[1];
605849 }
606850 if (s.indexOf(',') != -1 || s.indexOf('.') != -1)
607851 s = "?"; // les ',' et les '.' sont interdits dans les noms de variables
608 final MathIdentifier mi = new MathIdentifier();
609 mi.addText(s);
610 return mi;
852 MathElement me;
853 if (unites)
854 me = new MathText(); // les unités ne doivent pas être en italique
855 else
856 me = new MathIdentifier();
857 me.addText(s);
858 return me;
611859 }
612860 }
613 final char op = s.charAt(indop);
614 if (ajparentheses && "+-".indexOf(op) != -1) {
615 final MathRow mrow = new MathRow();
616 MathOperator mo = new MathOperator();
617 mo.addText("(");
618 mrow.addMathElement(mo);
619 mrow.addMathElement(parser(s, false));
620 mo = new MathOperator();
621 mo.addText(")");
622 mrow.addMathElement(mo);
623 return mrow;
624 }
625 boolean par1 = false;
626 boolean par2 = false;
627 if (op == '-')
628 par2 = true;
629 if (op == '*') {
630 par1 = true;
631 par2 = true;
632 }
633 final String s1 = s.substring(0,indop).trim();
634 MathElement p1;
635 if (s1.equals(""))
636 p1 = null;
637 else
638 p1 = parser(s1, par1);
639 final String s2 = s.substring(indop+1).trim();
640 MathElement p2;
641 if (s2.equals(""))
642 p2 = null;
643 else
644 p2 = parser(s2, par2);
645
646 if (op == '/') {
647 final MathFrac mfrac = new MathFrac();
648 mfrac.addMathElement(elemOrQuestion(p1));
649 mfrac.addMathElement(elemOrQuestion(p2));
650 return mfrac;
651 } else if (op == '^') {
652 final MathSup msup = new MathSup();
653 if (p1 instanceof MathFrac || p1 instanceof MathRow || p1 instanceof MathSup) {
654 final MathRow mrow = new MathRow();
655 MathOperator mo = new MathOperator();
656 mo.addText("(");
657 mrow.addMathElement(mo);
658 mrow.addMathElement(p1);
659 mo = new MathOperator();
660 mo.addText(")");
661 mrow.addMathElement(mo);
662 p1 = mrow;
663 }
664 msup.addMathElement(elemOrQuestion(p1));
665 msup.addMathElement(elemOrQuestion(p2));
666 return msup;
667 } else if (op == '_') {
668 final MathSub msub = new MathSub();
669 msub.addMathElement(elemOrQuestion(p1));
670 msub.addMathElement(elemOrQuestion(p2));
671 return msub;
672 } else if (op == '*') {
673 final MathRow mrow = new MathRow();
674 mrow.addMathElement(elemOrQuestion(p1));
675
676 MathElement dernierDansP1 = p1;
677 if (p1 != null)
678 while (dernierDansP1.getMathElementCount() > 1)
679 dernierDansP1 = dernierDansP1.getMathElement(
680 dernierDansP1.getMathElementCount()-1);
681 final boolean p1nombre = dernierDansP1 instanceof MathNumber;
682 MathElement premierDansP2 = p2;
683 if (p2 != null)
684 while (premierDansP2.getMathElementCount() > 1)
685 premierDansP2 = premierDansP2.getMathElement(0);
686 final boolean p2nombre = premierDansP2 instanceof MathNumber;
687 if (p1nombre && p2nombre) {
688 final MathOperator mo = new MathOperator();
689 mo.addText("×");
690 mrow.addMathElement(mo);
691 } // else <mo> &InvisibleTimes; </mo>
692
693 mrow.addMathElement(elemOrQuestion(p2));
694 return mrow;
695 } else {
696 final MathRow mrow = new MathRow();
697 if (p1 != null)
698 mrow.addMathElement(p1);
699 final MathOperator mo = new MathOperator();
700 mo.addText(Character.toString(op));
701 if ("=\u2260\u2248\u2264\u2265\u226A\u226B".indexOf(op) != -1) {
702 // espace autour des opérateurs d'égalité
703 mo.setLspace(0.5);
704 mo.setRspace(0.5);
705 }
706 mrow.addMathElement(mo);
707 if (p2 != null)
708 mrow.addMathElement(p2);
709 return mrow;
710 }
711 }
712
713 private static MathElement elemOrQuestion(final MathElement me) {
714 if (me != null)
715 return me;
716 final MathText mtext = new MathText();
717 mtext.addText("?");
718 return mtext;
719 }
720
721 private static MathElement ident2text(final MathElement me) {
722 if (me instanceof MathIdentifier) {
723 final MathText me2 = new MathText();
724 me2.addText(me.getText());
725 return(me2);
726 } else {
727 for (int i=0; i<me.getMathElementCount(); i++)
728 me.setMathElementAt(ident2text(me.getMathElement(i)), i);
729 return(me);
730 }
731861 }
732862 }
4646 // (assuming MacOS version will not be compiled in other environments)
4747 for (final String currentClassName : className) {
4848 try {
49 final Class mjimpl = Class.forName(currentClassName);
49 final Class<?> mjimpl = Class.forName(currentClassName);
5050 //final Class[] tc = { Jaxe.class };
5151 //Constructor cons = mjimpl.getConstructor(tc);
5252 final Constructor cons = mjimpl.getConstructor((Class[])null);
Binary diff not shown
Binary diff not shown
3535 <key>CFBundlePackageType</key>
3636 <string>APPL</string>
3737 <key>CFBundleShortVersionString</key>
38 <string>3.2</string>
38 <string>3.3</string>
3939 <key>CFBundleSignature</key>
4040 <string>????</string>
4141 <key>CFBundleVersion</key>
42 <string>3.2</string>
42 <string>3.3</string>
4343 <key>Java</key>
4444 <dict>
4545 <key>VMOptions</key>
00 <launch4jConfig>
11 <dontWrapJar>true</dontWrapJar>
2 <headerType>0</headerType>
2 <headerType>gui</headerType>
33 <jar>lib/Jaxe.jar</jar>
4 <outfile>Jaxe.exe</outfile>
4 <outfile>/Users/damien/Java/Jaxe/launch4j/Jaxe.exe</outfile>
55 <errTitle></errTitle>
6 <jarArgs></jarArgs>
6 <cmdLine></cmdLine>
77 <chdir>.</chdir>
8 <priority>normal</priority>
9 <downloadUrl>http://java.com/download</downloadUrl>
10 <supportUrl></supportUrl>
811 <customProcName>false</customProcName>
912 <stayAlive>false</stayAlive>
10 <icon>Jaxe.ico</icon>
13 <manifest></manifest>
14 <icon>/Users/damien/Java/Jaxe/launch4j/Jaxe.ico</icon>
1115 <jre>
1216 <path></path>
1317 <minVersion>1.5.0</minVersion>
1418 <maxVersion></maxVersion>
15 <initialHeapSize>0</initialHeapSize>
16 <maxHeapSize>0</maxHeapSize>
17 <args></args>
19 <jdkPreference>preferJre</jdkPreference>
1820 </jre>
1921 <versionInfo>
20 <fileVersion>3.2.0.0</fileVersion>
21 <txtFileVersion>3.2</txtFileVersion>
22 <fileVersion>3.3.0.0</fileVersion>
23 <txtFileVersion>3.3</txtFileVersion>
2224 <fileDescription>Jaxe - Java XML Editor</fileDescription>
2325 <copyright>GPL</copyright>
24 <productVersion>3.2.0.0</productVersion>
25 <txtProductVersion>3.2</txtProductVersion>
26 <productVersion>3.3.0.0</productVersion>
27 <txtProductVersion>3.3</txtProductVersion>
2628 <productName>Jaxe</productName>
2729 <companyName></companyName>
2830 <internalName>Jaxe</internalName>
symboles/grec-majuscules/Delta.gif less more
Binary diff not shown
symboles/grec-majuscules/Gamma.gif less more
Binary diff not shown
symboles/grec-majuscules/Lambda.gif less more
Binary diff not shown
symboles/grec-majuscules/Omega.gif less more
Binary diff not shown
symboles/grec-majuscules/Phi.gif less more
Binary diff not shown
symboles/grec-majuscules/Pi.gif less more
Binary diff not shown
symboles/grec-majuscules/Psi.gif less more
Binary diff not shown
symboles/grec-majuscules/Sigma.gif less more
Binary diff not shown
symboles/grec-majuscules/Theta.gif less more
Binary diff not shown
symboles/grec-majuscules/Xi.gif less more
Binary diff not shown
symboles/grec-majuscules/sigmaf.gif less more
Binary diff not shown
symboles/grec-majuscules/thetasym.gif less more
Binary diff not shown
symboles/grec-minuscules/alpha.gif less more
Binary diff not shown
symboles/grec-minuscules/beta.gif less more
Binary diff not shown
symboles/grec-minuscules/chi.gif less more
Binary diff not shown
symboles/grec-minuscules/delta.gif less more
Binary diff not shown
symboles/grec-minuscules/epsilon.gif less more
Binary diff not shown
symboles/grec-minuscules/eta.gif less more
Binary diff not shown
symboles/grec-minuscules/gamma.gif less more
Binary diff not shown
symboles/grec-minuscules/iota.gif less more
Binary diff not shown
symboles/grec-minuscules/kappa.gif less more
Binary diff not shown
symboles/grec-minuscules/lambda.gif less more
Binary diff not shown
symboles/grec-minuscules/mu.gif less more
Binary diff not shown
symboles/grec-minuscules/nu.gif less more
Binary diff not shown
symboles/grec-minuscules/omega.gif less more
Binary diff not shown
symboles/grec-minuscules/omicron.gif less more
Binary diff not shown
symboles/grec-minuscules/phi.gif less more
Binary diff not shown
symboles/grec-minuscules/phi2.gif less more
Binary diff not shown
symboles/grec-minuscules/pi.gif less more
Binary diff not shown
symboles/grec-minuscules/piv.gif less more
Binary diff not shown
symboles/grec-minuscules/psi.gif less more
Binary diff not shown
symboles/grec-minuscules/rho.gif less more
Binary diff not shown
symboles/grec-minuscules/sigma.gif less more
Binary diff not shown
symboles/grec-minuscules/tau.gif less more
Binary diff not shown
symboles/grec-minuscules/theta.gif less more
Binary diff not shown
symboles/grec-minuscules/upsilon.gif less more
Binary diff not shown
symboles/grec-minuscules/xi.gif less more
Binary diff not shown
symboles/grec-minuscules/zeta.gif less more
Binary diff not shown
symboles/maths/asymp.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/cap.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/cup.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/exist.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/forall.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/ge.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/harr.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/hdarr.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/infin.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/isin.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/larr.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/ldarr.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/le.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/nabla.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/ne.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/not.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/part.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/plusmn.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/rarr.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/rdarr.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/sim.gif less more
Binary diff not shown
Binary diff not shown
symboles/maths/sub.gif less more
Binary diff not shown
Binary diff not shown