metanorma-bipm 2.2.11 → 2.2.12

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: 52a00b68699debff9fdcdcbbfe6cc386cff44e9fa12eaa6eaaf62cb5c006bf39
4
- data.tar.gz: b6b4f3a66bf327e22ad374b8f74cd8795cfc47ab0b1a32f91e97e3e2a5fffa49
3
+ metadata.gz: 32e20a550433c8b8a0d0e7fde6e13f352674d19d9449837f5a6c98e997dd88c2
4
+ data.tar.gz: d76e96ea6028bcac17b1b43dcf248594ba493c1fd8ea0746da68693bf05ceaf0
5
5
  SHA512:
6
- metadata.gz: 292d01a8cf41c886c0cf3ce3e3710cf7322e65fcd08d0e89b5245bf2c7b86d4f44de3480472e24eddca739c071e4b84817699bb0277c2bb29ce738801d0cccbc
7
- data.tar.gz: e19758b39759f6869d604aa1ee73363d6c03f22beb796e87602bab021b0975a3073d4a9e12c9155b6375b1de11cf2b28910e74c48a99217ede6df24866cc2834
6
+ metadata.gz: 7f544fedd6edd84af707119fbbab99fa954e37019574a1ae603b3ed51a0b13fb5d89b81d21a5f6f38c3c4f1861807b54208144d54cd326c96a9e8d5d0bb7d899
7
+ data.tar.gz: 307a5eaa0848d94dcd88ec5822f69eddbd16e348e18576e4eeec114feeb5d6c87bf53e42889c1107f4f77d38a95f22977b5b1f8ffa33a11928ccb2cd2a0d7822
@@ -4903,6 +4903,10 @@
4903
4903
  </xsl:attribute-set> <!-- formula-stem-number-style -->
4904
4904
  <!-- End Formula's styles -->
4905
4905
 
4906
+ <xsl:template name="refine_formula-stem-number-style">
4907
+
4908
+ </xsl:template>
4909
+
4906
4910
  <xsl:attribute-set name="image-style">
4907
4911
  <xsl:attribute name="text-align">center</xsl:attribute>
4908
4912
 
@@ -5406,13 +5410,13 @@
5406
5410
 
5407
5411
  <xsl:template name="processPrefaceSectionsDefault_Contents">
5408
5412
  <xsl:variable name="nodes_preface_">
5409
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
5413
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
5410
5414
  <node id="{@id}"/>
5411
5415
  </xsl:for-each>
5412
5416
  </xsl:variable>
5413
5417
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
5414
5418
 
5415
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
5419
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
5416
5420
  <xsl:sort select="@displayorder" data-type="number"/>
5417
5421
 
5418
5422
  <!-- process Section's title -->
@@ -5446,12 +5450,12 @@
5446
5450
  <xsl:apply-templates select="." mode="contents"/>
5447
5451
  </xsl:for-each>
5448
5452
 
5449
- <xsl:for-each select="/*/*[local-name()='annex']">
5453
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
5450
5454
  <xsl:sort select="@displayorder" data-type="number"/>
5451
5455
  <xsl:apply-templates select="." mode="contents"/>
5452
- </xsl:for-each>
5456
+ </xsl:for-each> -->
5453
5457
 
