metanorma-jis 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 413ce76333c43d3e720d8a6f99deb65ba896f4a37ef1e18d9aac3e335afae58e
4
- data.tar.gz: 4b9f704a85a0f2337ecf6cc39f0f5dd55fce70350d9ed7d1d5ec06c9c8cf5460
3
+ metadata.gz: 96fb5369c9530447626770ee760870db7070e6fd45aa3b1967c7dafaab62d4f1
4
+ data.tar.gz: 325357b99ed0186f8297579404bed3a0935b9d5bbd4d43456330b18af8387bf0
5
5
  SHA512:
6
- metadata.gz: 1175113eecfc11a79aecfbc4762d51dcbb1078c60532cde52de5f367aefc1c1d33dcb66b7ed45cd7228eaff2d6d56b237ea2e5b73ad3db23c4678dca6e6e8968
7
- data.tar.gz: bfb468a5b9e14e0bbef57d38b5846da5389ce970437aed9ba86bbeaa39c3cfc75309cfeafac85018d67dac5f588b75d15e8c67d2a573df46c77f4c5510e3cd95
6
+ metadata.gz: 057bb29e1dce2f8a646f7ad95151111dbee6cc38effe9609d51a081b79e04e88eedea5c59eb6a541cce1f731d7036236a7a9be227d6ae5777c0448c2273dc495
7
+ data.tar.gz: 2916496bebb78fbf748f177c67503143175abffcaa25adca5c96b3440c2e6d5a064a2d3461ef97816433da1745482ff869edf320f376d6cffc764908b2e72eec
@@ -2387,6 +2387,7 @@
2387
2387
  </xsl:attribute-set>
2388
2388
 
2389
2389
  <xsl:attribute-set name="figure-block-style">
2390
+ <xsl:attribute name="role">SKIP</xsl:attribute>
2390
2391
 
2391
2392
  </xsl:attribute-set>
2392
2393
 
@@ -2395,6 +2396,7 @@
2395
2396
  </xsl:attribute-set>
2396
2397
 
2397
2398
  <xsl:attribute-set name="figure-name-style">
2399
+ <xsl:attribute name="role">Caption</xsl:attribute>
2398
2400
 
2399
2401
  <xsl:attribute name="font-family">IPAexGothic</xsl:attribute>
2400
2402
  <xsl:attribute name="text-align">center</xsl:attribute>
@@ -2444,6 +2446,7 @@
2444
2446
  </xsl:template>
2445
2447
 
2446
2448
  <xsl:attribute-set name="image-style">
2449
+ <xsl:attribute name="role">SKIP</xsl:attribute>
2447
2450
  <xsl:attribute name="text-align">center</xsl:attribute>
2448
2451
 
2449
2452
  </xsl:attribute-set>
@@ -2707,6 +2710,11 @@
2707
2710
 
2708
2711
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
2709
2712
 
2713
+ <xsl:attribute-set name="bibitem-non-normative-list-item-style">
2714
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2715
+
2716
+ </xsl:attribute-set>
2717
+
2710
2718
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
2711
2719
  <xsl:attribute-set name="bibitem-normative-list-body-style">
2712
2720
 
@@ -3098,14 +3106,14 @@
3098
3106
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
3099
3107
  </xsl:when>
3100
3108
  <xsl:otherwise>
3101
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3109
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3102
3110
  </xsl:otherwise>
3103
3111
  </xsl:choose>
3104
3112
  </xsl:for-each>
3105
3113
  </xsl:when>
3106
3114
 
3107
3115
  <xsl:otherwise>
3108
- <fo:inline keep-together.within-line="always"><xsl:apply-templates/></fo:inline>
3116
+ <fo:inline keep-together.within-line="always" role="SKIP"><xsl:apply-templates/></fo:inline>
3109
3117
  </xsl:otherwise>
3110
3118
 
3111
3119
  </xsl:choose>
@@ -3115,7 +3123,7 @@
3115
3123
  <!-- Preface boilerplate sections processing -->
3116
3124
  <!-- ================================= -->
3117
3125
  <xsl:template match="*[local-name()='copyright-statement']">
