metanorma-iec 2.2.9 → 2.2.10

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: 582be39d0a34200cdd7f77519d2366e23bfa3c07bb5e9c23ffb5dae558f5796b
4
- data.tar.gz: c5d650ca2ccab49fd4719ff61f52781fe21f0f530d564412a3b08ac7a747baba
3
+ metadata.gz: 62538b194115d8110ff19c678faa2ca81d31ec0c3c01f4f37d73525aaa8f6080
4
+ data.tar.gz: d4aef599c46d1f75868b047f9c9011892f9a4faae97f8045b5e8faab4c640ef2
5
5
  SHA512:
6
- metadata.gz: 3c97a5a76d0bfb9986ccb5bdc05d81464dbb807fd4a3cbf717438b92ae774893b9bc27e05fabde23a7461ef042a01a8767a422ed91bd913925ef74d45978fd41
7
- data.tar.gz: dcd178a0bcc682a0ab14b02bb29b8c031bc75983f5f799786dbfc9a238e842f7678527e39e040f82c284a22bf4ec82a2226cbce0c3d33a0df503b113ec75b064
6
+ metadata.gz: ddbbff3240bec3f5f8b584c3e6442a52c702d04445079833c7f5ff698b764bae82ab64edb78e425df7aeef82167458fab177c956d8527add1ba7046fb40f765c
7
+ data.tar.gz: de52dc41380bbe7585d0ecb4297030753256b08972e59acdfb6ae6b317189af3d88d231978abb165be8336ad29606a0010930ce95479122dca6069116cebee42
@@ -2489,6 +2489,14 @@
2489
2489
 
2490
2490
  </xsl:attribute-set>
2491
2491
 
2492
+ <xsl:template name="refine_link-style">
2493
+
2494
+ <xsl:if test="ancestor::*[local-name()='feedback-statement' or local-name() = 'copyright-statement']">
2495
+ <xsl:attribute name="color">blue</xsl:attribute>
2496
+ </xsl:if>
2497
+
2498
+ </xsl:template> <!-- refine_link-style -->
2499
+
2492
2500
  <xsl:attribute-set name="sourcecode-container-style">
2493
2501
 
2494
2502
  </xsl:attribute-set>
@@ -2504,6 +2512,10 @@
2504
2512
 
2505
2513
  </xsl:attribute-set>
2506
2514
 
2515
+ <xsl:template name="refine_sourcecode-style">
2516
+
2517
+ </xsl:template> <!-- refine_sourcecode-style -->
2518
+
2507
2519
  <xsl:attribute-set name="pre-style">
2508
2520
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
2509
2521
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -2588,6 +2600,10 @@
2588
2600
 
2589
2601
  </xsl:attribute-set> <!-- example-style -->
2590
2602
 
2603
+ <xsl:template name="refine_example-style">
2604
+
2605
+ </xsl:template> <!-- refine_example-style -->
2606
+
2591
2607
  <xsl:attribute-set name="example-body-style">
2592
2608
 
2593
2609
  <xsl:attribute name="margin-left">10mm</xsl:attribute>
@@ -2607,6 +2623,10 @@
2607
2623
 
2608
2624
  </xsl:attribute-set> <!-- example-p-style -->
2609
2625
 
2626
+ <xsl:template name="refine_example-p-style">
2627
+
2628
+ </xsl:template> <!-- refine_example-p-style -->
2629
+
2610
2630
  <xsl:attribute-set name="termexample-name-style">
2611
2631
 
2612
2632
  <xsl:attribute name="padding-right">10mm</xsl:attribute>
@@ -2635,6 +2655,19 @@
2635
2655
 
2636
2656
  </xsl:attribute-set> <!-- table-container-style -->
2637
2657
 
2658
+ <xsl:template name="refine_table-container-style">
2659
+ <xsl:param name="margin-side"/>
2660
+
2661
+ <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
2662
+ <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
2663
+
2664
+ <xsl:if test="ancestor::*[local-name() = 'preface']">
2665
+ <xsl:attribute name="space-after">16pt</xsl:attribute>
2666
+ </xsl:if>
2667
+
2668
+ <!-- end table block-container attributes -->
2669
+ </xsl:template> <!-- refine_table-container-style -->
2670
+
2638
2671
  <xsl:attribute-set name="table-style">
2639
2672
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2640
2673
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
@@ -2643,6 +2676,18 @@
2643
2676
 
2644
2677
  </xsl:attribute-set><!-- table-style -->
2645
2678
 
2679
+ <xsl:template name="refine_table-style">
2680
+ <xsl:param name="margin-side"/>
2681
+
2682
+ <xsl:if test="$margin-side != 0">
2683
+ <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2684
+ <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
2685
+ </xsl:if>
2686
+
2687
+ <xsl:call-template name="setBordersTableArray"/>
2688
+
2689
+ </xsl:template> <!-- refine_table-style -->
2690
+
2646
2691
  <xsl:attribute-set name="table-name-style">
2647
2692
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2648
2693
 
@@ -2654,6 +2699,16 @@
2654
2699
 
2655
2700
  </xsl:attribute-set> <!-- table-name-style -->
2656
2701
 
2702
+ <xsl:template name="refine_table-name-style">
2703
+ <xsl:param name="continued"/>
2704
+
2705
+ <xsl:if test="$continued = 'true'">
2706
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2707
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2708
+ </xsl:if>
2709
+
2710
+ </xsl:template> <!-- refine_table-name-style -->
2711
+
2657
2712
  <xsl:attribute-set name="table-row-style">
2658
2713
  <xsl:attribute name="min-height">4mm</xsl:attribute>
2659
2714
 
@@ -2667,6 +2722,12 @@
2667
2722
 
2668
2723
  </xsl:attribute-set>
2669
2724
 
2725
+ <xsl:template name="refine_table-header-row-style">
2726
+
2727
+ <xsl:call-template name="setBordersTableArray"/>
2728
+
2729
+ </xsl:template> <!-- refine_table-header-row-style -->
2730
+
2670
2731
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2671
2732
 
2672
2733
  <xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
@@ -2674,10 +2735,20 @@
2674
2735
 
2675
2736
  </xsl:attribute-set>
2676
2737
 
2738
+ <xsl:template name="refine_table-footer-row-style">
2739
+
2740
+ </xsl:template> <!-- refine_table-footer-row-style -->
2741
+
2677
2742
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
2678
2743
 
2679
2744
  </xsl:attribute-set>
2680
2745
 
2746
+ <xsl:template name="refine_table-body-row-style">
2747
+
2748
+ <xsl:call-template name="setBordersTableArray"/>
2749
+
2750
+ </xsl:template> <!-- refine_table-body-row-style -->
2751
+
2681
2752
  <xsl:attribute-set name="table-header-cell-style">
2682
2753
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2683
2754
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -2690,6 +2761,23 @@
2690
2761
 
