metanorma-bipm 2.2.12 → 2.2.13

Sign up to get free protection for your applications and to get access to all the features.
@@ -2684,6 +2684,7 @@
2684
2684
  </xsl:attribute-set>
2685
2685
 
2686
2686
  <xsl:attribute-set name="figure-block-style">
2687
+ <xsl:attribute name="role">SKIP</xsl:attribute>
2687
2688
 
2688
2689
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2689
2690
 
@@ -2694,6 +2695,7 @@
2694
2695
  </xsl:attribute-set>
2695
2696
 
2696
2697
  <xsl:attribute-set name="figure-name-style">
2698
+ <xsl:attribute name="role">Caption</xsl:attribute>
2697
2699
 
2698
2700
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2699
2701
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -2741,6 +2743,7 @@
2741
2743
  </xsl:template>
2742
2744
 
2743
2745
  <xsl:attribute-set name="image-style">
2746
+ <xsl:attribute name="role">SKIP</xsl:attribute>
2744
2747
  <xsl:attribute name="text-align">center</xsl:attribute>
2745
2748
 
2746
2749
  </xsl:attribute-set>
@@ -3011,6 +3014,13 @@
3011
3014
 
3012
3015
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
3013
3016
 
3017
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
3018
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3019
+
3020
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3021
+
3022
+ </xsl:attribute-set>
3023
+
3014
3024
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
3015
3025
  <xsl:attribute-set name="bibitem-normative-list-body-style">
3016
3026
 
@@ -3411,14 +3421,14 @@
3411
3421
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
3412
3422
  </xsl:when>
3413
3423
  <xsl:otherwise>
3414
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3424
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3415
3425
  </xsl:otherwise>
3416
3426
  </xsl:choose>
3417
3427
  </xsl:for-each>
3418
3428
  </xsl:when>
3419
3429
 
3420
3430
  <xsl:otherwise>
3421
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3431
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3422
3432
  </xsl:otherwise>
3423
3433
 
3424
3434
  </xsl:choose>
@@ -3428,7 +3438,7 @@
3428
3438
  <!-- Preface boilerplate sections processing -->
3429
3439
  <!-- ================================= -->
3430
3440
  <xsl:template match="*[local-name()='copyright-statement']">
3431
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
3441
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3432
3442
  <xsl:apply-templates/>
3433
3443
  </fo:block>
3434
3444
  </xsl:template> <!-- copyright-statement -->
@@ -3594,7 +3604,7 @@
3594
3604
  </xsl:choose>
3595
3605
  </xsl:variable>
3596
3606
 
3597
- <fo:block-container xsl:use-attribute-sets="table-container-style">
3607
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
3598
3608
 
3599
3609
  <xsl:call-template name="refine_table-container-style">
3600
3610
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -4683,7 +4693,7 @@
4683
4693
  </xsl:choose>
4684
4694
  </xsl:variable>
4685
4695
  <xsl:variable name="footnote_inline">
4686
- <fo:inline>
4696
+ <fo:inline role="Reference">
4687
4697
 
4688
4698
  <xsl:variable name="fn_styles">
4689
4699
  <xsl:choose>
@@ -4706,7 +4716,7 @@
4706
4716
 
4707
4717
  <xsl:call-template name="insert_basic_link">
4708
4718
  <xsl:with-param name="element">
4709
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
4719
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
4710
4720
  <xsl:copy-of select="$current_fn_number_text"/>
4711
4721
  </fo:basic-link>
4712
4722
  </xsl:with-param>
@@ -4719,17 +4729,17 @@
4719
4729
  <xsl:copy-of select="$footnote_inline"/>
4720
4730
  </xsl:when>
4721
4731
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
4722
- <fo:footnote xsl:use-attribute-sets="fn-style">
4732
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
4723
4733
  <xsl:copy-of select="$footnote_inline"/>
4724
- <fo:footnote-body>
4734
+ <fo:footnote-body role="Note">
4725
4735
 
4726
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
4736
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
4727
4737
 
4728
- <fo:block xsl:use-attribute-sets="fn-body-style">
4738
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4729
4739
 
4730
4740
  <xsl:call-template name="refine_fn-body-style"/>
4731
4741
 
4732
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
4742
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
4733
4743
 
4734
4744
  <xsl:call-template name="refine_fn-body-num-style"/>
4735
4745
 
@@ -4991,11 +5001,11 @@
4991
5001
  </xsl:template>
4992
5002
 
