metanorma-ogc 2.8.1 → 2.8.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/ogc/metadata.rb +2 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +694 -193
- data/lib/isodoc/ogc/ogc.best-practice.xsl +694 -193
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +694 -193
- data/lib/isodoc/ogc/ogc.community-practice.xsl +694 -193
- data/lib/isodoc/ogc/ogc.community-standard.xsl +694 -193
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +694 -193
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +694 -193
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +694 -193
- data/lib/isodoc/ogc/ogc.other.xsl +694 -193
- data/lib/isodoc/ogc/ogc.policy.xsl +694 -193
- data/lib/isodoc/ogc/ogc.reference-model.xsl +694 -193
- data/lib/isodoc/ogc/ogc.release-notes.xsl +694 -193
- data/lib/isodoc/ogc/ogc.standard.xsl +694 -193
- data/lib/isodoc/ogc/ogc.test-suite.xsl +694 -193
- data/lib/isodoc/ogc/ogc.user-guide.xsl +694 -193
- data/lib/isodoc/ogc/ogc.white-paper.xsl +694 -200
- data/lib/metanorma/ogc/biblio-standoc.rng +0 -49
- data/lib/metanorma/ogc/biblio.rng +11 -1
- data/lib/metanorma/ogc/cleanup.rb +8 -4
- data/lib/metanorma/ogc/front.rb +8 -21
- data/lib/metanorma/ogc/isodoc.rng +24 -1
- data/lib/metanorma/ogc/relaton-ogc.rng +0 -30
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +2 -2
@@ -2316,19 +2316,37 @@
|
|
2316
2316
|
<xsl:attribute-set name="copyright-statement-style">
|
2317
2317
|
</xsl:attribute-set> <!-- copyright-statement-style -->
|
2318
2318
|
|
2319
|
+
<xsl:template name="refine_copyright-statement-style">
|
2320
|
+
</xsl:template>
|
2321
|
+
|
2319
2322
|
<xsl:attribute-set name="copyright-statement-title-style">
|
2320
2323
|
<xsl:attribute name="font-family">Lato</xsl:attribute>
|
2321
2324
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2322
2325
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2323
2326
|
</xsl:attribute-set> <!-- copyright-statement-title-style -->
|
2324
2327
|
|
2328
|
+
<xsl:template name="refine_copyright-statement-title-style">
|
2329
|
+
</xsl:template>
|
2330
|
+
|
2325
2331
|
<xsl:attribute-set name="copyright-statement-p-style">
|
2326
2332
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
2327
2333
|
</xsl:attribute-set> <!-- copyright-statement-p-style -->
|
2328
2334
|
|
2329
|
-
|
2335
|
+
<xsl:template name="refine_copyright-statement-p-style">
|
2336
|
+
<xsl:if test="@align">
|
2337
|
+
<xsl:attribute name="text-align">
|
2338
|
+
<xsl:value-of select="@align"/>
|
2339
|
+
</xsl:attribute>
|
2340
|
+
</xsl:if>
|
2341
|
+
|
2342
|
+
</xsl:template>
|
2343
|
+
|
2344
|
+
<xsl:attribute-set name="license-statement-style">
|
2330
2345
|
</xsl:attribute-set> <!-- license-statement-style -->
|
2331
2346
|
|
2347
|
+
<xsl:template name="refine_license-statement-style">
|
2348
|
+
</xsl:template>
|
2349
|
+
|
2332
2350
|
<xsl:attribute-set name="license-statement-title-style">
|
2333
2351
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2334
2352
|
<xsl:attribute name="font-family">Lato</xsl:attribute>
|
@@ -2337,15 +2355,25 @@
|
|
2337
2355
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
2338
2356
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
2339
2357
|
|
2358
|
+
<xsl:template name="refine_license-statement-title-style">
|
2359
|
+
</xsl:template>
|
2360
|
+
|
2340
2361
|
<xsl:attribute-set name="license-statement-p-style">
|
2341
2362
|
<xsl:attribute name="font-size">8pt</xsl:attribute>
|
2342
2363
|
<xsl:attribute name="margin-top">14pt</xsl:attribute>
|
2343
2364
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2344
2365
|
</xsl:attribute-set> <!-- license-statement-p-style -->
|
2345
2366
|
|
2367
|
+
<xsl:template name="refine_license-statement-p-style">
|
2368
|
+
|
2369
|
+
</xsl:template>
|
2370
|
+
|
2346
2371
|
<xsl:attribute-set name="legal-statement-style">
|
2347
2372
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
2348
2373
|
|
2374
|
+
<xsl:template name="refine_legal-statement-style">
|
2375
|
+
</xsl:template>
|
2376
|
+
|
2349
2377
|
<xsl:attribute-set name="legal-statement-title-style">
|
2350
2378
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2351
2379
|
<xsl:attribute name="font-family">Lato</xsl:attribute>
|
@@ -2353,20 +2381,41 @@
|
|
2353
2381
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2354
2382
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
2355
2383
|
|
2384
|
+
<xsl:template name="refine_legal-statement-title-style">
|
2385
|
+
</xsl:template>
|
2386
|
+
|
2356
2387
|
<xsl:attribute-set name="legal-statement-p-style">
|
2357
2388
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
2358
2389
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
2359
2390
|
|
2391
|
+
<xsl:template name="refine_legal-statement-p-style">
|
2392
|
+
<xsl:if test="@align">
|
2393
|
+
<xsl:attribute name="text-align">
|
2394
|
+
<xsl:value-of select="@align"/>
|
2395
|
+
</xsl:attribute>
|
2396
|
+
</xsl:if>
|
2397
|
+
</xsl:template>
|
2398
|
+
|
2360
2399
|
<xsl:attribute-set name="feedback-statement-style">
|
2361
2400
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
2362
2401
|
|
2402
|
+
<xsl:template name="refine_feedback-statement-style">
|
2403
|
+
</xsl:template>
|
2404
|
+
|
2363
2405
|
<xsl:attribute-set name="feedback-statement-title-style">
|
2364
2406
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2365
2407
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
2366
2408
|
|
2409
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
2410
|
+
|
2411
|
+
</xsl:template>
|
2412
|
+
|
2367
2413
|
<xsl:attribute-set name="feedback-statement-p-style">
|
2368
2414
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
2369
2415
|
|
2416
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
2417
|
+
</xsl:template>
|
2418
|
+
|
2370
2419
|
<!-- End boilerplate sections styles -->
|
2371
2420
|
|
2372
2421
|
<!-- ================================= -->
|
@@ -2374,6 +2423,8 @@
|
|
2374
2423
|
<!-- ================================= -->
|
2375
2424
|
<xsl:template match="mn:copyright-statement">
|
2376
2425
|
<fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
|
2426
|
+
<xsl:call-template name="refine_copyright-statement-style"/>
|
2427
|
+
|
2377
2428
|
<xsl:apply-templates/>
|
2378
2429
|
</fo:block>
|
2379
2430
|
</xsl:template> <!-- copyright-statement -->
|
@@ -2390,11 +2441,7 @@
|
|
2390
2441
|
|
2391
2442
|
<xsl:template match="mn:copyright-statement//mn:p">
|
2392
2443
|
<fo:block xsl:use-attribute-sets="copyright-statement-p-style">
|
2393
|
-
|
2394
|
-
<xsl:attribute name="text-align">
|
2395
|
-
<xsl:value-of select="@align"/>
|
2396
|
-
</xsl:attribute>
|
2397
|
-
</xsl:if>
|
2444
|
+
<xsl:call-template name="refine_copyright-statement-p-style"/>
|
2398
2445
|
|
2399
2446
|
<xsl:apply-templates/>
|
2400
2447
|
</fo:block>
|
@@ -2403,6 +2450,7 @@
|
|
2403
2450
|
|
2404
2451
|
<xsl:template match="mn:license-statement">
|
2405
2452
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
2453
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
2406
2454
|
<xsl:apply-templates/>
|
2407
2455
|
</fo:block>
|
2408
2456
|
</xsl:template> <!-- license-statement -->
|
@@ -2412,6 +2460,7 @@
|
|
2412
2460
|
<xsl:call-template name="getLevel"/>
|
2413
2461
|
</xsl:variable>
|
2414
2462
|
<fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
|
2463
|
+
<xsl:call-template name="refine_license-statement-title-style"/>
|
2415
2464
|
<xsl:apply-templates/>
|
2416
2465
|
</fo:block>
|
2417
2466
|
|
@@ -2431,6 +2480,7 @@
|
|
2431
2480
|
<xsl:template match="mn:legal-statement">
|
2432
2481
|
<xsl:param name="isLegacy">false</xsl:param>
|
2433
2482
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2483
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
2434
2484
|
<xsl:apply-templates/>
|
2435
2485
|
</fo:block>
|
2436
2486
|
</xsl:template> <!-- legal-statement -->
|
@@ -2450,12 +2500,7 @@
|
|
2450
2500
|
<xsl:param name="margin"/>
|
2451
2501
|
<!-- csa -->
|
2452
2502
|
<fo:block xsl:use-attribute-sets="legal-statement-p-style">
|
2453
|
-
|
2454
|
-
<xsl:if test="@align">
|
2455
|
-
<xsl:attribute name="text-align">
|
2456
|
-
<xsl:value-of select="@align"/>
|
2457
|
-
</xsl:attribute>
|
2458
|
-
</xsl:if>
|
2503
|
+
<xsl:call-template name="refine_legal-statement-p-style"/>
|
2459
2504
|
|
2460
2505
|
<xsl:apply-templates/>
|
2461
2506
|
</fo:block>
|
@@ -2613,6 +2658,27 @@
|
|
2613
2658
|
<xsl:attribute-set name="sourcecode-container-style">
|
2614
2659
|
</xsl:attribute-set>
|
2615
2660
|
|
2661
|
+
<xsl:template name="refine_sourcecode-container-style">
|
2662
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
2663
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2664
|
+
</xsl:if>
|
2665
|
+
|
2666
|
+
<xsl:if test="ancestor::mn:example">
|
2667
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2668
|
+
</xsl:if>
|
2669
|
+
|
2670
|
+
<xsl:copy-of select="@id"/>
|
2671
|
+
|
2672
|
+
<xsl:if test="parent::mn:note">
|
2673
|
+
<xsl:attribute name="margin-left">
|
2674
|
+
<xsl:choose>
|
2675
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2676
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2677
|
+
</xsl:choose>
|
2678
|
+
</xsl:attribute>
|
2679
|
+
</xsl:if>
|
2680
|
+
</xsl:template>
|
2681
|
+
|
2616
2682
|
<xsl:attribute-set name="sourcecode-style">
|
2617
2683
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2618
2684
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -2634,6 +2700,9 @@
|
|
2634
2700
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2635
2701
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
2636
2702
|
|
2703
|
+
<xsl:template name="refine_sourcecode-name-style">
|
2704
|
+
</xsl:template>
|
2705
|
+
|
2637
2706
|
<xsl:template name="add-zero-spaces-equal">
|
2638
2707
|
<xsl:param name="text" select="."/>
|
2639
2708
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -2725,24 +2794,8 @@
|
|
2725
2794
|
<xsl:otherwise>
|
2726
2795
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
2727
2796
|
|
2728
|
-
<xsl:
|
2729
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2730
|
-
</xsl:if>
|
2731
|
-
|
2732
|
-
<xsl:if test="ancestor::mn:example">
|
2733
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2734
|
-
</xsl:if>
|
2797
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
2735
2798
|
|
2736
|
-
<xsl:copy-of select="@id"/>
|
2737
|
-
|
2738
|
-
<xsl:if test="parent::mn:note">
|
2739
|
-
<xsl:attribute name="margin-left">
|
2740
|
-
<xsl:choose>
|
2741
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
2742
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
2743
|
-
</xsl:choose>
|
2744
|
-
</xsl:attribute>
|
2745
|
-
</xsl:if>
|
2746
2799
|
<fo:block-container margin-left="0mm" role="SKIP">
|
2747
2800
|
|
2748
2801
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -3069,6 +3122,7 @@
|
|
3069
3122
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
3070
3123
|
<xsl:if test="normalize-space() != ''">
|
3071
3124
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
3125
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
3072
3126
|
<xsl:apply-templates/>
|
3073
3127
|
</fo:block>
|
3074
3128
|
</xsl:if>
|
@@ -3116,12 +3170,35 @@
|
|
3116
3170
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
3117
3171
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3118
3172
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
3119
|
-
</xsl:attribute-set>
|
3173
|
+
</xsl:attribute-set> <!-- pre-style -->
|
3174
|
+
|
3175
|
+
<xsl:template name="refine_pre-style">
|
3176
|
+
</xsl:template>
|
3120
3177
|
|
3121
3178
|
<xsl:attribute-set name="tt-style">
|
3122
3179
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
3123
3180
|
</xsl:attribute-set>
|
3124
3181
|
|
3182
|
+
<xsl:template name="refine_tt-style">
|
3183
|
+
<xsl:variable name="_font-size"> <!-- inherit -->
|
3184
|
+
<xsl:choose>
|
3185
|
+
<xsl:when test="ancestor::mn:table">8.5</xsl:when>
|
3186
|
+
<xsl:otherwise>9.5</xsl:otherwise>
|
3187
|
+
</xsl:choose>
|
3188
|
+
</xsl:variable>
|
3189
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3190
|
+
<xsl:if test="$font-size != ''">
|
3191
|
+
<xsl:attribute name="font-size">
|
3192
|
+
<xsl:choose>
|
3193
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3194
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3195
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3196
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3197
|
+
</xsl:choose>
|
3198
|
+
</xsl:attribute>
|
3199
|
+
</xsl:if>
|
3200
|
+
</xsl:template>
|
3201
|
+
|
3125
3202
|
<xsl:variable name="color-added-text">
|
3126
3203
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
3127
3204
|
</xsl:variable>
|
@@ -3134,9 +3211,14 @@
|
|
3134
3211
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
3135
3212
|
</xsl:attribute-set>
|
3136
3213
|
|
3214
|
+
<xsl:template name="refine_add-style">
|
3215
|
+
</xsl:template>
|
3216
|
+
|
3137
3217
|
<xsl:variable name="add-style">
|
3138
|
-
|
3139
|
-
|
3218
|
+
<add-style xsl:use-attribute-sets="add-style">
|
3219
|
+
<xsl:call-template name="refine_add-style"/>
|
3220
|
+
</add-style>
|
3221
|
+
</xsl:variable>
|
3140
3222
|
<xsl:template name="append_add-style">
|
3141
3223
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
3142
3224
|
</xsl:template>
|
@@ -3149,24 +3231,77 @@
|
|
3149
3231
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3150
3232
|
</xsl:attribute-set>
|
3151
3233
|
|
3234
|
+
<xsl:template name="refine_del-style">
|
3235
|
+
</xsl:template>
|
3236
|
+
|
3237
|
+
<xsl:attribute-set name="strong-style">
|
3238
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3239
|
+
</xsl:attribute-set>
|
3240
|
+
|
3241
|
+
<xsl:template name="refine_strong_style">
|
3242
|
+
<xsl:if test="ancestor::*['preferred']">
|
3243
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3244
|
+
</xsl:if>
|
3245
|
+
</xsl:template> <!-- refine_strong_style -->
|
3246
|
+
|
3247
|
+
<xsl:attribute-set name="em-style">
|
3248
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
3249
|
+
</xsl:attribute-set>
|
3250
|
+
|
3251
|
+
<xsl:template name="refine_em_style">
|
3252
|
+
</xsl:template> <!-- refine_em_style -->
|
3253
|
+
|
3254
|
+
<xsl:attribute-set name="sup-style">
|
3255
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3256
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
3257
|
+
</xsl:attribute-set>
|
3258
|
+
|
3259
|
+
<xsl:template name="refine_sup-style">
|
3260
|
+
</xsl:template>
|
3261
|
+
|
3262
|
+
<xsl:attribute-set name="sub-style">
|
3263
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
3264
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
3265
|
+
</xsl:attribute-set>
|
3266
|
+
|
3267
|
+
<xsl:template name="refine_sub-style">
|
3268
|
+
</xsl:template>
|
3269
|
+
|
3270
|
+
<xsl:attribute-set name="underline-style">
|
3271
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
3272
|
+
</xsl:attribute-set>
|
3273
|
+
|
3274
|
+
<xsl:template name="refine_underline-style">
|
3275
|
+
</xsl:template>
|
3276
|
+
|
3277
|
+
<xsl:attribute-set name="hi-style">
|
3278
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
3279
|
+
</xsl:attribute-set>
|
3280
|
+
|
3281
|
+
<xsl:template name="refine_hi-style">
|
3282
|
+
</xsl:template>
|
3283
|
+
|
3284
|
+
<xsl:attribute-set name="strike-style">
|
3285
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
3286
|
+
</xsl:attribute-set>
|
3287
|
+
|
3288
|
+
<xsl:template name="refine_strike-style">
|
3289
|
+
</xsl:template>
|
3290
|
+
|
3152
3291
|
<xsl:template match="mn:br">
|
3153
3292
|
<xsl:value-of select="$linebreak"/>
|
3154
3293
|
</xsl:template>
|
3155
3294
|
|
3156
|
-
|
3157
|
-
<fo:inline
|
3158
|
-
<xsl:call-template name="
|
3295
|
+
<xsl:template match="mn:em">
|
3296
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
3297
|
+
<xsl:call-template name="refine_em_style"/>
|
3159
3298
|
<xsl:apply-templates/>
|
3160
3299
|
</fo:inline>
|
3161
3300
|
</xsl:template>
|
3162
3301
|
|
3163
|
-
<xsl:template name="refine_italic_style">
|
3164
|
-
</xsl:template>
|
3165
|
-
|
3166
3302
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
3167
3303
|
<xsl:param name="split_keep-within-line"/>
|
3168
|
-
<fo:inline
|
3169
|
-
|
3304
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
3170
3305
|
<xsl:call-template name="refine_strong_style"/>
|
3171
3306
|
|
3172
3307
|
<xsl:apply-templates>
|
@@ -3175,48 +3310,27 @@
|
|
3175
3310
|
</fo:inline>
|
3176
3311
|
</xsl:template>
|
3177
3312
|
|
3178
|
-
<xsl:template name="refine_strong_style">
|
3179
|
-
<xsl:if test="ancestor::*['preferred']">
|
3180
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
3181
|
-
</xsl:if>
|
3182
|
-
</xsl:template>
|
3183
|
-
|
3184
3313
|
<xsl:template match="*[local-name()='padding']">
|
3185
3314
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
3186
3315
|
</xsl:template>
|
3187
3316
|
|
3188
3317
|
<xsl:template match="mn:sup">
|
3189
|
-
<fo:inline
|
3318
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
3319
|
+
<xsl:call-template name="refine_sup-style"/>
|
3190
3320
|
<xsl:apply-templates/>
|
3191
3321
|
</fo:inline>
|
3192
3322
|
</xsl:template>
|
3193
3323
|
|
3194
3324
|
<xsl:template match="mn:sub">
|
3195
|
-
<fo:inline
|
3325
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
3326
|
+
<xsl:call-template name="refine_sub-style"/>
|
3196
3327
|
<xsl:apply-templates/>
|
3197
3328
|
</fo:inline>
|
3198
3329
|
</xsl:template>
|
3199
3330
|
|
3200
3331
|
<xsl:template match="mn:tt">
|
3201
3332
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3202
|
-
|
3203
|
-
<xsl:variable name="_font-size"> <!-- inherit -->
|
3204
|
-
<xsl:choose>
|
3205
|
-
<xsl:when test="ancestor::mn:table">8.5</xsl:when>
|
3206
|
-
<xsl:otherwise>9.5</xsl:otherwise>
|
3207
|
-
</xsl:choose>
|
3208
|
-
</xsl:variable>
|
3209
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3210
|
-
<xsl:if test="$font-size != ''">
|
3211
|
-
<xsl:attribute name="font-size">
|
3212
|
-
<xsl:choose>
|
3213
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
3214
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
3215
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3216
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3217
|
-
</xsl:choose>
|
3218
|
-
</xsl:attribute>
|
3219
|
-
</xsl:if>
|
3333
|
+
<xsl:call-template name="refine_tt-style"/>
|
3220
3334
|
<xsl:apply-templates/>
|
3221
3335
|
</fo:inline>
|
3222
3336
|
</xsl:template> <!-- tt -->
|
@@ -3235,7 +3349,8 @@
|
|
3235
3349
|
</xsl:template>
|
3236
3350
|
|
3237
3351
|
<xsl:template match="mn:underline">
|
3238
|
-
<fo:inline
|
3352
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
3353
|
+
<xsl:call-template name="refine_underline-style"/>
|
3239
3354
|
<xsl:apply-templates/>
|
3240
3355
|
</fo:inline>
|
3241
3356
|
</xsl:template>
|
@@ -3393,6 +3508,7 @@
|
|
3393
3508
|
|
3394
3509
|
<xsl:template match="mn:del">
|
3395
3510
|
<fo:inline xsl:use-attribute-sets="del-style">
|
3511
|
+
<xsl:call-template name="refine_del-style"/>
|
3396
3512
|
<xsl:apply-templates/>
|
3397
3513
|
</fo:inline>
|
3398
3514
|
</xsl:template>
|
@@ -3402,7 +3518,8 @@
|
|
3402
3518
|
|
3403
3519
|
<!-- highlight text -->
|
3404
3520
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
3405
|
-
<fo:inline
|
3521
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
3522
|
+
<xsl:call-template name="refine_hi-style"/>
|
3406
3523
|
<xsl:apply-templates/>
|
3407
3524
|
</fo:inline>
|
3408
3525
|
</xsl:template>
|
@@ -3488,7 +3605,8 @@
|
|
3488
3605
|
</xsl:template>
|
3489
3606
|
|
3490
3607
|
<xsl:template match="mn:strike">
|
3491
|
-
<fo:inline
|
3608
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
3609
|
+
<xsl:call-template name="refine_strike-style"/>
|
3492
3610
|
<xsl:apply-templates/>
|
3493
3611
|
</fo:inline>
|
3494
3612
|
</xsl:template>
|
@@ -3516,7 +3634,7 @@
|
|
3516
3634
|
</xsl:otherwise>
|
3517
3635
|
</xsl:choose>
|
3518
3636
|
</xsl:variable>
|
3519
|
-
<xsl:if test="$key = 'font-family' or
|
3637
|
+
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
|
3520
3638
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
3521
3639
|
</xsl:if>
|
3522
3640
|
<xsl:if test="$key = 'text-indent'">
|
@@ -3568,6 +3686,7 @@
|
|
3568
3686
|
|
3569
3687
|
<xsl:template match="mn:pre" name="pre">
|
3570
3688
|
<fo:block xsl:use-attribute-sets="pre-style">
|
3689
|
+
<xsl:call-template name="refine_pre-style"/>
|
3571
3690
|
<xsl:copy-of select="@id"/>
|
3572
3691
|
<xsl:choose>
|
3573
3692
|
|
@@ -3599,6 +3718,9 @@
|
|
3599
3718
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3600
3719
|
</xsl:attribute-set>
|
3601
3720
|
|
3721
|
+
<xsl:template name="refine_permission-style">
|
3722
|
+
</xsl:template>
|
3723
|
+
|
3602
3724
|
<xsl:attribute-set name="permission-name-style">
|
3603
3725
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
3604
3726
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -3610,14 +3732,23 @@
|
|
3610
3732
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3611
3733
|
</xsl:attribute-set>
|
3612
3734
|
|
3735
|
+
<xsl:template name="refine_permission-name-style">
|
3736
|
+
</xsl:template>
|
3737
|
+
|
3613
3738
|
<xsl:attribute-set name="permission-label-style">
|
3614
3739
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3615
3740
|
</xsl:attribute-set>
|
3616
3741
|
|
3742
|
+
<xsl:template name="refine_permission-label-style">
|
3743
|
+
</xsl:template>
|
3744
|
+
|
3617
3745
|
<xsl:attribute-set name="requirement-style">
|
3618
3746
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3619
3747
|
</xsl:attribute-set>
|
3620
3748
|
|
3749
|
+
<xsl:template name="refine_requirement-style">
|
3750
|
+
</xsl:template>
|
3751
|
+
|
3621
3752
|
<xsl:attribute-set name="requirement-name-style">
|
3622
3753
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3623
3754
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -3629,10 +3760,19 @@
|
|
3629
3760
|
<xsl:attribute name="background-color">rgb(165,165,165)</xsl:attribute>
|
3630
3761
|
</xsl:attribute-set>
|
3631
3762
|
|
3763
|
+
<xsl:template name="refine_requirement-name-style">
|
3764
|
+
<xsl:if test="../@type = 'class'">
|
3765
|
+
<xsl:attribute name="background-color">white</xsl:attribute>
|
3766
|
+
</xsl:if>
|
3767
|
+
</xsl:template>
|
3768
|
+
|
3632
3769
|
<xsl:attribute-set name="requirement-label-style">
|
3633
3770
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3634
3771
|
</xsl:attribute-set>
|
3635
3772
|
|
3773
|
+
<xsl:template name="refine_requirement-label-style">
|
3774
|
+
</xsl:template>
|
3775
|
+
|
3636
3776
|
<xsl:attribute-set name="subject-style">
|
3637
3777
|
</xsl:attribute-set>
|
3638
3778
|
|
@@ -3661,6 +3801,9 @@
|
|
3661
3801
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
3662
3802
|
</xsl:attribute-set>
|
3663
3803
|
|
3804
|
+
<xsl:template name="refine_recommendation-style">
|
3805
|
+
</xsl:template>
|
3806
|
+
|
3664
3807
|
<xsl:attribute-set name="recommendation-name-style">
|
3665
3808
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
3666
3809
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -3672,16 +3815,23 @@
|
|
3672
3815
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3673
3816
|
</xsl:attribute-set>
|
3674
3817
|
|
3818
|
+
<xsl:template name="refine_recommendation-name-style">
|
3819
|
+
</xsl:template>
|
3820
|
+
|
3675
3821
|
<xsl:attribute-set name="recommendation-label-style">
|
3676
3822
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
3677
3823
|
</xsl:attribute-set>
|
3678
3824
|
|
3825
|
+
<xsl:template name="refine_recommendation-label-style">
|
3826
|
+
</xsl:template>
|
3827
|
+
|
3679
3828
|
<!-- ========== -->
|
3680
3829
|
<!-- permission -->
|
3681
3830
|
<!-- ========== -->
|
3682
3831
|
<xsl:template match="mn:permission">
|
3683
3832
|
<xsl:call-template name="setNamedDestination"/>
|
3684
3833
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
3834
|
+
<xsl:call-template name="refine_permission-style"/>
|
3685
3835
|
<xsl:apply-templates select="mn:fmt-name"/>
|
3686
3836
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3687
3837
|
</fo:block>
|
@@ -3690,6 +3840,7 @@
|
|
3690
3840
|
<xsl:template match="mn:permission/mn:fmt-name">
|
3691
3841
|
<xsl:if test="normalize-space() != ''">
|
3692
3842
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
3843
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
3693
3844
|
<xsl:apply-templates/>
|
3694
3845
|
<xsl:text>:</xsl:text>
|
3695
3846
|
</fo:block>
|
@@ -3698,6 +3849,7 @@
|
|
3698
3849
|
|
3699
3850
|
<xsl:template match="mn:permission/mn:label">
|
3700
3851
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
3852
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
3701
3853
|
<xsl:apply-templates/>
|
3702
3854
|
</fo:block>
|
3703
3855
|
</xsl:template>
|
@@ -3710,6 +3862,7 @@
|
|
3710
3862
|
<xsl:template match="mn:requirement">
|
3711
3863
|
<xsl:call-template name="setNamedDestination"/>
|
3712
3864
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
3865
|
+
<xsl:call-template name="refine_requirement-style"/>
|
3713
3866
|
<xsl:apply-templates select="mn:fmt-name"/>
|
3714
3867
|
<xsl:apply-templates select="mn:label"/>
|
3715
3868
|
<xsl:apply-templates select="@obligation"/>
|
@@ -3722,9 +3875,7 @@
|
|
3722
3875
|
<xsl:if test="normalize-space() != ''">
|
3723
3876
|
|
3724
3877
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
3725
|
-
|
3726
|
-
<xsl:attribute name="background-color">white</xsl:attribute>
|
3727
|
-
</xsl:if>
|
3878
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
3728
3879
|
<xsl:apply-templates/>
|
3729
3880
|
<xsl:text>:</xsl:text>
|
3730
3881
|
</fo:block>
|
@@ -3733,6 +3884,7 @@
|
|
3733
3884
|
|
3734
3885
|
<xsl:template match="mn:requirement/mn:label">
|
3735
3886
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
3887
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
3736
3888
|
<xsl:apply-templates/>
|
3737
3889
|
</fo:block>
|
3738
3890
|
</xsl:template>
|
@@ -3758,6 +3910,7 @@
|
|
3758
3910
|
<xsl:template match="mn:recommendation">
|
3759
3911
|
<xsl:call-template name="setNamedDestination"/>
|
3760
3912
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
3913
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
3761
3914
|
<xsl:apply-templates select="mn:fmt-name"/>
|
3762
3915
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
3763
3916
|
</fo:block>
|
@@ -3767,6 +3920,7 @@
|
|
3767
3920
|
<xsl:if test="normalize-space() != ''">
|
3768
3921
|
|
3769
3922
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
3923
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
3770
3924
|
<xsl:apply-templates/>
|
3771
3925
|
</fo:block>
|
3772
3926
|
</xsl:if>
|
@@ -3774,6 +3928,7 @@
|
|
3774
3928
|
|
3775
3929
|
<xsl:template match="mn:recommendation/mn:label">
|
3776
3930
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
3931
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
3777
3932
|
<xsl:apply-templates/>
|
3778
3933
|
</fo:block>
|
3779
3934
|
</xsl:template>
|
@@ -3966,37 +4121,67 @@
|
|
3966
4121
|
<xsl:attribute-set name="term-style">
|
3967
4122
|
</xsl:attribute-set> <!-- term-style -->
|
3968
4123
|
|
4124
|
+
<xsl:template name="refine_term-style">
|
4125
|
+
</xsl:template>
|
4126
|
+
|
3969
4127
|
<xsl:attribute-set name="term-name-style">
|
3970
4128
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3971
4129
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3972
4130
|
</xsl:attribute-set> <!-- term-name-style -->
|
3973
4131
|
|
3974
|
-
|
4132
|
+
<xsl:template name="refine_term-name-style">
|
4133
|
+
</xsl:template>
|
4134
|
+
|
4135
|
+
<xsl:attribute-set name="preferred-block-style">
|
3975
4136
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
3976
4137
|
|
4138
|
+
<xsl:template name="refine_preferred-block-style">
|
4139
|
+
</xsl:template>
|
4140
|
+
|
3977
4141
|
<xsl:attribute-set name="preferred-term-style">
|
3978
4142
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3979
4143
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
3980
4144
|
<xsl:attribute name="line-height">1</xsl:attribute>
|
3981
4145
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
3982
4146
|
|
4147
|
+
<xsl:template name="refine_preferred-term-style">
|
4148
|
+
<xsl:if test="mn:strong">
|
4149
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4150
|
+
</xsl:if>
|
4151
|
+
</xsl:template>
|
4152
|
+
|
3983
4153
|
<xsl:attribute-set name="domain-style">
|
3984
4154
|
</xsl:attribute-set> <!-- domain-style -->
|
3985
4155
|
|
4156
|
+
<xsl:template name="refine_domain-style">
|
4157
|
+
</xsl:template>
|
4158
|
+
|
3986
4159
|
<xsl:attribute-set name="admitted-style">
|
3987
4160
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
3988
4161
|
</xsl:attribute-set> <!-- admitted-style -->
|
3989
4162
|
|
4163
|
+
<xsl:template name="refine_admitted-style">
|
4164
|
+
</xsl:template>
|
4165
|
+
|
3990
4166
|
<xsl:attribute-set name="deprecates-style">
|
3991
4167
|
</xsl:attribute-set> <!-- deprecates-style -->
|
3992
4168
|
|
4169
|
+
<xsl:template name="refine_deprecates-style">
|
4170
|
+
</xsl:template>
|
4171
|
+
|
3993
4172
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
3994
4173
|
</xsl:attribute-set>
|
3995
4174
|
|
4175
|
+
<xsl:template name="refine_related-block-style">
|
4176
|
+
</xsl:template>
|
4177
|
+
|
3996
4178
|
<xsl:attribute-set name="definition-style">
|
3997
4179
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
3998
4180
|
</xsl:attribute-set> <!-- definition-style -->
|
3999
4181
|
|
4182
|
+
<xsl:template name="refine_definition-style">
|
4183
|
+
</xsl:template>
|
4184
|
+
|
4000
4185
|
<xsl:attribute-set name="termsource-style">
|
4001
4186
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4002
4187
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
@@ -4008,11 +4193,17 @@
|
|
4008
4193
|
<xsl:attribute-set name="termsource-text-style">
|
4009
4194
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
4010
4195
|
|
4196
|
+
<xsl:template name="refine_termsource-text-style">
|
4197
|
+
</xsl:template>
|
4198
|
+
|
4011
4199
|
<xsl:attribute-set name="origin-style">
|
4012
4200
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4013
4201
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4014
4202
|
</xsl:attribute-set> <!-- origin-style -->
|
4015
4203
|
|
4204
|
+
<xsl:template name="refine_origin-style">
|
4205
|
+
</xsl:template>
|
4206
|
+
|
4016
4207
|
<!-- ====== -->
|
4017
4208
|
<!-- term -->
|
4018
4209
|
<!-- ====== -->
|
@@ -4028,9 +4219,8 @@
|
|
4028
4219
|
<xsl:template match="mn:term">
|
4029
4220
|
<xsl:call-template name="setNamedDestination"/>
|
4030
4221
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
4222
|
+
<xsl:call-template name="refine_term-style"/>
|
4031
4223
|
|
4032
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
4033
|
-
</xsl:if>
|
4034
4224
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
4035
4225
|
</fo:block>
|
4036
4226
|
</xsl:template>
|
@@ -4106,6 +4296,7 @@
|
|
4106
4296
|
<!-- text SOURCE: -->
|
4107
4297
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
4108
4298
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
4299
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
4109
4300
|
<xsl:value-of select="."/>
|
4110
4301
|
</fo:inline>
|
4111
4302
|
</xsl:template>
|
@@ -4118,6 +4309,7 @@
|
|
4118
4309
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
4119
4310
|
</xsl:if>
|
4120
4311
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4312
|
+
<xsl:call-template name="refine_origin-style"/>
|
4121
4313
|
<xsl:apply-templates/>
|
4122
4314
|
</fo:inline>
|
4123
4315
|
</fo:basic-link>
|
@@ -4172,9 +4364,12 @@
|
|
4172
4364
|
</xsl:variable>
|
4173
4365
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
4174
4366
|
|
4367
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
4368
|
+
|
4175
4369
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
4176
4370
|
|
4177
4371
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
4372
|
+
<xsl:call-template name="refine_term-name-style"/>
|
4178
4373
|
|
4179
4374
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
4180
4375
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -4185,7 +4380,7 @@
|
|
4185
4380
|
</xsl:if>
|
4186
4381
|
|
4187
4382
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
4188
|
-
<xsl:call-template name="
|
4383
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
4189
4384
|
|
4190
4385
|
<xsl:apply-templates/>
|
4191
4386
|
</fo:block>
|
@@ -4206,22 +4401,18 @@
|
|
4206
4401
|
|
4207
4402
|
<xsl:template match="mn:fmt-admitted">
|
4208
4403
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
4404
|
+
<xsl:call-template name="refine_admitted-style"/>
|
4209
4405
|
<xsl:apply-templates/>
|
4210
4406
|
</fo:block>
|
4211
4407
|
</xsl:template>
|
4212
4408
|
|
4213
4409
|
<xsl:template match="mn:fmt-deprecates">
|
4214
4410
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4411
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
4215
4412
|
<xsl:apply-templates/>
|
4216
4413
|
</fo:block>
|
4217
4414
|
</xsl:template>
|
4218
4415
|
|
4219
|
-
<xsl:template name="setStyle_preferred">
|
4220
|
-
<xsl:if test="mn:strong">
|
4221
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
4222
|
-
</xsl:if>
|
4223
|
-
</xsl:template>
|
4224
|
-
|
4225
4416
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
4226
4417
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
4227
4418
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -4231,6 +4422,7 @@
|
|
4231
4422
|
|
4232
4423
|
<xsl:template match="mn:fmt-related">
|
4233
4424
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
4425
|
+
<xsl:call-template name="refine_related-block-style"/>
|
4234
4426
|
<xsl:apply-templates/>
|
4235
4427
|
</fo:block>
|
4236
4428
|
</xsl:template>
|
@@ -4245,6 +4437,7 @@
|
|
4245
4437
|
<!-- ========== -->
|
4246
4438
|
<xsl:template match="mn:fmt-definition">
|
4247
4439
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
4440
|
+
<xsl:call-template name="refine_definition-style"/>
|
4248
4441
|
<xsl:apply-templates/>
|
4249
4442
|
</fo:block>
|
4250
4443
|
</xsl:template>
|
@@ -4294,6 +4487,9 @@
|
|
4294
4487
|
<xsl:attribute-set name="example-body-style">
|
4295
4488
|
</xsl:attribute-set> <!-- example-body-style -->
|
4296
4489
|
|
4490
|
+
<xsl:template name="refine_example-body-style">
|
4491
|
+
</xsl:template>
|
4492
|
+
|
4297
4493
|
<xsl:attribute-set name="example-name-style">
|
4298
4494
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4299
4495
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -4344,6 +4540,8 @@
|
|
4344
4540
|
<xsl:when test="contains($element, 'block')">
|
4345
4541
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
4346
4542
|
|
4543
|
+
<xsl:call-template name="refine_example-p-style"/>
|
4544
|
+
|
4347
4545
|
<xsl:apply-templates/>
|
4348
4546
|
</fo:block>
|
4349
4547
|
</xsl:when>
|
@@ -4395,6 +4593,7 @@
|
|
4395
4593
|
</fo:block>
|
4396
4594
|
|
4397
4595
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4596
|
+
<xsl:call-template name="refine_example-body-style"/>
|
4398
4597
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4399
4598
|
<xsl:variable name="example_body">
|
4400
4599
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -4457,6 +4656,7 @@
|
|
4457
4656
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
4458
4657
|
<!-- display further elements in blocks -->
|
4459
4658
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
4659
|
+
<xsl:call-template name="refine_example-body-style"/>
|
4460
4660
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
4461
4661
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
4462
4662
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -4694,6 +4894,9 @@
|
|
4694
4894
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
4695
4895
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
4696
4896
|
|
4897
|
+
<xsl:template name="refine_table-fn-number-style">
|
4898
|
+
</xsl:template>
|
4899
|
+
|
4697
4900
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
4698
4901
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4699
4902
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -4702,30 +4905,12 @@
|
|
4702
4905
|
<xsl:template name="refine_table-fmt-fn-label-style">
|
4703
4906
|
</xsl:template>
|
4704
4907
|
|
4705
|
-
<xsl:attribute-set name="fn-container-body-style">
|
4706
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
4707
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
4708
|
-
</xsl:attribute-set>
|
4709
|
-
|
4710
4908
|
<xsl:attribute-set name="table-fn-body-style">
|
4711
4909
|
</xsl:attribute-set>
|
4712
4910
|
|
4713
|
-
<xsl:
|
4714
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
4715
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
4716
|
-
|
4717
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
4718
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
4719
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
4720
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
4721
|
-
|
4722
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
4911
|
+
<xsl:template name="refine_table-fn-body-style">
|
4723
4912
|
</xsl:template>
|
4724
4913
|
|
4725
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
4726
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
4727
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4728
|
-
</xsl:attribute-set>
|
4729
4914
|
<!-- ========================== -->
|
4730
4915
|
<!-- END Table styles -->
|
4731
4916
|
<!-- ========================== -->
|
@@ -6006,6 +6191,7 @@
|
|
6006
6191
|
</xsl:apply-templates>
|
6007
6192
|
|
6008
6193
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
6194
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
6009
6195
|
<!-- <xsl:copy-of select="./node()"/> -->
|
6010
6196
|
<xsl:apply-templates/>
|
6011
6197
|
</fo:inline>
|
@@ -6024,6 +6210,7 @@
|
|
6024
6210
|
<xsl:param name="process">false</xsl:param>
|
6025
6211
|
<xsl:if test="$process = 'true'">
|
6026
6212
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
6213
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
6027
6214
|
|
6028
6215
|
<!-- tab is padding-right -->
|
6029
6216
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -6895,9 +7082,18 @@
|
|
6895
7082
|
<xsl:attribute-set name="dl-block-style">
|
6896
7083
|
</xsl:attribute-set>
|
6897
7084
|
|
7085
|
+
<xsl:template name="refine_dl-block-style">
|
7086
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
7087
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
7088
|
+
</xsl:if>
|
7089
|
+
</xsl:template>
|
7090
|
+
|
6898
7091
|
<xsl:attribute-set name="dt-row-style">
|
6899
7092
|
</xsl:attribute-set>
|
6900
7093
|
|
7094
|
+
<xsl:template name="refine_dt-row-style">
|
7095
|
+
</xsl:template>
|
7096
|
+
|
6901
7097
|
<xsl:attribute-set name="dt-cell-style">
|
6902
7098
|
</xsl:attribute-set>
|
6903
7099
|
|
@@ -6919,6 +7115,9 @@
|
|
6919
7115
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6920
7116
|
</xsl:attribute-set> <!-- dl-name-style -->
|
6921
7117
|
|
7118
|
+
<xsl:template name="refine_dl-name-style">
|
7119
|
+
</xsl:template>
|
7120
|
+
|
6922
7121
|
<xsl:attribute-set name="dd-cell-style">
|
6923
7122
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
6924
7123
|
</xsl:attribute-set>
|
@@ -6957,9 +7156,7 @@
|
|
6957
7156
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
6958
7157
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
6959
7158
|
|
6960
|
-
<xsl:
|
6961
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
6962
|
-
</xsl:if>
|
7159
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
6963
7160
|
|
6964
7161
|
<xsl:call-template name="setBlockSpanAll"/>
|
6965
7162
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -7255,6 +7452,8 @@
|
|
7255
7452
|
<xsl:if test="$process = 'true'">
|
7256
7453
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
7257
7454
|
|
7455
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
7456
|
+
|
7258
7457
|
<xsl:apply-templates/>
|
7259
7458
|
</fo:block>
|
7260
7459
|
</xsl:if>
|
@@ -7443,6 +7642,8 @@
|
|
7443
7642
|
<xsl:param name="split_keep-within-line"/>
|
7444
7643
|
|
7445
7644
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
7645
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
7646
|
+
|
7446
7647
|
<xsl:call-template name="insert_dt_cell">
|
7447
7648
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
7448
7649
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -7656,18 +7857,25 @@
|
|
7656
7857
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7657
7858
|
</xsl:attribute-set>
|
7658
7859
|
|
7860
|
+
<xsl:template name="refine_appendix-style">
|
7861
|
+
</xsl:template>
|
7862
|
+
|
7659
7863
|
<xsl:attribute-set name="appendix-example-style">
|
7660
7864
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7661
7865
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
7662
7866
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
7663
7867
|
</xsl:attribute-set>
|
7664
7868
|
|
7869
|
+
<xsl:template name="refine_appendix-example-style">
|
7870
|
+
</xsl:template>
|
7871
|
+
|
7665
7872
|
<!-- ======================== -->
|
7666
7873
|
<!-- Appendix processing -->
|
7667
7874
|
<!-- ======================== -->
|
7668
7875
|
<xsl:template match="mn:appendix">
|
7669
7876
|
<xsl:call-template name="setNamedDestination"/>
|
7670
7877
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
7878
|
+
<xsl:call-template name="refine_appendix-style"/>
|
7671
7879
|
<xsl:apply-templates select="mn:fmt-title"/>
|
7672
7880
|
</fo:block>
|
7673
7881
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -7686,6 +7894,7 @@
|
|
7686
7894
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
7687
7895
|
<xsl:call-template name="setNamedDestination"/>
|
7688
7896
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
7897
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
7689
7898
|
<xsl:apply-templates select="mn:fmt-name"/>
|
7690
7899
|
</fo:block>
|
7691
7900
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
@@ -7694,7 +7903,16 @@
|
|
7694
7903
|
<xsl:attribute-set name="xref-style">
|
7695
7904
|
<xsl:attribute name="color">blue</xsl:attribute>
|
7696
7905
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
7697
|
-
</xsl:attribute-set>
|
7906
|
+
</xsl:attribute-set> <!-- xref-style -->
|
7907
|
+
|
7908
|
+
<xsl:template name="refine_xref-style">
|
7909
|
+
<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])">
|
7910
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
7911
|
+
</xsl:if>
|
7912
|
+
<xsl:if test="parent::mn:add">
|
7913
|
+
<xsl:call-template name="append_add-style"/>
|
7914
|
+
</xsl:if>
|
7915
|
+
</xsl:template> <!-- refine_xref-style -->
|
7698
7916
|
|
7699
7917
|
<xsl:template match="mn:fmt-xref">
|
7700
7918
|
<xsl:call-template name="insert_basic_link">
|
@@ -7703,12 +7921,8 @@
|
|
7703
7921
|
<xsl:call-template name="getAltText"/>
|
7704
7922
|
</xsl:variable>
|
7705
7923
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
7706
|
-
<xsl:
|
7707
|
-
|
7708
|
-
</xsl:if>
|
7709
|
-
<xsl:if test="parent::mn:add">
|
7710
|
-
<xsl:call-template name="append_add-style"/>
|
7711
|
-
</xsl:if>
|
7924
|
+
<xsl:call-template name="refine_xref-style"/>
|
7925
|
+
|
7712
7926
|
<xsl:apply-templates/>
|
7713
7927
|
</fo:basic-link>
|
7714
7928
|
</xsl:with-param>
|
@@ -7823,20 +8037,20 @@
|
|
7823
8037
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
7824
8038
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7825
8039
|
<xsl:attribute name="line-height">115%</xsl:attribute>
|
7826
|
-
</xsl:attribute-set>
|
8040
|
+
</xsl:attribute-set> <!-- note-style -->
|
7827
8041
|
|
7828
8042
|
<xsl:template name="refine_note-style">
|
7829
8043
|
<xsl:if test="ancestor::mn:ul or ancestor::mn:ol and not(ancestor::mn:note[1]/following-sibling::*)">
|
7830
8044
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7831
8045
|
</xsl:if>
|
7832
|
-
</xsl:template>
|
8046
|
+
</xsl:template> <!-- refine_note-style -->
|
7833
8047
|
|
7834
8048
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
7835
8049
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
7836
8050
|
|
7837
8051
|
<xsl:attribute-set name="note-name-style">
|
7838
8052
|
<!-- <xsl:attribute name="padding-right">4mm</xsl:attribute> -->
|
7839
|
-
</xsl:attribute-set>
|
8053
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
7840
8054
|
|
7841
8055
|
<xsl:template name="refine_note-name-style">
|
7842
8056
|
</xsl:template> <!-- refine_note-name-style -->
|
@@ -7851,18 +8065,21 @@
|
|
7851
8065
|
<xsl:attribute-set name="note-p-style">
|
7852
8066
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
7853
8067
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7854
|
-
</xsl:attribute-set>
|
8068
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
8069
|
+
|
8070
|
+
<xsl:template name="refine_note-p-style">
|
8071
|
+
</xsl:template>
|
7855
8072
|
|
7856
8073
|
<xsl:attribute-set name="termnote-style">
|
7857
8074
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
7858
8075
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
7859
|
-
</xsl:attribute-set>
|
8076
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
7860
8077
|
|
7861
8078
|
<xsl:template name="refine_termnote-style">
|
7862
8079
|
</xsl:template> <!-- refine_termnote-style -->
|
7863
8080
|
|
7864
8081
|
<xsl:attribute-set name="termnote-name-style">
|
7865
|
-
</xsl:attribute-set>
|
8082
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
7866
8083
|
|
7867
8084
|
<xsl:template name="refine_termnote-name-style">
|
7868
8085
|
</xsl:template>
|
@@ -7871,6 +8088,9 @@
|
|
7871
8088
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
7872
8089
|
</xsl:attribute-set>
|
7873
8090
|
|
8091
|
+
<xsl:template name="refine_termnote-p-style">
|
8092
|
+
</xsl:template>
|
8093
|
+
|
7874
8094
|
<!-- ====== -->
|
7875
8095
|
<!-- note -->
|
7876
8096
|
<!-- termnote -->
|
@@ -7931,11 +8151,13 @@
|
|
7931
8151
|
<xsl:choose>
|
7932
8152
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
7933
8153
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
8154
|
+
<xsl:call-template name="refine_note-p-style"/>
|
7934
8155
|
<xsl:apply-templates/>
|
7935
8156
|
</fo:inline>
|
7936
8157
|
</xsl:when>
|
7937
8158
|
<xsl:otherwise>
|
7938
8159
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
8160
|
+
<xsl:call-template name="refine_note-p-style"/>
|
7939
8161
|
<xsl:apply-templates/>
|
7940
8162
|
</fo:block>
|
7941
8163
|
</xsl:otherwise>
|
@@ -8027,11 +8249,13 @@
|
|
8027
8249
|
<xsl:choose>
|
8028
8250
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
8029
8251
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
8252
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
8030
8253
|
<xsl:apply-templates/>
|
8031
8254
|
</fo:inline>
|
8032
8255
|
</xsl:when>
|
8033
8256
|
<xsl:otherwise>
|
8034
8257
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
8258
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
8035
8259
|
<xsl:apply-templates/>
|
8036
8260
|
</fo:block>
|
8037
8261
|
</xsl:otherwise>
|
@@ -8046,7 +8270,7 @@
|
|
8046
8270
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
8047
8271
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
8048
8272
|
<xsl:attribute name="margin-left">13mm</xsl:attribute>
|
8049
|
-
</xsl:attribute-set>
|
8273
|
+
</xsl:attribute-set> <!-- quote-style -->
|
8050
8274
|
|
8051
8275
|
<xsl:template name="refine_quote-style">
|
8052
8276
|
</xsl:template>
|
@@ -8056,6 +8280,9 @@
|
|
8056
8280
|
<xsl:attribute name="margin-right">25mm</xsl:attribute>
|
8057
8281
|
</xsl:attribute-set>
|
8058
8282
|
|
8283
|
+
<xsl:template name="refine_quote-source-style">
|
8284
|
+
</xsl:template>
|
8285
|
+
|
8059
8286
|
<!-- ====== -->
|
8060
8287
|
<!-- quote -->
|
8061
8288
|
<!-- source -->
|
@@ -8084,6 +8311,7 @@
|
|
8084
8311
|
</fo:block-container>
|
8085
8312
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
8086
8313
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
8314
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
8087
8315
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
8088
8316
|
<xsl:apply-templates select="mn:author"/>
|
8089
8317
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -8146,6 +8374,9 @@
|
|
8146
8374
|
<xsl:attribute-set name="figure-style">
|
8147
8375
|
</xsl:attribute-set>
|
8148
8376
|
|
8377
|
+
<xsl:template name="refine_figure-style">
|
8378
|
+
</xsl:template>
|
8379
|
+
|
8149
8380
|
<xsl:attribute-set name="figure-name-style">
|
8150
8381
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
8151
8382
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -8156,7 +8387,7 @@
|
|
8156
8387
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
8157
8388
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
8158
8389
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
8159
|
-
</xsl:attribute-set>
|
8390
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
8160
8391
|
|
8161
8392
|
<xsl:template name="refine_figure-name-style">
|
8162
8393
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -8166,7 +8397,7 @@
|
|
8166
8397
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
8167
8398
|
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
8168
8399
|
<xsl:attribute name="space-after">0pt</xsl:attribute>
|
8169
|
-
</xsl:attribute-set>
|
8400
|
+
</xsl:attribute-set> <!-- image-style -->
|
8170
8401
|
|
8171
8402
|
<xsl:template name="refine_image-style">
|
8172
8403
|
</xsl:template>
|
@@ -8176,14 +8407,51 @@
|
|
8176
8407
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8177
8408
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8178
8409
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
8179
|
-
</xsl:attribute-set>
|
8410
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
8411
|
+
|
8412
|
+
<xsl:template name="refine_image-graphic-style">
|
8413
|
+
</xsl:template>
|
8180
8414
|
|
8181
8415
|
<xsl:attribute-set name="figure-source-style">
|
8182
8416
|
</xsl:attribute-set>
|
8183
8417
|
|
8418
|
+
<xsl:template name="refine_figure-source-style">
|
8419
|
+
</xsl:template>
|
8420
|
+
|
8184
8421
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
8185
8422
|
</xsl:attribute-set>
|
8186
8423
|
|
8424
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
8425
|
+
</xsl:template>
|
8426
|
+
|
8427
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
8428
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
8429
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
8430
|
+
|
8431
|
+
<xsl:template name="refine_figure-fn-number-style">
|
8432
|
+
</xsl:template>
|
8433
|
+
|
8434
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
8435
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
8436
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
8437
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
8438
|
+
|
8439
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
8440
|
+
</xsl:template>
|
8441
|
+
|
8442
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
8443
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
8444
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8445
|
+
</xsl:attribute-set>
|
8446
|
+
|
8447
|
+
<xsl:template name="refine_figure-fn-body-style">
|
8448
|
+
<xsl:variable name="key_iso">
|
8449
|
+
</xsl:variable>
|
8450
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
8451
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
8452
|
+
</xsl:if>
|
8453
|
+
</xsl:template>
|
8454
|
+
|
8187
8455
|
<!-- ============================ -->
|
8188
8456
|
<!-- figure's footnotes rendering -->
|
8189
8457
|
<!-- ============================ -->
|
@@ -8296,9 +8564,8 @@
|
|
8296
8564
|
</fo:table-cell>
|
8297
8565
|
<fo:table-cell>
|
8298
8566
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
8299
|
-
<xsl:
|
8300
|
-
|
8301
|
-
</xsl:if>
|
8567
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
8568
|
+
|
8302
8569
|
<!-- <xsl:copy-of select="./node()"/> -->
|
8303
8570
|
<xsl:apply-templates/>
|
8304
8571
|
</fo:block>
|
@@ -8316,6 +8583,7 @@
|
|
8316
8583
|
<xsl:param name="process">false</xsl:param>
|
8317
8584
|
<xsl:if test="$process = 'true'">
|
8318
8585
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
8586
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
8319
8587
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
8320
8588
|
|
8321
8589
|
<!-- tab is padding-right -->
|
@@ -8353,6 +8621,7 @@
|
|
8353
8621
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
8354
8622
|
</xsl:if>
|
8355
8623
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
8624
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
8356
8625
|
<!-- <xsl:value-of select="@reference"/> -->
|
8357
8626
|
<xsl:apply-templates/>
|
8358
8627
|
</fo:inline>
|
@@ -8398,6 +8667,8 @@
|
|
8398
8667
|
|
8399
8668
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8400
8669
|
|
8670
|
+
<xsl:call-template name="refine_figure-style"/>
|
8671
|
+
|
8401
8672
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
8402
8673
|
<xsl:call-template name="setIDforNamedDestination"/>
|
8403
8674
|
</xsl:for-each>
|
@@ -8441,6 +8712,7 @@
|
|
8441
8712
|
|
8442
8713
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
8443
8714
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
8715
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
8444
8716
|
<xsl:apply-templates/>
|
8445
8717
|
</fo:block>
|
8446
8718
|
</xsl:template>
|
@@ -8570,6 +8842,8 @@
|
|
8570
8842
|
</xsl:variable>
|
8571
8843
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
8572
8844
|
|
8845
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
8846
|
+
|
8573
8847
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
8574
8848
|
<xsl:variable name="scale">
|
8575
8849
|
<xsl:call-template name="getImageScale">
|
@@ -9269,6 +9543,9 @@
|
|
9269
9543
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
9270
9544
|
</xsl:attribute-set> <!-- formula-style -->
|
9271
9545
|
|
9546
|
+
<xsl:template name="refine_formula-style">
|
9547
|
+
</xsl:template>
|
9548
|
+
|
9272
9549
|
<xsl:attribute-set name="formula-stem-block-style">
|
9273
9550
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
9274
9551
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -9339,6 +9616,8 @@
|
|
9339
9616
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
9340
9617
|
<fo:block xsl:use-attribute-sets="formula-style">
|
9341
9618
|
|
9619
|
+
<xsl:call-template name="refine_formula-style"/>
|
9620
|
+
|
9342
9621
|
<fo:table table-layout="fixed" width="100%">
|
9343
9622
|
<fo:table-column column-width="95%"/>
|
9344
9623
|
<fo:table-column column-width="5%"/>
|
@@ -9761,6 +10040,9 @@
|
|
9761
10040
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9762
10041
|
</xsl:attribute-set> <!-- list-name-style -->
|
9763
10042
|
|
10043
|
+
<xsl:template name="refine_list-name-style">
|
10044
|
+
</xsl:template>
|
10045
|
+
|
9764
10046
|
<xsl:attribute-set name="list-item-style">
|
9765
10047
|
</xsl:attribute-set>
|
9766
10048
|
|
@@ -10058,6 +10340,7 @@
|
|
10058
10340
|
<xsl:param name="process">false</xsl:param>
|
10059
10341
|
<xsl:if test="$process = 'true'">
|
10060
10342
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
10343
|
+
<xsl:call-template name="refine_list-name-style"/>
|
10061
10344
|
<xsl:apply-templates/>
|
10062
10345
|
</fo:block>
|
10063
10346
|
</xsl:if>
|
@@ -10118,27 +10401,48 @@
|
|
10118
10401
|
<!-- END Lists processing -->
|
10119
10402
|
<!-- ===================================== -->
|
10120
10403
|
|
10404
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
10405
|
+
</xsl:attribute-set>
|
10406
|
+
|
10407
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
10408
|
+
</xsl:template>
|
10409
|
+
|
10410
|
+
<xsl:attribute-set name="fn-container-body-style">
|
10411
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
10412
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
10413
|
+
</xsl:attribute-set>
|
10414
|
+
|
10415
|
+
<xsl:template name="refine_fn-container-body-style">
|
10416
|
+
</xsl:template>
|
10417
|
+
|
10121
10418
|
<xsl:attribute-set name="fn-reference-style">
|
10122
10419
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
10123
10420
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10124
10421
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10125
10422
|
<xsl:attribute name="color">blue</xsl:attribute>
|
10126
10423
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
10127
|
-
|
10128
|
-
</xsl:attribute-set>
|
10424
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
10129
10425
|
|
10130
10426
|
<xsl:template name="refine_fn-reference-style">
|
10427
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
10428
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
10131
10429
|
</xsl:template> <!-- refine_fn-reference-style -->
|
10132
10430
|
|
10133
10431
|
<xsl:attribute-set name="fn-style">
|
10134
10432
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10135
10433
|
</xsl:attribute-set>
|
10136
10434
|
|
10435
|
+
<xsl:template name="refine_fn-style">
|
10436
|
+
</xsl:template>
|
10437
|
+
|
10137
10438
|
<xsl:attribute-set name="fn-num-style">
|
10138
10439
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
10139
10440
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
10140
10441
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10141
|
-
</xsl:attribute-set>
|
10442
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
10443
|
+
|
10444
|
+
<xsl:template name="refine_fn-num-style">
|
10445
|
+
</xsl:template>
|
10142
10446
|
|
10143
10447
|
<xsl:attribute-set name="fn-body-style">
|
10144
10448
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -10149,7 +10453,7 @@
|
|
10149
10453
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10150
10454
|
<xsl:attribute name="color">black</xsl:attribute>
|
10151
10455
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
10152
|
-
</xsl:attribute-set>
|
10456
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
10153
10457
|
|
10154
10458
|
<xsl:template name="refine_fn-body-style">
|
10155
10459
|
</xsl:template> <!-- refine_fn-body-style -->
|
@@ -10213,10 +10517,12 @@
|
|
10213
10517
|
<xsl:choose>
|
10214
10518
|
<xsl:when test="ancestor::mn:bibitem">
|
10215
10519
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
10520
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
10216
10521
|
</fn_styles>
|
10217
10522
|
</xsl:when>
|
10218
10523
|
<xsl:otherwise>
|
10219
10524
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
10525
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
10220
10526
|
</fn_styles>
|
10221
10527
|
</xsl:otherwise>
|
10222
10528
|
</xsl:choose>
|
@@ -10226,9 +10532,12 @@
|
|
10226
10532
|
<xsl:copy-of select="."/>
|
10227
10533
|
</xsl:for-each>
|
10228
10534
|
|
10229
|
-
|
10535
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
10536
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
10230
10537
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
10231
|
-
</xsl:if>
|
10538
|
+
</xsl:if> -->
|
10539
|
+
|
10540
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
10232
10541
|
|
10233
10542
|
<xsl:call-template name="insert_basic_link">
|
10234
10543
|
<xsl:with-param name="element">
|
@@ -10251,10 +10560,12 @@
|
|
10251
10560
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
10252
10561
|
|
10253
10562
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
10563
|
+
<xsl:call-template name="refine_fn-style"/>
|
10254
10564
|
<xsl:copy-of select="$footnote_inline"/>
|
10255
10565
|
<fo:footnote-body role="Note">
|
10256
10566
|
|
10257
10567
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
10568
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
10258
10569
|
|
10259
10570
|
<xsl:variable name="fn_block">
|
10260
10571
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -10356,6 +10667,9 @@
|
|
10356
10667
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10357
10668
|
</xsl:attribute-set> <!-- admonition-style -->
|
10358
10669
|
|
10670
|
+
<xsl:template name="refine_admonition-style">
|
10671
|
+
</xsl:template>
|
10672
|
+
|
10359
10673
|
<xsl:attribute-set name="admonition-container-style">
|
10360
10674
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
10361
10675
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -10363,6 +10677,9 @@
|
|
10363
10677
|
<xsl:attribute name="padding-top">3mm</xsl:attribute>
|
10364
10678
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
10365
10679
|
|
10680
|
+
<xsl:template name="refine_admonition-container-style">
|
10681
|
+
</xsl:template>
|
10682
|
+
|
10366
10683
|
<xsl:attribute-set name="admonition-name-style">
|
10367
10684
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
10368
10685
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -10372,9 +10689,16 @@
|
|
10372
10689
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
10373
10690
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
10374
10691
|
|
10692
|
+
<xsl:template name="refine_admonition-name-style">
|
10693
|
+
</xsl:template>
|
10694
|
+
|
10375
10695
|
<xsl:attribute-set name="admonition-p-style">
|
10376
10696
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
10377
10697
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
10698
|
+
|
10699
|
+
<xsl:template name="refine_admonition-p-style">
|
10700
|
+
</xsl:template>
|
10701
|
+
|
10378
10702
|
<!-- end admonition -->
|
10379
10703
|
|
10380
10704
|
<!-- ================ -->
|
@@ -10384,6 +10708,8 @@
|
|
10384
10708
|
<xsl:call-template name="setNamedDestination"/>
|
10385
10709
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
10386
10710
|
|
10711
|
+
<xsl:call-template name="refine_admonition-style"/>
|
10712
|
+
|
10387
10713
|
<xsl:call-template name="setBlockSpanAll"/>
|
10388
10714
|
<xsl:variable name="admonition_color" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = concat('color-admonition-', @type)]/mn:value)"/>
|
10389
10715
|
<xsl:if test="$admonition_color != ''">
|
@@ -10391,10 +10717,14 @@
|
|
10391
10717
|
<xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
|
10392
10718
|
</xsl:if>
|
10393
10719
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
10720
|
+
|
10721
|
+
<xsl:call-template name="refine_admonition-container-style"/>
|
10394
10722
|
<fo:block xsl:use-attribute-sets="admonition-name-style">
|
10723
|
+
<xsl:call-template name="refine_admonition-name-style"/>
|
10395
10724
|
<xsl:call-template name="displayAdmonitionName"/>
|
10396
10725
|
</fo:block>
|
10397
10726
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
10727
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
10398
10728
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
10399
10729
|
</fo:block>
|
10400
10730
|
|
@@ -10448,6 +10778,7 @@
|
|
10448
10778
|
|
10449
10779
|
<xsl:template match="mn:admonition/mn:p">
|
10450
10780
|
<fo:block xsl:use-attribute-sets="admonition-p-style">
|
10781
|
+
<xsl:call-template name="refine_admonition-p-style"/>
|
10451
10782
|
|
10452
10783
|
<xsl:apply-templates/>
|
10453
10784
|
</fo:block>
|
@@ -10457,6 +10788,13 @@
|
|
10457
10788
|
<!-- END Admonition -->
|
10458
10789
|
<!-- ================ -->
|
10459
10790
|
|
10791
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
10792
|
+
</xsl:attribute-set>
|
10793
|
+
|
10794
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
10795
|
+
|
10796
|
+
</xsl:template>
|
10797
|
+
|
10460
10798
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
10461
10799
|
<xsl:attribute-set name="bibitem-normative-style">
|
10462
10800
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -10465,32 +10803,53 @@
|
|
10465
10803
|
<xsl:attribute name="line-height">115%</xsl:attribute>
|
10466
10804
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
10467
10805
|
|
10806
|
+
<xsl:template name="refine_bibitem-normative-style">
|
10807
|
+
</xsl:template>
|
10808
|
+
|
10468
10809
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
10469
10810
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
10470
10811
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
10471
10812
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10472
10813
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
10473
10814
|
|
10815
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
10816
|
+
</xsl:template>
|
10817
|
+
|
10474
10818
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
10475
10819
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
10476
10820
|
|
10821
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
10822
|
+
</xsl:template>
|
10823
|
+
|
10477
10824
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
10478
10825
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
10479
10826
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
10480
10827
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10481
10828
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
10482
10829
|
|
10830
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
10831
|
+
</xsl:template>
|
10832
|
+
|
10483
10833
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
10484
10834
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10485
10835
|
</xsl:attribute-set>
|
10486
10836
|
|
10837
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
10838
|
+
</xsl:template>
|
10839
|
+
|
10487
10840
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
10488
10841
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
10489
10842
|
</xsl:attribute-set>
|
10490
10843
|
|
10844
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
10845
|
+
</xsl:template>
|
10846
|
+
|
10491
10847
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
10492
10848
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
10493
10849
|
|
10850
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
10851
|
+
</xsl:template>
|
10852
|
+
|
10494
10853
|
<!-- footnote reference number for bibitem, in the text -->
|
10495
10854
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
10496
10855
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -10498,6 +10857,9 @@
|
|
10498
10857
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10499
10858
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
10500
10859
|
|
10860
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
10861
|
+
</xsl:template>
|
10862
|
+
|
10501
10863
|
<!-- footnote number on the page bottom -->
|
10502
10864
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
10503
10865
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -10516,6 +10878,9 @@
|
|
10516
10878
|
<xsl:attribute name="line-height">120%</xsl:attribute>
|
10517
10879
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
10518
10880
|
|
10881
|
+
<xsl:template name="refine_references-non-normative-style">
|
10882
|
+
</xsl:template>
|
10883
|
+
|
10519
10884
|
<!-- ======================= -->
|
10520
10885
|
<!-- Bibliography rendering -->
|
10521
10886
|
<!-- ======================= -->
|
@@ -10557,6 +10922,7 @@
|
|
10557
10922
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
10558
10923
|
|
10559
10924
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
10925
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
10560
10926
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
10561
10927
|
</fo:block>
|
10562
10928
|
</xsl:template> <!-- references -->
|
@@ -10570,18 +10936,22 @@
|
|
10570
10936
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
10571
10937
|
<xsl:call-template name="setNamedDestination"/>
|
10572
10938
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
10939
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
10940
|
+
|
10573
10941
|
<xsl:call-template name="processBibitem"/>
|
10574
10942
|
</fo:block>
|
10575
10943
|
|
10576
10944
|
</xsl:template> <!-- bibitem -->
|
10577
10945
|
|
10578
10946
|
<!-- Bibliography (non-normative references) -->
|
10579
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
10947
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
10580
10948
|
<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
|
10581
10949
|
$namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
|
10582
10950
|
<!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
|
10583
10951
|
<xsl:call-template name="setNamedDestination"/>
|
10584
10952
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
10953
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
10954
|
+
|
10585
10955
|
<fo:list-item>
|
10586
10956
|
<fo:list-item-label end-indent="label-end()">
|
10587
10957
|
<fo:block role="SKIP">
|
@@ -10594,6 +10964,7 @@
|
|
10594
10964
|
</fo:list-item-label>
|
10595
10965
|
<fo:list-item-body start-indent="body-start()">
|
10596
10966
|
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP">
|
10967
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
10597
10968
|
<xsl:call-template name="processBibitem">
|
10598
10969
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10599
10970
|
</xsl:call-template>
|
@@ -10604,12 +10975,17 @@
|
|
10604
10975
|
|
10605
10976
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
10606
10977
|
|
10978
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
10979
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
10980
|
+
|
10607
10981
|
<xsl:template name="insertListItem_Bibitem">
|
10608
10982
|
<xsl:choose>
|
10609
10983
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
10610
10984
|
<xsl:otherwise>
|
10611
10985
|
<xsl:call-template name="setNamedDestination"/>
|
10612
10986
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
10987
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
10988
|
+
|
10613
10989
|
<fo:list-item-label end-indent="label-end()">
|
10614
10990
|
<fo:block role="SKIP">
|
10615
10991
|
<fo:inline role="SKIP">
|
@@ -10620,16 +10996,18 @@
|
|
10620
10996
|
</fo:block>
|
10621
10997
|
</fo:list-item-label>
|
10622
10998
|
<fo:list-item-body start-indent="body-start()">
|
10623
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
10999
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
11000
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
10624
11001
|
<xsl:call-template name="processBibitem">
|
10625
11002
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
10626
11003
|
</xsl:call-template>
|
10627
11004
|
</fo:block>
|
11005
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
10628
11006
|
</fo:list-item-body>
|
10629
11007
|
</fo:list-item>
|
10630
11008
|
</xsl:otherwise>
|
10631
11009
|
</xsl:choose>
|
10632
|
-
<xsl:apply-templates select="following-sibling::*[
|
11010
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
10633
11011
|
<xsl:with-param name="skip">false</xsl:with-param>
|
10634
11012
|
</xsl:apply-templates>
|
10635
11013
|
</xsl:template>
|
@@ -10645,25 +11023,16 @@
|
|
10645
11023
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
10646
11024
|
</xsl:apply-templates>
|
10647
11025
|
<xsl:apply-templates select="mn:formattedref"/>
|
11026
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
10648
11027
|
<!-- end bibitem processing -->
|
10649
|
-
|
10650
|
-
<xsl:call-template name="processBibliographyNote"/>
|
10651
11028
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
10652
11029
|
|
10653
|
-
<xsl:template name="
|
10654
|
-
|
10655
|
-
|
10656
|
-
|
10657
|
-
<xsl:copy> <!-- skip @id -->
|
10658
|
-
<xsl:copy-of select="node()"/>
|
10659
|
-
</xsl:copy>
|
10660
|
-
</xsl:element>
|
10661
|
-
</xsl:variable>
|
10662
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
10663
|
-
<xsl:call-template name="note"/>
|
10664
|
-
</xsl:for-each> -->
|
11030
|
+
<xsl:template name="processBibitemFollowingNotes">
|
11031
|
+
<!-- current context is bibitem element -->
|
11032
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
11033
|
+
<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]]">
|
10665
11034
|
<xsl:call-template name="note"/>
|
10666
|
-
</xsl:
|
11035
|
+
</xsl:for-each>
|
10667
11036
|
</xsl:template>
|
10668
11037
|
|
10669
11038
|
<xsl:template match="mn:title" mode="title">
|
@@ -10863,11 +11232,17 @@
|
|
10863
11232
|
<!-- Index section styles -->
|
10864
11233
|
<xsl:attribute-set name="indexsect-title-style">
|
10865
11234
|
<xsl:attribute name="role">H1</xsl:attribute>
|
10866
|
-
</xsl:attribute-set>
|
11235
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
11236
|
+
|
11237
|
+
<xsl:template name="refine_indexsect-title-style">
|
11238
|
+
</xsl:template>
|
10867
11239
|
|
10868
11240
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
10869
11241
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
10870
|
-
</xsl:attribute-set>
|
11242
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
11243
|
+
|
11244
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
11245
|
+
</xsl:template>
|
10871
11246
|
<!-- End Index section styles -->
|
10872
11247
|
|
10873
11248
|
<!-- =================== -->
|
@@ -11061,6 +11436,7 @@
|
|
11061
11436
|
|
11062
11437
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
11063
11438
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
11439
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
11064
11440
|
<!-- Index -->
|
11065
11441
|
<xsl:apply-templates/>
|
11066
11442
|
</fo:block>
|
@@ -11069,6 +11445,7 @@
|
|
11069
11445
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
11070
11446
|
<!-- Letter A, B, C, ... -->
|
11071
11447
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
11448
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
11072
11449
|
<xsl:apply-templates/>
|
11073
11450
|
</fo:block>
|
11074
11451
|
</xsl:template>
|
@@ -11111,13 +11488,31 @@
|
|
11111
11488
|
<!-- skip here, see the template 'fmt-review-start' -->
|
11112
11489
|
</xsl:when>
|
11113
11490
|
<xsl:otherwise>
|
11114
|
-
|
11115
|
-
|
11116
|
-
|
11117
|
-
|
11491
|
+
<xsl:choose>
|
11492
|
+
<xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
|
11493
|
+
<fo:block font-size="1pt" line-height="0.1">
|
11494
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11495
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11496
|
+
</xsl:call-template>
|
11497
|
+
</fo:block>
|
11498
|
+
</xsl:when>
|
11499
|
+
<xsl:otherwise>
|
11500
|
+
<xsl:call-template name="fo_inline_bookmark">
|
11501
|
+
<xsl:with-param name="bookmark_id" select="$bookmark_id"/>
|
11502
|
+
</xsl:call-template>
|
11503
|
+
</xsl:otherwise>
|
11504
|
+
</xsl:choose>
|
11118
11505
|
</xsl:otherwise>
|
11119
11506
|
</xsl:choose>
|
11120
11507
|
</xsl:template>
|
11508
|
+
|
11509
|
+
<xsl:template name="fo_inline_bookmark">
|
11510
|
+
<xsl:param name="bookmark_id"/>
|
11511
|
+
<!-- <fo:inline id="{@id}" font-size="1pt"/> -->
|
11512
|
+
<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>
|
11513
|
+
<!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
|
11514
|
+
<xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
|
11515
|
+
</xsl:template>
|
11121
11516
|
<!-- =================== -->
|
11122
11517
|
<!-- End of Index processing -->
|
11123
11518
|
<!-- =================== -->
|
@@ -11254,9 +11649,15 @@
|
|
11254
11649
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
11255
11650
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
11256
11651
|
|
11652
|
+
<xsl:template name="refine_toc-leader-style">
|
11653
|
+
</xsl:template>
|
11654
|
+
|
11257
11655
|
<xsl:attribute-set name="toc-pagenumber-style">
|
11258
11656
|
</xsl:attribute-set>
|
11259
11657
|
|
11658
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
11659
|
+
</xsl:template>
|
11660
|
+
|
11260
11661
|
<!-- List of Figures, Tables -->
|
11261
11662
|
<xsl:attribute-set name="toc-listof-title-style">
|
11262
11663
|
</xsl:attribute-set>
|
@@ -11267,6 +11668,9 @@
|
|
11267
11668
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
11268
11669
|
</xsl:attribute-set>
|
11269
11670
|
|
11671
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
11672
|
+
</xsl:template>
|
11673
|
+
|
11270
11674
|
<xsl:attribute-set name="toc-listof-item-style">
|
11271
11675
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
11272
11676
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
@@ -11274,6 +11678,9 @@
|
|
11274
11678
|
<xsl:attribute name="text-align-last">justify</xsl:attribute>
|
11275
11679
|
</xsl:attribute-set>
|
11276
11680
|
|
11681
|
+
<xsl:template name="refine_toc-listof-item-style">
|
11682
|
+
</xsl:template>
|
11683
|
+
|
11277
11684
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
11278
11685
|
<xsl:variable name="nodes_preface_">
|
11279
11686
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -12359,23 +12766,55 @@
|
|
12359
12766
|
<!-- Ruby text (CJK languages) rendering -->
|
12360
12767
|
<!-- ===================================== -->
|
12361
12768
|
<!-- ===================================== -->
|
12769
|
+
|
12770
|
+
<xsl:attribute-set name="ruby-style">
|
12771
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
12772
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
12773
|
+
</xsl:attribute-set>
|
12774
|
+
|
12775
|
+
<xsl:template name="refine_ruby-style">
|
12776
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
12777
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
12778
|
+
</xsl:if>
|
12779
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
12780
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
12781
|
+
<!-- Example: width="2em" -->
|
12782
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
12783
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
12784
|
+
<xsl:variable name="text_width">
|
12785
|
+
<xsl:choose>
|
12786
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
12787
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
12788
|
+
</xsl:choose>
|
12789
|
+
</xsl:variable>
|
12790
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
12791
|
+
</xsl:template> <!-- refine_ruby-style -->
|
12792
|
+
|
12793
|
+
<xsl:attribute-set name="rb-style">
|
12794
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
12795
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
12796
|
+
</xsl:attribute-set>
|
12797
|
+
|
12798
|
+
<xsl:template name="refine_rb-style">
|
12799
|
+
</xsl:template>
|
12800
|
+
|
12801
|
+
<xsl:attribute-set name="rt-style">
|
12802
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
12803
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
12804
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
12805
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
12806
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
12807
|
+
</xsl:attribute-set>
|
12808
|
+
|
12809
|
+
<xsl:template name="refine_rt-style">
|
12810
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
12811
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
12812
|
+
</xsl:if>
|
12813
|
+
</xsl:template>
|
12814
|
+
|
12362
12815
|
<xsl:template match="mn:ruby">
|
12363
|
-
<fo:inline-container
|
12364
|
-
<xsl:
|
12365
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
12366
|
-
</xsl:if>
|
12367
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
12368
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
12369
|
-
<!-- Example: width="2em" -->
|
12370
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
12371
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
12372
|
-
<xsl:variable name="text_width">
|
12373
|
-
<xsl:choose>
|
12374
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
12375
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
12376
|
-
</xsl:choose>
|
12377
|
-
</xsl:variable>
|
12378
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
12816
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
12817
|
+
<xsl:call-template name="refine_ruby-style"/>
|
12379
12818
|
|
12380
12819
|
<xsl:choose>
|
12381
12820
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -12393,17 +12832,14 @@
|
|
12393
12832
|
</xsl:template>
|
12394
12833
|
|
12395
12834
|
<xsl:template match="mn:rb">
|
12396
|
-
<fo:block
|
12835
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
12397
12836
|
</xsl:template>
|
12398
12837
|
|
12399
12838
|
<xsl:template match="mn:rt">
|
12400
|
-
<fo:block
|
12401
|
-
<xsl:
|
12402
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
12403
|
-
</xsl:if>
|
12839
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
12840
|
+
<xsl:call-template name="refine_rt-style"/>
|
12404
12841
|
<xsl:apply-templates/>
|
12405
12842
|
</fo:block>
|
12406
|
-
|
12407
12843
|
</xsl:template>
|
12408
12844
|
|
12409
12845
|
<!-- ===================================== -->
|
@@ -12412,6 +12848,18 @@
|
|
12412
12848
|
<!-- ===================================== -->
|
12413
12849
|
<!-- ===================================== -->
|
12414
12850
|
|
12851
|
+
<xsl:attribute-set name="annex-title-style">
|
12852
|
+
</xsl:attribute-set>
|
12853
|
+
|
12854
|
+
<xsl:template name="refine_annex-title-style">
|
12855
|
+
</xsl:template>
|
12856
|
+
|
12857
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
12858
|
+
</xsl:attribute-set>
|
12859
|
+
|
12860
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
12861
|
+
</xsl:template>
|
12862
|
+
|
12415
12863
|
<xsl:template name="processPrefaceSectionsDefault">
|
12416
12864
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
12417
12865
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -12971,11 +13419,35 @@
|
|
12971
13419
|
|
12972
13420
|
<xsl:template match="mn:svgmap"/>
|
12973
13421
|
|
13422
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
13423
|
+
|
12974
13424
|
<!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
|
12975
13425
|
<xsl:template match="*[local-name() = 'lang_none']">
|
12976
13426
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
12977
13427
|
</xsl:template>
|
12978
13428
|
|
13429
|
+
<xsl:template name="addTagElementT">
|
13430
|
+
<xsl:variable name="title_">
|
13431
|
+
<xsl:apply-templates select="mn:fmt-title"/>
|
13432
|
+
</xsl:variable>
|
13433
|
+
<xsl:variable name="title__">
|
13434
|
+
<xsl:for-each select="xalan:nodeset($title_)/*/node()">
|
13435
|
+
<xsl:choose>
|
13436
|
+
<xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
|
13437
|
+
<xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
|
13438
|
+
</xsl:choose>
|
13439
|
+
</xsl:for-each>
|
13440
|
+
</xsl:variable>
|
13441
|
+
<xsl:variable name="title" select="normalize-space($title__)"/>
|
13442
|
+
<xsl:if test="$title != ''">
|
13443
|
+
<xsl:attribute name="fox:title">
|
13444
|
+
<xsl:if test="ancestor::mn:sections">
|
13445
|
+
<xsl:text>Section </xsl:text>
|
13446
|
+
</xsl:if>
|
13447
|
+
<xsl:value-of select="$title"/></xsl:attribute>
|
13448
|
+
</xsl:if>
|
13449
|
+
</xsl:template>
|
13450
|
+
|
12979
13451
|
<xsl:template name="replaceChar">
|
12980
13452
|
<xsl:param name="text"/>
|
12981
13453
|
<xsl:param name="replace"/>
|
@@ -13742,6 +14214,13 @@
|
|
13742
14214
|
<xsl:with-param name="default" select="$text_align_default"/>
|
13743
14215
|
</xsl:call-template>
|
13744
14216
|
<xsl:call-template name="setKeepAttributes"/>
|
14217
|
+
<xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
|
14218
|
+
<xsl:variable name="styles">
|
14219
|
+
<xsl:apply-templates select="*[1]"/>
|
14220
|
+
</xsl:variable>
|
14221
|
+
<!-- move attribute line-height from inline to block -->
|
14222
|
+
<xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
|
14223
|
+
</xsl:if>
|
13745
14224
|
</xsl:template>
|
13746
14225
|
|
13747
14226
|
<xsl:template name="setKeepAttributes">
|
@@ -13767,34 +14246,41 @@
|
|
13767
14246
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
13768
14247
|
<fo:block>
|
13769
14248
|
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
|
13770
|
-
|
13771
|
-
|
13772
|
-
|
13773
|
-
<xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
|
13774
|
-
<xsl:call-template name="getSVG"/>
|
13775
|
-
</fo:instream-foreign-object>
|
13776
|
-
</xsl:when>
|
13777
|
-
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
13778
|
-
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
13779
|
-
</xsl:when>
|
13780
|
-
<xsl:otherwise> <!-- bitmap image -->
|
13781
|
-
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
13782
|
-
<xsl:if test="$coverimage_src != ''">
|
13783
|
-
<xsl:variable name="coverpage">
|
13784
|
-
<xsl:call-template name="getImageURL">
|
13785
|
-
<xsl:with-param name="src" select="$coverimage_src"/>
|
13786
|
-
</xsl:call-template>
|
13787
|
-
</xsl:variable>
|
13788
|
-
<!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
|
13789
|
-
<fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
13790
|
-
</xsl:if>
|
13791
|
-
</xsl:otherwise>
|
13792
|
-
</xsl:choose>
|
14249
|
+
|
14250
|
+
<xsl:call-template name="insertPageImage"/>
|
14251
|
+
|
13793
14252
|
</xsl:for-each>
|
13794
14253
|
</fo:block>
|
13795
14254
|
</fo:block-container>
|
13796
14255
|
</xsl:template>
|
13797
14256
|
|
14257
|
+
<xsl:template name="insertPageImage">
|
14258
|
+
<xsl:param name="svg_content_height" select="$pageHeight"/>
|
14259
|
+
<xsl:param name="bitmap_width" select="$pageWidth"/>
|
14260
|
+
<xsl:choose>
|
14261
|
+
<xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
|
14262
|
+
<fo:instream-foreign-object fox:alt-text="Image Front">
|
14263
|
+
<xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
|
14264
|
+
<xsl:call-template name="getSVG"/>
|
14265
|
+
</fo:instream-foreign-object>
|
14266
|
+
</xsl:when>
|
14267
|
+
<xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
|
14268
|
+
<fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
|
14269
|
+
</xsl:when>
|
14270
|
+
<xsl:otherwise> <!-- bitmap image -->
|
14271
|
+
<xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
|
14272
|
+
<xsl:if test="$coverimage_src != ''">
|
14273
|
+
<xsl:variable name="coverpage">
|
14274
|
+
<xsl:call-template name="getImageURL">
|
14275
|
+
<xsl:with-param name="src" select="$coverimage_src"/>
|
14276
|
+
</xsl:call-template>
|
14277
|
+
</xsl:variable>
|
14278
|
+
<fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
14279
|
+
</xsl:if>
|
14280
|
+
</xsl:otherwise>
|
14281
|
+
</xsl:choose>
|
14282
|
+
</xsl:template>
|
14283
|
+
|
13798
14284
|
<xsl:template name="getImageURL">
|
13799
14285
|
<xsl:param name="src"/>
|
13800
14286
|
<xsl:choose>
|
@@ -14222,6 +14708,14 @@
|
|
14222
14708
|
</xsl:attribute>
|
14223
14709
|
</xsl:template>
|
14224
14710
|
|
14711
|
+
<xsl:template name="getCharByCodePoint">
|
14712
|
+
<xsl:param name="codepoint"/>
|
14713
|
+
<xsl:param name="radix">16</xsl:param>
|
14714
|
+
<xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
|
14715
|
+
<xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
|
14716
|
+
<xsl:value-of select="java:java.lang.String.new($chars)"/>
|
14717
|
+
</xsl:template>
|
14718
|
+
|
14225
14719
|
<xsl:template name="substring-after-last">
|
14226
14720
|
<xsl:param name="value"/>
|
14227
14721
|
<xsl:param name="delimiter"/>
|