2691
2762
  </xsl:attribute-set> <!-- table-header-cell-style -->
2692
2763
 
2764
+ <xsl:template name="refine_table-header-cell-style">
2765
+
2766
+ <xsl:attribute name="text-align">center</xsl:attribute>
2767
+ <xsl:if test="ancestor::*[local-name()='preface']">
2768
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2769
+ </xsl:if>
2770
+
2771
+ <xsl:call-template name="setBordersTableArray"/>
2772
+
2773
+ <xsl:if test="$lang = 'ar'">
2774
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2775
+ </xsl:if>
2776
+
2777
+ <xsl:call-template name="setTableCellAttributes"/>
2778
+
2779
+ </xsl:template> <!-- refine_table-header-cell-style -->
2780
+
2693
2781
  <xsl:attribute-set name="table-cell-style">
2694
2782
  <xsl:attribute name="display-align">center</xsl:attribute>
2695
2783
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -2700,6 +2788,22 @@
2700
2788
 
2701
2789
  </xsl:attribute-set> <!-- table-cell-style -->
2702
2790
 
2791
+ <xsl:template name="refine_table-cell-style">
2792
+
2793
+ <xsl:if test="$lang = 'ar'">
2794
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2795
+ </xsl:if>
2796
+
2797
+ <!-- bsi -->
2798
+
2799
+ <xsl:if test="ancestor::*[local-name()='preface']">
2800
+ <xsl:attribute name="text-align">center</xsl:attribute>
2801
+ </xsl:if>
2802
+
2803
+ <xsl:call-template name="setBordersTableArray"/>
2804
+
2805
+ </xsl:template> <!-- refine_table-cell-style -->
2806
+
2703
2807
  <xsl:attribute-set name="table-footer-cell-style">
2704
2808
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2705
2809
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -2710,6 +2814,10 @@
2710
2814
 
2711
2815
  </xsl:attribute-set> <!-- table-footer-cell-style -->
2712
2816
 
2817
+ <xsl:template name="refine_table-footer-cell-style">
2818
+
2819
+ </xsl:template> <!-- refine_table-footer-cell-style -->
2820
+
2713
2821
  <xsl:attribute-set name="table-note-style">
2714
2822
  <xsl:attribute name="font-size">10pt</xsl:attribute>
2715
2823
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -2719,6 +2827,10 @@
2719
2827
 
2720
2828
  </xsl:attribute-set><!-- table-note-style -->
2721
2829
 
2830
+ <xsl:template name="refine_table-note-style">
2831
+
2832
+ </xsl:template> <!-- refine_table-note-style -->
2833
+
2722
2834
  <xsl:attribute-set name="table-fn-style">
2723
2835
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2724
2836
 
@@ -2785,11 +2897,19 @@
2785
2897
 
2786
2898
  </xsl:attribute-set>
2787
2899
 
2900
+ <xsl:template name="refine_dt-cell-style">
2901
+
2902
+ </xsl:template> <!-- refine_dt-cell-style -->
2903
+
2788
2904
  <xsl:attribute-set name="dt-block-style">
2789
2905
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
2790
2906
 
2791
2907
  </xsl:attribute-set>
2792
2908
 
2909
+ <xsl:template name="refine_dt-block-style">
2910
+
2911
+ </xsl:template> <!-- refine_dt-block-style -->
2912
+
2793
2913
  <xsl:attribute-set name="dl-name-style">
2794
2914
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2795
2915
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -2803,6 +2923,10 @@
2803
2923
 
2804
2924
  </xsl:attribute-set>
2805
2925
 
2926
+ <xsl:template name="refine_dd-cell-style">
2927
+
2928
+ </xsl:template> <!-- refine_dd-cell-style -->
2929
+
2806
2930
  <!-- ========================== -->
2807
2931
  <!-- END Definition's list styles -->
2808
2932
  <!-- ========================== -->
@@ -2823,7 +2947,6 @@
2823
2947
  </xsl:attribute-set>
2824
2948
 
2825
2949
  <xsl:attribute-set name="xref-style">
2826
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
2827
2950
 
2828
2951
  </xsl:attribute-set>
2829
2952
 
@@ -2831,6 +2954,12 @@
2831
2954
 
2832
2955
  </xsl:attribute-set>
2833
2956
 
2957
+ <xsl:template name="refine_eref-style">
2958
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
2959
+ <xsl:variable name="text" select="normalize-space()"/>
2960
+
2961
+ </xsl:template> <!-- refine_eref-style -->
2962
+
2834
2963
  <xsl:attribute-set name="note-style">
2835
2964
 
2836
2965
  <xsl:attribute name="font-size">8pt</xsl:attribute>
@@ -2839,6 +2968,10 @@
2839
2968
 
2840
2969
  </xsl:attribute-set>
2841
2970
 
2971
+ <xsl:template name="refine_note-style">
2972
+
2973
+ </xsl:template>
2974
+
2842
2975
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
2843
2976
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
2844
2977
 
@@ -2848,11 +2981,19 @@
2848
2981
 
2849
2982
  </xsl:attribute-set>
2850
2983
 
2984
+ <xsl:template name="refine_note-name-style">
2985
+
2986
+ </xsl:template> <!-- refine_note-name-style -->
2987
+
2851
2988
  <xsl:attribute-set name="table-note-name-style">
2852
2989
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
2853
2990
 
2854
2991
  </xsl:attribute-set>
2855
2992
 
2993
+ <xsl:template name="refine_table-note-name-style">
2994
+
2995
+ </xsl:template> <!-- refine_table-note-name-style -->
2996
+
2856
2997
  <xsl:attribute-set name="note-p-style">
2857
2998
 
2858
2999
  <xsl:attribute name="margin-top">5pt</xsl:attribute>
@@ -2867,10 +3008,18 @@
2867
3008
 
2868
3009
  </xsl:attribute-set>
2869
3010
 
3011
+ <xsl:template name="refine_termnote-style">
3012
+
3013
+ </xsl:template> <!-- refine_termnote-style -->
3014
+
2870
3015
  <xsl:attribute-set name="termnote-name-style">
2871
3016
 
2872
3017
  </xsl:attribute-set>
2873
3018
 
3019
+ <xsl:template name="refine_termnote-name-style">
3020
+
3021
+ </xsl:template>
3022
+
2874
3023
  <xsl:attribute-set name="termnote-p-style">
2875
3024
 
2876
3025
  </xsl:attribute-set>
@@ -2884,6 +3033,10 @@
2884
3033
 
2885
3034
  </xsl:attribute-set>
2886
3035
 
3036
+ <xsl:template name="refine_quote-style">
3037
+
3038
+ </xsl:template>
3039
+
2887
3040
  <xsl:attribute-set name="quote-source-style">
2888
3041
  <xsl:attribute name="text-align">right</xsl:attribute>
