metanorma-iho 0.7.10 → 0.7.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: 6373a38039c839b8c0d50112c5f91edb03686f62e79772e26938e8a425fef5c7
4
- data.tar.gz: b5e19735772e4bee4aea196f0f8c572ad68fd0722707c6347c6d227494d14426
3
+ metadata.gz: fc89276932179a8f335ed0fd62b779288a60a846e0b1b9cd030d7f6675c7345c
4
+ data.tar.gz: 8519cf06a03c92266d81b43136864a6c21ec373a22ddd194447a077e76edbec5
5
5
  SHA512:
6
- metadata.gz: 5340f88a19b9004b32215f55415b0b7e3df3ce33c29815f2dec44cb6eba68f538bbd690e6a9830484293863d591a1e00e9297ce407368b4be34b4a9259a0257d
7
- data.tar.gz: 28782da2a458b3c0b63113f0774b55ee9de85892984a835e6ae4cbdb32f9725f924d56fd4c95ca3b49f56daec620857d9dfa0d14d121af5de1c389733986de12
6
+ metadata.gz: a3140b1f98fd1dc5ae37d2cc70bd9bb1c7096a9ab775cecdc600abdeb2fc63ab804fb73b04c252d0f957d21a82795654a1d63237970f865e3356ccfb2de2a767
7
+ data.tar.gz: caad18f0852baec917dc877473391bb503badc560ab644f8f35c3c4a522a3f2a7a41169e9abe845117be372de48b2e97758cf761bdf964cc078ffceb4aa9131c
@@ -1856,6 +1856,10 @@
1856
1856
  </xsl:attribute-set> <!-- formula-stem-number-style -->
1857
1857
  <!-- End Formula's styles -->
1858
1858
 
1859
+ <xsl:template name="refine_formula-stem-number-style">
1860
+
1861
+ </xsl:template>
1862
+
1859
1863
  <xsl:attribute-set name="image-style">
1860
1864
  <xsl:attribute name="text-align">center</xsl:attribute>
1861
1865
 
@@ -2350,13 +2354,13 @@
2350
2354
 
2351
2355
  <xsl:template name="processPrefaceSectionsDefault_Contents">
2352
2356
  <xsl:variable name="nodes_preface_">
2353
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2357
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
2354
2358
  <node id="{@id}"/>
2355
2359
  </xsl:for-each>
2356
2360
  </xsl:variable>
2357
2361
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2358
2362
 
2359
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2363
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
2360
2364
  <xsl:sort select="@displayorder" data-type="number"/>
2361
2365
 
2362
2366
  <!-- process Section's title -->
@@ -2390,12 +2394,12 @@
2390
2394
  <xsl:apply-templates select="." mode="contents"/>
2391
2395
  </xsl:for-each>
2392
2396
 
2393
- <xsl:for-each select="/*/*[local-name()='annex']">
2397
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
2394
2398
  <xsl:sort select="@displayorder" data-type="number"/>
2395
2399
  <xsl:apply-templates select="." mode="contents"/>
2396
- </xsl:for-each>
2400
+ </xsl:for-each> -->
2397
2401
 
2398
- <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]">
2402
+ <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]">
2399
2403
  <xsl:sort select="@displayorder" data-type="number"/>
2400
2404
  <xsl:apply-templates select="." mode="contents"/>
2401
2405
  </xsl:for-each>
@@ -2761,7 +2765,7 @@
2761
2765
  </xsl:attribute>
2762
2766
  </xsl:for-each>
2763
2767
 
2764
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2768
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2765
2769
  <xsl:if test="$isNoteOrFnExist = 'true'">
2766
2770
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2767
2771
  </xsl:if>
@@ -2805,7 +2809,7 @@
2805
2809
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2806
2810
  </xsl:when>
2807
2811
  <xsl:otherwise>
2808
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
2812
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
2809
2813
  </xsl:otherwise>
2810
2814
  </xsl:choose>
2811
2815
 
@@ -2850,7 +2854,7 @@
2850
2854
  <fo:table-row>
2851
2855
  <fo:table-cell column-number="2">
2852
2856
  <xsl:copy-of select="$table-preamble"/>
2853
- <fo:block>
2857
+ <fo:block role="SKIP">
2854
2858
  <xsl:call-template name="setTrackChangesStyles">
2855
2859
  <xsl:with-param name="isAdded" select="$isAdded"/>
2856
2860
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -2893,7 +2897,7 @@
2893
2897
  <xsl:param name="continued"/>
2894
2898
  <xsl:if test="normalize-space() != ''">
2895
2899
 
2896
- <fo:block xsl:use-attribute-sets="table-name-style">
2900
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
2897
2901
 
2898
2902
  <xsl:call-template name="refine_table-name-style">
2899
2903
  <xsl:with-param name="continued" select="$continued"/>
@@ -3278,8 +3282,8 @@
3278
3282
  <xsl:template name="table-header-title">
3279
3283
  <xsl:param name="cols-count"/>
3280
3284
  <!-- row for title -->
3281
- <fo:table-row>
3282
- <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">
3285
+ <fo:table-row role="SKIP">
3286
+ <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">
3283
3287
 
3284
3288
  <xsl:call-template name="refine_table-header-title-style"/>
3285
3289
 
@@ -3288,7 +3292,7 @@
3288
3292
  </xsl:apply-templates>
3289
3293
 
3290
3294
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3291
- <fo:block/>
3295
+ <fo:block role="SKIP"/>
3292
3296
  </xsl:if>
3293
3297
 
3294
3298
  </fo:table-cell>
@@ -3323,7 +3327,7 @@
3323
3327
  <xsl:param name="colwidths"/>
3324
3328
  <xsl:param name="colgroup"/>
3325
3329
 
3326
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3330
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3327
3331
 
3328
3332
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3329
3333
 
@@ -3396,6 +3400,7 @@
3396
3400
  <xsl:apply-templates select="../*[local-name()='p']"/>
3397
3401
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3398
3402
  <xsl:apply-templates select="../*[local-name()='note']"/>
