metanorma-cc 2.7.1 → 2.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +677 -185
- data/lib/isodoc/cc/metadata.rb +5 -2
- data/lib/metanorma/cc/biblio-standoc.rng +0 -49
- data/lib/metanorma/cc/biblio.rng +11 -1
- data/lib/metanorma/cc/converter.rb +0 -15
- data/lib/metanorma/cc/isodoc.rng +24 -1
- data/lib/metanorma/cc/relaton-cc.rng +0 -15
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma.yml +2 -0
- metadata +2 -2
@@ -300,9 +300,8 @@
|
|
300
300
|
<fo:block margin-bottom="12pt">
|
301
301
|
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name"/>
|
302
302
|
<xsl:text> TC </xsl:text>
|
303
|
-
<xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/>
|
304
|
-
|
305
|
-
<xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author' and mn:description[normalize-space(@language) = ''] = 'Technical committee']]/mn:organization/mn:subdivision[@type = 'Technical committee']/mn:identifier"/> -->
|
303
|
+
<!-- <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:technical-committee"/> -->
|
304
|
+
<xsl:value-of select="//mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Technical committee']/mn:name"/>
|
306
305
|
<xsl:text> </xsl:text>
|
307
306
|
</fo:block>
|
308
307
|
</fo:block>
|
@@ -2210,42 +2209,86 @@
|
|
2210
2209
|
<xsl:attribute-set name="copyright-statement-style">
|
2211
2210
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
2212
2211
|
|
2212
|
+
<xsl:template name="refine_copyright-statement-style">
|
2213
|
+
</xsl:template>
|
2214
|
+
|
2213
2215
|
<xsl:attribute-set name="copyright-statement-title-style">
|
2214
2216
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
2215
2217
|
|
2218
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
2219
|
+
</xsl:template>
|
2220
|
+
|
2216
2221
|
<xsl:attribute-set name="copyright-statement-p-style">
|
2217
2222
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
2218
2223
|
|
2219
|
-
|
2224
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
2225
|
+
|
2226
|
+
</xsl:template>
|
2227
|
+
|
2228
|
+
<xsl:attribute-set name="license-statement-style">
|
2220
2229
|
</xsl:attribute-set> <!-- license-statement-style -->
|
2221
2230
|
|
2231
|
+
<xsl:template name="refine_license-statement-style">
|
2232
|
+
</xsl:template>
|
2233
|
+
|
2222
2234
|
<xsl:attribute-set name="license-statement-title-style">
|
2223
2235
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2224
2236
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
2225
2237
|
|
2238
|
+
<xsl:template name="refine_license-statement-title-style">
|
2239
|
+
</xsl:template>
|
2240
|
+
|
2226
2241
|
<xsl:attribute-set name="license-statement-p-style">
|
2227
2242
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
2228
2243
|
|
2244
|
+
<xsl:template name="refine_license-statement-p-style">
|
2245
|
+
|
2246
|
+
</xsl:template>
|
2247
|
+
|
2229
2248
|
<xsl:attribute-set name="legal-statement-style">
|
2230
2249
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
2231
2250
|
|
2251
|
+
<xsl:template name="refine_legal-statement-style">
|
2252
|
+
</xsl:template>
|
2253
|
+
|
2232
2254
|
<xsl:attribute-set name="legal-statement-title-style">
|
2233
2255
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2234
2256
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
2235
2257
|
|
2258
|
+
<xsl:template name="refine_legal-statement-title-style">
|
2259
|
+
</xsl:template>
|
2260
|
+
|
2236
2261
|
<xsl:attribute-set name="legal-statement-p-style">
|
2237
2262
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
2238
2263
|
|
2264
|
+
<xsl:template name="refine_legal-statement-p-style">
|
2265
|
+
<xsl:if test="@align">
|
2266
|
+
<xsl:attribute name="text-align">
|
2267
|
+
<xsl:value-of select="@align"/>
|
2268
|
+
</xsl:attribute>
|
2269
|
+
</xsl:if>
|
2270
|
+
</xsl:template>
|
2271
|
+
|
2239
2272
|
<xsl:attribute-set name="feedback-statement-style">
|
2240
2273
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
2241
2274
|
|
2275
|
+
<xsl:template name="refine_feedback-statement-style">
|
2276
|
+
</xsl:template>
|
2277
|
+
|
2242
2278
|
<xsl:attribute-set name="feedback-statement-title-style">
|
2243
2279
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2244
2280
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
2245
2281
|
|
2282
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
2283
|
+
|
2284
|
+
</xsl:template>
|
2285
|
+
|
2246
2286
|
<xsl:attribute-set name="feedback-statement-p-style">
|
2247
2287
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
2248
2288
|
|
2289
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
2290
|
+
</xsl:template>
|
2291
|
+
|
2249
2292
|
<!-- End boilerplate sections styles -->
|
2250
2293
|
|
2251
2294
|
<!-- ================================= -->
|
@@ -2253,6 +2296,8 @@
|
|
2253
2296
|
<!-- ================================= -->
|
2254
2297
|
<xsl:template match="mn:copyright-statement">
|
2255
2298
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2299
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
2300
|
+
|
2256
2301
|
<xsl:apply-templates/>
|
2257
2302
|
</fo:block>
|
2258
2303
|
</xsl:template> <!-- copyright-statement -->
|
@@ -2269,6 +2314,7 @@
|
|
2269
2314
|
|
2270
2315
|
<xsl:template match="mn:license-statement">
|
2271
2316
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
2317
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
2272
2318
|
<xsl:apply-templates/>
|
2273
2319
|
</fo:block>
|
2274
2320
|
</xsl:template> <!-- license-statement -->
|
@@ -2286,6 +2332,7 @@
|
|
2286
2332
|
<xsl:template match="mn:legal-statement">
|
2287
2333
|
<xsl:param name="isLegacy">false</xsl:param>
|
2288
2334
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2335
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
2289
2336
|
<xsl:apply-templates/>
|
2290
2337
|
</fo:block>
|
2291
2338
|
</xsl:template> <!-- legal-statement -->
|
@@ -2455,6 +2502,27 @@
|
|
2455
2502
|
<xsl:attribute-set name="sourcecode-container-style">
|
2456
2503
|
</xsl:attribute-set>
|
2457
2504
|
|
2505
|
+
<xsl:template name="refine_sourcecode-container-style">
|
2506
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
2507
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2508
|
+
</xsl:if>
|
2509
|
+
|
2510
|
+
<xsl:if test="ancestor::mn:example">
|
2511
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2512
|
+
</xsl:if>
|
2513
|
+
|
2514
|
+
<xsl:copy-of select="@id"/>
|
2515
|
+
|
2516
|
+
<xsl:if test="parent::mn:note">
|
2517
|
+
<xsl:attribute name="margin-left">
|
2518
|
+
<xsl:choose>
|
2519
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2520
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2521
|
+
</xsl:choose>
|
2522
|
+
</xsl:attribute>
|
2523
|
+
</xsl:if>
|
2524
|
+
</xsl:template>
|
2525
|
+
|
2458
2526
|
<xsl:attribute-set name="sourcecode-style">
|
2459
2527
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2460
2528
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -2475,6 +2543,9 @@
|
|
2475
2543
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2476
2544
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
2477
2545
|
|
2546
|
+
<xsl:template name="refine_sourcecode-name-style">
|
2547
|
+
</xsl:template>
|
2548
|
+
|
2478
2549
|
<xsl:template name="add-zero-spaces-equal">
|
2479
2550
|
<xsl:param name="text" select="."/>
|
2480
2551
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -2562,24 +2633,8 @@
|
|
2562
2633
|
<xsl:otherwise>
|
2563
2634
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
2564
2635
|
|
2565
|
-
<xsl:
|
2566
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2567
|
-
</xsl:if>
|
2568
|
-
|
2569
|
-
<xsl:if test="ancestor::mn:example">
|
2570
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2571
|
-
</xsl:if>
|
2572
|
-
|
2573
|
-
<xsl:copy-of select="@id"/>
|
2636
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
2574
2637
|
|
2575
|
-
<xsl:if test="parent::mn:note">
|
2576
|
-
<xsl:attribute name="margin-left">
|
2577
|
-
<xsl:choose>
|
2578
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2579
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2580
|
-
</xsl:choose>
|
2581
|
-
</xsl:attribute>
|
2582
|
-
</xsl:if>
|
2583
2638
|
<fo:block-container margin-left="0mm" role="SKIP">
|
2584
2639
|
|
2585
2640
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -2906,6 +2961,7 @@
|
|
2906
2961
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
2907
2962
|
<xsl:if test="normalize-space() != ''">
|
2908
2963
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
2964
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
2909
2965
|
<xsl:apply-templates/>
|
2910
2966
|
</fo:block>
|
2911
2967
|
</xsl:if>
|
@@ -2953,12 +3009,31 @@
|
|
2953
3009
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
2954
3010
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2955
3011
|
<xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
2956
|
-
</xsl:attribute-set>
|
3012
|
+
</xsl:attribute-set> <!-- pre-style -->
|
3013
|
+
|
3014
|
+
<xsl:template name="refine_pre-style">
|
3015
|
+
</xsl:template>
|
2957
3016
|
|
2958
3017
|
<xsl:attribute-set name="tt-style">
|
2959
3018
|
<xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
2960
3019
|
</xsl:attribute-set>
|
2961
3020
|
|
3021
|
+
<xsl:template name="refine_tt-style">
|
3022
|
+
<xsl:variable name="_font-size">10 <!-- inherit -->
|
3023
|
+
</xsl:variable>
|
3024
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3025
|
+
<xsl:if test="$font-size != ''">
|
3026
|
+
<xsl:attribute name="font-size">
|
3027
|
+
<xsl:choose>
|
3028
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3029
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3030
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3031
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3032
|
+
</xsl:choose>
|
3033
|
+
</xsl:attribute>
|
3034
|
+
</xsl:if>
|
3035
|
+
</xsl:template>
|
3036
|
+
|
2962
3037
|
<xsl:variable name="color-added-text">
|
2963
3038
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2964
3039
|
</xsl:variable>
|
@@ -2971,9 +3046,14 @@
|
|
2971
3046
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2972
3047
|
</xsl:attribute-set>
|
2973
3048
|
|
3049
|
+
<xsl:template name="refine_add-style">
|
3050
|
+
</xsl:template>
|
3051
|
+
|
2974
3052
|
<xsl:variable name="add-style">
|
2975
|
-
|
2976
|
-
|
3053
|
+
<add-style xsl:use-attribute-sets="add-style">
|
3054
|
+
<xsl:call-template name="refine_add-style"/>
|
3055
|
+
</add-style>
|
3056
|
+
</xsl:variable>
|
2977
3057
|
<xsl:template name="append_add-style">
|
2978
3058
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
2979
3059
|
</xsl:template>
|
@@ -2986,24 +3066,77 @@
|
|
2986
3066
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
2987
3067
|
</xsl:attribute-set>
|
2988
3068
|
|
3069
|
+
<xsl:template name="refine_del-style">
|
3070
|
+
</xsl:template>
|
3071
|
+
|
3072
|
+
<xsl:attribute-set name="strong-style">
|
3073
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3074
|
+
</xsl:attribute-set>
|
3075
|
+
|
3076
|
+
<xsl:template name="refine_strong_style">
|
3077
|
+
<xsl:if test="ancestor::*['preferred']">
|
3078
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3079
|
+
</xsl:if>
|
3080
|
+
</xsl:template> <!-- refine_strong_style -->
|
3081
|
+
|
3082
|
+
<xsl:attribute-set name="em-style">
|
3083
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
3084
|
+
</xsl:attribute-set>
|
3085
|
+
|
3086
|
+
<xsl:template name="refine_em_style">
|
3087
|
+
</xsl:template> <!-- refine_em_style -->
|
3088
|
+
|
3089
|
+
<xsl:attribute-set name="sup-style">
|
3090
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3091
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3092
|
+
</xsl:attribute-set>
|
3093
|
+
|
3094
|
+
<xsl:template name="refine_sup-style">
|
3095
|
+
</xsl:template>
|
3096
|
+
|
3097
|
+
<xsl:attribute-set name="sub-style">
|
3098
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3099
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
3100
|
+
</xsl:attribute-set>
|
3101
|
+
|
3102
|
+
<xsl:template name="refine_sub-style">
|
3103
|
+
</xsl:template>
|
3104
|
+
|
3105
|
+
<xsl:attribute-set name="underline-style">
|
3106
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3107
|
+
</xsl:attribute-set>
|
3108
|
+
|
3109
|
+
<xsl:template name="refine_underline-style">
|
3110
|
+
</xsl:template>
|
3111
|
+
|
3112
|
+
<xsl:attribute-set name="hi-style">
|
3113
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
3114
|
+
</xsl:attribute-set>
|
3115
|
+
|
3116
|
+
<xsl:template name="refine_hi-style">
|
3117
|
+
</xsl:template>
|
3118
|
+
|
3119
|
+
<xsl:attribute-set name="strike-style">
|
3120
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3121
|
+
</xsl:attribute-set>
|
3122
|
+
|
3123
|
+
<xsl:template name="refine_strike-style">
|
3124
|
+
</xsl:template>
|
3125
|
+
|
2989
3126
|
<xsl:template match="mn:br">
|
2990
3127
|
<xsl:value-of select="$linebreak"/>
|
2991
3128
|
</xsl:template>
|
2992
3129
|
|
2993
|
-
|
2994
|
-
<fo:inline
|
2995
|
-
<xsl:call-template name="
|
3130
|
+
<xsl:template match="mn:em">
|
3131
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
3132
|
+
<xsl:call-template name="refine_em_style"/>
|
2996
3133
|
<xsl:apply-templates/>
|
2997
3134
|
</fo:inline>
|
2998
3135
|
</xsl:template>
|
2999
3136
|
|
3000
|
-
<xsl:template name="refine_italic_style">
|
3001
|
-
</xsl:template>
|
3002
|
-
|
3003
3137
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
3004
3138
|
<xsl:param name="split_keep-within-line"/>
|
3005
|
-
<fo:inline
|
3006
|
-
|
3139
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
3007
3140
|
<xsl:call-template name="refine_strong_style"/>
|
3008
3141
|
|
3009
3142
|
<xsl:apply-templates>
|
@@ -3012,44 +3145,27 @@
|
|
3012
3145
|
</fo:inline>
|
3013
3146
|
</xsl:template>
|
3014
3147
|
|
3015
|
-
<xsl:template name="refine_strong_style">
|
3016
|
-
<xsl:if test="ancestor::*['preferred']">
|
3017
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3018
|
-
</xsl:if>
|
3019
|
-
</xsl:template>
|
3020
|
-
|
3021
3148
|
<xsl:template match="*[local-name()='padding']">
|
3022
3149
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
3023
3150
|
</xsl:template>
|
3024
3151
|
|
3025
3152
|
<xsl:template match="mn:sup">
|
3026
|
-
<fo:inline
|
3153
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
3154
|
+
<xsl:call-template name="refine_sup-style"/>
|
3027
3155
|
<xsl:apply-templates/>
|
3028
3156
|
</fo:inline>
|
3029
3157
|
</xsl:template>
|
3030
3158
|
|
3031
3159
|
<xsl:template match="mn:sub">
|
3032
|
-
<fo:inline
|
3160
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
3161
|
+
<xsl:call-template name="refine_sub-style"/>
|
3033
3162
|
<xsl:apply-templates/>
|
3034
3163
|
</fo:inline>
|
3035
3164
|
</xsl:template>
|
3036
3165
|
|
3037
3166
|
<xsl:template match="mn:tt">
|
3038
3167
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3039
|
-
|
3040
|
-
<xsl:variable name="_font-size">10 <!-- inherit -->
|
3041
|
-
</xsl:variable>
|
3042
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3043
|
-
<xsl:if test="$font-size != ''">
|
3044
|
-
<xsl:attribute name="font-size">
|
3045
|
-
<xsl:choose>
|
3046
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3047
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3048
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3049
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3050
|
-
</xsl:choose>
|
3051
|
-
</xsl:attribute>
|
3052
|
-
</xsl:if>
|
3168
|
+
<xsl:call-template name="refine_tt-style"/>
|
3053
3169
|
<xsl:apply-templates/>
|
3054
3170
|
</fo:inline>
|
3055
3171
|
</xsl:template> <!-- tt -->
|
@@ -3068,7 +3184,8 @@
|
|
3068
3184
|
</xsl:template>
|
3069
3185
|
|
3070
3186
|
<xsl:template match="mn:underline">
|
3071
|
-
<fo:inline
|
3187
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
3188
|
+
<xsl:call-template name="refine_underline-style"/>
|
3072
3189
|
<xsl:apply-templates/>
|
3073
3190
|
</fo:inline>
|
3074
3191
|
</xsl:template>
|
@@ -3226,6 +3343,7 @@
|
|
3226
3343
|
|
3227
3344
|
<xsl:template match="mn:del">
|
3228
3345
|
<fo:inline xsl:use-attribute-sets="del-style">
|
3346
|
+
<xsl:call-template name="refine_del-style"/>
|
3229
3347
|
<xsl:apply-templates/>
|
3230
3348
|
</fo:inline>
|
3231
3349
|
</xsl:template>
|
@@ -3235,7 +3353,8 @@
|
|
3235
3353
|
|
3236
3354
|
<!-- highlight text -->
|
3237
3355
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
3238
|
-
<fo:inline
|
3356
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
3357
|
+
<xsl:call-template name="refine_hi-style"/>
|
3239
3358
|
<xsl:apply-templates/>
|
3240
3359
|
</fo:inline>
|
3241
3360
|
</xsl:template>
|
@@ -3321,7 +3440,8 @@
|
|
3321
3440
|
</xsl:template>
|
3322
3441
|
|
3323
3442
|
<xsl:template match="mn:strike">
|
3324
|
-
<fo:inline
|
3443
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
3444
|
+
<xsl:call-template name="refine_strike-style"/>
|
3325
3445
|
<xsl:apply-templates/>
|
3326
3446
|
</fo:inline>
|
3327
3447
|
</xsl:template>
|
@@ -3349,7 +3469,7 @@
|
|
3349
3469
|
</xsl:otherwise>
|
3350
3470
|
</xsl:choose>
|
3351
3471
|
</xsl:variable>
|
3352
|
-
<xsl:if test="$key = 'font-family' or
|
3472
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
3353
3473
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3354
3474
|
</xsl:if>
|
3355
3475
|
<xsl:if test="$key = 'text-indent'">
|
@@ -3401,6 +3521,7 @@
|
|
3401
3521
|
|
3402
3522
|
<xsl:template match="mn:pre" name="pre">
|
3403
3523
|
<fo:block xsl:use-attribute-sets="pre-style">
|
3524
|
+
<xsl:call-template name="refine_pre-style"/>
|
3404
3525
|
<xsl:copy-of select="@id"/>
|
3405
3526
|
<xsl:choose>
|
3406
3527
|
|
@@ -3431,22 +3552,40 @@
|
|
3431
3552
|
<xsl:attribute-set name="permission-style">
|
3432
3553
|
</xsl:attribute-set>
|
3433
3554
|
|
3555
|
+
<xsl:template name="refine_permission-style">
|
3556
|
+
</xsl:template>
|
3557
|
+
|
3434
3558
|
<xsl:attribute-set name="permission-name-style">
|
3435
3559
|
</xsl:attribute-set>
|
3436
3560
|
|
3561
|
+
<xsl:template name="refine_permission-name-style">
|
3562
|
+
</xsl:template>
|
3563
|
+
|
3437
3564
|
<xsl:attribute-set name="permission-label-style">
|
3438
3565
|
</xsl:attribute-set>
|
3439
3566
|
|
3567
|
+
<xsl:template name="refine_permission-label-style">
|
3568
|
+
</xsl:template>
|
3569
|
+
|
3440
3570
|
<xsl:attribute-set name="requirement-style">
|
3441
3571
|
</xsl:attribute-set>
|
3442
3572
|
|
3573
|
+
<xsl:template name="refine_requirement-style">
|
3574
|
+
</xsl:template>
|
3575
|
+
|
3443
3576
|
<xsl:attribute-set name="requirement-name-style">
|
3444
3577
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3445
3578
|
</xsl:attribute-set>
|
3446
3579
|
|
3580
|
+
<xsl:template name="refine_requirement-name-style">
|
3581
|
+
</xsl:template>
|
3582
|
+
|
3447
3583
|
<xsl:attribute-set name="requirement-label-style">
|
3448
3584
|
</xsl:attribute-set>
|
3449
3585
|
|
3586
|
+
<xsl:template name="refine_requirement-label-style">
|
3587
|
+
</xsl:template>
|
3588
|
+
|
3450
3589
|
<xsl:attribute-set name="subject-style">
|
3451
3590
|
</xsl:attribute-set>
|
3452
3591
|
|
@@ -3474,18 +3613,28 @@
|
|
3474
3613
|
<xsl:attribute-set name="recommendation-style">
|
3475
3614
|
</xsl:attribute-set>
|
3476
3615
|
|
3616
|
+
<xsl:template name="refine_recommendation-style">
|
3617
|
+
</xsl:template>
|
3618
|
+
|
3477
3619
|
<xsl:attribute-set name="recommendation-name-style">
|
3478
3620
|
</xsl:attribute-set>
|
3479
3621
|
|
3622
|
+
<xsl:template name="refine_recommendation-name-style">
|
3623
|
+
</xsl:template>
|
3624
|
+
|
3480
3625
|
<xsl:attribute-set name="recommendation-label-style">
|
3481
3626
|
</xsl:attribute-set>
|
3482
3627
|
|
3628
|
+
<xsl:template name="refine_recommendation-label-style">
|
3629
|
+
</xsl:template>
|
3630
|
+
|
3483
3631
|
<!-- ========== -->
|
3484
3632
|
<!-- permission -->
|
3485
3633
|
<!-- ========== -->
|
3486
3634
|
<xsl:template match="mn:permission">
|
3487
3635
|
<xsl:call-template name="setNamedDestination"/>
|
3488
3636
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
3637
|
+
<xsl:call-template name="refine_permission-style"/>
|
3489
3638
|
<xsl:apply-templates select="mn:fmt-name"/>
|
3490
3639
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3491
3640
|
</fo:block>
|
@@ -3494,6 +3643,7 @@
|
|
3494
3643
|
<xsl:template match="mn:permission/mn:fmt-name">
|
3495
3644
|
<xsl:if test="normalize-space() != ''">
|
3496
3645
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
3646
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
3497
3647
|
<xsl:apply-templates/>
|
3498
3648
|
</fo:block>
|
3499
3649
|
</xsl:if>
|
@@ -3501,6 +3651,7 @@
|
|
3501
3651
|
|
3502
3652
|
<xsl:template match="mn:permission/mn:label">
|
3503
3653
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
3654
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
3504
3655
|
<xsl:apply-templates/>
|
3505
3656
|
</fo:block>
|
3506
3657
|
</xsl:template>
|
@@ -3513,6 +3664,7 @@
|
|
3513
3664
|
<xsl:template match="mn:requirement">
|
3514
3665
|
<xsl:call-template name="setNamedDestination"/>
|
3515
3666
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
3667
|
+
<xsl:call-template name="refine_requirement-style"/>
|
3516
3668
|
<xsl:apply-templates select="mn:fmt-name"/>
|
3517
3669
|
<xsl:apply-templates select="mn:label"/>
|
3518
3670
|
<xsl:apply-templates select="@obligation"/>
|
@@ -3525,6 +3677,7 @@
|
|
3525
3677
|
<xsl:if test="normalize-space() != ''">
|
3526
3678
|
|
3527
3679
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
3680
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
3528
3681
|
<xsl:apply-templates/>
|
3529
3682
|
</fo:block>
|
3530
3683
|
</xsl:if>
|
@@ -3532,6 +3685,7 @@
|
|
3532
3685
|
|
3533
3686
|
<xsl:template match="mn:requirement/mn:label">
|
3534
3687
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
3688
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
3535
3689
|
<xsl:apply-templates/>
|
3536
3690
|
</fo:block>
|
3537
3691
|
</xsl:template>
|
@@ -3557,6 +3711,7 @@
|
|
3557
3711
|
<xsl:template match="mn:recommendation">
|
3558
3712
|
<xsl:call-template name="setNamedDestination"/>
|
3559
3713
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
3714
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
3560
3715
|
<xsl:apply-templates select="mn:fmt-name"/>
|
3561
3716
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3562
3717
|
</fo:block>
|
@@ -3566,6 +3721,7 @@
|
|
3566
3721
|
<xsl:if test="normalize-space() != ''">
|
3567
3722
|
|
3568
3723
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
3724
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
3569
3725
|
<xsl:apply-templates/>
|
3570
3726
|
</fo:block>
|
3571
3727
|
</xsl:if>
|
@@ -3573,6 +3729,7 @@
|
|
3573
3729
|
|
3574
3730
|
<xsl:template match="mn:recommendation/mn:label">
|
3575
3731
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3732
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
3576
3733
|
<xsl:apply-templates/>
|
3577
3734
|
</fo:block>
|
3578
3735
|
</xsl:template>
|
@@ -3753,36 +3910,66 @@
|
|
3753
3910
|
<xsl:attribute-set name="term-style">
|
3754
3911
|
</xsl:attribute-set> <!-- term-style -->
|
3755
3912
|
|
3913
|
+
<xsl:template name="refine_term-style">
|
3914
|
+
</xsl:template>
|
3915
|
+
|
3756
3916
|
<xsl:attribute-set name="term-name-style">
|
3757
3917
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3758
3918
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3759
3919
|
</xsl:attribute-set> <!-- term-name-style -->
|
3760
3920
|
|
3761
|
-
|
3921
|
+
<xsl:template name="refine_term-name-style">
|
3922
|
+
</xsl:template>
|
3923
|
+
|
3924
|
+
<xsl:attribute-set name="preferred-block-style">
|
3762
3925
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
3763
3926
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
3764
3927
|
|
3928
|
+
<xsl:template name="refine_preferred-block-style">
|
3929
|
+
</xsl:template>
|
3930
|
+
|
3765
3931
|
<xsl:attribute-set name="preferred-term-style">
|
3766
3932
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3767
3933
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3768
3934
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
3769
3935
|
|
3936
|
+
<xsl:template name="refine_preferred-term-style">
|
3937
|
+
<xsl:if test="mn:strong">
|
3938
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
3939
|
+
</xsl:if>
|
3940
|
+
</xsl:template>
|
3941
|
+
|
3770
3942
|
<xsl:attribute-set name="domain-style">
|
3771
3943
|
</xsl:attribute-set> <!-- domain-style -->
|
3772
3944
|
|
3945
|
+
<xsl:template name="refine_domain-style">
|
3946
|
+
</xsl:template>
|
3947
|
+
|
3773
3948
|
<xsl:attribute-set name="admitted-style">
|
3774
3949
|
</xsl:attribute-set> <!-- admitted-style -->
|
3775
3950
|
|
3951
|
+
<xsl:template name="refine_admitted-style">
|
3952
|
+
</xsl:template>
|
3953
|
+
|
3776
3954
|
<xsl:attribute-set name="deprecates-style">
|
3777
3955
|
</xsl:attribute-set> <!-- deprecates-style -->
|
3778
3956
|
|
3957
|
+
<xsl:template name="refine_deprecates-style">
|
3958
|
+
</xsl:template>
|
3959
|
+
|
3779
3960
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
3780
3961
|
</xsl:attribute-set>
|
3781
3962
|
|
3963
|
+
<xsl:template name="refine_related-block-style">
|
3964
|
+
</xsl:template>
|
3965
|
+
|
3782
3966
|
<xsl:attribute-set name="definition-style">
|
3783
3967
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3784
3968
|
</xsl:attribute-set> <!-- definition-style -->
|
3785
3969
|
|
3970
|
+
<xsl:template name="refine_definition-style">
|
3971
|
+
</xsl:template>
|
3972
|
+
|
3786
3973
|
<xsl:attribute-set name="termsource-style">
|
3787
3974
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
3788
3975
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
@@ -3794,9 +3981,15 @@
|
|
3794
3981
|
<xsl:attribute-set name="termsource-text-style">
|
3795
3982
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
3796
3983
|
|
3984
|
+
<xsl:template name="refine_termsource-text-style">
|
3985
|
+
</xsl:template>
|
3986
|
+
|
3797
3987
|
<xsl:attribute-set name="origin-style">
|
3798
3988
|
</xsl:attribute-set> <!-- origin-style -->
|
3799
3989
|
|
3990
|
+
<xsl:template name="refine_origin-style">
|
3991
|
+
</xsl:template>
|
3992
|
+
|
3800
3993
|
<!-- ====== -->
|
3801
3994
|
<!-- term -->
|
3802
3995
|
<!-- ====== -->
|
@@ -3812,9 +4005,8 @@
|
|
3812
4005
|
<xsl:template match="mn:term">
|
3813
4006
|
<xsl:call-template name="setNamedDestination"/>
|
3814
4007
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
4008
|
+
<xsl:call-template name="refine_term-style"/>
|
3815
4009
|
|
3816
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
3817
|
-
</xsl:if>
|
3818
4010
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3819
4011
|
</fo:block>
|
3820
4012
|
</xsl:template>
|
@@ -3890,6 +4082,7 @@
|
|
3890
4082
|
<!-- text SOURCE: -->
|
3891
4083
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
3892
4084
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4085
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
3893
4086
|
<xsl:value-of select="."/>
|
3894
4087
|
</fo:inline>
|
3895
4088
|
</xsl:template>
|
@@ -3902,6 +4095,7 @@
|
|
3902
4095
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
3903
4096
|
</xsl:if>
|
3904
4097
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4098
|
+
<xsl:call-template name="refine_origin-style"/>
|
3905
4099
|
<xsl:apply-templates/>
|
3906
4100
|
</fo:inline>
|
3907
4101
|
</fo:basic-link>
|
@@ -3956,9 +4150,12 @@
|
|
3956
4150
|
</xsl:variable>
|
3957
4151
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
3958
4152
|
|
4153
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
4154
|
+
|
3959
4155
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
3960
4156
|
|
3961
4157
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
4158
|
+
<xsl:call-template name="refine_term-name-style"/>
|
3962
4159
|
|
3963
4160
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
3964
4161
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -3969,7 +4166,7 @@
|
|
3969
4166
|
</xsl:if>
|
3970
4167
|
|
3971
4168
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
3972
|
-
<xsl:call-template name="
|
4169
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
3973
4170
|
|
3974
4171
|
<xsl:apply-templates/>
|
3975
4172
|
</fo:block>
|
@@ -3990,22 +4187,18 @@
|
|
3990
4187
|
|
3991
4188
|
<xsl:template match="mn:fmt-admitted">
|
3992
4189
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
4190
|
+
<xsl:call-template name="refine_admitted-style"/>
|
3993
4191
|
<xsl:apply-templates/>
|
3994
4192
|
</fo:block>
|
3995
4193
|
</xsl:template>
|
3996
4194
|
|
3997
4195
|
<xsl:template match="mn:fmt-deprecates">
|
3998
4196
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4197
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
3999
4198
|
<xsl:apply-templates/>
|
4000
4199
|
</fo:block>
|
4001
4200
|
</xsl:template>
|
4002
4201
|
|
4003
|
-
<xsl:template name="setStyle_preferred">
|
4004
|
-
<xsl:if test="mn:strong">
|
4005
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4006
|
-
</xsl:if>
|
4007
|
-
</xsl:template>
|
4008
|
-
|
4009
4202
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
4010
4203
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
4011
4204
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -4015,6 +4208,7 @@
|
|
4015
4208
|
|
4016
4209
|
<xsl:template match="mn:fmt-related">
|
4017
4210
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
4211
|
+
<xsl:call-template name="refine_related-block-style"/>
|
4018
4212
|
<xsl:apply-templates/>
|
4019
4213
|
</fo:block>
|
4020
4214
|
</xsl:template>
|
@@ -4029,6 +4223,7 @@
|
|
4029
4223
|
<!-- ========== -->
|
4030
4224
|
<xsl:template match="mn:fmt-definition">
|
4031
4225
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
4226
|
+
<xsl:call-template name="refine_definition-style"/>
|
4032
4227
|
<xsl:apply-templates/>
|
4033
4228
|
</fo:block>
|
4034
4229
|
</xsl:template>
|
@@ -4077,6 +4272,9 @@
|
|
4077
4272
|
<xsl:attribute name="margin-left">12.5mm</xsl:attribute>
|
4078
4273
|
</xsl:attribute-set> <!-- example-body-style -->
|
4079
4274
|
|
4275
|
+
<xsl:template name="refine_example-body-style">
|
4276
|
+
</xsl:template>
|
4277
|
+
|
4080
4278
|
<xsl:attribute-set name="example-name-style">
|
4081
4279
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4082
4280
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -4125,6 +4323,8 @@
|
|
4125
4323
|
<xsl:when test="contains($element, 'block')">
|
4126
4324
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
4127
4325
|
|
4326
|
+
<xsl:call-template name="refine_example-p-style"/>
|
4327
|
+
|
4128
4328
|
<xsl:apply-templates/>
|
4129
4329
|
</fo:block>
|
4130
4330
|
</xsl:when>
|
@@ -4176,6 +4376,7 @@
|
|
4176
4376
|
</fo:block>
|
4177
4377
|
|
4178
4378
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4379
|
+
<xsl:call-template name="refine_example-body-style"/>
|
4179
4380
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4180
4381
|
<xsl:variable name="example_body">
|
4181
4382
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -4238,6 +4439,7 @@
|
|
4238
4439
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
4239
4440
|
<!-- display further elements in blocks -->
|
4240
4441
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4442
|
+
<xsl:call-template name="refine_example-body-style"/>
|
4241
4443
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4242
4444
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
4243
4445
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -4467,6 +4669,9 @@
|
|
4467
4669
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
4468
4670
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4469
4671
|
|
4672
|
+
<xsl:template name="refine_table-fn-number-style">
|
4673
|
+
</xsl:template>
|
4674
|
+
|
4470
4675
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
4471
4676
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4472
4677
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -4475,30 +4680,12 @@
|
|
4475
4680
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
4476
4681
|
</xsl:template>
|
4477
4682
|
|
4478
|
-
<xsl:attribute-set name="fn-container-body-style">
|
4479
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
4480
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
4481
|
-
</xsl:attribute-set>
|
4482
|
-
|
4483
4683
|
<xsl:attribute-set name="table-fn-body-style">
|
4484
4684
|
</xsl:attribute-set>
|
4485
4685
|
|
4486
|
-
<xsl:
|
4487
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
4488
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
4489
|
-
|
4490
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
4491
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4492
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4493
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
4494
|
-
|
4495
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
4686
|
+
<xsl:template name="refine_table-fn-body-style">
|
4496
4687
|
</xsl:template>
|
4497
4688
|
|
4498
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
4499
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
4500
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4501
|
-
</xsl:attribute-set>
|
4502
4689
|
<!-- ========================== -->
|
4503
4690
|
<!-- END Table styles -->
|
4504
4691
|
<!-- ========================== -->
|
@@ -5776,6 +5963,7 @@
|
|
5776
5963
|
</xsl:apply-templates>
|
5777
5964
|
|
5778
5965
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
5966
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
5779
5967
|
<!-- <xsl:copy-of select="./node()"/> -->
|
5780
5968
|
<xsl:apply-templates/>
|
5781
5969
|
</fo:inline>
|
@@ -5794,6 +5982,7 @@
|
|
5794
5982
|
<xsl:param name="process">false</xsl:param>
|
5795
5983
|
<xsl:if test="$process = 'true'">
|
5796
5984
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
5985
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
5797
5986
|
|
5798
5987
|
<!-- tab is padding-right -->
|
5799
5988
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -6665,9 +6854,18 @@
|
|
6665
6854
|
<xsl:attribute-set name="dl-block-style">
|
6666
6855
|
</xsl:attribute-set>
|
6667
6856
|
|
6857
|
+
<xsl:template name="refine_dl-block-style">
|
6858
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
6859
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
6860
|
+
</xsl:if>
|
6861
|
+
</xsl:template>
|
6862
|
+
|
6668
6863
|
<xsl:attribute-set name="dt-row-style">
|
6669
6864
|
</xsl:attribute-set>
|
6670
6865
|
|
6866
|
+
<xsl:template name="refine_dt-row-style">
|
6867
|
+
</xsl:template>
|
6868
|
+
|
6671
6869
|
<xsl:attribute-set name="dt-cell-style">
|
6672
6870
|
</xsl:attribute-set>
|
6673
6871
|
|
@@ -6688,6 +6886,9 @@
|
|
6688
6886
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
6689
6887
|
</xsl:attribute-set> <!-- dl-name-style -->
|
6690
6888
|
|
6889
|
+
<xsl:template name="refine_dl-name-style">
|
6890
|
+
</xsl:template>
|
6891
|
+
|
6691
6892
|
<xsl:attribute-set name="dd-cell-style">
|
6692
6893
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
6693
6894
|
</xsl:attribute-set>
|
@@ -6726,9 +6927,7 @@
|
|
6726
6927
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6727
6928
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
6728
6929
|
|
6729
|
-
<xsl:
|
6730
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
6731
|
-
</xsl:if>
|
6930
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
6732
6931
|
|
6733
6932
|
<xsl:call-template name="setBlockSpanAll"/>
|
6734
6933
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -7024,6 +7223,8 @@
|
|
7024
7223
|
<xsl:if test="$process = 'true'">
|
7025
7224
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
7026
7225
|
|
7226
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
7227
|
+
|
7027
7228
|
<xsl:apply-templates/>
|
7028
7229
|
</fo:block>
|
7029
7230
|
</xsl:if>
|
@@ -7212,6 +7413,8 @@
|
|
7212
7413
|
<xsl:param name="split_keep-within-line"/>
|
7213
7414
|
|
7214
7415
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
7416
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
7417
|
+
|
7215
7418
|
<xsl:call-template name="insert_dt_cell">
|
7216
7419
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
7217
7420
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -7425,18 +7628,25 @@
|
|
7425
7628
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7426
7629
|
</xsl:attribute-set>
|
7427
7630
|
|
7631
|
+
<xsl:template name="refine_appendix-style">
|
7632
|
+
</xsl:template>
|
7633
|
+
|
7428
7634
|
<xsl:attribute-set name="appendix-example-style">
|
7429
7635
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7430
7636
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
7431
7637
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
7432
7638
|
</xsl:attribute-set>
|
7433
7639
|
|
7640
|
+
<xsl:template name="refine_appendix-example-style">
|
7641
|
+
</xsl:template>
|
7642
|
+
|
7434
7643
|
<!-- ======================== -->
|
7435
7644
|
<!-- Appendix processing -->
|
7436
7645
|
<!-- ======================== -->
|
7437
7646
|
<xsl:template match="mn:appendix">
|
7438
7647
|
<xsl:call-template name="setNamedDestination"/>
|
7439
7648
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
7649
|
+
<xsl:call-template name="refine_appendix-style"/>
|
7440
7650
|
<xsl:apply-templates select="mn:fmt-title"/>
|
7441
7651
|
</fo:block>
|
7442
7652
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -7455,13 +7665,23 @@
|
|
7455
7665
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
7456
7666
|
<xsl:call-template name="setNamedDestination"/>
|
7457
7667
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
7668
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
7458
7669
|
<xsl:apply-templates select="mn:fmt-name"/>
|
7459
7670
|
</fo:block>
|
7460
7671
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
7461
7672
|
</xsl:template>
|
7462
7673
|
|
7463
7674
|
<xsl:attribute-set name="xref-style">
|
7464
|
-
</xsl:attribute-set>
|
7675
|
+
</xsl:attribute-set> <!-- xref-style -->
|
7676
|
+
|
7677
|
+
<xsl:template name="refine_xref-style">
|
7678
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
|
7679
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7680
|
+
</xsl:if>
|
7681
|
+
<xsl:if test="parent::mn:add">
|
7682
|
+
<xsl:call-template name="append_add-style"/>
|
7683
|
+
</xsl:if>
|
7684
|
+
</xsl:template> <!-- refine_xref-style -->
|
7465
7685
|
|
7466
7686
|
<xsl:template match="mn:fmt-xref">
|
7467
7687
|
<xsl:call-template name="insert_basic_link">
|
@@ -7470,12 +7690,8 @@
|
|
7470
7690
|
<xsl:call-template name="getAltText"/>
|
7471
7691
|
</xsl:variable>
|
7472
7692
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
7473
|
-
<xsl:
|
7474
|
-
|
7475
|
-
</xsl:if>
|
7476
|
-
<xsl:if test="parent::mn:add">
|
7477
|
-
<xsl:call-template name="append_add-style"/>
|
7478
|
-
</xsl:if>
|
7693
|
+
<xsl:call-template name="refine_xref-style"/>
|
7694
|
+
|
7479
7695
|
<xsl:apply-templates/>
|
7480
7696
|
</fo:basic-link>
|
7481
7697
|
</xsl:with-param>
|
@@ -7588,17 +7804,17 @@
|
|
7588
7804
|
<xsl:attribute-set name="note-style">
|
7589
7805
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7590
7806
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7591
|
-
</xsl:attribute-set>
|
7807
|
+
</xsl:attribute-set> <!-- note-style -->
|
7592
7808
|
|
7593
7809
|
<xsl:template name="refine_note-style">
|
7594
|
-
</xsl:template>
|
7810
|
+
</xsl:template> <!-- refine_note-style -->
|
7595
7811
|
|
7596
7812
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
7597
7813
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
7598
7814
|
|
7599
7815
|
<xsl:attribute-set name="note-name-style">
|
7600
7816
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
7601
|
-
</xsl:attribute-set>
|
7817
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
7602
7818
|
|
7603
7819
|
<xsl:template name="refine_note-name-style">
|
7604
7820
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -7612,18 +7828,21 @@
|
|
7612
7828
|
|
7613
7829
|
<xsl:attribute-set name="note-p-style">
|
7614
7830
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7615
|
-
</xsl:attribute-set>
|
7831
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
7832
|
+
|
7833
|
+
<xsl:template name="refine_note-p-style">
|
7834
|
+
</xsl:template>
|
7616
7835
|
|
7617
7836
|
<xsl:attribute-set name="termnote-style">
|
7618
7837
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7619
7838
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7620
|
-
</xsl:attribute-set>
|
7839
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
7621
7840
|
|
7622
7841
|
<xsl:template name="refine_termnote-style">
|
7623
7842
|
</xsl:template> <!-- refine_termnote-style -->
|
7624
7843
|
|
7625
7844
|
<xsl:attribute-set name="termnote-name-style">
|
7626
|
-
</xsl:attribute-set>
|
7845
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
7627
7846
|
|
7628
7847
|
<xsl:template name="refine_termnote-name-style">
|
7629
7848
|
</xsl:template>
|
@@ -7631,6 +7850,9 @@
|
|
7631
7850
|
<xsl:attribute-set name="termnote-p-style">
|
7632
7851
|
</xsl:attribute-set>
|
7633
7852
|
|
7853
|
+
<xsl:template name="refine_termnote-p-style">
|
7854
|
+
</xsl:template>
|
7855
|
+
|
7634
7856
|
<!-- ====== -->
|
7635
7857
|
<!-- note -->
|
7636
7858
|
<!-- termnote -->
|
@@ -7691,11 +7913,13 @@
|
|
7691
7913
|
<xsl:choose>
|
7692
7914
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
7693
7915
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
7916
|
+
<xsl:call-template name="refine_note-p-style"/>
|
7694
7917
|
<xsl:apply-templates/>
|
7695
7918
|
</fo:inline>
|
7696
7919
|
</xsl:when>
|
7697
7920
|
<xsl:otherwise>
|
7698
7921
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
7922
|
+
<xsl:call-template name="refine_note-p-style"/>
|
7699
7923
|
<xsl:apply-templates/>
|
7700
7924
|
</fo:block>
|
7701
7925
|
</xsl:otherwise>
|
@@ -7787,11 +8011,13 @@
|
|
7787
8011
|
<xsl:choose>
|
7788
8012
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
7789
8013
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
8014
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
7790
8015
|
<xsl:apply-templates/>
|
7791
8016
|
</fo:inline>
|
7792
8017
|
</xsl:when>
|
7793
8018
|
<xsl:otherwise>
|
7794
8019
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
8020
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
7795
8021
|
<xsl:apply-templates/>
|
7796
8022
|
</fo:block>
|
7797
8023
|
</xsl:otherwise>
|
@@ -7805,7 +8031,7 @@
|
|
7805
8031
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
7806
8032
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
7807
8033
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
7808
|
-
</xsl:attribute-set>
|
8034
|
+
</xsl:attribute-set> <!-- quote-style -->
|
7809
8035
|
|
7810
8036
|
<xsl:template name="refine_quote-style">
|
7811
8037
|
</xsl:template>
|
@@ -7814,6 +8040,9 @@
|
|
7814
8040
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
7815
8041
|
</xsl:attribute-set>
|
7816
8042
|
|
8043
|
+
<xsl:template name="refine_quote-source-style">
|
8044
|
+
</xsl:template>
|
8045
|
+
|
7817
8046
|
<!-- ====== -->
|
7818
8047
|
<!-- quote -->
|
7819
8048
|
<!-- source -->
|
@@ -7842,6 +8071,7 @@
|
|
7842
8071
|
</fo:block-container>
|
7843
8072
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
7844
8073
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
8074
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
7845
8075
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
7846
8076
|
<xsl:apply-templates select="mn:author"/>
|
7847
8077
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -7904,6 +8134,9 @@
|
|
7904
8134
|
<xsl:attribute-set name="figure-style">
|
7905
8135
|
</xsl:attribute-set>
|
7906
8136
|
|
8137
|
+
<xsl:template name="refine_figure-style">
|
8138
|
+
</xsl:template>
|
8139
|
+
|
7907
8140
|
<xsl:attribute-set name="figure-name-style">
|
7908
8141
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
7909
8142
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -7911,7 +8144,7 @@
|
|
7911
8144
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
7912
8145
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
7913
8146
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
7914
|
-
</xsl:attribute-set>
|
8147
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
7915
8148
|
|
7916
8149
|
<xsl:template name="refine_figure-name-style">
|
7917
8150
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -7919,7 +8152,7 @@
|
|
7919
8152
|
<xsl:attribute-set name="image-style">
|
7920
8153
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
7921
8154
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
7922
|
-
</xsl:attribute-set>
|
8155
|
+
</xsl:attribute-set> <!-- image-style -->
|
7923
8156
|
|
7924
8157
|
<xsl:template name="refine_image-style">
|
7925
8158
|
</xsl:template>
|
@@ -7929,14 +8162,51 @@
|
|
7929
8162
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7930
8163
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7931
8164
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
7932
|
-
</xsl:attribute-set>
|
8165
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
8166
|
+
|
8167
|
+
<xsl:template name="refine_image-graphic-style">
|
8168
|
+
</xsl:template>
|
7933
8169
|
|
7934
8170
|
<xsl:attribute-set name="figure-source-style">
|
7935
8171
|
</xsl:attribute-set>
|
7936
8172
|
|
8173
|
+
<xsl:template name="refine_figure-source-style">
|
8174
|
+
</xsl:template>
|
8175
|
+
|
7937
8176
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
7938
8177
|
</xsl:attribute-set>
|
7939
8178
|
|
8179
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
8180
|
+
</xsl:template>
|
8181
|
+
|
8182
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
8183
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
8184
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
8185
|
+
|
8186
|
+
<xsl:template name="refine_figure-fn-number-style">
|
8187
|
+
</xsl:template>
|
8188
|
+
|
8189
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
8190
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
8191
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
8192
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
8193
|
+
|
8194
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
8195
|
+
</xsl:template>
|
8196
|
+
|
8197
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
8198
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
8199
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8200
|
+
</xsl:attribute-set>
|
8201
|
+
|
8202
|
+
<xsl:template name="refine_figure-fn-body-style">
|
8203
|
+
<xsl:variable name="key_iso">
|
8204
|
+
</xsl:variable>
|
8205
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
8206
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
8207
|
+
</xsl:if>
|
8208
|
+
</xsl:template>
|
8209
|
+
|
7940
8210
|
<!-- ============================ -->
|
7941
8211
|
<!-- figure's footnotes rendering -->
|
7942
8212
|
<!-- ============================ -->
|
@@ -8049,9 +8319,8 @@
|
|
8049
8319
|
</fo:table-cell>
|
8050
8320
|
<fo:table-cell>
|
8051
8321
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
8052
|
-
<xsl:
|
8053
|
-
|
8054
|
-
</xsl:if>
|
8322
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
8323
|
+
|
8055
8324
|
<!-- <xsl:copy-of select="./node()"/> -->
|
8056
8325
|
<xsl:apply-templates/>
|
8057
8326
|
</fo:block>
|
@@ -8069,6 +8338,7 @@
|
|
8069
8338
|
<xsl:param name="process">false</xsl:param>
|
8070
8339
|
<xsl:if test="$process = 'true'">
|
8071
8340
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
8341
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
8072
8342
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
8073
8343
|
|
8074
8344
|
<!-- tab is padding-right -->
|
@@ -8106,6 +8376,7 @@
|
|
8106
8376
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
8107
8377
|
</xsl:if>
|
8108
8378
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
8379
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
8109
8380
|
<!-- <xsl:value-of select="@reference"/> -->
|
8110
8381
|
<xsl:apply-templates/>
|
8111
8382
|
</fo:inline>
|
@@ -8151,6 +8422,8 @@
|
|
8151
8422
|
|
8152
8423
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8153
8424
|
|
8425
|
+
<xsl:call-template name="refine_figure-style"/>
|
8426
|
+
|
8154
8427
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
8155
8428
|
<xsl:call-template name="setIDforNamedDestination"/>
|
8156
8429
|
</xsl:for-each>
|
@@ -8194,6 +8467,7 @@
|
|
8194
8467
|
|
8195
8468
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
8196
8469
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
8470
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
8197
8471
|
<xsl:apply-templates/>
|
8198
8472
|
</fo:block>
|
8199
8473
|
</xsl:template>
|
@@ -8323,6 +8597,8 @@
|
|
8323
8597
|
</xsl:variable>
|
8324
8598
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
8325
8599
|
|
8600
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
8601
|
+
|
8326
8602
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
8327
8603
|
<xsl:variable name="scale">
|
8328
8604
|
<xsl:call-template name="getImageScale">
|
@@ -9022,6 +9298,9 @@
|
|
9022
9298
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9023
9299
|
</xsl:attribute-set> <!-- formula-style -->
|
9024
9300
|
|
9301
|
+
<xsl:template name="refine_formula-style">
|
9302
|
+
</xsl:template>
|
9303
|
+
|
9025
9304
|
<xsl:attribute-set name="formula-stem-block-style">
|
9026
9305
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
9027
9306
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -9092,6 +9371,8 @@
|
|
9092
9371
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
9093
9372
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9094
9373
|
|
9374
|
+
<xsl:call-template name="refine_formula-style"/>
|
9375
|
+
|
9095
9376
|
<fo:table table-layout="fixed" width="100%">
|
9096
9377
|
<fo:table-column column-width="95%"/>
|
9097
9378
|
<fo:table-column column-width="5%"/>
|
@@ -9515,6 +9796,9 @@
|
|
9515
9796
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9516
9797
|
</xsl:attribute-set> <!-- list-name-style -->
|
9517
9798
|
|
9799
|
+
<xsl:template name="refine_list-name-style">
|
9800
|
+
</xsl:template>
|
9801
|
+
|
9518
9802
|
<xsl:attribute-set name="list-item-style">
|
9519
9803
|
</xsl:attribute-set>
|
9520
9804
|
|
@@ -9811,6 +10095,7 @@
|
|
9811
10095
|
<xsl:param name="process">false</xsl:param>
|
9812
10096
|
<xsl:if test="$process = 'true'">
|
9813
10097
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
10098
|
+
<xsl:call-template name="refine_list-name-style"/>
|
9814
10099
|
<xsl:apply-templates/>
|
9815
10100
|
</fo:block>
|
9816
10101
|
</xsl:if>
|
@@ -9871,24 +10156,45 @@
|
|
9871
10156
|
<!-- END Lists processing -->
|
9872
10157
|
<!-- ===================================== -->
|
9873
10158
|
|
10159
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
10160
|
+
</xsl:attribute-set>
|
10161
|
+
|
10162
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
10163
|
+
</xsl:template>
|
10164
|
+
|
10165
|
+
<xsl:attribute-set name="fn-container-body-style">
|
10166
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
10167
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
10168
|
+
</xsl:attribute-set>
|
10169
|
+
|
10170
|
+
<xsl:template name="refine_fn-container-body-style">
|
10171
|
+
</xsl:template>
|
10172
|
+
|
9874
10173
|
<xsl:attribute-set name="fn-reference-style">
|
9875
10174
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
9876
10175
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
9877
|
-
|
9878
|
-
</xsl:attribute-set>
|
10176
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
9879
10177
|
|
9880
10178
|
<xsl:template name="refine_fn-reference-style">
|
10179
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
10180
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
9881
10181
|
</xsl:template> <!-- refine_fn-reference-style -->
|
9882
10182
|
|
9883
10183
|
<xsl:attribute-set name="fn-style">
|
9884
10184
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
9885
10185
|
</xsl:attribute-set>
|
9886
10186
|
|
10187
|
+
<xsl:template name="refine_fn-style">
|
10188
|
+
</xsl:template>
|
10189
|
+
|
9887
10190
|
<xsl:attribute-set name="fn-num-style">
|
9888
10191
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
9889
10192
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
9890
10193
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
9891
|
-
</xsl:attribute-set>
|
10194
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
10195
|
+
|
10196
|
+
<xsl:template name="refine_fn-num-style">
|
10197
|
+
</xsl:template>
|
9892
10198
|
|
9893
10199
|
<xsl:attribute-set name="fn-body-style">
|
9894
10200
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -9897,7 +10203,7 @@
|
|
9897
10203
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
9898
10204
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
9899
10205
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9900
|
-
</xsl:attribute-set>
|
10206
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
9901
10207
|
|
9902
10208
|
<xsl:template name="refine_fn-body-style">
|
9903
10209
|
</xsl:template> <!-- refine_fn-body-style -->
|
@@ -9961,10 +10267,12 @@
|
|
9961
10267
|
<xsl:choose>
|
9962
10268
|
<xsl:when test="ancestor::mn:bibitem">
|
9963
10269
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
10270
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
9964
10271
|
</fn_styles>
|
9965
10272
|
</xsl:when>
|
9966
10273
|
<xsl:otherwise>
|
9967
10274
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
10275
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
9968
10276
|
</fn_styles>
|
9969
10277
|
</xsl:otherwise>
|
9970
10278
|
</xsl:choose>
|
@@ -9974,9 +10282,12 @@
|
|
9974
10282
|
<xsl:copy-of select="."/>
|
9975
10283
|
</xsl:for-each>
|
9976
10284
|
|
9977
|
-
|
10285
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
10286
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
9978
10287
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
9979
|
-
</xsl:if>
|
10288
|
+
</xsl:if> -->
|
10289
|
+
|
10290
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
9980
10291
|
|
9981
10292
|
<xsl:call-template name="insert_basic_link">
|
9982
10293
|
<xsl:with-param name="element">
|
@@ -9999,10 +10310,12 @@
|
|
9999
10310
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
10000
10311
|
|
10001
10312
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
10313
|
+
<xsl:call-template name="refine_fn-style"/>
|
10002
10314
|
<xsl:copy-of select="$footnote_inline"/>
|
10003
10315
|
<fo:footnote-body role="Note">
|
10004
10316
|
|
10005
10317
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
10318
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
10006
10319
|
|
10007
10320
|
<xsl:variable name="fn_block">
|
10008
10321
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -10101,17 +10414,30 @@
|
|
10101
10414
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
10102
10415
|
</xsl:attribute-set> <!-- admonition-style -->
|
10103
10416
|
|
10417
|
+
<xsl:template name="refine_admonition-style">
|
10418
|
+
</xsl:template>
|
10419
|
+
|
10104
10420
|
<xsl:attribute-set name="admonition-container-style">
|
10105
10421
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
10106
10422
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
10107
10423
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
10108
10424
|
|
10425
|
+
<xsl:template name="refine_admonition-container-style">
|
10426
|
+
</xsl:template>
|
10427
|
+
|
10109
10428
|
<xsl:attribute-set name="admonition-name-style">
|
10110
10429
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
10111
10430
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
10112
10431
|
|
10432
|
+
<xsl:template name="refine_admonition-name-style">
|
10433
|
+
</xsl:template>
|
10434
|
+
|
10113
10435
|
<xsl:attribute-set name="admonition-p-style">
|
10114
10436
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
10437
|
+
|
10438
|
+
<xsl:template name="refine_admonition-p-style">
|
10439
|
+
</xsl:template>
|
10440
|
+
|
10115
10441
|
<!-- end admonition -->
|
10116
10442
|
|
10117
10443
|
<!-- ================ -->
|
@@ -10120,6 +10446,8 @@
|
|
10120
10446
|
<xsl:template match="mn:admonition">
|
10121
10447
|
<fo:block xsl:use-attribute-sets="admonition-style">
|
10122
10448
|
|
10449
|
+
<xsl:call-template name="refine_admonition-style"/>
|
10450
|
+
|
10123
10451
|
<xsl:call-template name="setBlockSpanAll"/>
|
10124
10452
|
|
10125
10453
|
<xsl:if test="@type = 'editorial'">
|
@@ -10187,6 +10515,7 @@
|
|
10187
10515
|
|
10188
10516
|
<xsl:template match="mn:admonition/mn:p">
|
10189
10517
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
10518
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
10190
10519
|
|
10191
10520
|
<xsl:apply-templates/>
|
10192
10521
|
</fo:block>
|
@@ -10196,37 +10525,65 @@
|
|
10196
10525
|
<!-- END Admonition -->
|
10197
10526
|
<!-- ================ -->
|
10198
10527
|
|
10528
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
10529
|
+
</xsl:attribute-set>
|
10530
|
+
|
10531
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
10532
|
+
|
10533
|
+
</xsl:template>
|
10534
|
+
|
10199
10535
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
10200
10536
|
<xsl:attribute-set name="bibitem-normative-style">
|
10201
10537
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
10202
10538
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
10203
10539
|
|
10540
|
+
<xsl:template name="refine_bibitem-normative-style">
|
10541
|
+
</xsl:template>
|
10542
|
+
|
10204
10543
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
10205
10544
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
10206
10545
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
10207
10546
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10208
10547
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
10209
10548
|
|
10549
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
10550
|
+
</xsl:template>
|
10551
|
+
|
10210
10552
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
10211
10553
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
10212
10554
|
|
10555
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
10556
|
+
</xsl:template>
|
10557
|
+
|
10213
10558
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
10214
10559
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
10215
10560
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
10216
10561
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10217
10562
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
10218
10563
|
|
10564
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
10565
|
+
</xsl:template>
|
10566
|
+
|
10219
10567
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
10220
10568
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10221
10569
|
</xsl:attribute-set>
|
10222
10570
|
|
10571
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
10572
|
+
</xsl:template>
|
10573
|
+
|
10223
10574
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
10224
10575
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
10225
10576
|
</xsl:attribute-set>
|
10226
10577
|
|
10578
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
10579
|
+
</xsl:template>
|
10580
|
+
|
10227
10581
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
10228
10582
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
10229
10583
|
|
10584
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
10585
|
+
</xsl:template>
|
10586
|
+
|
10230
10587
|
<!-- footnote reference number for bibitem, in the text -->
|
10231
10588
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
10232
10589
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -10234,6 +10591,9 @@
|
|
10234
10591
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10235
10592
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
10236
10593
|
|
10594
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
10595
|
+
</xsl:template>
|
10596
|
+
|
10237
10597
|
<!-- footnote number on the page bottom -->
|
10238
10598
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
10239
10599
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -10251,6 +10611,9 @@
|
|
10251
10611
|
<xsl:attribute-set name="references-non-normative-style">
|
10252
10612
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
10253
10613
|
|
10614
|
+
<xsl:template name="refine_references-non-normative-style">
|
10615
|
+
</xsl:template>
|
10616
|
+
|
10254
10617
|
<!-- ======================= -->
|
10255
10618
|
<!-- Bibliography rendering -->
|
10256
10619
|
<!-- ======================= -->
|
@@ -10292,6 +10655,7 @@
|
|
10292
10655
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
10293
10656
|
|
10294
10657
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
10658
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
10295
10659
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
10296
10660
|
</fo:block>
|
10297
10661
|
</xsl:template> <!-- references -->
|
@@ -10305,18 +10669,22 @@
|
|
10305
10669
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
10306
10670
|
<xsl:call-template name="setNamedDestination"/>
|
10307
10671
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
10672
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
10673
|
+
|
10308
10674
|
<xsl:call-template name="processBibitem"/>
|
10309
10675
|
</fo:block>
|
10310
10676
|
|
10311
10677
|
</xsl:template> <!-- bibitem -->
|
10312
10678
|
|
10313
10679
|
<!-- Bibliography (non-normative references) -->
|
10314
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
10680
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
10315
10681
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
|
10316
10682
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
10317
10683
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
10318
10684
|
<xsl:call-template name="setNamedDestination"/>
|
10319
10685
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
10686
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
10687
|
+
|
10320
10688
|
<fo:list-item>
|
10321
10689
|
<fo:list-item-label end-indent="label-end()">
|
10322
10690
|
<fo:block role="SKIP">
|
@@ -10329,6 +10697,7 @@
|
|
10329
10697
|
</fo:list-item-label>
|
10330
10698
|
<fo:list-item-body start-indent="body-start()">
|
10331
10699
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
10700
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
10332
10701
|
<xsl:call-template name="processBibitem">
|
10333
10702
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10334
10703
|
</xsl:call-template>
|
@@ -10339,12 +10708,17 @@
|
|
10339
10708
|
|
10340
10709
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
10341
10710
|
|
10711
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
10712
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
10713
|
+
|
10342
10714
|
<xsl:template name="insertListItem_Bibitem">
|
10343
10715
|
<xsl:choose>
|
10344
10716
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
10345
10717
|
<xsl:otherwise>
|
10346
10718
|
<xsl:call-template name="setNamedDestination"/>
|
10347
10719
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
10720
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
10721
|
+
|
10348
10722
|
<fo:list-item-label end-indent="label-end()">
|
10349
10723
|
<fo:block role="SKIP">
|
10350
10724
|
<fo:inline role="SKIP">
|
@@ -10355,16 +10729,18 @@
|
|
10355
10729
|
</fo:block>
|
10356
10730
|
</fo:list-item-label>
|
10357
10731
|
<fo:list-item-body start-indent="body-start()">
|
10358
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
10732
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
10733
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
10359
10734
|
<xsl:call-template name="processBibitem">
|
10360
10735
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10361
10736
|
</xsl:call-template>
|
10362
10737
|
</fo:block>
|
10738
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
10363
10739
|
</fo:list-item-body>
|
10364
10740
|
</fo:list-item>
|
10365
10741
|
</xsl:otherwise>
|
10366
10742
|
</xsl:choose>
|
10367
|
-
<xsl:apply-templates select="following-sibling::*[
|
10743
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
10368
10744
|
<xsl:with-param name="skip">false</xsl:with-param>
|
10369
10745
|
</xsl:apply-templates>
|
10370
10746
|
</xsl:template>
|
@@ -10380,25 +10756,16 @@
|
|
10380
10756
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
10381
10757
|
</xsl:apply-templates>
|
10382
10758
|
<xsl:apply-templates select="mn:formattedref"/>
|
10759
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
10383
10760
|
<!-- end bibitem processing -->
|
10384
|
-
|
10385
|
-
<xsl:call-template name="processBibliographyNote"/>
|
10386
10761
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10387
10762
|
|
10388
|
-
<xsl:template name="
|
10389
|
-
|
10390
|
-
|
10391
|
-
|
10392
|
-
<xsl:copy> <!-- skip @id -->
|
10393
|
-
<xsl:copy-of select="node()"/>
|
10394
|
-
</xsl:copy>
|
10395
|
-
</xsl:element>
|
10396
|
-
</xsl:variable>
|
10397
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
10398
|
-
<xsl:call-template name="note"/>
|
10399
|
-
</xsl:for-each> -->
|
10763
|
+
<xsl:template name="processBibitemFollowingNotes">
|
10764
|
+
<!-- current context is bibitem element -->
|
10765
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
10766
|
+
<xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
|
10400
10767
|
<xsl:call-template name="note"/>
|
10401
|
-
</xsl:
|
10768
|
+
</xsl:for-each>
|
10402
10769
|
</xsl:template>
|
10403
10770
|
|
10404
10771
|
<xsl:template match="mn:title" mode="title">
|
@@ -10598,11 +10965,17 @@
|
|
10598
10965
|
<!-- Index section styles -->
|
10599
10966
|
<xsl:attribute-set name="indexsect-title-style">
|
10600
10967
|
<xsl:attribute name="role">H1</xsl:attribute>
|
10601
|
-
</xsl:attribute-set>
|
10968
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
10969
|
+
|
10970
|
+
<xsl:template name="refine_indexsect-title-style">
|
10971
|
+
</xsl:template>
|
10602
10972
|
|
10603
10973
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
10604
10974
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
10605
|
-
</xsl:attribute-set>
|
10975
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
10976
|
+
|
10977
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
10978
|
+
</xsl:template>
|
10606
10979
|
<!-- End Index section styles -->
|
10607
10980
|
|
10608
10981
|
<!-- =================== -->
|
@@ -10796,6 +11169,7 @@
|
|
10796
11169
|
|
10797
11170
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
10798
11171
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
11172
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
10799
11173
|
<!-- Index -->
|
10800
11174
|
<xsl:apply-templates/>
|
10801
11175
|
</fo:block>
|
@@ -10804,6 +11178,7 @@
|
|
10804
11178
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
10805
11179
|
<!-- Letter A, B, C, ... -->
|
10806
11180
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
11181
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
10807
11182
|
<xsl:apply-templates/>
|
10808
11183
|
</fo:block>
|
10809
11184
|
</xsl:template>
|
@@ -10846,13 +11221,31 @@
|
|
10846
11221
|
<!-- skip here, see the template 'fmt-review-start' -->
|
10847
11222
|
</xsl:when>
|
10848
11223
|
<xsl:otherwise>
|
10849
|
-
|
10850
|
-
|
10851
|
-
|
10852
|
-
|
11224
|
+
<xsl:choose>
|
11225
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
11226
|
+
<fo:block font-size="1pt" line-height="0.1">
|
11227
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11228
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11229
|
+
</xsl:call-template>
|
11230
|
+
</fo:block>
|
11231
|
+
</xsl:when>
|
11232
|
+
<xsl:otherwise>
|
11233
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11234
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11235
|
+
</xsl:call-template>
|
11236
|
+
</xsl:otherwise>
|
11237
|
+
</xsl:choose>
|
10853
11238
|
</xsl:otherwise>
|
10854
11239
|
</xsl:choose>
|
10855
11240
|
</xsl:template>
|
11241
|
+
|
11242
|
+
<xsl:template name="fo_inline_bookmark">
|
11243
|
+
<xsl:param name="bookmark_id"/>
|
11244
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
11245
|
+
<fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
|
11246
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
11247
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
11248
|
+
</xsl:template>
|
10856
11249
|
<!-- =================== -->
|
10857
11250
|
<!-- End of Index processing -->
|
10858
11251
|
<!-- =================== -->
|
@@ -10990,9 +11383,15 @@
|
|
10990
11383
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
10991
11384
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
10992
11385
|
|
11386
|
+
<xsl:template name="refine_toc-leader-style">
|
11387
|
+
</xsl:template>
|
11388
|
+
|
10993
11389
|
<xsl:attribute-set name="toc-pagenumber-style">
|
10994
11390
|
</xsl:attribute-set>
|
10995
11391
|
|
11392
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
11393
|
+
</xsl:template>
|
11394
|
+
|
10996
11395
|
<!-- List of Figures, Tables -->
|
10997
11396
|
<xsl:attribute-set name="toc-listof-title-style">
|
10998
11397
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
@@ -11008,6 +11407,9 @@
|
|
11008
11407
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
11009
11408
|
</xsl:attribute-set>
|
11010
11409
|
|
11410
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
11411
|
+
</xsl:template>
|
11412
|
+
|
11011
11413
|
<xsl:attribute-set name="toc-listof-item-style">
|
11012
11414
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11013
11415
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
@@ -11016,6 +11418,9 @@
|
|
11016
11418
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
11017
11419
|
</xsl:attribute-set>
|
11018
11420
|
|
11421
|
+
<xsl:template name="refine_toc-listof-item-style">
|
11422
|
+
</xsl:template>
|
11423
|
+
|
11019
11424
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
11020
11425
|
<xsl:variable name="nodes_preface_">
|
11021
11426
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -12128,23 +12533,55 @@
|
|
12128
12533
|
<!-- Ruby text (CJK languages) rendering -->
|
12129
12534
|
<!-- ===================================== -->
|
12130
12535
|
<!-- ===================================== -->
|
12536
|
+
|
12537
|
+
<xsl:attribute-set name="ruby-style">
|
12538
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
12539
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
12540
|
+
</xsl:attribute-set>
|
12541
|
+
|
12542
|
+
<xsl:template name="refine_ruby-style">
|
12543
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
12544
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
12545
|
+
</xsl:if>
|
12546
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
12547
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
12548
|
+
<!-- Example: width="2em" -->
|
12549
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
12550
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
12551
|
+
<xsl:variable name="text_width">
|
12552
|
+
<xsl:choose>
|
12553
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
12554
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
12555
|
+
</xsl:choose>
|
12556
|
+
</xsl:variable>
|
12557
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
12558
|
+
</xsl:template> <!-- refine_ruby-style -->
|
12559
|
+
|
12560
|
+
<xsl:attribute-set name="rb-style">
|
12561
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
12562
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
12563
|
+
</xsl:attribute-set>
|
12564
|
+
|
12565
|
+
<xsl:template name="refine_rb-style">
|
12566
|
+
</xsl:template>
|
12567
|
+
|
12568
|
+
<xsl:attribute-set name="rt-style">
|
12569
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
12570
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
12571
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
12572
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
12573
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
12574
|
+
</xsl:attribute-set>
|
12575
|
+
|
12576
|
+
<xsl:template name="refine_rt-style">
|
12577
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
12578
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
12579
|
+
</xsl:if>
|
12580
|
+
</xsl:template>
|
12581
|
+
|
12131
12582
|
<xsl:template match="mn:ruby">
|
12132
|
-
<fo:inline-container
|
12133
|
-
<xsl:
|
12134
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
12135
|
-
</xsl:if>
|
12136
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
12137
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
12138
|
-
<!-- Example: width="2em" -->
|
12139
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
12140
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
12141
|
-
<xsl:variable name="text_width">
|
12142
|
-
<xsl:choose>
|
12143
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
12144
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
12145
|
-
</xsl:choose>
|
12146
|
-
</xsl:variable>
|
12147
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
12583
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
12584
|
+
<xsl:call-template name="refine_ruby-style"/>
|
12148
12585
|
|
12149
12586
|
<xsl:choose>
|
12150
12587
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -12162,17 +12599,14 @@
|
|
12162
12599
|
</xsl:template>
|
12163
12600
|
|
12164
12601
|
<xsl:template match="mn:rb">
|
12165
|
-
<fo:block
|
12602
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
12166
12603
|
</xsl:template>
|
12167
12604
|
|
12168
12605
|
<xsl:template match="mn:rt">
|
12169
|
-
<fo:block
|
12170
|
-
<xsl:
|
12171
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
12172
|
-
</xsl:if>
|
12606
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
12607
|
+
<xsl:call-template name="refine_rt-style"/>
|
12173
12608
|
<xsl:apply-templates/>
|
12174
12609
|
</fo:block>
|
12175
|
-
|
12176
12610
|
</xsl:template>
|
12177
12611
|
|
12178
12612
|
<!-- ===================================== -->
|
@@ -12181,6 +12615,18 @@
|
|
12181
12615
|
<!-- ===================================== -->
|
12182
12616
|
<!-- ===================================== -->
|
12183
12617
|
|
12618
|
+
<xsl:attribute-set name="annex-title-style">
|
12619
|
+
</xsl:attribute-set>
|
12620
|
+
|
12621
|
+
<xsl:template name="refine_annex-title-style">
|
12622
|
+
</xsl:template>
|
12623
|
+
|
12624
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
12625
|
+
</xsl:attribute-set>
|
12626
|
+
|
12627
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
12628
|
+
</xsl:template>
|
12629
|
+
|
12184
12630
|
<xsl:template name="processPrefaceSectionsDefault">
|
12185
12631
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
12186
12632
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -12740,11 +13186,35 @@
|
|
12740
13186
|
|
12741
13187
|
<xsl:template match="mn:svgmap"/>
|
12742
13188
|
|
13189
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
13190
|
+
|
12743
13191
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
12744
13192
|
<xsl:template match="*[local-name() = 'lang_none']">
|
12745
13193
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
12746
13194
|
</xsl:template>
|
12747
13195
|
|
13196
|
+
<xsl:template name="addTagElementT">
|
13197
|
+
<xsl:variable name="title_">
|
13198
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
13199
|
+
</xsl:variable>
|
13200
|
+
<xsl:variable name="title__">
|
13201
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
13202
|
+
<xsl:choose>
|
13203
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
13204
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
13205
|
+
</xsl:choose>
|
13206
|
+
</xsl:for-each>
|
13207
|
+
</xsl:variable>
|
13208
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
13209
|
+
<xsl:if test="$title != ''">
|
13210
|
+
<xsl:attribute name="fox:title">
|
13211
|
+
<xsl:if test="ancestor::mn:sections">
|
13212
|
+
<xsl:text>Section </xsl:text>
|
13213
|
+
</xsl:if>
|
13214
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
13215
|
+
</xsl:if>
|
13216
|
+
</xsl:template>
|
13217
|
+
|
12748
13218
|
<xsl:template name="replaceChar">
|
12749
13219
|
<xsl:param name="text"/>
|
12750
13220
|
<xsl:param name="replace"/>
|
@@ -13511,6 +13981,13 @@
|
|
13511
13981
|
<xsl:with-param name="default" select="$text_align_default"/>
|
13512
13982
|
</xsl:call-template>
|
13513
13983
|
<xsl:call-template name="setKeepAttributes"/>
|
13984
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
13985
|
+
<xsl:variable name="styles">
|
13986
|
+
<xsl:apply-templates select="*[1]"/>
|
13987
|
+
</xsl:variable>
|
13988
|
+
<!-- move attribute line-height from inline to block -->
|
13989
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
13990
|
+
</xsl:if>
|
13514
13991
|
</xsl:template>
|
13515
13992
|
|
13516
13993
|
<xsl:template name="setKeepAttributes">
|
@@ -13536,34 +14013,41 @@
|
|
13536
14013
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13537
14014
|
<fo:block>
|
13538
14015
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
13539
|
-
|
13540
|
-
|
13541
|
-
|
13542
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
13543
|
-
<xsl:call-template name="getSVG"/>
|
13544
|
-
</fo:instream-foreign-object>
|
13545
|
-
</xsl:when>
|
13546
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
13547
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
13548
|
-
</xsl:when>
|
13549
|
-
<xsl:otherwise> <!-- bitmap image -->
|
13550
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
13551
|
-
<xsl:if test="$coverimage_src != ''">
|
13552
|
-
<xsl:variable name="coverpage">
|
13553
|
-
<xsl:call-template name="getImageURL">
|
13554
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
13555
|
-
</xsl:call-template>
|
13556
|
-
</xsl:variable>
|
13557
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
13558
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
13559
|
-
</xsl:if>
|
13560
|
-
</xsl:otherwise>
|
13561
|
-
</xsl:choose>
|
14016
|
+
|
14017
|
+
<xsl:call-template name="insertPageImage"/>
|
14018
|
+
|
13562
14019
|
</xsl:for-each>
|
13563
14020
|
</fo:block>
|
13564
14021
|
</fo:block-container>
|
13565
14022
|
</xsl:template>
|
13566
14023
|
|
14024
|
+
<xsl:template name="insertPageImage">
|
14025
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
14026
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
14027
|
+
<xsl:choose>
|
14028
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14029
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
14030
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
14031
|
+
<xsl:call-template name="getSVG"/>
|
14032
|
+
</fo:instream-foreign-object>
|
14033
|
+
</xsl:when>
|
14034
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14035
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14036
|
+
</xsl:when>
|
14037
|
+
<xsl:otherwise> <!-- bitmap image -->
|
14038
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14039
|
+
<xsl:if test="$coverimage_src != ''">
|
14040
|
+
<xsl:variable name="coverpage">
|
14041
|
+
<xsl:call-template name="getImageURL">
|
14042
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
14043
|
+
</xsl:call-template>
|
14044
|
+
</xsl:variable>
|
14045
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14046
|
+
</xsl:if>
|
14047
|
+
</xsl:otherwise>
|
14048
|
+
</xsl:choose>
|
14049
|
+
</xsl:template>
|
14050
|
+
|
13567
14051
|
<xsl:template name="getImageURL">
|
13568
14052
|
<xsl:param name="src"/>
|
13569
14053
|
<xsl:choose>
|
@@ -13991,6 +14475,14 @@
|
|
13991
14475
|
</xsl:attribute>
|
13992
14476
|
</xsl:template>
|
13993
14477
|
|
14478
|
+
<xsl:template name="getCharByCodePoint">
|
14479
|
+
<xsl:param name="codepoint"/>
|
14480
|
+
<xsl:param name="radix">16</xsl:param>
|
14481
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
14482
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
14483
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
14484
|
+
</xsl:template>
|
14485
|
+
|
13994
14486
|
<xsl:template name="substring-after-last">
|
13995
14487
|
<xsl:param name="value"/>
|
13996
14488
|
<xsl:param name="delimiter"/>
|