metanorma-bipm 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3acf341b606e1c45ba970fa51074d7ff9cb2cfb424a0a4439821af1b5f76f6bf
4
- data.tar.gz: 15d7d12f963aee720825f1a4481670efde7430dd02aaca56cebecdb1d7190999
3
+ metadata.gz: a0e8acf33a7fceea3050a35b6d104de2a50936c05f29a5e30025cad7fe45c835
4
+ data.tar.gz: 5a7b43fd90b235369e3aa8456821d121ff994dec4a34e9133bdd1e64c5aea236
5
5
  SHA512:
6
- metadata.gz: cb967276a656a03fde3b69145a43ce1b01805bac6123ca205127317943c89d3154276a4cffd526dde879cc561bc7cf97eba895cd2f9d5b8b8390ddd3041b0e05
7
- data.tar.gz: 3d8075a9b34a50e72009eb55498ec16fdab6b075a63af4638dcb95e2c61408bc20199fac99115449c4234c4d8afe3050d3040883a1bd3f2933fd43fb6cb8dc84
6
+ metadata.gz: 38fed8bc9d7b0b7624d3924d9503d8073fef2fdea8fbb56975642160713d48a053e46073d4ec5a23ca22916cccd6c31d22d0e8a5dc5b9fe62624ecc1fd964adc
7
+ data.tar.gz: 95b610c7b041e243c14a2c98dfa36aa8647798327b7fff5b8acb5ae6915dc6a0e82a5cdcced4f0b423ae08e351159393e7676f58ebf835a1913a0da4d55846ad
@@ -36,6 +36,9 @@ jobs:
36
36
  with:
37
37
  ruby-version: ${{ matrix.ruby }}
38
38
 
39
+ - if: matrix.os == 'macos-latest'
40
+ run: brew install autoconf automake libtool
41
+
39
42
  - uses: actions/cache@v2
40
43
  with:
41
44
  path: vendor/bundle
@@ -107,10 +107,9 @@ module Asciidoctor
107
107
  t1 << Asciidoctor::Standoc::Utils::asciidoc_sub(
108
108
  node.attr("title-#{lang}"))
109
109
  end
110
- typed_title(node, xml, lang, "cover")
111
- typed_title(node, xml, lang, "appendix")
112
- typed_title(node, xml, lang, "part")
113
- typed_title(node, xml, lang, "subpart")
110
+ %w(cover appendix annex part subpart).each do |w|
111
+ typed_title(node, xml, lang, w)
112
+ end
114
113
  end
115
114
  end
116
115
 
@@ -253,6 +253,9 @@
253
253
  <data type="boolean"/>
254
254
  </attribute>
255
255
  </optional>
256
+ <optional>
257
+ <attribute name="width"/>
258
+ </optional>
256
259
  <optional>
257
260
  <ref name="colgroup"/>
258
261
  </optional>
@@ -836,6 +839,9 @@
836
839
  <data type="boolean"/>
837
840
  </attribute>
838
841
  </optional>
842
+ <optional>
843
+ <attribute name="number"/>
844
+ </optional>
839
845
  <optional>
840
846
  <attribute name="obligation">
841
847
  <choice>
@@ -891,9 +897,11 @@
891
897
  <element name="code">
892
898
  <text/>
893
899
  </element>
894
- <element name="text">
895
- <text/>
896
- </element>
900
+ <optional>
901
+ <element name="text">
902
+ <text/>
903
+ </element>
904
+ </optional>
897
905
  </element>
898
906
  </define>
899
907
  <define name="standard-document">
@@ -1063,6 +1071,9 @@
1063
1071
  </choice>
1064
1072
  </attribute>
1065
1073
  </optional>
1074
+ <optional>
1075
+ <attribute name="number"/>
1076
+ </optional>
1066
1077
  <optional>
1067
1078
  <attribute name="type"/>
1068
1079
  </optional>
@@ -1116,6 +1127,9 @@
1116
1127
  <optional>
1117
1128
  <attribute name="type"/>