3118
- <fo:block xsl:use-attribute-sets="copyright-statement-style">
3126
+ <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3119
3127
  <xsl:apply-templates/>
3120
3128
  </fo:block>
3121
3129
  </xsl:template> <!-- copyright-statement -->
@@ -3285,7 +3293,7 @@
3285
3293
  </xsl:choose>
3286
3294
  </xsl:variable>
3287
3295
 
3288
- <fo:block-container xsl:use-attribute-sets="table-container-style">
3296
+ <fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
3289
3297
 
3290
3298
  <xsl:call-template name="refine_table-container-style">
3291
3299
  <xsl:with-param name="margin-side" select="$margin-side"/>
@@ -4300,7 +4308,7 @@
4300
4308
  </xsl:choose>
4301
4309
  </xsl:variable>
4302
4310
  <xsl:variable name="footnote_inline">
4303
- <fo:inline>
4311
+ <fo:inline role="Reference">
4304
4312
 
4305
4313
  <xsl:variable name="fn_styles">
4306
4314
  <xsl:choose>
@@ -4323,7 +4331,7 @@
4323
4331
 
4324
4332
  <xsl:call-template name="insert_basic_link">
4325
4333
  <xsl:with-param name="element">
4326
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
4334
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
4327
4335
  <xsl:copy-of select="$current_fn_number_text"/>
4328
4336
  </fo:basic-link>
4329
4337
  </xsl:with-param>
@@ -4336,17 +4344,17 @@
4336
4344
  <xsl:copy-of select="$footnote_inline"/>
4337
4345
  </xsl:when>
4338
4346
  <xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
4339
- <fo:footnote xsl:use-attribute-sets="fn-style">
4347
+ <fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
4340
4348
  <xsl:copy-of select="$footnote_inline"/>
4341
- <fo:footnote-body>
4349
+ <fo:footnote-body role="Note">
4342
4350
 
4343
- <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
4351
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
4344
4352
 
4345
- <fo:block xsl:use-attribute-sets="fn-body-style">
4353
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
4346
4354
 
4347
4355
  <xsl:call-template name="refine_fn-body-style"/>
4348
4356
 
4349
- <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
4357
+ <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
4350
4358
 
4351
4359
  <xsl:call-template name="refine_fn-body-num-style"/>
4352
4360
 
@@ -4622,11 +4630,11 @@
4622
4630
  </xsl:template>
4623
4631
 
4624
4632
  <xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
4625
- <fo:inline><xsl:value-of select="."/></fo:inline>
4633
+ <fo:inline role="SKIP"><xsl:value-of select="."/></fo:inline>
4626
4634
  </xsl:template>
4627
4635
 
4628
4636
  <xsl:template match="*[local-name()='fn']//*[local-name()='p']">
4629
- <fo:inline>
4637
+ <fo:inline role="P">
4630
4638
  <xsl:apply-templates/>
4631
4639
  </fo:inline>
4632
4640
  </xsl:template>
@@ -4641,7 +4649,7 @@
4641
4649
  <xsl:variable name="isAdded" select="@added"/>
4642
4650
  <xsl:variable name="isDeleted" select="@deleted"/>
4643
4651
  <!-- <dl><xsl:copy-of select="."/></dl> -->
4644
- <fo:block-container xsl:use-attribute-sets="dl-block-style">
4652
+ <fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
4645
4653
 
4646
4654
  <xsl:call-template name="setBlockSpanAll"/>
4647
4655
 
@@ -4676,7 +4684,7 @@
4676
4684
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4677
4685
  </xsl:call-template>
4678
4686
 
4679
- <fo:block-container margin-left="0mm">
4687
+ <fo:block-container margin-left="0mm" role="SKIP">
4680
4688
 
4681
4689
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
4682
4690
 
@@ -4741,7 +4749,7 @@
4741
4749
 
4742
4750
  <!-- a few components -->
4743
4751
  <xsl:if test="$onlyOneComponent = 'false'">
4744
- <fo:block>
4752
+ <fo:block role="SKIP">
4745
4753
 
4746
4754
  <xsl:call-template name="refine_multicomponent_style"/>
4747
4755
 
@@ -4749,7 +4757,7 @@
4749
4757
  <xsl:attribute name="margin-top">0</xsl:attribute>