3403
+ <xsl:apply-templates select="../*[local-name()='example']"/>
3399
3404
  <xsl:apply-templates select="../*[local-name()='source']"/>
3400
3405
 
3401
3406
  <xsl:variable name="isDisplayRowSeparator">
@@ -3404,7 +3409,7 @@
3404
3409
 
3405
3410
  <!-- horizontal row separator -->
3406
3411
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3407
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
3412
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3408
3413
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3409
3414
 
3410
3415
  <xsl:call-template name="setBordersTableArray"/>
@@ -3598,7 +3603,7 @@
3598
3603
 
3599
3604
  <xsl:call-template name="refine_table-header-cell-style"/>
3600
3605
 
3601
- <fo:block>
3606
+ <fo:block role="SKIP">
3602
3607
  <xsl:apply-templates/>
3603
3608
  </fo:block>
3604
3609
  </fo:table-cell>
@@ -3651,7 +3656,7 @@
3651
3656
  <xsl:attribute name="text-align">left</xsl:attribute>
3652
3657
  </xsl:if>
3653
3658
 
3654
- <fo:block>
3659
+ <fo:block role="SKIP">
3655
3660
 
3656
3661
  <xsl:if test="$isGenerateTableIF = 'true'">
3657
3662
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -3665,13 +3670,13 @@
3665
3670
  </fo:table-cell>
3666
3671
  </xsl:template> <!-- td -->
3667
3672
 
3668
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
3673
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
3669
3674
 
3670
3675
  <fo:block xsl:use-attribute-sets="table-note-style">
3671
3676
 
3672
3677
  <xsl:call-template name="refine_table-note-style"/>
3673
3678
 
3674
- <!-- Table's note name (NOTE, for example) -->
3679
+ <!-- Table's note/example name (NOTE, for example) -->
3675
3680
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
3676
3681
 
3677
3682
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -3685,7 +3690,7 @@
3685
3690
 
3686
3691
  </xsl:template> <!-- table/note -->
3687
3692
 
3688
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
3693
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
3689
3694
  <xsl:apply-templates/>
3690
3695
  </xsl:template>
3691
3696
 
@@ -4520,7 +4525,7 @@
4520
4525
  -->
4521
4526
  <fo:table-row>
4522
4527
  <fo:table-cell number-columns-spanned="2">
4523
- <fo:block>
4528
+ <fo:block role="SKIP">
4524
4529
  <xsl:call-template name="note"/>
4525
4530
  </fo:block>
4526
4531
  </fo:table-cell>
@@ -4585,7 +4590,7 @@
4585
4590
 
4586
4591
  <xsl:call-template name="refine_dt-cell-style"/>
4587
4592
 
4588
- <fo:block xsl:use-attribute-sets="dt-block-style">
4593
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
4589
4594
  <xsl:copy-of select="@id"/>
4590
4595
 
4591
4596
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -4615,7 +4620,7 @@
4615
4620
 
4616
4621
  <xsl:call-template name="refine_dd-cell-style"/>
4617
4622
 
4618
- <fo:block>
4623
+ <fo:block role="SKIP">
4619
4624
 
4620
4625
  <xsl:if test="$isGenerateTableIF = 'true'">
4621
4626
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -4757,10 +4762,15 @@
4757
4762
  <!-- ========================= -->
4758
4763
  <xsl:template match="*[local-name()='em']">
4759
4764
  <fo:inline font-style="italic">
4765
+ <xsl:call-template name="refine_italic_style"/>
4760
4766
  <xsl:apply-templates/>
4761
4767
  </fo:inline>
4762
4768
  </xsl:template>
4763
4769
 
4770
+ <xsl:template name="refine_italic_style">
4771
+
4772
+ </xsl:template>
4773
+
4764
4774
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
4765
4775
  <xsl:param name="split_keep-within-line"/>
4766
4776
  <fo:inline font-weight="bold">
@@ -4984,11 +4994,41 @@
4984
4994
 
4985
4995
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4986
4996
  <xsl:variable name="text" select="normalize-space(.)"/>
4987
- <fo:inline font-size="75%">
4997
+ <fo:inline font-size="75%" role="SKIP">
4988
4998
  <xsl:if test="string-length($text) &gt; 0">
4989
- <xsl:call-template name="recursiveSmallCaps">
4990
- <xsl:with-param name="text" select="$text"/>
4991
- </xsl:call-template>
4999
+ <xsl:variable name="smallCapsText">
5000
+ <xsl:call-template name="recursiveSmallCaps">
5001
+ <xsl:with-param name="text" select="$text"/>
5002
+ </xsl:call-template>
5003
+ </xsl:variable>
5004
+ <!-- merge neighboring fo:inline -->
5005
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
5006
+ <xsl:choose>
5007
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
5008
+ <xsl:when test="self::fo:inline and @font-size">
5009
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
5010
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
5011
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
5012
+ <xsl:variable name="next_text">
5013
+ <xsl:choose>
5014
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
5015
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
5016
+ </xsl:choose>
5017
+ </xsl:variable>
5018
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
5019
+ <fo:inline>
5020
+ <xsl:copy-of select="@*"/>
5021
+ <xsl:copy-of select="./node()"/>
5022
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
5023
+ <xsl:copy-of select="./node()"/>
5024
+ </xsl:for-each>
5025
+ </fo:inline>
5026
+ </xsl:when>
5027
+ <xsl:otherwise>
5028
+ <xsl:copy-of select="."/>
5029
+ </xsl:otherwise>
5030
+ </xsl:choose>
5031
+ </xsl:for-each>
4992
5032
  </xsl:if>
4993
5033
  </fo:inline>
4994
5034
  </xsl:template>
@@ -5000,7 +5040,7 @@
5000
5040
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5001
5041
  <xsl:choose>
5002
5042
  <xsl:when test="$char=$upperCase">
5003
- <fo:inline font-size="{100 div 0.75}%">
5043
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5004
5044
  <xsl:value-of select="$upperCase"/>
5005
5045
  </fo:inline>
5006
5046
  </xsl:when>
