metanorma-csa 2.7.2 → 2.7.4.pre.alpha.1
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/Gemfile +17 -0
- data/Gemfile.devel +3 -0
- data/README.adoc +3 -0
- data/lib/isodoc/csa/csa.standard.xsl +606 -158
- data/lib/isodoc/csa/metadata.rb +0 -10
- data/lib/metanorma/csa/cleanup.rb +7 -0
- data/lib/metanorma/csa/converter.rb +12 -15
- data/lib/metanorma/csa/isodoc.rng +44 -19
- data/lib/metanorma/csa/validate.rb +22 -0
- data/lib/metanorma/csa/version.rb +1 -1
- data/lib/metanorma-csa.rb +2 -0
- data/metanorma-csa.gemspec +2 -3
- metadata +8 -22
- data/lib/isodoc/csa/html/csa.css +0 -877
- data/lib/isodoc/csa/html/htmlstyle.css +0 -1518
- data/lib/isodoc/csa/html/wordstyle.css +0 -1516
|
@@ -1411,6 +1411,7 @@
|
|
|
1411
1411
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
|
|
1412
1412
|
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
|
|
1413
1413
|
<xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
|
1414
|
+
<xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
|
1414
1415
|
<!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
|
1415
1416
|
<xsl:template match="mn:preferred" mode="update_xml_step1"/>
|
|
1416
1417
|
<!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
|
@@ -1425,10 +1426,10 @@
|
|
|
1425
1426
|
|
|
1426
1427
|
<xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
|
1427
1428
|
|
|
1428
|
-
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
|
|
1429
|
+
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
|
|
1429
1430
|
<xsl:copy>
|
|
1430
1431
|
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
|
1431
|
-
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
|
|
1432
|
+
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
|
|
1432
1433
|
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
|
1433
1434
|
</xsl:copy>
|
|
1434
1435
|
</xsl:template>
|
|
@@ -2218,10 +2219,16 @@
|
|
|
2218
2219
|
<xsl:attribute-set name="license-statement-style">
|
|
2219
2220
|
</xsl:attribute-set> <!-- license-statement-style -->
|
|
2220
2221
|
|
|
2222
|
+
<xsl:template name="refine_license-statement-style">
|
|
2223
|
+
</xsl:template>
|
|
2224
|
+
|
|
2221
2225
|
<xsl:attribute-set name="license-statement-title-style">
|
|
2222
2226
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
2223
2227
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
|
2224
2228
|
|
|
2229
|
+
<xsl:template name="refine_license-statement-title-style">
|
|
2230
|
+
</xsl:template>
|
|
2231
|
+
|
|
2225
2232
|
<xsl:attribute-set name="license-statement-p-style">
|
|
2226
2233
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
|
2227
2234
|
|
|
@@ -2232,23 +2239,47 @@
|
|
|
2232
2239
|
<xsl:attribute-set name="legal-statement-style">
|
|
2233
2240
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
|
2234
2241
|
|
|
2242
|
+
<xsl:template name="refine_legal-statement-style">
|
|
2243
|
+
</xsl:template>
|
|
2244
|
+
|
|
2235
2245
|
<xsl:attribute-set name="legal-statement-title-style">
|
|
2236
2246
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
2237
2247
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
|
2238
2248
|
|
|
2249
|
+
<xsl:template name="refine_legal-statement-title-style">
|
|
2250
|
+
</xsl:template>
|
|
2251
|
+
|
|
2239
2252
|
<xsl:attribute-set name="legal-statement-p-style">
|
|
2240
2253
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
|
2241
2254
|
|
|
2255
|
+
<xsl:template name="refine_legal-statement-p-style">
|
|
2256
|
+
<xsl:if test="@align">
|
|
2257
|
+
<xsl:attribute name="text-align">
|
|
2258
|
+
<xsl:value-of select="@align"/>
|
|
2259
|
+
</xsl:attribute>
|
|
2260
|
+
</xsl:if>
|
|
2261
|
+
</xsl:template>
|
|
2262
|
+
|
|
2242
2263
|
<xsl:attribute-set name="feedback-statement-style">
|
|
2243
2264
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
|
2244
2265
|
|
|
2266
|
+
<xsl:template name="refine_feedback-statement-style">
|
|
2267
|
+
</xsl:template>
|
|
2268
|
+
|
|
2245
2269
|
<xsl:attribute-set name="feedback-statement-title-style">
|
|
2246
2270
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
2247
2271
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
|
2248
2272
|
|
|
2273
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
|
2274
|
+
|
|
2275
|
+
</xsl:template>
|
|
2276
|
+
|
|
2249
2277
|
<xsl:attribute-set name="feedback-statement-p-style">
|
|
2250
2278
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
|
2251
2279
|
|
|
2280
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
|
2281
|
+
</xsl:template>
|
|
2282
|
+
|
|
2252
2283
|
<!-- End boilerplate sections styles -->
|
|
2253
2284
|
|
|
2254
2285
|
<!-- ================================= -->
|
|
@@ -2274,6 +2305,7 @@
|
|
|
2274
2305
|
|
|
2275
2306
|
<xsl:template match="mn:license-statement">
|
|
2276
2307
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
|
2308
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
|
2277
2309
|
<xsl:apply-templates/>
|
|
2278
2310
|
</fo:block>
|
|
2279
2311
|
</xsl:template> <!-- license-statement -->
|
|
@@ -2291,6 +2323,7 @@
|
|
|
2291
2323
|
<xsl:template match="mn:legal-statement">
|
|
2292
2324
|
<xsl:param name="isLegacy">false</xsl:param>
|
|
2293
2325
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
|
2326
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
|
2294
2327
|
<xsl:apply-templates/>
|
|
2295
2328
|
</fo:block>
|
|
2296
2329
|
</xsl:template> <!-- legal-statement -->
|
|
@@ -2460,6 +2493,27 @@
|
|
|
2460
2493
|
<xsl:attribute-set name="sourcecode-container-style">
|
|
2461
2494
|
</xsl:attribute-set>
|
|
2462
2495
|
|
|
2496
|
+
<xsl:template name="refine_sourcecode-container-style">
|
|
2497
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
|
2498
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2499
|
+
</xsl:if>
|
|
2500
|
+
|
|
2501
|
+
<xsl:if test="ancestor::mn:example">
|
|
2502
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
2503
|
+
</xsl:if>
|
|
2504
|
+
|
|
2505
|
+
<xsl:copy-of select="@id"/>
|
|
2506
|
+
|
|
2507
|
+
<xsl:if test="parent::mn:note">
|
|
2508
|
+
<xsl:attribute name="margin-left">
|
|
2509
|
+
<xsl:choose>
|
|
2510
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
2511
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
2512
|
+
</xsl:choose>
|
|
2513
|
+
</xsl:attribute>
|
|
2514
|
+
</xsl:if>
|
|
2515
|
+
</xsl:template>
|
|
2516
|
+
|
|
2463
2517
|
<xsl:attribute-set name="sourcecode-style">
|
|
2464
2518
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
|
2465
2519
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
|
@@ -2473,6 +2527,12 @@
|
|
|
2473
2527
|
<xsl:template name="refine_sourcecode-style">
|
|
2474
2528
|
</xsl:template> <!-- refine_sourcecode-style -->
|
|
2475
2529
|
|
|
2530
|
+
<xsl:attribute-set name="sourcecode-number-style">
|
|
2531
|
+
</xsl:attribute-set>
|
|
2532
|
+
|
|
2533
|
+
<xsl:template name="refine_sourcecode-number-style">
|
|
2534
|
+
</xsl:template>
|
|
2535
|
+
|
|
2476
2536
|
<xsl:attribute-set name="sourcecode-name-style">
|
|
2477
2537
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
2478
2538
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
@@ -2481,6 +2541,9 @@
|
|
|
2481
2541
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
2482
2542
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
|
2483
2543
|
|
|
2544
|
+
<xsl:template name="refine_sourcecode-name-style">
|
|
2545
|
+
</xsl:template>
|
|
2546
|
+
|
|
2484
2547
|
<xsl:template name="add-zero-spaces-equal">
|
|
2485
2548
|
<xsl:param name="text" select="."/>
|
|
2486
2549
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
|
@@ -2568,24 +2631,8 @@
|
|
|
2568
2631
|
<xsl:otherwise>
|
|
2569
2632
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
|
2570
2633
|
|
|
2571
|
-
<xsl:
|
|
2572
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2573
|
-
</xsl:if>
|
|
2574
|
-
|
|
2575
|
-
<xsl:if test="ancestor::mn:example">
|
|
2576
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
2577
|
-
</xsl:if>
|
|
2578
|
-
|
|
2579
|
-
<xsl:copy-of select="@id"/>
|
|
2634
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
|
2580
2635
|
|
|
2581
|
-
<xsl:if test="parent::mn:note">
|
|
2582
|
-
<xsl:attribute name="margin-left">
|
|
2583
|
-
<xsl:choose>
|
|
2584
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
2585
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
2586
|
-
</xsl:choose>
|
|
2587
|
-
</xsl:attribute>
|
|
2588
|
-
</xsl:if>
|
|
2589
2636
|
<fo:block-container margin-left="0mm" role="SKIP">
|
|
2590
2637
|
|
|
2591
2638
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
@@ -2912,6 +2959,7 @@
|
|
|
2912
2959
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
|
2913
2960
|
<xsl:if test="normalize-space() != ''">
|
|
2914
2961
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
|
2962
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
|
2915
2963
|
<xsl:apply-templates/>
|
|
2916
2964
|
</fo:block>
|
|
2917
2965
|
</xsl:if>
|
|
@@ -2960,12 +3008,31 @@
|
|
|
2960
3008
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
2961
3009
|
<xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
2962
3010
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
|
2963
|
-
</xsl:attribute-set>
|
|
3011
|
+
</xsl:attribute-set> <!-- pre-style -->
|
|
3012
|
+
|
|
3013
|
+
<xsl:template name="refine_pre-style">
|
|
3014
|
+
</xsl:template>
|
|
2964
3015
|
|
|
2965
3016
|
<xsl:attribute-set name="tt-style">
|
|
2966
3017
|
<xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
2967
3018
|
</xsl:attribute-set>
|
|
2968
3019
|
|
|
3020
|
+
<xsl:template name="refine_tt-style">
|
|
3021
|
+
<xsl:variable name="_font-size">10 <!-- inherit -->
|
|
3022
|
+
</xsl:variable>
|
|
3023
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
|
3024
|
+
<xsl:if test="$font-size != ''">
|
|
3025
|
+
<xsl:attribute name="font-size">
|
|
3026
|
+
<xsl:choose>
|
|
3027
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
|
3028
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
|
3029
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
|
3030
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
|
3031
|
+
</xsl:choose>
|
|
3032
|
+
</xsl:attribute>
|
|
3033
|
+
</xsl:if>
|
|
3034
|
+
</xsl:template>
|
|
3035
|
+
|
|
2969
3036
|
<xsl:variable name="color-added-text">
|
|
2970
3037
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
|
2971
3038
|
</xsl:variable>
|
|
@@ -2978,9 +3045,14 @@
|
|
|
2978
3045
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
|
2979
3046
|
</xsl:attribute-set>
|
|
2980
3047
|
|
|
3048
|
+
<xsl:template name="refine_add-style">
|
|
3049
|
+
</xsl:template>
|
|
3050
|
+
|
|
2981
3051
|
<xsl:variable name="add-style">
|
|
2982
|
-
|
|
2983
|
-
|
|
3052
|
+
<add-style xsl:use-attribute-sets="add-style">
|
|
3053
|
+
<xsl:call-template name="refine_add-style"/>
|
|
3054
|
+
</add-style>
|
|
3055
|
+
</xsl:variable>
|
|
2984
3056
|
<xsl:template name="append_add-style">
|
|
2985
3057
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
|
2986
3058
|
</xsl:template>
|
|
@@ -2993,24 +3065,77 @@
|
|
|
2993
3065
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
|
2994
3066
|
</xsl:attribute-set>
|
|
2995
3067
|
|
|
3068
|
+
<xsl:template name="refine_del-style">
|
|
3069
|
+
</xsl:template>
|
|
3070
|
+
|
|
3071
|
+
<xsl:attribute-set name="strong-style">
|
|
3072
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
3073
|
+
</xsl:attribute-set>
|
|
3074
|
+
|
|
3075
|
+
<xsl:template name="refine_strong_style">
|
|
3076
|
+
<xsl:if test="ancestor::*['preferred']">
|
|
3077
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
3078
|
+
</xsl:if>
|
|
3079
|
+
</xsl:template> <!-- refine_strong_style -->
|
|
3080
|
+
|
|
3081
|
+
<xsl:attribute-set name="em-style">
|
|
3082
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
|
3083
|
+
</xsl:attribute-set>
|
|
3084
|
+
|
|
3085
|
+
<xsl:template name="refine_em_style">
|
|
3086
|
+
</xsl:template> <!-- refine_em_style -->
|
|
3087
|
+
|
|
3088
|
+
<xsl:attribute-set name="sup-style">
|
|
3089
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
3090
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
3091
|
+
</xsl:attribute-set>
|
|
3092
|
+
|
|
3093
|
+
<xsl:template name="refine_sup-style">
|
|
3094
|
+
</xsl:template>
|
|
3095
|
+
|
|
3096
|
+
<xsl:attribute-set name="sub-style">
|
|
3097
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
3098
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
|
3099
|
+
</xsl:attribute-set>
|
|
3100
|
+
|
|
3101
|
+
<xsl:template name="refine_sub-style">
|
|
3102
|
+
</xsl:template>
|
|
3103
|
+
|
|
3104
|
+
<xsl:attribute-set name="underline-style">
|
|
3105
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
3106
|
+
</xsl:attribute-set>
|
|
3107
|
+
|
|
3108
|
+
<xsl:template name="refine_underline-style">
|
|
3109
|
+
</xsl:template>
|
|
3110
|
+
|
|
3111
|
+
<xsl:attribute-set name="hi-style">
|
|
3112
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
|
3113
|
+
</xsl:attribute-set>
|
|
3114
|
+
|
|
3115
|
+
<xsl:template name="refine_hi-style">
|
|
3116
|
+
</xsl:template>
|
|
3117
|
+
|
|
3118
|
+
<xsl:attribute-set name="strike-style">
|
|
3119
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
|
3120
|
+
</xsl:attribute-set>
|
|
3121
|
+
|
|
3122
|
+
<xsl:template name="refine_strike-style">
|
|
3123
|
+
</xsl:template>
|
|
3124
|
+
|
|
2996
3125
|
<xsl:template match="mn:br">
|
|
2997
3126
|
<xsl:value-of select="$linebreak"/>
|
|
2998
3127
|
</xsl:template>
|
|
2999
3128
|
|
|
3000
|
-
|
|
3001
|
-
<fo:inline
|
|
3002
|
-
<xsl:call-template name="
|
|
3129
|
+
<xsl:template match="mn:em">
|
|
3130
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
|
3131
|
+
<xsl:call-template name="refine_em_style"/>
|
|
3003
3132
|
<xsl:apply-templates/>
|
|
3004
3133
|
</fo:inline>
|
|
3005
3134
|
</xsl:template>
|
|
3006
3135
|
|
|
3007
|
-
<xsl:template name="refine_italic_style">
|
|
3008
|
-
</xsl:template>
|
|
3009
|
-
|
|
3010
3136
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
|
3011
3137
|
<xsl:param name="split_keep-within-line"/>
|
|
3012
|
-
<fo:inline
|
|
3013
|
-
|
|
3138
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
|
3014
3139
|
<xsl:call-template name="refine_strong_style"/>
|
|
3015
3140
|
|
|
3016
3141
|
<xsl:apply-templates>
|
|
@@ -3019,44 +3144,27 @@
|
|
|
3019
3144
|
</fo:inline>
|
|
3020
3145
|
</xsl:template>
|
|
3021
3146
|
|
|
3022
|
-
<xsl:template name="refine_strong_style">
|
|
3023
|
-
<xsl:if test="ancestor::*['preferred']">
|
|
3024
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
3025
|
-
</xsl:if>
|
|
3026
|
-
</xsl:template>
|
|
3027
|
-
|
|
3028
3147
|
<xsl:template match="*[local-name()='padding']">
|
|
3029
3148
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
|
3030
3149
|
</xsl:template>
|
|
3031
3150
|
|
|
3032
3151
|
<xsl:template match="mn:sup">
|
|
3033
|
-
<fo:inline
|
|
3152
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
|
3153
|
+
<xsl:call-template name="refine_sup-style"/>
|
|
3034
3154
|
<xsl:apply-templates/>
|
|
3035
3155
|
</fo:inline>
|
|
3036
3156
|
</xsl:template>
|
|
3037
3157
|
|
|
3038
3158
|
<xsl:template match="mn:sub">
|
|
3039
|
-
<fo:inline
|
|
3159
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
|
3160
|
+
<xsl:call-template name="refine_sub-style"/>
|
|
3040
3161
|
<xsl:apply-templates/>
|
|
3041
3162
|
</fo:inline>
|
|
3042
3163
|
</xsl:template>
|
|
3043
3164
|
|
|
3044
3165
|
<xsl:template match="mn:tt">
|
|
3045
3166
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
|
3046
|
-
|
|
3047
|
-
<xsl:variable name="_font-size">10 <!-- inherit -->
|
|
3048
|
-
</xsl:variable>
|
|
3049
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
|
3050
|
-
<xsl:if test="$font-size != ''">
|
|
3051
|
-
<xsl:attribute name="font-size">
|
|
3052
|
-
<xsl:choose>
|
|
3053
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
|
3054
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
|
3055
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
|
3056
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
|
3057
|
-
</xsl:choose>
|
|
3058
|
-
</xsl:attribute>
|
|
3059
|
-
</xsl:if>
|
|
3167
|
+
<xsl:call-template name="refine_tt-style"/>
|
|
3060
3168
|
<xsl:apply-templates/>
|
|
3061
3169
|
</fo:inline>
|
|
3062
3170
|
</xsl:template> <!-- tt -->
|
|
@@ -3075,7 +3183,8 @@
|
|
|
3075
3183
|
</xsl:template>
|
|
3076
3184
|
|
|
3077
3185
|
<xsl:template match="mn:underline">
|
|
3078
|
-
<fo:inline
|
|
3186
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
|
3187
|
+
<xsl:call-template name="refine_underline-style"/>
|
|
3079
3188
|
<xsl:apply-templates/>
|
|
3080
3189
|
</fo:inline>
|
|
3081
3190
|
</xsl:template>
|
|
@@ -3233,6 +3342,7 @@
|
|
|
3233
3342
|
|
|
3234
3343
|
<xsl:template match="mn:del">
|
|
3235
3344
|
<fo:inline xsl:use-attribute-sets="del-style">
|
|
3345
|
+
<xsl:call-template name="refine_del-style"/>
|
|
3236
3346
|
<xsl:apply-templates/>
|
|
3237
3347
|
</fo:inline>
|
|
3238
3348
|
</xsl:template>
|
|
@@ -3242,7 +3352,8 @@
|
|
|
3242
3352
|
|
|
3243
3353
|
<!-- highlight text -->
|
|
3244
3354
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
|
3245
|
-
<fo:inline
|
|
3355
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
|
3356
|
+
<xsl:call-template name="refine_hi-style"/>
|
|
3246
3357
|
<xsl:apply-templates/>
|
|
3247
3358
|
</fo:inline>
|
|
3248
3359
|
</xsl:template>
|
|
@@ -3328,7 +3439,8 @@
|
|
|
3328
3439
|
</xsl:template>
|
|
3329
3440
|
|
|
3330
3441
|
<xsl:template match="mn:strike">
|
|
3331
|
-
<fo:inline
|
|
3442
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
|
3443
|
+
<xsl:call-template name="refine_strike-style"/>
|
|
3332
3444
|
<xsl:apply-templates/>
|
|
3333
3445
|
</fo:inline>
|
|
3334
3446
|
</xsl:template>
|
|
@@ -3408,6 +3520,7 @@
|
|
|
3408
3520
|
|
|
3409
3521
|
<xsl:template match="mn:pre" name="pre">
|
|
3410
3522
|
<fo:block xsl:use-attribute-sets="pre-style">
|
|
3523
|
+
<xsl:call-template name="refine_pre-style"/>
|
|
3411
3524
|
<xsl:copy-of select="@id"/>
|
|
3412
3525
|
<xsl:choose>
|
|
3413
3526
|
|
|
@@ -3438,22 +3551,40 @@
|
|
|
3438
3551
|
<xsl:attribute-set name="permission-style">
|
|
3439
3552
|
</xsl:attribute-set>
|
|
3440
3553
|
|
|
3554
|
+
<xsl:template name="refine_permission-style">
|
|
3555
|
+
</xsl:template>
|
|
3556
|
+
|
|
3441
3557
|
<xsl:attribute-set name="permission-name-style">
|
|
3442
3558
|
</xsl:attribute-set>
|
|
3443
3559
|
|
|
3560
|
+
<xsl:template name="refine_permission-name-style">
|
|
3561
|
+
</xsl:template>
|
|
3562
|
+
|
|
3444
3563
|
<xsl:attribute-set name="permission-label-style">
|
|
3445
3564
|
</xsl:attribute-set>
|
|
3446
3565
|
|
|
3566
|
+
<xsl:template name="refine_permission-label-style">
|
|
3567
|
+
</xsl:template>
|
|
3568
|
+
|
|
3447
3569
|
<xsl:attribute-set name="requirement-style">
|
|
3448
3570
|
</xsl:attribute-set>
|
|
3449
3571
|
|
|
3572
|
+
<xsl:template name="refine_requirement-style">
|
|
3573
|
+
</xsl:template>
|
|
3574
|
+
|
|
3450
3575
|
<xsl:attribute-set name="requirement-name-style">
|
|
3451
3576
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3452
3577
|
</xsl:attribute-set>
|
|
3453
3578
|
|
|
3579
|
+
<xsl:template name="refine_requirement-name-style">
|
|
3580
|
+
</xsl:template>
|
|
3581
|
+
|
|
3454
3582
|
<xsl:attribute-set name="requirement-label-style">
|
|
3455
3583
|
</xsl:attribute-set>
|
|
3456
3584
|
|
|
3585
|
+
<xsl:template name="refine_requirement-label-style">
|
|
3586
|
+
</xsl:template>
|
|
3587
|
+
|
|
3457
3588
|
<xsl:attribute-set name="subject-style">
|
|
3458
3589
|
</xsl:attribute-set>
|
|
3459
3590
|
|
|
@@ -3481,18 +3612,28 @@
|
|
|
3481
3612
|
<xsl:attribute-set name="recommendation-style">
|
|
3482
3613
|
</xsl:attribute-set>
|
|
3483
3614
|
|
|
3615
|
+
<xsl:template name="refine_recommendation-style">
|
|
3616
|
+
</xsl:template>
|
|
3617
|
+
|
|
3484
3618
|
<xsl:attribute-set name="recommendation-name-style">
|
|
3485
3619
|
</xsl:attribute-set>
|
|
3486
3620
|
|
|
3621
|
+
<xsl:template name="refine_recommendation-name-style">
|
|
3622
|
+
</xsl:template>
|
|
3623
|
+
|
|
3487
3624
|
<xsl:attribute-set name="recommendation-label-style">
|
|
3488
3625
|
</xsl:attribute-set>
|
|
3489
3626
|
|
|
3627
|
+
<xsl:template name="refine_recommendation-label-style">
|
|
3628
|
+
</xsl:template>
|
|
3629
|
+
|
|
3490
3630
|
<!-- ========== -->
|
|
3491
3631
|
<!-- permission -->
|
|
3492
3632
|
<!-- ========== -->
|
|
3493
3633
|
<xsl:template match="mn:permission">
|
|
3494
3634
|
<xsl:call-template name="setNamedDestination"/>
|
|
3495
3635
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
|
3636
|
+
<xsl:call-template name="refine_permission-style"/>
|
|
3496
3637
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
3497
3638
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
3498
3639
|
</fo:block>
|
|
@@ -3501,6 +3642,7 @@
|
|
|
3501
3642
|
<xsl:template match="mn:permission/mn:fmt-name">
|
|
3502
3643
|
<xsl:if test="normalize-space() != ''">
|
|
3503
3644
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
|
3645
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
|
3504
3646
|
<xsl:apply-templates/>
|
|
3505
3647
|
</fo:block>
|
|
3506
3648
|
</xsl:if>
|
|
@@ -3508,6 +3650,7 @@
|
|
|
3508
3650
|
|
|
3509
3651
|
<xsl:template match="mn:permission/mn:label">
|
|
3510
3652
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
|
3653
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
|
3511
3654
|
<xsl:apply-templates/>
|
|
3512
3655
|
</fo:block>
|
|
3513
3656
|
</xsl:template>
|
|
@@ -3520,6 +3663,7 @@
|
|
|
3520
3663
|
<xsl:template match="mn:requirement">
|
|
3521
3664
|
<xsl:call-template name="setNamedDestination"/>
|
|
3522
3665
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
|
3666
|
+
<xsl:call-template name="refine_requirement-style"/>
|
|
3523
3667
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
3524
3668
|
<xsl:apply-templates select="mn:label"/>
|
|
3525
3669
|
<xsl:apply-templates select="@obligation"/>
|
|
@@ -3532,6 +3676,7 @@
|
|
|
3532
3676
|
<xsl:if test="normalize-space() != ''">
|
|
3533
3677
|
|
|
3534
3678
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
|
3679
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
|
3535
3680
|
<xsl:apply-templates/>
|
|
3536
3681
|
</fo:block>
|
|
3537
3682
|
</xsl:if>
|
|
@@ -3539,6 +3684,7 @@
|
|
|
3539
3684
|
|
|
3540
3685
|
<xsl:template match="mn:requirement/mn:label">
|
|
3541
3686
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
|
3687
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
|
3542
3688
|
<xsl:apply-templates/>
|
|
3543
3689
|
</fo:block>
|
|
3544
3690
|
</xsl:template>
|
|
@@ -3564,6 +3710,7 @@
|
|
|
3564
3710
|
<xsl:template match="mn:recommendation">
|
|
3565
3711
|
<xsl:call-template name="setNamedDestination"/>
|
|
3566
3712
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
|
3713
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
|
3567
3714
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
3568
3715
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
3569
3716
|
</fo:block>
|
|
@@ -3573,6 +3720,7 @@
|
|
|
3573
3720
|
<xsl:if test="normalize-space() != ''">
|
|
3574
3721
|
|
|
3575
3722
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
|
3723
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
|
3576
3724
|
<xsl:apply-templates/>
|
|
3577
3725
|
</fo:block>
|
|
3578
3726
|
</xsl:if>
|
|
@@ -3580,6 +3728,7 @@
|
|
|
3580
3728
|
|
|
3581
3729
|
<xsl:template match="mn:recommendation/mn:label">
|
|
3582
3730
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
|
3731
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
|
3583
3732
|
<xsl:apply-templates/>
|
|
3584
3733
|
</fo:block>
|
|
3585
3734
|
</xsl:template>
|
|
@@ -3760,36 +3909,72 @@
|
|
|
3760
3909
|
<xsl:attribute-set name="term-style">
|
|
3761
3910
|
</xsl:attribute-set> <!-- term-style -->
|
|
3762
3911
|
|
|
3912
|
+
<xsl:template name="refine_term-style">
|
|
3913
|
+
</xsl:template>
|
|
3914
|
+
|
|
3763
3915
|
<xsl:attribute-set name="term-name-style">
|
|
3764
3916
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3765
3917
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
3766
3918
|
</xsl:attribute-set> <!-- term-name-style -->
|
|
3767
3919
|
|
|
3768
|
-
|
|
3920
|
+
<xsl:template name="refine_term-name-style">
|
|
3921
|
+
</xsl:template>
|
|
3922
|
+
|
|
3923
|
+
<xsl:attribute-set name="preferred-style">
|
|
3924
|
+
</xsl:attribute-set> <!-- preferred-style -->
|
|
3925
|
+
|
|
3926
|
+
<xsl:template name="refine_preferred-style">
|
|
3927
|
+
</xsl:template>
|
|
3928
|
+
|
|
3929
|
+
<xsl:attribute-set name="preferred-block-style">
|
|
3769
3930
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
|
3770
3931
|
|
|
3932
|
+
<xsl:template name="refine_preferred-block-style">
|
|
3933
|
+
</xsl:template>
|
|
3934
|
+
|
|
3771
3935
|
<xsl:attribute-set name="preferred-term-style">
|
|
3772
3936
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3773
3937
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
3774
3938
|
<xsl:attribute name="line-height">1</xsl:attribute>
|
|
3775
3939
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
|
3776
3940
|
|
|
3941
|
+
<xsl:template name="refine_preferred-term-style">
|
|
3942
|
+
<xsl:if test="mn:strong">
|
|
3943
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
3944
|
+
</xsl:if>
|
|
3945
|
+
</xsl:template>
|
|
3946
|
+
|
|
3777
3947
|
<xsl:attribute-set name="domain-style">
|
|
3778
3948
|
</xsl:attribute-set> <!-- domain-style -->
|
|
3779
3949
|
|
|
3950
|
+
<xsl:template name="refine_domain-style">
|
|
3951
|
+
</xsl:template>
|
|
3952
|
+
|
|
3780
3953
|
<xsl:attribute-set name="admitted-style">
|
|
3781
3954
|
</xsl:attribute-set> <!-- admitted-style -->
|
|
3782
3955
|
|
|
3956
|
+
<xsl:template name="refine_admitted-style">
|
|
3957
|
+
</xsl:template>
|
|
3958
|
+
|
|
3783
3959
|
<xsl:attribute-set name="deprecates-style">
|
|
3784
3960
|
</xsl:attribute-set> <!-- deprecates-style -->
|
|
3785
3961
|
|
|
3962
|
+
<xsl:template name="refine_deprecates-style">
|
|
3963
|
+
</xsl:template>
|
|
3964
|
+
|
|
3786
3965
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
|
3787
3966
|
</xsl:attribute-set>
|
|
3788
3967
|
|
|
3968
|
+
<xsl:template name="refine_related-block-style">
|
|
3969
|
+
</xsl:template>
|
|
3970
|
+
|
|
3789
3971
|
<xsl:attribute-set name="definition-style">
|
|
3790
3972
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
3791
3973
|
</xsl:attribute-set> <!-- definition-style -->
|
|
3792
3974
|
|
|
3975
|
+
<xsl:template name="refine_definition-style">
|
|
3976
|
+
</xsl:template>
|
|
3977
|
+
|
|
3793
3978
|
<xsl:attribute-set name="termsource-style">
|
|
3794
3979
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
3795
3980
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
@@ -3801,11 +3986,17 @@
|
|
|
3801
3986
|
<xsl:attribute-set name="termsource-text-style">
|
|
3802
3987
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
|
3803
3988
|
|
|
3989
|
+
<xsl:template name="refine_termsource-text-style">
|
|
3990
|
+
</xsl:template>
|
|
3991
|
+
|
|
3804
3992
|
<xsl:attribute-set name="origin-style">
|
|
3805
3993
|
<xsl:attribute name="color">rgb(33, 94, 159)</xsl:attribute>
|
|
3806
3994
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
3807
3995
|
</xsl:attribute-set> <!-- origin-style -->
|
|
3808
3996
|
|
|
3997
|
+
<xsl:template name="refine_origin-style">
|
|
3998
|
+
</xsl:template>
|
|
3999
|
+
|
|
3809
4000
|
<!-- ====== -->
|
|
3810
4001
|
<!-- term -->
|
|
3811
4002
|
<!-- ====== -->
|
|
@@ -3821,9 +4012,8 @@
|
|
|
3821
4012
|
<xsl:template match="mn:term">
|
|
3822
4013
|
<xsl:call-template name="setNamedDestination"/>
|
|
3823
4014
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
|
4015
|
+
<xsl:call-template name="refine_term-style"/>
|
|
3824
4016
|
|
|
3825
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
|
3826
|
-
</xsl:if>
|
|
3827
4017
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
3828
4018
|
</fo:block>
|
|
3829
4019
|
</xsl:template>
|
|
@@ -3899,6 +4089,7 @@
|
|
|
3899
4089
|
<!-- text SOURCE: -->
|
|
3900
4090
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
|
3901
4091
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
|
4092
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
|
3902
4093
|
<xsl:value-of select="."/>
|
|
3903
4094
|
</fo:inline>
|
|
3904
4095
|
</xsl:template>
|
|
@@ -3911,6 +4102,7 @@
|
|
|
3911
4102
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
3912
4103
|
</xsl:if>
|
|
3913
4104
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
4105
|
+
<xsl:call-template name="refine_origin-style"/>
|
|
3914
4106
|
<xsl:apply-templates/>
|
|
3915
4107
|
</fo:inline>
|
|
3916
4108
|
</fo:basic-link>
|
|
@@ -3965,9 +4157,12 @@
|
|
|
3965
4157
|
</xsl:variable>
|
|
3966
4158
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
|
3967
4159
|
|
|
4160
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
|
4161
|
+
|
|
3968
4162
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
|
3969
4163
|
|
|
3970
4164
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
|
4165
|
+
<xsl:call-template name="refine_term-name-style"/>
|
|
3971
4166
|
|
|
3972
4167
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
|
3973
4168
|
<xsl:call-template name="setIDforNamedDestination"/>
|
|
@@ -3978,7 +4173,7 @@
|
|
|
3978
4173
|
</xsl:if>
|
|
3979
4174
|
|
|
3980
4175
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
|
3981
|
-
<xsl:call-template name="
|
|
4176
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
|
3982
4177
|
|
|
3983
4178
|
<xsl:apply-templates/>
|
|
3984
4179
|
</fo:block>
|
|
@@ -3999,22 +4194,18 @@
|
|
|
3999
4194
|
|
|
4000
4195
|
<xsl:template match="mn:fmt-admitted">
|
|
4001
4196
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
|
4197
|
+
<xsl:call-template name="refine_admitted-style"/>
|
|
4002
4198
|
<xsl:apply-templates/>
|
|
4003
4199
|
</fo:block>
|
|
4004
4200
|
</xsl:template>
|
|
4005
4201
|
|
|
4006
4202
|
<xsl:template match="mn:fmt-deprecates">
|
|
4007
4203
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
|
4204
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
|
4008
4205
|
<xsl:apply-templates/>
|
|
4009
4206
|
</fo:block>
|
|
4010
4207
|
</xsl:template>
|
|
4011
4208
|
|
|
4012
|
-
<xsl:template name="setStyle_preferred">
|
|
4013
|
-
<xsl:if test="mn:strong">
|
|
4014
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
4015
|
-
</xsl:if>
|
|
4016
|
-
</xsl:template>
|
|
4017
|
-
|
|
4018
4209
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
|
4019
4210
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
|
4020
4211
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
|
@@ -4024,6 +4215,7 @@
|
|
|
4024
4215
|
|
|
4025
4216
|
<xsl:template match="mn:fmt-related">
|
|
4026
4217
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
|
4218
|
+
<xsl:call-template name="refine_related-block-style"/>
|
|
4027
4219
|
<xsl:apply-templates/>
|
|
4028
4220
|
</fo:block>
|
|
4029
4221
|
</xsl:template>
|
|
@@ -4038,6 +4230,7 @@
|
|
|
4038
4230
|
<!-- ========== -->
|
|
4039
4231
|
<xsl:template match="mn:fmt-definition">
|
|
4040
4232
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
|
4233
|
+
<xsl:call-template name="refine_definition-style"/>
|
|
4041
4234
|
<xsl:apply-templates/>
|
|
4042
4235
|
</fo:block>
|
|
4043
4236
|
</xsl:template>
|
|
@@ -4087,6 +4280,9 @@
|
|
|
4087
4280
|
<xsl:attribute name="margin-right">12.5mm</xsl:attribute>
|
|
4088
4281
|
</xsl:attribute-set> <!-- example-body-style -->
|
|
4089
4282
|
|
|
4283
|
+
<xsl:template name="refine_example-body-style">
|
|
4284
|
+
</xsl:template>
|
|
4285
|
+
|
|
4090
4286
|
<xsl:attribute-set name="example-name-style">
|
|
4091
4287
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
4092
4288
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
@@ -4136,6 +4332,8 @@
|
|
|
4136
4332
|
<xsl:when test="contains($element, 'block')">
|
|
4137
4333
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
|
4138
4334
|
|
|
4335
|
+
<xsl:call-template name="refine_example-p-style"/>
|
|
4336
|
+
|
|
4139
4337
|
<xsl:apply-templates/>
|
|
4140
4338
|
</fo:block>
|
|
4141
4339
|
</xsl:when>
|
|
@@ -4187,6 +4385,7 @@
|
|
|
4187
4385
|
</fo:block>
|
|
4188
4386
|
|
|
4189
4387
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
|
4388
|
+
<xsl:call-template name="refine_example-body-style"/>
|
|
4190
4389
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
4191
4390
|
<xsl:variable name="example_body">
|
|
4192
4391
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
|
@@ -4249,6 +4448,7 @@
|
|
|
4249
4448
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
|
4250
4449
|
<!-- display further elements in blocks -->
|
|
4251
4450
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
|
4451
|
+
<xsl:call-template name="refine_example-body-style"/>
|
|
4252
4452
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
4253
4453
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
|
4254
4454
|
<xsl:with-param name="fo_element" select="'block'"/>
|
|
@@ -4371,6 +4571,12 @@
|
|
|
4371
4571
|
<xsl:call-template name="setBordersTableArray"/>
|
|
4372
4572
|
</xsl:template> <!-- refine_table-style -->
|
|
4373
4573
|
|
|
4574
|
+
<xsl:attribute-set name="table-number-style">
|
|
4575
|
+
</xsl:attribute-set>
|
|
4576
|
+
|
|
4577
|
+
<xsl:template name="refine_table-number-style">
|
|
4578
|
+
</xsl:template>
|
|
4579
|
+
|
|
4374
4580
|
<xsl:attribute-set name="table-name-style">
|
|
4375
4581
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
|
4376
4582
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
@@ -4474,6 +4680,9 @@
|
|
|
4474
4680
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
|
4475
4681
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
|
4476
4682
|
|
|
4683
|
+
<xsl:template name="refine_table-fn-number-style">
|
|
4684
|
+
</xsl:template>
|
|
4685
|
+
|
|
4477
4686
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
|
4478
4687
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
4479
4688
|
</xsl:attribute-set> <!-- table-fmt-fn-label-style -->
|
|
@@ -4481,30 +4690,12 @@
|
|
|
4481
4690
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
|
4482
4691
|
</xsl:template>
|
|
4483
4692
|
|
|
4484
|
-
<xsl:attribute-set name="fn-container-body-style">
|
|
4485
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
|
4486
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
|
4487
|
-
</xsl:attribute-set>
|
|
4488
|
-
|
|
4489
4693
|
<xsl:attribute-set name="table-fn-body-style">
|
|
4490
4694
|
</xsl:attribute-set>
|
|
4491
4695
|
|
|
4492
|
-
<xsl:
|
|
4493
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
|
4494
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
|
4495
|
-
|
|
4496
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
|
4497
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
4498
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
4499
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
|
4500
|
-
|
|
4501
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
|
4696
|
+
<xsl:template name="refine_table-fn-body-style">
|
|
4502
4697
|
</xsl:template>
|
|
4503
4698
|
|
|
4504
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
|
4505
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
|
4506
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
4507
|
-
</xsl:attribute-set>
|
|
4508
4699
|
<!-- ========================== -->
|
|
4509
4700
|
<!-- END Table styles -->
|
|
4510
4701
|
<!-- ========================== -->
|
|
@@ -4820,7 +5011,7 @@
|
|
|
4820
5011
|
|
|
4821
5012
|
</fo:block>
|
|
4822
5013
|
|
|
4823
|
-
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
|
5014
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
|
4824
5015
|
<xsl:if test="$continued = 'true'">
|
|
4825
5016
|
|
|
4826
5017
|
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
|
@@ -5781,6 +5972,7 @@
|
|
|
5781
5972
|
</xsl:apply-templates>
|
|
5782
5973
|
|
|
5783
5974
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
|
5975
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
|
5784
5976
|
<!-- <xsl:copy-of select="./node()"/> -->
|
|
5785
5977
|
<xsl:apply-templates/>
|
|
5786
5978
|
</fo:inline>
|
|
@@ -5799,6 +5991,7 @@
|
|
|
5799
5991
|
<xsl:param name="process">false</xsl:param>
|
|
5800
5992
|
<xsl:if test="$process = 'true'">
|
|
5801
5993
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
|
5994
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
|
5802
5995
|
|
|
5803
5996
|
<!-- tab is padding-right -->
|
|
5804
5997
|
<xsl:apply-templates select=".//mn:tab">
|
|
@@ -6670,9 +6863,18 @@
|
|
|
6670
6863
|
<xsl:attribute-set name="dl-block-style">
|
|
6671
6864
|
</xsl:attribute-set>
|
|
6672
6865
|
|
|
6866
|
+
<xsl:template name="refine_dl-block-style">
|
|
6867
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
|
6868
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
|
6869
|
+
</xsl:if>
|
|
6870
|
+
</xsl:template>
|
|
6871
|
+
|
|
6673
6872
|
<xsl:attribute-set name="dt-row-style">
|
|
6674
6873
|
</xsl:attribute-set>
|
|
6675
6874
|
|
|
6875
|
+
<xsl:template name="refine_dt-row-style">
|
|
6876
|
+
</xsl:template>
|
|
6877
|
+
|
|
6676
6878
|
<xsl:attribute-set name="dt-cell-style">
|
|
6677
6879
|
</xsl:attribute-set>
|
|
6678
6880
|
|
|
@@ -6691,6 +6893,9 @@
|
|
|
6691
6893
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
6692
6894
|
</xsl:attribute-set> <!-- dl-name-style -->
|
|
6693
6895
|
|
|
6896
|
+
<xsl:template name="refine_dl-name-style">
|
|
6897
|
+
</xsl:template>
|
|
6898
|
+
|
|
6694
6899
|
<xsl:attribute-set name="dd-cell-style">
|
|
6695
6900
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
|
6696
6901
|
</xsl:attribute-set>
|
|
@@ -6729,9 +6934,7 @@
|
|
|
6729
6934
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
|
6730
6935
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
|
6731
6936
|
|
|
6732
|
-
<xsl:
|
|
6733
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
|
6734
|
-
</xsl:if>
|
|
6937
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
|
6735
6938
|
|
|
6736
6939
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
6737
6940
|
<xsl:if test="not(ancestor::mn:quote)">
|
|
@@ -7027,6 +7230,8 @@
|
|
|
7027
7230
|
<xsl:if test="$process = 'true'">
|
|
7028
7231
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
|
7029
7232
|
|
|
7233
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
|
7234
|
+
|
|
7030
7235
|
<xsl:apply-templates/>
|
|
7031
7236
|
</fo:block>
|
|
7032
7237
|
</xsl:if>
|
|
@@ -7215,6 +7420,8 @@
|
|
|
7215
7420
|
<xsl:param name="split_keep-within-line"/>
|
|
7216
7421
|
|
|
7217
7422
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
|
7423
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
|
7424
|
+
|
|
7218
7425
|
<xsl:call-template name="insert_dt_cell">
|
|
7219
7426
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
|
7220
7427
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
|
@@ -7424,15 +7631,22 @@
|
|
|
7424
7631
|
<xsl:attribute-set name="appendix-style">
|
|
7425
7632
|
</xsl:attribute-set>
|
|
7426
7633
|
|
|
7634
|
+
<xsl:template name="refine_appendix-style">
|
|
7635
|
+
</xsl:template>
|
|
7636
|
+
|
|
7427
7637
|
<xsl:attribute-set name="appendix-example-style">
|
|
7428
7638
|
</xsl:attribute-set>
|
|
7429
7639
|
|
|
7640
|
+
<xsl:template name="refine_appendix-example-style">
|
|
7641
|
+
</xsl:template>
|
|
7642
|
+
|
|
7430
7643
|
<!-- ======================== -->
|
|
7431
7644
|
<!-- Appendix processing -->
|
|
7432
7645
|
<!-- ======================== -->
|
|
7433
7646
|
<xsl:template match="mn:appendix">
|
|
7434
7647
|
<xsl:call-template name="setNamedDestination"/>
|
|
7435
7648
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
|
7649
|
+
<xsl:call-template name="refine_appendix-style"/>
|
|
7436
7650
|
<xsl:apply-templates select="mn:fmt-title"/>
|
|
7437
7651
|
</fo:block>
|
|
7438
7652
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
|
@@ -7451,6 +7665,7 @@
|
|
|
7451
7665
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
|
7452
7666
|
<xsl:call-template name="setNamedDestination"/>
|
|
7453
7667
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
|
7668
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
|
7454
7669
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
7455
7670
|
</fo:block>
|
|
7456
7671
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
@@ -7458,7 +7673,16 @@
|
|
|
7458
7673
|
|
|
7459
7674
|
<xsl:attribute-set name="xref-style">
|
|
7460
7675
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
7461
|
-
</xsl:attribute-set>
|
|
7676
|
+
</xsl:attribute-set> <!-- xref-style -->
|
|
7677
|
+
|
|
7678
|
+
<xsl:template name="refine_xref-style">
|
|
7679
|
+
<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])">
|
|
7680
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
7681
|
+
</xsl:if>
|
|
7682
|
+
<xsl:if test="parent::mn:add">
|
|
7683
|
+
<xsl:call-template name="append_add-style"/>
|
|
7684
|
+
</xsl:if>
|
|
7685
|
+
</xsl:template> <!-- refine_xref-style -->
|
|
7462
7686
|
|
|
7463
7687
|
<xsl:template match="mn:fmt-xref">
|
|
7464
7688
|
<xsl:call-template name="insert_basic_link">
|
|
@@ -7467,12 +7691,8 @@
|
|
|
7467
7691
|
<xsl:call-template name="getAltText"/>
|
|
7468
7692
|
</xsl:variable>
|
|
7469
7693
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
|
7470
|
-
<xsl:
|
|
7471
|
-
|
|
7472
|
-
</xsl:if>
|
|
7473
|
-
<xsl:if test="parent::mn:add">
|
|
7474
|
-
<xsl:call-template name="append_add-style"/>
|
|
7475
|
-
</xsl:if>
|
|
7694
|
+
<xsl:call-template name="refine_xref-style"/>
|
|
7695
|
+
|
|
7476
7696
|
<xsl:apply-templates/>
|
|
7477
7697
|
</fo:basic-link>
|
|
7478
7698
|
</xsl:with-param>
|
|
@@ -7585,17 +7805,17 @@
|
|
|
7585
7805
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
7586
7806
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
7587
7807
|
<xsl:attribute name="line-height">115%</xsl:attribute>
|
|
7588
|
-
</xsl:attribute-set>
|
|
7808
|
+
</xsl:attribute-set> <!-- note-style -->
|
|
7589
7809
|
|
|
7590
7810
|
<xsl:template name="refine_note-style">
|
|
7591
|
-
</xsl:template>
|
|
7811
|
+
</xsl:template> <!-- refine_note-style -->
|
|
7592
7812
|
|
|
7593
7813
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
|
7594
7814
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
|
7595
7815
|
|
|
7596
7816
|
<xsl:attribute-set name="note-name-style">
|
|
7597
7817
|
<xsl:attribute name="padding-right">4mm</xsl:attribute>
|
|
7598
|
-
</xsl:attribute-set>
|
|
7818
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
|
7599
7819
|
|
|
7600
7820
|
<xsl:template name="refine_note-name-style">
|
|
7601
7821
|
</xsl:template> <!-- refine_note-name-style -->
|
|
@@ -7610,18 +7830,21 @@
|
|
|
7610
7830
|
<xsl:attribute-set name="note-p-style">
|
|
7611
7831
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
7612
7832
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
7613
|
-
</xsl:attribute-set>
|
|
7833
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
|
7834
|
+
|
|
7835
|
+
<xsl:template name="refine_note-p-style">
|
|
7836
|
+
</xsl:template>
|
|
7614
7837
|
|
|
7615
7838
|
<xsl:attribute-set name="termnote-style">
|
|
7616
7839
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
7617
7840
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
7618
|
-
</xsl:attribute-set>
|
|
7841
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
|
7619
7842
|
|
|
7620
7843
|
<xsl:template name="refine_termnote-style">
|
|
7621
7844
|
</xsl:template> <!-- refine_termnote-style -->
|
|
7622
7845
|
|
|
7623
7846
|
<xsl:attribute-set name="termnote-name-style">
|
|
7624
|
-
</xsl:attribute-set>
|
|
7847
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
|
7625
7848
|
|
|
7626
7849
|
<xsl:template name="refine_termnote-name-style">
|
|
7627
7850
|
</xsl:template>
|
|
@@ -7629,6 +7852,9 @@
|
|
|
7629
7852
|
<xsl:attribute-set name="termnote-p-style">
|
|
7630
7853
|
</xsl:attribute-set>
|
|
7631
7854
|
|
|
7855
|
+
<xsl:template name="refine_termnote-p-style">
|
|
7856
|
+
</xsl:template>
|
|
7857
|
+
|
|
7632
7858
|
<!-- ====== -->
|
|
7633
7859
|
<!-- note -->
|
|
7634
7860
|
<!-- termnote -->
|
|
@@ -7692,11 +7918,13 @@
|
|
|
7692
7918
|
<xsl:choose>
|
|
7693
7919
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
|
7694
7920
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
|
7921
|
+
<xsl:call-template name="refine_note-p-style"/>
|
|
7695
7922
|
<xsl:apply-templates/>
|
|
7696
7923
|
</fo:inline>
|
|
7697
7924
|
</xsl:when>
|
|
7698
7925
|
<xsl:otherwise>
|
|
7699
7926
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
|
7927
|
+
<xsl:call-template name="refine_note-p-style"/>
|
|
7700
7928
|
<xsl:apply-templates/>
|
|
7701
7929
|
</fo:block>
|
|
7702
7930
|
</xsl:otherwise>
|
|
@@ -7788,11 +8016,13 @@
|
|
|
7788
8016
|
<xsl:choose>
|
|
7789
8017
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
|
7790
8018
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
|
8019
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
|
7791
8020
|
<xsl:apply-templates/>
|
|
7792
8021
|
</fo:inline>
|
|
7793
8022
|
</xsl:when>
|
|
7794
8023
|
<xsl:otherwise>
|
|
7795
8024
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
|
8025
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
|
7796
8026
|
<xsl:apply-templates/>
|
|
7797
8027
|
</fo:block>
|
|
7798
8028
|
</xsl:otherwise>
|
|
@@ -7807,7 +8037,7 @@
|
|
|
7807
8037
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
|
7808
8038
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
7809
8039
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
|
7810
|
-
</xsl:attribute-set>
|
|
8040
|
+
</xsl:attribute-set> <!-- quote-style -->
|
|
7811
8041
|
|
|
7812
8042
|
<xsl:template name="refine_quote-style">
|
|
7813
8043
|
</xsl:template>
|
|
@@ -7817,6 +8047,9 @@
|
|
|
7817
8047
|
<xsl:attribute name="margin-right">25mm</xsl:attribute>
|
|
7818
8048
|
</xsl:attribute-set>
|
|
7819
8049
|
|
|
8050
|
+
<xsl:template name="refine_quote-source-style">
|
|
8051
|
+
</xsl:template>
|
|
8052
|
+
|
|
7820
8053
|
<!-- ====== -->
|
|
7821
8054
|
<!-- quote -->
|
|
7822
8055
|
<!-- source -->
|
|
@@ -7845,6 +8078,7 @@
|
|
|
7845
8078
|
</fo:block-container>
|
|
7846
8079
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
|
7847
8080
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
|
8081
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
|
7848
8082
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
|
7849
8083
|
<xsl:apply-templates select="mn:author"/>
|
|
7850
8084
|
<xsl:apply-templates select="mn:fmt-source"/>
|
|
@@ -7907,6 +8141,15 @@
|
|
|
7907
8141
|
<xsl:attribute-set name="figure-style">
|
|
7908
8142
|
</xsl:attribute-set>
|
|
7909
8143
|
|
|
8144
|
+
<xsl:template name="refine_figure-style">
|
|
8145
|
+
</xsl:template>
|
|
8146
|
+
|
|
8147
|
+
<xsl:attribute-set name="figure-number-style">
|
|
8148
|
+
</xsl:attribute-set>
|
|
8149
|
+
|
|
8150
|
+
<xsl:template name="refine_figure-number-style">
|
|
8151
|
+
</xsl:template>
|
|
8152
|
+
|
|
7910
8153
|
<xsl:attribute-set name="figure-name-style">
|
|
7911
8154
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
|
7912
8155
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
@@ -7915,7 +8158,7 @@
|
|
|
7915
8158
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
|
7916
8159
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
|
7917
8160
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
7918
|
-
</xsl:attribute-set>
|
|
8161
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
|
7919
8162
|
|
|
7920
8163
|
<xsl:template name="refine_figure-name-style">
|
|
7921
8164
|
</xsl:template> <!-- refine_figure-name-style -->
|
|
@@ -7923,7 +8166,7 @@
|
|
|
7923
8166
|
<xsl:attribute-set name="image-style">
|
|
7924
8167
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
|
7925
8168
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
7926
|
-
</xsl:attribute-set>
|
|
8169
|
+
</xsl:attribute-set> <!-- image-style -->
|
|
7927
8170
|
|
|
7928
8171
|
<xsl:template name="refine_image-style">
|
|
7929
8172
|
</xsl:template>
|
|
@@ -7933,14 +8176,51 @@
|
|
|
7933
8176
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
7934
8177
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
7935
8178
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
|
7936
|
-
</xsl:attribute-set>
|
|
8179
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
|
8180
|
+
|
|
8181
|
+
<xsl:template name="refine_image-graphic-style">
|
|
8182
|
+
</xsl:template>
|
|
7937
8183
|
|
|
7938
8184
|
<xsl:attribute-set name="figure-source-style">
|
|
7939
8185
|
</xsl:attribute-set>
|
|
7940
8186
|
|
|
8187
|
+
<xsl:template name="refine_figure-source-style">
|
|
8188
|
+
</xsl:template>
|
|
8189
|
+
|
|
7941
8190
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
|
7942
8191
|
</xsl:attribute-set>
|
|
7943
8192
|
|
|
8193
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
|
8194
|
+
</xsl:template>
|
|
8195
|
+
|
|
8196
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
|
8197
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
|
8198
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
|
8199
|
+
|
|
8200
|
+
<xsl:template name="refine_figure-fn-number-style">
|
|
8201
|
+
</xsl:template>
|
|
8202
|
+
|
|
8203
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
|
8204
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
8205
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
8206
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
|
8207
|
+
|
|
8208
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
|
8209
|
+
</xsl:template>
|
|
8210
|
+
|
|
8211
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
|
8212
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
|
8213
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
8214
|
+
</xsl:attribute-set>
|
|
8215
|
+
|
|
8216
|
+
<xsl:template name="refine_figure-fn-body-style">
|
|
8217
|
+
<xsl:variable name="key_iso">
|
|
8218
|
+
</xsl:variable>
|
|
8219
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
8220
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
|
8221
|
+
</xsl:if>
|
|
8222
|
+
</xsl:template>
|
|
8223
|
+
|
|
7944
8224
|
<!-- ============================ -->
|
|
7945
8225
|
<!-- figure's footnotes rendering -->
|
|
7946
8226
|
<!-- ============================ -->
|
|
@@ -8053,9 +8333,8 @@
|
|
|
8053
8333
|
</fo:table-cell>
|
|
8054
8334
|
<fo:table-cell>
|
|
8055
8335
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
|
8056
|
-
<xsl:
|
|
8057
|
-
|
|
8058
|
-
</xsl:if>
|
|
8336
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
|
8337
|
+
|
|
8059
8338
|
<!-- <xsl:copy-of select="./node()"/> -->
|
|
8060
8339
|
<xsl:apply-templates/>
|
|
8061
8340
|
</fo:block>
|
|
@@ -8073,6 +8352,7 @@
|
|
|
8073
8352
|
<xsl:param name="process">false</xsl:param>
|
|
8074
8353
|
<xsl:if test="$process = 'true'">
|
|
8075
8354
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
|
8355
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
|
8076
8356
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
|
8077
8357
|
|
|
8078
8358
|
<!-- tab is padding-right -->
|
|
@@ -8110,6 +8390,7 @@
|
|
|
8110
8390
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
|
8111
8391
|
</xsl:if>
|
|
8112
8392
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
|
8393
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
|
8113
8394
|
<!-- <xsl:value-of select="@reference"/> -->
|
|
8114
8395
|
<xsl:apply-templates/>
|
|
8115
8396
|
</fo:inline>
|
|
@@ -8155,6 +8436,8 @@
|
|
|
8155
8436
|
|
|
8156
8437
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
|
8157
8438
|
|
|
8439
|
+
<xsl:call-template name="refine_figure-style"/>
|
|
8440
|
+
|
|
8158
8441
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
8159
8442
|
<xsl:call-template name="setIDforNamedDestination"/>
|
|
8160
8443
|
</xsl:for-each>
|
|
@@ -8198,6 +8481,7 @@
|
|
|
8198
8481
|
|
|
8199
8482
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
|
8200
8483
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
|
8484
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
|
8201
8485
|
<xsl:apply-templates/>
|
|
8202
8486
|
</fo:block>
|
|
8203
8487
|
</xsl:template>
|
|
@@ -8327,6 +8611,8 @@
|
|
|
8327
8611
|
</xsl:variable>
|
|
8328
8612
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
|
8329
8613
|
|
|
8614
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
|
8615
|
+
|
|
8330
8616
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
|
8331
8617
|
<xsl:variable name="scale">
|
|
8332
8618
|
<xsl:call-template name="getImageScale">
|
|
@@ -9026,6 +9312,9 @@
|
|
|
9026
9312
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
9027
9313
|
</xsl:attribute-set> <!-- formula-style -->
|
|
9028
9314
|
|
|
9315
|
+
<xsl:template name="refine_formula-style">
|
|
9316
|
+
</xsl:template>
|
|
9317
|
+
|
|
9029
9318
|
<xsl:attribute-set name="formula-stem-block-style">
|
|
9030
9319
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
9031
9320
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
@@ -9096,6 +9385,8 @@
|
|
|
9096
9385
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
|
9097
9386
|
<fo:block xsl:use-attribute-sets="formula-style">
|
|
9098
9387
|
|
|
9388
|
+
<xsl:call-template name="refine_formula-style"/>
|
|
9389
|
+
|
|
9099
9390
|
<fo:table table-layout="fixed" width="100%">
|
|
9100
9391
|
<fo:table-column column-width="95%"/>
|
|
9101
9392
|
<fo:table-column column-width="5%"/>
|
|
@@ -9515,6 +9806,9 @@
|
|
|
9515
9806
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
9516
9807
|
</xsl:attribute-set> <!-- list-name-style -->
|
|
9517
9808
|
|
|
9809
|
+
<xsl:template name="refine_list-name-style">
|
|
9810
|
+
</xsl:template>
|
|
9811
|
+
|
|
9518
9812
|
<xsl:attribute-set name="list-item-style">
|
|
9519
9813
|
</xsl:attribute-set>
|
|
9520
9814
|
|
|
@@ -9814,6 +10108,7 @@
|
|
|
9814
10108
|
<xsl:param name="process">false</xsl:param>
|
|
9815
10109
|
<xsl:if test="$process = 'true'">
|
|
9816
10110
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
|
10111
|
+
<xsl:call-template name="refine_list-name-style"/>
|
|
9817
10112
|
<xsl:apply-templates/>
|
|
9818
10113
|
</fo:block>
|
|
9819
10114
|
</xsl:if>
|
|
@@ -9874,24 +10169,45 @@
|
|
|
9874
10169
|
<!-- END Lists processing -->
|
|
9875
10170
|
<!-- ===================================== -->
|
|
9876
10171
|
|
|
10172
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
|
10173
|
+
</xsl:attribute-set>
|
|
10174
|
+
|
|
10175
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
|
10176
|
+
</xsl:template>
|
|
10177
|
+
|
|
10178
|
+
<xsl:attribute-set name="fn-container-body-style">
|
|
10179
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
|
10180
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
|
10181
|
+
</xsl:attribute-set>
|
|
10182
|
+
|
|
10183
|
+
<xsl:template name="refine_fn-container-body-style">
|
|
10184
|
+
</xsl:template>
|
|
10185
|
+
|
|
9877
10186
|
<xsl:attribute-set name="fn-reference-style">
|
|
9878
10187
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
|
9879
10188
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
9880
|
-
|
|
9881
|
-
</xsl:attribute-set>
|
|
10189
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
|
9882
10190
|
|
|
9883
10191
|
<xsl:template name="refine_fn-reference-style">
|
|
10192
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
|
10193
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
|
9884
10194
|
</xsl:template> <!-- refine_fn-reference-style -->
|
|
9885
10195
|
|
|
9886
10196
|
<xsl:attribute-set name="fn-style">
|
|
9887
10197
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
9888
10198
|
</xsl:attribute-set>
|
|
9889
10199
|
|
|
10200
|
+
<xsl:template name="refine_fn-style">
|
|
10201
|
+
</xsl:template>
|
|
10202
|
+
|
|
9890
10203
|
<xsl:attribute-set name="fn-num-style">
|
|
9891
10204
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
9892
10205
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
|
9893
10206
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
9894
|
-
</xsl:attribute-set>
|
|
10207
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
|
10208
|
+
|
|
10209
|
+
<xsl:template name="refine_fn-num-style">
|
|
10210
|
+
</xsl:template>
|
|
9895
10211
|
|
|
9896
10212
|
<xsl:attribute-set name="fn-body-style">
|
|
9897
10213
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
@@ -9903,7 +10219,7 @@
|
|
|
9903
10219
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
9904
10220
|
<xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
|
|
9905
10221
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
9906
|
-
</xsl:attribute-set>
|
|
10222
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
|
9907
10223
|
|
|
9908
10224
|
<xsl:template name="refine_fn-body-style">
|
|
9909
10225
|
</xsl:template> <!-- refine_fn-body-style -->
|
|
@@ -9967,10 +10283,12 @@
|
|
|
9967
10283
|
<xsl:choose>
|
|
9968
10284
|
<xsl:when test="ancestor::mn:bibitem">
|
|
9969
10285
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
|
10286
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
|
9970
10287
|
</fn_styles>
|
|
9971
10288
|
</xsl:when>
|
|
9972
10289
|
<xsl:otherwise>
|
|
9973
10290
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
|
10291
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
|
9974
10292
|
</fn_styles>
|
|
9975
10293
|
</xsl:otherwise>
|
|
9976
10294
|
</xsl:choose>
|
|
@@ -9980,9 +10298,12 @@
|
|
|
9980
10298
|
<xsl:copy-of select="."/>
|
|
9981
10299
|
</xsl:for-each>
|
|
9982
10300
|
|
|
9983
|
-
|
|
10301
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
|
10302
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
|
9984
10303
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
|
9985
|
-
</xsl:if>
|
|
10304
|
+
</xsl:if> -->
|
|
10305
|
+
|
|
10306
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
|
9986
10307
|
|
|
9987
10308
|
<xsl:call-template name="insert_basic_link">
|
|
9988
10309
|
<xsl:with-param name="element">
|
|
@@ -10005,10 +10326,12 @@
|
|
|
10005
10326
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
|
10006
10327
|
|
|
10007
10328
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
|
10329
|
+
<xsl:call-template name="refine_fn-style"/>
|
|
10008
10330
|
<xsl:copy-of select="$footnote_inline"/>
|
|
10009
10331
|
<fo:footnote-body role="Note">
|
|
10010
10332
|
|
|
10011
10333
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
|
10334
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
|
10012
10335
|
|
|
10013
10336
|
<xsl:variable name="fn_block">
|
|
10014
10337
|
<xsl:call-template name="refine_fn-body-style"/>
|
|
@@ -10110,6 +10433,9 @@
|
|
|
10110
10433
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
10111
10434
|
</xsl:attribute-set> <!-- admonition-style -->
|
|
10112
10435
|
|
|
10436
|
+
<xsl:template name="refine_admonition-style">
|
|
10437
|
+
</xsl:template>
|
|
10438
|
+
|
|
10113
10439
|
<xsl:attribute-set name="admonition-container-style">
|
|
10114
10440
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
10115
10441
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
@@ -10117,6 +10443,9 @@
|
|
|
10117
10443
|
<xsl:attribute name="padding-top">3mm</xsl:attribute>
|
|
10118
10444
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
|
10119
10445
|
|
|
10446
|
+
<xsl:template name="refine_admonition-container-style">
|
|
10447
|
+
</xsl:template>
|
|
10448
|
+
|
|
10120
10449
|
<xsl:attribute-set name="admonition-name-style">
|
|
10121
10450
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
10122
10451
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
@@ -10126,9 +10455,16 @@
|
|
|
10126
10455
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
10127
10456
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
|
10128
10457
|
|
|
10458
|
+
<xsl:template name="refine_admonition-name-style">
|
|
10459
|
+
</xsl:template>
|
|
10460
|
+
|
|
10129
10461
|
<xsl:attribute-set name="admonition-p-style">
|
|
10130
10462
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
|
10131
10463
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
|
10464
|
+
|
|
10465
|
+
<xsl:template name="refine_admonition-p-style">
|
|
10466
|
+
</xsl:template>
|
|
10467
|
+
|
|
10132
10468
|
<!-- end admonition -->
|
|
10133
10469
|
|
|
10134
10470
|
<!-- ================ -->
|
|
@@ -10138,8 +10474,12 @@
|
|
|
10138
10474
|
<xsl:call-template name="setNamedDestination"/>
|
|
10139
10475
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
|
10140
10476
|
|
|
10477
|
+
<xsl:call-template name="refine_admonition-style"/>
|
|
10478
|
+
|
|
10141
10479
|
<xsl:call-template name="setBlockSpanAll"/>
|
|
10142
10480
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
|
10481
|
+
|
|
10482
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
|
10143
10483
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
|
10144
10484
|
<fo:block>
|
|
10145
10485
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
@@ -10202,6 +10542,13 @@
|
|
|
10202
10542
|
<!-- END Admonition -->
|
|
10203
10543
|
<!-- ================ -->
|
|
10204
10544
|
|
|
10545
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
|
10546
|
+
</xsl:attribute-set>
|
|
10547
|
+
|
|
10548
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
|
10549
|
+
|
|
10550
|
+
</xsl:template>
|
|
10551
|
+
|
|
10205
10552
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
10206
10553
|
<xsl:attribute-set name="bibitem-normative-style">
|
|
10207
10554
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
@@ -10210,34 +10557,55 @@
|
|
|
10210
10557
|
<xsl:attribute name="line-height">145%</xsl:attribute>
|
|
10211
10558
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
|
10212
10559
|
|
|
10560
|
+
<xsl:template name="refine_bibitem-normative-style">
|
|
10561
|
+
</xsl:template>
|
|
10562
|
+
|
|
10213
10563
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
|
10214
10564
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
|
10215
10565
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
|
10216
10566
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
10217
10567
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
|
10218
10568
|
|
|
10569
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
|
10570
|
+
</xsl:template>
|
|
10571
|
+
|
|
10219
10572
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
|
10220
10573
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
10221
10574
|
<xsl:attribute name="line-height">145%</xsl:attribute>
|
|
10222
10575
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
|
10223
10576
|
|
|
10577
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
|
10578
|
+
</xsl:template>
|
|
10579
|
+
|
|
10224
10580
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
|
10225
10581
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
|
10226
10582
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
|
10227
10583
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
10228
10584
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
|
10229
10585
|
|
|
10586
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
|
10587
|
+
</xsl:template>
|
|
10588
|
+
|
|
10230
10589
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
|
10231
10590
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
10232
10591
|
</xsl:attribute-set>
|
|
10233
10592
|
|
|
10593
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
|
10594
|
+
</xsl:template>
|
|
10595
|
+
|
|
10234
10596
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
|
10235
10597
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
|
10236
10598
|
</xsl:attribute-set>
|
|
10237
10599
|
|
|
10600
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
|
10601
|
+
</xsl:template>
|
|
10602
|
+
|
|
10238
10603
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
|
10239
10604
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
|
10240
10605
|
|
|
10606
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
|
10607
|
+
</xsl:template>
|
|
10608
|
+
|
|
10241
10609
|
<!-- footnote reference number for bibitem, in the text -->
|
|
10242
10610
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
|
10243
10611
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
|
@@ -10245,6 +10613,9 @@
|
|
|
10245
10613
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
10246
10614
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
|
10247
10615
|
|
|
10616
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
|
10617
|
+
</xsl:template>
|
|
10618
|
+
|
|
10248
10619
|
<!-- footnote number on the page bottom -->
|
|
10249
10620
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
|
10250
10621
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
|
@@ -10265,6 +10636,9 @@
|
|
|
10265
10636
|
<xsl:attribute name="line-height">145%</xsl:attribute>
|
|
10266
10637
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
|
10267
10638
|
|
|
10639
|
+
<xsl:template name="refine_references-non-normative-style">
|
|
10640
|
+
</xsl:template>
|
|
10641
|
+
|
|
10268
10642
|
<!-- ======================= -->
|
|
10269
10643
|
<!-- Bibliography rendering -->
|
|
10270
10644
|
<!-- ======================= -->
|
|
@@ -10306,6 +10680,7 @@
|
|
|
10306
10680
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
|
10307
10681
|
|
|
10308
10682
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
|
10683
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
|
10309
10684
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
|
10310
10685
|
</fo:block>
|
|
10311
10686
|
</xsl:template> <!-- references -->
|
|
@@ -10319,31 +10694,39 @@
|
|
|
10319
10694
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
|
10320
10695
|
<xsl:call-template name="setNamedDestination"/>
|
|
10321
10696
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
|
10697
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
|
10698
|
+
|
|
10322
10699
|
<xsl:call-template name="processBibitem"/>
|
|
10323
10700
|
</fo:block>
|
|
10324
10701
|
|
|
10325
10702
|
</xsl:template> <!-- bibitem -->
|
|
10326
10703
|
|
|
10327
10704
|
<!-- Bibliography (non-normative references) -->
|
|
10328
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
|
10705
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
|
10329
10706
|
<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 -->
|
|
10330
10707
|
<!-- start CSA bibitem processing -->
|
|
10331
10708
|
<xsl:call-template name="setNamedDestination"/>
|
|
10332
10709
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
|
|
10710
|
+
<xsl:call-template name="refine_bibitem-non-normative-style"/>
|
|
10333
10711
|
<xsl:apply-templates select="mn:biblio-tag"/>
|
|
10334
10712
|
<xsl:apply-templates select="mn:formattedref"/>
|
|
10335
|
-
<xsl:call-template name="processBibliographyNote"/>
|
|
10336
10713
|
</fo:block>
|
|
10714
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
|
10337
10715
|
<!-- END CSA bibitem processing -->
|
|
10338
10716
|
|
|
10339
10717
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
|
10340
10718
|
|
|
10719
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
|
10720
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
|
10721
|
+
|
|
10341
10722
|
<xsl:template name="insertListItem_Bibitem">
|
|
10342
10723
|
<xsl:choose>
|
|
10343
10724
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
|
10344
10725
|
<xsl:otherwise>
|
|
10345
10726
|
<xsl:call-template name="setNamedDestination"/>
|
|
10346
10727
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
|
10728
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
|
10729
|
+
|
|
10347
10730
|
<fo:list-item-label end-indent="label-end()">
|
|
10348
10731
|
<fo:block role="SKIP">
|
|
10349
10732
|
<fo:inline role="SKIP">
|
|
@@ -10354,16 +10737,18 @@
|
|
|
10354
10737
|
</fo:block>
|
|
10355
10738
|
</fo:list-item-label>
|
|
10356
10739
|
<fo:list-item-body start-indent="body-start()">
|
|
10357
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
|
10740
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
|
10741
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
|
10358
10742
|
<xsl:call-template name="processBibitem">
|
|
10359
10743
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
|
10360
10744
|
</xsl:call-template>
|
|
10361
10745
|
</fo:block>
|
|
10746
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
|
10362
10747
|
</fo:list-item-body>
|
|
10363
10748
|
</fo:list-item>
|
|
10364
10749
|
</xsl:otherwise>
|
|
10365
10750
|
</xsl:choose>
|
|
10366
|
-
<xsl:apply-templates select="following-sibling::*[
|
|
10751
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
|
10367
10752
|
<xsl:with-param name="skip">false</xsl:with-param>
|
|
10368
10753
|
</xsl:apply-templates>
|
|
10369
10754
|
</xsl:template>
|
|
@@ -10379,25 +10764,16 @@
|
|
|
10379
10764
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
|
10380
10765
|
</xsl:apply-templates>
|
|
10381
10766
|
<xsl:apply-templates select="mn:formattedref"/>
|
|
10767
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
|
10382
10768
|
<!-- end bibitem processing -->
|
|
10383
|
-
|
|
10384
|
-
<xsl:call-template name="processBibliographyNote"/>
|
|
10385
10769
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
|
10386
10770
|
|
|
10387
|
-
<xsl:template name="
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
<xsl:copy> <!-- skip @id -->
|
|
10392
|
-
<xsl:copy-of select="node()"/>
|
|
10393
|
-
</xsl:copy>
|
|
10394
|
-
</xsl:element>
|
|
10395
|
-
</xsl:variable>
|
|
10396
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
|
10397
|
-
<xsl:call-template name="note"/>
|
|
10398
|
-
</xsl:for-each> -->
|
|
10771
|
+
<xsl:template name="processBibitemFollowingNotes">
|
|
10772
|
+
<!-- current context is bibitem element -->
|
|
10773
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
|
10774
|
+
<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]]">
|
|
10399
10775
|
<xsl:call-template name="note"/>
|
|
10400
|
-
</xsl:
|
|
10776
|
+
</xsl:for-each>
|
|
10401
10777
|
</xsl:template>
|
|
10402
10778
|
|
|
10403
10779
|
<xsl:template match="mn:title" mode="title">
|
|
@@ -10597,11 +10973,17 @@
|
|
|
10597
10973
|
<!-- Index section styles -->
|
|
10598
10974
|
<xsl:attribute-set name="indexsect-title-style">
|
|
10599
10975
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
10600
|
-
</xsl:attribute-set>
|
|
10976
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
|
10977
|
+
|
|
10978
|
+
<xsl:template name="refine_indexsect-title-style">
|
|
10979
|
+
</xsl:template>
|
|
10601
10980
|
|
|
10602
10981
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
|
10603
10982
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
10604
|
-
</xsl:attribute-set>
|
|
10983
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
|
10984
|
+
|
|
10985
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
|
10986
|
+
</xsl:template>
|
|
10605
10987
|
<!-- End Index section styles -->
|
|
10606
10988
|
|
|
10607
10989
|
<!-- =================== -->
|
|
@@ -10795,6 +11177,7 @@
|
|
|
10795
11177
|
|
|
10796
11178
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
|
10797
11179
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
|
11180
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
|
10798
11181
|
<!-- Index -->
|
|
10799
11182
|
<xsl:apply-templates/>
|
|
10800
11183
|
</fo:block>
|
|
@@ -10803,6 +11186,7 @@
|
|
|
10803
11186
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
|
10804
11187
|
<!-- Letter A, B, C, ... -->
|
|
10805
11188
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
|
11189
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
|
10806
11190
|
<xsl:apply-templates/>
|
|
10807
11191
|
</fo:block>
|
|
10808
11192
|
</xsl:template>
|
|
@@ -11014,9 +11398,15 @@
|
|
|
11014
11398
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
|
11015
11399
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
|
11016
11400
|
|
|
11401
|
+
<xsl:template name="refine_toc-leader-style">
|
|
11402
|
+
</xsl:template>
|
|
11403
|
+
|
|
11017
11404
|
<xsl:attribute-set name="toc-pagenumber-style">
|
|
11018
11405
|
</xsl:attribute-set>
|
|
11019
11406
|
|
|
11407
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
|
11408
|
+
</xsl:template>
|
|
11409
|
+
|
|
11020
11410
|
<!-- List of Figures, Tables -->
|
|
11021
11411
|
<xsl:attribute-set name="toc-listof-title-style">
|
|
11022
11412
|
<xsl:attribute name="provisional-distance-between-starts">3mm</xsl:attribute>
|
|
@@ -11029,6 +11419,9 @@
|
|
|
11029
11419
|
<xsl:attribute name="provisional-distance-between-starts">10mm</xsl:attribute>
|
|
11030
11420
|
</xsl:attribute-set>
|
|
11031
11421
|
|
|
11422
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
|
11423
|
+
</xsl:template>
|
|
11424
|
+
|
|
11032
11425
|
<xsl:attribute-set name="toc-listof-item-style">
|
|
11033
11426
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
|
11034
11427
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
|
@@ -11036,6 +11429,9 @@
|
|
|
11036
11429
|
<xsl:attribute name="text-indent">-12mm</xsl:attribute>
|
|
11037
11430
|
</xsl:attribute-set>
|
|
11038
11431
|
|
|
11432
|
+
<xsl:template name="refine_toc-listof-item-style">
|
|
11433
|
+
</xsl:template>
|
|
11434
|
+
|
|
11039
11435
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
11040
11436
|
<xsl:variable name="nodes_preface_">
|
|
11041
11437
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
|
@@ -12143,23 +12539,55 @@
|
|
|
12143
12539
|
<!-- Ruby text (CJK languages) rendering -->
|
|
12144
12540
|
<!-- ===================================== -->
|
|
12145
12541
|
<!-- ===================================== -->
|
|
12542
|
+
|
|
12543
|
+
<xsl:attribute-set name="ruby-style">
|
|
12544
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
|
12545
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
|
12546
|
+
</xsl:attribute-set>
|
|
12547
|
+
|
|
12548
|
+
<xsl:template name="refine_ruby-style">
|
|
12549
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
|
12550
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
|
12551
|
+
</xsl:if>
|
|
12552
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
|
12553
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
|
12554
|
+
<!-- Example: width="2em" -->
|
|
12555
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
|
12556
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
|
12557
|
+
<xsl:variable name="text_width">
|
|
12558
|
+
<xsl:choose>
|
|
12559
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
|
12560
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
|
12561
|
+
</xsl:choose>
|
|
12562
|
+
</xsl:variable>
|
|
12563
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
|
12564
|
+
</xsl:template> <!-- refine_ruby-style -->
|
|
12565
|
+
|
|
12566
|
+
<xsl:attribute-set name="rb-style">
|
|
12567
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
|
12568
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
12569
|
+
</xsl:attribute-set>
|
|
12570
|
+
|
|
12571
|
+
<xsl:template name="refine_rb-style">
|
|
12572
|
+
</xsl:template>
|
|
12573
|
+
|
|
12574
|
+
<xsl:attribute-set name="rt-style">
|
|
12575
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
|
12576
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
|
12577
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
|
12578
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
|
12579
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
|
12580
|
+
</xsl:attribute-set>
|
|
12581
|
+
|
|
12582
|
+
<xsl:template name="refine_rt-style">
|
|
12583
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
|
12584
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
|
12585
|
+
</xsl:if>
|
|
12586
|
+
</xsl:template>
|
|
12587
|
+
|
|
12146
12588
|
<xsl:template match="mn:ruby">
|
|
12147
|
-
<fo:inline-container
|
|
12148
|
-
<xsl:
|
|
12149
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
|
12150
|
-
</xsl:if>
|
|
12151
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
|
12152
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
|
12153
|
-
<!-- Example: width="2em" -->
|
|
12154
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
|
12155
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
|
12156
|
-
<xsl:variable name="text_width">
|
|
12157
|
-
<xsl:choose>
|
|
12158
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
|
12159
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
|
12160
|
-
</xsl:choose>
|
|
12161
|
-
</xsl:variable>
|
|
12162
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
|
12589
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
|
12590
|
+
<xsl:call-template name="refine_ruby-style"/>
|
|
12163
12591
|
|
|
12164
12592
|
<xsl:choose>
|
|
12165
12593
|
<xsl:when test="ancestor::mn:ruby">
|
|
@@ -12177,17 +12605,14 @@
|
|
|
12177
12605
|
</xsl:template>
|
|
12178
12606
|
|
|
12179
12607
|
<xsl:template match="mn:rb">
|
|
12180
|
-
<fo:block
|
|
12608
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
|
12181
12609
|
</xsl:template>
|
|
12182
12610
|
|
|
12183
12611
|
<xsl:template match="mn:rt">
|
|
12184
|
-
<fo:block
|
|
12185
|
-
<xsl:
|
|
12186
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
|
12187
|
-
</xsl:if>
|
|
12612
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
|
12613
|
+
<xsl:call-template name="refine_rt-style"/>
|
|
12188
12614
|
<xsl:apply-templates/>
|
|
12189
12615
|
</fo:block>
|
|
12190
|
-
|
|
12191
12616
|
</xsl:template>
|
|
12192
12617
|
|
|
12193
12618
|
<!-- ===================================== -->
|
|
@@ -12196,6 +12621,18 @@
|
|
|
12196
12621
|
<!-- ===================================== -->
|
|
12197
12622
|
<!-- ===================================== -->
|
|
12198
12623
|
|
|
12624
|
+
<xsl:attribute-set name="annex-title-style">
|
|
12625
|
+
</xsl:attribute-set>
|
|
12626
|
+
|
|
12627
|
+
<xsl:template name="refine_annex-title-style">
|
|
12628
|
+
</xsl:template>
|
|
12629
|
+
|
|
12630
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
|
12631
|
+
</xsl:attribute-set>
|
|
12632
|
+
|
|
12633
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
|
12634
|
+
</xsl:template>
|
|
12635
|
+
|
|
12199
12636
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
12200
12637
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
12201
12638
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
@@ -12534,10 +12971,17 @@
|
|
|
12534
12971
|
</xsl:choose>
|
|
12535
12972
|
</xsl:template>
|
|
12536
12973
|
|
|
12974
|
+
<xsl:attribute-set name="clause-style">
|
|
12975
|
+
|
|
12976
|
+
</xsl:attribute-set>
|
|
12977
|
+
|
|
12978
|
+
<xsl:template name="refine_clause-style">
|
|
12979
|
+
</xsl:template>
|
|
12980
|
+
|
|
12537
12981
|
<!-- main sections -->
|
|
12538
12982
|
<xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
|
|
12539
12983
|
<xsl:call-template name="setNamedDestination"/>
|
|
12540
|
-
<fo:block>
|
|
12984
|
+
<fo:block role="Sect">
|
|
12541
12985
|
<xsl:call-template name="setId"/>
|
|
12542
12986
|
|
|
12543
12987
|
<xsl:call-template name="sections_element_style"/>
|
|
@@ -12665,6 +13109,10 @@
|
|
|
12665
13109
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
|
12666
13110
|
</xsl:template>
|
|
12667
13111
|
|
|
13112
|
+
<!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
|
|
13113
|
+
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
|
|
13114
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
|
13115
|
+
|
|
12668
13116
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
12669
13117
|
<xsl:template name="insert_basic_link">
|
|
12670
13118
|
<xsl:param name="element"/>
|