metanorma-iec 1.2.16 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +7 -1
- data/lib/asciidoctor/iec/biblio.rng +5 -6
- data/lib/asciidoctor/iec/front.rb +11 -5
- data/lib/asciidoctor/iec/iec_intro_en.xml +1 -1
- data/lib/asciidoctor/iec/isodoc.rng +305 -4
- data/lib/asciidoctor/iec/isostandard.rng +1 -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 +462 -61
- data/lib/metanorma/iec/version.rb +1 -1
- data/metanorma-iec.gemspec +5 -5
- 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 +48 -57
- 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
@@ -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,12 @@
|
|
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
|
+
|
2642
2648
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2643
2649
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2644
2650
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -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
|
|
@@ -2785,6 +2792,7 @@
|
|
2785
2792
|
|
2786
2793
|
|
2787
2794
|
|
2795
|
+
|
2788
2796
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2789
2797
|
|
2790
2798
|
|
@@ -2795,6 +2803,7 @@
|
|
2795
2803
|
|
2796
2804
|
|
2797
2805
|
|
2806
|
+
|
2798
2807
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2799
2808
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2800
2809
|
<xsl:attribute name="margin-bottom">9pt</xsl:attribute>
|
@@ -2814,6 +2823,7 @@
|
|
2814
2823
|
|
2815
2824
|
|
2816
2825
|
|
2826
|
+
|
2817
2827
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2818
2828
|
|
2819
2829
|
|
@@ -2843,6 +2853,7 @@
|
|
2843
2853
|
</xsl:attribute-set><xsl:attribute-set name="termnote-style">
|
2844
2854
|
|
2845
2855
|
|
2856
|
+
|
2846
2857
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2847
2858
|
<xsl:attribute name="margin-top">5pt</xsl:attribute>
|
2848
2859
|
<xsl:attribute name="margin-bottom">5pt</xsl:attribute>
|
@@ -2851,6 +2862,7 @@
|
|
2851
2862
|
|
2852
2863
|
|
2853
2864
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2865
|
+
|
2854
2866
|
|
2855
2867
|
|
2856
2868
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -2878,6 +2890,7 @@
|
|
2878
2890
|
</xsl:attribute-set><xsl:attribute-set name="termsource-style">
|
2879
2891
|
|
2880
2892
|
|
2893
|
+
|
2881
2894
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
2882
2895
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2883
2896
|
|
@@ -2892,6 +2905,7 @@
|
|
2892
2905
|
|
2893
2906
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2894
2907
|
|
2908
|
+
|
2895
2909
|
|
2896
2910
|
|
2897
2911
|
|
@@ -2924,12 +2938,14 @@
|
|
2924
2938
|
|
2925
2939
|
|
2926
2940
|
|
2941
|
+
|
2927
2942
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
2928
2943
|
|
2929
2944
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
2930
2945
|
|
2931
2946
|
|
2932
2947
|
|
2948
|
+
|
2933
2949
|
<xsl:attribute name="width">75%</xsl:attribute>
|
2934
2950
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
2935
2951
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -2953,7 +2969,7 @@
|
|
2953
2969
|
|
2954
2970
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
2955
2971
|
|
2956
|
-
|
2972
|
+
|
2957
2973
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
2958
2974
|
|
2959
2975
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
@@ -2965,7 +2981,26 @@
|
|
2965
2981
|
|
2966
2982
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2967
2983
|
|
2968
|
-
|
2984
|
+
|
2985
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2986
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2987
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
2988
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2989
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2990
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2991
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2992
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2993
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2994
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
2995
|
+
<xsl:text>red</xsl:text>
|
2996
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
2997
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
2998
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
2999
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
3000
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
3001
|
+
|
3002
|
+
|
3003
|
+
</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
3004
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2970
3005
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2971
3006
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -3010,16 +3045,17 @@
|
|
3010
3045
|
<xsl:call-template name="add-zero-spaces-java"/>
|
3011
3046
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
3012
3047
|
|
3048
|
+
<xsl:variable name="table-preamble">
|
3049
|
+
|
3050
|
+
|
3051
|
+
</xsl:variable>
|
3052
|
+
|
3013
3053
|
<xsl:variable name="table">
|
3014
3054
|
|
3015
3055
|
<xsl:variable name="simple-table">
|
3016
3056
|
<xsl:call-template name="getSimpleTable"/>
|
3017
3057
|
</xsl:variable>
|
3018
3058
|
|
3019
|
-
|
3020
|
-
|
3021
|
-
|
3022
|
-
|
3023
3059
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
3024
3060
|
<fo:block> </fo:block>
|
3025
3061
|
</xsl:if> -->
|
@@ -3034,7 +3070,7 @@
|
|
3034
3070
|
|
3035
3071
|
|
3036
3072
|
|
3037
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
3073
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
3038
3074
|
|
3039
3075
|
<!-- <xsl:variable name="cols-count">
|
3040
3076
|
<xsl:choose>
|
@@ -3053,8 +3089,6 @@
|
|
3053
3089
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
3054
3090
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
3055
3091
|
|
3056
|
-
|
3057
|
-
|
3058
3092
|
<xsl:variable name="colwidths">
|
3059
3093
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
3060
3094
|
<xsl:call-template name="calculate-column-widths">
|
@@ -3082,10 +3116,12 @@
|
|
3082
3116
|
</xsl:choose>
|
3083
3117
|
</xsl:variable>
|
3084
3118
|
|
3119
|
+
|
3085
3120
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
3086
3121
|
|
3087
3122
|
|
3088
3123
|
|
3124
|
+
|
3089
3125
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
3090
3126
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
3091
3127
|
<xsl:if test="ancestor::*[local-name() = 'preface']">
|
@@ -3103,6 +3139,8 @@
|
|
3103
3139
|
|
3104
3140
|
|
3105
3141
|
|
3142
|
+
|
3143
|
+
|
3106
3144
|
<xsl:variable name="table_width">
|
3107
3145
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
3108
3146
|
100%
|
@@ -3117,6 +3155,8 @@
|
|
3117
3155
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
3118
3156
|
|
3119
3157
|
|
3158
|
+
|
3159
|
+
|
3120
3160
|
<attribute name="border">0.5pt solid black</attribute>
|
3121
3161
|
|
3122
3162
|
|
@@ -3210,7 +3250,8 @@
|
|
3210
3250
|
</fo:block-container>
|
3211
3251
|
</xsl:variable>
|
3212
3252
|
|
3213
|
-
|
3253
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3254
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3214
3255
|
|
3215
3256
|
<xsl:choose>
|
3216
3257
|
<xsl:when test="@width">
|
@@ -3224,7 +3265,14 @@
|
|
3224
3265
|
<fo:table-body>
|
3225
3266
|
<fo:table-row>
|
3226
3267
|
<fo:table-cell column-number="2">
|
3227
|
-
<
|
3268
|
+
<xsl:copy-of select="$table-preamble"/>
|
3269
|
+
<fo:block>
|
3270
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3271
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3272
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3273
|
+
</xsl:call-template>
|
3274
|
+
<xsl:copy-of select="$table"/>
|
3275
|
+
</fo:block>
|
3228
3276
|
</fo:table-cell>
|
3229
3277
|
</fo:table-row>
|
3230
3278
|
</fo:table-body>
|
@@ -3235,16 +3283,42 @@
|
|
3235
3283
|
|
3236
3284
|
</xsl:when>
|
3237
3285
|
<xsl:otherwise>
|
3238
|
-
<xsl:
|
3286
|
+
<xsl:choose>
|
3287
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
3288
|
+
<xsl:copy-of select="$table-preamble"/>
|
3289
|
+
<fo:block>
|
3290
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3291
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3292
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3293
|
+
</xsl:call-template>
|
3294
|
+
<xsl:copy-of select="$table"/>
|
3295
|
+
</fo:block>
|
3296
|
+
</xsl:when>
|
3297
|
+
<xsl:otherwise>
|
3298
|
+
<xsl:copy-of select="$table-preamble"/>
|
3299
|
+
<xsl:copy-of select="$table"/>
|
3300
|
+
</xsl:otherwise>
|
3301
|
+
</xsl:choose>
|
3239
3302
|
</xsl:otherwise>
|
3240
3303
|
</xsl:choose>
|
3241
3304
|
|
3242
3305
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
3306
|
+
<xsl:param name="continued"/>
|
3243
3307
|
<xsl:if test="normalize-space() != ''">
|
3244
3308
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
3245
3309
|
|
3246
3310
|
|
3247
|
-
<xsl:
|
3311
|
+
<xsl:choose>
|
3312
|
+
<xsl:when test="$continued = 'true'">
|
3313
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
3314
|
+
|
3315
|
+
</xsl:when>
|
3316
|
+
<xsl:otherwise>
|
3317
|
+
<xsl:apply-templates/>
|
3318
|
+
</xsl:otherwise>
|
3319
|
+
</xsl:choose>
|
3320
|
+
|
3321
|
+
|
3248
3322
|
</fo:block>
|
3249
3323
|
</xsl:if>
|
3250
3324
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -3296,7 +3370,7 @@
|
|
3296
3370
|
</xsl:for-each>
|
3297
3371
|
</xsl:when>
|
3298
3372
|
<xsl:otherwise>
|
3299
|
-
<xsl:for-each select="xalan:nodeset($table)
|
3373
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
3300
3374
|
<xsl:variable name="td_text">
|
3301
3375
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
3302
3376
|
|
@@ -3384,18 +3458,18 @@
|
|
3384
3458
|
<xsl:apply-templates/>
|
3385
3459
|
</fo:table-header>
|
3386
3460
|
</xsl:template><xsl:template name="table-header-title">
|
3387
|
-
<xsl:param name="cols-count"/>
|
3461
|
+
<xsl:param name="cols-count"/>
|
3388
3462
|
<!-- row for title -->
|
3389
3463
|
<fo:table-row>
|
3390
3464
|
<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
|
-
|
3465
|
+
|
3466
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3467
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
3468
|
+
</xsl:apply-templates>
|
3392
3469
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
3393
3470
|
<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>
|
3471
|
+
</xsl:for-each>
|
3472
|
+
|
3399
3473
|
</fo:table-cell>
|
3400
3474
|
</fo:table-row>
|
3401
3475
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -3639,6 +3713,7 @@
|
|
3639
3713
|
|
3640
3714
|
|
3641
3715
|
|
3716
|
+
|
3642
3717
|
<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
|
3643
3718
|
<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
|
3644
3719
|
|
@@ -3666,12 +3741,14 @@
|
|
3666
3741
|
<xsl:attribute name="text-align">
|
3667
3742
|
<xsl:choose>
|
3668
3743
|
<xsl:when test="@align">
|
3669
|
-
<xsl:
|
3744
|
+
<xsl:call-template name="setAlignment"/>
|
3745
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3670
3746
|
</xsl:when>
|
3671
3747
|
<xsl:otherwise>center</xsl:otherwise>
|
3672
3748
|
</xsl:choose>
|
3673
3749
|
</xsl:attribute>
|
3674
3750
|
|
3751
|
+
|
3675
3752
|
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
3676
3753
|
|
3677
3754
|
|
@@ -3690,6 +3767,9 @@
|
|
3690
3767
|
|
3691
3768
|
|
3692
3769
|
|
3770
|
+
<xsl:if test="$lang = 'ar'">
|
3771
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3772
|
+
</xsl:if>
|
3693
3773
|
<xsl:if test="@colspan">
|
3694
3774
|
<xsl:attribute name="number-columns-spanned">
|
3695
3775
|
<xsl:value-of select="@colspan"/>
|
@@ -3721,16 +3801,21 @@
|
|
3721
3801
|
<xsl:attribute name="text-align">
|
3722
3802
|
<xsl:choose>
|
3723
3803
|
<xsl:when test="@align">
|
3724
|
-
<xsl:
|
3804
|
+
<xsl:call-template name="setAlignment"/>
|
3805
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3725
3806
|
</xsl:when>
|
3726
3807
|
<xsl:otherwise>left</xsl:otherwise>
|
3727
3808
|
</xsl:choose>
|
3728
3809
|
</xsl:attribute>
|
3810
|
+
<xsl:if test="$lang = 'ar'">
|
3811
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3812
|
+
</xsl:if>
|
3729
3813
|
<!-- and ancestor::*[local-name() = 'thead'] -->
|
3730
3814
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
3731
3815
|
|
3732
3816
|
|
3733
3817
|
|
3818
|
+
|
3734
3819
|
<xsl:if test="ancestor::*[local-name() = 'tfoot']">
|
3735
3820
|
<xsl:attribute name="border">solid black 0</xsl:attribute>
|
3736
3821
|
</xsl:if>
|
@@ -3748,6 +3833,9 @@
|
|
3748
3833
|
|
3749
3834
|
|
3750
3835
|
|
3836
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
3837
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3838
|
+
</xsl:if>
|
3751
3839
|
<xsl:if test="@colspan">
|
3752
3840
|
<xsl:attribute name="number-columns-spanned">
|
3753
3841
|
<xsl:value-of select="@colspan"/>
|
@@ -3884,13 +3972,13 @@
|
|
3884
3972
|
</xsl:choose>
|
3885
3973
|
</xsl:variable>
|
3886
3974
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3887
|
-
<xsl:element name="{$ns}:table">
|
3975
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
3888
3976
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3889
3977
|
<tbody>
|
3890
3978
|
<xsl:apply-templates mode="dl"/>
|
3891
3979
|
</tbody>
|
3892
3980
|
</xsl:for-each>
|
3893
|
-
</xsl:element>
|
3981
|
+
<!-- </xsl:element> -->
|
3894
3982
|
</xsl:variable>
|
3895
3983
|
|
3896
3984
|
<xsl:call-template name="calculate-column-widths">
|
@@ -3996,6 +4084,8 @@
|
|
3996
4084
|
<xsl:apply-templates/>
|
3997
4085
|
</fo:inline>
|
3998
4086
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
4087
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4088
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3999
4089
|
<fo:block-container>
|
4000
4090
|
|
4001
4091
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -4012,6 +4102,12 @@
|
|
4012
4102
|
</xsl:attribute>
|
4013
4103
|
|
4014
4104
|
</xsl:if>
|
4105
|
+
|
4106
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4107
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4108
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4109
|
+
</xsl:call-template>
|
4110
|
+
|
4015
4111
|
<fo:block-container>
|
4016
4112
|
|
4017
4113
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -4135,11 +4231,11 @@
|
|
4135
4231
|
</xsl:choose>
|
4136
4232
|
</xsl:variable>
|
4137
4233
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
4138
|
-
<xsl:element name="{$ns}:table">
|
4234
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
4139
4235
|
<tbody>
|
4140
4236
|
<xsl:apply-templates mode="dl"/>
|
4141
4237
|
</tbody>
|
4142
|
-
</xsl:element>
|
4238
|
+
<!-- </xsl:element> -->
|
4143
4239
|
</xsl:variable>
|
4144
4240
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
4145
4241
|
<xsl:variable name="colwidths">
|
@@ -4393,6 +4489,7 @@
|
|
4393
4489
|
|
4394
4490
|
|
4395
4491
|
|
4492
|
+
|
4396
4493
|
|
4397
4494
|
</xsl:variable>
|
4398
4495
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -4410,8 +4507,74 @@
|
|
4410
4507
|
<fo:inline text-decoration="underline">
|
4411
4508
|
<xsl:apply-templates/>
|
4412
4509
|
</fo:inline>
|
4510
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
4511
|
+
<xsl:choose>
|
4512
|
+
<xsl:when test="@amendment">
|
4513
|
+
<fo:inline>
|
4514
|
+
<xsl:call-template name="insertTag">
|
4515
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4516
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4517
|
+
</xsl:call-template>
|
4518
|
+
<xsl:apply-templates/>
|
4519
|
+
<xsl:call-template name="insertTag">
|
4520
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4521
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4522
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4523
|
+
</xsl:call-template>
|
4524
|
+
</fo:inline>
|
4525
|
+
</xsl:when>
|
4526
|
+
<xsl:when test="@corrigenda">
|
4527
|
+
<fo:inline>
|
4528
|
+
<xsl:call-template name="insertTag">
|
4529
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4530
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4531
|
+
</xsl:call-template>
|
4532
|
+
<xsl:apply-templates/>
|
4533
|
+
<xsl:call-template name="insertTag">
|
4534
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4535
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4536
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4537
|
+
</xsl:call-template>
|
4538
|
+
</fo:inline>
|
4539
|
+
</xsl:when>
|
4540
|
+
<xsl:otherwise>
|
4541
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
4542
|
+
<xsl:apply-templates/>
|
4543
|
+
</fo:inline>
|
4544
|
+
</xsl:otherwise>
|
4545
|
+
</xsl:choose>
|
4546
|
+
|
4547
|
+
</xsl:template><xsl:template name="insertTag">
|
4548
|
+
<xsl:param name="type"/>
|
4549
|
+
<xsl:param name="kind"/>
|
4550
|
+
<xsl:param name="value"/>
|
4551
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
4552
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
4553
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
4554
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
4555
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
4556
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
4557
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4558
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4559
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4560
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
4561
|
+
<g>
|
4562
|
+
<xsl:if test="$type = 'closing'">
|
4563
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
4564
|
+
</xsl:if>
|
4565
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
4566
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
4567
|
+
</g>
|
4568
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
4569
|
+
<xsl:if test="$type = 'closing'">
|
4570
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
4571
|
+
</xsl:if>
|
4572
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
4573
|
+
</text>
|
4574
|
+
</svg>
|
4575
|
+
</fo:instream-foreign-object>
|
4413
4576
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
4414
|
-
<fo:inline
|
4577
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
4415
4578
|
<xsl:apply-templates/>
|
4416
4579
|
</fo:inline>
|
4417
4580
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -4708,11 +4871,15 @@
|
|
4708
4871
|
</xsl:apply-templates>
|
4709
4872
|
</xsl:template><xsl:template name="getLang">
|
4710
4873
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4874
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4711
4875
|
<xsl:variable name="language">
|
4712
4876
|
<xsl:choose>
|
4713
4877
|
<xsl:when test="$language_current != ''">
|
4714
4878
|
<xsl:value-of select="$language_current"/>
|
4715
4879
|
</xsl:when>
|
4880
|
+
<xsl:when test="$language_current_2 != ''">
|
4881
|
+
<xsl:value-of select="$language_current_2"/>
|
4882
|
+
</xsl:when>
|
4716
4883
|
<xsl:otherwise>
|
4717
4884
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4718
4885
|
</xsl:otherwise>
|
@@ -4752,13 +4919,23 @@
|
|
4752
4919
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
4753
4920
|
<xsl:value-of select="substring($str, 2)"/>
|
4754
4921
|
</xsl:template><xsl:template match="mathml:math">
|
4755
|
-
<
|
4922
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4923
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4924
|
+
|
4925
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
4926
|
+
|
4927
|
+
|
4928
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4929
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4930
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4931
|
+
</xsl:call-template>
|
4756
4932
|
|
4757
4933
|
<xsl:variable name="mathml">
|
4758
4934
|
<xsl:apply-templates select="." mode="mathml"/>
|
4759
4935
|
</xsl:variable>
|
4760
4936
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4761
4937
|
|
4938
|
+
|
4762
4939
|
<!-- <xsl:copy-of select="."/> -->
|
4763
4940
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4764
4941
|
</fo:instream-foreign-object>
|
@@ -4919,6 +5096,7 @@
|
|
4919
5096
|
|
4920
5097
|
|
4921
5098
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
5099
|
+
|
4922
5100
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4923
5101
|
</fo:inline>
|
4924
5102
|
<xsl:apply-templates/>
|
@@ -4945,6 +5123,7 @@
|
|
4945
5123
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
4946
5124
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
4947
5125
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
5126
|
+
|
4948
5127
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4949
5128
|
</fo:inline>
|
4950
5129
|
<xsl:apply-templates/>
|
@@ -5008,8 +5187,15 @@
|
|
5008
5187
|
</fo:inline>
|
5009
5188
|
</xsl:if>
|
5010
5189
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
5190
|
+
<xsl:variable name="isAdded" select="@added"/>
|
5191
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
5011
5192
|
<fo:block-container id="{@id}">
|
5012
5193
|
|
5194
|
+
<xsl:call-template name="setTrackChangesStyles">
|
5195
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5196
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5197
|
+
</xsl:call-template>
|
5198
|
+
|
5013
5199
|
<fo:block>
|
5014
5200
|
<xsl:apply-templates/>
|
5015
5201
|
</fo:block>
|
@@ -5017,7 +5203,10 @@
|
|
5017
5203
|
<xsl:for-each select="*[local-name() = 'note']">
|
5018
5204
|
<xsl:call-template name="note"/>
|
5019
5205
|
</xsl:for-each>
|
5020
|
-
|
5206
|
+
|
5207
|
+
|
5208
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
5209
|
+
|
5021
5210
|
</fo:block-container>
|
5022
5211
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
5023
5212
|
<fo:block id="{@id}">
|
@@ -5029,37 +5218,122 @@
|
|
5029
5218
|
<xsl:apply-templates/>
|
5030
5219
|
</fo:block>
|
5031
5220
|
</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
|
-
|
5221
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
5222
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
5223
|
+
<xsl:choose>
|
5224
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
5225
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
5226
|
+
<xsl:variable name="src">
|
5227
|
+
<xsl:call-template name="image_src"/>
|
5228
|
+
</xsl:variable>
|
5229
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
5230
|
+
</fo:inline>
|
5231
|
+
</xsl:when>
|
5232
|
+
<xsl:otherwise>
|
5233
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
5234
|
+
|
5235
|
+
<xsl:variable name="src">
|
5236
|
+
<xsl:call-template name="image_src"/>
|
5237
|
+
</xsl:variable>
|
5238
|
+
|
5239
|
+
<xsl:choose>
|
5240
|
+
<xsl:when test="$isDeleted = 'true'">
|
5241
|
+
<!-- enclose in svg -->
|
5242
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
5243
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
5244
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
5245
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5246
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5247
|
+
|
5248
|
+
|
5249
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
5250
|
+
|
5251
|
+
</fo:instream-foreign-object>
|
5252
|
+
</xsl:when>
|
5253
|
+
<xsl:otherwise>
|
5254
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
5255
|
+
</xsl:otherwise>
|
5256
|
+
</xsl:choose>
|
5257
|
+
|
5258
|
+
</fo:block>
|
5259
|
+
</xsl:otherwise>
|
5260
|
+
</xsl:choose>
|
5261
|
+
</xsl:template><xsl:template name="image_src">
|
5262
|
+
<xsl:choose>
|
5263
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
5264
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
5265
|
+
</xsl:when>
|
5266
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
5267
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
5268
|
+
</xsl:when>
|
5269
|
+
<xsl:otherwise>
|
5270
|
+
<xsl:value-of select="@src"/>
|
5271
|
+
</xsl:otherwise>
|
5272
|
+
</xsl:choose>
|
5273
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
5274
|
+
<xsl:choose>
|
5275
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
5276
|
+
<xsl:variable name="src">
|
5277
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
5278
|
+
</xsl:variable>
|
5279
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
5280
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
5281
|
+
<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">
|
5282
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
5283
|
+
</svg>
|
5284
|
+
</xsl:when>
|
5285
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
5286
|
+
<xsl:variable name="src">
|
5287
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
5288
|
+
</xsl:variable>
|
5289
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
5290
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
5291
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
5292
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
5293
|
+
<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">
|
5294
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
5295
|
+
</svg>
|
5296
|
+
</xsl:when>
|
5297
|
+
<xsl:otherwise>
|
5298
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
5299
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
5300
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
5301
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
5302
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
5303
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
5304
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
5305
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
5306
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
5307
|
+
<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">
|
5308
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
5309
|
+
<xsl:call-template name="svg_cross">
|
5310
|
+
<xsl:with-param name="width" select="$width"/>
|
5311
|
+
<xsl:with-param name="height" select="$height"/>
|
5312
|
+
</xsl:call-template>
|
5313
|
+
</svg>
|
5314
|
+
</xsl:otherwise>
|
5315
|
+
</xsl:choose>
|
5316
|
+
|
5317
|
+
</xsl:template><xsl:template name="svg_cross">
|
5318
|
+
<xsl:param name="width"/>
|
5319
|
+
<xsl:param name="height"/>
|
5320
|
+
<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; "/>
|
5321
|
+
<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
5322
|
</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
5323
|
<xsl:apply-templates mode="contents"/>
|
5050
5324
|
<xsl:text> </xsl:text>
|
5051
5325
|
</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
5326
|
<xsl:apply-templates mode="bookmarks"/>
|
5053
5327
|
<xsl:text> </xsl:text>
|
5054
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5328
|
+
</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
5329
|
<xsl:value-of select="."/>
|
5056
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
5330
|
+
</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
5331
|
<xsl:value-of select="."/>
|
5058
5332
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5059
5333
|
<xsl:apply-templates mode="contents"/>
|
5060
5334
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
5061
5335
|
<xsl:apply-templates mode="bookmarks"/>
|
5062
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
5336
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
5063
5337
|
<xsl:apply-templates select="."/>
|
5064
5338
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5065
5339
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -5258,6 +5532,8 @@
|
|
5258
5532
|
</fo:list-item-body>
|
5259
5533
|
</fo:list-item>
|
5260
5534
|
</fo:list-block>
|
5535
|
+
</xsl:template><xsl:template name="extractSection">
|
5536
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5261
5537
|
</xsl:template><xsl:template name="extractTitle">
|
5262
5538
|
<xsl:choose>
|
5263
5539
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -5305,6 +5581,7 @@
|
|
5305
5581
|
|
5306
5582
|
|
5307
5583
|
|
5584
|
+
|
5308
5585
|
|
5309
5586
|
|
5310
5587
|
|
@@ -5587,6 +5864,7 @@
|
|
5587
5864
|
<xsl:variable name="element">
|
5588
5865
|
|
5589
5866
|
inline
|
5867
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5590
5868
|
</xsl:variable>
|
5591
5869
|
<xsl:choose>
|
5592
5870
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -5594,7 +5872,7 @@
|
|
5594
5872
|
<xsl:apply-templates/>
|
5595
5873
|
</fo:inline>
|
5596
5874
|
</xsl:when>
|
5597
|
-
<xsl:when test="normalize-space($element)
|
5875
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
5598
5876
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5599
5877
|
<xsl:apply-templates/>
|
5600
5878
|
</fo:block>
|
@@ -5626,7 +5904,7 @@
|
|
5626
5904
|
</fo:inline>
|
5627
5905
|
</xsl:otherwise>
|
5628
5906
|
</xsl:choose>
|
5629
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
5907
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
5630
5908
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5631
5909
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
5632
5910
|
<xsl:variable name="termsource_text">
|
@@ -5635,13 +5913,15 @@
|
|
5635
5913
|
|
5636
5914
|
<xsl:choose>
|
5637
5915
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5638
|
-
<xsl:apply-templates/>
|
5916
|
+
<!-- <xsl:apply-templates /> -->
|
5917
|
+
<xsl:copy-of select="$termsource_text"/>
|
5639
5918
|
</xsl:when>
|
5640
5919
|
<xsl:otherwise>
|
5641
5920
|
|
5642
5921
|
<xsl:text>[</xsl:text>
|
5643
5922
|
|
5644
|
-
<xsl:apply-templates/>
|
5923
|
+
<!-- <xsl:apply-templates /> -->
|
5924
|
+
<xsl:copy-of select="$termsource_text"/>
|
5645
5925
|
|
5646
5926
|
<xsl:text>]</xsl:text>
|
5647
5927
|
|
@@ -5652,14 +5932,20 @@
|
|
5652
5932
|
<xsl:if test="normalize-space() != ''">
|
5653
5933
|
<xsl:value-of select="."/>
|
5654
5934
|
</xsl:if>
|
5655
|
-
</xsl:template><xsl:
|
5935
|
+
</xsl:template><xsl:variable name="localized.source">
|
5936
|
+
<xsl:call-template name="getLocalizedString">
|
5937
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5938
|
+
</xsl:call-template>
|
5939
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5656
5940
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5941
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5942
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5943
|
+
</xsl:if>
|
5657
5944
|
|
5658
5945
|
<fo:inline>
|
5659
5946
|
|
5660
5947
|
|
5661
5948
|
|
5662
|
-
|
5663
5949
|
<xsl:call-template name="getTitle">
|
5664
5950
|
<xsl:with-param name="name" select="'title-source'"/>
|
5665
5951
|
</xsl:call-template>
|
@@ -5815,7 +6101,8 @@
|
|
5815
6101
|
</fo:inline>
|
5816
6102
|
</xsl:when>
|
5817
6103
|
<xsl:otherwise>
|
5818
|
-
<
|
6104
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
6105
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
5819
6106
|
</xsl:otherwise>
|
5820
6107
|
</xsl:choose>
|
5821
6108
|
|
@@ -5869,7 +6156,6 @@
|
|
5869
6156
|
|
5870
6157
|
|
5871
6158
|
|
5872
|
-
|
5873
6159
|
<xsl:apply-templates/>
|
5874
6160
|
</fo:block>
|
5875
6161
|
|
@@ -5912,7 +6198,7 @@
|
|
5912
6198
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5913
6199
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5914
6200
|
<xsl:choose>
|
5915
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
6201
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
5916
6202
|
<fo:block-container>
|
5917
6203
|
<xsl:attribute name="margin-left">
|
5918
6204
|
<xsl:choose>
|
@@ -5922,6 +6208,7 @@
|
|
5922
6208
|
</xsl:attribute>
|
5923
6209
|
|
5924
6210
|
|
6211
|
+
|
5925
6212
|
<fo:block-container margin-left="0mm">
|
5926
6213
|
<fo:block>
|
5927
6214
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -6080,8 +6367,8 @@
|
|
6080
6367
|
<fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
|
6081
6368
|
<xsl:apply-templates/>
|
6082
6369
|
</fo:block>
|
6083
|
-
</xsl:template><xsl:template match="*[local-name() = 'bookmark']">
|
6084
|
-
<fo:inline id="{@id}"/>
|
6370
|
+
</xsl:template><xsl:template match="*[local-name() = 'bookmark']" name="bookmark">
|
6371
|
+
<fo:inline id="{@id}" font-size="1pt"/>
|
6085
6372
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
6086
6373
|
<!-- <row>
|
6087
6374
|
<date>05-07-2013</date>
|
@@ -6123,6 +6410,10 @@
|
|
6123
6410
|
|
6124
6411
|
|
6125
6412
|
|
6413
|
+
|
6414
|
+
|
6415
|
+
|
6416
|
+
|
6126
6417
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6127
6418
|
<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
6419
|
<xsl:choose>
|
@@ -6179,6 +6470,70 @@
|
|
6179
6470
|
<xsl:value-of select="substring(.,1,1)"/>
|
6180
6471
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
6181
6472
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6473
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
6474
|
+
<fo:block>
|
6475
|
+
<xsl:apply-templates/>
|
6476
|
+
</fo:block>
|
6477
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
6478
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6479
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
6480
|
+
<fo:inline>
|
6481
|
+
<xsl:call-template name="text_input"/>
|
6482
|
+
</fo:inline>
|
6483
|
+
</xsl:template><xsl:template name="text_input">
|
6484
|
+
<xsl:variable name="count">
|
6485
|
+
<xsl:choose>
|
6486
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
6487
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
6488
|
+
<xsl:otherwise>10</xsl:otherwise>
|
6489
|
+
</xsl:choose>
|
6490
|
+
</xsl:variable>
|
6491
|
+
<xsl:call-template name="repeat">
|
6492
|
+
<xsl:with-param name="char" select="'_'"/>
|
6493
|
+
<xsl:with-param name="count" select="$count"/>
|
6494
|
+
</xsl:call-template>
|
6495
|
+
<xsl:text> </xsl:text>
|
6496
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
6497
|
+
<xsl:variable name="caption">
|
6498
|
+
<xsl:choose>
|
6499
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
6500
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
6501
|
+
</xsl:choose>
|
6502
|
+
</xsl:variable>
|
6503
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
6504
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
6505
|
+
<fo:inline padding-right="1mm">
|
6506
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6507
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6508
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6509
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6510
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6511
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6512
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
6513
|
+
</svg>
|
6514
|
+
</fo:instream-foreign-object>
|
6515
|
+
</fo:inline>
|
6516
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
6517
|
+
<fo:inline padding-right="1mm">
|
6518
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6519
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6520
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6521
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6522
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6523
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6524
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
6525
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
6526
|
+
</svg>
|
6527
|
+
</fo:instream-foreign-object>
|
6528
|
+
</fo:inline>
|
6529
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
6530
|
+
<fo:inline>
|
6531
|
+
<xsl:call-template name="text_input"/>
|
6532
|
+
</fo:inline>
|
6533
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
6534
|
+
<fo:block-container border="1pt solid black" width="50%">
|
6535
|
+
<fo:block> </fo:block>
|
6536
|
+
</fo:block-container>
|
6182
6537
|
</xsl:template><xsl:template name="convertDate">
|
6183
6538
|
<xsl:param name="date"/>
|
6184
6539
|
<xsl:param name="format" select="'short'"/>
|
@@ -6442,6 +6797,7 @@
|
|
6442
6797
|
<xsl:variable name="XSLNS">
|
6443
6798
|
|
6444
6799
|
|
6800
|
+
|
6445
6801
|
<xsl:value-of select="document('')//*/namespace::iec"/>
|
6446
6802
|
|
6447
6803
|
|
@@ -6510,17 +6866,62 @@
|
|
6510
6866
|
</xsl:call-template>
|
6511
6867
|
</xsl:if>
|
6512
6868
|
</xsl:template><xsl:template name="getLocalizedString">
|
6513
|
-
<xsl:param name="key"/>
|
6869
|
+
<xsl:param name="key"/>
|
6514
6870
|
|
6515
6871
|
<xsl:variable name="curr_lang">
|
6516
6872
|
<xsl:call-template name="getLang"/>
|
6517
6873
|
</xsl:variable>
|
6518
6874
|
|
6875
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6876
|
+
|
6519
6877
|
<xsl:choose>
|
6878
|
+
<xsl:when test="$data_value != ''">
|
6879
|
+
<xsl:value-of select="$data_value"/>
|
6880
|
+
</xsl:when>
|
6520
6881
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6521
6882
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6522
6883
|
</xsl:when>
|
6523
6884
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
6524
6885
|
</xsl:choose>
|
6525
6886
|
|
6887
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6888
|
+
<xsl:param name="isAdded"/>
|
6889
|
+
<xsl:param name="isDeleted"/>
|
6890
|
+
<xsl:choose>
|
6891
|
+
<xsl:when test="local-name() = 'math'">
|
6892
|
+
<xsl:if test="$isAdded = 'true'">
|
6893
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
6894
|
+
</xsl:if>
|
6895
|
+
<xsl:if test="$isDeleted = 'true'">
|
6896
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
6897
|
+
</xsl:if>
|
6898
|
+
</xsl:when>
|
6899
|
+
<xsl:otherwise>
|
6900
|
+
<xsl:if test="$isAdded = 'true'">
|
6901
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
6902
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6903
|
+
</xsl:if>
|
6904
|
+
<xsl:if test="$isDeleted = 'true'">
|
6905
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
6906
|
+
<xsl:if test="local-name() = 'table'">
|
6907
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
6908
|
+
</xsl:if>
|
6909
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
6910
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6911
|
+
</xsl:if>
|
6912
|
+
</xsl:otherwise>
|
6913
|
+
</xsl:choose>
|
6914
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
6915
|
+
<xsl:if test="$lang = 'ar'">
|
6916
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
6917
|
+
</xsl:if>
|
6918
|
+
</xsl:template><xsl:template name="setAlignment">
|
6919
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
6920
|
+
<xsl:choose>
|
6921
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
6922
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
6923
|
+
<xsl:when test="$align != ''">
|
6924
|
+
<xsl:value-of select="$align"/>
|
6925
|
+
</xsl:when>
|
6926
|
+
</xsl:choose>
|
6526
6927
|
</xsl:template></xsl:stylesheet>
|