4993
5003
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
4994
- <fo:inline><xsl:value-of select="."/></fo:inline>
5004
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
4995
5005
  </xsl:template>
4996
5006
 
4997
5007
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
4998
- <fo:inline>
5008
+ <fo:inline role="P">
4999
5009
  <xsl:apply-templates/>
5000
5010
  </fo:inline>
5001
5011
  </xsl:template>
@@ -5010,7 +5020,7 @@
5010
5020
  <xsl:variable name="isAdded" select="@added"/>
5011
5021
  <xsl:variable name="isDeleted" select="@deleted"/>
5012
5022
  <!-- <dl><xsl:copy-of select="."/></dl> -->
5013
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
5023
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
5014
5024
 
5015
5025
  <xsl:call-template name="setBlockSpanAll"/>
5016
5026
 
@@ -5045,7 +5055,7 @@
5045
5055
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
5046
5056
  </xsl:call-template>
5047
5057
 
5048
- <fo:block-container margin-left="0mm">
5058
+ <fo:block-container margin-left="0mm" role="SKIP">
5049
5059
 
5050
5060
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
5051
5061
 
@@ -5114,7 +5124,7 @@
5114
5124
 
5115
5125
  <!-- a few components -->
5116
5126
  <xsl:if test="$onlyOneComponent = 'false'">
5117
- <fo:block>
5127
+ <fo:block role="SKIP">
5118
5128
 
5119
5129
  <xsl:call-template name="refine_multicomponent_style"/>
5120
5130
 
@@ -5122,7 +5132,7 @@
5122
5132
  <xsl:attribute name="margin-top">0</xsl:attribute>
5123
5133
  </xsl:if>
5124
5134
 
5125
- <fo:block>
5135
+ <fo:block role="SKIP">
5126
5136
 
5127
5137
  <xsl:call-template name="refine_multicomponent_block_style"/>
5128
5138
 
@@ -5727,6 +5737,9 @@
5727
5737
 
5728
5738
  <xsl:template name="refine_strong_style">
5729
5739
 
5740
+ <xsl:if test="ancestor::*['preferred']">
5741
+ <xsl:attribute name="role">SKIP</xsl:attribute>
5742
+ </xsl:if>
5730
5743
  </xsl:template>
5731
5744
 
5732
5745
  <xsl:template match="*[local-name()='padding']">
@@ -6661,6 +6674,18 @@
6661
6674
  </xsl:copy>
6662
6675
  </xsl:template>
6663
6676
 
6677
+ <xsl:variable name="font_main_root_style">
6678
+ <root-style xsl:use-attribute-sets="root-style">
6679
+ </root-style>
6680
+ </xsl:variable>
6681
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
6682
+ <xsl:variable name="font_main">
6683
+ <xsl:choose>
6684
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
6685
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
6686
+ </xsl:choose>
6687
+ </xsl:variable>
6688
+
6664
6689
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
6665
6690
  <xsl:param name="id"/>
6666
6691
  <xsl:copy>
@@ -6699,6 +6724,33 @@
6699
6724
 
6700
6725
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
6701
6726
 
6727
+ <xsl:variable name="words_with_width">
6728
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
6729
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
6730
+ <xsl:copy>
6731
+ <xsl:copy-of select="@*"/>
6732
+ <xsl:attribute name="width">
6733
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
6734
+ </xsl:attribute>
6735
+ <xsl:copy-of select="node()"/>
6736
+ </xsl:copy>
6737
+ </xsl:for-each>
6738
+ </xsl:variable>
6739
+
6740
+ <xsl:variable name="words_with_width_sorted">
6741
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
6742
+ <xsl:sort select="@width" data-type="number" order="descending"/>
6743
+ <!-- select word maximal width only -->
6744
+ <xsl:if test="position() = 1">
6745
+ <xsl:copy-of select="."/>
6746
+ </xsl:if>
6747
+ </xsl:for-each>
6748
+ <!-- add 'word' with formatting tags inside -->
6749
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
6750
+ <xsl:copy-of select="."/>
6751
+ </xsl:for-each>
6752
+ </xsl:variable>
6753
+
6702
6754
  <xsl:variable name="words">
6703
6755
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6704
6756
  <word>
@@ -6706,9 +6758,12 @@
6706
6758
  </word>
6707
6759
  </xsl:for-each>
6708
6760
 
6709
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
6761
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
6710
6762
  <xsl:copy-of select="."/>
6711
6763
  </xsl:for-each>
6764
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
6765
+ <xsl:copy-of select="."/>
6766
+ </xsl:for-each> -->
6712
6767
 