@@ -5233,6 +5273,10 @@
5233
5273
 
5234
5274
  <xsl:when test="not(contains($text, $separator))">
5235
5275
  <word>
5276
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5277
+ <xsl:text>
5278
+  </xsl:text> <!-- to add distance between dt and dd -->
5279
+ </xsl:if>
5236
5280
  <xsl:call-template name="enclose_text_in_tags">
5237
5281
  <xsl:with-param name="text" select="normalize-space($text)"/>
5238
5282
  <xsl:with-param name="tags" select="$tags"/>
@@ -5241,6 +5285,10 @@
5241
5285
  </xsl:when>
5242
5286
  <xsl:otherwise>
5243
5287
  <word>
5288
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5289
+ <xsl:text>
5290
+  </xsl:text> <!-- to add distance between dt and dd -->
5291
+ </xsl:if>
5244
5292
  <xsl:call-template name="enclose_text_in_tags">
5245
5293
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
5246
5294
  <xsl:with-param name="tags" select="$tags"/>
@@ -5424,6 +5472,10 @@
5424
5472
  <xsl:template name="getSimpleTable">
5425
5473
  <xsl:param name="id"/>
5426
5474
 
5475
+ <!-- <test0>
5476
+ <xsl:copy-of select="."/>
5477
+ </test0> -->
5478
+
5427
5479
  <xsl:variable name="simple-table">
5428
5480
 
5429
5481
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -6469,7 +6521,7 @@
6469
6521
  <fo:table-body>
6470
6522
  <fo:table-row>
6471
6523
  <fo:table-cell display-align="center">
6472
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
6524
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
6473
6525
 
6474
6526
  <xsl:call-template name="refine_formula-stem-block-style"/>
6475
6527
 
@@ -6477,7 +6529,10 @@
6477
6529
  </fo:block>
6478
6530
  </fo:table-cell>
6479
6531
  <fo:table-cell display-align="center">
6480
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
6532
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
6533
+
6534
+ <xsl:call-template name="refine_formula-stem-number-style"/>
6535
+
6481
6536
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
6482
6537
  </fo:block>
6483
6538
  </fo:table-cell>
@@ -7988,7 +8043,7 @@
7988
8043
  <!-- second td with sourcecode -->
7989
8044
  <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'] -->
7990
8045
  <fo:table-cell>
7991
- <fo:block>
8046
+ <fo:block role="SKIP">
7992
8047
  <xsl:apply-templates/>
7993
8048
  </fo:block>
7994
8049
  </fo:table-cell>
@@ -8475,7 +8530,7 @@
8475
8530
 
8476
8531
  <xsl:call-template name="setTableCellAttributes"/>
8477
8532
 
8478
- <fo:block>
8533
+ <fo:block role="SKIP">
8479
8534
  <xsl:apply-templates/>
8480
8535
  </fo:block>
8481
8536
  </fo:table-cell>
@@ -8497,7 +8552,7 @@
8497
8552
 
8498
8553
  <xsl:call-template name="setTableCellAttributes"/>
8499
8554
 
8500
- <fo:block>
8555
+ <fo:block role="SKIP">
8501
8556
  <xsl:apply-templates/>
8502
8557
  </fo:block>
8503
8558
  </fo:table-cell>
@@ -8692,6 +8747,12 @@
8692
8747
 
8693
8748
  </xsl:template>
8694
8749
 
8750
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
8751
+ <fo:inline xsl:use-attribute-sets="example-name-style">
8752
+ <xsl:apply-templates/>
8753
+ </fo:inline>
8754
+ </xsl:template>
8755
+
8695
8756
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
8696
8757
  <xsl:param name="fo_element">block</xsl:param>
8697
8758
 
@@ -9263,6 +9324,50 @@
9263
9324
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
9264
9325
  </xsl:choose>
9265
9326
  </xsl:when>
9327
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
9328
+
9329
+ <xsl:variable name="label">
9330
+
9331
+ <xsl:variable name="type" select="../@type"/>
9332
+
9333
+ <xsl:variable name="style_prefix_">
9334
+ <xsl:if test="$type = 'roman'">
9335
+ <!-- Example: (i) -->
9336
+ </xsl:if>
9337
+ </xsl:variable>
9338
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
9339
+
9340
+ <xsl:variable name="style_suffix_">
9341
+ <xsl:choose>
9342
+ <xsl:when test="$type = 'arabic'">
9343
+ )
9344
+ </xsl:when>
9345
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
9346
+ )
9347
+ </xsl:when>
9348
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
9349
+ .
9350
+ </xsl:when>
9351
+ <xsl:when test="$type = 'roman'">
9352
+ )
9353
+ </xsl:when>
9354
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
9355
+ </xsl:choose>
9356
+ </xsl:variable>
9357
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
9358
+
9359
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
9360
+ <xsl:value-of select="$style_prefix"/>
9361
+ </xsl:if>
9362
+ <xsl:value-of select="@label"/>
9363
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
9364
+ <xsl:value-of select="$style_suffix"/>
9365
+ </xsl:if>
9366
+ </xsl:variable>
9367
+
9368
+ <xsl:value-of select="normalize-space($label)"/>
9369
+
9370
+ </xsl:when>
9266
9371
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
9267
9372
 
9268
9373
  <!-- Example: for BSI <?list-start 2?> -->
@@ -9320,10 +9425,10 @@
9320
9425
  <xsl:when test="$type = 'arabic'">
9321
9426
  1)
9322
9427
  </xsl:when>
9323
- <xsl:when test="$type = 'alphabet'">
9428
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
9324
9429
  a)
9325
9430
  </xsl:when>
9326
- <xsl:when test="$type = 'alphabet_upper'">
9431
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
9327
9432
  A.
9328
9433
  </xsl:when>
9329
9434
  <xsl:when test="$type = 'roman'">
@@ -9454,7 +9559,7 @@
9454
9559
  <xsl:call-template name="refine_list-item-style"/>
9455
9560
 
9456
9561
  <fo:list-item-label end-indent="label-end()">