1118
1129
  </optional>
1130
+ <optional>
1131
+ <attribute name="number"/>
1132
+ </optional>
1119
1133
  <optional>
1120
1134
  <ref name="section-title"/>
1121
1135
  </optional>
@@ -1218,6 +1232,9 @@
1218
1232
  <optional>
1219
1233
  <attribute name="type"/>
1220
1234
  </optional>
1235
+ <optional>
1236
+ <attribute name="number"/>
1237
+ </optional>
1221
1238
  <optional>
1222
1239
  <attribute name="obligation">
1223
1240
  <choice>
@@ -1546,6 +1563,7 @@
1546
1563
  <value>add</value>
1547
1564
  <value>modify</value>
1548
1565
  <value>delete</value>
1566
+ <value>replace</value>
1549
1567
  </choice>
1550
1568
  </attribute>
1551
1569
  <optional>
@@ -1576,6 +1594,11 @@
1576
1594
  </optional>
1577
1595
  <optional>
1578
1596
  <element name="newcontent">
1597
+ <optional>
1598
+ <attribute name="id">
1599
+ <data type="ID"/>
1600
+ </attribute>
1601
+ </optional>
1579
1602
  <zeroOrMore>
1580
1603
  <ref name="BasicBlock"/>
1581
1604
  </zeroOrMore>
@@ -16,7 +16,7 @@ module IsoDoc
16
16
  if @jcgm
17
17
  super
18
18
  else
19
- middle_title(out)
19
+ middle_title(isoxml, out)
20
20
  middle_admonitions(isoxml, out)
21
21
  clause isoxml, out
22
22
  annex isoxml, out
@@ -1127,18 +1127,22 @@
1127
1127
  <fo:block-container font-size="18pt" font-weight="bold" text-align="center">
1128
1128
  <fo:block>
1129
1129
 
1130
- <xsl:variable name="title">
1131
- <xsl:choose>
1132
- <xsl:when test="$independentAppendix != ''">
1133
- <xsl:value-of select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='appendix']"/>
1134
- </xsl:when>
1135
- <xsl:otherwise> <!-- doctype = 'guide' -->
1136
- <xsl:value-of select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='main']"/>
1137
- </xsl:otherwise>
1138
- </xsl:choose>
1139
- </xsl:variable>
1130
+ <!-- <xsl:variable name="title"> -->
1131
+ <xsl:choose>
1132
+ <xsl:when test="$independentAppendix != ''">
1133
+ <xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='appendix']" mode="title"/>
1134
+ <fo:block>
1135
+ <xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='annex']" mode="title"/>
1136
+ </fo:block>
1137
+ </xsl:when>
1138
+ <xsl:otherwise> <!-- doctype = 'guide' -->
1139
+ <xsl:apply-templates select="//bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type='main']" mode="title"/>
1140
+ </xsl:otherwise>
1141
+ </xsl:choose>
1142
+ <!-- </xsl:variable> -->
1140
1143
 
1141
- <xsl:variable name="mep_text" select="'Mise en pratique'"/>
1144
+
1145
+ <!-- <xsl:variable name="mep_text" select="'Mise en pratique'"/>
1142
1146
 
1143
1147
  <xsl:choose>
1144
1148
  <xsl:when test="$curr_lang = 'en' and contains($title, $mep_text)">
@@ -1149,7 +1153,7 @@
1149
1153
  <xsl:otherwise>
1150
1154
  <xsl:value-of select="$title"/>
1151
1155
  </xsl:otherwise>
1152
- </xsl:choose>
1156
+ </xsl:choose> -->
1153
1157
 
1154
1158
  </fo:block>
1155
1159
 
@@ -1161,7 +1165,7 @@
1161
1165
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang=$curr_lang]),'#',$part_num)"/>
1162
1166
  </xsl:if>
1163
1167
  <xsl:text>: </xsl:text>
1164
- <xsl:value-of select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']"/>
1168
+ <xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']" mode="title"/>
1165
1169
  </fo:block>