6713
6768
  </xsl:variable>
6714
6769
 
@@ -7176,10 +7231,10 @@
7176
7231
  <xsl:copy>
7177
7232
  <xsl:apply-templates select="@*" mode="mathml"/>
7178
7233
  <xsl:if test="not(@lspace)">
7179
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
7234
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7180
7235
  </xsl:if>
7181
- <xsl:if test="not(@rspace)">
7182
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
7236
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
7237
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
7183
7238
  </xsl:if>
7184
7239
  <xsl:apply-templates mode="mathml"/>
7185
7240
  </xsl:copy>
@@ -7196,6 +7251,27 @@
7196
7251
  </xsl:copy>
7197
7252
  </xsl:template>
7198
7253
 
7254
+ <!-- increase space before '(' -->
7255
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
7256
+ <xsl:copy>
7257
+ <xsl:apply-templates select="@*" mode="mathml"/>
7258
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
7259
+ <xsl:if test="not(@lspace)">
7260
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
7261
+ <xsl:choose>
7262
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7263
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7264
+ </xsl:when>
7265
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
7266
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
7267
+ </xsl:when>
7268
+ </xsl:choose>
7269
+ </xsl:if>
7270
+ </xsl:if>
7271
+ <xsl:apply-templates mode="mathml"/>
7272
+ </xsl:copy>
7273
+ </xsl:template>
7274
+
7199
7275
  <!-- Examples:
7200
7276
  <stem type="AsciiMath">x = 1</stem>
7201
7277
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -7355,7 +7431,7 @@
7355
7431
  <!-- formula -->
7356
7432
  <!-- ====== -->
7357
7433
  <xsl:template match="*[local-name() = 'formula']" name="formula">
7358
- <fo:block-container margin-left="0mm">
7434
+ <fo:block-container margin-left="0mm" role="SKIP">
7359
7435
  <xsl:if test="parent::*[local-name() = 'note']">
7360
7436
  <xsl:attribute name="margin-left">
7361
7437
  <xsl:choose>
@@ -7365,7 +7441,7 @@
7365
7441
  </xsl:attribute>
7366
7442
 
7367
7443
  </xsl:if>
7368
- <fo:block-container margin-left="0mm">
7444
+ <fo:block-container margin-left="0mm" role="SKIP">
7369
7445
  <fo:block id="{@id}">
7370
7446
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
7371
7447
  </fo:block>
@@ -7445,13 +7521,13 @@
7445
7521
 
7446
7522
  <xsl:template match="*[local-name() = 'note']" name="note">
7447
7523
 
7448
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7524
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7449
7525
 
7450
7526
  <xsl:call-template name="setBlockSpanAll"/>
7451
7527
 
7452
7528
  <xsl:call-template name="refine_note-style"/>
7453
7529
 
7454
- <fo:block-container margin-left="0mm" margin-right="0mm">
7530
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7455
7531
 
7456
7532
  <fo:block>
7457
7533
 
@@ -7615,12 +7691,13 @@
7615
7691
 
7616
7692
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
7617
7693
  <xsl:if test="normalize-space() != ''">
7618
- <xsl:variable name="level">
7694
+ <!-- <xsl:variable name="level">
7619
7695
  <xsl:call-template name="getLevelTermName"/>
7620
7696
  </xsl:variable>
7621
7697
  <fo:inline role="H{$level}">
7622
- <xsl:apply-templates/>
7623
- </fo:inline>
7698
+ <xsl:apply-templates />
7699
+ </fo:inline> -->
7700
+ <xsl:apply-templates/>
7624
7701
  </xsl:if>
7625
7702
  </xsl:template>
7626
7703
  <!-- ====== -->
@@ -7644,7 +7721,7 @@
7644
7721
  <!-- Example: Dimensions in millimeters -->
7645
7722
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7646
7723
 
7647
- <fo:block xsl:use-attribute-sets="figure-style">
7724
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
7648
7725
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7649
7726
  </fo:block>
7650
7727
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -8778,7 +8855,7 @@
8778
8855
  </xsl:when>
8779
8856
 
8780
8857
  <xsl:otherwise>
8781
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
8858
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
8782
8859
 
8783
8860
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
8784
8861
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -8799,7 +8876,7 @@
8799
8876
  </xsl:attribute>
8800
8877
 
8801
8878
  </xsl:if>
8802
- <fo:block-container margin-left="0mm">
8879
+ <fo:block-container margin-left="0mm" role="SKIP">
8803
8880
 