4750
4758
  </xsl:if>
4751
4759
 
4752
- <fo:block>
4760
+ <fo:block role="SKIP">
4753
4761
 
4754
4762
  <xsl:call-template name="refine_multicomponent_block_style"/>
4755
4763
 
@@ -5346,6 +5354,9 @@
5346
5354
 
5347
5355
  <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
5348
5356
 
5357
+ <xsl:if test="ancestor::*['preferred']">
5358
+ <xsl:attribute name="role">SKIP</xsl:attribute>
5359
+ </xsl:if>
5349
5360
  </xsl:template>
5350
5361
 
5351
5362
  <xsl:template match="*[local-name()='padding']">
@@ -6281,6 +6292,18 @@
6281
6292
  </xsl:copy>
6282
6293
  </xsl:template>
6283
6294
 
6295
+ <xsl:variable name="font_main_root_style">
6296
+ <root-style xsl:use-attribute-sets="root-style">
6297
+ </root-style>
6298
+ </xsl:variable>
6299
+ <xsl:variable name="font_main_root_style_font_family" select="xalan:nodeset($font_main_root_style)/root-style/@font-family"/>
6300
+ <xsl:variable name="font_main">
6301
+ <xsl:choose>
6302
+ <xsl:when test="contains($font_main_root_style_font_family, ',')"><xsl:value-of select="substring-before($font_main_root_style_font_family, ',')"/></xsl:when>
6303
+ <xsl:otherwise><xsl:value-of select="$font_main_root_style_font_family"/></xsl:otherwise>
6304
+ </xsl:choose>
6305
+ </xsl:variable>
6306
+
6284
6307
  <xsl:template match="*[local-name()='th' or local-name()='td']" mode="simple-table-id">
6285
6308
  <xsl:param name="id"/>
6286
6309
  <xsl:copy>
@@ -6319,6 +6342,33 @@
6319
6342
 
6320
6343
  <!-- td_text='<xsl:copy-of select="$td_text"/>' -->
6321
6344
 
6345
+ <xsl:variable name="words_with_width">
6346
+ <!-- calculate width for 'word' which contain text only (without formatting tags inside) -->
6347
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][not(*)]">
6348
+ <xsl:copy>
6349
+ <xsl:copy-of select="@*"/>
6350
+ <xsl:attribute name="width">
6351
+ <xsl:value-of select="java:org.metanorma.fop.Util.getStringWidth(., $font_main)"/> <!-- Example: 'Times New Roman' -->
6352
+ </xsl:attribute>
6353
+ <xsl:copy-of select="node()"/>
6354
+ </xsl:copy>
6355
+ </xsl:for-each>
6356
+ </xsl:variable>
6357
+
6358
+ <xsl:variable name="words_with_width_sorted">
6359
+ <xsl:for-each select="xalan:nodeset($words_with_width)//*[local-name() = 'word']">
6360
+ <xsl:sort select="@width" data-type="number" order="descending"/>
6361
+ <!-- select word maximal width only -->
6362
+ <xsl:if test="position() = 1">
6363
+ <xsl:copy-of select="."/>
6364
+ </xsl:if>
6365
+ </xsl:for-each>
6366
+ <!-- add 'word' with formatting tags inside -->
6367
+ <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != ''][*]">
6368
+ <xsl:copy-of select="."/>
6369
+ </xsl:for-each>
6370
+ </xsl:variable>
6371
+
6322
6372
  <xsl:variable name="words">
6323
6373
  <xsl:for-each select=".//*[local-name() = 'image' or local-name() = 'stem']">
6324
6374
  <word>
@@ -6326,9 +6376,12 @@
6326
6376
  </word>
6327
6377
  </xsl:for-each>
6328
6378
 
6329
- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
6379
+ <xsl:for-each select="xalan:nodeset($words_with_width_sorted)//*[local-name() = 'word'][normalize-space() != '']">
6330
6380
  <xsl:copy-of select="."/>
6331
6381
  </xsl:for-each>
6382
+ <!-- <xsl:for-each select="xalan:nodeset($td_text)//*[local-name() = 'word'][normalize-space() != '']">
6383
+ <xsl:copy-of select="."/>
6384
+ </xsl:for-each> -->
6332
6385
 