5454
- <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0]">
5458
+ <xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]][count(.//*[local-name() = 'bibitem'][not(@hidden) = 'true']) &gt; 0]">
5455
5459
  <xsl:sort select="@displayorder" data-type="number"/>
5456
5460
  <xsl:apply-templates select="." mode="contents"/>
5457
5461
  </xsl:for-each>
@@ -6359,8 +6363,8 @@
6359
6363
  <xsl:template name="table-header-title">
6360
6364
  <xsl:param name="cols-count"/>
6361
6365
  <!-- row for title -->
6362
- <fo:table-row>
6363
- <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
6366
+ <fo:table-row role="SKIP">
6367
+ <fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black" role="SKIP">
6364
6368
 
6365
6369
  <xsl:call-template name="refine_table-header-title-style"/>
6366
6370
 
@@ -6369,7 +6373,7 @@
6369
6373
  </xsl:apply-templates>
6370
6374
 
6371
6375
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6372
- <fo:block/>
6376
+ <fo:block role="SKIP"/>
6373
6377
  </xsl:if>
6374
6378
 
6375
6379
  </fo:table-cell>
@@ -6471,7 +6475,7 @@
6471
6475
  <!-- fn will be processed inside 'note' processing -->
6472
6476
 
6473
6477
  <xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) &gt; 1">
6474
- <fo:block font-weight="bold">
6478
+ <fo:block font-weight="bold" role="SKIP">
6475
6479
  <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
6476
6480
  <xsl:choose>
6477
6481
  <xsl:when test="$curr_lang = 'fr'">Remarques</xsl:when>
@@ -6697,7 +6701,7 @@
6697
6701
 
6698
6702
  <xsl:call-template name="refine_table-header-cell-style"/>
6699
6703
 
6700
- <fo:block>
6704
+ <fo:block role="SKIP">
6701
6705
  <xsl:apply-templates/>
6702
6706
  </fo:block>
6703
6707
  </fo:table-cell>
@@ -6750,7 +6754,7 @@
6750
6754
  <xsl:attribute name="text-align">left</xsl:attribute>
6751
6755
  </xsl:if>
6752
6756
 
6753
- <fo:block>
6757
+ <fo:block role="SKIP">
6754
6758
 
6755
6759
  <xsl:if test="$isGenerateTableIF = 'true'">
6756
6760
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -7635,7 +7639,7 @@
7635
7639
  -->
7636
7640
  <fo:table-row>
7637
7641
  <fo:table-cell number-columns-spanned="2">
7638
- <fo:block>
7642
+ <fo:block role="SKIP">
7639
7643
  <xsl:call-template name="note"/>
7640
7644
  </fo:block>
7641
7645
  </fo:table-cell>
@@ -7700,7 +7704,7 @@
7700
7704
 
7701
7705
  <xsl:call-template name="refine_dt-cell-style"/>
7702
7706
 
7703
- <fo:block xsl:use-attribute-sets="dt-block-style">
7707
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
7704
7708
  <xsl:copy-of select="@id"/>
7705
7709
 
7706
7710
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -7730,7 +7734,7 @@
7730
7734
 
7731
7735
  <xsl:call-template name="refine_dd-cell-style"/>
7732
7736
 
7733
- <fo:block>
7737
+ <fo:block role="SKIP">
7734
7738
 
7735
7739
  <xsl:if test="$isGenerateTableIF = 'true'">
7736
7740
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -8103,11 +8107,41 @@
8103
8107
 
8104
8108
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
8105
8109
  <xsl:variable name="text" select="normalize-space(.)"/>
8106
- <fo:inline font-size="75%">
8110
+ <fo:inline font-size="75%" role="SKIP">
8107
8111
  <xsl:if test="string-length($text) &gt; 0">
8108
- <xsl:call-template name="recursiveSmallCaps">
8109
- <xsl:with-param name="text" select="$text"/>
8110
- </xsl:call-template>
8112
+ <xsl:variable name="smallCapsText">
8113
+ <xsl:call-template name="recursiveSmallCaps">
8114
+ <xsl:with-param name="text" select="$text"/>
8115
+ </xsl:call-template>
8116
+ </xsl:variable>
8117
+ <!-- merge neighboring fo:inline -->
8118
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
8119
+ <xsl:choose>
8120
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
8121
+ <xsl:when test="self::fo:inline and @font-size">
8122
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
8123
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
8124
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
8125
+ <xsl:variable name="next_text">
8126
+ <xsl:choose>
8127
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
8128
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
8129
+ </xsl:choose>
8130
+ </xsl:variable>
8131
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
8132
+ <fo:inline>
8133
+ <xsl:copy-of select="@*"/>
8134
+ <xsl:copy-of select="./node()"/>
8135
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
8136
+ <xsl:copy-of select="./node()"/>
8137
+ </xsl:for-each>
8138
+ </fo:inline>
8139
+ </xsl:when>
8140
+ <xsl:otherwise>
8141
+ <xsl:copy-of select="."/>
8142
+ </xsl:otherwise>
8143
+ </xsl:choose>
8144
+ </xsl:for-each>
8111
8145
  </xsl:if>
8112
8146
  </fo:inline>
8113
8147
  </xsl:template>
@@ -8119,7 +8153,7 @@
8119
8153
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
8120
8154
  <xsl:choose>
8121
8155
  <xsl:when test="$char=$upperCase">
8122
- <fo:inline font-size="{100 div 0.75}%">
8156
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
8123
8157
  <xsl:value-of select="$upperCase"/>
8124
8158
  </fo:inline>
8125
8159
  </xsl:when>
@@ -8281,6 +8315,10 @@
8281
8315
 
8282
8316
  <xsl:when test="not(contains($text, $separator))">
8283
8317
  <word>
8318
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
8319
+ <xsl:text>
8320
+  </xsl:text> <!-- to add distance between dt and dd -->
8321
+ </xsl:if>
8284
8322
  <xsl:call-template name="enclose_text_in_tags">
8285
8323
  <xsl:with-param name="text" select="normalize-space($text)"/>
8286
8324
  <xsl:with-param name="tags" select="$tags"/>
@@ -8289,6 +8327,10 @@
8289
8327
  </xsl:when>
8290
8328
  <xsl:otherwise>
8291
8329
  <word>
8330
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
8331
+ <xsl:text>
8332
+  </xsl:text> <!-- to add distance between dt and dd -->
8333
+ </xsl:if>
8292
8334
  <xsl:call-template name="enclose_text_in_tags">
8293
8335
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
8294
8336
  <xsl:with-param name="tags" select="$tags"/>
@@ -8472,6 +8514,10 @@
8472
8514
  <xsl:template name="getSimpleTable">
8473
8515
  <xsl:param name="id"/>
8474
8516
 
8517
+ <!-- <test0>
8518
+ <xsl:copy-of select="."/>
8519
+ </test0> -->
8520
+
8475
8521
  <xsl:variable name="simple-table">
8476
8522
 
8477
8523
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -9549,7 +9595,7 @@
9549
9595
  <fo:table-body>
9550
9596
  <fo:table-row>
9551
9597
  <fo:table-cell display-align="center">
9552
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9598
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
9553
9599
 
9554
9600
  <xsl:call-template name="refine_formula-stem-block-style"/>
9555
9601
 
@@ -9557,7 +9603,10 @@
9557
9603
  </fo:block>
9558
9604
  </fo:table-cell>
9559
9605
  <fo:table-cell display-align="center">
9560
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
9606
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
9607
+
9608
+ <xsl:call-template name="refine_formula-stem-number-style"/>
9609
+
9561
9610
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
9562
9611
  </fo:block>
9563
9612
  </fo:table-cell>
@@ -11104,7 +11153,7 @@
11104
11153
  <!-- second td with sourcecode -->
11105
11154
  <xsl:template match="*[local-name() = 'sourcecode'][@linenums = 'true']/*[local-name()='table']//*[local-name()='tr']/*[local-name()='td'][preceding-sibling::*]" priority="2"> <!-- *[local-name()='table'][@type = 'sourcecode'] -->
11106
11155
  <fo:table-cell>
11107
- <fo:block>
11156
+ <fo:block role="SKIP">
11108
11157
  <xsl:apply-templates/>
11109
11158
  </fo:block>
11110
11159
  </fo:table-cell>
@@ -11591,7 +11640,7 @@
11591
11640
 
11592
11641
  <xsl:call-template name="setTableCellAttributes"/>
11593
11642
 
11594
- <fo:block>
11643
+ <fo:block role="SKIP">
11595
11644
  <xsl:apply-templates/>
11596
11645
  </fo:block>
11597
11646
  </fo:table-cell>
@@ -11613,7 +11662,7 @@
11613
11662
 
11614
11663
  <xsl:call-template name="setTableCellAttributes"/>
11615
11664
 
11616
- <fo:block>
11665
+ <fo:block role="SKIP">
11617
11666
  <xsl:apply-templates/>
11618
11667
  </fo:block>
11619
11668
  </fo:table-cell>
@@ -12392,7 +12441,48 @@
12392
12441
  </xsl:choose>
12393
12442
  </xsl:when>
12394
12443
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
12395
- <xsl:value-of select="@label"/>
12444
+
12445
+ <xsl:variable name="label">
12446
+
12447
+ <xsl:variable name="type" select="../@type"/>
12448
+
12449
+ <xsl:variable name="style_prefix_">
12450
+ <xsl:if test="$type = 'roman'">
12451
+ ( <!-- Example: (i) -->
12452
+ </xsl:if>
12453
+ </xsl:variable>
12454
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
12455
+
12456
+ <xsl:variable name="style_suffix_">
12457
+ <xsl:choose>
12458
+ <xsl:when test="$type = 'arabic'">
12459
+ .
12460
+ </xsl:when>
12461
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12462
+ )
12463
+ </xsl:when>
12464
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12465
+ .
12466
+ </xsl:when>
12467
+ <xsl:when test="$type = 'roman'">
12468
+ )
12469
+ </xsl:when>
12470
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
12471
+ </xsl:choose>
12472
+ </xsl:variable>
12473
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
12474
+
12475
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
12476
+ <xsl:value-of select="$style_prefix"/>
12477
+ </xsl:if>
12478
+ <xsl:value-of select="@label"/>
12479
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
12480
+ <xsl:value-of select="$style_suffix"/>
12481
+ </xsl:if>
12482
+ </xsl:variable>
12483
+
12484
+ <xsl:value-of select="normalize-space($label)"/>
12485
+
12396
12486
  </xsl:when>