2889
3042
 
@@ -2900,6 +3053,10 @@
2900
3053
 
2901
3054
  </xsl:attribute-set>
2902
3055
 
3056
+ <xsl:template name="refine_termsource-style">
3057
+
3058
+ </xsl:template> <!-- refine_termsource-style -->
3059
+
2903
3060
  <xsl:attribute-set name="termsource-text-style">
2904
3061
 
2905
3062
  </xsl:attribute-set>
@@ -2938,6 +3095,10 @@
2938
3095
 
2939
3096
  </xsl:attribute-set>
2940
3097
 
3098
+ <xsl:template name="refine_figure-name-style">
3099
+
3100
+ </xsl:template> <!-- refine_figure-name-style -->
3101
+
2941
3102
  <xsl:attribute-set name="figure-source-style">
2942
3103
 
2943
3104
  <xsl:attribute name="font-size">6pt</xsl:attribute>
@@ -2958,6 +3119,10 @@
2958
3119
 
2959
3120
  </xsl:attribute-set> <!-- formula-stem-block-style -->
2960
3121
 
3122
+ <xsl:template name="refine_formula-stem-block-style">
3123
+
3124
+ </xsl:template> <!-- refine_formula-stem-block-style -->
3125
+
2961
3126
  <xsl:attribute-set name="formula-stem-number-style">
2962
3127
  <xsl:attribute name="text-align">right</xsl:attribute>
2963
3128
 
@@ -2971,6 +3136,10 @@
2971
3136
 
2972
3137
  </xsl:attribute-set>
2973
3138
 
3139
+ <xsl:template name="refine_image-style">
3140
+
3141
+ </xsl:template>
3142
+
2974
3143
  <xsl:attribute-set name="figure-pseudocode-p-style">
2975
3144
 
2976
3145
  </xsl:attribute-set>
@@ -3069,6 +3238,10 @@
3069
3238
 
3070
3239
  </xsl:attribute-set>
3071
3240
 
3241
+ <xsl:template name="refine_mathml-style">
3242
+
3243
+ </xsl:template>
3244
+
3072
3245
  <xsl:attribute-set name="list-style">
3073
3246
 
3074
3247
  <xsl:attribute name="provisional-distance-between-starts">6mm</xsl:attribute>
@@ -3076,6 +3249,14 @@
3076
3249
 
3077
3250
  </xsl:attribute-set> <!-- list-style -->
3078
3251
 
3252
+ <xsl:template name="refine_list-style">
3253
+
3254
+ <xsl:if test="ancestor::iec:ul or ancestor::iec:ol">
3255
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
3256
+ </xsl:if>
3257
+
3258
+ </xsl:template> <!-- refine_list-style -->
3259
+
3079
3260
  <xsl:attribute-set name="list-name-style">
3080
3261
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3081
3262
 
@@ -3087,14 +3268,26 @@
3087
3268
 
3088
3269
  </xsl:attribute-set>
3089
3270
 
3271
+ <xsl:template name="refine_list-item-style">
3272
+
3273
+ </xsl:template> <!-- refine_list-item-style -->
3274
+
3090
3275
  <xsl:attribute-set name="list-item-label-style">
3091
3276
 
3092
3277
  </xsl:attribute-set>
3093
3278
 
3279
+ <xsl:template name="refine_list-item-label-style">
3280
+
3281
+ </xsl:template> <!-- refine_list-item-label-style -->
3282
+
3094
3283
  <xsl:attribute-set name="list-item-body-style">
3095
3284
 
3096
3285
  </xsl:attribute-set>
3097
3286
 
3287
+ <xsl:template name="refine_list-item-body-style">
3288
+
3289
+ </xsl:template> <!-- refine_list-item-body-style -->
3290
+
3098
3291
  <xsl:attribute-set name="toc-style">
3099
3292
  <xsl:attribute name="line-height">135%</xsl:attribute>
3100
3293
  </xsl:attribute-set>
@@ -3105,6 +3298,15 @@
3105
3298
 
3106
3299
  </xsl:attribute-set>
3107
3300
 
3301
+ <xsl:template name="refine_fn-reference-style">
3302
+
3303
+ <xsl:if test="ancestor::*[local-name()='table']">
3304
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
3305
+ <xsl:attribute name="baseline-shift">15%</xsl:attribute>
3306
+ </xsl:if>
3307
+
3308
+ </xsl:template> <!-- refine_fn-reference-style -->
3309
+
3108
3310
  <xsl:attribute-set name="fn-style">
3109
3311
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3110
3312
  </xsl:attribute-set>
@@ -3128,6 +3330,10 @@
3128
3330
 
3129
3331
  </xsl:attribute-set>
3130
3332
 
3333
+ <xsl:template name="refine_fn-body-style">
3334
+
3335
+ </xsl:template> <!-- refine_fn-body-style -->
3336
+
3131
3337
  <xsl:attribute-set name="fn-body-num-style">
3132
3338
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
3133
3339
 
@@ -3136,6 +3342,10 @@
3136
3342
 
3137
3343
  </xsl:attribute-set> <!-- fn-body-num-style -->
3138
3344
 
3345
+ <xsl:template name="refine_fn-body-num-style">
3346
+
3347
+ </xsl:template> <!-- refine_fn-body-num-style -->
3348
+
3139
3349
  <!-- admonition -->
3140
3350
  <xsl:attribute-set name="admonition-style">
3141
3351
 
@@ -3799,14 +4009,9 @@
3799
4009
 
3800
4010
  <fo:block-container xsl:use-attribute-sets="table-container-style">
3801
4011
 
3802
- <xsl:attribute name="margin-left"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
3803
- <xsl:attribute name="margin-right"><xsl:value-of select="-$margin-side"/>mm</xsl:attribute>
3804
-
3805
- <xsl:if test="ancestor::*[local-name() = 'preface']">
3806
- <xsl:attribute name="space-after">16pt</xsl:attribute>
3807
- </xsl:if>
3808
-
3809
- <!-- end table block-container attributes -->
4012
+ <xsl:call-template name="refine_table-container-style">
4013
+ <xsl:with-param name="margin-side" select="$margin-side"/>
4014
+ </xsl:call-template>
3810
4015
 
3811
4016
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
3812
4017
 
@@ -3827,12 +4032,9 @@
3827
4032
 
3828
4033
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3829
4034
 
3830
- <xsl:if test="$margin-side != 0">
3831
- <xsl:attribute name="margin-left"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
3832
- <xsl:attribute name="margin-right"><xsl:value-of select="$margin-side"/>mm</xsl:attribute>
3833
- </xsl:if>
3834
-
3835
- <xsl:call-template name="setBordersTableArray"/>
4035
+ <xsl:call-template name="refine_table-style">
4036
+ <xsl:with-param name="margin-side" select="$margin-side"/>
4037
+ </xsl:call-template>
3836
4038
 