6333
6386
  </xsl:variable>
6334
6387
 
@@ -6789,10 +6842,10 @@
6789
6842
  <xsl:copy>
6790
6843
  <xsl:apply-templates select="@*" mode="mathml"/>
6791
6844
  <xsl:if test="not(@lspace)">
6792
- <xsl:attribute name="lspace">0.4em</xsl:attribute>
6845
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6793
6846
  </xsl:if>
6794
- <xsl:if test="not(@rspace)">
6795
- <xsl:attribute name="rspace">0.4em</xsl:attribute>
6847
+ <xsl:if test="not(@rspace) and not(following-sibling::*[1][self::mathml:mo and normalize-space(text()) = '|'])">
6848
+ <xsl:attribute name="rspace">0.2em</xsl:attribute>
6796
6849
  </xsl:if>
6797
6850
  <xsl:apply-templates mode="mathml"/>
6798
6851
  </xsl:copy>
@@ -6809,6 +6862,27 @@
6809
6862
  </xsl:copy>
6810
6863
  </xsl:template>
6811
6864
 
6865
+ <!-- increase space before '(' -->
6866
+ <xsl:template match="mathml:mo[normalize-space(text()) = '(']" mode="mathml">
6867
+ <xsl:copy>
6868
+ <xsl:apply-templates select="@*" mode="mathml"/>
6869
+ <xsl:if test="(preceding-sibling::* and not(preceding-sibling::*[1][self::mathml:mo])) or (../preceding-sibling::* and not(../preceding-sibling::*[1][self::mathml:mo]))">
6870
+ <xsl:if test="not(@lspace)">
6871
+ <xsl:attribute name="lspace">0.4em</xsl:attribute>
6872
+ <xsl:choose>
6873
+ <xsl:when test="preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6874
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6875
+ </xsl:when>
6876
+ <xsl:when test="../preceding-sibling::*[1][self::mathml:mi or self::mathml:mstyle]">
6877
+ <xsl:attribute name="lspace">0.2em</xsl:attribute>
6878
+ </xsl:when>
6879
+ </xsl:choose>
6880
+ </xsl:if>
6881
+ </xsl:if>
6882
+ <xsl:apply-templates mode="mathml"/>
6883
+ </xsl:copy>
6884
+ </xsl:template>
6885
+
6812
6886
  <!-- Examples:
6813
6887
  <stem type="AsciiMath">x = 1</stem>
6814
6888
  <stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
@@ -6968,7 +7042,7 @@
6968
7042
  <!-- formula -->
6969
7043
  <!-- ====== -->
6970
7044
  <xsl:template match="*[local-name() = 'formula']" name="formula">
6971
- <fo:block-container margin-left="0mm">
7045
+ <fo:block-container margin-left="0mm" role="SKIP">
6972
7046
  <xsl:if test="parent::*[local-name() = 'note']">
6973
7047
  <xsl:attribute name="margin-left">
6974
7048
  <xsl:choose>
@@ -6978,7 +7052,7 @@
6978
7052
  </xsl:attribute>
6979
7053
 
6980
7054
  </xsl:if>
6981
- <fo:block-container margin-left="0mm">
7055
+ <fo:block-container margin-left="0mm" role="SKIP">
6982
7056
  <fo:block id="{@id}">
6983
7057
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
6984
7058
  </fo:block>
@@ -7058,13 +7132,13 @@
7058
7132
 
7059
7133
  <xsl:template match="*[local-name() = 'note']" name="note">
7060
7134
 
7061
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7135
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7062
7136
 
7063
7137
  <xsl:call-template name="setBlockSpanAll"/>
7064
7138
 
7065
7139
  <xsl:call-template name="refine_note-style"/>
7066
7140
 
7067
- <fo:block-container margin-left="0mm" margin-right="0mm">
7141
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
7068
7142
 
7069
7143
  <fo:list-block>
7070
7144
  <xsl:attribute name="provisional-distance-between-starts">
@@ -7221,12 +7295,13 @@
7221
7295
 
7222
7296
  <xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