12397
12487
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
12398
12488
 
@@ -12587,7 +12677,7 @@
12587
12677
  <xsl:call-template name="refine_list-item-style"/>
12588
12678
 
12589
12679
  <fo:list-item-label end-indent="label-end()">
12590
- <fo:block xsl:use-attribute-sets="list-item-label-style">
12680
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
12591
12681
 
12592
12682
  <xsl:call-template name="refine_list-item-label-style"/>
12593
12683
 
@@ -12601,7 +12691,7 @@
12601
12691
  </fo:block>
12602
12692
  </fo:list-item-label>
12603
12693
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
12604
- <fo:block>
12694
+ <fo:block role="SKIP">
12605
12695
 
12606
12696
  <xsl:call-template name="refine_list-item-body-style"/>
12607
12697
 
@@ -12880,10 +12970,10 @@
12880
12970
  <fo:table-body>
12881
12971
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
12882
12972
 
12883
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
12884
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
12885
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
12886
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
12973
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
12974
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
12975
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
12976
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
12887
12977
  </fo:table-row>
12888
12978
  <xsl:apply-templates/>
12889
12979
  </fo:table-body>
@@ -12898,7 +12988,7 @@
12898
12988
 
12899
12989
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
12900
12990
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
12901
- <fo:block><xsl:apply-templates/></fo:block>
12991
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
12902
12992
  </fo:table-cell>
12903
12993
  </xsl:template>
12904
12994
  <!-- ============ -->
@@ -13199,7 +13289,7 @@
13199
13289
  <xsl:for-each select="*[local-name() = 'tab']">
13200
13290
  <xsl:variable name="current_id" select="generate-id()"/>
13201
13291
  <fo:table-cell>
13202
- <fo:block line-height-shift-adjustment="disregard-shifts">
13292
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
13203
13293
  <xsl:call-template name="insert_basic_link">
13204
13294
  <xsl:with-param name="element">
13205
13295
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -13217,7 +13307,7 @@
13217
13307
  </xsl:for-each>
13218
13308
  <!-- last column - for page numbers -->
13219
13309
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
13220
- <fo:block>
13310
+ <fo:block role="SKIP">
13221
13311
  <xsl:call-template name="insert_basic_link">
13222
13312
  <xsl:with-param name="element">
13223
13313
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">