9457
- <fo:block xsl:use-attribute-sets="list-item-label-style">
9562
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
9458
9563
 
9459
9564
  <xsl:call-template name="refine_list-item-label-style"/>
9460
9565
 
@@ -9468,7 +9573,7 @@
9468
9573
  </fo:block>
9469
9574
  </fo:list-item-label>
9470
9575
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
9471
- <fo:block>
9576
+ <fo:block role="SKIP">
9472
9577
 
9473
9578
  <xsl:call-template name="refine_list-item-body-style"/>
9474
9579
 
@@ -9747,10 +9852,10 @@
9747
9852
  <fo:table-body>
9748
9853
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
9749
9854
 
9750
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
9751
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
9752
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
9753
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
9855
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
9856
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
9857
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
9858
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
9754
9859
  </fo:table-row>
9755
9860
  <xsl:apply-templates/>
9756
9861
  </fo:table-body>
@@ -9765,7 +9870,7 @@
9765
9870
 
9766
9871
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
9767
9872
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
9768
- <fo:block><xsl:apply-templates/></fo:block>
9873
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
9769
9874
  </fo:table-cell>
9770
9875
  </xsl:template>
9771
9876
  <!-- ============ -->
@@ -10074,7 +10179,7 @@
10074
10179
  <xsl:for-each select="*[local-name() = 'tab']">
10075
10180
  <xsl:variable name="current_id" select="generate-id()"/>
10076
10181
  <fo:table-cell>
10077
- <fo:block line-height-shift-adjustment="disregard-shifts">
10182
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
10078
10183
  <xsl:call-template name="insert_basic_link">
10079
10184
  <xsl:with-param name="element">
10080
10185
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -10092,7 +10197,7 @@
10092
10197
  </xsl:for-each>
10093
10198
  <!-- last column - for page numbers -->
10094
10199
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
10095
- <fo:block>
10200
+ <fo:block role="SKIP">
10096
10201
  <xsl:call-template name="insert_basic_link">
10097
10202
  <xsl:with-param name="element">
10098
10203
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -1856,6 +1856,10 @@
1856
1856
  </xsl:attribute-set> <!-- formula-stem-number-style -->
1857
1857
  <!-- End Formula's styles -->
1858
1858
 
1859
+ <xsl:template name="refine_formula-stem-number-style">
1860
+
1861
+ </xsl:template>
1862
+
1859
1863
  <xsl:attribute-set name="image-style">
1860
1864
  <xsl:attribute name="text-align">center</xsl:attribute>
1861
1865
 
@@ -2350,13 +2354,13 @@
2350
2354
 
2351
2355
  <xsl:template name="processPrefaceSectionsDefault_Contents">
2352
2356
  <xsl:variable name="nodes_preface_">
2353
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2357
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
2354
2358
  <node id="{@id}"/>
2355
2359
  </xsl:for-each>
2356
2360
  </xsl:variable>
2357
2361
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2358
2362
 
2359
- <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2363
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition' or @type = 'toc')]">
2360
2364
  <xsl:sort select="@displayorder" data-type="number"/>
2361
2365
 
2362
2366
  <!-- process Section's title -->
@@ -2390,12 +2394,12 @@
2390
2394
  <xsl:apply-templates select="." mode="contents"/>
2391
2395
  </xsl:for-each>
2392
2396
 
2393
- <xsl:for-each select="/*/*[local-name()='annex']">
2397
+ <!-- <xsl:for-each select="/*/*[local-name()='annex']">
2394
2398
  <xsl:sort select="@displayorder" data-type="number"/>
2395
2399
  <xsl:apply-templates select="." mode="contents"/>
2396
- </xsl:for-each>
2400
+ </xsl:for-each> -->
2397
2401
 
2398
- <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]">
2402
+ <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]">
2399
2403
  <xsl:sort select="@displayorder" data-type="number"/>
2400
2404
  <xsl:apply-templates select="." mode="contents"/>
2401
2405
  </xsl:for-each>
@@ -2761,7 +2765,7 @@
2761
2765
  </xsl:attribute>
2762
2766
  </xsl:for-each>
2763
2767
 
2764
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2768
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2765
2769
  <xsl:if test="$isNoteOrFnExist = 'true'">
2766
2770
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2767
2771
  </xsl:if>
@@ -2805,7 +2809,7 @@
2805
2809
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
2806
2810
  </xsl:when>
2807
2811
  <xsl:otherwise>
2808
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
2812
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
2809
2813
  </xsl:otherwise>
2810
2814
  </xsl:choose>
2811
2815
 
@@ -2850,7 +2854,7 @@
2850
2854
  <fo:table-row>
2851
2855
  <fo:table-cell column-number="2">
2852
2856
  <xsl:copy-of select="$table-preamble"/>
2853
- <fo:block>
2857
+ <fo:block role="SKIP">
2854
2858
  <xsl:call-template name="setTrackChangesStyles">
2855
2859
  <xsl:with-param name="isAdded" select="$isAdded"/>
2856
2860
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
@@ -2893,7 +2897,7 @@
2893
2897
  <xsl:param name="continued"/>
2894
2898
  <xsl:if test="normalize-space() != ''">
2895
2899
 
2896
- <fo:block xsl:use-attribute-sets="table-name-style">
2900
+ <fo:block xsl:use-attribute-sets="table-name-style" role="SKIP">
2897
2901
 
2898
2902
  <xsl:call-template name="refine_table-name-style">
2899
2903
  <xsl:with-param name="continued" select="$continued"/>
@@ -3278,8 +3282,8 @@
3278
3282
  <xsl:template name="table-header-title">
3279
3283
  <xsl:param name="cols-count"/>
3280
3284
  <!-- row for title -->
3281
- <fo:table-row>
3282
- <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">
3285
+ <fo:table-row role="SKIP">
3286
+ <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">
3283
3287
 
3284
3288
  <xsl:call-template name="refine_table-header-title-style"/>
3285
3289
 
@@ -3288,7 +3292,7 @@
3288
3292
  </xsl:apply-templates>