7223
7297
  <xsl:if test="normalize-space() != ''">
7224
- <xsl:variable name="level">
7298
+ <!-- <xsl:variable name="level">
7225
7299
  <xsl:call-template name="getLevelTermName"/>
7226
7300
  </xsl:variable>
7227
7301
  <fo:inline role="H{$level}">
7228
- <xsl:apply-templates/>
7229
- </fo:inline>
7302
+ <xsl:apply-templates />
7303
+ </fo:inline> -->
7304
+ <xsl:apply-templates/>
7230
7305
  </xsl:if>
7231
7306
  </xsl:template>
7232
7307
  <!-- ====== -->
@@ -7250,7 +7325,7 @@
7250
7325
  <!-- Example: Dimensions in millimeters -->
7251
7326
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
7252
7327
 
7253
- <fo:block xsl:use-attribute-sets="figure-style">
7328
+ <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
7254
7329
  <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
7255
7330
  </fo:block>
7256
7331
  <xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
@@ -8383,7 +8458,7 @@
8383
8458
  </xsl:when>
8384
8459
 
8385
8460
  <xsl:otherwise>
8386
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
8461
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
8387
8462
 
8388
8463
  <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
8389
8464
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
@@ -8404,7 +8479,7 @@
8404
8479
  </xsl:attribute>
8405
8480
 
8406
8481
  </xsl:if>
8407
- <fo:block-container margin-left="0mm">
8482
+ <fo:block-container margin-left="0mm" role="SKIP">
8408
8483
 
8409
8484
  <fo:block xsl:use-attribute-sets="sourcecode-style">
8410
8485
 
@@ -8950,11 +9025,11 @@
8950
9025
  <!-- requirement, recommendation, permission table -->
8951
9026
  <!-- ========== -->
8952
9027
  <xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8953
- <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
9028
+ <fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt" role="SKIP">
8954
9029
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8955
9030
  <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
8956
9031
  </xsl:if>
8957
- <fo:block-container margin-left="0mm" margin-right="0mm">
9032
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
8958
9033
  <fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
8959
9034
  <xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
8960
9035
  <!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
@@ -9116,7 +9191,7 @@
9116
9191
  -->
9117
9192
  <xsl:template match="*[local-name() = 'example']">
9118
9193
 
9119
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style">
9194
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
9120
9195
 
9121
9196
  <xsl:call-template name="setBlockSpanAll"/>
9122
9197
 
@@ -9127,7 +9202,7 @@
9127
9202
  list
9128
9203
  </xsl:variable>
9129
9204
 
9130
- <fo:block-container margin-left="0mm">
9205
+ <fo:block-container margin-left="0mm" role="SKIP">
9131
9206
 
9132
9207
  <xsl:choose>
9133
9208
 
@@ -9140,8 +9215,8 @@
9140
9215
  </xsl:apply-templates>
9141
9216
  </fo:block>
9142
9217
 
9143
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9144
- <fo:block-container margin-left="0mm" margin-right="0mm">
9218
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9219
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9145
9220
  <xsl:apply-templates select="node()[not(local-name() = 'name')]">
9146
9221
  <xsl:with-param name="fo_element" select="$fo_element"/>
9147
9222
  </xsl:apply-templates>
@@ -9194,8 +9269,8 @@
9194
9269
 
9195
9270
  <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
9196
9271
  <!-- display further elements in blocks -->
9197
- <fo:block-container xsl:use-attribute-sets="example-body-style">
9198
- <fo:block-container margin-left="0mm" margin-right="0mm">
9272
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
9273
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9199
9274
  <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
9200
9275
  <xsl:with-param name="fo_element" select="'block'"/>
9201
9276
  </xsl:apply-templates>
@@ -9248,7 +9323,7 @@
9248
9323
  </xsl:variable>
9249
9324
  <xsl:choose>
9250
9325
  <xsl:when test="starts-with(normalize-space($element), 'block')">
9251
- <fo:block-container>
9326
+ <fo:block-container role="SKIP">
9252
9327
  <xsl:if test="ancestor::*[local-name() = 'li'] and contains(normalize-space($fo_element), 'block')">
9253
9328
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
9254
9329
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
@@ -9389,7 +9464,7 @@
9389
9464
  <!-- author -->
