metanorma-iso 1.5.3 → 1.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iso/base.rb +1 -1
- data/lib/asciidoctor/iso/basicdoc.rng +31 -1
- data/lib/asciidoctor/iso/front.rb +2 -2
- data/lib/asciidoctor/iso/front_id.rb +5 -5
- data/lib/asciidoctor/iso/isodoc.rng +112 -9
- data/lib/asciidoctor/iso/section.rb +0 -7
- data/lib/isodoc/iso/html/isodoc.css +16 -4
- data/lib/isodoc/iso/html/isodoc.scss +18 -4
- data/lib/isodoc/iso/html/wordstyle.css +10 -9
- data/lib/isodoc/iso/html/wordstyle.scss +15 -9
- data/lib/isodoc/iso/iso.amendment.xsl +576 -234
- data/lib/isodoc/iso/iso.international-standard.xsl +576 -234
- data/lib/isodoc/iso/isosts_convert.rb +31 -0
- data/lib/isodoc/iso/word_convert.rb +17 -13
- data/lib/isodoc/iso/xref.rb +7 -11
- data/lib/metanorma-iso.rb +1 -0
- data/lib/metanorma/iso/processor.rb +4 -1
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- data/spec/asciidoctor-iso/amd_spec.rb +0 -32
- data/spec/asciidoctor-iso/cleanup_spec.rb +57 -33
- data/spec/asciidoctor-iso/inline_spec.rb +7 -1
- data/spec/asciidoctor-iso/table_spec.rb +118 -112
- data/spec/isodoc/amd_spec.rb +13 -13
- data/spec/isodoc/iso_spec.rb +3 -3
- data/spec/isodoc/postproc_spec.rb +76 -1
- data/spec/isodoc/ref_spec.rb +1 -1
- data/spec/metanorma/processor_spec.rb +1 -1
- metadata +5 -4
@@ -15,6 +15,8 @@
|
|
15
15
|
<xsl:variable name="pageWidth" select="'210mm'"/>
|
16
16
|
<xsl:variable name="pageHeight" select="'297mm'"/>
|
17
17
|
|
18
|
+
<xsl:variable name="docidentifierISO" select="/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso'] | /iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'ISO']"/>
|
19
|
+
|
18
20
|
<xsl:variable name="copyrightText" select="concat('© ISO ', iso:iso-standard/iso:bibdata/iso:copyright/iso:from ,' – All rights reserved')"/>
|
19
21
|
|
20
22
|
<xsl:variable name="lang-1st-letter_tmp" select="substring-before(substring-after(/iso:iso-standard/iso:bibdata/iso:docidentifier[@type = 'iso-with-lang'], '('), ')')"/>
|
@@ -399,7 +401,7 @@
|
|
399
401
|
<xsl:value-of select="$stage-fullname-uppercased"/>
|
400
402
|
</fo:block>
|
401
403
|
<fo:block font-size="20pt" font-weight="bold" text-align="right">
|
402
|
-
<xsl:value-of select="
|
404
|
+
<xsl:value-of select="$docidentifierISO"/>
|
403
405
|
</fo:block>
|
404
406
|
|
405
407
|
|
@@ -544,7 +546,7 @@
|
|
544
546
|
</fo:table-cell>
|
545
547
|
<fo:table-cell>
|
546
548
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
547
|
-
<xsl:value-of select="
|
549
|
+
<xsl:value-of select="$docidentifierISO"/>
|
548
550
|
</fo:block>
|
549
551
|
</fo:table-cell>
|
550
552
|
</fo:table-row>
|
@@ -555,11 +557,11 @@
|
|
555
557
|
<xsl:call-template name="printEdition"/>
|
556
558
|
</xsl:if>
|
557
559
|
<xsl:choose>
|
558
|
-
<xsl:when test="$stage-abbreviation = 'IS'">
|
560
|
+
<xsl:when test="$stage-abbreviation = 'IS' and /iso:iso-standard/iso:bibdata/iso:date[@type = 'published']">
|
559
561
|
<xsl:value-of select="$linebreak"/>
|
560
562
|
<xsl:value-of select="/iso:iso-standard/iso:bibdata/iso:date[@type = 'published']"/>
|
561
|
-
</xsl:when>
|
562
|
-
<xsl:when test="$stage-abbreviation = 'published'">
|
563
|
+
</xsl:when>
|
564
|
+
<xsl:when test="$stage-abbreviation = 'IS' or $stage-abbreviation = 'published'">
|
563
565
|
<xsl:value-of select="$linebreak"/>
|
564
566
|
<xsl:value-of select="substring(/iso:iso-standard/iso:bibdata/iso:version/iso:revision-date,1, 7)"/>
|
565
567
|
</xsl:when>
|
@@ -714,7 +716,7 @@
|
|
714
716
|
</fo:table-cell>
|
715
717
|
<fo:table-cell>
|
716
718
|
<fo:block text-align="right" font-weight="bold" margin-bottom="13mm">
|
717
|
-
<xsl:value-of select="
|
719
|
+
<xsl:value-of select="$docidentifierISO"/>
|
718
720
|
</fo:block>
|
719
721
|
</fo:table-cell>
|
720
722
|
</fo:table-row>
|
@@ -891,7 +893,7 @@
|
|
891
893
|
</fo:block-container>
|
892
894
|
<fo:block font-size="11pt" margin-bottom="8pt"><xsl:value-of select="$linebreak"/></fo:block>
|
893
895
|
<fo:block-container font-size="40pt" text-align="center" margin-bottom="12pt" border="0.5pt solid black">
|
894
|
-
<xsl:variable name="stage-title" select="substring-after(substring-before(
|
896
|
+
<xsl:variable name="stage-title" select="substring-after(substring-before($docidentifierISO, ' '), '/')"/>
|
895
897
|
<fo:block padding-top="2mm"><xsl:value-of select="$stage-title"/><xsl:text> stage</xsl:text></fo:block>
|
896
898
|
</fo:block-container>
|
897
899
|
<fo:block><xsl:value-of select="$linebreak"/></fo:block>
|
@@ -1446,7 +1448,7 @@
|
|
1446
1448
|
</xsl:element>
|
1447
1449
|
<xsl:if test="$element-name = 'fo:inline' and not($inline = 'true') and not(local-name(..) = 'admonition')">
|
1448
1450
|
<fo:block margin-bottom="12pt">
|
1449
|
-
<xsl:if test="ancestor::iso:annex">
|
1451
|
+
<xsl:if test="ancestor::iso:annex or following-sibling::iso:table">
|
1450
1452
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
1451
1453
|
</xsl:if>
|
1452
1454
|
<xsl:value-of select="$linebreak"/>
|
@@ -1579,7 +1581,7 @@
|
|
1579
1581
|
|
1580
1582
|
|
1581
1583
|
|
1582
|
-
<xsl:template match="iso:ul | iso:ol">
|
1584
|
+
<xsl:template match="iso:ul | iso:ol" mode="ul_ol">
|
1583
1585
|
<fo:list-block provisional-distance-between-starts="7mm" margin-top="8pt"> <!-- margin-bottom="8pt" -->
|
1584
1586
|
<xsl:apply-templates/>
|
1585
1587
|
</fo:list-block>
|
@@ -1606,7 +1608,9 @@
|
|
1606
1608
|
</fo:list-item>
|
1607
1609
|
</xsl:template>
|
1608
1610
|
|
1609
|
-
|
1611
|
+
<xsl:template match="iso:note" mode="process">
|
1612
|
+
<xsl:call-template name="note"/>
|
1613
|
+
</xsl:template>
|
1610
1614
|
|
1611
1615
|
<xsl:template match="iso:preferred">
|
1612
1616
|
<fo:block line-height="1.1">
|
@@ -1688,8 +1692,12 @@
|
|
1688
1692
|
|
1689
1693
|
<xsl:template match="mathml:math" priority="2">
|
1690
1694
|
<fo:inline font-family="Cambria Math">
|
1695
|
+
<xsl:variable name="mathml">
|
1696
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
1697
|
+
</xsl:variable>
|
1691
1698
|
<fo:instream-foreign-object fox:alt-text="Math">
|
1692
|
-
<xsl:copy-of select="."/>
|
1699
|
+
<!-- <xsl:copy-of select="."/> -->
|
1700
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
1693
1701
|
</fo:instream-foreign-object>
|
1694
1702
|
</fo:inline>
|
1695
1703
|
</xsl:template>
|
@@ -2025,7 +2033,12 @@
|
|
2025
2033
|
|
2026
2034
|
|
2027
2035
|
|
2028
|
-
<title-source lang="en">
|
2036
|
+
<title-source lang="en">
|
2037
|
+
|
2038
|
+
<xsl:text>SOURCE</xsl:text>
|
2039
|
+
|
2040
|
+
|
2041
|
+
</title-source>
|
2029
2042
|
|
2030
2043
|
<title-keywords lang="en">Keywords</title-keywords>
|
2031
2044
|
|
@@ -2068,6 +2081,10 @@
|
|
2068
2081
|
<title-warning lang="zh">警告</title-warning>
|
2069
2082
|
|
2070
2083
|
<title-amendment lang="en">AMENDMENT</title-amendment>
|
2084
|
+
|
2085
|
+
<title-continued lang="en">(continued)</title-continued>
|
2086
|
+
<title-continued lang="fr">(continué)</title-continued>
|
2087
|
+
|
2071
2088
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
2072
2089
|
<xsl:param name="name"/>
|
2073
2090
|
<xsl:variable name="lang">
|
@@ -2088,12 +2105,12 @@
|
|
2088
2105
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2089
2106
|
|
2090
2107
|
|
2108
|
+
|
2091
2109
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
2092
2110
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
2093
2111
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
2094
2112
|
|
2095
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2096
|
-
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2113
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2097
2114
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2098
2115
|
|
2099
2116
|
|
@@ -2103,6 +2120,7 @@
|
|
2103
2120
|
|
2104
2121
|
|
2105
2122
|
|
2123
|
+
|
2106
2124
|
</xsl:attribute-set><xsl:attribute-set name="permission-style">
|
2107
2125
|
|
2108
2126
|
</xsl:attribute-set><xsl:attribute-set name="permission-name-style">
|
@@ -2153,6 +2171,7 @@
|
|
2153
2171
|
|
2154
2172
|
|
2155
2173
|
|
2174
|
+
|
2156
2175
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
2157
2176
|
|
2158
2177
|
|
@@ -2173,6 +2192,7 @@
|
|
2173
2192
|
|
2174
2193
|
|
2175
2194
|
|
2195
|
+
|
2176
2196
|
|
2177
2197
|
|
2178
2198
|
|
@@ -2209,9 +2229,10 @@
|
|
2209
2229
|
|
2210
2230
|
|
2211
2231
|
|
2232
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2212
2233
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2213
2234
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2214
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2235
|
+
<!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
|
2215
2236
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2216
2237
|
|
2217
2238
|
|
@@ -2242,11 +2263,13 @@
|
|
2242
2263
|
|
2243
2264
|
<xsl:attribute name="color">blue</xsl:attribute>
|
2244
2265
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
2245
|
-
|
2266
|
+
|
2267
|
+
|
2246
2268
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
2247
2269
|
|
2248
2270
|
|
2249
2271
|
|
2272
|
+
|
2250
2273
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
2251
2274
|
|
2252
2275
|
|
@@ -2266,20 +2289,20 @@
|
|
2266
2289
|
|
2267
2290
|
|
2268
2291
|
|
2292
|
+
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
2269
2293
|
|
2270
2294
|
|
2271
|
-
</xsl:attribute-set><xsl:attribute-set name="note-name-style">
|
2272
2295
|
|
2273
2296
|
|
2274
2297
|
|
2275
2298
|
|
2299
|
+
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2300
|
+
|
2276
2301
|
|
2277
2302
|
|
2278
|
-
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
2279
2303
|
|
2280
2304
|
|
2281
2305
|
|
2282
|
-
|
2283
2306
|
|
2284
2307
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
2285
2308
|
|
@@ -2309,6 +2332,8 @@
|
|
2309
2332
|
|
2310
2333
|
|
2311
2334
|
|
2335
|
+
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
2336
|
+
|
2312
2337
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
2313
2338
|
|
2314
2339
|
|
@@ -2337,6 +2362,7 @@
|
|
2337
2362
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
2338
2363
|
|
2339
2364
|
|
2365
|
+
|
2340
2366
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
2341
2367
|
|
2342
2368
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
@@ -2345,6 +2371,7 @@
|
|
2345
2371
|
|
2346
2372
|
|
2347
2373
|
|
2374
|
+
|
2348
2375
|
|
2349
2376
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2350
2377
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
@@ -2388,14 +2415,16 @@
|
|
2388
2415
|
</xsl:attribute-set><xsl:attribute-set name="tt-style">
|
2389
2416
|
|
2390
2417
|
|
2391
|
-
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2392
|
-
|
2418
|
+
<xsl:attribute name="font-family">Courier</xsl:attribute>
|
2419
|
+
|
2393
2420
|
|
2394
2421
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
2395
2422
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2396
2423
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
2397
2424
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
2398
2425
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2426
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
2427
|
+
|
2399
2428
|
</xsl:attribute-set><xsl:attribute-set name="domain-style">
|
2400
2429
|
|
2401
2430
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
@@ -2461,12 +2490,10 @@
|
|
2461
2490
|
|
2462
2491
|
|
2463
2492
|
|
2464
|
-
|
2493
|
+
<!-- $namespace = 'iso' or -->
|
2465
2494
|
|
2466
2495
|
|
2467
2496
|
|
2468
|
-
<xsl:call-template name="fn_name_display"/>
|
2469
|
-
|
2470
2497
|
|
2471
2498
|
|
2472
2499
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
@@ -2520,8 +2547,9 @@
|
|
2520
2547
|
|
2521
2548
|
|
2522
2549
|
|
2550
|
+
|
2523
2551
|
|
2524
|
-
|
2552
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2525
2553
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2526
2554
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2527
2555
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
@@ -2551,6 +2579,8 @@
|
|
2551
2579
|
|
2552
2580
|
|
2553
2581
|
|
2582
|
+
|
2583
|
+
|
2554
2584
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2555
2585
|
<xsl:choose>
|
2556
2586
|
<xsl:when test=". = 1 or . = 0">
|
@@ -2581,8 +2611,11 @@
|
|
2581
2611
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
2582
2612
|
<xsl:if test="normalize-space() != ''">
|
2583
2613
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2584
|
-
|
2585
|
-
|
2614
|
+
|
2615
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
2616
|
+
|
2617
|
+
<xsl:apply-templates/>
|
2618
|
+
</fo:block>
|
2586
2619
|
</xsl:if>
|
2587
2620
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
2588
2621
|
<xsl:param name="table-row"/>
|
@@ -2698,28 +2731,29 @@
|
|
2698
2731
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2699
2732
|
<xsl:param name="cols-count"/>
|
2700
2733
|
<!-- font-weight="bold" -->
|
2701
|
-
<fo:table-header>
|
2702
|
-
|
2703
|
-
<fo:table-row>
|
2704
|
-
<fo:table-cell number-columns-spanned="{$cols-count}"> <!-- border-left="1pt solid white" border-right="1pt solid white" border-top="1pt solid white" -->
|
2705
|
-
<fo:block text-align="center" font-size="11pt" font-weight="bold">
|
2706
|
-
<!-- (continued) -->
|
2707
|
-
<fo:block-container position="absolute" top="-7mm">
|
2708
|
-
<fo:block>
|
2709
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued" retrieve-position-within-table="first-starting" retrieve-boundary-within-table="table-fragment"/>
|
2710
|
-
</fo:block>
|
2711
|
-
</fo:block-container>
|
2734
|
+
<fo:table-header>
|
2712
2735
|
|
2713
|
-
|
2714
|
-
|
2715
|
-
|
2716
|
-
</fo:block> -->
|
2736
|
+
<xsl:call-template name="table-header-title">
|
2737
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2738
|
+
</xsl:call-template>
|
2717
2739
|
|
2718
|
-
</fo:table-cell>
|
2719
|
-
</fo:table-row>
|
2720
|
-
|
2721
2740
|
<xsl:apply-templates/>
|
2722
2741
|
</fo:table-header>
|
2742
|
+
</xsl:template><xsl:template name="table-header-title">
|
2743
|
+
<xsl:param name="cols-count"/>
|
2744
|
+
<!-- row for title -->
|
2745
|
+
<fo:table-row>
|
2746
|
+
<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">
|
2747
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation"/>
|
2748
|
+
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
2749
|
+
<xsl:call-template name="fn_name_display"/>
|
2750
|
+
</xsl:for-each>
|
2751
|
+
<fo:block text-align="right" font-style="italic">
|
2752
|
+
<xsl:text> </xsl:text>
|
2753
|
+
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
2754
|
+
</fo:block>
|
2755
|
+
</fo:table-cell>
|
2756
|
+
</fo:table-row>
|
2723
2757
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
2724
2758
|
<fo:table-body>
|
2725
2759
|
<xsl:apply-templates/>
|
@@ -2785,6 +2819,17 @@
|
|
2785
2819
|
</xsl:choose>
|
2786
2820
|
</xsl:variable>
|
2787
2821
|
|
2822
|
+
|
2823
|
+
<!-- if there isn't 'thead' and there is a table's title -->
|
2824
|
+
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='thead']) and ancestor::*[local-name()='table']/*[local-name()='name']">
|
2825
|
+
<fo:table-header>
|
2826
|
+
<xsl:call-template name="table-header-title">
|
2827
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2828
|
+
</xsl:call-template>
|
2829
|
+
</fo:table-header>
|
2830
|
+
</xsl:if>
|
2831
|
+
|
2832
|
+
|
2788
2833
|
<xsl:apply-templates select="../*[local-name()='thead']" mode="process">
|
2789
2834
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2790
2835
|
</xsl:apply-templates>
|
@@ -2794,6 +2839,30 @@
|
|
2794
2839
|
</xsl:call-template>
|
2795
2840
|
|
2796
2841
|
<fo:table-body>
|
2842
|
+
|
2843
|
+
<xsl:variable name="title_continued">
|
2844
|
+
<xsl:call-template name="getTitle">
|
2845
|
+
<xsl:with-param name="name" select="'title-continued'"/>
|
2846
|
+
</xsl:call-template>
|
2847
|
+
</xsl:variable>
|
2848
|
+
<fo:table-row height="0" keep-with-next.within-page="always">
|
2849
|
+
<fo:table-cell>
|
2850
|
+
<fo:marker marker-class-name="table_continued"/>
|
2851
|
+
<fo:block/>
|
2852
|
+
</fo:table-cell>
|
2853
|
+
</fo:table-row>
|
2854
|
+
<fo:table-row height="0" keep-with-next.within-page="always">
|
2855
|
+
<fo:table-cell>
|
2856
|
+
<fo:marker marker-class-name="table_continued">
|
2857
|
+
<!-- <fo:inline font-style="italic" font-weight="normal"> -->
|
2858
|
+
<xsl:value-of select="$title_continued"/>
|
2859
|
+
<!-- </fo:inline> -->
|
2860
|
+
</fo:marker>
|
2861
|
+
<fo:block/>
|
2862
|
+
</fo:table-cell>
|
2863
|
+
</fo:table-row>
|
2864
|
+
|
2865
|
+
|
2797
2866
|
<xsl:apply-templates/>
|
2798
2867
|
<!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
|
2799
2868
|
|
@@ -2835,6 +2904,8 @@
|
|
2835
2904
|
|
2836
2905
|
</xsl:if>
|
2837
2906
|
|
2907
|
+
|
2908
|
+
|
2838
2909
|
|
2839
2910
|
<xsl:apply-templates/>
|
2840
2911
|
</fo:table-row>
|
@@ -2859,6 +2930,7 @@
|
|
2859
2930
|
|
2860
2931
|
|
2861
2932
|
|
2933
|
+
|
2862
2934
|
<xsl:if test="@colspan">
|
2863
2935
|
<xsl:attribute name="number-columns-spanned">
|
2864
2936
|
<xsl:value-of select="@colspan"/>
|
@@ -2869,10 +2941,22 @@
|
|
2869
2941
|
<xsl:value-of select="@rowspan"/>
|
2870
2942
|
</xsl:attribute>
|
2871
2943
|
</xsl:if>
|
2944
|
+
<xsl:call-template name="display-align"/>
|
2872
2945
|
<fo:block>
|
2873
2946
|
<xsl:apply-templates/>
|
2874
2947
|
</fo:block>
|
2875
2948
|
</fo:table-cell>
|
2949
|
+
</xsl:template><xsl:template name="display-align">
|
2950
|
+
<xsl:if test="@valign">
|
2951
|
+
<xsl:attribute name="display-align">
|
2952
|
+
<xsl:choose>
|
2953
|
+
<xsl:when test="@valign = 'top'">before</xsl:when>
|
2954
|
+
<xsl:when test="@valign = 'middle'">center</xsl:when>
|
2955
|
+
<xsl:when test="@valign = 'bottom'">after</xsl:when>
|
2956
|
+
<xsl:otherwise>before</xsl:otherwise>
|
2957
|
+
</xsl:choose>
|
2958
|
+
</xsl:attribute>
|
2959
|
+
</xsl:if>
|
2876
2960
|
</xsl:template><xsl:template match="*[local-name()='td']">
|
2877
2961
|
<fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
|
2878
2962
|
<xsl:attribute name="text-align">
|
@@ -2898,6 +2982,7 @@
|
|
2898
2982
|
|
2899
2983
|
|
2900
2984
|
|
2985
|
+
|
2901
2986
|
<xsl:if test="@colspan">
|
2902
2987
|
<xsl:attribute name="number-columns-spanned">
|
2903
2988
|
<xsl:value-of select="@colspan"/>
|
@@ -2908,20 +2993,8 @@
|
|
2908
2993
|
<xsl:value-of select="@rowspan"/>
|
2909
2994
|
</xsl:attribute>
|
2910
2995
|
</xsl:if>
|
2911
|
-
<
|
2912
|
-
|
2913
|
-
<xsl:variable name="row_number">
|
2914
|
-
<xsl:number format="1" count="*[local-name() = 'tr'] | *[local-name() = 'th']"/>
|
2915
|
-
</xsl:variable>
|
2916
|
-
<fo:marker marker-class-name="table_continued">
|
2917
|
-
<xsl:if test="$row_number > 1">
|
2918
|
-
<fo:inline>
|
2919
|
-
<xsl:apply-templates select="ancestor::*[local-name() = 'table']/*[local-name() = 'name']" mode="contents"/>
|
2920
|
-
<fo:inline font-style="italic" font-weight="normal">(continued)</fo:inline>
|
2921
|
-
</fo:inline>
|
2922
|
-
</xsl:if>
|
2923
|
-
</fo:marker>
|
2924
|
-
|
2996
|
+
<xsl:call-template name="display-align"/>
|
2997
|
+
<fo:block>
|
2925
2998
|
<xsl:apply-templates/>
|
2926
2999
|
</fo:block>
|
2927
3000
|
</fo:table-cell>
|
@@ -3110,6 +3183,7 @@
|
|
3110
3183
|
|
3111
3184
|
|
3112
3185
|
|
3186
|
+
|
3113
3187
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
3114
3188
|
|
3115
3189
|
<xsl:value-of select="@reference"/>
|
@@ -3120,129 +3194,143 @@
|
|
3120
3194
|
<xsl:apply-templates/>
|
3121
3195
|
</fo:inline>
|
3122
3196
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
3123
|
-
<
|
3124
|
-
|
3125
|
-
|
3126
|
-
|
3127
|
-
|
3128
|
-
|
3129
|
-
|
3130
|
-
|
3131
|
-
<xsl:choose>
|
3132
|
-
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3133
|
-
|
3197
|
+
<fo:block-container margin-left="0mm">
|
3198
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3199
|
+
<xsl:attribute name="margin-left">
|
3200
|
+
<xsl:choose>
|
3201
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3202
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3203
|
+
</xsl:choose>
|
3204
|
+
</xsl:attribute>
|
3134
3205
|
|
3135
|
-
|
3136
|
-
|
3137
|
-
|
3138
|
-
|
3139
|
-
<xsl:variable name="title-where">
|
3140
|
-
<xsl:call-template name="getTitle">
|
3141
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3142
|
-
</xsl:call-template>
|
3143
|
-
</xsl:variable>
|
3144
|
-
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3145
|
-
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3146
|
-
<xsl:text/>
|
3147
|
-
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3148
|
-
</fo:block>
|
3206
|
+
</xsl:if>
|
3207
|
+
<fo:block-container margin-left="0mm">
|
3208
|
+
|
3209
|
+
<xsl:variable name="parent" select="local-name(..)"/>
|
3149
3210
|
|
3150
|
-
|
3151
|
-
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3152
|
-
<fo:block margin-bottom="12pt" text-align="left">
|
3211
|
+
<xsl:variable name="key_iso">
|
3153
3212
|
|
3154
|
-
<xsl:
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3159
|
-
<xsl:variable name="title-where">
|
3160
|
-
<xsl:call-template name="getTitle">
|
3161
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
3162
|
-
</xsl:call-template>
|
3163
|
-
</xsl:variable>
|
3164
|
-
<xsl:value-of select="$title-where"/>
|
3165
|
-
</fo:block>
|
3166
|
-
</xsl:when>
|
3167
|
-
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3168
|
-
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3169
|
-
|
3170
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3171
|
-
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3172
|
-
|
3173
|
-
|
3174
|
-
|
3175
|
-
<xsl:variable name="title-key">
|
3176
|
-
<xsl:call-template name="getTitle">
|
3177
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
3178
|
-
</xsl:call-template>
|
3179
|
-
</xsl:variable>
|
3180
|
-
<xsl:value-of select="$title-key"/>
|
3181
|
-
</fo:block>
|
3182
|
-
</xsl:when>
|
3183
|
-
</xsl:choose>
|
3184
|
-
|
3185
|
-
<!-- a few components -->
|
3186
|
-
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3187
|
-
<fo:block>
|
3188
|
-
|
3189
|
-
<xsl:if test="$parent = 'formula'">
|
3190
|
-
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
3191
|
-
</xsl:if>
|
3192
|
-
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3213
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
3214
|
+
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
3215
|
+
</xsl:variable>
|
3196
3216
|
|
3197
|
-
<
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
<fo:table width="95%" table-layout="fixed">
|
3217
|
+
<xsl:choose>
|
3218
|
+
<xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
|
3203
3219
|
|
3204
|
-
|
3205
|
-
<
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3220
|
+
|
3221
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3222
|
+
|
3223
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3224
|
+
|
3225
|
+
<xsl:variable name="title-where">
|
3226
|
+
<xsl:call-template name="getTitle">
|
3227
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3228
|
+
</xsl:call-template>
|
3229
|
+
</xsl:variable>
|
3230
|
+
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
3231
|
+
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3232
|
+
<xsl:text/>
|
3233
|
+
<xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
|
3234
|
+
</fo:block>
|
3235
|
+
|
3236
|
+
</xsl:when>
|
3237
|
+
<xsl:when test="$parent = 'formula'"> <!-- a few components -->
|
3238
|
+
<fo:block margin-bottom="12pt" text-align="left">
|
3239
|
+
|
3240
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
3241
|
+
|
3242
|
+
|
3243
|
+
|
3244
|
+
|
3245
|
+
<xsl:variable name="title-where">
|
3246
|
+
<xsl:call-template name="getTitle">
|
3247
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3248
|
+
</xsl:call-template>
|
3249
|
+
</xsl:variable>
|
3250
|
+
<xsl:value-of select="$title-where"/>
|
3251
|
+
</fo:block>
|
3252
|
+
</xsl:when>
|
3253
|
+
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')">
|
3254
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
3255
|
+
|
3209
3256
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3257
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
3258
|
+
|
3259
|
+
|
3260
|
+
|
3261
|
+
<xsl:variable name="title-key">
|
3262
|
+
<xsl:call-template name="getTitle">
|
3263
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3264
|
+
</xsl:call-template>
|
3265
|
+
</xsl:variable>
|
3266
|
+
<xsl:value-of select="$title-key"/>
|
3267
|
+
</fo:block>
|
3268
|
+
</xsl:when>
|
3269
|
+
</xsl:choose>
|
3270
|
+
|
3271
|
+
<!-- a few components -->
|
3272
|
+
<xsl:if test="not($parent = 'formula' and count(*[local-name()='dt']) = 1)">
|
3273
|
+
<fo:block>
|
3274
|
+
|
3275
|
+
<xsl:if test="$parent = 'formula'">
|
3276
|
+
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
3277
|
+
</xsl:if>
|
3278
|
+
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
3279
|
+
|
3280
|
+
|
3281
|
+
|
3282
|
+
|
3283
|
+
<fo:block>
|
3284
|
+
|
3285
|
+
|
3286
|
+
|
3287
|
+
|
3288
|
+
<fo:table width="95%" table-layout="fixed">
|
3210
3289
|
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
</
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3227
|
-
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3237
|
-
|
3238
|
-
|
3239
|
-
|
3240
|
-
|
3241
|
-
|
3242
|
-
|
3243
|
-
|
3244
|
-
|
3245
|
-
|
3290
|
+
<xsl:choose>
|
3291
|
+
<xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
|
3292
|
+
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
3293
|
+
</xsl:when>
|
3294
|
+
<xsl:when test="normalize-space($key_iso) = 'true'">
|
3295
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3296
|
+
|
3297
|
+
</xsl:when>
|
3298
|
+
</xsl:choose>
|
3299
|
+
<!-- create virtual html table for dl/[dt and dd] -->
|
3300
|
+
<xsl:variable name="html-table">
|
3301
|
+
<xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
|
3302
|
+
<xsl:element name="{$ns}:table">
|
3303
|
+
<tbody>
|
3304
|
+
<xsl:apply-templates mode="dl"/>
|
3305
|
+
</tbody>
|
3306
|
+
</xsl:element>
|
3307
|
+
</xsl:variable>
|
3308
|
+
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
3309
|
+
<xsl:variable name="colwidths">
|
3310
|
+
<xsl:call-template name="calculate-column-widths">
|
3311
|
+
<xsl:with-param name="cols-count" select="2"/>
|
3312
|
+
<xsl:with-param name="table" select="$html-table"/>
|
3313
|
+
</xsl:call-template>
|
3314
|
+
</xsl:variable>
|
3315
|
+
<!-- colwidths=<xsl:value-of select="$colwidths"/> -->
|
3316
|
+
<xsl:variable name="maxlength_dt">
|
3317
|
+
<xsl:call-template name="getMaxLength_dt"/>
|
3318
|
+
</xsl:variable>
|
3319
|
+
<xsl:call-template name="setColumnWidth_dl">
|
3320
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
3321
|
+
<xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
|
3322
|
+
</xsl:call-template>
|
3323
|
+
<fo:table-body>
|
3324
|
+
<xsl:apply-templates>
|
3325
|
+
<xsl:with-param name="key_iso" select="normalize-space($key_iso)"/>
|
3326
|
+
</xsl:apply-templates>
|
3327
|
+
</fo:table-body>
|
3328
|
+
</fo:table>
|
3329
|
+
</fo:block>
|
3330
|
+
</fo:block>
|
3331
|
+
</xsl:if>
|
3332
|
+
</fo:block-container>
|
3333
|
+
</fo:block-container>
|
3246
3334
|
</xsl:template><xsl:template name="setColumnWidth_dl">
|
3247
3335
|
<xsl:param name="colwidths"/>
|
3248
3336
|
<xsl:param name="maxlength_dt"/>
|
@@ -3339,6 +3427,7 @@
|
|
3339
3427
|
<xsl:param name="key_iso"/>
|
3340
3428
|
|
3341
3429
|
<fo:table-row>
|
3430
|
+
|
3342
3431
|
<fo:table-cell>
|
3343
3432
|
|
3344
3433
|
<fo:block margin-top="6pt">
|
@@ -3366,14 +3455,36 @@
|
|
3366
3455
|
<fo:table-cell>
|
3367
3456
|
<fo:block>
|
3368
3457
|
|
3369
|
-
|
3458
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3459
|
+
<xsl:if test="local-name(*[1]) != 'stem'">
|
3460
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3461
|
+
</xsl:if>
|
3462
|
+
</xsl:if> -->
|
3370
3463
|
|
3371
3464
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3372
3465
|
|
3373
3466
|
</fo:block>
|
3374
3467
|
</fo:table-cell>
|
3375
3468
|
</fo:table-row>
|
3376
|
-
|
3469
|
+
<!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
3470
|
+
<xsl:if test="local-name(*[1]) = 'stem'">
|
3471
|
+
<fo:table-row>
|
3472
|
+
<fo:table-cell>
|
3473
|
+
<fo:block margin-top="6pt">
|
3474
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
3475
|
+
<xsl:attribute name="margin-top">0</xsl:attribute>
|
3476
|
+
</xsl:if>
|
3477
|
+
<xsl:text> </xsl:text>
|
3478
|
+
</fo:block>
|
3479
|
+
</fo:table-cell>
|
3480
|
+
<fo:table-cell>
|
3481
|
+
<fo:block>
|
3482
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
|
3483
|
+
</fo:block>
|
3484
|
+
</fo:table-cell>
|
3485
|
+
</fo:table-row>
|
3486
|
+
</xsl:if>
|
3487
|
+
</xsl:if> -->
|
3377
3488
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
3378
3489
|
<xsl:apply-templates/>
|
3379
3490
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
@@ -3398,6 +3509,31 @@
|
|
3398
3509
|
</fo:inline>
|
3399
3510
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
3400
3511
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
3512
|
+
<xsl:variable name="_font-size">
|
3513
|
+
|
3514
|
+
|
3515
|
+
|
3516
|
+
|
3517
|
+
|
3518
|
+
10
|
3519
|
+
|
3520
|
+
|
3521
|
+
|
3522
|
+
|
3523
|
+
|
3524
|
+
|
3525
|
+
|
3526
|
+
|
3527
|
+
</xsl:variable>
|
3528
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
3529
|
+
<xsl:if test="$font-size != ''">
|
3530
|
+
<xsl:attribute name="font-size">
|
3531
|
+
<xsl:choose>
|
3532
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
3533
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
3534
|
+
</xsl:choose>
|
3535
|
+
</xsl:attribute>
|
3536
|
+
</xsl:if>
|
3401
3537
|
<xsl:apply-templates/>
|
3402
3538
|
</fo:inline>
|
3403
3539
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
@@ -3724,10 +3860,23 @@
|
|
3724
3860
|
<xsl:value-of select="substring($str, 2)"/>
|
3725
3861
|
</xsl:template><xsl:template match="mathml:math">
|
3726
3862
|
<fo:inline font-family="STIX2Math">
|
3727
|
-
<
|
3728
|
-
<xsl:
|
3729
|
-
</
|
3863
|
+
<xsl:variable name="mathml">
|
3864
|
+
<xsl:apply-templates select="." mode="mathml"/>
|
3865
|
+
</xsl:variable>
|
3866
|
+
<fo:instream-foreign-object fox:alt-text="Math">
|
3867
|
+
<!-- <xsl:copy-of select="."/> -->
|
3868
|
+
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
3869
|
+
</fo:instream-foreign-object>
|
3730
3870
|
</fo:inline>
|
3871
|
+
</xsl:template><xsl:template match="@*|node()" mode="mathml">
|
3872
|
+
<xsl:copy>
|
3873
|
+
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
3874
|
+
</xsl:copy>
|
3875
|
+
</xsl:template><xsl:template match="mathml:mtext" mode="mathml">
|
3876
|
+
<xsl:copy>
|
3877
|
+
<!-- replace start and end spaces to non-break space -->
|
3878
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'(^ )|( $)',' ')"/>
|
3879
|
+
</xsl:copy>
|
3731
3880
|
</xsl:template><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
3732
3881
|
<xsl:variable name="target">
|
3733
3882
|
<xsl:choose>
|
@@ -3808,9 +3957,22 @@
|
|
3808
3957
|
<xsl:apply-templates/>
|
3809
3958
|
</fo:basic-link>
|
3810
3959
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
3811
|
-
<fo:block
|
3812
|
-
<xsl:
|
3813
|
-
|
3960
|
+
<fo:block-container margin-left="0mm">
|
3961
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
3962
|
+
<xsl:attribute name="margin-left">
|
3963
|
+
<xsl:choose>
|
3964
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
3965
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
3966
|
+
</xsl:choose>
|
3967
|
+
</xsl:attribute>
|
3968
|
+
|
3969
|
+
</xsl:if>
|
3970
|
+
<fo:block-container margin-left="0mm">
|
3971
|
+
<fo:block id="{@id}" xsl:use-attribute-sets="formula-style">
|
3972
|
+
<xsl:apply-templates/>
|
3973
|
+
</fo:block>
|
3974
|
+
</fo:block-container>
|
3975
|
+
</fo:block-container>
|
3814
3976
|
</xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'dt']/*[local-name() = 'stem']">
|
3815
3977
|
<fo:inline>
|
3816
3978
|
<xsl:apply-templates/>
|
@@ -3870,7 +4032,9 @@
|
|
3870
4032
|
</xsl:choose>
|
3871
4033
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
3872
4034
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
3873
|
-
<xsl:
|
4035
|
+
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
4036
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
4037
|
+
</fo:inline>
|
3874
4038
|
<xsl:apply-templates/>
|
3875
4039
|
</fo:block>
|
3876
4040
|
</xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
|
@@ -4039,21 +4203,61 @@
|
|
4039
4203
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4040
4204
|
<xsl:text> </xsl:text>
|
4041
4205
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
4042
|
-
|
4043
|
-
|
4044
|
-
|
4045
|
-
|
4046
|
-
|
4206
|
+
|
4207
|
+
<fo:block-container margin-left="0mm">
|
4208
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4209
|
+
<xsl:attribute name="margin-left">
|
4210
|
+
<xsl:choose>
|
4211
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4212
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4213
|
+
</xsl:choose>
|
4214
|
+
</xsl:attribute>
|
4215
|
+
|
4216
|
+
</xsl:if>
|
4217
|
+
<fo:block-container margin-left="0mm">
|
4218
|
+
|
4219
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
4220
|
+
<xsl:variable name="_font-size">
|
4221
|
+
|
4222
|
+
|
4223
|
+
|
4224
|
+
|
4225
|
+
|
4226
|
+
9
|
4227
|
+
|
4228
|
+
|
4229
|
+
|
4230
|
+
|
4231
|
+
|
4232
|
+
|
4233
|
+
|
4234
|
+
|
4235
|
+
</xsl:variable>
|
4236
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
4237
|
+
<xsl:if test="$font-size != ''">
|
4238
|
+
<xsl:attribute name="font-size">
|
4239
|
+
<xsl:choose>
|
4240
|
+
<xsl:when test="ancestor::*[local-name()='note']"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
4241
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
4242
|
+
</xsl:choose>
|
4243
|
+
</xsl:attribute>
|
4244
|
+
</xsl:if>
|
4245
|
+
<xsl:apply-templates/>
|
4246
|
+
</fo:block>
|
4247
|
+
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4248
|
+
|
4249
|
+
</fo:block-container>
|
4250
|
+
</fo:block-container>
|
4251
|
+
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
4047
4252
|
<xsl:variable name="text">
|
4048
4253
|
<xsl:call-template name="add-zero-spaces-equal"/>
|
4049
4254
|
</xsl:variable>
|
4050
|
-
<xsl:call-template name="add-zero-spaces">
|
4255
|
+
<xsl:call-template name="add-zero-spaces-java">
|
4051
4256
|
<xsl:with-param name="text" select="$text"/>
|
4052
4257
|
</xsl:call-template>
|
4053
4258
|
</xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
|
4054
4259
|
<xsl:if test="normalize-space() != ''">
|
4055
|
-
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4056
|
-
|
4260
|
+
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
4057
4261
|
<xsl:apply-templates/>
|
4058
4262
|
</fo:block>
|
4059
4263
|
</xsl:if>
|
@@ -4123,22 +4327,30 @@
|
|
4123
4327
|
</fo:block>
|
4124
4328
|
</xsl:template><xsl:template match="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4125
4329
|
<fo:block-container margin-left="0mm" margin-right="0mm" margin-bottom="12pt">
|
4330
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4331
|
+
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
4332
|
+
</xsl:if>
|
4126
4333
|
<fo:block-container margin-left="0mm" margin-right="0mm">
|
4127
|
-
<fo:table id="{@id}" table-layout="fixed" width="100%" border="
|
4334
|
+
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
4335
|
+
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4336
|
+
<!-- <xsl:attribute name="border">0.5pt solid black</xsl:attribute> -->
|
4337
|
+
</xsl:if>
|
4128
4338
|
<xsl:variable name="simple-table">
|
4129
4339
|
<xsl:call-template name="getSimpleTable"/>
|
4130
4340
|
</xsl:variable>
|
4131
4341
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
|
4132
4342
|
<xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
|
4133
|
-
<fo:table-column column-width="35mm"/>
|
4134
|
-
<fo:table-column column-width="115mm"/>
|
4343
|
+
<!-- <fo:table-column column-width="35mm"/>
|
4344
|
+
<fo:table-column column-width="115mm"/> -->
|
4345
|
+
<fo:table-column column-width="30%"/>
|
4346
|
+
<fo:table-column column-width="70%"/>
|
4135
4347
|
</xsl:if>
|
4136
4348
|
<xsl:apply-templates mode="requirement"/>
|
4137
4349
|
</fo:table>
|
4138
4350
|
<!-- fn processing -->
|
4139
4351
|
<xsl:if test=".//*[local-name() = 'fn']">
|
4140
4352
|
<xsl:for-each select="*[local-name() = 'tbody']">
|
4141
|
-
<fo:block font-size="90%" border-bottom="
|
4353
|
+
<fo:block font-size="90%" border-bottom="1pt solid black">
|
4142
4354
|
<xsl:call-template name="fn_display"/>
|
4143
4355
|
</fo:block>
|
4144
4356
|
</xsl:for-each>
|
@@ -4154,17 +4366,27 @@
|
|
4154
4366
|
<xsl:apply-templates mode="requirement"/>
|
4155
4367
|
</fo:table-body>
|
4156
4368
|
</xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
|
4157
|
-
<fo:table-row>
|
4369
|
+
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
4370
|
+
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
4371
|
+
<!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
|
4372
|
+
<xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
|
4373
|
+
</xsl:if>
|
4374
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
4375
|
+
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
4376
|
+
</xsl:if>
|
4377
|
+
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
4378
|
+
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
4379
|
+
</xsl:if>
|
4158
4380
|
<xsl:apply-templates mode="requirement"/>
|
4159
4381
|
</fo:table-row>
|
4160
4382
|
</xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
|
4161
|
-
<fo:table-cell text-align="{@align}">
|
4383
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4162
4384
|
<xsl:attribute name="text-align">
|
4163
4385
|
<xsl:choose>
|
4164
4386
|
<xsl:when test="@align">
|
4165
4387
|
<xsl:value-of select="@align"/>
|
4166
4388
|
</xsl:when>
|
4167
|
-
<xsl:otherwise>
|
4389
|
+
<xsl:otherwise>left</xsl:otherwise>
|
4168
4390
|
</xsl:choose>
|
4169
4391
|
</xsl:attribute>
|
4170
4392
|
<xsl:if test="@colspan">
|
@@ -4177,22 +4399,27 @@
|
|
4177
4399
|
<xsl:value-of select="@rowspan"/>
|
4178
4400
|
</xsl:attribute>
|
4179
4401
|
</xsl:if>
|
4402
|
+
<xsl:call-template name="display-align"/>
|
4180
4403
|
|
4181
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4404
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4182
4405
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4183
4406
|
<xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
|
4184
4407
|
</xsl:if>
|
4185
4408
|
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
|
4186
4409
|
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4187
4410
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4188
|
-
</xsl:if>
|
4411
|
+
</xsl:if> -->
|
4189
4412
|
|
4190
4413
|
<fo:block>
|
4191
4414
|
<xsl:apply-templates/>
|
4192
4415
|
</fo:block>
|
4193
4416
|
</fo:table-cell>
|
4194
4417
|
</xsl:template><xsl:template match="*[local-name()='td']" mode="requirement">
|
4195
|
-
<fo:table-cell text-align="{@align}">
|
4418
|
+
<fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
|
4419
|
+
<xsl:if test="*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
4420
|
+
<xsl:attribute name="padding">0mm</xsl:attribute>
|
4421
|
+
<xsl:attribute name="padding-left">0mm</xsl:attribute>
|
4422
|
+
</xsl:if>
|
4196
4423
|
<xsl:attribute name="text-align">
|
4197
4424
|
<xsl:choose>
|
4198
4425
|
<xsl:when test="@align">
|
@@ -4201,6 +4428,9 @@
|
|
4201
4428
|
<xsl:otherwise>left</xsl:otherwise>
|
4202
4429
|
</xsl:choose>
|
4203
4430
|
</xsl:attribute>
|
4431
|
+
<xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
|
4432
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4433
|
+
</xsl:if>
|
4204
4434
|
<xsl:if test="@colspan">
|
4205
4435
|
<xsl:attribute name="number-columns-spanned">
|
4206
4436
|
<xsl:value-of select="@colspan"/>
|
@@ -4211,25 +4441,27 @@
|
|
4211
4441
|
<xsl:value-of select="@rowspan"/>
|
4212
4442
|
</xsl:attribute>
|
4213
4443
|
</xsl:if>
|
4444
|
+
<xsl:call-template name="display-align"/>
|
4214
4445
|
|
4215
|
-
<xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4446
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
|
4216
4447
|
<xsl:attribute name="padding-left">0.5mm</xsl:attribute>
|
4217
|
-
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4218
|
-
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4448
|
+
<xsl:attribute name="padding-top">0.5mm</xsl:attribute>
|
4449
|
+
<xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
|
4219
4450
|
<xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
|
4220
4451
|
</xsl:if>
|
4221
|
-
</xsl:if>
|
4452
|
+
</xsl:if> -->
|
4453
|
+
<!-- 2nd line and below -->
|
4222
4454
|
|
4223
4455
|
<fo:block>
|
4224
4456
|
<xsl:apply-templates/>
|
4225
4457
|
</fo:block>
|
4226
4458
|
</fo:table-cell>
|
4227
4459
|
</xsl:template><xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
|
4228
|
-
<fo:block font-size="11pt" font-weight="bold"
|
4460
|
+
<fo:block font-size="11pt" color="rgb(237, 193, 35)"> <!-- font-weight="bold" margin-bottom="4pt" text-align="center" -->
|
4229
4461
|
<xsl:apply-templates/>
|
4230
4462
|
</fo:block>
|
4231
|
-
</xsl:template><xsl:template match="*[local-name() = '
|
4232
|
-
<fo:block margin-bottom="10pt"
|
4463
|
+
</xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
|
4464
|
+
<fo:block> <!-- margin-bottom="10pt" -->
|
4233
4465
|
<xsl:apply-templates/>
|
4234
4466
|
</fo:block>
|
4235
4467
|
</xsl:template><xsl:template match="*[local-name() = 'termexample']">
|
@@ -4251,12 +4483,13 @@
|
|
4251
4483
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
4252
4484
|
|
4253
4485
|
<xsl:variable name="element">
|
4254
|
-
block
|
4486
|
+
block
|
4255
4487
|
|
4488
|
+
<xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
|
4256
4489
|
</xsl:variable>
|
4257
4490
|
|
4258
4491
|
<xsl:choose>
|
4259
|
-
<xsl:when test="normalize-space($element)
|
4492
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
4260
4493
|
<fo:block xsl:use-attribute-sets="example-body-style">
|
4261
4494
|
<xsl:apply-templates/>
|
4262
4495
|
</fo:block>
|
@@ -4293,25 +4526,44 @@
|
|
4293
4526
|
</xsl:otherwise>
|
4294
4527
|
</xsl:choose>
|
4295
4528
|
|
4296
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4297
|
-
|
4529
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
4530
|
+
|
4531
|
+
<xsl:variable name="element">
|
4532
|
+
block
|
4298
4533
|
|
4299
|
-
|
4300
|
-
|
4534
|
+
</xsl:variable>
|
4535
|
+
<xsl:choose>
|
4536
|
+
<xsl:when test="normalize-space($element) = 'block'">
|
4537
|
+
<fo:block xsl:use-attribute-sets="example-p-style">
|
4538
|
+
|
4539
|
+
<xsl:apply-templates/>
|
4540
|
+
</fo:block>
|
4541
|
+
</xsl:when>
|
4542
|
+
<xsl:otherwise>
|
4543
|
+
<fo:inline xsl:use-attribute-sets="example-p-style">
|
4544
|
+
<xsl:apply-templates/>
|
4545
|
+
</fo:inline>
|
4546
|
+
</xsl:otherwise>
|
4547
|
+
</xsl:choose>
|
4301
4548
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
4302
4549
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
4303
4550
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
4304
4551
|
<xsl:variable name="termsource_text">
|
4305
4552
|
<xsl:apply-templates/>
|
4306
4553
|
</xsl:variable>
|
4554
|
+
|
4307
4555
|
<xsl:choose>
|
4308
4556
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
4309
4557
|
<xsl:apply-templates/>
|
4310
4558
|
</xsl:when>
|
4311
|
-
<xsl:otherwise>
|
4312
|
-
|
4313
|
-
|
4314
|
-
|
4559
|
+
<xsl:otherwise>
|
4560
|
+
|
4561
|
+
<xsl:text>[</xsl:text>
|
4562
|
+
|
4563
|
+
<xsl:apply-templates/>
|
4564
|
+
|
4565
|
+
<xsl:text>]</xsl:text>
|
4566
|
+
|
4315
4567
|
</xsl:otherwise>
|
4316
4568
|
</xsl:choose>
|
4317
4569
|
</fo:block>
|
@@ -4322,10 +4574,13 @@
|
|
4322
4574
|
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
4323
4575
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
4324
4576
|
|
4325
|
-
<
|
4326
|
-
|
4327
|
-
|
4328
|
-
|
4577
|
+
<fo:inline>
|
4578
|
+
|
4579
|
+
<xsl:call-template name="getTitle">
|
4580
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
4581
|
+
</xsl:call-template>
|
4582
|
+
<xsl:text>: </xsl:text>
|
4583
|
+
</fo:inline>
|
4329
4584
|
|
4330
4585
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
4331
4586
|
<xsl:apply-templates/>
|
@@ -4337,18 +4592,29 @@
|
|
4337
4592
|
<xsl:if test="normalize-space() != ''">
|
4338
4593
|
<xsl:value-of select="."/>
|
4339
4594
|
</xsl:if>
|
4340
|
-
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4595
|
+
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
4596
|
+
<fo:block-container margin-left="0mm">
|
4597
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4598
|
+
<xsl:if test="not(ancestor::*[local-name() = 'table'])">
|
4599
|
+
<xsl:attribute name="margin-left">5mm</xsl:attribute>
|
4600
|
+
</xsl:if>
|
4601
|
+
</xsl:if>
|
4602
|
+
|
4603
|
+
<fo:block-container margin-left="0mm">
|
4341
4604
|
|
4342
|
-
|
4343
|
-
|
4344
|
-
|
4345
|
-
|
4346
|
-
|
4347
|
-
|
4348
|
-
|
4349
|
-
|
4350
|
-
|
4351
|
-
|
4605
|
+
<fo:block xsl:use-attribute-sets="quote-style">
|
4606
|
+
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4607
|
+
</fo:block>
|
4608
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4609
|
+
<fo:block xsl:use-attribute-sets="quote-source-style">
|
4610
|
+
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
4611
|
+
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
4612
|
+
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
4613
|
+
</fo:block>
|
4614
|
+
</xsl:if>
|
4615
|
+
|
4616
|
+
</fo:block-container>
|
4617
|
+
</fo:block-container>
|
4352
4618
|
</xsl:template><xsl:template match="*[local-name() = 'source']">
|
4353
4619
|
<xsl:if test="../*[local-name() = 'author']">
|
4354
4620
|
<xsl:text>, </xsl:text>
|
@@ -4376,6 +4642,7 @@
|
|
4376
4642
|
<xsl:if test="@type = 'inline'">
|
4377
4643
|
|
4378
4644
|
|
4645
|
+
|
4379
4646
|
</xsl:if>
|
4380
4647
|
|
4381
4648
|
|
@@ -4413,6 +4680,7 @@
|
|
4413
4680
|
|
4414
4681
|
|
4415
4682
|
|
4683
|
+
|
4416
4684
|
</xsl:variable>
|
4417
4685
|
|
4418
4686
|
<xsl:variable name="padding-right">
|
@@ -4532,6 +4800,21 @@
|
|
4532
4800
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
4533
4801
|
<!-- 0xA0 to space replacement -->
|
4534
4802
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
4803
|
+
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
4804
|
+
<fo:block-container margin-left="0mm">
|
4805
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
4806
|
+
<xsl:attribute name="margin-left">
|
4807
|
+
<xsl:choose>
|
4808
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
4809
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
4810
|
+
</xsl:choose>
|
4811
|
+
</xsl:attribute>
|
4812
|
+
|
4813
|
+
</xsl:if>
|
4814
|
+
<fo:block-container margin-left="0mm">
|
4815
|
+
<xsl:apply-templates select="." mode="ul_ol"/>
|
4816
|
+
</fo:block-container>
|
4817
|
+
</fo:block-container>
|
4535
4818
|
</xsl:template><xsl:template match="*[local-name() = 'errata']">
|
4536
4819
|
<!-- <row>
|
4537
4820
|
<date>05-07-2013</date>
|
@@ -4563,6 +4846,65 @@
|
|
4563
4846
|
<fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
|
4564
4847
|
<fo:block><xsl:apply-templates/></fo:block>
|
4565
4848
|
</fo:table-cell>
|
4849
|
+
</xsl:template><xsl:template name="processBibitem">
|
4850
|
+
|
4851
|
+
|
4852
|
+
|
4853
|
+
|
4854
|
+
</xsl:template><xsl:template name="processBibitemDocId">
|
4855
|
+
<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')]"/>
|
4856
|
+
<xsl:choose>
|
4857
|
+
<xsl:when test="normalize-space($_doc_ident) != ''">
|
4858
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
4859
|
+
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
4860
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4861
|
+
</xsl:if>
|
4862
|
+
<xsl:value-of select="$_doc_ident"/>
|
4863
|
+
</xsl:when>
|
4864
|
+
<xsl:otherwise>
|
4865
|
+
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
4866
|
+
<xsl:if test="$type != ''">
|
4867
|
+
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
4868
|
+
</xsl:if>
|
4869
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
4870
|
+
</xsl:otherwise>
|
4871
|
+
</xsl:choose>
|
4872
|
+
</xsl:template><xsl:template name="processPersonalAuthor">
|
4873
|
+
<xsl:choose>
|
4874
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'completename']">
|
4875
|
+
<author>
|
4876
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'completename']"/>
|
4877
|
+
</author>
|
4878
|
+
</xsl:when>
|
4879
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'initial']">
|
4880
|
+
<author>
|
4881
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4882
|
+
<xsl:text> </xsl:text>
|
4883
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'initial']" mode="strip"/>
|
4884
|
+
</author>
|
4885
|
+
</xsl:when>
|
4886
|
+
<xsl:when test="*[local-name() = 'name']/*[local-name() = 'surname'] and *[local-name() = 'name']/*[local-name() = 'forename']">
|
4887
|
+
<author>
|
4888
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'surname']"/>
|
4889
|
+
<xsl:text> </xsl:text>
|
4890
|
+
<xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'forename']" mode="strip"/>
|
4891
|
+
</author>
|
4892
|
+
</xsl:when>
|
4893
|
+
<xsl:otherwise>
|
4894
|
+
<xsl:apply-templates/>
|
4895
|
+
</xsl:otherwise>
|
4896
|
+
</xsl:choose>
|
4897
|
+
</xsl:template><xsl:template name="renderDate">
|
4898
|
+
<xsl:if test="normalize-space(*[local-name() = 'on']) != ''">
|
4899
|
+
<xsl:value-of select="*[local-name() = 'on']"/>
|
4900
|
+
</xsl:if>
|
4901
|
+
<xsl:if test="normalize-space(*[local-name() = 'from']) != ''">
|
4902
|
+
<xsl:value-of select="concat(*[local-name() = 'from'], '–', *[local-name() = 'to'])"/>
|
4903
|
+
</xsl:if>
|
4904
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'initial']/text()" mode="strip">
|
4905
|
+
<xsl:value-of select="translate(.,'. ','')"/>
|
4906
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4907
|
+
<xsl:value-of select="substring(.,1,1)"/>
|
4566
4908
|
</xsl:template><xsl:template name="convertDate">
|
4567
4909
|
<xsl:param name="date"/>
|
4568
4910
|
<xsl:param name="format" select="'short'"/>
|