metanorma-nist 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -2
- data/lib/asciidoctor/nist/biblio.rng +1 -0
- data/lib/asciidoctor/nist/isodoc.rng +175 -3
- data/lib/isodoc/nist/metadata.rb +65 -43
- data/lib/isodoc/nist/nist.csts.xsl +459 -61
- data/lib/isodoc/nist/nist.cswp.xsl +459 -61
- data/lib/isodoc/nist/nist.sp.xsl +459 -61
- data/lib/metanorma/nist/version.rb +1 -1
- metadata +2 -2
data/lib/isodoc/nist/nist.sp.xsl
CHANGED
@@ -2247,6 +2247,9 @@
|
|
2247
2247
|
<title-continued lang="en">(continued)</title-continued>
|
2248
2248
|
<title-continued lang="fr">(continué)</title-continued>
|
2249
2249
|
|
2250
|
+
</xsl:variable><xsl:variable name="bibdata">
|
2251
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
2252
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
2250
2253
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2251
2254
|
<xsl:param name="name"/>
|
2252
2255
|
<xsl:param name="lang"/>
|
@@ -2272,10 +2275,12 @@
|
|
2272
2275
|
</xsl:choose>
|
2273
2276
|
</xsl:template><xsl:variable name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable name="linebreak" select="'
'"/><xsl:attribute-set name="root-style">
|
2274
2277
|
|
2278
|
+
|
2275
2279
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
2276
2280
|
|
2277
2281
|
|
2278
2282
|
|
2283
|
+
|
2279
2284
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2280
2285
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2281
2286
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -2396,6 +2401,7 @@
|
|
2396
2401
|
|
2397
2402
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
2398
2403
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2404
|
+
|
2399
2405
|
|
2400
2406
|
|
2401
2407
|
|
@@ -2425,6 +2431,7 @@
|
|
2425
2431
|
</xsl:attribute-set><xsl:attribute-set name="xref-style">
|
2426
2432
|
|
2427
2433
|
|
2434
|
+
|
2428
2435
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2429
2436
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2430
2437
|
|
@@ -2440,6 +2447,7 @@
|
|
2440
2447
|
|
2441
2448
|
|
2442
2449
|
|
2450
|
+
|
2443
2451
|
|
2444
2452
|
|
2445
2453
|
|
@@ -2467,6 +2475,7 @@
|
|
2467
2475
|
|
2468
2476
|
|
2469
2477
|
|
2478
|
+
|
2470
2479
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2471
2480
|
|
2472
2481
|
|
@@ -2485,11 +2494,13 @@
|
|
2485
2494
|
|
2486
2495
|
|
2487
2496
|
|
2497
|
+
|
2488
2498
|
|
2489
2499
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
2490
2500
|
|
2491
2501
|
|
2492
2502
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2503
|
+
|
2493
2504
|
|
2494
2505
|
|
2495
2506
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
@@ -2510,6 +2521,7 @@
|
|
2510
2521
|
|
2511
2522
|
|
2512
2523
|
|
2524
|
+
|
2513
2525
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2514
2526
|
|
2515
2527
|
|
@@ -2518,6 +2530,7 @@
|
|
2518
2530
|
|
2519
2531
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
2520
2532
|
|
2533
|
+
|
2521
2534
|
|
2522
2535
|
|
2523
2536
|
|
@@ -2550,6 +2563,7 @@
|
|
2550
2563
|
|
2551
2564
|
|
2552
2565
|
|
2566
|
+
|
2553
2567
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
2554
2568
|
|
2555
2569
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
@@ -2557,6 +2571,7 @@
|
|
2557
2571
|
|
2558
2572
|
|
2559
2573
|
|
2574
|
+
|
2560
2575
|
<xsl:attribute name="width">75%</xsl:attribute>
|
2561
2576
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
2562
2577
|
<xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
|
@@ -2578,13 +2593,32 @@
|
|
2578
2593
|
|
2579
2594
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
2580
2595
|
|
2581
|
-
|
2596
|
+
|
2582
2597
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
2583
2598
|
|
2584
2599
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
2585
2600
|
|
2586
2601
|
|
2587
|
-
|
2602
|
+
|
2603
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
2604
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
2605
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
2606
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
2607
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2608
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
2609
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
2610
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
2611
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
2612
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
2613
|
+
<xsl:text>red</xsl:text>
|
2614
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
2615
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
2616
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
2617
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
2618
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
2619
|
+
|
2620
|
+
|
2621
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
2588
2622
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2589
2623
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2590
2624
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -2629,16 +2663,17 @@
|
|
2629
2663
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2630
2664
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2631
2665
|
|
2666
|
+
<xsl:variable name="table-preamble">
|
2667
|
+
|
2668
|
+
|
2669
|
+
</xsl:variable>
|
2670
|
+
|
2632
2671
|
<xsl:variable name="table">
|
2633
2672
|
|
2634
2673
|
<xsl:variable name="simple-table">
|
2635
2674
|
<xsl:call-template name="getSimpleTable"/>
|
2636
2675
|
</xsl:variable>
|
2637
2676
|
|
2638
|
-
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2642
2677
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2643
2678
|
<fo:block> </fo:block>
|
2644
2679
|
</xsl:if> -->
|
@@ -2651,7 +2686,7 @@
|
|
2651
2686
|
|
2652
2687
|
|
2653
2688
|
|
2654
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
2689
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
2655
2690
|
|
2656
2691
|
<!-- <xsl:variable name="cols-count">
|
2657
2692
|
<xsl:choose>
|
@@ -2670,8 +2705,6 @@
|
|
2670
2705
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
2671
2706
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
2672
2707
|
|
2673
|
-
|
2674
|
-
|
2675
2708
|
<xsl:variable name="colwidths">
|
2676
2709
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2677
2710
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2699,9 +2732,11 @@
|
|
2699
2732
|
</xsl:choose>
|
2700
2733
|
</xsl:variable>
|
2701
2734
|
|
2735
|
+
|
2702
2736
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2703
2737
|
|
2704
2738
|
|
2739
|
+
|
2705
2740
|
<xsl:attribute name="space-after">6pt</xsl:attribute>
|
2706
2741
|
|
2707
2742
|
|
@@ -2726,6 +2761,8 @@
|
|
2726
2761
|
|
2727
2762
|
|
2728
2763
|
|
2764
|
+
|
2765
|
+
|
2729
2766
|
<xsl:variable name="table_width">
|
2730
2767
|
<!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
|
2731
2768
|
100%
|
@@ -2742,6 +2779,8 @@
|
|
2742
2779
|
|
2743
2780
|
|
2744
2781
|
|
2782
|
+
|
2783
|
+
|
2745
2784
|
|
2746
2785
|
|
2747
2786
|
|
@@ -2831,7 +2870,8 @@
|
|
2831
2870
|
</fo:block-container>
|
2832
2871
|
</xsl:variable>
|
2833
2872
|
|
2834
|
-
|
2873
|
+
<xsl:variable name="isAdded" select="@added"/>
|
2874
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
2835
2875
|
|
2836
2876
|
<xsl:choose>
|
2837
2877
|
<xsl:when test="@width">
|
@@ -2845,7 +2885,14 @@
|
|
2845
2885
|
<fo:table-body>
|
2846
2886
|
<fo:table-row>
|
2847
2887
|
<fo:table-cell column-number="2">
|
2848
|
-
<
|
2888
|
+
<xsl:copy-of select="$table-preamble"/>
|
2889
|
+
<fo:block>
|
2890
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2891
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2892
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2893
|
+
</xsl:call-template>
|
2894
|
+
<xsl:copy-of select="$table"/>
|
2895
|
+
</fo:block>
|
2849
2896
|
</fo:table-cell>
|
2850
2897
|
</fo:table-row>
|
2851
2898
|
</fo:table-body>
|
@@ -2856,16 +2903,42 @@
|
|
2856
2903
|
|
2857
2904
|
</xsl:when>
|
2858
2905
|
<xsl:otherwise>
|
2859
|
-
<xsl:
|
2906
|
+
<xsl:choose>
|
2907
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
2908
|
+
<xsl:copy-of select="$table-preamble"/>
|
2909
|
+
<fo:block>
|
2910
|
+
<xsl:call-template name="setTrackChangesStyles">
|
2911
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
2912
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
2913
|
+
</xsl:call-template>
|
2914
|
+
<xsl:copy-of select="$table"/>
|
2915
|
+
</fo:block>
|
2916
|
+
</xsl:when>
|
2917
|
+
<xsl:otherwise>
|
2918
|
+
<xsl:copy-of select="$table-preamble"/>
|
2919
|
+
<xsl:copy-of select="$table"/>
|
2920
|
+
</xsl:otherwise>
|
2921
|
+
</xsl:choose>
|
2860
2922
|
</xsl:otherwise>
|
2861
2923
|
</xsl:choose>
|
2862
2924
|
|
2863
2925
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2926
|
+
<xsl:param name="continued"/>
|
2864
2927
|
<xsl:if test="normalize-space() != ''">
|
2865
2928
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2866
2929
|
|
2867
2930
|
|
2868
|
-
<xsl:
|
2931
|
+
<xsl:choose>
|
2932
|
+
<xsl:when test="$continued = 'true'">
|
2933
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
2934
|
+
|
2935
|
+
</xsl:when>
|
2936
|
+
<xsl:otherwise>
|
2937
|
+
<xsl:apply-templates/>
|
2938
|
+
</xsl:otherwise>
|
2939
|
+
</xsl:choose>
|
2940
|
+
|
2941
|
+
|
2869
2942
|
</fo:block>
|
2870
2943
|
</xsl:if>
|
2871
2944
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -2917,7 +2990,7 @@
|
|
2917
2990
|
</xsl:for-each>
|
2918
2991
|
</xsl:when>
|
2919
2992
|
<xsl:otherwise>
|
2920
|
-
<xsl:for-each select="xalan:nodeset($table)
|
2993
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
2921
2994
|
<xsl:variable name="td_text">
|
2922
2995
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2923
2996
|
|
@@ -3005,18 +3078,18 @@
|
|
3005
3078
|
<xsl:apply-templates/>
|
3006
3079
|
</fo:table-header>
|
3007
3080
|
</xsl:template><xsl:template name="table-header-title">
|
3008
|
-
<xsl:param name="cols-count"/>
|
3081
|
+
<xsl:param name="cols-count"/>
|
3009
3082
|
<!-- row for title -->
|
3010
3083
|
<fo:table-row>
|
3011
3084
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
3012
|
-
|
3085
|
+
|
3086
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
3087
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
3088
|
+
</xsl:apply-templates>
|
3013
3089
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
3014
3090
|
<xsl:call-template name="fn_name_display"/>
|
3015
|
-
</xsl:for-each>
|
3016
|
-
|
3017
|
-
<xsl:text> </xsl:text>
|
3018
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
3019
|
-
</fo:block>
|
3091
|
+
</xsl:for-each>
|
3092
|
+
|
3020
3093
|
</fo:table-cell>
|
3021
3094
|
</fo:table-row>
|
3022
3095
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -3240,6 +3313,7 @@
|
|
3240
3313
|
|
3241
3314
|
|
3242
3315
|
|
3316
|
+
|
3243
3317
|
</xsl:if>
|
3244
3318
|
<xsl:if test="$parent-name = 'tfoot'">
|
3245
3319
|
|
@@ -3260,7 +3334,8 @@
|
|
3260
3334
|
<xsl:attribute name="text-align">
|
3261
3335
|
<xsl:choose>
|
3262
3336
|
<xsl:when test="@align">
|
3263
|
-
<xsl:
|
3337
|
+
<xsl:call-template name="setAlignment"/>
|
3338
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3264
3339
|
</xsl:when>
|
3265
3340
|
<xsl:otherwise>center</xsl:otherwise>
|
3266
3341
|
</xsl:choose>
|
@@ -3269,6 +3344,7 @@
|
|
3269
3344
|
|
3270
3345
|
|
3271
3346
|
|
3347
|
+
|
3272
3348
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
3273
3349
|
<xsl:attribute name="background-color">black</xsl:attribute>
|
3274
3350
|
<xsl:attribute name="color">white</xsl:attribute>
|
@@ -3280,6 +3356,9 @@
|
|
3280
3356
|
|
3281
3357
|
|
3282
3358
|
|
3359
|
+
<xsl:if test="$lang = 'ar'">
|
3360
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3361
|
+
</xsl:if>
|
3283
3362
|
<xsl:if test="@colspan">
|
3284
3363
|
<xsl:attribute name="number-columns-spanned">
|
3285
3364
|
<xsl:value-of select="@colspan"/>
|
@@ -3311,11 +3390,16 @@
|
|
3311
3390
|
<xsl:attribute name="text-align">
|
3312
3391
|
<xsl:choose>
|
3313
3392
|
<xsl:when test="@align">
|
3314
|
-
<xsl:
|
3393
|
+
<xsl:call-template name="setAlignment"/>
|
3394
|
+
<!-- <xsl:value-of select="@align"/> -->
|
3315
3395
|
</xsl:when>
|
3316
3396
|
<xsl:otherwise>left</xsl:otherwise>
|
3317
3397
|
</xsl:choose>
|
3318
3398
|
</xsl:attribute>
|
3399
|
+
<xsl:if test="$lang = 'ar'">
|
3400
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3401
|
+
</xsl:if>
|
3402
|
+
|
3319
3403
|
|
3320
3404
|
|
3321
3405
|
|
@@ -3331,6 +3415,9 @@
|
|
3331
3415
|
</xsl:if>
|
3332
3416
|
|
3333
3417
|
|
3418
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
3419
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
3420
|
+
</xsl:if>
|
3334
3421
|
<xsl:if test="@colspan">
|
3335
3422
|
<xsl:attribute name="number-columns-spanned">
|
3336
3423
|
<xsl:value-of select="@colspan"/>
|
@@ -3462,13 +3549,13 @@
|
|
3462
3549
|
</xsl:choose>
|
3463
3550
|
</xsl:variable>
|
3464
3551
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3465
|
-
<xsl:element name="{$ns}:table">
|
3552
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
3466
3553
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
3467
3554
|
<tbody>
|
3468
3555
|
<xsl:apply-templates mode="dl"/>
|
3469
3556
|
</tbody>
|
3470
3557
|
</xsl:for-each>
|
3471
|
-
</xsl:element>
|
3558
|
+
<!-- </xsl:element> -->
|
3472
3559
|
</xsl:variable>
|
3473
3560
|
|
3474
3561
|
<xsl:call-template name="calculate-column-widths">
|
@@ -3564,6 +3651,8 @@
|
|
3564
3651
|
<xsl:apply-templates/>
|
3565
3652
|
</fo:inline>
|
3566
3653
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3654
|
+
<xsl:variable name="isAdded" select="@added"/>
|
3655
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
3567
3656
|
<fo:block-container>
|
3568
3657
|
|
3569
3658
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -3580,6 +3669,12 @@
|
|
3580
3669
|
</xsl:attribute>
|
3581
3670
|
|
3582
3671
|
</xsl:if>
|
3672
|
+
|
3673
|
+
<xsl:call-template name="setTrackChangesStyles">
|
3674
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
3675
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
3676
|
+
</xsl:call-template>
|
3677
|
+
|
3583
3678
|
<fo:block-container>
|
3584
3679
|
|
3585
3680
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
@@ -3695,11 +3790,11 @@
|
|
3695
3790
|
</xsl:choose>
|
3696
3791
|
</xsl:variable>
|
3697
3792
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
3698
|
-
<xsl:element name="{$ns}:table">
|
3793
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
3699
3794
|
<tbody>
|
3700
3795
|
<xsl:apply-templates mode="dl"/>
|
3701
3796
|
</tbody>
|
3702
|
-
</xsl:element>
|
3797
|
+
<!-- </xsl:element> -->
|
3703
3798
|
</xsl:variable>
|
3704
3799
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3705
3800
|
<xsl:variable name="colwidths">
|
@@ -3965,6 +4060,7 @@
|
|
3965
4060
|
|
3966
4061
|
|
3967
4062
|
|
4063
|
+
|
3968
4064
|
|
3969
4065
|
</xsl:variable>
|
3970
4066
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -3982,8 +4078,74 @@
|
|
3982
4078
|
<fo:inline text-decoration="underline">
|
3983
4079
|
<xsl:apply-templates/>
|
3984
4080
|
</fo:inline>
|
4081
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
4082
|
+
<xsl:choose>
|
4083
|
+
<xsl:when test="@amendment">
|
4084
|
+
<fo:inline>
|
4085
|
+
<xsl:call-template name="insertTag">
|
4086
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4087
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4088
|
+
</xsl:call-template>
|
4089
|
+
<xsl:apply-templates/>
|
4090
|
+
<xsl:call-template name="insertTag">
|
4091
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4092
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
4093
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
4094
|
+
</xsl:call-template>
|
4095
|
+
</fo:inline>
|
4096
|
+
</xsl:when>
|
4097
|
+
<xsl:when test="@corrigenda">
|
4098
|
+
<fo:inline>
|
4099
|
+
<xsl:call-template name="insertTag">
|
4100
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4101
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4102
|
+
</xsl:call-template>
|
4103
|
+
<xsl:apply-templates/>
|
4104
|
+
<xsl:call-template name="insertTag">
|
4105
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
4106
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
4107
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
4108
|
+
</xsl:call-template>
|
4109
|
+
</fo:inline>
|
4110
|
+
</xsl:when>
|
4111
|
+
<xsl:otherwise>
|
4112
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
4113
|
+
<xsl:apply-templates/>
|
4114
|
+
</fo:inline>
|
4115
|
+
</xsl:otherwise>
|
4116
|
+
</xsl:choose>
|
4117
|
+
|
4118
|
+
</xsl:template><xsl:template name="insertTag">
|
4119
|
+
<xsl:param name="type"/>
|
4120
|
+
<xsl:param name="kind"/>
|
4121
|
+
<xsl:param name="value"/>
|
4122
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
4123
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
4124
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
4125
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
4126
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
4127
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
4128
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
4129
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4130
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4131
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
4132
|
+
<g>
|
4133
|
+
<xsl:if test="$type = 'closing'">
|
4134
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
4135
|
+
</xsl:if>
|
4136
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
4137
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
4138
|
+
</g>
|
4139
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
4140
|
+
<xsl:if test="$type = 'closing'">
|
4141
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
4142
|
+
</xsl:if>
|
4143
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
4144
|
+
</text>
|
4145
|
+
</svg>
|
4146
|
+
</fo:instream-foreign-object>
|
3985
4147
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3986
|
-
<fo:inline
|
4148
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
3987
4149
|
<xsl:apply-templates/>
|
3988
4150
|
</fo:inline>
|
3989
4151
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -4280,11 +4442,15 @@
|
|
4280
4442
|
</xsl:apply-templates>
|
4281
4443
|
</xsl:template><xsl:template name="getLang">
|
4282
4444
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4445
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
4283
4446
|
<xsl:variable name="language">
|
4284
4447
|
<xsl:choose>
|
4285
4448
|
<xsl:when test="$language_current != ''">
|
4286
4449
|
<xsl:value-of select="$language_current"/>
|
4287
4450
|
</xsl:when>
|
4451
|
+
<xsl:when test="$language_current_2 != ''">
|
4452
|
+
<xsl:value-of select="$language_current_2"/>
|
4453
|
+
</xsl:when>
|
4288
4454
|
<xsl:otherwise>
|
4289
4455
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
4290
4456
|
</xsl:otherwise>
|
@@ -4324,13 +4490,23 @@
|
|
4324
4490
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
4325
4491
|
<xsl:value-of select="substring($str, 2)"/>
|
4326
4492
|
</xsl:template><xsl:template match="mathml:math">
|
4327
|
-
<
|
4493
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4494
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4495
|
+
|
4496
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
4497
|
+
|
4498
|
+
|
4499
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4500
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4501
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4502
|
+
</xsl:call-template>
|
4328
4503
|
|
4329
4504
|
<xsl:variable name="mathml">
|
4330
4505
|
<xsl:apply-templates select="." mode="mathml"/>
|
4331
4506
|
</xsl:variable>
|
4332
4507
|
<fo:instream-foreign-object fox:alt-text="Math">
|
4333
4508
|
|
4509
|
+
|
4334
4510
|
<!-- <xsl:copy-of select="."/> -->
|
4335
4511
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
4336
4512
|
</fo:instream-foreign-object>
|
@@ -4487,6 +4663,7 @@
|
|
4487
4663
|
|
4488
4664
|
|
4489
4665
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
4666
|
+
|
4490
4667
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4491
4668
|
</fo:inline>
|
4492
4669
|
<xsl:apply-templates/>
|
@@ -4513,6 +4690,7 @@
|
|
4513
4690
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
4514
4691
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
4515
4692
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4693
|
+
|
4516
4694
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4517
4695
|
</fo:inline>
|
4518
4696
|
<xsl:apply-templates/>
|
@@ -4578,8 +4756,15 @@
|
|
4578
4756
|
</fo:inline>
|
4579
4757
|
</xsl:if>
|
4580
4758
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
4759
|
+
<xsl:variable name="isAdded" select="@added"/>
|
4760
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4581
4761
|
<fo:block-container id="{@id}">
|
4582
4762
|
|
4763
|
+
<xsl:call-template name="setTrackChangesStyles">
|
4764
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
4765
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
4766
|
+
</xsl:call-template>
|
4767
|
+
|
4583
4768
|
<fo:block>
|
4584
4769
|
<xsl:apply-templates/>
|
4585
4770
|
</fo:block>
|
@@ -4587,7 +4772,10 @@
|
|
4587
4772
|
<xsl:for-each select="*[local-name() = 'note']">
|
4588
4773
|
<xsl:call-template name="note"/>
|
4589
4774
|
</xsl:for-each>
|
4590
|
-
|
4775
|
+
|
4776
|
+
|
4777
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4778
|
+
|
4591
4779
|
</fo:block-container>
|
4592
4780
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
4593
4781
|
<fo:block id="{@id}">
|
@@ -4599,40 +4787,122 @@
|
|
4599
4787
|
<xsl:apply-templates/>
|
4600
4788
|
</fo:block>
|
4601
4789
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
4602
|
-
<
|
4603
|
-
|
4604
|
-
|
4605
|
-
<xsl:
|
4606
|
-
<
|
4607
|
-
<xsl:
|
4608
|
-
<xsl:
|
4609
|
-
</xsl:
|
4610
|
-
<
|
4611
|
-
|
4612
|
-
|
4613
|
-
|
4614
|
-
|
4615
|
-
|
4616
|
-
|
4617
|
-
|
4618
|
-
|
4619
|
-
|
4620
|
-
|
4790
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
4791
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
4792
|
+
<xsl:choose>
|
4793
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
4794
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
4795
|
+
<xsl:variable name="src">
|
4796
|
+
<xsl:call-template name="image_src"/>
|
4797
|
+
</xsl:variable>
|
4798
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
4799
|
+
</fo:inline>
|
4800
|
+
</xsl:when>
|
4801
|
+
<xsl:otherwise>
|
4802
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
4803
|
+
|
4804
|
+
<xsl:variable name="src">
|
4805
|
+
<xsl:call-template name="image_src"/>
|
4806
|
+
</xsl:variable>
|
4807
|
+
|
4808
|
+
<xsl:choose>
|
4809
|
+
<xsl:when test="$isDeleted = 'true'">
|
4810
|
+
<!-- enclose in svg -->
|
4811
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
4812
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
4813
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
4814
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
4815
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4816
|
+
|
4817
|
+
|
4818
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
4819
|
+
|
4820
|
+
</fo:instream-foreign-object>
|
4821
|
+
</xsl:when>
|
4822
|
+
<xsl:otherwise>
|
4823
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
4824
|
+
</xsl:otherwise>
|
4825
|
+
</xsl:choose>
|
4826
|
+
|
4827
|
+
</fo:block>
|
4828
|
+
</xsl:otherwise>
|
4829
|
+
</xsl:choose>
|
4830
|
+
</xsl:template><xsl:template name="image_src">
|
4831
|
+
<xsl:choose>
|
4832
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
4833
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
4834
|
+
</xsl:when>
|
4835
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
4836
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
4837
|
+
</xsl:when>
|
4838
|
+
<xsl:otherwise>
|
4839
|
+
<xsl:value-of select="@src"/>
|
4840
|
+
</xsl:otherwise>
|
4841
|
+
</xsl:choose>
|
4842
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
4843
|
+
<xsl:choose>
|
4844
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
4845
|
+
<xsl:variable name="src">
|
4846
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
4847
|
+
</xsl:variable>
|
4848
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
4849
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
4850
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
4851
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
4852
|
+
</svg>
|
4853
|
+
</xsl:when>
|
4854
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
4855
|
+
<xsl:variable name="src">
|
4856
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
4857
|
+
</xsl:variable>
|
4858
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
4859
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
4860
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
4861
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
4862
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
4863
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
4864
|
+
</svg>
|
4865
|
+
</xsl:when>
|
4866
|
+
<xsl:otherwise>
|
4867
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
4868
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
4869
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
4870
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
4871
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
4872
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
4873
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
4874
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
4875
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
4876
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
4877
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
4878
|
+
<xsl:call-template name="svg_cross">
|
4879
|
+
<xsl:with-param name="width" select="$width"/>
|
4880
|
+
<xsl:with-param name="height" select="$height"/>
|
4881
|
+
</xsl:call-template>
|
4882
|
+
</svg>
|
4883
|
+
</xsl:otherwise>
|
4884
|
+
</xsl:choose>
|
4885
|
+
|
4886
|
+
</xsl:template><xsl:template name="svg_cross">
|
4887
|
+
<xsl:param name="width"/>
|
4888
|
+
<xsl:param name="height"/>
|
4889
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
4890
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
4621
4891
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
4622
4892
|
<xsl:apply-templates mode="contents"/>
|
4623
4893
|
<xsl:text> </xsl:text>
|
4624
4894
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
4625
4895
|
<xsl:apply-templates mode="bookmarks"/>
|
4626
4896
|
<xsl:text> </xsl:text>
|
4627
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4897
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
4628
4898
|
<xsl:value-of select="."/>
|
4629
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4899
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
4630
4900
|
<xsl:value-of select="."/>
|
4631
4901
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4632
4902
|
<xsl:apply-templates mode="contents"/>
|
4633
4903
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
4634
4904
|
<xsl:apply-templates mode="bookmarks"/>
|
4635
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
4905
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
4636
4906
|
<xsl:apply-templates select="."/>
|
4637
4907
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
4638
4908
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -4862,6 +5132,8 @@
|
|
4862
5132
|
</fo:list-item-body>
|
4863
5133
|
</fo:list-item>
|
4864
5134
|
</fo:list-block>
|
5135
|
+
</xsl:template><xsl:template name="extractSection">
|
5136
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4865
5137
|
</xsl:template><xsl:template name="extractTitle">
|
4866
5138
|
<xsl:choose>
|
4867
5139
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -4909,6 +5181,7 @@
|
|
4909
5181
|
|
4910
5182
|
|
4911
5183
|
|
5184
|
+
|
4912
5185
|
|
4913
5186
|
|
4914
5187
|
10
|
@@ -5193,6 +5466,7 @@
|
|
5193
5466
|
<xsl:variable name="element">
|
5194
5467
|
block
|
5195
5468
|
|
5469
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
5196
5470
|
</xsl:variable>
|
5197
5471
|
<xsl:choose>
|
5198
5472
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -5200,7 +5474,7 @@
|
|
5200
5474
|
<xsl:apply-templates/>
|
5201
5475
|
</fo:inline>
|
5202
5476
|
</xsl:when>
|
5203
|
-
<xsl:when test="normalize-space($element)
|
5477
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
5204
5478
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
5205
5479
|
<xsl:apply-templates/>
|
5206
5480
|
</fo:block>
|
@@ -5232,7 +5506,7 @@
|
|
5232
5506
|
</fo:inline>
|
5233
5507
|
</xsl:otherwise>
|
5234
5508
|
</xsl:choose>
|
5235
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
5509
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
5236
5510
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
5237
5511
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
5238
5512
|
<xsl:variable name="termsource_text">
|
@@ -5241,13 +5515,15 @@
|
|
5241
5515
|
|
5242
5516
|
<xsl:choose>
|
5243
5517
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5244
|
-
<xsl:apply-templates/>
|
5518
|
+
<!-- <xsl:apply-templates /> -->
|
5519
|
+
<xsl:copy-of select="$termsource_text"/>
|
5245
5520
|
</xsl:when>
|
5246
5521
|
<xsl:otherwise>
|
5247
5522
|
|
5248
5523
|
<xsl:text>[</xsl:text>
|
5249
5524
|
|
5250
|
-
<xsl:apply-templates/>
|
5525
|
+
<!-- <xsl:apply-templates /> -->
|
5526
|
+
<xsl:copy-of select="$termsource_text"/>
|
5251
5527
|
|
5252
5528
|
<xsl:text>]</xsl:text>
|
5253
5529
|
|
@@ -5258,8 +5534,15 @@
|
|
5258
5534
|
<xsl:if test="normalize-space() != ''">
|
5259
5535
|
<xsl:value-of select="."/>
|
5260
5536
|
</xsl:if>
|
5261
|
-
</xsl:template><xsl:
|
5537
|
+
</xsl:template><xsl:variable name="localized.source">
|
5538
|
+
<xsl:call-template name="getLocalizedString">
|
5539
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
5540
|
+
</xsl:call-template>
|
5541
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
5262
5542
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5543
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
5544
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5545
|
+
</xsl:if>
|
5263
5546
|
|
5264
5547
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5265
5548
|
<xsl:apply-templates/>
|
@@ -5409,7 +5692,8 @@
|
|
5409
5692
|
</fo:inline>
|
5410
5693
|
</xsl:when>
|
5411
5694
|
<xsl:otherwise>
|
5412
|
-
<
|
5695
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
5696
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
5413
5697
|
</xsl:otherwise>
|
5414
5698
|
</xsl:choose>
|
5415
5699
|
|
@@ -5463,7 +5747,6 @@
|
|
5463
5747
|
|
5464
5748
|
|
5465
5749
|
|
5466
|
-
|
5467
5750
|
<xsl:apply-templates/>
|
5468
5751
|
</fo:block>
|
5469
5752
|
|
@@ -5512,7 +5795,7 @@
|
|
5512
5795
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
5513
5796
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
5514
5797
|
<xsl:choose>
|
5515
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
5798
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
5516
5799
|
<fo:block-container>
|
5517
5800
|
<xsl:attribute name="margin-left">
|
5518
5801
|
<xsl:choose>
|
@@ -5522,6 +5805,7 @@
|
|
5522
5805
|
</xsl:attribute>
|
5523
5806
|
|
5524
5807
|
|
5808
|
+
|
5525
5809
|
<fo:block-container margin-left="0mm">
|
5526
5810
|
<fo:block>
|
5527
5811
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -5725,6 +6009,10 @@
|
|
5725
6009
|
|
5726
6010
|
|
5727
6011
|
|
6012
|
+
|
6013
|
+
|
6014
|
+
|
6015
|
+
|
5728
6016
|
</xsl:template><xsl:template name="processBibitemDocId">
|
5729
6017
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
5730
6018
|
<xsl:choose>
|
@@ -5781,6 +6069,70 @@
|
|
5781
6069
|
<xsl:value-of select="substring(.,1,1)"/>
|
5782
6070
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5783
6071
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6072
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
6073
|
+
<fo:block>
|
6074
|
+
<xsl:apply-templates/>
|
6075
|
+
</fo:block>
|
6076
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
6077
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
6078
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
6079
|
+
<fo:inline>
|
6080
|
+
<xsl:call-template name="text_input"/>
|
6081
|
+
</fo:inline>
|
6082
|
+
</xsl:template><xsl:template name="text_input">
|
6083
|
+
<xsl:variable name="count">
|
6084
|
+
<xsl:choose>
|
6085
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
6086
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
6087
|
+
<xsl:otherwise>10</xsl:otherwise>
|
6088
|
+
</xsl:choose>
|
6089
|
+
</xsl:variable>
|
6090
|
+
<xsl:call-template name="repeat">
|
6091
|
+
<xsl:with-param name="char" select="'_'"/>
|
6092
|
+
<xsl:with-param name="count" select="$count"/>
|
6093
|
+
</xsl:call-template>
|
6094
|
+
<xsl:text> </xsl:text>
|
6095
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
6096
|
+
<xsl:variable name="caption">
|
6097
|
+
<xsl:choose>
|
6098
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
6099
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
6100
|
+
</xsl:choose>
|
6101
|
+
</xsl:variable>
|
6102
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
6103
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
6104
|
+
<fo:inline padding-right="1mm">
|
6105
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6106
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6107
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6108
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6109
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6110
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6111
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
6112
|
+
</svg>
|
6113
|
+
</fo:instream-foreign-object>
|
6114
|
+
</fo:inline>
|
6115
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
6116
|
+
<fo:inline padding-right="1mm">
|
6117
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
6118
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
6119
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6120
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6121
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6122
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
6123
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
6124
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
6125
|
+
</svg>
|
6126
|
+
</fo:instream-foreign-object>
|
6127
|
+
</fo:inline>
|
6128
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
6129
|
+
<fo:inline>
|
6130
|
+
<xsl:call-template name="text_input"/>
|
6131
|
+
</fo:inline>
|
6132
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
6133
|
+
<fo:block-container border="1pt solid black" width="50%">
|
6134
|
+
<fo:block> </fo:block>
|
6135
|
+
</fo:block-container>
|
5784
6136
|
</xsl:template><xsl:template name="convertDate">
|
5785
6137
|
<xsl:param name="date"/>
|
5786
6138
|
<xsl:param name="format" select="'short'"/>
|
@@ -6047,6 +6399,7 @@
|
|
6047
6399
|
|
6048
6400
|
|
6049
6401
|
|
6402
|
+
|
6050
6403
|
<xsl:value-of select="document('')//*/namespace::nist"/>
|
6051
6404
|
|
6052
6405
|
|
@@ -6112,17 +6465,62 @@
|
|
6112
6465
|
</xsl:call-template>
|
6113
6466
|
</xsl:if>
|
6114
6467
|
</xsl:template><xsl:template name="getLocalizedString">
|
6115
|
-
<xsl:param name="key"/>
|
6468
|
+
<xsl:param name="key"/>
|
6116
6469
|
|
6117
6470
|
<xsl:variable name="curr_lang">
|
6118
6471
|
<xsl:call-template name="getLang"/>
|
6119
6472
|
</xsl:variable>
|
6120
6473
|
|
6474
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
6475
|
+
|
6121
6476
|
<xsl:choose>
|
6477
|
+
<xsl:when test="$data_value != ''">
|
6478
|
+
<xsl:value-of select="$data_value"/>
|
6479
|
+
</xsl:when>
|
6122
6480
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
6123
6481
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
6124
6482
|
</xsl:when>
|
6125
6483
|
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
6126
6484
|
</xsl:choose>
|
6127
6485
|
|
6486
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
6487
|
+
<xsl:param name="isAdded"/>
|
6488
|
+
<xsl:param name="isDeleted"/>
|
6489
|
+
<xsl:choose>
|
6490
|
+
<xsl:when test="local-name() = 'math'">
|
6491
|
+
<xsl:if test="$isAdded = 'true'">
|
6492
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
6493
|
+
</xsl:if>
|
6494
|
+
<xsl:if test="$isDeleted = 'true'">
|
6495
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
6496
|
+
</xsl:if>
|
6497
|
+
</xsl:when>
|
6498
|
+
<xsl:otherwise>
|
6499
|
+
<xsl:if test="$isAdded = 'true'">
|
6500
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
6501
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6502
|
+
</xsl:if>
|
6503
|
+
<xsl:if test="$isDeleted = 'true'">
|
6504
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
6505
|
+
<xsl:if test="local-name() = 'table'">
|
6506
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
6507
|
+
</xsl:if>
|
6508
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
6509
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
6510
|
+
</xsl:if>
|
6511
|
+
</xsl:otherwise>
|
6512
|
+
</xsl:choose>
|
6513
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
6514
|
+
<xsl:if test="$lang = 'ar'">
|
6515
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
6516
|
+
</xsl:if>
|
6517
|
+
</xsl:template><xsl:template name="setAlignment">
|
6518
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
6519
|
+
<xsl:choose>
|
6520
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
6521
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
6522
|
+
<xsl:when test="$align != ''">
|
6523
|
+
<xsl:value-of select="$align"/>
|
6524
|
+
</xsl:when>
|
6525
|
+
</xsl:choose>
|
6128
6526
|
</xsl:template></xsl:stylesheet>
|