9390
9465
  <!-- ====== -->
9391
9466
  <xsl:template match="*[local-name() = 'quote']">
9392
- <fo:block-container margin-left="0mm">
9467
+ <fo:block-container margin-left="0mm" role="SKIP">
9393
9468
 
9394
9469
  <xsl:call-template name="setBlockSpanAll"/>
9395
9470
 
@@ -9399,12 +9474,12 @@
9399
9474
  </xsl:if>
9400
9475
  </xsl:if>
9401
9476
 
9402
- <fo:block-container margin-left="0mm">
9403
- <fo:block-container xsl:use-attribute-sets="quote-style">
9477
+ <fo:block-container margin-left="0mm" role="SKIP">
9478
+ <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
9404
9479
 
9405
9480
  <xsl:call-template name="refine_quote-style"/>
9406
9481
 
9407
- <fo:block-container margin-left="0mm" margin-right="0mm">
9482
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9408
9483
  <fo:block role="BlockQuote">
9409
9484
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
9410
9485
  </fo:block>
@@ -9560,10 +9635,10 @@
9560
9635
 
9561
9636
  <xsl:choose>
9562
9637
  <xsl:when test="$lang = 'zh'">
9563
- <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
9638
+ <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
9564
9639
  </xsl:when>
9565
9640
  <xsl:when test="../../@inline-header = 'true'">
9566
- <fo:inline font-size="90%">
9641
+ <fo:inline font-size="90%" role="SKIP">
9567
9642
  <xsl:call-template name="insertNonBreakSpaces">
9568
9643
  <xsl:with-param name="count" select="$padding-right"/>
9569
9644
  </xsl:call-template>
@@ -9571,7 +9646,7 @@
9571
9646
  </xsl:when>
9572
9647
  <xsl:otherwise>
9573
9648
  <xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
9574
- <fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/>​</fo:inline>
9649
+ <fo:inline padding-right="{$padding-right}mm" role="SKIP"><xsl:value-of select="$direction"/>​</fo:inline>
9575
9650
  </xsl:otherwise>
9576
9651
  </xsl:choose>
9577
9652
 
@@ -9601,12 +9676,12 @@
9601
9676
  <fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
9602
9677
 
9603
9678
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
9604
- <fo:block xsl:use-attribute-sets="term-name-style">
9679
+ <fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
9605
9680
  <xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
9606
9681
  </fo:block>
9607
9682
  </xsl:if>
9608
9683
 
9609
- <fo:block xsl:use-attribute-sets="preferred-term-style">
9684
+ <fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
9610
9685
  <xsl:call-template name="setStyle_preferred"/>
9611
9686
  <xsl:apply-templates/>
9612
9687
  </fo:block>
@@ -9647,7 +9722,7 @@
9647
9722
  <!-- definition -->
9648
9723
  <!-- ========== -->
9649
9724
  <xsl:template match="*[local-name() = 'definition']">
9650
- <fo:block xsl:use-attribute-sets="definition-style">
9725
+ <fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
9651
9726
  <xsl:apply-templates/>
9652
9727
  </fo:block>
9653
9728
  </xsl:template>
@@ -9690,6 +9765,10 @@
9690
9765
 
9691
9766
  <xsl:template match="*[local-name() = 'clause']">
9692
9767
  <fo:block>
9768
+ <xsl:if test="parent::*[local-name() = 'copyright-statement']">
9769
+ <xsl:attribute name="role">SKIP</xsl:attribute>
9770
+ </xsl:if>
9771
+
9693
9772
  <xsl:call-template name="setId"/>
9694
9773
 
9695
9774
  <xsl:call-template name="setBlockSpanAll"/>
@@ -9927,7 +10006,7 @@
9927
10006
  <xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9928
10007
  <xsl:choose>
9929
10008
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
9930
- <fo:block-container>
10009
+ <fo:block-container role="SKIP">
9931
10010
  <xsl:attribute name="margin-left">
9932
10011
  <xsl:choose>
9933
10012
  <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
@@ -9937,7 +10016,7 @@
9937
10016
 
9938
10017
  <xsl:call-template name="refine_list_container_style"/>