3837
4039
  </xsl:element>
3838
4040
  </xsl:variable>
@@ -3898,7 +4100,7 @@
3898
4100
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3899
4101
  </xsl:when>
3900
4102
  <xsl:otherwise>
3901
- <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() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
4103
+ <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 -->
3902
4104
  </xsl:otherwise>
3903
4105
  </xsl:choose>
3904
4106
 
@@ -3993,10 +4195,9 @@
3993
4195
 
3994
4196
  <fo:block xsl:use-attribute-sets="table-name-style">
3995
4197
 
3996
- <xsl:if test="$continued = 'true'">
3997
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3998
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3999
- </xsl:if>
4198
+ <xsl:call-template name="refine_table-name-style">
4199
+ <xsl:with-param name="continued" select="$continued"/>
4200
+ </xsl:call-template>
4000
4201
 
4001
4202
  <xsl:choose>
4002
4203
  <xsl:when test="$continued = 'true'">
@@ -4394,10 +4595,7 @@
4394
4595
  <fo:table-row>
4395
4596
  <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">
4396
4597
 
4397
- <xsl:attribute name="border-left">1pt solid white</xsl:attribute>
4398
- <xsl:attribute name="border-right">1pt solid white</xsl:attribute>
4399
- <xsl:attribute name="border-top">1pt solid white</xsl:attribute>
4400
- <xsl:attribute name="border-bottom">none</xsl:attribute>
4598
+ <xsl:call-template name="refine_table-header-title-style"/>
4401
4599
 
4402
4600
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
4403
4601
  <xsl:with-param name="continued">true</xsl:with-param>
@@ -4411,6 +4609,15 @@
4411
4609
  </fo:table-row>
4412
4610
  </xsl:template> <!-- table-header-title -->
4413
4611
 
4612
+ <xsl:template name="refine_table-header-title-style">
4613
+
4614
+ <xsl:attribute name="border-left">1pt solid white</xsl:attribute>
4615
+ <xsl:attribute name="border-right">1pt solid white</xsl:attribute>
4616
+ <xsl:attribute name="border-top">1pt solid white</xsl:attribute>
4617
+ <xsl:attribute name="border-bottom">none</xsl:attribute>
4618
+
4619
+ </xsl:template> <!-- refine_table-header-title-style -->
4620
+
4414
4621
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
4415
4622
  <fo:table-body>
4416
4623
  <xsl:apply-templates/>
@@ -4435,7 +4642,7 @@
4435
4642
  <xsl:param name="colwidths"/>
4436
4643
  <xsl:param name="colgroup"/>
4437
4644
 
4438
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
4645
+ <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']"/>
4439
4646
 
4440
4647
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
4441
4648
 
@@ -4495,6 +4702,8 @@
4495
4702
  <fo:table-row>
4496
4703
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
4497
4704
 
4705
+ <xsl:call-template name="refine_table-footer-cell-style"/>
4706
+
4498
4707
  <xsl:call-template name="setBordersTableArray"/>
4499
4708
 
4500
4709
  <!-- fn will be processed inside 'note' processing -->
@@ -4507,6 +4716,7 @@
4507
4716
 
4508
4717
  <!-- except gb and bsi -->
4509
4718
 
4719
+ <xsl:apply-templates select="../*[local-name()='p']"/>
4510
4720
  <xsl:apply-templates select="../*[local-name()='dl']"/>
4511
4721
  <xsl:apply-templates select="../*[local-name()='note']"/>
4512
4722
  <xsl:apply-templates select="../*[local-name()='source']"/>
@@ -4683,7 +4893,7 @@
4683
4893
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
4684
4894
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
4685
4895
 
4686
- <xsl:call-template name="setBordersTableArray"/>
4896
+ <xsl:call-template name="refine_table-header-row-style"/>
4687
4897
 
4688
4898
  <xsl:call-template name="setTableRowAttributes"/>
4689
4899
 
@@ -4717,6 +4927,8 @@
4717
4927
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
4718
4928
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
4719
4929
 
4930
+ <xsl:call-template name="refine_table-footer-row-style"/>
4931
+
4720
4932
  <xsl:call-template name="setTableRowAttributes"/>
4721
4933
  <xsl:apply-templates/>
4722
4934
  </fo:table-row>
@@ -4730,9 +4942,10 @@
4730
4942
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4731
4943
  </xsl:if>
4732
4944
 
4733
- <xsl:call-template name="setBordersTableArray"/>
4945
+ <xsl:call-template name="refine_table-body-row-style"/>
4734
4946
 
4735
4947
  <xsl:call-template name="setTableRowAttributes"/>
4948
+
4736
4949
  <xsl:apply-templates/>
4737
4950
  </fo:table-row>
4738
4951
  </xsl:template>
@@ -4751,18 +4964,7 @@
4751
4964
  <xsl:with-param name="default">center</xsl:with-param>
4752
4965
  </xsl:call-template>
4753
4966
 
4754
- <xsl:attribute name="text-align">center</xsl:attribute>
4755
- <xsl:if test="ancestor::*[local-name()='preface']">
4756
- <xsl:attribute name="font-weight">normal</xsl:attribute>
4757
- </xsl:if>
4758
-
4759
- <xsl:call-template name="setBordersTableArray"/>
4760
-
4761
- <xsl:if test="$lang = 'ar'">
4762
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
4763
- </xsl:if>
4764
-
4765
- <xsl:call-template name="setTableCellAttributes"/>
4967
+ <xsl:call-template name="refine_table-header-cell-style"/>
4766
4968
 
4767
4969
  <fo:block>
4768
4970
  <xsl:apply-templates/>
@@ -4804,17 +5006,7 @@
4804
5006
  <xsl:with-param name="default">left</xsl:with-param>
4805
5007
  </xsl:call-template>
4806
5008
 
4807
- <xsl:if test="$lang = 'ar'">
4808
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
4809
- </xsl:if>
4810
-
4811
- <!-- bsi -->
4812
-
4813
- <xsl:if test="ancestor::*[local-name()='preface']">
4814
- <xsl:attribute name="text-align">center</xsl:attribute>
4815
- </xsl:if>
4816
-
4817
- <xsl:call-template name="setBordersTableArray"/>
5009
+ <xsl:call-template name="refine_table-cell-style"/>
4818
5010
 
4819
5011
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
4820
5012
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
@@ -4845,9 +5037,13 @@
4845
5037
 
4846
5038
  <fo:block xsl:use-attribute-sets="table-note-style">
4847
5039
 
5040
+ <xsl:call-template name="refine_table-note-style"/>
5041
+
4848
5042
  <!-- Table's note name (NOTE, for example) -->
4849
5043
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
4850
5044
 