3289
3293
 
3290
3294
  <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
3291
- <fo:block/>
3295
+ <fo:block role="SKIP"/>
3292
3296
  </xsl:if>
3293
3297
 
3294
3298
  </fo:table-cell>
@@ -3323,7 +3327,7 @@
3323
3327
  <xsl:param name="colwidths"/>
3324
3328
  <xsl:param name="colgroup"/>
3325
3329
 
3326
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3330
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3327
3331
 
3328
3332
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3329
3333
 
@@ -3396,6 +3400,7 @@
3396
3400
  <xsl:apply-templates select="../*[local-name()='p']"/>
3397
3401
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3398
3402
  <xsl:apply-templates select="../*[local-name()='note']"/>
3403
+ <xsl:apply-templates select="../*[local-name()='example']"/>
3399
3404
  <xsl:apply-templates select="../*[local-name()='source']"/>
3400
3405
 
3401
3406
  <xsl:variable name="isDisplayRowSeparator">
@@ -3404,7 +3409,7 @@
3404
3409
 
3405
3410
  <!-- horizontal row separator -->
3406
3411
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3407
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
3412
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3408
3413
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3409
3414
 
3410
3415
  <xsl:call-template name="setBordersTableArray"/>
@@ -3598,7 +3603,7 @@
3598
3603
 
3599
3604
  <xsl:call-template name="refine_table-header-cell-style"/>
3600
3605
 
3601
- <fo:block>
3606
+ <fo:block role="SKIP">
3602
3607
  <xsl:apply-templates/>
3603
3608
  </fo:block>
3604
3609
  </fo:table-cell>
@@ -3651,7 +3656,7 @@
3651
3656
  <xsl:attribute name="text-align">left</xsl:attribute>
3652
3657
  </xsl:if>
3653
3658
 
3654
- <fo:block>
3659
+ <fo:block role="SKIP">
3655
3660
 
3656
3661
  <xsl:if test="$isGenerateTableIF = 'true'">
3657
3662
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -3665,13 +3670,13 @@
3665
3670
  </fo:table-cell>
3666
3671
  </xsl:template> <!-- td -->
3667
3672
 
3668
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
3673
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
3669
3674
 
3670
3675
  <fo:block xsl:use-attribute-sets="table-note-style">
3671
3676
 
3672
3677
  <xsl:call-template name="refine_table-note-style"/>
3673
3678
 
3674
- <!-- Table's note name (NOTE, for example) -->
3679
+ <!-- Table's note/example name (NOTE, for example) -->
3675
3680
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
3676
3681
 
3677
3682
  <xsl:call-template name="refine_table-note-name-style"/>
@@ -3685,7 +3690,7 @@
3685
3690
 
3686
3691
  </xsl:template> <!-- table/note -->
3687
3692
 
3688
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
3693
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
3689
3694
  <xsl:apply-templates/>
3690
3695
  </xsl:template>
3691
3696
 
@@ -4520,7 +4525,7 @@
4520
4525
  -->
4521
4526
  <fo:table-row>
4522
4527
  <fo:table-cell number-columns-spanned="2">
4523
- <fo:block>
4528
+ <fo:block role="SKIP">
4524
4529
  <xsl:call-template name="note"/>
4525
4530
  </fo:block>
4526
4531
  </fo:table-cell>
@@ -4585,7 +4590,7 @@
4585
4590
 
4586
4591
  <xsl:call-template name="refine_dt-cell-style"/>
4587
4592
 
4588
- <fo:block xsl:use-attribute-sets="dt-block-style">
4593
+ <fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
4589
4594
  <xsl:copy-of select="@id"/>
4590
4595
 
4591
4596
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -4615,7 +4620,7 @@
4615
4620
 
4616
4621
  <xsl:call-template name="refine_dd-cell-style"/>
4617
4622
 
4618
- <fo:block>
4623
+ <fo:block role="SKIP">
4619
4624
 
4620
4625
  <xsl:if test="$isGenerateTableIF = 'true'">
4621
4626
  <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
@@ -4757,10 +4762,15 @@
4757
4762
  <!-- ========================= -->
4758
4763
  <xsl:template match="*[local-name()='em']">
4759
4764
  <fo:inline font-style="italic">
4765
+ <xsl:call-template name="refine_italic_style"/>
4760
4766
  <xsl:apply-templates/>
4761
4767
  </fo:inline>
4762
4768
  </xsl:template>
4763
4769
 
4770
+ <xsl:template name="refine_italic_style">
4771
+
4772
+ </xsl:template>
4773
+
4764
4774
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
4765
4775
  <xsl:param name="split_keep-within-line"/>
4766
4776
  <fo:inline font-weight="bold">
@@ -4984,11 +4994,41 @@
4984
4994
 
4985
4995
  <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
4986
4996
  <xsl:variable name="text" select="normalize-space(.)"/>
4987
- <fo:inline font-size="75%">
4997
+ <fo:inline font-size="75%" role="SKIP">
4988
4998
  <xsl:if test="string-length($text) &gt; 0">