1166
1170
  </xsl:if>
1167
1171
  <xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
@@ -1171,7 +1175,7 @@
1171
1175
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang=$curr_lang]),'#',$subpart_num)"/>
1172
1176
  </xsl:if>
1173
1177
  <xsl:text>: </xsl:text>
1174
- <xsl:value-of select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart']"/>
1178
+ <xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'subpart']" mode="title"/>
1175
1179
  </fo:block>
1176
1180
  </xsl:if>
1177
1181
 
@@ -1354,71 +1358,130 @@
1354
1358
  <fo:block font-size="14pt" font-weight="{$weight-bold}" margin-top="4mm"><xsl:value-of select="concat((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:edition, ' ', $edition_str, ' ', $copyrightYear)"/></fo:block>
1355
1359
  </fo:block-container>
1356
1360
 
1357
- <fo:block-container height="98%" display-align="center">
1361
+ <!-- <fo:block-container height="98%" display-align="center"> -->
1362
+ <fo:block-container absolute-position="fixed" left="12.5mm" top="92mm" height="170mm" width="144mm" display-align="center">
1358
1363
  <fo:block>
1364
+
1365
+ <xsl:variable name="title_appendix_fr">
1366
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'appendix']" mode="title"/>
1367
+ </xsl:variable>
1368
+ <xsl:variable name="title_appendix_en">
1369
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'appendix']" mode="title"/>
1370
+ </xsl:variable>
1371
+ <xsl:variable name="title_annex_fr">
1372
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'annex']" mode="title"/>
1373
+ </xsl:variable>
1374
+ <xsl:variable name="title_annex_en">
1375
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'annex']" mode="title"/>
1376
+ </xsl:variable>
1377
+ <xsl:variable name="title_part_fr">
1378
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'part']" mode="title"/>
1379
+ </xsl:variable>
1380
+ <xsl:variable name="title_part_en">
1381
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']" mode="title"/>
1382
+ </xsl:variable>
1383
+ <xsl:variable name="title_subpart_fr">
1384
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'subpart']" mode="title"/>
1385
+ </xsl:variable>
1386
+ <xsl:variable name="title_subpart_en">
1387
+ <xsl:apply-templates select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'subpart']" mode="title"/>
1388
+ </xsl:variable>
1389
+
1390
+ <xsl:variable name="titles_length" select="string-length($title_appendix_fr) + string-length($title_appendix_en) + string-length($title_annex_fr) + string-length($title_annex_en) + string-length($title_part_fr) + string-length($title_part_en) + string-length($title_subpart_fr) + string-length($title_subpart_fr)"/>
1391
+
1392
+ <xsl:variable name="font-size-number-factor">
1393
+ <xsl:choose>
1394
+ <xsl:when test="$titles_length &gt; 350">0.7</xsl:when>
1395
+ <xsl:when test="$titles_length &gt; 250">0.85</xsl:when>
1396
+ <xsl:otherwise>1</xsl:otherwise>
1397
+ </xsl:choose>
1398
+ </xsl:variable>
1399
+
1400
+ <xsl:variable name="space-factor">
1401
+ <xsl:choose>
1402
+ <xsl:when test="$titles_length &gt; 250">0.3</xsl:when>
1403
+ <xsl:otherwise>1</xsl:otherwise>
1404
+ </xsl:choose>
1405
+ </xsl:variable>
1406
+
1407
+ <xsl:variable name="font-size-factor">
1408
+ <xsl:choose>
1409
+ <xsl:when test="$titles_length &gt; 350">0.5</xsl:when>
1410
+ <xsl:when test="$titles_length &gt; 250">0.65</xsl:when>
1411
+ <xsl:otherwise>1</xsl:otherwise>
1412
+ </xsl:choose>
1413
+ </xsl:variable>
1414
+
1359
1415
  <!-- Appendix titles processing -->
1360
1416
  <xsl:variable name="appendix_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix)"/>
1361
1417
  <xsl:if test="$appendix_num != ''">