5045
+ <xsl:call-template name="refine_table-note-name-style"/>
5046
+
4851
5047
  <xsl:apply-templates select="*[local-name() = 'name']"/>
4852
5048
 
4853
5049
  </fo:inline>
@@ -4875,6 +5071,14 @@
4875
5071
  <!-- list of footnotes to calculate actual footnotes number -->
4876
5072
  <xsl:variable name="p_fn_">
4877
5073
  <xsl:call-template name="get_fn_list"/>
5074
+ <!-- <xsl:choose>
5075
+ <xsl:when test="$namespace = 'jis'">
5076
+ <xsl:call-template name="get_fn_list_for_element"/>
5077
+ </xsl:when>
5078
+ <xsl:otherwise>
5079
+ <xsl:call-template name="get_fn_list"/>
5080
+ </xsl:otherwise>
5081
+ </xsl:choose> -->
4878
5082
  </xsl:variable>
4879
5083
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
4880
5084
 
@@ -4899,7 +5103,14 @@
4899
5103
 
4900
5104
  </xsl:variable>
4901
5105
 
4902
- <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
5106
+ <xsl:variable name="ref_id">
5107
+ <xsl:choose>
5108
+ <xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
5109
+ <xsl:otherwise>
5110
+ <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
5111
+ </xsl:otherwise>
5112
+ </xsl:choose>
5113
+ </xsl:variable>
4903
5114
  <xsl:variable name="footnote_inline">
4904
5115
  <fo:inline>
4905
5116
 
@@ -4925,7 +5136,7 @@
4925
5136
  <xsl:call-template name="insert_basic_link">
4926
5137
  <xsl:with-param name="element">
4927
5138
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
4928
- <xsl:value-of select="$current_fn_number_text"/>
5139
+ <xsl:copy-of select="$current_fn_number_text"/>
4929
5140
  </fo:basic-link>
4930
5141
  </xsl:with-param>
4931
5142
  </xsl:call-template>
@@ -4945,8 +5156,12 @@
4945
5156
 
4946
5157
  <fo:block xsl:use-attribute-sets="fn-body-style">
4947
5158
 
5159
+ <xsl:call-template name="refine_fn-body-style"/>
5160
+
4948
5161
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
4949
5162
 
5163
+ <xsl:call-template name="refine_fn-body-num-style"/>
5164
+
4950
5165
  <xsl:value-of select="$current_fn_number_text"/>
4951
5166
  </fo:inline>
4952
5167
  <xsl:apply-templates/>
@@ -4998,6 +5213,28 @@
4998
5213
  </xsl:choose>
4999
5214
  </xsl:template>
5000
5215
 
5216
+ <xsl:template name="get_fn_list_for_element">
5217
+ <xsl:choose>
5218
+ <xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
5219
+ <fn gen_id="{generate-id(.)}">
5220
+ <xsl:copy-of select="@*"/>
5221
+ <xsl:copy-of select="node()"/>
5222
+ </fn>
5223
+ </xsl:when>
5224
+ <xsl:otherwise>
5225
+ <xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
5226
+ <xsl:variable name="element_id" select="@id"/>
5227
+ <xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
5228
+ <!-- copy unique fn -->
5229
+ <fn gen_id="{generate-id(.)}">
5230
+ <xsl:copy-of select="@*"/>
5231
+ <xsl:copy-of select="node()"/>
5232
+ </fn>
5233
+ </xsl:for-each>
5234
+ </xsl:for-each>
5235
+ </xsl:otherwise>
5236
+ </xsl:choose>
5237
+ </xsl:template>
5001
5238
  <!-- ============================ -->
5002
5239
  <!-- table's footnotes rendering -->
5003
5240
  <!-- ============================ -->
@@ -5172,10 +5409,7 @@
5172
5409
  <xsl:template match="*[local-name()='fn']">
5173
5410
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
5174
5411
 
5175
- <xsl:if test="ancestor::*[local-name()='table']">
5176
- <xsl:attribute name="font-weight">normal</xsl:attribute>
5177
- <xsl:attribute name="baseline-shift">15%</xsl:attribute>
5178
- </xsl:if>
5412
+ <xsl:call-template name="refine_fn-reference-style"/>
5179
5413
 
5180
5414
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
5181
5415
 
@@ -5281,7 +5515,7 @@
5281
5515
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
5282
5516
  <fo:block margin-bottom="12pt" text-align="left">
5283
5517
 
5284
- <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
5518
+ <xsl:call-template name="refine_dl_formula_where_style"/>
5285
5519
 
5286
5520
  <!-- <xsl:variable name="title-where">
5287
5521
  <xsl:call-template name="getLocalizedString">
@@ -5296,8 +5530,7 @@
5296
5530
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
5297
5531
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
5298
5532
 
5299
- <xsl:attribute name="font-size">8pt</xsl:attribute>
5300
- <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
5533
+ <xsl:call-template name="refine_figure_key_style"/>
5301
5534
 
5302
5535
  <xsl:variable name="title-key">
5303
5536
  <xsl:call-template name="getLocalizedString">
@@ -5313,12 +5546,16 @@
5313
5546
  <xsl:if test="$onlyOneComponent = 'false'">
5314
5547
  <fo:block>
5315
5548
 
5549
+ <xsl:call-template name="refine_multicomponent_style"/>
5550
+
5316
5551
  <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
5317
5552
  <xsl:attribute name="margin-top">0</xsl:attribute>
5318
5553
  </xsl:if>
5319
5554
 
5320
5555
  <fo:block>
5321
5556
 
5557
+ <xsl:call-template name="refine_multicomponent_block_style"/>
5558
+
5322
5559
  <xsl:apply-templates select="*[local-name() = 'name']">
5323
5560
  <xsl:with-param name="process">true</xsl:with-param>
5324
5561
  </xsl:apply-templates>
@@ -5478,6 +5715,29 @@
5478
5715
 
5479
5716
  </xsl:template> <!-- END: dl -->
5480
5717
 
5718
+ <xsl:template name="refine_dl_formula_where_style">
5719
+
5720
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
5721
+
5722
+ </xsl:template> <!-- refine_dl_formula_where_style -->
5723
+
5724
+ <xsl:template name="refine_figure_key_style">
5725
+
5726
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
5727
+ <xsl:attribute name="margin-bottom">8pt</xsl:attribute>
5728
+
5729
+ </xsl:template> <!-- refine_figure_key_style -->
5730
+
5731
+ <xsl:template name="refine_multicomponent_style">
5732
+ <xsl:variable name="parent" select="local-name(..)"/>
5733
+
5734
+ </xsl:template> <!-- refine_multicomponent_style -->
5735
+
5736
+ <xsl:template name="refine_multicomponent_block_style">
5737
+ <xsl:variable name="parent" select="local-name(..)"/>
5738
+
5739
+ </xsl:template> <!-- refine_multicomponent_block_style -->
5740
+
5481
5741
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
5482
5742
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
5483
5743
 
