metanorma-bipm 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/bipm/boilerplate-en.xml +1 -1
- data/lib/asciidoctor/bipm/boilerplate-fr.xml +1 -1
- data/lib/asciidoctor/bipm/converter.rb +12 -0
- data/lib/asciidoctor/bipm/isodoc.rng +15 -0
- data/lib/isodoc/bipm/bipm.brochure.xsl +217 -139
- data/lib/isodoc/bipm/bipm.guide.xsl +217 -139
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +217 -139
- data/lib/isodoc/bipm/bipm.rapport.xsl +217 -139
- data/lib/isodoc/bipm/pdf_convert.rb +9 -1
- data/lib/isodoc/bipm/presentation_xml_convert.rb +4 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma.yml +3 -1
- metadata +2 -2
@@ -101,7 +101,7 @@
|
|
101
101
|
|
102
102
|
|
103
103
|
|
104
|
-
<xsl:variable name="independentAppendix" select="normalize-space(
|
104
|
+
<xsl:variable name="independentAppendix" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix)"/>
|
105
105
|
<!-- <xsl:variable name="independentAppendix" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:title[@type = 'appendix'])"/> -->
|
106
106
|
|
107
107
|
<xsl:variable name="doctype" select="//bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:doctype"/>
|
@@ -726,7 +726,7 @@
|
|
726
726
|
</xsl:choose>
|
727
727
|
</xsl:variable>
|
728
728
|
|
729
|
-
<xsl:number value="$start_value + $curr_value" format="{$format}"/>
|
729
|
+
<xsl:number value="$start_value + $curr_value" format="{$format}" lang="en"/>
|
730
730
|
|
731
731
|
</xsl:otherwise>
|
732
732
|
</xsl:choose>
|
@@ -832,13 +832,15 @@
|
|
832
832
|
<xsl:apply-templates select="bipm:boilerplate/bipm:license-statement"/>
|
833
833
|
|
834
834
|
<fo:block-container absolute-position="fixed" top="200mm" height="69mm" font-family="Times New Roman" text-align="center" display-align="after">
|
835
|
-
<
|
836
|
-
|
837
|
-
|
838
|
-
<
|
839
|
-
<
|
840
|
-
|
841
|
-
|
835
|
+
<fo:block>
|
836
|
+
<xsl:apply-templates select="bipm:boilerplate/bipm:feedback-statement"/>
|
837
|
+
<xsl:variable name="ISBN" select="normalize-space(bipm:bibdata/bipm:docidentifier[@type='ISBN'])"/>
|
838
|
+
<xsl:if test="$ISBN != ''">
|
839
|
+
<fo:block margin-top="15mm">
|
840
|
+
<xsl:text>ISBN </xsl:text><xsl:value-of select="$ISBN"/>
|
841
|
+
</fo:block>
|
842
|
+
</xsl:if>
|
843
|
+
</fo:block>
|
842
844
|
</fo:block-container>
|
843
845
|
|
844
846
|
</fo:flow>
|
@@ -1236,8 +1238,8 @@
|
|
1236
1238
|
|
1237
1239
|
<fo:block-container absolute-position="fixed" left="12.5mm" top="60mm">
|
1238
1240
|
|
1239
|
-
<fo:block font-size="22.2pt" font-weight="{$weight-normal}"><xsl:value-of select="
|
1240
|
-
<fo:block font-size="22.2pt" font-weight="{$weight-bold}" margin-top="1mm"><xsl:value-of select="
|
1241
|
+
<fo:block font-size="22.2pt" font-weight="{$weight-normal}"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'main']"/></fo:block>
|
1242
|
+
<fo:block font-size="22.2pt" font-weight="{$weight-bold}" margin-top="1mm"><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'main']"/></fo:block>
|
1241
1243
|
|
1242
1244
|
<xsl:variable name="edition_str">édition</xsl:variable>
|
1243
1245
|
<!-- <xsl:choose>
|
@@ -1245,63 +1247,25 @@
|
|
1245
1247
|
<xsl:otherwise>edition</xsl:otherwise>
|
1246
1248
|
</xsl:choose>
|
1247
1249
|
</xsl:variable> -->
|
1248
|
-
<fo:block font-size="14pt" font-weight="{$weight-bold}" margin-top="4mm"><xsl:value-of select="concat(
|
1250
|
+
<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>
|
1249
1251
|
</fo:block-container>
|
1250
1252
|
|
1251
1253
|
<fo:block-container height="98%" display-align="center">
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
</xsl:if>
|
1259
|
-
|
1260
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@type = 'appendix']">
|
1261
|
-
<fo:block font-size="30.4pt">
|
1262
|
-
<fo:block> </fo:block>
|
1263
|
-
<fo:block font-weight="{$weight-normal}"><xsl:value-of select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'appendix']"/></fo:block>
|
1264
|
-
<fo:block> </fo:block>
|
1265
|
-
<fo:block font-weight="{$weight-bold}">
|
1266
|
-
<xsl:variable name="title_en" select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = 'en' and @type = 'appendix']"/>
|
1267
|
-
<xsl:variable name="mep_text" select="'Mise en pratique'"/>
|
1268
|
-
<xsl:choose>
|
1269
|
-
<xsl:when test="contains($title_en, $mep_text)">
|
1270
|
-
<xsl:value-of select="substring-before($title_en, $mep_text)"/>
|
1271
|
-
<xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
|
1272
|
-
<xsl:value-of select="substring-after($title_en, $mep_text)"/>
|
1273
|
-
</xsl:when>
|
1274
|
-
<xsl:otherwise>
|
1275
|
-
<xsl:value-of select="$title_en"/>
|
1276
|
-
</xsl:otherwise>
|
1277
|
-
</xsl:choose>
|
1278
|
-
</fo:block>
|
1279
|
-
</fo:block>
|
1280
|
-
</xsl:if>
|
1281
|
-
<!-- End Appendix titles processing -->
|
1282
|
-
|
1283
|
-
|
1284
|
-
<!-- Part titles processing -->
|
1285
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@type = 'part']">
|
1286
|
-
<xsl:variable name="part_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
|
1287
|
-
<xsl:if test="$part_num != ''">
|
1288
|
-
<!-- Part -->
|
1289
|
-
<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>
|
1290
|
-
<!-- Partie -->
|
1291
|
-
<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>
|
1254
|
+
<fo:block>
|
1255
|
+
<!-- Appendix titles processing -->
|
1256
|
+
<xsl:variable name="appendix_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:appendix)"/>
|
1257
|
+
<xsl:if test="$appendix_num != ''">
|
1258
|
+
<fo:block font-size="17pt" font-weight="{$weight-normal}">Annexe <xsl:value-of select="$appendix_num"/></fo:block>
|
1259
|
+
<fo:block font-size="17pt" font-weight="{$weight-bold}">Appendix <xsl:value-of select="$appendix_num"/></fo:block>
|
1292
1260
|
</xsl:if>
|
1293
|
-
|
1294
|
-
<
|
1295
|
-
|
1296
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'part']">
|
1261
|
+
|
1262
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'appendix']">
|
1263
|
+
<fo:block font-size="30.4pt">
|
1297
1264
|
<fo:block> </fo:block>
|
1298
|
-
<fo:block font-weight="{$weight-normal}"><xsl:value-of select="
|
1299
|
-
</xsl:if>
|
1300
|
-
|
1301
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']">
|
1265
|
+
<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>
|
1302
1266
|
<fo:block> </fo:block>
|
1303
1267
|
<fo:block font-weight="{$weight-bold}">
|
1304
|
-
<xsl:variable name="title_en" select="
|
1268
|
+
<xsl:variable name="title_en" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'appendix']"/>
|
1305
1269
|
<xsl:variable name="mep_text" select="'Mise en pratique'"/>
|
1306
1270
|
<xsl:choose>
|
1307
1271
|
<xsl:when test="contains($title_en, $mep_text)">
|
@@ -1314,50 +1278,88 @@
|
|
1314
1278
|
</xsl:otherwise>
|
1315
1279
|
</xsl:choose>
|
1316
1280
|
</fo:block>
|
1317
|
-
</
|
1318
|
-
</fo:block>
|
1319
|
-
</xsl:if>
|
1320
|
-
<!-- End Part titles processing -->
|
1321
|
-
|
1322
|
-
<!-- Sub-part titles processing -->
|
1323
|
-
<xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@type = 'subpart']">
|
1324
|
-
<xsl:variable name="subpart_num" select="normalize-space(/bipm:bipm-standard/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
|
1325
|
-
<xsl:if test="$subpart_num != ''">
|
1326
|
-
<!-- Sub-part -->
|
1327
|
-
<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>
|
1328
|
-
<!-- Partie de sub -->
|
1329
|
-
<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>
|
1281
|
+
</fo:block>
|
1330
1282
|
</xsl:if>
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1283
|
+
<!-- End Appendix titles processing -->
|
1284
|
+
|
1285
|
+
|
1286
|
+
<!-- Part titles processing -->
|
1287
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'part']">
|
1288
|
+
<xsl:variable name="part_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:part)"/>
|
1289
|
+
<xsl:if test="$part_num != ''">
|
1290
|
+
<!-- Part -->
|
1291
|
+
<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>
|
1292
|
+
<!-- Partie -->
|
1293
|
+
<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>
|
1337
1294
|
</xsl:if>
|
1338
|
-
|
1339
|
-
<
|
1340
|
-
|
1341
|
-
<
|
1342
|
-
<
|
1343
|
-
<
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
<xsl:
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1295
|
+
|
1296
|
+
<fo:block font-size="30.4pt">
|
1297
|
+
|
1298
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'part']">
|
1299
|
+
<fo:block> </fo:block>
|
1300
|
+
<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>
|
1301
|
+
</xsl:if>
|
1302
|
+
|
1303
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']">
|
1304
|
+
<fo:block> </fo:block>
|
1305
|
+
<fo:block font-weight="{$weight-bold}">
|
1306
|
+
<xsl:variable name="title_en" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'part']"/>
|
1307
|
+
<xsl:variable name="mep_text" select="'Mise en pratique'"/>
|
1308
|
+
<xsl:choose>
|
1309
|
+
<xsl:when test="contains($title_en, $mep_text)">
|
1310
|
+
<xsl:value-of select="substring-before($title_en, $mep_text)"/>
|
1311
|
+
<xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
|
1312
|
+
<xsl:value-of select="substring-after($title_en, $mep_text)"/>
|
1313
|
+
</xsl:when>
|
1314
|
+
<xsl:otherwise>
|
1315
|
+
<xsl:value-of select="$title_en"/>
|
1316
|
+
</xsl:otherwise>
|
1317
|
+
</xsl:choose>
|
1318
|
+
</fo:block>
|
1319
|
+
</xsl:if>
|
1320
|
+
</fo:block>
|
1321
|
+
</xsl:if>
|
1322
|
+
<!-- End Part titles processing -->
|
1323
|
+
|
1324
|
+
<!-- Sub-part titles processing -->
|
1325
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@type = 'subpart']">
|
1326
|
+
<xsl:variable name="subpart_num" select="normalize-space((//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:structuredidentifier/bipm:subpart)"/>
|
1327
|
+
<xsl:if test="$subpart_num != ''">
|
1328
|
+
<!-- Sub-part -->
|
1329
|
+
<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>
|
1330
|
+
<!-- Partie de sub -->
|
1331
|
+
<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>
|
1355
1332
|
</xsl:if>
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1333
|
+
|
1334
|
+
<fo:block font-size="30.4pt">
|
1335
|
+
|
1336
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'fr' and @type = 'subpart']">
|
1337
|
+
<fo:block> </fo:block>
|
1338
|
+
<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>
|
1339
|
+
</xsl:if>
|
1340
|
+
|
1341
|
+
<xsl:if test="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'subpart']">
|
1342
|
+
<fo:block> </fo:block>
|
1343
|
+
<fo:block font-weight="{$weight-bold}">
|
1344
|
+
<xsl:variable name="title_en" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:title[@language = 'en' and @type = 'subpart']"/>
|
1345
|
+
<xsl:variable name="mep_text" select="'Mise en pratique'"/>
|
1346
|
+
<xsl:choose>
|
1347
|
+
<xsl:when test="contains($title_en, $mep_text)">
|
1348
|
+
<xsl:value-of select="substring-before($title_en, $mep_text)"/>
|
1349
|
+
<xsl:text> </xsl:text><fo:inline font-style="italic"><xsl:value-of select="$mep_text"/></fo:inline><xsl:text> </xsl:text>
|
1350
|
+
<xsl:value-of select="substring-after($title_en, $mep_text)"/>
|
1351
|
+
</xsl:when>
|
1352
|
+
<xsl:otherwise>
|
1353
|
+
<xsl:value-of select="$title_en"/>
|
1354
|
+
</xsl:otherwise>
|
1355
|
+
</xsl:choose>
|
1356
|
+
</fo:block>
|
1357
|
+
</xsl:if>
|
1358
|
+
</fo:block>
|
1359
|
+
</xsl:if>
|
1360
|
+
<!-- End Sub-part titles processing -->
|
1359
1361
|
|
1360
|
-
|
1362
|
+
</fo:block>
|
1361
1363
|
</fo:block-container>
|
1362
1364
|
|
1363
1365
|
<!-- <fo:block-container>
|
@@ -1388,19 +1390,19 @@
|
|
1388
1390
|
|
1389
1391
|
<fo:block-container absolute-position="fixed" left="12mm" top="242mm" height="42mm" width="140mm" display-align="after">
|
1390
1392
|
<fo:block font-size="12pt">
|
1391
|
-
<fo:block><xsl:value-of select="
|
1392
|
-
<fo:block><xsl:value-of select="
|
1393
|
+
<fo:block><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:editorialgroup/bipm:committee/bipm:variant[@language = 'fr']"/></fo:block>
|
1394
|
+
<fo:block><xsl:value-of select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:ext/bipm:editorialgroup/bipm:committee/bipm:variant[@language = 'en']"/></fo:block>
|
1393
1395
|
<fo:block> </fo:block>
|
1394
1396
|
<!-- <fo:block>BIPM SI MEP S1</fo:block> -->
|
1395
1397
|
<fo:block>
|
1396
1398
|
<xsl:call-template name="printRevisionDate">
|
1397
|
-
<xsl:with-param name="date" select="
|
1399
|
+
<xsl:with-param name="date" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:version/bipm:revision-date"/>
|
1398
1400
|
<xsl:with-param name="lang" select="'en'"/>
|
1399
1401
|
</xsl:call-template>
|
1400
1402
|
</fo:block>
|
1401
1403
|
<fo:block>
|
1402
1404
|
<xsl:call-template name="printRevisionDate">
|
1403
|
-
<xsl:with-param name="date" select="
|
1405
|
+
<xsl:with-param name="date" select="(//bipm:bipm-standard)[1]/bipm:bibdata/bipm:version/bipm:revision-date"/>
|
1404
1406
|
<xsl:with-param name="lang" select="'fr'"/>
|
1405
1407
|
</xsl:call-template>
|
1406
1408
|
</fo:block>
|
@@ -2852,8 +2854,8 @@
|
|
2852
2854
|
<xsl:if test=".//bipm:fn">
|
2853
2855
|
<xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
|
2854
2856
|
</xsl:if>
|
2855
|
-
|
2856
|
-
<xsl:apply-templates/>
|
2857
|
+
<xsl:call-template name="processBibitem"/>
|
2858
|
+
<!-- <xsl:apply-templates /> -->
|
2857
2859
|
</fo:block>
|
2858
2860
|
</xsl:template>
|
2859
2861
|
|
@@ -2905,14 +2907,22 @@
|
|
2905
2907
|
<fo:list-item-label end-indent="label-end()">
|
2906
2908
|
<fo:block>
|
2907
2909
|
<fo:inline>
|
2908
|
-
|
2910
|
+
<!-- <xsl:number format="1."/> -->
|
2911
|
+
<xsl:choose>
|
2912
|
+
<xsl:when test="bipm:docidentifier[@type='metanorma']">
|
2913
|
+
<xsl:value-of select="bipm:docidentifier[@type='metanorma']"/>
|
2914
|
+
</xsl:when>
|
2915
|
+
<xsl:otherwise>
|
2916
|
+
<xsl:number format="[1]"/>
|
2917
|
+
</xsl:otherwise>
|
2918
|
+
</xsl:choose>
|
2909
2919
|
</fo:inline>
|
2910
2920
|
</fo:block>
|
2911
2921
|
</fo:list-item-label>
|
2912
2922
|
<fo:list-item-body start-indent="body-start()">
|
2913
2923
|
<fo:block>
|
2914
|
-
|
2915
|
-
<xsl:apply-templates/>
|
2924
|
+
<xsl:call-template name="processBibitem"/>
|
2925
|
+
<!-- <xsl:apply-templates /> -->
|
2916
2926
|
</fo:block>
|
2917
2927
|
</fo:list-item-body>
|
2918
2928
|
</fo:list-item>
|
@@ -2928,6 +2938,9 @@
|
|
2928
2938
|
</fo:inline>
|
2929
2939
|
</xsl:template>
|
2930
2940
|
|
2941
|
+
<xsl:template match="bipm:references/bipm:bibitem/bipm:docidentifier[@type='metanorma' and ../bipm:formattedref]"/>
|
2942
|
+
|
2943
|
+
|
2931
2944
|
<xsl:template match="bipm:pagebreak">
|
2932
2945
|
<fo:block break-after="page"/>
|
2933
2946
|
<!-- <fo:block> </fo:block>
|
@@ -3047,7 +3060,7 @@
|
|
3047
3060
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3048
3061
|
</xsl:copy>
|
3049
3062
|
<!-- <xsl:copy-of select="."/> -->
|
3050
|
-
<mathml:mspace height="1.
|
3063
|
+
<mathml:mspace height="1.47ex"/>
|
3051
3064
|
</xsl:template>
|
3052
3065
|
|
3053
3066
|
<!-- set script minimal font-size -->
|
@@ -3579,7 +3592,7 @@
|
|
3579
3592
|
</xsl:apply-templates>
|
3580
3593
|
<xsl:choose>
|
3581
3594
|
<xsl:when test="$ignoreReferenceFrom = 'true'"><xsl:value-of select="."/></xsl:when>
|
3582
|
-
<xsl:otherwise><xsl:value-of select="."/>_<xsl:value-of select="$lang"/></xsl:otherwise>
|
3595
|
+
<xsl:otherwise><xsl:value-of select="."/>_<xsl:value-of select="$lang"/><xsl:if test="$doctype = 'guide'">_<xsl:number count="bipm:bipm-standard" level="any"/></xsl:if></xsl:otherwise>
|
3583
3596
|
</xsl:choose>
|
3584
3597
|
</xsl:copy>
|
3585
3598
|
</xsl:template>
|
@@ -3595,7 +3608,7 @@
|
|
3595
3608
|
</xsl:when>
|
3596
3609
|
<xsl:when test="local-name() = 'id' or local-name() = 'bibitemid' or (local-name() = 'target' and local-name(..) = 'xref')">
|
3597
3610
|
<xsl:attribute name="{local-name()}">
|
3598
|
-
<xsl:value-of select="."/>_<xsl:value-of select="$lang"
|
3611
|
+
<xsl:value-of select="."/>_<xsl:value-of select="$lang"/><xsl:if test="$doctype = 'guide'">_<xsl:number count="bipm:bipm-standard" level="any"/></xsl:if>
|
3599
3612
|
</xsl:attribute>
|
3600
3613
|
</xsl:when>
|
3601
3614
|
<xsl:otherwise>
|
@@ -4157,10 +4170,12 @@
|
|
4157
4170
|
|
4158
4171
|
|
4159
4172
|
<xsl:variable name="colwidths">
|
4160
|
-
<xsl:
|
4161
|
-
<xsl:
|
4162
|
-
|
4163
|
-
|
4173
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
4174
|
+
<xsl:call-template name="calculate-column-widths">
|
4175
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4176
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
4177
|
+
</xsl:call-template>
|
4178
|
+
</xsl:if>
|
4164
4179
|
</xsl:variable>
|
4165
4180
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
4166
4181
|
|
@@ -4247,16 +4262,25 @@
|
|
4247
4262
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
4248
4263
|
</xsl:if>
|
4249
4264
|
|
4250
|
-
<xsl:
|
4251
|
-
<xsl:
|
4252
|
-
<xsl:
|
4253
|
-
<fo:table-column column-width="
|
4254
|
-
</xsl:
|
4255
|
-
|
4256
|
-
|
4257
|
-
|
4258
|
-
|
4259
|
-
|
4265
|
+
<xsl:choose>
|
4266
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
4267
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
4268
|
+
<fo:table-column column-width="{@width}"/>
|
4269
|
+
</xsl:for-each>
|
4270
|
+
</xsl:when>
|
4271
|
+
<xsl:otherwise>
|
4272
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
4273
|
+
<xsl:choose>
|
4274
|
+
<xsl:when test=". = 1 or . = 0">
|
4275
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
4276
|
+
</xsl:when>
|
4277
|
+
<xsl:otherwise>
|
4278
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
4279
|
+
</xsl:otherwise>
|
4280
|
+
</xsl:choose>
|
4281
|
+
</xsl:for-each>
|
4282
|
+
</xsl:otherwise>
|
4283
|
+
</xsl:choose>
|
4260
4284
|
|
4261
4285
|
<xsl:choose>
|
4262
4286
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -4269,10 +4293,12 @@
|
|
4269
4293
|
|
4270
4294
|
</fo:table>
|
4271
4295
|
|
4296
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
4272
4297
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
4273
4298
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
4274
4299
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
4275
4300
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
4301
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
4276
4302
|
</xsl:call-template>
|
4277
4303
|
</xsl:for-each>
|
4278
4304
|
|
@@ -4532,12 +4558,22 @@
|
|
4532
4558
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
4533
4559
|
<xsl:param name="table_attributes"/>
|
4534
4560
|
<xsl:param name="colwidths"/>
|
4561
|
+
<xsl:param name="colgroup"/>
|
4535
4562
|
|
4536
4563
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
4537
4564
|
|
4538
4565
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
4539
4566
|
|
4540
|
-
<xsl:variable name="cols-count"
|
4567
|
+
<xsl:variable name="cols-count">
|
4568
|
+
<xsl:choose>
|
4569
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
4570
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
4571
|
+
</xsl:when>
|
4572
|
+
<xsl:otherwise>
|
4573
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
4574
|
+
</xsl:otherwise>
|
4575
|
+
</xsl:choose>
|
4576
|
+
</xsl:variable>
|
4541
4577
|
|
4542
4578
|
<fo:table keep-with-previous="always">
|
4543
4579
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -4555,16 +4591,25 @@
|
|
4555
4591
|
</xsl:choose>
|
4556
4592
|
</xsl:for-each>
|
4557
4593
|
|
4558
|
-
<xsl:
|
4559
|
-
<xsl:
|
4560
|
-
<xsl:
|
4561
|
-
<fo:table-column column-width="
|
4562
|
-
</xsl:
|
4563
|
-
|
4564
|
-
|
4565
|
-
|
4566
|
-
|
4567
|
-
|
4594
|
+
<xsl:choose>
|
4595
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
4596
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
4597
|
+
<fo:table-column column-width="{@width}"/>
|
4598
|
+
</xsl:for-each>
|
4599
|
+
</xsl:when>
|
4600
|
+
<xsl:otherwise>
|
4601
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
4602
|
+
<xsl:choose>
|
4603
|
+
<xsl:when test=". = 1 or . = 0">
|
4604
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
4605
|
+
</xsl:when>
|
4606
|
+
<xsl:otherwise>
|
4607
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
4608
|
+
</xsl:otherwise>
|
4609
|
+
</xsl:choose>
|
4610
|
+
</xsl:for-each>
|
4611
|
+
</xsl:otherwise>
|
4612
|
+
</xsl:choose>
|
4568
4613
|
|
4569
4614
|
<fo:table-body>
|
4570
4615
|
<fo:table-row>
|
@@ -6852,7 +6897,8 @@
|
|
6852
6897
|
<fo:table-column column-width="107mm"/>
|
6853
6898
|
<fo:table-column column-width="15mm"/>
|
6854
6899
|
<fo:table-body>
|
6855
|
-
<fo:table-row
|
6900
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
6901
|
+
|
6856
6902
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
6857
6903
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
6858
6904
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -6870,6 +6916,38 @@
|
|
6870
6916
|
<fo:block><xsl:apply-templates/></fo:block>
|
6871
6917
|
</fo:table-cell>
|
6872
6918
|
</xsl:template><xsl:template name="processBibitem">
|
6919
|
+
|
6920
|
+
|
6921
|
+
<!-- start BIPM bibtem processing -->
|
6922
|
+
<xsl:choose>
|
6923
|
+
<xsl:when test="*[local-name() = 'formattedref']">
|
6924
|
+
<xsl:apply-templates select="*[local-name() = 'formattedref']"/>
|
6925
|
+
</xsl:when>
|
6926
|
+
<xsl:otherwise>
|
6927
|
+
<xsl:variable name="docidentifier" select="*[local-name() = 'docidentifier'][not(@type = 'URN' or @type = 'metanorma' or @type = 'BIPM' or @type = 'ISBN' or @type = 'ISSN')]"/>
|
6928
|
+
|
6929
|
+
<xsl:value-of select="$docidentifier"/>
|
6930
|
+
<xsl:if test="$docidentifier != '' and *[local-name() = 'title']">, </xsl:if>
|
6931
|
+
|
6932
|
+
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
|
6933
|
+
|
6934
|
+
<xsl:choose>
|
6935
|
+
<xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = $curr_lang]">
|
6936
|
+
<xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = $curr_lang]"/>
|
6937
|
+
</xsl:when>
|
6938
|
+
<xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
|
6939
|
+
<xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
|
6940
|
+
</xsl:when>
|
6941
|
+
<xsl:otherwise>
|
6942
|
+
<xsl:apply-templates select="*[local-name() = 'title']"/>
|
6943
|
+
</xsl:otherwise>
|
6944
|
+
</xsl:choose>
|
6945
|
+
|
6946
|
+
</xsl:otherwise>
|
6947
|
+
</xsl:choose>
|
6948
|
+
|
6949
|
+
<!-- end BIPM bibitem processing-->
|
6950
|
+
|
6873
6951
|
|
6874
6952
|
|
6875
6953
|
|