4989
- <xsl:call-template name="recursiveSmallCaps">
4990
- <xsl:with-param name="text" select="$text"/>
4991
- </xsl:call-template>
4999
+ <xsl:variable name="smallCapsText">
5000
+ <xsl:call-template name="recursiveSmallCaps">
5001
+ <xsl:with-param name="text" select="$text"/>
5002
+ </xsl:call-template>
5003
+ </xsl:variable>
5004
+ <!-- merge neighboring fo:inline -->
5005
+ <xsl:for-each select="xalan:nodeset($smallCapsText)/node()">
5006
+ <xsl:choose>
5007
+ <xsl:when test="self::fo:inline and preceding-sibling::node()[1][self::fo:inline]"><!-- <xsl:copy-of select="."/> --></xsl:when>
5008
+ <xsl:when test="self::fo:inline and @font-size">
5009
+ <xsl:variable name="curr_pos" select="count(preceding-sibling::node()) + 1"/>
5010
+ <!-- <curr_pos><xsl:value-of select="$curr_pos"/></curr_pos> -->
5011
+ <xsl:variable name="next_text_" select="count(following-sibling::node()[not(local-name() = 'inline')][1]/preceding-sibling::node())"/>
5012
+ <xsl:variable name="next_text">
5013
+ <xsl:choose>
5014
+ <xsl:when test="$next_text_ = 0">99999999</xsl:when>
5015
+ <xsl:otherwise><xsl:value-of select="$next_text_ + 1"/></xsl:otherwise>
5016
+ </xsl:choose>
5017
+ </xsl:variable>
5018
+ <!-- <next_text><xsl:value-of select="$next_text"/></next_text> -->
5019
+ <fo:inline>
5020
+ <xsl:copy-of select="@*"/>
5021
+ <xsl:copy-of select="./node()"/>
5022
+ <xsl:for-each select="following-sibling::node()[position() &lt; $next_text - $curr_pos]"> <!-- [self::fo:inline] -->
5023
+ <xsl:copy-of select="./node()"/>
5024
+ </xsl:for-each>
5025
+ </fo:inline>
5026
+ </xsl:when>
5027
+ <xsl:otherwise>
5028
+ <xsl:copy-of select="."/>
5029
+ </xsl:otherwise>
5030
+ </xsl:choose>
5031
+ </xsl:for-each>
4992
5032
  </xsl:if>
4993
5033
  </fo:inline>
4994
5034
  </xsl:template>
@@ -5000,7 +5040,7 @@
5000
5040
  <xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
5001
5041
  <xsl:choose>
5002
5042
  <xsl:when test="$char=$upperCase">
5003
- <fo:inline font-size="{100 div 0.75}%">
5043
+ <fo:inline font-size="{100 div 0.75}%" role="SKIP">
5004
5044
  <xsl:value-of select="$upperCase"/>
5005
5045
  </fo:inline>
5006
5046
  </xsl:when>
@@ -5233,6 +5273,10 @@
5233
5273
 
5234
5274
  <xsl:when test="not(contains($text, $separator))">
5235
5275
  <word>
5276
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5277
+ <xsl:text>
5278
+  </xsl:text> <!-- to add distance between dt and dd -->
5279
+ </xsl:if>
5236
5280
  <xsl:call-template name="enclose_text_in_tags">
5237
5281
  <xsl:with-param name="text" select="normalize-space($text)"/>
5238
5282
  <xsl:with-param name="tags" select="$tags"/>
@@ -5241,6 +5285,10 @@
5241
5285
  </xsl:when>
5242
5286
  <xsl:otherwise>
5243
5287
  <word>
5288
+ <xsl:if test="ancestor::*[local-name() = 'p'][@from_dl = 'true']">
5289
+ <xsl:text>
5290
+  </xsl:text> <!-- to add distance between dt and dd -->
5291
+ </xsl:if>
5244
5292
  <xsl:call-template name="enclose_text_in_tags">
5245
5293
  <xsl:with-param name="text" select="normalize-space(substring-before($text, $separator))"/>
5246
5294
  <xsl:with-param name="tags" select="$tags"/>
@@ -5424,6 +5472,10 @@
5424
5472
  <xsl:template name="getSimpleTable">
5425
5473
  <xsl:param name="id"/>
5426
5474
 
5475
+ <!-- <test0>
5476
+ <xsl:copy-of select="."/>
5477
+ </test0> -->
5478
+
5427
5479
  <xsl:variable name="simple-table">
5428
5480
 
5429
5481
  <!-- Step 0. replace <br/> to <p>...</p> -->
@@ -6469,7 +6521,7 @@
6469
6521
  <fo:table-body>
6470
6522
  <fo:table-row>
6471
6523
  <fo:table-cell display-align="center">
6472
- <fo:block xsl:use-attribute-sets="formula-stem-block-style">
6524
+ <fo:block xsl:use-attribute-sets="formula-stem-block-style" role="SKIP">
6473
6525
 
6474
6526
  <xsl:call-template name="refine_formula-stem-block-style"/>
6475
6527
 
@@ -6477,7 +6529,10 @@
6477
6529
  </fo:block>
6478
6530
  </fo:table-cell>
6479
6531
  <fo:table-cell display-align="center">
6480
- <fo:block xsl:use-attribute-sets="formula-stem-number-style">
6532
+ <fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
6533
+
6534
+ <xsl:call-template name="refine_formula-stem-number-style"/>
6535
+
6481
6536
  <xsl:apply-templates select="../*[local-name() = 'name']"/>
6482
6537
  </fo:block>
6483
6538
  </fo:table-cell>
@@ -7988,7 +8043,7 @@
7988
8043
  <!-- second td with sourcecode -->
7989
8044
  <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'] -->
7990
8045
  <fo:table-cell>
7991
- <fo:block>
8046
+ <fo:block role="SKIP">
7992
8047
  <xsl:apply-templates/>
7993
8048
  </fo:block>
7994
8049
  </fo:table-cell>
@@ -8475,7 +8530,7 @@
8475
8530
 
8476
8531
  <xsl:call-template name="setTableCellAttributes"/>
8477
8532
 
8478
- <fo:block>
8533
+ <fo:block role="SKIP">
8479
8534
  <xsl:apply-templates/>
8480
8535
  </fo:block>
8481
8536
  </fo:table-cell>
@@ -8497,7 +8552,7 @@
8497
8552
 
8498
8553
  <xsl:call-template name="setTableCellAttributes"/>
8499
8554
 
8500
- <fo:block>
8555
+ <fo:block role="SKIP">
8501
8556
  <xsl:apply-templates/>
8502
8557
  </fo:block>
8503
8558
  </fo:table-cell>
@@ -8692,6 +8747,12 @@
8692
8747
 
8693
8748
  </xsl:template>
8694
8749
 
8750
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
8751
+ <fo:inline xsl:use-attribute-sets="example-name-style">
8752
+ <xsl:apply-templates/>
8753
+ </fo:inline>
8754
+ </xsl:template>
8755
+
8695
8756
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
8696
8757
  <xsl:param name="fo_element">block</xsl:param>