1362
- <fo:block font-size="17pt" font-weight="{$weight-normal}">Annexe <xsl:value-of select="$appendix_num"/></fo:block>
1363
- <fo:block font-size="17pt" font-weight="{$weight-bold}">Appendix <xsl:value-of select="$appendix_num"/></fo:block>
1418
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}">Annexe <xsl:value-of select="$appendix_num"/></fo:block>
1419
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}">Appendix <xsl:value-of select="$appendix_num"/></fo:block>
1364
1420
  </xsl:if>
1365
-
1421
+
1422
+
1366
1423
  <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'appendix']">
1367
- <fo:block font-size="30.4pt">
1368
- <fo:block> </fo:block>
1369
- <fo:block font-weight="{$weight-normal}"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'appendix']"/></fo:block>
1370
- <fo:block> </fo:block>
1424
+ <fo:block font-size="{$font-size-factor * 30.4}pt">
1425
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1426
+ <fo:block font-weight="{$weight-normal}"><xsl:copy-of select="$title_appendix_fr"/></fo:block>
1427
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1371
1428
  <fo:block font-weight="{$weight-bold}">
1372
- <xsl:variable name="title_en" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'appendix']"/>
1373
- <xsl:variable name="mep_text" select="'Mise en pratique'"/>
1374
- <xsl:choose>
1375
- <xsl:when test="contains($title_en, $mep_text)">
1376
- <xsl:value-of select="substring-before($title_en, $mep_text)"/>
1377
- <xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
1378
- <xsl:value-of select="substring-after($title_en, $mep_text)"/>
1379
- </xsl:when>
1380
- <xsl:otherwise>
1381
- <xsl:value-of select="$title_en"/>
1382
- </xsl:otherwise>
1383
- </xsl:choose>
1429
+ <xsl:copy-of select="$title_appendix_en"/>
1384
1430
  </fo:block>
1385
1431
  </fo:block>
1386
1432
  </xsl:if>
1387
1433
  <!-- End Appendix titles processing -->
1388
1434
 
1435
+ <!-- Annex title processing -->
1436
+ <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'annex']">
1437
+ <xsl:variable name="annex_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:annexid)"/>
1438
+ <xsl:if test="$annex_num != ''">
1439
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1440
+ <!-- Annexe -->
1441
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}">Annexe <xsl:value-of select="$annex_num"/></fo:block>
1442
+ <!-- Annex -->
1443
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}">Annex <xsl:value-of select="$annex_num"/></fo:block>
1444
+ </xsl:if>
1445
+
1446
+ <fo:block font-size="{$font-size-factor * 30.4}pt">
1447
+
1448
+ <xsl:if test="normalize-space($title_annex_fr) != ''">
1449
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1450
+ <fo:block font-weight="{$weight-normal}"><xsl:copy-of select="$title_annex_fr"/></fo:block>
1451
+ </xsl:if>
1452
+
1453
+ <xsl:if test="normalize-space($title_annex_en) != ''">
1454
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1455
+ <fo:block font-weight="{$weight-bold}">
1456
+ <xsl:copy-of select="$title_annex_en"/>
1457
+ </fo:block>
1458
+ </xsl:if>
1459
+ </fo:block>
1460
+ </xsl:if>
1461
+ <!-- End Annex titles processing -->
1389
1462
 
1390
- <!-- Part titles processing -->
1463
+ <!-- Part titles processing -->
1391
1464
  <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'part']">
1392
1465
  <xsl:variable name="part_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
1393
1466
  <xsl:if test="$part_num != ''">
1467
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1394
1468
  <!-- Part -->
1395
- <fo:block font-size="17pt" font-weight="{$weight-normal}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part_num)"/></fo:block>
1469
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part_num)"/></fo:block>
1396
1470
  <!-- Partie -->
1397
- <fo:block font-size="17pt" font-weight="{$weight-bold}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part_num)"/></fo:block>
1471
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part_num)"/></fo:block>
1398
1472
  </xsl:if>
1399
1473
 