@@ -5697,6 +5957,8 @@
5697
5957
 
5698
5958
  </xsl:if>
5699
5959
 
5960
+ <xsl:call-template name="refine_dt-cell-style"/>
5961
+
5700
5962
  <fo:block xsl:use-attribute-sets="dt-block-style">
5701
5963
  <xsl:copy-of select="@id"/>
5702
5964
 
@@ -5704,6 +5966,8 @@
5704
5966
  <xsl:attribute name="margin-top">0</xsl:attribute>
5705
5967
  </xsl:if>
5706
5968
 
5969
+ <xsl:call-template name="refine_dt-block-style"/>
5970
+
5707
5971
  <xsl:apply-templates>
5708
5972
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
5709
5973
  </xsl:apply-templates>
@@ -5723,6 +5987,8 @@
5723
5987
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
5724
5988
  </xsl:if>
5725
5989
 
5990
+ <xsl:call-template name="refine_dd-cell-style"/>
5991
+
5726
5992
  <fo:block>
5727
5993
 
5728
5994
  <xsl:if test="$isGenerateTableIF = 'true'">
@@ -5873,12 +6139,18 @@
5873
6139
  <xsl:param name="split_keep-within-line"/>
5874
6140
  <fo:inline font-weight="bold">
5875
6141
 
6142
+ <xsl:call-template name="refine_strong_style"/>
6143
+
5876
6144
  <xsl:apply-templates>
5877
6145
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
5878
6146
  </xsl:apply-templates>
5879
6147
  </fo:inline>
5880
6148
  </xsl:template>
5881
6149
 
6150
+ <xsl:template name="refine_strong_style">
6151
+
6152
+ </xsl:template>
6153
+
5882
6154
  <xsl:template match="*[local-name()='padding']">
5883
6155
  <fo:inline padding-right="{@value}"> </fo:inline>
5884
6156
  </xsl:template>
@@ -6418,7 +6690,10 @@
6418
6690
  </xsl:choose>
6419
6691
  </xsl:variable>
6420
6692
 
6421
- <xsl:value-of select="$text9"/>
6693
+ <!-- replace sequence #x200B and space TO space -->
6694
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
6695
+
6696
+ <xsl:value-of select="$text10"/>
6422
6697
  </xsl:template>
6423
6698
 
6424
6699
  <xsl:template name="add-zero-spaces-link-java">
@@ -7093,6 +7368,11 @@
7093
7368
 
7094
7369
  <fo:inline xsl:use-attribute-sets="mathml-style">
7095
7370
 
7371
+ <!-- DEBUG -->
7372
+ <!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
7373
+
7374
+ <xsl:call-template name="refine_mathml-style"/>
7375
+
7096
7376
  <xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
7097
7377
  <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
7098
7378
  </xsl:if>
@@ -7197,6 +7477,8 @@
7197
7477
 
7198
7478
  <fo:instream-foreign-object fox:alt-text="Math">
7199
7479
 
7480
+ <xsl:call-template name="refine_mathml_insteam_object_style"/>
7481
+
7200
7482
  <!-- put MathML in Actual Text -->
7201
7483
  <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
7202
7484
  <xsl:attribute name="fox:actual-text">
@@ -7217,6 +7499,10 @@
7217
7499
  </fo:instream-foreign-object>
7218
7500
  </xsl:template>
7219
7501
 
7502
+ <xsl:template name="refine_mathml_insteam_object_style">
7503
+
7504
+ </xsl:template> <!-- refine_mathml_insteam_object_style -->
7505
+
7220
7506
  <xsl:template match="mathml:*" mode="mathml_actual_text">
7221
7507
  <!-- <xsl:text>a+b</xsl:text> -->
7222
7508
  <xsl:text>&lt;</xsl:text>
@@ -7361,6 +7647,8 @@
7361
7647
  <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
7362
7648
  <fo:inline xsl:use-attribute-sets="mathml-style">
7363
7649
 
7650
+ <xsl:call-template name="refine_mathml-style"/>
7651
+
7364
7652
  <xsl:choose>
7365
7653
  <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
7366
7654
  <xsl:otherwise>
@@ -7405,9 +7693,7 @@
7405
7693
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7406
7694
  </xsl:if>
7407
7695
 
7408
- <xsl:if test="ancestor::*[local-name()='feedback-statement' or local-name() = 'copyright-statement']">
7409
- <xsl:attribute name="color">blue</xsl:attribute>
7410
- </xsl:if>
7696
+ <xsl:call-template name="refine_link-style"/>
7411
7697
 
7412
7698
  <xsl:choose>
7413
7699
  <xsl:when test="$target_text = ''">
@@ -7496,6 +7782,9 @@
7496
7782
  <xsl:call-template name="insert_basic_link">
7497
7783
  <xsl:with-param name="element">
7498
7784
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7785
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
7786
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
7787
+ </xsl:if>
7499
7788
  <xsl:if test="parent::*[local-name() = 'add']">
7500
7789
  <xsl:call-template name="append_add-style"/>
7501
7790
  </xsl:if>
@@ -7557,6 +7846,8 @@
7557
7846
  <fo:table-cell display-align="center">
7558
7847
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
7559
7848
 
7849
+ <xsl:call-template name="refine_formula-stem-block-style"/>
7850
+
7560
7851
  <xsl:apply-templates/>
7561
7852
  </fo:block>
7562
7853
  </fo:table-cell>
@@ -7598,12 +7889,18 @@
7598
7889
 
7599
7890
  <xsl:call-template name="setBlockSpanAll"/>
7600
7891
 
7892
+ <xsl:call-template name="refine_note-style"/>
7893
+
7601
7894
  <fo:block-container margin-left="0mm" margin-right="0mm">
7602
7895
 
7603
7896
  <fo:block>
7604
7897
 
7898
+ <xsl:call-template name="refine_note_block_style"/>
7899
+
7605
7900
  <fo:inline xsl:use-attribute-sets="note-name-style">
7606
7901
 
7902
+ <xsl:call-template name="refine_note-name-style"/>
7903
+
7607
7904
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7608
7905
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7609
7906
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -7629,6 +7926,10 @@
7629
7926
 
7630
7927
  </xsl:template>
7631
7928
 
7929
+ <xsl:template name="refine_note_block_style">
7930
+
7931
+ </xsl:template>
7932
+
7632
7933
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
7633
7934
  <xsl:variable name="num"><xsl:number/></xsl:variable>
7634
7935
  <xsl:choose>
@@ -7650,12 +7951,16 @@
7650
7951
 
7651
7952
  <xsl:call-template name="setBlockSpanAll"/>
7652
7953
 
7954
+ <xsl:call-template name="refine_termnote-style"/>
7955
+
7653
7956
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
7654
7957
 
7655
7958
  <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
7656
7959
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
7657
7960
  </xsl:if>
7658
7961
 
7962
+ <xsl:call-template name="refine_termnote-name-style"/>
7963
+
7659
7964
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
7660
7965
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
7661
7966
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -7829,6 +8134,8 @@
7829
8134
  <xsl:otherwise>
7830
8135
  <fo:block xsl:use-attribute-sets="image-style">
7831
8136
 
8137
+ <xsl:call-template name="refine_image-style"/>
8138
+
7832
8139
  <xsl:variable name="src">
7833
8140
  <xsl:call-template name="image_src"/>
7834
8141
  </xsl:variable>
@@ -8689,6 +8996,8 @@
8689
8996
  <xsl:if test="normalize-space() != ''">
8690
8997
  <fo:block xsl:use-attribute-sets="figure-name-style">
8691
8998
 
8999
+ <xsl:call-template name="refine_figure-name-style"/>
9000
+
8692
9001
  <xsl:apply-templates/>
8693
9002
  </fo:block>
8694
9003
  </xsl:if>
@@ -8954,6 +9263,8 @@
8954
9263
  </xsl:attribute>
8955
9264
  </xsl:for-each>
8956
9265
 
9266
+ <xsl:call-template name="refine_sourcecode-style"/>
9267
+
8957
9268
  <!-- remove margin between rows in the table with sourcecode line numbers -->
8958
9269
  <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
8959
9270
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -9658,6 +9969,8 @@
9658
9969
 
9659
9970
  <xsl:call-template name="setBlockSpanAll"/>
9660
9971
 
9972
+ <xsl:call-template name="refine_example-style"/>
9973
+
9661
9974
  <xsl:variable name="fo_element">
9662
9975
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
9663
9976
 
@@ -9791,6 +10104,8 @@
9791
10104
  </xsl:if>
9792
10105
  <fo:block xsl:use-attribute-sets="example-p-style">
9793
10106
 
10107
+ <xsl:call-template name="refine_example-p-style"/>
10108
+
9794
10109
  <xsl:apply-templates/>
9795
10110
  </fo:block>
9796
10111
  </fo:block-container>
@@ -9807,6 +10122,7 @@
9807
10122
  </xsl:otherwise>
9808
10123
  </xsl:choose>
9809
10124
  </xsl:template> <!-- example/p -->
10125
+
9810
10126
  <!-- ====== -->
9811
10127
  <!-- ====== -->
9812
10128
 
@@ -9818,6 +10134,8 @@
9818
10134
  <xsl:template match="*[local-name() = 'termsource']" name="termsource">
9819
10135
  <fo:block xsl:use-attribute-sets="termsource-style">
9820
10136
 
10137
+ <xsl:call-template name="refine_termsource-style"/>
10138
+
9821
10139
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
9822
10140
  <xsl:variable name="termsource_text">
9823
10141
  <xsl:apply-templates/>
@@ -9933,6 +10251,8 @@
9933
10251
  <fo:block-container margin-left="0mm">
9934
10252
  <fo:block-container xsl:use-attribute-sets="quote-style">
9935
10253
 
10254
+ <xsl:call-template name="refine_quote-style"/>
10255
+
9936
10256
  <fo:block-container margin-left="0mm" margin-right="0mm">
9937
10257
  <fo:block role="BlockQuote">
9938
10258
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
@@ -10007,8 +10327,7 @@
10007
10327
 
10008
10328
  </xsl:if>
10009
10329
 
10010
- <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
10011
- <xsl:variable name="text" select="normalize-space()"/>
10330
+ <xsl:call-template name="refine_eref-style"/>
10012
10331
 
10013
10332
  <xsl:call-template name="insert_basic_link">
10014
10333
  <xsl:with-param name="element">
@@ -10018,6 +10337,8 @@
10018
10337
  </xsl:if>
10019
10338
  <xsl:if test="@type = 'inline'">
10020
10339
 
10340
+ <xsl:call-template name="refine_basic_link_style"/>
10341
+
10021
10342
  </xsl:if>
10022
10343
 
10023
10344
  <xsl:choose>
@@ -10050,6 +10371,11 @@
10050
10371
  </xsl:otherwise>
10051
10372
  </xsl:choose>
10052
10373
  </xsl:template>
10374
+
10375
+ <xsl:template name="refine_basic_link_style">
10376
+
10377
+ </xsl:template> <!-- refine_basic_link_style -->
10378
+
10053
10379
  <!-- ====== -->
10054
10380
  <!-- END eref -->
10055
10381
  <!-- ====== -->
@@ -10198,11 +10524,17 @@
10198
10524
  <fo:block>
10199
10525
  <xsl:call-template name="setId"/>
10200
10526
 
10527
+ <xsl:call-template name="sections_element_style"/>
10528
+
10201
10529
  <xsl:apply-templates/>
10202
10530
  </fo:block>
10203
10531
 
10204
10532
  </xsl:template>
10205
10533
 
10534
+ <xsl:template name="sections_element_style">
10535
+
10536
+ </xsl:template> <!-- sections_element_style -->
10537
+
10206
10538
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
10207
10539
  <fo:block break-after="page"/>
10208
10540
  <fo:block>
@@ -10217,10 +10549,16 @@
10217
10549
 
10218
10550
  <xsl:call-template name="setBlockSpanAll"/>
10219
10551
 
10552
+ <xsl:call-template name="refine_clause_style"/>
10553
+
10220
10554
  <xsl:apply-templates/>
10221
10555
  </fo:block>
10222
10556
  </xsl:template>
10223
10557
 
10558
+ <xsl:template name="refine_clause_style">
10559
+
10560
+ </xsl:template> <!-- refine_clause_style -->
10561
+
10224
10562
  <xsl:template match="*[local-name() = 'definitions']">
10225
10563
  <fo:block id="{@id}">
10226
10564
  <xsl:apply-templates/>
@@ -10233,10 +10571,16 @@
10233
10571
 
10234
10572
  <xsl:call-template name="setBlockSpanAll"/>
10235
10573
 
10574
+ <xsl:call-template name="refine_annex_style"/>
10575
+
10236
10576
  </fo:block>
10237
10577
  <xsl:apply-templates/>
10238
10578
  </xsl:template>
10239
10579
 
10580
+ <xsl:template name="refine_annex_style">
10581
+
10582
+ </xsl:template>
10583
+
10240
10584
  <xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
10241
10585
  <!-- comment 2019-11-29 -->
10242
10586
  <!-- <fo:block font-weight="bold">Review:</fo:block>
@@ -10403,6 +10747,8 @@
10403
10747
  </xsl:choose>
10404
10748
  </xsl:attribute>
10405
10749
 
10750
+ <xsl:call-template name="refine_list_container_style"/>
10751
+
10406
10752
  <fo:block-container margin-left="0mm">