8697
8758
 
@@ -9263,6 +9324,50 @@
9263
9324
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
9264
9325
  </xsl:choose>
9265
9326
  </xsl:when>
9327
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
9328
+
9329
+ <xsl:variable name="label">
9330
+
9331
+ <xsl:variable name="type" select="../@type"/>
9332
+
9333
+ <xsl:variable name="style_prefix_">
9334
+ <xsl:if test="$type = 'roman'">
9335
+ <!-- Example: (i) -->
9336
+ </xsl:if>
9337
+ </xsl:variable>
9338
+ <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
9339
+
9340
+ <xsl:variable name="style_suffix_">
9341
+ <xsl:choose>
9342
+ <xsl:when test="$type = 'arabic'">
9343
+ )
9344
+ </xsl:when>
9345
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
9346
+ )
9347
+ </xsl:when>
9348
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
9349
+ .
9350
+ </xsl:when>
9351
+ <xsl:when test="$type = 'roman'">
9352
+ )
9353
+ </xsl:when>
9354
+ <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
9355
+ </xsl:choose>
9356
+ </xsl:variable>
9357
+ <xsl:variable name="style_suffix" select="normalize-space($style_suffix_)"/>
9358
+
9359
+ <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
9360
+ <xsl:value-of select="$style_prefix"/>
9361
+ </xsl:if>
9362
+ <xsl:value-of select="@label"/>
9363
+ <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
9364
+ <xsl:value-of select="$style_suffix"/>
9365
+ </xsl:if>
9366
+ </xsl:variable>
9367
+
9368
+ <xsl:value-of select="normalize-space($label)"/>
9369
+
9370
+ </xsl:when>
9266
9371
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
9267
9372
 
9268
9373
  <!-- Example: for BSI <?list-start 2?> -->
@@ -9320,10 +9425,10 @@
9320
9425
  <xsl:when test="$type = 'arabic'">
9321
9426
  1)
9322
9427
  </xsl:when>
9323
- <xsl:when test="$type = 'alphabet'">
9428
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
9324
9429
  a)
9325
9430
  </xsl:when>
9326
- <xsl:when test="$type = 'alphabet_upper'">
9431
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
9327
9432
  A.
9328
9433
  </xsl:when>
9329
9434
  <xsl:when test="$type = 'roman'">
@@ -9454,7 +9559,7 @@
9454
9559
  <xsl:call-template name="refine_list-item-style"/>
9455
9560
 
9456
9561
  <fo:list-item-label end-indent="label-end()">
9457
- <fo:block xsl:use-attribute-sets="list-item-label-style">
9562
+ <fo:block xsl:use-attribute-sets="list-item-label-style" role="SKIP">
9458
9563
 
9459
9564
  <xsl:call-template name="refine_list-item-label-style"/>
9460
9565
 
@@ -9468,7 +9573,7 @@
9468
9573
  </fo:block>
9469
9574
  </fo:list-item-label>
9470
9575
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
9471
- <fo:block>
9576
+ <fo:block role="SKIP">
9472
9577
 
9473
9578
  <xsl:call-template name="refine_list-item-body-style"/>
9474
9579
 
@@ -9747,10 +9852,10 @@
9747
9852
  <fo:table-body>
9748
9853
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
9749
9854
 
9750
- <fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
9751
- <fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
9752
- <fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
9753
- <fo:table-cell border="1pt solid black"><fo:block>Pages</fo:block></fo:table-cell>
9855
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
9856
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
9857
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
9858
+ <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Pages</fo:block></fo:table-cell>
9754
9859
  </fo:table-row>
9755
9860
  <xsl:apply-templates/>
9756
9861
  </fo:table-body>
@@ -9765,7 +9870,7 @@
9765
9870
 
9766
9871
  <xsl:template match="*[local-name() = 'errata']/*[local-name() = 'row']/*">
9767
9872
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
9768
- <fo:block><xsl:apply-templates/></fo:block>
9873
+ <fo:block role="SKIP"><xsl:apply-templates/></fo:block>
9769
9874
  </fo:table-cell>
9770
9875
  </xsl:template>
9771
9876
  <!-- ============ -->
@@ -10074,7 +10179,7 @@
10074
10179
  <xsl:for-each select="*[local-name() = 'tab']">
10075
10180
  <xsl:variable name="current_id" select="generate-id()"/>
10076
10181
  <fo:table-cell>
10077
- <fo:block line-height-shift-adjustment="disregard-shifts">
10182
+ <fo:block line-height-shift-adjustment="disregard-shifts" role="SKIP">
10078
10183
  <xsl:call-template name="insert_basic_link">
10079
10184
  <xsl:with-param name="element">
10080
10185
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -10092,7 +10197,7 @@
10092
10197
  </xsl:for-each>
10093
10198
  <!-- last column - for page numbers -->
10094
10199
  <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
10095
- <fo:block>
10200
+ <fo:block role="SKIP">
10096
10201
  <xsl:call-template name="insert_basic_link">
10097
10202
  <xsl:with-param name="element">
10098
10203
  <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