1400
- <fo:block font-size="30.4pt">
1474
+ <fo:block font-size="{$font-size-factor * 30.4}pt">
1401
1475
 
1402
- <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'part']">
1403
- <fo:block> </fo:block>
1404
- <fo:block font-weight="{$weight-normal}"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'part']"/></fo:block>
1476
+ <xsl:if test="normalize-space($title_part_fr) != ''">
1477
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1478
+ <fo:block font-weight="{$weight-normal}"><xsl:copy-of select="$title_part_fr"/></fo:block>
1405
1479
  </xsl:if>
1406
1480
 
1407
- <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']">
1408
- <fo:block> </fo:block>
1481
+ <xsl:if test="normalize-space($title_part_en) != ''">
1482
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1409
1483
  <fo:block font-weight="{$weight-bold}">
1410
- <xsl:variable name="title_en" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']"/>
1411
- <xsl:variable name="mep_text" select="'Mise en pratique'"/>
1412
- <xsl:choose>
1413
- <xsl:when test="contains($title_en, $mep_text)">
1414
- <xsl:value-of select="substring-before($title_en, $mep_text)"/>
1415
- <xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
1416
- <xsl:value-of select="substring-after($title_en, $mep_text)"/>
1417
- </xsl:when>
1418
- <xsl:otherwise>
1419
- <xsl:value-of select="$title_en"/>
1420
- </xsl:otherwise>
1421
- </xsl:choose>
1484
+ <xsl:copy-of select="$title_part_en"/>
1422
1485
  </fo:block>
1423
1486
  </xsl:if>
1424
1487
  </fo:block>
@@ -1429,34 +1492,25 @@
1429
1492
  <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'subpart']">
1430
1493
  <xsl:variable name="subpart_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
1431
1494
  <xsl:if test="$subpart_num != ''">
1495
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1432
1496
  <!-- Sub-part -->
1433
- <fo:block font-size="17pt" font-weight="{$weight-normal}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang='fr']),'#',$subpart_num)"/> <xsl:value-of select="$subpart_num"/></fo:block>
1497
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang='fr']),'#',$subpart_num)"/> <xsl:value-of select="$subpart_num"/></fo:block>
1434
1498
  <!-- Partie de sub -->
1435
- <fo:block font-size="17pt" font-weight="{$weight-bold}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang='en']),'#',$subpart_num)"/> <xsl:value-of select="$subpart_num"/></fo:block>
1499
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-subpart[@lang='en']),'#',$subpart_num)"/> <xsl:value-of select="$subpart_num"/></fo:block>
1436
1500
  </xsl:if>
1437
1501
 
1438
- <fo:block font-size="30.4pt">
1502
+ <fo:block font-size="{$font-size-factor * 30.4}pt">
1439
1503
 
1440
- <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'subpart']">
1441
- <fo:block> </fo:block>
1442
- <fo:block font-weight="{$weight-normal}"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'subpart']"/></fo:block>
1504
+ <xsl:if test="normalize-space($title_subpart_fr) != ''">
1505
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1506
+ <fo:block font-weight="{$weight-normal}"><xsl:copy-of select="$title_subpart_fr"/></fo:block>
1443
1507
  </xsl:if>
1444
1508
 
1445
- <xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'subpart']">
1446
- <fo:block> </fo:block>
1509
+ <xsl:if test="normalize-space($title_subpart_en) != ''">
1510
+ <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1447
1511
  <fo:block font-weight="{$weight-bold}">
1448
- <xsl:variable name="title_en" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'subpart']"/>
1449
- <xsl:variable name="mep_text" select="'Mise en pratique'"/>
1450
- <xsl:choose>
1451
- <xsl:when test="contains($title_en, $mep_text)">
1452
- <xsl:value-of select="substring-before($title_en, $mep_text)"/>
1453
- <xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
1454
- <xsl:value-of select="substring-after($title_en, $mep_text)"/>
1455
- </xsl:when>
1456
- <xsl:otherwise>
1457
- <xsl:value-of select="$title_en"/>
1458
- </xsl:otherwise>
1459
- </xsl:choose>
1512
+ <xsl:copy-of select="$title_subpart_en"/>
1513
+
1460
1514
  </fo:block>