8804
8881
  <fo:block xsl:use-attribute-sets="sourcecode-style">
8805
8882
 
@@ -9345,11 +9422,11 @@
9345
9422
  <!-- requirement, recommendation, permission table -->
9346
9423
  <!-- ========== -->
9347
9424
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9348
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
9425
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
9349
9426
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9350
9427
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
9351
9428
  </xsl:if>
9352
- <fo:block-container margin-left="0mm" margin-right="0mm">
9429
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9353
9430
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
9354
9431
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
9355
9432
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -9511,7 +9588,7 @@
9511
9588
  -->
9512
9589
  <xsl:template match="*[local-name() = 'example']">
9513
9590
 
9514
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
9591
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9515
9592
 
9516
9593
  <xsl:call-template name="setBlockSpanAll"/>
9517
9594
 
@@ -9522,7 +9599,7 @@
9522
9599
  inline
9523
9600
  </xsl:variable>
9524
9601
 
9525
- <fo:block-container margin-left="0mm">
9602
+ <fo:block-container margin-left="0mm" role="SKIP">
9526
9603
 
9527
9604
  <xsl:choose>
9528
9605
 
@@ -9535,8 +9612,8 @@
9535
9612
  </xsl:apply-templates>
9536
9613
  </fo:block>
9537
9614
 
9538
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9539
- <fo:block-container margin-left="0mm" margin-right="0mm">
9615
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9616
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9540
9617
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9541
9618
  <xsl:with-param name="fo_element" select="$fo_element"/>
9542
9619
  </xsl:apply-templates>
@@ -9589,8 +9666,8 @@
9589
9666
 
9590
9667
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9591
9668
  <!-- display further elements in blocks -->
9592
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9593
- <fo:block-container margin-left="0mm" margin-right="0mm">
9669
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9670
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9594
9671
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9595
9672
  <xsl:with-param name="fo_element" select="'block'"/>
9596
9673
  </xsl:apply-templates>
@@ -9648,7 +9725,7 @@
9648
9725
  </xsl:variable>
9649
9726
  <xsl:choose>
9650
9727
  <xsl:when test="starts-with(normalize-space($element), 'block')">
9651
- <fo:block-container>
9728
+ <fo:block-container role="SKIP">
9652
9729
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
9653
9730
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
9654
9731
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -9789,7 +9866,7 @@
9789
9866
  <!-- author -->
9790
9867
  <!-- ====== -->
9791
9868
  <xsl:template match="*[local-name() = 'quote']">
9792
- <fo:block-container margin-left="0mm">
9869
+ <fo:block-container margin-left="0mm" role="SKIP">
9793
9870
 
9794
9871
  <xsl:call-template name="setBlockSpanAll"/>
9795
9872
 
@@ -9803,12 +9880,12 @@
9803
9880
  <xsl:attribute name="space-after">12pt</xsl:attribute>
9804
9881
  </xsl:if>
9805
9882
 
9806
- <fo:block-container margin-left="0mm">
9807
- <fo:block-container xsl:use-attribute-sets="quote-style">
9883
+ <fo:block-container margin-left="0mm" role="SKIP">
9884
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
9808
9885
 
9809
9886
  <xsl:call-template name="refine_quote-style"/>
9810
9887
 
9811
- <fo:block-container margin-left="0mm" margin-right="0mm">
9888
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9812
9889
  <fo:block role="BlockQuote">
9813
9890
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
9814
9891
  </fo:block>
@@ -9964,10 +10041,10 @@
9964
10041
 
9965
10042
  <xsl:choose>
9966
10043
  <xsl:when test="$lang = 'zh'">
9967
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
10044
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
9968
10045
  </xsl:when>
9969
10046
  <xsl:when test="../../@inline-header = 'true'">
9970
- <fo:inline font-size="90%">
10047
+ <fo:inline font-size="90%" role="SKIP">
9971
10048
  <xsl:call-template name="insertNonBreakSpaces">
9972
10049
  <xsl:with-param name="count" select="$padding-right"/>
9973
10050
  </xsl:call-template>
@@ -9975,7 +10052,7 @@
9975
10052
  </xsl:when>
9976
10053
  <xsl:otherwise>
9977
10054
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
9978
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
10055
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
9979
10056
  </xsl:otherwise>
9980
10057
  </xsl:choose>
9981
10058
 
@@ -10005,12 +10082,12 @@
10005
10082
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
10006
10083
 