@@ -0,0 +1,31 @@
1
+ == copyright-statement>
2
+ === {blank}
3
+ [align="center"]
4
+ © Copyright International Hydrographic Organization {{ docyear }}
5
+
6
+ This work is copyright. Apart from any use permitted in accordance with the Berne Convention for the Protection of Literary and Artistic Works (1886), and except in the circumstances described below, no part may be translated, reproduced by any process, adapted, communicated or commercially exploited without prior written permission from the International Hydrographic Organization (IHO). Copyright in some of the material in this publication may be owned by another party and permission for the translation and/or reproduction of that material must be obtained from the owner.
7
+
8
+ == license-statement
9
+ === {blank}
10
+ This document or partial material from this document may be translated, reproduced or distributed for general information, on no more than a cost recovery basis. Copies may not be sold or distributed for profit or gain without prior written agreement of the IHO and any other copyright holders.
11
+
12
+ In the event that this document or partial material from this document is reproduced, translated or distributed under the terms described above, the following statements are to be included:
13
+
14
+ ____
15
+ _"Material from IHO publication [reference to extract: Title, Edition] is reproduced with the permission of the International Hydrographic Organization (IHO) Secretariat (Permission No ……./…) acting for the International Hydrographic Organization (IHO), which does not accept responsibility for the correctness of the material as reproduced: in case of doubt, the IHO's authentic text shall prevail. The incorporation of material sourced from IHO shall not be construed as constituting an endorsement by IHO of this product."_
16
+
17
+ _"This [document/publication] is a translation of IHO [document/publication] [name]. The IHO has not checked this translation and therefore takes no responsibility for its accuracy. In case of doubt the source version of [name] in [language] should be consulted."_
18
+ ____
19
+
20
+ The IHO Logo or other identifiers shall not be used in any derived product without prior written permission from the IHO.
21
+
22
+ == feedback-statement
23
+ Published by the +
24
+ International Hydrographic Organization +
25
+ 4b quai Antoine 1^er^ +
26
+ Principauté de Monaco +
27
+ Tel: (377) 93.10.81.00 +
28
+ Fax: (377) 93.10.81.40 +
29
+ \info@iho.int +
30
+ \www.iho.int +
31
+
@@ -1012,6 +1012,7 @@
1012
1012
  <ref name="del"/>
1013
1013
  <ref name="span"/>
1014
1014
  <ref name="erefstack"/>
1015
+ <ref name="date_inline"/>
1015
1016
  </choice>
1016
1017
  </define>
1017
1018
  <define name="add">
@@ -1053,6 +1054,23 @@
1053
1054
  </oneOrMore>
1054
1055
  </element>
1055
1056
  </define>
1057
+ <define name="date_inline">
1058
+ <element name="date">
1059
+ <attribute name="value"/>
1060
+ <optional>
1061
+ <attribute name="format"/>
1062
+ </optional>
1063
+ <optional>
1064
+ <attribute name="language"/>
1065
+ </optional>
1066
+ <optional>
1067
+ <attribute name="script"/>
1068
+ </optional>
1069
+ <optional>
1070
+ <attribute name="locale"/>
1071
+ </optional>
1072
+ </element>
1073
+ </define>
1056
1074
  <define name="concept">
1057
1075
  <element name="concept">
1058
1076
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.7.10".freeze
3
+ VERSION = "0.7.12".freeze
4
4
  end
5
5
  end
data/metanorma.yml CHANGED
@@ -18,6 +18,7 @@ html_headerfont: '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-
18
18
  html_monospacefont: '"Fira Code",Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace'
19
19
  html_normalfontsize: "15px"
20
20
  html_footnotefontsize: "0.9em"
21
+ boilerplate: lib/metanorma/iho/boilerplate.adoc
21
22
  webfont:
22
23
  - "https://fonts.googleapis.com/css2?family=Fira+Code&display=swap"
23
24
  scripts: lib/isodoc/iho/html/scripts.html
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.7.12
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-05-22 00:00:00.000000000 Z
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic
@@ -214,7 +214,7 @@ files:
214
214
  - lib/metanorma/iho/basicdoc.rng
215
215
  - lib/metanorma/iho/biblio-standoc.rng
216
216
  - lib/metanorma/iho/biblio.rng
217
- - lib/metanorma/iho/boilerplate.xml
217
+ - lib/metanorma/iho/boilerplate.adoc
218
218
  - lib/metanorma/iho/converter.rb
219
219
  - lib/metanorma/iho/iho.rng
220
220
  - lib/metanorma/iho/isodoc.rng
@@ -1,30 +0,0 @@
1
- <boilerplate>
2
- <copyright-statement>
3
- <clause>
4
- <p align="center"> © Copyright International Hydrographic Organization {{ docyear }}</p>
5
- <p>This work is copyright. Apart from any use permitted in accordance with the Berne Convention for the Protection of Literary and Artistic Works (1886), and except in the circumstances described below, no part may be translated, reproduced by any process, adapted, communicated or commercially exploited without prior written permission from the International Hydrographic Organization (IHO). Copyright in some of the material in this publication may be owned by another party and permission for the translation and/or reproduction of that material must be obtained from the owner.</p>
6
- </clause>
7
- </copyright-statement>
8
- <license-statement>
9
- <clause>
10
- <p>This document or partial material from this document may be translated, reproduced or distributed for general information, on no more than a cost recovery basis. Copies may not be sold or distributed for profit or gain without prior written agreement of the IHO and any other copyright holders.</p>
11
- <p>In the event that this document or partial material from this document is reproduced, translated or distributed under the terms described above, the following statements are to be included:</p>
12
- <quote>
13
- <p><em>"Material from IHO publication [reference to extract: Title, Edition] is reproduced with the permission of the International Hydrographic Organization (IHO) Secretariat (Permission No ……./…) acting for the International Hydrographic Organization (IHO), which does not accept responsibility for the correctness of the material as reproduced: in case of doubt, the IHO's authentic text shall prevail. The incorporation of material sourced from IHO shall not be construed as constituting an endorsement by IHO of this product."</em></p>
14
- <p><em>"This [document/publication] is a translation of IHO [document/publication] [name]. The IHO has not checked this translation and therefore takes no responsibility for its accuracy. In case of doubt the source version of [name] in [language] should be consulted."</em></p>
15
- </quote>
16
- <p>The IHO Logo or other identifiers shall not be used in any derived product without prior written permission from the IHO.</p>
17
- </clause>
18
- </license-statement>
19
- <feedback-statement>
20
- <p>Published by the<br/>
21
- International Hydrographic Organization<br/>
22
- 4b quai Antoine 1<sup>er</sup><br/>
23
- Principauté de Monaco<br/>
24
- Tel: (377) 93.10.81.00<br/>
25
- Fax: (377) 93.10.81.40<br/>
26
- info@iho.int<br/>
27
- www.iho.int</p>
28
- </feedback-statement>
29
- </boilerplate>
30
-