1461
1515
  </xsl:if>
1462
1516
  </fo:block>
@@ -1619,6 +1673,24 @@
1619
1673
  </xsl:template>
1620
1674
  <!-- End Cover Pages -->
1621
1675
 
1676
+
1677
+ <xsl:template match="bipm:bipm-standard/bipm:bibdata/bipm:title[@language = 'en']/text()" priority="3">
1678
+ <xsl:variable name="mep_text" select="'Mise en pratique'"/>
1679
+ <xsl:choose>
1680
+ <xsl:when test="contains(., $mep_text)">
1681
+ <xsl:value-of select="substring-before(., $mep_text)"/>
1682
+ <xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
1683
+ <xsl:value-of select="substring-after(., $mep_text)"/>
1684
+ </xsl:when>
1685
+ <xsl:otherwise>
1686
+ <xsl:value-of select="."/>
1687
+ </xsl:otherwise>
1688
+ </xsl:choose>
1689
+ </xsl:template>
1690
+
1691
+
1692
+
1693
+
1622
1694
  <xsl:template name="insertSeparatorPage">
1623
1695
  <!-- 3 Pages with BIPM Metro logo -->
1624
1696
  <fo:page-sequence master-reference="document" force-page-count="no-force">
@@ -4578,7 +4650,12 @@
4578
4650
 
4579
4651
  <xsl:variable name="table_attributes">
4580
4652
  <attribute name="table-layout">fixed</attribute>
4581
- <attribute name="width">100%</attribute>
4653
+ <attribute name="width">
4654
+ <xsl:choose>
4655
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
4656
+ <xsl:otherwise>100%</xsl:otherwise>
4657
+ </xsl:choose>
4658
+ </attribute>
4582
4659
  <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
4583
4660
  <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
4584
4661
 
@@ -5111,7 +5188,7 @@
5111
5188
 
5112
5189
  <xsl:attribute name="font-weight">normal</xsl:attribute>
5113
5190
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
5114
- <xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
5191
+ <!-- <xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute> -->
5115
5192
  <xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
5116
5193
  <xsl:attribute name="height">8mm</xsl:attribute>
5117
5194
  <xsl:attribute name="padding-top">2mm</xsl:attribute>
@@ -5826,6 +5903,10 @@
5826
5903
  </xsl:if>
5827
5904
  <xsl:apply-templates/>
5828
5905
  </fo:inline>
5906
+ </xsl:template><xsl:template match="*[local-name()='underline']">
5907
+ <fo:inline text-decoration="underline">
5908
+ <xsl:apply-templates/>
5909
+ </fo:inline>
5829
5910
  </xsl:template><xsl:template match="*[local-name()='del']">
5830
5911
  <fo:inline font-size="10pt" color="red" text-decoration="line-through">
5831
5912
  <xsl:apply-templates/>
@@ -7454,6 +7535,8 @@
7454
7535
  <xsl:value-of select="translate(.,'. ','')"/>
7455
7536
  </xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
7456
7537
  <xsl:value-of select="substring(.,1,1)"/>
7538
+ </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
7539
+ <fo:inline><xsl:apply-templates/></fo:inline>
7457
7540
  </xsl:template><xsl:template name="convertDate">
7458
7541
  <xsl:param name="date"/>
7459
7542
  <xsl:param name="format" select="'short'"/>
@@ -7733,6 +7816,11 @@
7733
7816
  <xsl:call-template name="getLang"/>
7734
7817
  </xsl:variable>
7735
7818
 
7736
- <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
7819
+ <xsl:choose>
7820
+ <xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
7821
+ <xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
7822
+ </xsl:when>
7823
+ <xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
7824
+ </xsl:choose>
7737
7825
 
7738
7826
  </xsl:template></xsl:stylesheet>