9939
10018
 
9940
- <fo:block-container margin-left="0mm">
10019
+ <fo:block-container margin-left="0mm" role="SKIP">
9941
10020
  <fo:block>
9942
10021
  <xsl:apply-templates select="." mode="list"/>
9943
10022
  </fo:block>
@@ -9946,11 +10025,11 @@
9946
10025
  </xsl:when>
9947
10026
  <xsl:otherwise>
9948
10027
 
9949
- <fo:block-container>
10028
+ <fo:block-container role="SKIP">
9950
10029
  <xsl:if test="ancestor::jis:ol or ancestor::jis:ul">
9951
10030
  <xsl:attribute name="margin-left">3.5mm</xsl:attribute>
9952
10031
  </xsl:if>
9953
- <fo:block-container margin-left="0mm">
10032
+ <fo:block-container margin-left="0mm" role="SKIP">
9954
10033
  <fo:block>
9955
10034
  <xsl:apply-templates select="." mode="list"/>
9956
10035
  </fo:block>
@@ -10371,7 +10450,10 @@
10371
10450
  <!-- Reference sections (Normative References and Bibliography) -->
10372
10451
  <!-- ========================================================== -->
10373
10452
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
10374
- <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/>
10453
+ <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
10454
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
10455
+
10456
+ </xsl:template>
10375
10457
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
10376
10458
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
10377
10459
 
@@ -10422,8 +10504,8 @@
10422
10504
  <!-- Normative references -->
10423
10505
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
10424
10506
 
10425
- <fo:block-container margin-left="6mm">
10426
- <fo:block-container margin-left="0mm">
10507
+ <fo:block-container margin-left="6mm" role="SKIP">
10508
+ <fo:block-container margin-left="0mm" role="SKIP">
10427
10509
  <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
10428
10510
  <xsl:call-template name="processBibitem"/>
10429
10511
  </fo:block>
@@ -10434,7 +10516,7 @@
10434
10516
 
10435
10517
  <!-- Bibliography (non-normative references) -->
10436
10518
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
10437
-
10519
+ <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
10438
10520
  <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10439
10521
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10440
10522
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
@@ -10462,6 +10544,35 @@
10462
10544
 
10463
10545
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
10464
10546
 
10547
+ <xsl:template name="insertListItem_Bibitem">
10548
+ <xsl:choose>
10549
+ <xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
10550
+ <xsl:otherwise>
10551
+ <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
10552
+ <fo:list-item-label end-indent="label-end()">
10553
+ <fo:block role="SKIP">
10554
+ <fo:inline role="SKIP">
10555
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
10556
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
10557
+ </xsl:apply-templates>
10558
+ </fo:inline>
10559
+ </fo:block>
10560
+ </fo:list-item-label>
10561
+ <fo:list-item-body start-indent="body-start()">
10562
+ <fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
10563
+ <xsl:call-template name="processBibitem">
10564
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
10565
+ </xsl:call-template>
10566
+ </fo:block>
10567
+ </fo:list-item-body>
10568
+ </fo:list-item>
10569
+ </xsl:otherwise>
10570
+ </xsl:choose>
10571
+ <xsl:apply-templates select="following-sibling::*[1][local-name() = 'bibitem']">
10572
+ <xsl:with-param name="skip">false</xsl:with-param>
10573
+ </xsl:apply-templates>
10574
+ </xsl:template>
10575
+
10465
10576
  <xsl:template name="processBibitem">
10466
10577
  <xsl:param name="biblio_tag_part">both</xsl:param>
10467
10578
 
@@ -10794,9 +10905,9 @@
10794
10905
 
10795
10906
  <xsl:call-template name="setBlockSpanAll"/>
10796
10907
 
10797
- <fo:block-container xsl:use-attribute-sets="admonition-container-style">
10908
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
10798
10909
 
10799
- <fo:block-container margin-left="0mm" margin-right="0mm">
10910
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
10800
10911
  <fo:block>
10801
10912
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10802
10913
  </fo:block>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module JIS
3
- VERSION = "0.0.8".freeze
3
+ VERSION = "0.0.9".freeze
4
4
  end
5
5
  end
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-jis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
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-iso