10007
10084
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
10008
- <fo:block xsl:use-attribute-sets="term-name-style">
10085
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
10009
10086
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
10010
10087
  </fo:block>
10011
10088
  </xsl:if>
10012
10089
 
10013
- <fo:block xsl:use-attribute-sets="preferred-term-style">
10090
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
10014
10091
  <xsl:call-template name="setStyle_preferred"/>
10015
10092
  <xsl:apply-templates/>
10016
10093
  </fo:block>
@@ -10051,7 +10128,7 @@
10051
10128
  <!-- definition -->
10052
10129
  <!-- ========== -->
10053
10130
  <xsl:template match="*[local-name() = 'definition']">
10054
- <fo:block xsl:use-attribute-sets="definition-style">
10131
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
10055
10132
  <xsl:apply-templates/>
10056
10133
  </fo:block>
10057
10134
  </xsl:template>
@@ -10099,6 +10176,10 @@
10099
10176
 
10100
10177
  <xsl:template match="*[local-name() = 'clause']">
10101
10178
  <fo:block>
10179
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
10180
+ <xsl:attribute name="role">SKIP</xsl:attribute>
10181
+ </xsl:if>
10182
+
10102
10183
  <xsl:call-template name="setId"/>
10103
10184
 
10104
10185
  <xsl:call-template name="setBlockSpanAll"/>
@@ -10341,7 +10422,7 @@
10341
10422
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
10342
10423
  <xsl:choose>
10343
10424
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
10344
- <fo:block-container>
10425
+ <fo:block-container role="SKIP">
10345
10426
  <xsl:attribute name="margin-left">
10346
10427
  <xsl:choose>
10347
10428
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -10351,7 +10432,7 @@
10351
10432
 
10352
10433
  <xsl:call-template name="refine_list_container_style"/>
10353
10434
 
10354
- <fo:block-container margin-left="0mm">
10435
+ <fo:block-container margin-left="0mm" role="SKIP">
10355
10436
  <fo:block>
10356
10437
  <xsl:apply-templates select="." mode="list"/>
10357
10438
  </fo:block>
@@ -10360,7 +10441,7 @@
10360
10441
  </xsl:when>
10361
10442
  <xsl:otherwise>
10362
10443
 
10363
- <fo:block>
10444
+ <fo:block role="SKIP">
10364
10445
  <xsl:apply-templates select="." mode="list"/>
10365
10446
  </fo:block>
10366
10447
 
@@ -10778,7 +10859,10 @@
10778
10859
  <!-- Reference sections (Normative References and Bibliography) -->
10779
10860
  <!-- ========================================================== -->
10780
10861
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
10781
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
10862
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
10863
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
10864
+
10865
+ </xsl:template>
10782
10866
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
10783
10867
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
10784
10868
 
@@ -10827,7 +10911,7 @@
10827
10911
 
10828
10912
  <!-- Bibliography (non-normative references) -->
10829
10913
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
10830
-
10914
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10831
10915
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10832
10916
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10833
10917
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
@@ -10855,6 +10939,35 @@
10855
10939
 
10856
10940
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
10857
10941
 
10942
+ <xsl:template name="insertListItem_Bibitem">
10943
+ <xsl:choose>
10944
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10945
+ <xsl:otherwise>
10946
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10947
+ <fo:list-item-label end-indent="label-end()">
10948
+ <fo:block role="SKIP">
10949
+ <fo:inline role="SKIP">
10950
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
10951
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
10952
+ </xsl:apply-templates>
10953
+ </fo:inline>
10954
+ </fo:block>
10955
+ </fo:list-item-label>
10956
+ <fo:list-item-body start-indent="body-start()">
10957
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10958
+ <xsl:call-template name="processBibitem">
10959
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10960
+ </xsl:call-template>
10961
+ </fo:block>
10962
+ </fo:list-item-body>
10963
+ </fo:list-item>
10964
+ </xsl:otherwise>
10965
+ </xsl:choose>
10966
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
10967
+ <xsl:with-param name="skip">false</xsl:with-param>
10968
+ </xsl:apply-templates>
10969
+ </xsl:template>
10970
+
10858
10971
  <xsl:template name="processBibitem">
10859
10972
  <xsl:param name="biblio_tag_part">both</xsl:param>
10860
10973
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module BIPM
3
- VERSION = "2.2.12".freeze
3
+ VERSION = "2.2.13".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-bipm
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.12
4
+ version: 2.2.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-19 00:00:00.000000000 Z
11
+ date: 2023-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic