metanorma-iec 1.2.17 → 1.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +12 -11
- data/.hound.yml +3 -1
- data/.rubocop.yml +3 -7
- data/lib/asciidoctor/iec/biblio.rng +1 -0
- data/lib/asciidoctor/iec/front.rb +11 -5
- data/lib/asciidoctor/iec/iec.rng +4 -0
- data/lib/asciidoctor/iec/iec_intro_en.xml +1 -1
- data/lib/asciidoctor/iec/isodoc.rng +321 -4
- data/lib/asciidoctor/iec/isostandard.rng +12 -0
- data/lib/isodoc/iec/html/htmlstyle.css +7 -0
- data/lib/isodoc/iec/html_convert.rb +0 -1
- data/lib/isodoc/iec/iec.international-standard.xsl +503 -67
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +4 -4
- data/spec/asciidoctor/base_spec.rb +1062 -0
- data/spec/{asciidoctor-iec → asciidoctor}/blocks_spec.rb +214 -154
- data/spec/{asciidoctor-iec → asciidoctor}/cleanup_spec.rb +0 -0
- data/spec/{asciidoctor-iec → asciidoctor}/iev_spec.rb +0 -0
- data/spec/{asciidoctor-iec → asciidoctor}/inline_spec.rb +0 -0
- data/spec/{asciidoctor-iec → asciidoctor}/lists_spec.rb +0 -0
- data/spec/{asciidoctor-iec → asciidoctor}/section_spec.rb +0 -38
- data/spec/{asciidoctor-iec → asciidoctor}/validate_spec.rb +0 -0
- data/spec/isodoc/postproc_spec.rb +2 -20
- metadata +44 -53
- data/spec/asciidoctor-iec/base_spec.rb +0 -1045
- data/spec/examples/rice.adoc +0 -723
- data/spec/examples/rice.doc +0 -19162
- data/spec/examples/rice.html +0 -1787
- data/spec/examples/rice.xml +0 -1951
- data/spec/examples/rice_img/rice_image1.png +0 -0
- data/spec/examples/rice_img/rice_image2.png +0 -0
- data/spec/examples/rice_img/rice_image3_1.png +0 -0
- data/spec/examples/rice_img/rice_image3_2.png +0 -0
- data/spec/examples/rice_img/rice_image3_3.png +0 -0
@@ -38,6 +38,9 @@
|
|
38
38
|
</define>
|
39
39
|
<define name="BibDataExtensionType">
|
40
40
|
<ref name="doctype"/>
|
41
|
+
<optional>
|
42
|
+
<ref name="docsubtype"/>
|
43
|
+
</optional>
|
41
44
|
<optional>
|
42
45
|
<ref name="horizontal"/>
|
43
46
|
</optional>
|
@@ -256,6 +259,15 @@
|
|
256
259
|
<value>guide</value>
|
257
260
|
<value>amendment</value>
|
258
261
|
<value>technical-corrigendum</value>
|
262
|
+
<value>directive</value>
|
263
|
+
</choice>
|
264
|
+
</define>
|
265
|
+
<define name="DocumentSubtype">
|
266
|
+
<choice>
|
267
|
+
<value>specification</value>
|
268
|
+
<value>method-of-test</value>
|
269
|
+
<value>vocabulary</value>
|
270
|
+
<value>code-of-practice</value>
|
259
271
|
</choice>
|
260
272
|
</define>
|
261
273
|
<define name="structuredidentifier">
|
@@ -115,6 +115,13 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
115
115
|
content: ", ";
|
116
116
|
vertical-align: super; }
|
117
117
|
|
118
|
+
.addition {
|
119
|
+
color: blue; }
|
120
|
+
|
121
|
+
.deletion {
|
122
|
+
color: red;
|
123
|
+
text-decoration: line-through; }
|
124
|
+
|
118
125
|
#standard-band {
|
119
126
|
background-color: #0AC442; }
|
120
127
|
|
@@ -5,6 +5,7 @@
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
6
|
<xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
|
+
<xsl:param name="basepath"/>
|
8
9
|
|
9
10
|
|
10
11
|
|
@@ -2610,6 +2611,9 @@
|
|
2610
2611
|
<title-continued lang="en">(continued)</title-continued>
|
2611
2612
|
<title-continued lang="fr">(continué)</title-continued>
|
2612
2613
|
|
2614
|
+
</xsl:variable><xsl:variable name="bibdata">
|
2615
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
2616
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
2613
2617
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2614
2618
|
<xsl:param name="name"/>
|
2615
2619
|
<xsl:param name="lang"/>
|
@@ -2635,10 +2639,13 @@
|
|
2635
2639
|
</xsl:choose>
|
2636
2640
|
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
2637
2641
|
|
2642
|
+
|
2638
2643
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2639
2644
|
|
2640
2645
|
|
2641
2646
|
|
2647
|
+
|
2648
|
+
|
2642
2649
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2643
2650
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2644
2651
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -2700,6 +2707,7 @@
|
|
2700
2707
|
|
2701
2708
|
|
2702
2709
|
|
2710
|
+
|
2703
2711
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
2704
2712
|
|
2705
2713
|
|
@@ -2718,9 +2726,7 @@
|
|
2718
2726
|
|
2719
2727
|
|
2720
2728
|
|
2721
|
-
|
2722
|
-
|
2723
|
-
|
2729
|
+
|
2724
2730
|
|
2725
2731
|
|
2726
2732
|
|
@@ -2749,6 +2755,7 @@
|
|
2749
2755
|
|
2750
2756
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
2751
2757
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2758
|
+
|
2752
2759
|
|
2753
2760
|
|
2754
2761
|
|
@@ -2766,6 +2773,7 @@
|
|
2766
2773
|
|
2767
2774
|
|
2768
2775
|
|
2776
|
+
|
2769
2777
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
2770
2778
|
|
2771
2779
|
|
@@ -2785,16 +2793,20 @@
|
|
2785
2793
|
|
2786
2794
|
|
2787
2795
|
|
2796
|
+
|
2797
|
+
|
2788
2798
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2789
2799
|
|
2790
2800
|
|
2791
2801
|
|
2792
2802
|
|
2803
|
+
|
2793
2804
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
2794
2805
|
|
2795
2806
|
|
2796
2807
|
|
2797
2808
|
|
2809
|
+
|
2798
2810
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2799
2811
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2800
2812
|
<xsl:attribute name="margin-bottom">9pt</xsl:attribute>
|
@@ -2814,6 +2826,7 @@
|
|
2814
2826
|
|
2815
2827
|
|
2816
2828
|
|
2829
|
+
|
2817
2830
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2818
2831
|
|
2819
2832
|
|
@@ -2843,6 +2856,7 @@
|
|
2843
2856
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
2844
2857
|
|
2845
2858
|
|
2859
|
+
|
2846
2860
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2847
2861
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2848
2862
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
@@ -2851,6 +2865,7 @@
|
|
2851
2865
|
|
2852
2866
|
|
2853
2867
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2868
|
+
|
2854
2869
|
|
2855
2870
|
|
2856
2871
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -2878,20 +2893,24 @@
|
|
2878
2893
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
2879
2894
|
|
2880
2895
|
|
2896
|
+
|
2881
2897
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2882
2898
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2883
2899
|
|
2884
2900
|
|
2885
2901
|
|
2886
2902
|
|
2903
|
+
|
2887
2904
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2888
2905
|
|
2889
2906
|
|
2890
2907
|
|
2908
|
+
|
2891
2909
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2892
2910
|
|
2893
2911
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2894
2912
|
|
2913
|
+
|
2895
2914
|
|
2896
2915
|
|
2897
2916
|
|
@@ -2924,12 +2943,14 @@
|
|
2924
2943
|
|
2925
2944
|
|
2926
2945
|
|
2946
|
+
|
2927
2947
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
2928
2948
|
|
2929
2949
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
2930
2950
|
|
2931
2951
|
|
2932
2952
|
|
2953
|
+
|
2933
2954
|
<xsl:attribute name="width">75%</xsl:attribute>
|
2934
2955
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
2935
2956
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -2953,19 +2974,40 @@
|
|
2953
2974
|
|
2954
2975
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
2955
2976
|
|
2956
|
-
|
2977
|
+
|
2978
|
+
|
2957
2979
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
2958
2980
|
|
2959
2981
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2960
2982
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2961
2983
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
2962
2984
|
|
2985
|
+
|
2963
2986
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
2964
2987
|
|
2965
2988
|
|
2966
2989
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2967
2990
|
|
2968
|
-
|
2991
|
+
|
2992
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2993
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2994
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
2995
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2996
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2997
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2998
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2999
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
3000
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
3001
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
3002
|
+
<xsl:text>red</xsl:text>
|
3003
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
3004
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
3005
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3006
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
3007
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
3008
|
+
|
3009
|
+
|
3010
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2969
3011
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2970
3012
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2971
3013
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -3010,16 +3052,17 @@
|
|
3010
3052
|
<xsl:call-template name="add-zero-spaces-java"/>
|
3011
3053
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
3012
3054
|
|
3055
|
+
<xsl:variable name="table-preamble">
|
3056
|
+
|
3057
|
+
|
3058
|
+
</xsl:variable>
|
3059
|
+
|
3013
3060
|
<xsl:variable name="table">
|
3014
3061
|
|
3015
3062
|
<xsl:variable name="simple-table">
|
3016
3063
|
<xsl:call-template name="getSimpleTable"/>
|
3017
3064
|
</xsl:variable>
|
3018
3065
|
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3023
3066
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
3024
3067
|
<fo:block> </fo:block>
|
3025
3068
|
</xsl:if> -->
|
@@ -3034,7 +3077,7 @@
|
|
3034
3077
|
|
3035
3078
|
|
3036
3079
|
|
3037
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
3080
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3038
3081
|
|
3039
3082
|
<!-- <xsl:variable name="cols-count">
|
3040
3083
|
<xsl:choose>
|
@@ -3053,8 +3096,6 @@
|
|
3053
3096
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
3054
3097
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
3055
3098
|
|
3056
|
-
|
3057
|
-
|
3058
3099
|
<xsl:variable name="colwidths">
|
3059
3100
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3060
3101
|
<xsl:call-template name="calculate-column-widths">
|
@@ -3082,10 +3123,12 @@
|
|
3082
3123
|
</xsl:choose>
|
3083
3124
|
</xsl:variable>
|
3084
3125
|
|
3126
|
+
|
3085
3127
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
3086
3128
|
|
3087
3129
|
|
3088
3130
|
|
3131
|
+
|
3089
3132
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3090
3133
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
3091
3134
|
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
@@ -3103,6 +3146,8 @@
|
|
3103
3146
|
|
3104
3147
|
|
3105
3148
|
|
3149
|
+
|
3150
|
+
|
3106
3151
|
<xsl:variable name="table_width">
|
3107
3152
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
3108
3153
|
100%
|
@@ -3117,6 +3162,8 @@
|
|
3117
3162
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
3118
3163
|
|
3119
3164
|
|
3165
|
+
|
3166
|
+
|
3120
3167
|
<attribute name="border">0.5pt solid black</attribute>
|
3121
3168
|
|
3122
3169
|
|
@@ -3210,7 +3257,8 @@
|
|
3210
3257
|
</fo:block-container>
|
3211
3258
|
</xsl:variable>
|
3212
3259
|
|
3213
|
-
|
3260
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3261
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3214
3262
|
|
3215
3263
|
<xsl:choose>
|
3216
3264
|
<xsl:when test="@width">
|
@@ -3224,7 +3272,14 @@
|
|
3224
3272
|
<fo:table-body>
|
3225
3273
|
<fo:table-row>
|
3226
3274
|
<fo:table-cell column-number="2">
|
3227
|
-
<
|
3275
|
+
<xsl:copy-of select="$table-preamble"/>
|
3276
|
+
<fo:block>
|
3277
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3278
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3279
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3280
|
+
</xsl:call-template>
|
3281
|
+
<xsl:copy-of select="$table"/>
|
3282
|
+
</fo:block>
|
3228
3283
|
</fo:table-cell>
|
3229
3284
|
</fo:table-row>
|
3230
3285
|
</fo:table-body>
|
@@ -3235,16 +3290,42 @@
|
|
3235
3290
|
|
3236
3291
|
</xsl:when>
|
3237
3292
|
<xsl:otherwise>
|
3238
|
-
<xsl:
|
3293
|
+
<xsl:choose>
|
3294
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
3295
|
+
<xsl:copy-of select="$table-preamble"/>
|
3296
|
+
<fo:block>
|
3297
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3298
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3299
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3300
|
+
</xsl:call-template>
|
3301
|
+
<xsl:copy-of select="$table"/>
|
3302
|
+
</fo:block>
|
3303
|
+
</xsl:when>
|
3304
|
+
<xsl:otherwise>
|
3305
|
+
<xsl:copy-of select="$table-preamble"/>
|
3306
|
+
<xsl:copy-of select="$table"/>
|
3307
|
+
</xsl:otherwise>
|
3308
|
+
</xsl:choose>
|
3239
3309
|
</xsl:otherwise>
|
3240
3310
|
</xsl:choose>
|
3241
3311
|
|
3242
3312
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
3313
|
+
<xsl:param name="continued"/>
|
3243
3314
|
<xsl:if test="normalize-space() != ''">
|
3244
3315
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
3245
3316
|
|
3246
3317
|
|
3247
|
-
<xsl:
|
3318
|
+
<xsl:choose>
|
3319
|
+
<xsl:when test="$continued = 'true'">
|
3320
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
3321
|
+
|
3322
|
+
</xsl:when>
|
3323
|
+
<xsl:otherwise>
|
3324
|
+
<xsl:apply-templates/>
|
3325
|
+
</xsl:otherwise>
|
3326
|
+
</xsl:choose>
|
3327
|
+
|
3328
|
+
|
3248
3329
|
</fo:block>
|
3249
3330
|
</xsl:if>
|
3250
3331
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -3296,7 +3377,7 @@
|
|
3296
3377
|
</xsl:for-each>
|
3297
3378
|
</xsl:when>
|
3298
3379
|
<xsl:otherwise>
|
3299
|
-
<xsl:for-each select="xalan:nodeset($table)
|
3380
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
3300
3381
|
<xsl:variable name="td_text">
|
3301
3382
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
3302
3383
|
|
@@ -3384,18 +3465,18 @@
|
|
3384
3465
|
<xsl:apply-templates/>
|
3385
3466
|
</fo:table-header>
|
3386
3467
|
</xsl:template><xsl:template name="table-header-title">
|
3387
|
-
<xsl:param name="cols-count"/>
|
3468
|
+
<xsl:param name="cols-count"/>
|
3388
3469
|
<!-- row for title -->
|
3389
3470
|
<fo:table-row>
|
3390
3471
|
<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">
|
3391
|
-
|
3472
|
+
|
3473
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3474
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
3475
|
+
</xsl:apply-templates>
|
3392
3476
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
3393
3477
|
<xsl:call-template name="fn_name_display"/>
|
3394
|
-
</xsl:for-each>
|
3395
|
-
|
3396
|
-
<xsl:text> </xsl:text>
|
3397
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
3398
|
-
</fo:block>
|
3478
|
+
</xsl:for-each>
|
3479
|
+
|
3399
3480
|
</fo:table-cell>
|
3400
3481
|
</fo:table-row>
|
3401
3482
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -3639,6 +3720,7 @@
|
|
3639
3720
|
|
3640
3721
|
|
3641
3722
|
|
3723
|
+
|
3642
3724
|
<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
|
3643
3725
|
<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
|
3644
3726
|
|
@@ -3666,12 +3748,14 @@
|
|
3666
3748
|
<xsl:attribute name="text-align">
|
3667
3749
|
<xsl:choose>
|
3668
3750
|
<xsl:when test="@align">
|
3669
|
-
<xsl:
|
3751
|
+
<xsl:call-template name="setAlignment"/>
|
3752
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3670
3753
|
</xsl:when>
|
3671
3754
|
<xsl:otherwise>center</xsl:otherwise>
|
3672
3755
|
</xsl:choose>
|
3673
3756
|
</xsl:attribute>
|
3674
3757
|
|
3758
|
+
|
3675
3759
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
3676
3760
|
|
3677
3761
|
|
@@ -3690,6 +3774,10 @@
|
|
3690
3774
|
|
3691
3775
|
|
3692
3776
|
|
3777
|
+
|
3778
|
+
<xsl:if test="$lang = 'ar'">
|
3779
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3780
|
+
</xsl:if>
|
3693
3781
|
<xsl:if test="@colspan">
|
3694
3782
|
<xsl:attribute name="number-columns-spanned">
|
3695
3783
|
<xsl:value-of select="@colspan"/>
|
@@ -3721,16 +3809,21 @@
|
|
3721
3809
|
<xsl:attribute name="text-align">
|
3722
3810
|
<xsl:choose>
|
3723
3811
|
<xsl:when test="@align">
|
3724
|
-
<xsl:
|
3812
|
+
<xsl:call-template name="setAlignment"/>
|
3813
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3725
3814
|
</xsl:when>
|
3726
3815
|
<xsl:otherwise>left</xsl:otherwise>
|
3727
3816
|
</xsl:choose>
|
3728
3817
|
</xsl:attribute>
|
3818
|
+
<xsl:if test="$lang = 'ar'">
|
3819
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3820
|
+
</xsl:if>
|
3729
3821
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
3730
3822
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3731
3823
|
|
3732
3824
|
|
3733
3825
|
|
3826
|
+
|
3734
3827
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
3735
3828
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
3736
3829
|
</xsl:if>
|
@@ -3748,6 +3841,9 @@
|
|
3748
3841
|
|
3749
3842
|
|
3750
3843
|
|
3844
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
3845
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3846
|
+
</xsl:if>
|
3751
3847
|
<xsl:if test="@colspan">
|
3752
3848
|
<xsl:attribute name="number-columns-spanned">
|
3753
3849
|
<xsl:value-of select="@colspan"/>
|
@@ -3884,13 +3980,13 @@
|
|
3884
3980
|
</xsl:choose>
|
3885
3981
|
</xsl:variable>
|
3886
3982
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3887
|
-
<xsl:element name="{$ns}:table">
|
3983
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
3888
3984
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3889
3985
|
<tbody>
|
3890
3986
|
<xsl:apply-templates mode="dl"/>
|
3891
3987
|
</tbody>
|
3892
3988
|
</xsl:for-each>
|
3893
|
-
</xsl:element>
|
3989
|
+
<!-- </xsl:element> -->
|
3894
3990
|
</xsl:variable>
|
3895
3991
|
|
3896
3992
|
<xsl:call-template name="calculate-column-widths">
|
@@ -3996,6 +4092,8 @@
|
|
3996
4092
|
<xsl:apply-templates/>
|
3997
4093
|
</fo:inline>
|
3998
4094
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
4095
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4096
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3999
4097
|
<fo:block-container>
|
4000
4098
|
|
4001
4099
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4012,6 +4110,12 @@
|
|
4012
4110
|
</xsl:attribute>
|
4013
4111
|
|
4014
4112
|
</xsl:if>
|
4113
|
+
|
4114
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4115
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4116
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4117
|
+
</xsl:call-template>
|
4118
|
+
|
4015
4119
|
<fo:block-container>
|
4016
4120
|
|
4017
4121
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -4081,6 +4185,7 @@
|
|
4081
4185
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
4082
4186
|
|
4083
4187
|
|
4188
|
+
|
4084
4189
|
<xsl:variable name="title-key">
|
4085
4190
|
|
4086
4191
|
|
@@ -4135,11 +4240,11 @@
|
|
4135
4240
|
</xsl:choose>
|
4136
4241
|
</xsl:variable>
|
4137
4242
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
4138
|
-
<xsl:element name="{$ns}:table">
|
4243
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
4139
4244
|
<tbody>
|
4140
4245
|
<xsl:apply-templates mode="dl"/>
|
4141
4246
|
</tbody>
|
4142
|
-
</xsl:element>
|
4247
|
+
<!-- </xsl:element> -->
|
4143
4248
|
</xsl:variable>
|
4144
4249
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
4145
4250
|
<xsl:variable name="colwidths">
|
@@ -4368,6 +4473,8 @@
|
|
4368
4473
|
|
4369
4474
|
<xsl:apply-templates/>
|
4370
4475
|
</fo:inline>
|
4476
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
4477
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
4371
4478
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
4372
4479
|
<fo:inline font-size="80%" vertical-align="super">
|
4373
4480
|
<xsl:apply-templates/>
|
@@ -4393,6 +4500,7 @@
|
|
4393
4500
|
|
4394
4501
|
|
4395
4502
|
|
4503
|
+
|
4396
4504
|
|
4397
4505
|
</xsl:variable>
|
4398
4506
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -4410,8 +4518,74 @@
|
|
4410
4518
|
<fo:inline text-decoration="underline">
|
4411
4519
|
<xsl:apply-templates/>
|
4412
4520
|
</fo:inline>
|
4521
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
4522
|
+
<xsl:choose>
|
4523
|
+
<xsl:when test="@amendment">
|
4524
|
+
<fo:inline>
|
4525
|
+
<xsl:call-template name="insertTag">
|
4526
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4527
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4528
|
+
</xsl:call-template>
|
4529
|
+
<xsl:apply-templates/>
|
4530
|
+
<xsl:call-template name="insertTag">
|
4531
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4532
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4533
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4534
|
+
</xsl:call-template>
|
4535
|
+
</fo:inline>
|
4536
|
+
</xsl:when>
|
4537
|
+
<xsl:when test="@corrigenda">
|
4538
|
+
<fo:inline>
|
4539
|
+
<xsl:call-template name="insertTag">
|
4540
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4541
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4542
|
+
</xsl:call-template>
|
4543
|
+
<xsl:apply-templates/>
|
4544
|
+
<xsl:call-template name="insertTag">
|
4545
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4546
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4547
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4548
|
+
</xsl:call-template>
|
4549
|
+
</fo:inline>
|
4550
|
+
</xsl:when>
|
4551
|
+
<xsl:otherwise>
|
4552
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
4553
|
+
<xsl:apply-templates/>
|
4554
|
+
</fo:inline>
|
4555
|
+
</xsl:otherwise>
|
4556
|
+
</xsl:choose>
|
4557
|
+
|
4558
|
+
</xsl:template><xsl:template name="insertTag">
|
4559
|
+
<xsl:param name="type"/>
|
4560
|
+
<xsl:param name="kind"/>
|
4561
|
+
<xsl:param name="value"/>
|
4562
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
4563
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
4564
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
4565
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
4566
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
4567
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
4568
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4569
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4570
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4571
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
4572
|
+
<g>
|
4573
|
+
<xsl:if test="$type = 'closing'">
|
4574
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
4575
|
+
</xsl:if>
|
4576
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
4577
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
4578
|
+
</g>
|
4579
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
4580
|
+
<xsl:if test="$type = 'closing'">
|
4581
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
4582
|
+
</xsl:if>
|
4583
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
4584
|
+
</text>
|
4585
|
+
</svg>
|
4586
|
+
</fo:instream-foreign-object>
|
4413
4587
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
4414
|
-
<fo:inline
|
4588
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
4415
4589
|
<xsl:apply-templates/>
|
4416
4590
|
</fo:inline>
|
4417
4591
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -4708,11 +4882,15 @@
|
|
4708
4882
|
</xsl:apply-templates>
|
4709
4883
|
</xsl:template><xsl:template name="getLang">
|
4710
4884
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4885
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4711
4886
|
<xsl:variable name="language">
|
4712
4887
|
<xsl:choose>
|
4713
4888
|
<xsl:when test="$language_current != ''">
|
4714
4889
|
<xsl:value-of select="$language_current"/>
|
4715
4890
|
</xsl:when>
|
4891
|
+
<xsl:when test="$language_current_2 != ''">
|
4892
|
+
<xsl:value-of select="$language_current_2"/>
|
4893
|
+
</xsl:when>
|
4716
4894
|
<xsl:otherwise>
|
4717
4895
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4718
4896
|
</xsl:otherwise>
|
@@ -4752,13 +4930,23 @@
|
|
4752
4930
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
4753
4931
|
<xsl:value-of select="substring($str, 2)"/>
|
4754
4932
|
</xsl:template><xsl:template match="mathml:math">
|
4755
|
-
<
|
4933
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4934
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4935
|
+
|
4936
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
4937
|
+
|
4938
|
+
|
4939
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4940
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4941
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4942
|
+
</xsl:call-template>
|
4756
4943
|
|
4757
4944
|
<xsl:variable name="mathml">
|
4758
4945
|
<xsl:apply-templates select="." mode="mathml"/>
|
4759
4946
|
</xsl:variable>
|
4760
4947
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4761
4948
|
|
4949
|
+
|
4762
4950
|
<!-- <xsl:copy-of select="."/> -->
|
4763
4951
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4764
4952
|
</fo:instream-foreign-object>
|
@@ -4779,6 +4967,16 @@
|
|
4779
4967
|
<mathml:mspace width="0.5ex"/>
|
4780
4968
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
4781
4969
|
<xsl:variable name="target">
|
4970
|
+
<xsl:choose>
|
4971
|
+
<xsl:when test="@updatetype = 'true'">
|
4972
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
4973
|
+
</xsl:when>
|
4974
|
+
<xsl:otherwise>
|
4975
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
4976
|
+
</xsl:otherwise>
|
4977
|
+
</xsl:choose>
|
4978
|
+
</xsl:variable>
|
4979
|
+
<xsl:variable name="target_text">
|
4782
4980
|
<xsl:choose>
|
4783
4981
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
4784
4982
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -4795,19 +4993,19 @@
|
|
4795
4993
|
</xsl:if>
|
4796
4994
|
|
4797
4995
|
<xsl:choose>
|
4798
|
-
<xsl:when test="$
|
4996
|
+
<xsl:when test="$target_text = ''">
|
4799
4997
|
<xsl:apply-templates/>
|
4800
4998
|
</xsl:when>
|
4801
4999
|
<xsl:otherwise>
|
4802
|
-
<fo:basic-link external-destination="{
|
5000
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
4803
5001
|
<xsl:choose>
|
4804
5002
|
<xsl:when test="normalize-space(.) = ''">
|
4805
|
-
<!-- <xsl:value-of select="$target"/> -->
|
4806
5003
|
<xsl:call-template name="add-zero-spaces-link-java">
|
4807
|
-
<xsl:with-param name="text" select="$
|
5004
|
+
<xsl:with-param name="text" select="$target_text"/>
|
4808
5005
|
</xsl:call-template>
|
4809
5006
|
</xsl:when>
|
4810
5007
|
<xsl:otherwise>
|
5008
|
+
<!-- output text from <link>text</link> -->
|
4811
5009
|
<xsl:apply-templates/>
|
4812
5010
|
</xsl:otherwise>
|
4813
5011
|
</xsl:choose>
|
@@ -4919,6 +5117,7 @@
|
|
4919
5117
|
|
4920
5118
|
|
4921
5119
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
5120
|
+
|
4922
5121
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4923
5122
|
</fo:inline>
|
4924
5123
|
<xsl:apply-templates/>
|
@@ -4945,6 +5144,7 @@
|
|
4945
5144
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
4946
5145
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
4947
5146
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
5147
|
+
|
4948
5148
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4949
5149
|
</fo:inline>
|
4950
5150
|
<xsl:apply-templates/>
|
@@ -5008,8 +5208,15 @@
|
|
5008
5208
|
</fo:inline>
|
5009
5209
|
</xsl:if>
|
5010
5210
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
5211
|
+
<xsl:variable name="isAdded" select="@added"/>
|
5212
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
5011
5213
|
<fo:block-container id="{@id}">
|
5012
5214
|
|
5215
|
+
<xsl:call-template name="setTrackChangesStyles">
|
5216
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5217
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5218
|
+
</xsl:call-template>
|
5219
|
+
|
5013
5220
|
<fo:block>
|
5014
5221
|
<xsl:apply-templates/>
|
5015
5222
|
</fo:block>
|
@@ -5017,7 +5224,10 @@
|
|
5017
5224
|
<xsl:for-each select="*[local-name() = 'note']">
|
5018
5225
|
<xsl:call-template name="note"/>
|
5019
5226
|
</xsl:for-each>
|
5020
|
-
|
5227
|
+
|
5228
|
+
|
5229
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
5230
|
+
|
5021
5231
|
</fo:block-container>
|
5022
5232
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
5023
5233
|
<fo:block id="{@id}">
|
@@ -5029,37 +5239,122 @@
|
|
5029
5239
|
<xsl:apply-templates/>
|
5030
5240
|
</fo:block>
|
5031
5241
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
5032
|
-
<
|
5033
|
-
|
5034
|
-
|
5035
|
-
<xsl:
|
5036
|
-
<
|
5037
|
-
<xsl:
|
5038
|
-
<xsl:
|
5039
|
-
</xsl:
|
5040
|
-
<
|
5041
|
-
|
5042
|
-
|
5043
|
-
|
5044
|
-
|
5045
|
-
|
5046
|
-
|
5047
|
-
|
5242
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
5243
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
5244
|
+
<xsl:choose>
|
5245
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
5246
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
5247
|
+
<xsl:variable name="src">
|
5248
|
+
<xsl:call-template name="image_src"/>
|
5249
|
+
</xsl:variable>
|
5250
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
5251
|
+
</fo:inline>
|
5252
|
+
</xsl:when>
|
5253
|
+
<xsl:otherwise>
|
5254
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
5255
|
+
|
5256
|
+
<xsl:variable name="src">
|
5257
|
+
<xsl:call-template name="image_src"/>
|
5258
|
+
</xsl:variable>
|
5259
|
+
|
5260
|
+
<xsl:choose>
|
5261
|
+
<xsl:when test="$isDeleted = 'true'">
|
5262
|
+
<!-- enclose in svg -->
|
5263
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
5264
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
5265
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
5266
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5267
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5268
|
+
|
5269
|
+
|
5270
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
5271
|
+
|
5272
|
+
</fo:instream-foreign-object>
|
5273
|
+
</xsl:when>
|
5274
|
+
<xsl:otherwise>
|
5275
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
5276
|
+
</xsl:otherwise>
|
5277
|
+
</xsl:choose>
|
5278
|
+
|
5279
|
+
</fo:block>
|
5280
|
+
</xsl:otherwise>
|
5281
|
+
</xsl:choose>
|
5282
|
+
</xsl:template><xsl:template name="image_src">
|
5283
|
+
<xsl:choose>
|
5284
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
5285
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
5286
|
+
</xsl:when>
|
5287
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
5288
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
5289
|
+
</xsl:when>
|
5290
|
+
<xsl:otherwise>
|
5291
|
+
<xsl:value-of select="@src"/>
|
5292
|
+
</xsl:otherwise>
|
5293
|
+
</xsl:choose>
|
5294
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
5295
|
+
<xsl:choose>
|
5296
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
5297
|
+
<xsl:variable name="src">
|
5298
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
5299
|
+
</xsl:variable>
|
5300
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
5301
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
5302
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
5303
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
5304
|
+
</svg>
|
5305
|
+
</xsl:when>
|
5306
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
5307
|
+
<xsl:variable name="src">
|
5308
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
5309
|
+
</xsl:variable>
|
5310
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
5311
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
5312
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
5313
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
5314
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
5315
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
5316
|
+
</svg>
|
5317
|
+
</xsl:when>
|
5318
|
+
<xsl:otherwise>
|
5319
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
5320
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
5321
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
5322
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
5323
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
5324
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
5325
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
5326
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
5327
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
5328
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
5329
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
5330
|
+
<xsl:call-template name="svg_cross">
|
5331
|
+
<xsl:with-param name="width" select="$width"/>
|
5332
|
+
<xsl:with-param name="height" select="$height"/>
|
5333
|
+
</xsl:call-template>
|
5334
|
+
</svg>
|
5335
|
+
</xsl:otherwise>
|
5336
|
+
</xsl:choose>
|
5337
|
+
|
5338
|
+
</xsl:template><xsl:template name="svg_cross">
|
5339
|
+
<xsl:param name="width"/>
|
5340
|
+
<xsl:param name="height"/>
|
5341
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
5342
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
5048
5343
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
5049
5344
|
<xsl:apply-templates mode="contents"/>
|
5050
5345
|
<xsl:text> </xsl:text>
|
5051
5346
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
5052
5347
|
<xsl:apply-templates mode="bookmarks"/>
|
5053
5348
|
<xsl:text> </xsl:text>
|
5054
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5349
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5055
5350
|
<xsl:value-of select="."/>
|
5056
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
5351
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
5057
5352
|
<xsl:value-of select="."/>
|
5058
5353
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5059
5354
|
<xsl:apply-templates mode="contents"/>
|
5060
5355
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
5061
5356
|
<xsl:apply-templates mode="bookmarks"/>
|
5062
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
5357
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
5063
5358
|
<xsl:apply-templates select="."/>
|
5064
5359
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5065
5360
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -5258,6 +5553,8 @@
|
|
5258
5553
|
</fo:list-item-body>
|
5259
5554
|
</fo:list-item>
|
5260
5555
|
</fo:list-block>
|
5556
|
+
</xsl:template><xsl:template name="extractSection">
|
5557
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5261
5558
|
</xsl:template><xsl:template name="extractTitle">
|
5262
5559
|
<xsl:choose>
|
5263
5560
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -5284,6 +5581,7 @@
|
|
5284
5581
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
5285
5582
|
|
5286
5583
|
<fo:block-container margin-left="0mm">
|
5584
|
+
<xsl:copy-of select="@id"/>
|
5287
5585
|
<xsl:if test="parent::*[local-name() = 'note']">
|
5288
5586
|
<xsl:attribute name="margin-left">
|
5289
5587
|
<xsl:choose>
|
@@ -5305,6 +5603,7 @@
|
|
5305
5603
|
|
5306
5604
|
|
5307
5605
|
|
5606
|
+
|
5308
5607
|
|
5309
5608
|
|
5310
5609
|
|
@@ -5560,6 +5859,7 @@
|
|
5560
5859
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
5561
5860
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
5562
5861
|
|
5862
|
+
|
5563
5863
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
5564
5864
|
|
5565
5865
|
<xsl:variable name="element">
|
@@ -5587,6 +5887,7 @@
|
|
5587
5887
|
<xsl:variable name="element">
|
5588
5888
|
|
5589
5889
|
inline
|
5890
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5590
5891
|
</xsl:variable>
|
5591
5892
|
<xsl:choose>
|
5592
5893
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -5594,7 +5895,7 @@
|
|
5594
5895
|
<xsl:apply-templates/>
|
5595
5896
|
</fo:inline>
|
5596
5897
|
</xsl:when>
|
5597
|
-
<xsl:when test="normalize-space($element)
|
5898
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
5598
5899
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5599
5900
|
<xsl:apply-templates/>
|
5600
5901
|
</fo:block>
|
@@ -5626,7 +5927,7 @@
|
|
5626
5927
|
</fo:inline>
|
5627
5928
|
</xsl:otherwise>
|
5628
5929
|
</xsl:choose>
|
5629
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
5930
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
5630
5931
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5631
5932
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
5632
5933
|
<xsl:variable name="termsource_text">
|
@@ -5635,13 +5936,15 @@
|
|
5635
5936
|
|
5636
5937
|
<xsl:choose>
|
5637
5938
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5638
|
-
<xsl:apply-templates/>
|
5939
|
+
<!-- <xsl:apply-templates /> -->
|
5940
|
+
<xsl:copy-of select="$termsource_text"/>
|
5639
5941
|
</xsl:when>
|
5640
5942
|
<xsl:otherwise>
|
5641
5943
|
|
5642
5944
|
<xsl:text>[</xsl:text>
|
5643
5945
|
|
5644
|
-
<xsl:apply-templates/>
|
5946
|
+
<!-- <xsl:apply-templates /> -->
|
5947
|
+
<xsl:copy-of select="$termsource_text"/>
|
5645
5948
|
|
5646
5949
|
<xsl:text>]</xsl:text>
|
5647
5950
|
|
@@ -5652,8 +5955,15 @@
|
|
5652
5955
|
<xsl:if test="normalize-space() != ''">
|
5653
5956
|
<xsl:value-of select="."/>
|
5654
5957
|
</xsl:if>
|
5655
|
-
</xsl:template><xsl:
|
5958
|
+
</xsl:template><xsl:variable name="localized.source">
|
5959
|
+
<xsl:call-template name="getLocalizedString">
|
5960
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5961
|
+
</xsl:call-template>
|
5962
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5656
5963
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5964
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5965
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5966
|
+
</xsl:if>
|
5657
5967
|
|
5658
5968
|
<fo:inline>
|
5659
5969
|
|
@@ -5663,9 +5973,9 @@
|
|
5663
5973
|
<xsl:call-template name="getTitle">
|
5664
5974
|
<xsl:with-param name="name" select="'title-source'"/>
|
5665
5975
|
</xsl:call-template>
|
5976
|
+
<xsl:text>: </xsl:text>
|
5666
5977
|
|
5667
5978
|
|
5668
|
-
<xsl:text>: </xsl:text>
|
5669
5979
|
</fo:inline>
|
5670
5980
|
|
5671
5981
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
@@ -5790,6 +6100,7 @@
|
|
5790
6100
|
|
5791
6101
|
|
5792
6102
|
|
6103
|
+
|
5793
6104
|
</xsl:variable>
|
5794
6105
|
|
5795
6106
|
<xsl:variable name="padding-right">
|
@@ -5815,7 +6126,8 @@
|
|
5815
6126
|
</fo:inline>
|
5816
6127
|
</xsl:when>
|
5817
6128
|
<xsl:otherwise>
|
5818
|
-
<
|
6129
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
6130
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
5819
6131
|
</xsl:otherwise>
|
5820
6132
|
</xsl:choose>
|
5821
6133
|
|
@@ -5869,7 +6181,6 @@
|
|
5869
6181
|
|
5870
6182
|
|
5871
6183
|
|
5872
|
-
|
5873
6184
|
<xsl:apply-templates/>
|
5874
6185
|
</fo:block>
|
5875
6186
|
|
@@ -5912,7 +6223,7 @@
|
|
5912
6223
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5913
6224
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5914
6225
|
<xsl:choose>
|
5915
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
6226
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
5916
6227
|
<fo:block-container>
|
5917
6228
|
<xsl:attribute name="margin-left">
|
5918
6229
|
<xsl:choose>
|
@@ -5922,6 +6233,7 @@
|
|
5922
6233
|
</xsl:attribute>
|
5923
6234
|
|
5924
6235
|
|
6236
|
+
|
5925
6237
|
<fo:block-container margin-left="0mm">
|
5926
6238
|
<fo:block>
|
5927
6239
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -6123,6 +6435,10 @@
|
|
6123
6435
|
|
6124
6436
|
|
6125
6437
|
|
6438
|
+
|
6439
|
+
|
6440
|
+
|
6441
|
+
|
6126
6442
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6127
6443
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
6128
6444
|
<xsl:choose>
|
@@ -6179,6 +6495,70 @@
|
|
6179
6495
|
<xsl:value-of select="substring(.,1,1)"/>
|
6180
6496
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
6181
6497
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6498
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
6499
|
+
<fo:block>
|
6500
|
+
<xsl:apply-templates/>
|
6501
|
+
</fo:block>
|
6502
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
6503
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6504
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
6505
|
+
<fo:inline>
|
6506
|
+
<xsl:call-template name="text_input"/>
|
6507
|
+
</fo:inline>
|
6508
|
+
</xsl:template><xsl:template name="text_input">
|
6509
|
+
<xsl:variable name="count">
|
6510
|
+
<xsl:choose>
|
6511
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
6512
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
6513
|
+
<xsl:otherwise>10</xsl:otherwise>
|
6514
|
+
</xsl:choose>
|
6515
|
+
</xsl:variable>
|
6516
|
+
<xsl:call-template name="repeat">
|
6517
|
+
<xsl:with-param name="char" select="'_'"/>
|
6518
|
+
<xsl:with-param name="count" select="$count"/>
|
6519
|
+
</xsl:call-template>
|
6520
|
+
<xsl:text> </xsl:text>
|
6521
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
6522
|
+
<xsl:variable name="caption">
|
6523
|
+
<xsl:choose>
|
6524
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
6525
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
6526
|
+
</xsl:choose>
|
6527
|
+
</xsl:variable>
|
6528
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
6529
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
6530
|
+
<fo:inline padding-right="1mm">
|
6531
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6532
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6533
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6534
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6535
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6536
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6537
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
6538
|
+
</svg>
|
6539
|
+
</fo:instream-foreign-object>
|
6540
|
+
</fo:inline>
|
6541
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
6542
|
+
<fo:inline padding-right="1mm">
|
6543
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6544
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6545
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6546
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6547
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6548
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6549
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
6550
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
6551
|
+
</svg>
|
6552
|
+
</fo:instream-foreign-object>
|
6553
|
+
</fo:inline>
|
6554
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
6555
|
+
<fo:inline>
|
6556
|
+
<xsl:call-template name="text_input"/>
|
6557
|
+
</fo:inline>
|
6558
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
6559
|
+
<fo:block-container border="1pt solid black" width="50%">
|
6560
|
+
<fo:block> </fo:block>
|
6561
|
+
</fo:block-container>
|
6182
6562
|
</xsl:template><xsl:template name="convertDate">
|
6183
6563
|
<xsl:param name="date"/>
|
6184
6564
|
<xsl:param name="format" select="'short'"/>
|
@@ -6386,6 +6766,9 @@
|
|
6386
6766
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
6387
6767
|
<xsl:value-of select="$level_total - 1"/>
|
6388
6768
|
</xsl:when>
|
6769
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
6770
|
+
<xsl:value-of select="$level_total - 1"/>
|
6771
|
+
</xsl:when>
|
6389
6772
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
6390
6773
|
<xsl:value-of select="$level_total - 2"/>
|
6391
6774
|
</xsl:when>
|
@@ -6442,6 +6825,7 @@
|
|
6442
6825
|
<xsl:variable name="XSLNS">
|
6443
6826
|
|
6444
6827
|
|
6828
|
+
|
6445
6829
|
<xsl:value-of select="document('')//*/namespace::iec"/>
|
6446
6830
|
|
6447
6831
|
|
@@ -6510,17 +6894,69 @@
|
|
6510
6894
|
</xsl:call-template>
|
6511
6895
|
</xsl:if>
|
6512
6896
|
</xsl:template><xsl:template name="getLocalizedString">
|
6513
|
-
<xsl:param name="key"/>
|
6897
|
+
<xsl:param name="key"/>
|
6514
6898
|
|
6515
6899
|
<xsl:variable name="curr_lang">
|
6516
6900
|
<xsl:call-template name="getLang"/>
|
6517
6901
|
</xsl:variable>
|
6518
6902
|
|
6903
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6904
|
+
|
6519
6905
|
<xsl:choose>
|
6906
|
+
<xsl:when test="$data_value != ''">
|
6907
|
+
<xsl:value-of select="$data_value"/>
|
6908
|
+
</xsl:when>
|
6520
6909
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6521
6910
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6522
6911
|
</xsl:when>
|
6523
|
-
<xsl:otherwise
|
6912
|
+
<xsl:otherwise>
|
6913
|
+
<xsl:variable name="key_">
|
6914
|
+
<xsl:call-template name="capitalize">
|
6915
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
6916
|
+
</xsl:call-template>
|
6917
|
+
</xsl:variable>
|
6918
|
+
<xsl:value-of select="$key_"/>
|
6919
|
+
</xsl:otherwise>
|
6524
6920
|
</xsl:choose>
|
6525
6921
|
|
6922
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6923
|
+
<xsl:param name="isAdded"/>
|
6924
|
+
<xsl:param name="isDeleted"/>
|
6925
|
+
<xsl:choose>
|
6926
|
+
<xsl:when test="local-name() = 'math'">
|
6927
|
+
<xsl:if test="$isAdded = 'true'">
|
6928
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
6929
|
+
</xsl:if>
|
6930
|
+
<xsl:if test="$isDeleted = 'true'">
|
6931
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
6932
|
+
</xsl:if>
|
6933
|
+
</xsl:when>
|
6934
|
+
<xsl:otherwise>
|
6935
|
+
<xsl:if test="$isAdded = 'true'">
|
6936
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
6937
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6938
|
+
</xsl:if>
|
6939
|
+
<xsl:if test="$isDeleted = 'true'">
|
6940
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
6941
|
+
<xsl:if test="local-name() = 'table'">
|
6942
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
6943
|
+
</xsl:if>
|
6944
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
6945
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6946
|
+
</xsl:if>
|
6947
|
+
</xsl:otherwise>
|
6948
|
+
</xsl:choose>
|
6949
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
6950
|
+
<xsl:if test="$lang = 'ar'">
|
6951
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
6952
|
+
</xsl:if>
|
6953
|
+
</xsl:template><xsl:template name="setAlignment">
|
6954
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
6955
|
+
<xsl:choose>
|
6956
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
6957
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
6958
|
+
<xsl:when test="$align != ''">
|
6959
|
+
<xsl:value-of select="$align"/>
|
6960
|
+
</xsl:when>
|
6961
|
+
</xsl:choose>
|
6526
6962
|
</xsl:template></xsl:stylesheet>
|