10407
10753
  <fo:block>
10408
10754
  <xsl:apply-templates select="." mode="list"/>
@@ -10420,6 +10766,10 @@
10420
10766
  </xsl:choose>
10421
10767
  </xsl:template>
10422
10768
 
10769
+ <xsl:template name="refine_list_container_style">
10770
+
10771
+ </xsl:template> <!-- refine_list_container_style -->
10772
+
10423
10773
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
10424
10774
 
10425
10775
  <xsl:apply-templates select="*[local-name() = 'name']">
@@ -10430,11 +10780,7 @@
10430
10780
 
10431
10781
  <xsl:variable name="provisional_distance_between_starts_">
10432
10782
  <attributes xsl:use-attribute-sets="list-style">
10433
-
10434
- <xsl:if test="ancestor::iec:legal-statement or ancestor::iec:clause[@type = 'boilerplate_legal']">
10435
- <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
10436
- </xsl:if>
10437
-
10783
+ <xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
10438
10784
  </attributes>
10439
10785
  </xsl:variable>
10440
10786
  <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
@@ -10470,9 +10816,7 @@
10470
10816
  <addon><xsl:value-of select="$addon"/></addon> -->
10471
10817
  </xsl:if>
10472
10818
 
10473
- <xsl:if test="ancestor::iec:ul or ancestor::iec:ol">
10474
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
10475
- </xsl:if>
10819
+ <xsl:call-template name="refine_list-style"/>
10476
10820
 
10477
10821
  <xsl:if test="*[local-name() = 'name']">
10478
10822
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -10486,6 +10830,14 @@
10486
10830
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
10487
10831
  </xsl:template>
10488
10832
 
10833
+ <xsl:template name="refine_list-style_provisional-distance-between-starts">
10834
+
10835
+ <xsl:if test="ancestor::iec:legal-statement or ancestor::iec:clause[@type = 'boilerplate_legal']">
10836
+ <xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
10837
+ </xsl:if>
10838
+
10839
+ </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
10840
+
10489
10841
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
10490
10842
  <xsl:param name="process">false</xsl:param>
10491
10843
  <xsl:if test="$process = 'true'">
@@ -10499,20 +10851,27 @@
10499
10851
  <fo:list-item xsl:use-attribute-sets="list-item-style">
10500
10852
  <xsl:copy-of select="@id"/>
10501
10853
 
10854
+ <xsl:call-template name="refine_list-item-style"/>
10855
+
10502
10856
  <fo:list-item-label end-indent="label-end()">
10503
10857
  <fo:block xsl:use-attribute-sets="list-item-label-style">
10504
10858
 
10859
+ <xsl:call-template name="refine_list-item-label-style"/>
10860
+
10505
10861
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
10506
10862
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
10507
10863
  <xsl:call-template name="append_add-style"/>
10508
10864
  </xsl:if>
10509
10865
 
10510
10866
  <xsl:call-template name="getListItemFormat"/>
10867
+
10511
10868
  </fo:block>
10512
10869
  </fo:list-item-label>
10513
10870
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
10514
10871
  <fo:block>
10515
10872
 
10873
+ <xsl:call-template name="refine_list-item-body-style"/>
10874
+
10516
10875
  <xsl:apply-templates/>
10517
10876
 
10518
10877
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
@@ -10830,6 +11189,7 @@
10830
11189
 
10831
11190
  <fo:block id="{@id}">
10832
11191
  <xsl:apply-templates/>
11192
+
10833
11193
  </fo:block>
10834
11194
  </xsl:template>
10835
11195
 
@@ -10849,6 +11209,7 @@
10849
11209
 
10850
11210
  <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
10851
11211
  <xsl:apply-templates/>
11212
+
10852
11213
  </fo:block>
10853
11214
 
10854
11215
  <!-- horizontal line -->
@@ -11431,6 +11792,9 @@
11431
11792
  </xsl:copy>
11432
11793
  </xsl:template>
11433
11794
 
11795
+ <!-- prevent empty thead processing in XSL-FO, remove it -->
11796
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
11797
+
11434
11798
  <xsl:template name="add_id">
11435
11799
  <xsl:if test="not(@id)">
11436
11800
  <!-- add @id - first element with @id plus '_element_name' -->
@@ -11715,6 +12079,14 @@
11715
12079
  <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
11716
12080
  <xsl:variable name="p_fn_">
11717
12081
  <xsl:call-template name="get_fn_list"/>
12082
+ <!-- <xsl:choose>
12083
+ <xsl:when test="$namespace = 'jis'">
12084
+ <xsl:call-template name="get_fn_list_for_element"/>
12085
+ </xsl:when>
12086
+ <xsl:otherwise>
12087
+ <xsl:call-template name="get_fn_list"/>
12088
+ </xsl:otherwise>
12089
+ </xsl:choose> -->
11718
12090
  </xsl:variable>
11719
12091
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
11720
12092
  <xsl:variable name="gen_id" select="generate-id(.)"/>
@@ -11729,8 +12101,14 @@
11729
12101
  <xsl:attribute name="current_fn_number">
11730
12102
  <xsl:value-of select="$current_fn_number"/>
11731
12103
  </xsl:attribute>
12104
+ <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
11732
12105
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
11733
- <xsl:value-of select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
12106
+
12107
+ <xsl:value-of select="$skip_footnote_body_"/>
12108
+
12109
+ </xsl:attribute>
12110
+ <xsl:attribute name="ref_id">
12111
+ <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
11734
12112
  </xsl:attribute>
11735
12113
  <xsl:apply-templates select="node()" mode="linear_xml"/>
11736
12114
  </xsl:copy>
@@ -17,7 +17,7 @@
17
17
  these elements; we just want one namespace for any child grammars
18
18
  of this.
19
19
  -->
20
- <!-- VERSION v1.2.1 -->
20
+ <!-- VERSION v1.2.2 -->
21
21
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
22
22
  <include href="reqt.rng"/>
23
23
  <include href="basicdoc.rng">
@@ -211,6 +211,9 @@
211
211
  <data type="boolean"/>
212
212
  </attribute>
213
213
  </optional>
214
+ <optional>
215
+ <attribute name="style"/>
216
+ </optional>
214
217
  <ref name="CitationType"/>
215
218
  <oneOrMore>
216
219
  <ref name="PureTextElement"/>
@@ -2136,6 +2139,7 @@
2136
2139
  <choice>
2137
2140
  <value>identical</value>
2138
2141
  <value>modified</value>
2142
+ <value>adapted</value>
2139
2143
  <value>restyled</value>
2140
2144
  <value>context-added</value>
2141
2145
  <value>generalisation</value>
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.2.9".freeze
3
+ VERSION = "2.2.10".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-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.9
4
+ version: 2.2.10
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-04-25 00:00:00.000000000 Z
11
+ date: 2023-05-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso