metanorma-itu 2.0.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -709,14 +709,14 @@
709
709
  </xsl:choose>
710
710
  </xsl:variable>
711
711
  <xsl:variable name="meeting-date_from_str">
712
- <xsl:call-template name="convertDateLocalized">
712
+ <xsl:call-template name="convertDate">
713
713
  <xsl:with-param name="date" select="$meeting-date_from"/>
714
714
  <xsl:with-param name="format" select="$date_format"/>
715
715
  </xsl:call-template>
716
716
  </xsl:variable>
717
717
 
718
718
  <xsl:variable name="meeting-date_to_str">
719
- <xsl:call-template name="convertDateLocalized">
719
+ <xsl:call-template name="convertDate">
720
720
  <xsl:with-param name="date" select="$meeting-date_to"/>
721
721
  <xsl:with-param name="format" select="'ddMMyyyy'"/>
722
722
  </xsl:call-template>
@@ -1230,9 +1230,6 @@
1230
1230
  <!-- ============================= -->
1231
1231
  <!-- CONTENTS -->
1232
1232
  <!-- ============================= -->
1233
- <xsl:template match="node()" mode="contents">
1234
- <xsl:apply-templates mode="contents"/>
1235
- </xsl:template>
1236
1233
 
1237
1234
  <!-- element with title -->
1238
1235
  <xsl:template match="*[itu:title]" mode="contents">
@@ -1405,7 +1402,7 @@
1405
1402
  <!-- ============================= -->
1406
1403
  <!-- PARAGRAPHS -->
1407
1404
  <!-- ============================= -->
1408
- <xsl:template match="itu:p | itu:sections/itu:p">
1405
+ <xsl:template match="itu:p | itu:sections/itu:p" name="paragraph">
1409
1406
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
1410
1407
  <xsl:variable name="element-name">
1411
1408
  <xsl:choose>
@@ -1465,115 +1462,6 @@
1465
1462
  </xsl:if>
1466
1463
  </xsl:template>
1467
1464
 
1468
- <!-- <xsl:template match="itu:note">
1469
- <fo:block id="{@id}">
1470
- <xsl:apply-templates />
1471
- </fo:block>
1472
- </xsl:template>
1473
-
1474
- <xsl:template match="itu:note/itu:p" name="note">
1475
- <fo:block font-size="11pt" space-before="4pt" text-align="justify">
1476
- <xsl:if test="ancestor::itu:figure">
1477
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
1478
- </xsl:if>
1479
- <xsl:apply-templates select="../itu:name" mode="presentation"/>
1480
- <xsl:apply-templates />
1481
- </fo:block>
1482
- </xsl:template> -->
1483
-
1484
-
1485
- <!-- ============================= -->
1486
- <!-- ============================= -->
1487
-
1488
-
1489
- <!-- ============================= -->
1490
- <!-- Bibliography -->
1491
- <!-- ============================= -->
1492
-
1493
- <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
1494
- <xsl:template match="itu:bibitem">
1495
- <fo:block id="{@id}" margin-top="6pt" margin-left="14mm" text-indent="-14mm">
1496
- <xsl:if test="$doctype = 'implementers-guide'">
1497
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
1498
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
1499
- </xsl:if>
1500
-
1501
- <xsl:variable name="bibitem_label">
1502
- <xsl:choose>
1503
- <xsl:when test="itu:docidentifier[@type = 'metanorma']">
1504
- <xsl:value-of select="itu:docidentifier[@type = 'metanorma']"/>
1505
- </xsl:when>
1506
- <xsl:otherwise>
1507
- <fo:inline padding-right="5mm">
1508
- <xsl:text>[</xsl:text>
1509
- <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
1510
- <xsl:text>] </xsl:text>
1511
- </fo:inline>
1512
- </xsl:otherwise>
1513
- </xsl:choose>
1514
- </xsl:variable>
1515
-
1516
- <xsl:variable name="bibitem_body">
1517
- <xsl:text> </xsl:text>
1518
- <xsl:choose>
1519
- <xsl:when test="itu:docidentifier[@type = 'metanorma']">
1520
- <xsl:if test="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]">
1521
- <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
1522
- <xsl:text>, </xsl:text>
1523
- </xsl:if>
1524
- </xsl:when>
1525
- <xsl:otherwise>
1526
- <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
1527
- <xsl:if test="itu:title">
1528
- <xsl:text>, </xsl:text>
1529
- </xsl:if>
1530
- </xsl:otherwise>
1531
- </xsl:choose>
1532
- <xsl:if test="itu:title">
1533
- <fo:inline font-style="italic">
1534
- <xsl:choose>
1535
- <xsl:when test="itu:title[@type = 'main' and @language = 'en']">
1536
- <xsl:value-of select="itu:title[@type = 'main' and @language = 'en']"/>
1537
- </xsl:when>
1538
- <xsl:otherwise>
1539
- <xsl:value-of select="itu:title"/>
1540
- </xsl:otherwise>
1541
- </xsl:choose>
1542
- </fo:inline>
1543
- </xsl:if>
1544
- <xsl:if test="itu:formattedref and not(itu:docidentifier[@type = 'metanorma'])">, </xsl:if>
1545
- <xsl:apply-templates select="itu:formattedref"/>
1546
- </xsl:variable>
1547
-
1548
- <xsl:choose>
1549
- <xsl:when test="$doctype = 'implementers-guide'">
1550
- <fo:table width="100%" table-layout="fixed">
1551
- <fo:table-column column-width="20%"/>
1552
- <fo:table-column column-width="80%"/>
1553
- <fo:table-body>
1554
- <fo:table-row>
1555
- <fo:table-cell><fo:block><xsl:copy-of select="$bibitem_label"/></fo:block></fo:table-cell>
1556
- <fo:table-cell><fo:block><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
1557
- </fo:table-row>
1558
- </fo:table-body>
1559
- </fo:table>
1560
- </xsl:when>
1561
- <xsl:otherwise>
1562
- <xsl:copy-of select="$bibitem_label"/>
1563
- <xsl:copy-of select="$bibitem_body"/>
1564
- </xsl:otherwise>
1565
- </xsl:choose>
1566
-
1567
- </fo:block>
1568
- </xsl:template>
1569
- <xsl:template match="itu:bibitem/itu:docidentifier"/>
1570
-
1571
- <xsl:template match="itu:bibitem/itu:title"/>
1572
-
1573
- <xsl:template match="itu:formattedref">
1574
- <xsl:apply-templates/>
1575
- </xsl:template>
1576
-
1577
1465
 
1578
1466
  <!-- ============================= -->
1579
1467
  <!-- ============================= -->
@@ -1762,7 +1650,7 @@
1762
1650
  <xsl:otherwise>5mm</xsl:otherwise>
1763
1651
  </xsl:choose>
1764
1652
  </xsl:attribute>
1765
- <xsl:apply-templates select="ancestor::itu:term[1]/itu:name" mode="presentation"/>
1653
+ <xsl:apply-templates select="ancestor::itu:term[1]/itu:name"/>
1766
1654
  </fo:inline>
1767
1655
  <fo:inline font-weight="bold">
1768
1656
  <xsl:call-template name="setStyle_preferred"/>
@@ -1870,7 +1758,7 @@
1870
1758
  [b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
1871
1759
  [b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
1872
1760
  -->
1873
- <xsl:template match="itu:annex//itu:bibitem">
1761
+ <xsl:template match="itu:annex//itu:bibitem" priority="3">
1874
1762
  <fo:block margin-top="6pt" margin-left="10mm" text-indent="-10mm">
1875
1763
  <fo:inline id="{@id}" padding-right="5mm">[<xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>]</fo:inline>
1876
1764
  <xsl:text> </xsl:text>
@@ -1912,8 +1800,8 @@
1912
1800
  <xsl:template match="itu:ul//itu:note | itu:ol//itu:note" priority="2"/>
1913
1801
  <xsl:template match="itu:ul//itu:note | itu:ol//itu:note" mode="process">
1914
1802
  <fo:block id="{@id}">
1915
- <xsl:apply-templates select="itu:name" mode="presentation"/>
1916
- <xsl:apply-templates mode="process"/>
1803
+ <xsl:apply-templates select="itu:name"/>
1804
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
1917
1805
  </fo:block>
1918
1806
  </xsl:template>
1919
1807
  <xsl:template match="itu:ul//itu:note/itu:name | itu:ol//itu:note/itu:name" mode="process" priority="2"/>
@@ -2058,7 +1946,7 @@
2058
1946
  </fo:table-cell>
2059
1947
  <fo:table-cell display-align="center">
2060
1948
  <fo:block text-align="right" margin-left="0mm">
2061
- <xsl:apply-templates select="../itu:name" mode="presentation"/>
1949
+ <xsl:apply-templates select="../itu:name" mode="formula_number"/>
2062
1950
  </fo:block>
2063
1951
  </fo:table-cell>
2064
1952
  </fo:table-row>
@@ -2072,20 +1960,6 @@
2072
1960
  </xsl:template>
2073
1961
 
2074
1962
 
2075
- <xsl:template match="itu:references[@normative='true']">
2076
- <fo:block id="{@id}">
2077
- <xsl:apply-templates/>
2078
- </fo:block>
2079
- </xsl:template>
2080
-
2081
- <xsl:template match="itu:references[not(@normative='true')]">
2082
- <fo:block break-after="page"/>
2083
- <fo:block id="{@id}">
2084
- <xsl:apply-templates/>
2085
- </fo:block>
2086
- </xsl:template>
2087
-
2088
-
2089
1963
 
2090
1964
  <xsl:template name="insertHeaderFooter">
2091
1965
  <fo:static-content flow-name="footer-even" font-family="Times New Roman" font-size="11pt" role="artifact">
@@ -2290,22 +2164,18 @@
2290
2164
  </xsl:if>
2291
2165
  </xsl:template>
2292
2166
 
2293
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
2167
+ <xsl:variable name="titles_">
2294
2168
 
2295
2169
  <title-edition lang="en">
2296
2170
 
2297
- <xsl:text>Edition </xsl:text>
2298
-
2299
-
2171
+ <xsl:text>Edition </xsl:text>
2172
+
2300
2173
  </title-edition>
2301
2174
 
2302
2175
  <title-edition lang="fr">
2303
-
2304
- <xsl:text>Édition </xsl:text>
2305
-
2176
+ <xsl:text>Édition </xsl:text>
2306
2177
  </title-edition>
2307
2178
 
2308
-
2309
2179
  <!-- These titles of Table of contents renders different than determined in localized-strings -->
2310
2180
  <title-toc lang="en">
2311
2181
 
@@ -2313,10 +2183,13 @@
2313
2183
 
2314
2184
  </title-toc>
2315
2185
  <title-toc lang="fr">
2186
+ <xsl:text>Sommaire</xsl:text>
2187
+ </title-toc>
2188
+ <title-toc lang="zh">
2316
2189
 
2190
+ <xsl:text>Contents</xsl:text>
2191
+
2317
2192
  </title-toc>
2318
-
2319
-
2320
2193
 
2321
2194
  <title-descriptors lang="en">Descriptors</title-descriptors>
2322
2195
 
@@ -2332,12 +2205,8 @@
2332
2205
  </title-part>
2333
2206
  <title-part lang="zh">第 # 部分:</title-part>
2334
2207
 
2335
- <title-subpart lang="en">
2336
-
2337
- </title-subpart>
2338
- <title-subpart lang="fr">
2339
-
2340
- </title-subpart>
2208
+ <title-subpart lang="en">Sub-part #</title-subpart>
2209
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
2341
2210
 
2342
2211
  <title-list-tables lang="en">List of Tables</title-list-tables>
2343
2212
 
@@ -2352,7 +2221,7 @@
2352
2221
  <title-continued lang="en">(continued)</title-continued>
2353
2222
  <title-continued lang="fr">(continué)</title-continued>
2354
2223
 
2355
- </xsl:variable><xsl:variable name="bibdata">
2224
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
2356
2225
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
2357
2226
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
2358
2227
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -2381,15 +2250,32 @@
2381
2250
  </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="'&#8232;'"/><xsl:attribute-set name="root-style">
2382
2251
 
2383
2252
 
2253
+
2254
+
2255
+
2256
+
2257
+
2258
+
2259
+
2384
2260
  <xsl:attribute name="font-family">Times New Roman, STIX Two Math</xsl:attribute>
2385
2261
  <xsl:attribute name="font-size">12pt</xsl:attribute>
2386
2262
 
2263
+
2264
+
2265
+
2266
+
2267
+
2268
+
2269
+
2387
2270
  </xsl:attribute-set><xsl:attribute-set name="link-style">
2388
2271
 
2389
2272
 
2390
2273
 
2391
2274
 
2392
2275
 
2276
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
2277
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2278
+
2393
2279
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
2394
2280
  <xsl:attribute name="white-space">pre</xsl:attribute>
2395
2281
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -2399,14 +2285,21 @@
2399
2285
 
2400
2286
 
2401
2287
 
2288
+
2289
+
2290
+
2291
+
2402
2292
  <xsl:attribute name="font-family">Courier New</xsl:attribute>
2403
2293
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
2404
2294
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2405
2295
 
2296
+
2406
2297
 
2407
2298
 
2408
2299
 
2409
2300
 
2301
+
2302
+
2410
2303
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
2411
2304
 
2412
2305
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -2513,105 +2406,109 @@
2513
2406
 
2514
2407
  </xsl:attribute-set><xsl:variable name="table-border_">
2515
2408
 
2516
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
2517
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
2518
-
2409
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
2410
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2411
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2519
2412
 
2520
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2521
- <xsl:attribute name="text-align">center</xsl:attribute>
2522
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2523
2413
 
2524
2414
 
2525
2415
 
2526
2416
 
2527
-
2528
2417
 
2529
2418
 
2530
2419
 
2531
-
2532
2420
 
2533
2421
 
2422
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2423
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
2534
2424
 
2535
2425
 
2536
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
2537
2426
 
2538
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2539
2427
 
2540
2428
 
2541
2429
 
2542
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
2543
2430
 
2544
2431
 
2545
2432
 
2546
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
2433
+
2547
2434
 
2548
2435
 
2436
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
2437
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
2438
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
2439
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
2440
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
2549
2441
 
2550
- <xsl:attribute name="color">blue</xsl:attribute>
2551
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2552
2442
 
2553
2443
 
2554
2444
 
2555
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
2556
2445
 
2557
2446
 
2558
2447
 
2559
- <xsl:attribute name="color">blue</xsl:attribute>
2560
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2561
2448
 
2562
2449
 
2563
2450
 
2564
2451
 
2565
- </xsl:attribute-set><xsl:attribute-set name="note-style">
2566
2452
 
2567
2453
 
2568
2454
 
2569
2455
 
2570
-
2571
2456
 
2572
2457
 
2573
2458
 
2574
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2575
- <xsl:attribute name="space-before">4pt</xsl:attribute>
2576
- <xsl:attribute name="text-align">justify</xsl:attribute>
2577
2459
 
2578
2460
 
2461
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
2462
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2463
+
2579
2464
 
2465
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2466
+ <xsl:attribute name="text-align">center</xsl:attribute>
2467
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2580
2468
 
2581
2469
 
2582
2470
 
2583
2471
 
2472
+
2584
2473
 
2585
2474
 
2586
- </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">
2587
2475
 
2476
+
2588
2477
 
2589
2478
 
2590
2479
 
2591
2480
 
2481
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
2482
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
2592
2483
 
2593
2484
 
2594
2485
 
2595
2486
 
2487
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
2488
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2596
2489
 
2597
2490
 
2598
2491
 
2599
2492
 
2600
2493
 
2601
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
2602
2494
 
2603
2495
 
2496
+
2604
2497
 
2498
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
2605
2499
 
2606
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2607
2500
 
2608
2501
 
2502
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
2503
+
2504
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
2505
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2506
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2507
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2508
+ <xsl:attribute name="display-align">center</xsl:attribute>
2609
2509
 
2610
-
2611
2510
 
2612
2511
 
2613
-
2614
- <xsl:attribute name="space-before">4pt</xsl:attribute>
2615
2512
 
2616
2513
 
2617
2514
 
@@ -2619,186 +2516,402 @@
2619
2516
 
2620
2517
 
2621
2518
 
2622
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2623
2519
 
2624
2520
 
2625
2521
 
2522
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
2523
+ <xsl:attribute name="display-align">center</xsl:attribute>
2524
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2525
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2626
2526
 
2627
-
2628
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
2629
2527
 
2630
2528
 
2631
2529
 
2632
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2633
2530
 
2634
-
2635
2531
 
2636
2532
 
2637
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
2638
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
2533
+ <xsl:attribute name="display-align">before</xsl:attribute>
2639
2534
 
2640
2535
 
2641
2536
 
2642
2537
 
2643
2538
 
2644
2539
 
2645
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2646
- <xsl:attribute name="margin-left">12mm</xsl:attribute>
2647
- <xsl:attribute name="margin-right">12mm</xsl:attribute>
2648
2540
 
2541
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
2542
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
2543
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
2544
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
2545
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2649
2546
 
2650
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
2651
2547
 
2652
2548
 
2653
- <xsl:attribute name="text-align">right</xsl:attribute>
2654
-
2655
-
2656
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
2657
2549
 
2658
2550
 
2659
2551
 
2660
2552
 
2553
+
2661
2554
 
2662
2555
 
2663
2556
 
2664
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
2557
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
2558
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2559
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2665
2560
 
2666
2561
 
2667
2562
 
2668
2563
 
2669
- </xsl:attribute-set><xsl:attribute-set name="term-style">
2670
2564
 
2671
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2672
2565
 
2673
2566
 
2674
-
2675
2567
 
2568
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
2569
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2676
2570
 
2677
2571
 
2678
2572
 
2679
2573
 
2680
2574
 
2681
-
2682
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2683
- <xsl:attribute name="text-align">center</xsl:attribute>
2684
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2685
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2686
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2687
2575
 
2576
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
2577
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
2578
+ <xsl:attribute name="text-indent">-5mm</xsl:attribute>
2579
+ <xsl:attribute name="start-indent">5mm</xsl:attribute>
2688
2580
 
2581
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
2582
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2583
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2689
2584
 
2690
2585
 
2691
2586
 
2692
2587
 
2693
-
2694
2588
 
2695
2589
 
2696
2590
 
2697
-
2698
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
2699
2591
 
2700
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2701
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2592
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2593
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
2594
+ <xsl:attribute name="font-size">70%</xsl:attribute>
2702
2595
 
2703
- </xsl:attribute-set><xsl:attribute-set name="image-style">
2704
- <xsl:attribute name="text-align">center</xsl:attribute>
2705
2596
 
2706
2597
 
2707
2598
 
2708
2599
 
2600
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
2601
+ <xsl:attribute name="text-indent">0</xsl:attribute>
2602
+ <xsl:attribute name="start-indent">0</xsl:attribute>
2709
2603
 
2710
2604
 
2711
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2605
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
2712
2606
 
2713
- <xsl:attribute name="font-size">10pt</xsl:attribute>
2714
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
2715
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2607
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
2608
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2609
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
2610
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2716
2611
 
2717
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2612
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
2613
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2614
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2718
2615
 
2616
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
2719
2617
 
2720
2618
 
2619
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
2620
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2721
2621
 
2722
2622
 
2723
- <xsl:attribute name="width">75%</xsl:attribute>
2724
- <xsl:attribute name="content-height">100%</xsl:attribute>
2725
- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
2726
- <xsl:attribute name="scaling">uniform</xsl:attribute>
2727
-
2728
-
2729
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
2730
2623
 
2731
2624
 
2732
2625
 
2733
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2734
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2735
- <xsl:attribute name="font-weight">bold</xsl:attribute>
2736
- <xsl:attribute name="text-align">center</xsl:attribute>
2737
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2738
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2739
2626
 
2740
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
2741
-
2742
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2743
2627
 
2744
2628
 
2745
2629
 
2746
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2747
2630
 
2631
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
2748
2632
 
2749
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
2750
2633
 
2751
2634
 
2635
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
2752
2636
 
2753
- </xsl:attribute-set><xsl:variable name="color-added-text">
2754
- <xsl:text>rgb(0, 255, 0)</xsl:text>
2755
- </xsl:variable><xsl:attribute-set name="add-style">
2756
- <xsl:attribute name="color">red</xsl:attribute>
2757
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
2758
- <!-- <xsl:attribute name="color">black</xsl:attribute>
2759
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2760
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
2761
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2762
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
2763
- <xsl:text>red</xsl:text>
2764
- </xsl:variable><xsl:attribute-set name="del-style">
2765
- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
2766
- <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2767
- </xsl:attribute-set><xsl:attribute-set name="mathml-style">
2768
- <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
2769
2637
 
2770
2638
 
2771
- <xsl:attribute name="font-size">11pt</xsl:attribute>
2639
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
2772
2640
 
2773
- </xsl:attribute-set><xsl:attribute-set name="list-style">
2774
2641
 
2775
- </xsl:attribute-set><xsl:attribute-set name="toc-style">
2776
- <xsl:attribute name="line-height">135%</xsl:attribute>
2777
- </xsl:attribute-set><xsl:attribute-set name="fn-style">
2778
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2779
- </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
2780
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2781
2642
 
2643
+ <xsl:attribute name="color">blue</xsl:attribute>
2644
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2782
2645
 
2783
2646
 
2784
2647
 
2648
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
2785
2649
 
2786
2650
 
2787
2651
 
2652
+ <xsl:attribute name="color">blue</xsl:attribute>
2653
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2788
2654
 
2789
2655
 
2790
- <xsl:attribute name="font-size">60%</xsl:attribute>
2791
- <xsl:attribute name="vertical-align">super</xsl:attribute>
2792
2656
 
2793
2657
 
2658
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
2794
2659
 
2795
2660
 
2796
2661
 
2797
2662
 
2663
+
2798
2664
 
2799
2665
 
2800
- </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
2801
- <xsl:attribute name="font-weight">normal</xsl:attribute>
2666
+
2667
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2668
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
2669
+ <xsl:attribute name="text-align">justify</xsl:attribute>
2670
+
2671
+
2672
+
2673
+
2674
+
2675
+
2676
+
2677
+
2678
+
2679
+ </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">
2680
+
2681
+
2682
+
2683
+
2684
+
2685
+
2686
+
2687
+
2688
+
2689
+
2690
+
2691
+
2692
+
2693
+
2694
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
2695
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
2696
+
2697
+
2698
+
2699
+
2700
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
2701
+
2702
+
2703
+
2704
+
2705
+
2706
+
2707
+
2708
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
2709
+
2710
+
2711
+
2712
+
2713
+
2714
+
2715
+
2716
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
2717
+
2718
+
2719
+
2720
+
2721
+
2722
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
2723
+
2724
+
2725
+
2726
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
2727
+
2728
+
2729
+
2730
+
2731
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
2732
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
2733
+
2734
+
2735
+
2736
+
2737
+
2738
+
2739
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2740
+ <xsl:attribute name="margin-left">12mm</xsl:attribute>
2741
+ <xsl:attribute name="margin-right">12mm</xsl:attribute>
2742
+
2743
+
2744
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
2745
+
2746
+
2747
+ <xsl:attribute name="text-align">right</xsl:attribute>
2748
+
2749
+
2750
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
2751
+
2752
+
2753
+
2754
+
2755
+
2756
+
2757
+
2758
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
2759
+
2760
+
2761
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
2762
+
2763
+
2764
+
2765
+
2766
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
2767
+
2768
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
2769
+
2770
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
2771
+
2772
+
2773
+
2774
+
2775
+
2776
+
2777
+
2778
+
2779
+
2780
+
2781
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2782
+ <xsl:attribute name="text-align">center</xsl:attribute>
2783
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2784
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2785
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2786
+
2787
+
2788
+
2789
+
2790
+
2791
+
2792
+
2793
+
2794
+
2795
+
2796
+
2797
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
2798
+
2799
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2800
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2801
+
2802
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
2803
+ <xsl:attribute name="text-align">center</xsl:attribute>
2804
+
2805
+
2806
+
2807
+
2808
+
2809
+
2810
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
2811
+
2812
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
2813
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
2814
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2815
+
2816
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
2817
+
2818
+
2819
+
2820
+
2821
+
2822
+ <xsl:attribute name="width">75%</xsl:attribute>
2823
+ <xsl:attribute name="content-height">100%</xsl:attribute>
2824
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
2825
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
2826
+
2827
+
2828
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
2829
+
2830
+
2831
+
2832
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
2833
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2834
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2835
+ <xsl:attribute name="text-align">center</xsl:attribute>
2836
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
2837
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
2838
+
2839
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
2840
+
2841
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
2842
+
2843
+
2844
+
2845
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
2846
+
2847
+
2848
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
2849
+
2850
+
2851
+
2852
+ </xsl:attribute-set><xsl:variable name="color-added-text">
2853
+ <xsl:text>rgb(0, 255, 0)</xsl:text>
2854
+ </xsl:variable><xsl:attribute-set name="add-style">
2855
+ <xsl:attribute name="color">red</xsl:attribute>
2856
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
2857
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
2858
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
2859
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
2860
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
2861
+ </xsl:attribute-set><xsl:variable name="color-deleted-text">
2862
+ <xsl:text>red</xsl:text>
2863
+ </xsl:variable><xsl:attribute-set name="del-style">
2864
+ <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
2865
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
2866
+ </xsl:attribute-set><xsl:attribute-set name="mathml-style">
2867
+ <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
2868
+
2869
+
2870
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
2871
+
2872
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
2873
+
2874
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
2875
+ <xsl:attribute name="line-height">135%</xsl:attribute>
2876
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
2877
+ <xsl:attribute name="font-size">80%</xsl:attribute>
2878
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2879
+
2880
+
2881
+
2882
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2883
+ <xsl:attribute name="color">blue</xsl:attribute>
2884
+
2885
+
2886
+
2887
+
2888
+
2889
+
2890
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
2891
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2892
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
2893
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
2894
+
2895
+
2896
+
2897
+
2898
+
2899
+
2900
+
2901
+
2902
+
2903
+ <xsl:attribute name="font-size">60%</xsl:attribute>
2904
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
2905
+
2906
+
2907
+
2908
+
2909
+
2910
+
2911
+
2912
+
2913
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
2914
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
2802
2915
  <xsl:attribute name="font-style">normal</xsl:attribute>
2803
2916
  <xsl:attribute name="text-indent">0</xsl:attribute>
2804
2917
  <xsl:attribute name="start-indent">0</xsl:attribute>
@@ -2847,30 +2960,202 @@
2847
2960
 
2848
2961
 
2849
2962
 
2850
- </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:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
2851
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
2852
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
2853
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
2854
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
2855
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
2856
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
2963
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
2964
+
2965
+
2966
+
2967
+
2968
+
2969
+
2970
+
2971
+
2972
+
2973
+
2974
+
2975
+
2976
+
2977
+
2978
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
2979
+
2980
+
2981
+
2982
+
2983
+
2984
+
2985
+
2986
+
2987
+
2988
+
2989
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
2990
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2991
+
2992
+
2993
+
2994
+
2995
+
2996
+
2997
+
2998
+
2999
+
3000
+
3001
+
3002
+
3003
+
3004
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
3005
+
3006
+
3007
+
3008
+
3009
+
3010
+
3011
+
3012
+
3013
+
3014
+
3015
+
3016
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
3017
+
3018
+
3019
+
3020
+
3021
+
3022
+
3023
+
3024
+
3025
+
3026
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3027
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
3028
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
3029
+
3030
+
3031
+
3032
+
3033
+
3034
+
3035
+
3036
+
3037
+
3038
+
3039
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
3040
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
3041
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+
3048
+
3049
+
3050
+
3051
+
3052
+
3053
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
3054
+
3055
+
3056
+
3057
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3058
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
3059
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
3060
+
3061
+
3062
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
3063
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
3064
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3065
+
3066
+
3067
+
3068
+
3069
+
3070
+
3071
+
3072
+
3073
+
3074
+
3075
+
3076
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
3077
+
3078
+
3079
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3080
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
3081
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
3082
+
3083
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
3084
+
3085
+
3086
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3087
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
3088
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
3089
+
3090
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
3091
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3092
+ <xsl:attribute name="font-size">65%</xsl:attribute>
3093
+
3094
+
3095
+
3096
+
3097
+
3098
+
3099
+
3100
+
3101
+
3102
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
3103
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
3104
+
3105
+
3106
+
3107
+
3108
+
3109
+
3110
+
3111
+
3112
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
3113
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
3114
+
3115
+
3116
+
3117
+
3118
+
3119
+
3120
+
3121
+
3122
+
3123
+ <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
3124
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
3125
+
3126
+
3127
+
3128
+
3129
+
3130
+
3131
+
3132
+
3133
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
3134
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3135
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3136
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
3137
+
3138
+
3139
+
3140
+
3141
+
3142
+
3143
+
3144
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
3145
+
3146
+
3147
+
3148
+
3149
+
3150
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
3151
+
3152
+
3153
+
3154
+ </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:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2857
3155
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2858
3156
  <xsl:sort select="@displayorder" data-type="number"/>
2859
3157
  <xsl:apply-templates select="." mode="contents"/>
2860
3158
  </xsl:for-each>
2861
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
2862
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
2863
-
2864
- <!-- Normative references -->
2865
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
2866
- <!-- Terms and definitions -->
2867
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
2868
- <!-- Another main sections -->
2869
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
2870
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
2871
- <!-- Bibliography -->
2872
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
2873
-
2874
3159
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
2875
3160
 
2876
3161
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -2887,29 +3172,11 @@
2887
3172
  <xsl:sort select="@displayorder" data-type="number"/>
2888
3173
  <xsl:apply-templates select="." mode="contents"/>
2889
3174
  </xsl:for-each>
2890
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
2891
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
2892
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
2893
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
2894
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
2895
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
2896
3175
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2897
3176
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2898
3177
  <xsl:sort select="@displayorder" data-type="number"/>
2899
3178
  <xsl:apply-templates select="."/>
2900
3179
  </xsl:for-each>
2901
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
2902
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
2903
-
2904
- <!-- Normative references -->
2905
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
2906
- <!-- Terms and definitions -->
2907
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
2908
- <!-- Another main sections -->
2909
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
2910
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
2911
- <!-- Bibliography -->
2912
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
2913
3180
  </xsl:template><xsl:template name="processMainSectionsDefault">
2914
3181
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
2915
3182
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2949,44 +3216,20 @@
2949
3216
  <xsl:variable name="simple-table">
2950
3217
  <xsl:call-template name="getSimpleTable"/>
2951
3218
  </xsl:variable>
2952
-
2953
- <!-- <xsl:if test="$namespace = 'bipm'">
2954
- <fo:block>&#xA0;</fo:block>
2955
- </xsl:if> -->
2956
-
2957
-
2958
- <!-- Display table's name before table as standalone block -->
2959
- <!-- $namespace = 'iso' or -->
2960
-
2961
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
2962
-
2963
-
3219
+
2964
3220
 
3221
+ <!-- Display table's name before table as standalone block -->
3222
+ <!-- $namespace = 'iso' or -->
2965
3223
 
3224
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
3225
+
2966
3226
 
2967
- <xsl:call-template name="fn_name_display"/>
2968
3227
 
3228
+ <xsl:call-template name="table_name_fn_display"/>
2969
3229
 
2970
3230
 
2971
3231
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
2972
3232
 
2973
- <!-- <xsl:variable name="cols-count">
2974
- <xsl:choose>
2975
- <xsl:when test="*[local-name()='thead']">
2976
- <xsl:call-template name="calculate-columns-numbers">
2977
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
2978
- </xsl:call-template>
2979
- </xsl:when>
2980
- <xsl:otherwise>
2981
- <xsl:call-template name="calculate-columns-numbers">
2982
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
2983
- </xsl:call-template>
2984
- </xsl:otherwise>
2985
- </xsl:choose>
2986
- </xsl:variable> -->
2987
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
2988
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
2989
-
2990
3233
  <xsl:variable name="colwidths">
2991
3234
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
2992
3235
  <xsl:call-template name="calculate-column-widths">
@@ -2997,17 +3240,8 @@
2997
3240
  </xsl:variable>
2998
3241
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
2999
3242
 
3000
- <!-- <xsl:variable name="colwidths2">
3001
- <xsl:call-template name="calculate-column-widths">
3002
- <xsl:with-param name="cols-count" select="$cols-count"/>
3003
- </xsl:call-template>
3004
- </xsl:variable> -->
3005
-
3006
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
3007
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
3008
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
3009
3243
 
3010
- <xsl:variable name="margin-left">
3244
+ <xsl:variable name="margin-side">
3011
3245
  <xsl:choose>
3012
3246
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
3013
3247
  <xsl:otherwise>0</xsl:otherwise>
@@ -3015,81 +3249,69 @@
3015
3249
  </xsl:variable>
3016
3250
 
3017
3251
 
3018
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
3019
-
3020
-
3021
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3022
-
3023
-
3024
- <xsl:attribute name="space-after">6pt</xsl:attribute>
3025
-
3026
-
3027
-
3028
-
3029
-
3030
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
3031
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
3032
- <xsl:attribute name="space-after">18pt</xsl:attribute>
3033
-
3252
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
3253
+
3034
3254
 
3035
-
3255
+
3036
3256
 
3257
+
3037
3258
 
3259
+
3038
3260
 
3039
3261
 
3040
3262
 
3263
+ <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3264
+ <xsl:attribute name="font-family">Calibri</xsl:attribute>
3265
+ </xsl:if>
3041
3266
 
3267
+
3042
3268
 
3043
3269
 
3044
3270
 
3045
3271
 
3046
- <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3047
- <xsl:attribute name="font-family">Calibri</xsl:attribute>
3048
- </xsl:if>
3049
3272
 
3273
+ <!-- end table block-container attributes -->
3050
3274
 
3051
3275
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
3052
3276
 
3053
3277
 
3278
+ <xsl:variable name="table_width_default">100%</xsl:variable>
3054
3279
  <xsl:variable name="table_width">
3055
3280
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
3056
- 100%
3057
-
3058
-
3281
+ <xsl:value-of select="$table_width_default"/>
3059
3282
  </xsl:variable>
3060
3283
 
3284
+
3061
3285
  <xsl:variable name="table_attributes">
3062
- <attribute name="table-layout">fixed</attribute>
3063
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
3064
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
3065
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
3066
-
3067
-
3068
-
3069
-
3070
-
3071
-
3072
- <attribute name="margin-left">0mm</attribute>
3073
- <attribute name="margin-right">0mm</attribute>
3074
- <xsl:if test="$doctype = 'service-publication'">
3075
- <attribute name="border">1pt solid rgb(211,211,211)</attribute>
3076
- </xsl:if>
3077
-
3078
-
3079
-
3080
-
3081
-
3082
-
3083
-
3084
-
3085
-
3286
+
3287
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
3288
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
3289
+
3290
+
3291
+
3292
+
3293
+
3294
+
3295
+
3296
+
3297
+
3298
+
3299
+ <xsl:if test="$doctype = 'service-publication'">
3300
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3301
+ </xsl:if>
3302
+
3303
+
3304
+
3305
+
3306
+
3307
+ </xsl:element>
3086
3308
  </xsl:variable>
3087
3309
 
3088
3310
 
3089
- <fo:table id="{@id}" table-omit-footer-at-break="true">
3311
+ <fo:table id="{@id}">
3090
3312
 
3091
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
3092
- <xsl:attribute name="{@name}">
3313
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3314
+ <xsl:attribute name="{local-name()}">
3093
3315
  <xsl:value-of select="."/>
3094
3316
  </xsl:attribute>
3095
3317
  </xsl:for-each>
@@ -3100,7 +3322,6 @@
3100
3322
  </xsl:if>
3101
3323
 
3102
3324
 
3103
-
3104
3325
  <xsl:choose>
3105
3326
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
3106
3327
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -3126,7 +3347,7 @@
3126
3347
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3127
3348
  </xsl:when>
3128
3349
  <xsl:otherwise>
3129
- <xsl:apply-templates/>
3350
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3130
3351
  </xsl:otherwise>
3131
3352
  </xsl:choose>
3132
3353
 
@@ -3141,25 +3362,6 @@
3141
3362
  </xsl:call-template>
3142
3363
  </xsl:for-each>
3143
3364
 
3144
- <!-- insert footer as table -->
3145
- <!-- <fo:table>
3146
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
3147
- <xsl:attribute name="{@name}">
3148
- <xsl:value-of select="."/>
3149
- </xsl:attribute>
3150
- </xsl:for-each>
3151
-
3152
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
3153
- <xsl:choose>
3154
- <xsl:when test=". = 1 or . = 0">
3155
- <fo:table-column column-width="proportional-column-width(2)"/>
3156
- </xsl:when>
3157
- <xsl:otherwise>
3158
- <fo:table-column column-width="proportional-column-width({.})"/>
3159
- </xsl:otherwise>
3160
- </xsl:choose>
3161
- </xsl:for-each>
3162
- </fo:table>-->
3163
3365
 
3164
3366
 
3165
3367
 
@@ -3220,18 +3422,17 @@
3220
3422
  </xsl:otherwise>
3221
3423
  </xsl:choose>
3222
3424
 
3223
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
3425
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
3224
3426
  <xsl:param name="continued"/>
3225
3427
  <xsl:if test="normalize-space() != ''">
3226
3428
  <fo:block xsl:use-attribute-sets="table-name-style">
3227
-
3429
+
3228
3430
 
3229
3431
 
3230
3432
 
3231
3433
 
3232
3434
  <xsl:choose>
3233
3435
  <xsl:when test="$continued = 'true'">
3234
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
3235
3436
 
3236
3437
  </xsl:when>
3237
3438
  <xsl:otherwise>
@@ -3294,13 +3495,6 @@
3294
3495
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
3295
3496
  <xsl:variable name="td_text">
3296
3497
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
3297
-
3298
- <!-- <xsl:if test="$namespace = 'bipm'">
3299
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
3300
- <word><xsl:value-of select="normalize-space(.)"/></word>
3301
- </xsl:for-each>
3302
- </xsl:if> -->
3303
-
3304
3498
  </xsl:variable>
3305
3499
  <xsl:variable name="words">
3306
3500
  <xsl:variable name="string_with_added_zerospaces">
@@ -3337,7 +3531,6 @@
3337
3531
  </xsl:otherwise>
3338
3532
  </xsl:choose>
3339
3533
  </xsl:variable>
3340
-
3341
3534
 
3342
3535
  <column>
3343
3536
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -3373,7 +3566,6 @@
3373
3566
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
3374
3567
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
3375
3568
  <xsl:param name="cols-count"/>
3376
- <!-- font-weight="bold" -->
3377
3569
  <fo:table-header>
3378
3570
 
3379
3571
 
@@ -3385,13 +3577,12 @@
3385
3577
  <fo:table-row>
3386
3578
  <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">
3387
3579
 
3388
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
3580
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
3389
3581
  <xsl:with-param name="continued">true</xsl:with-param>
3390
3582
  </xsl:apply-templates>
3391
3583
 
3392
3584
 
3393
3585
 
3394
-
3395
3586
  </fo:table-cell>
3396
3587
  </fo:table-row>
3397
3588
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -3407,68 +3598,6 @@
3407
3598
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
3408
3599
  </fo:table-footer>
3409
3600
  </xsl:if>
3410
- </xsl:template><xsl:template name="insertTableFooter2">
3411
- <xsl:param name="cols-count"/>
3412
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
3413
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
3414
-
3415
- <fo:table-footer>
3416
-
3417
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
3418
-
3419
- <!-- if there are note(s) or fn(s) then create footer row -->
3420
- <xsl:if test="$isNoteOrFnExist = 'true'">
3421
-
3422
-
3423
-
3424
- <fo:table-row>
3425
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3426
-
3427
-
3428
-
3429
- <xsl:if test="ancestor::*[local-name()='preface']">
3430
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3431
- </xsl:if>
3432
-
3433
- <!-- fn will be processed inside 'note' processing -->
3434
-
3435
-
3436
-
3437
-
3438
-
3439
-
3440
- <!-- except gb -->
3441
-
3442
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3443
-
3444
-
3445
- <!-- show Note under table in preface (ex. abstract) sections -->
3446
- <!-- empty, because notes show at page side in main sections -->
3447
- <!-- <xsl:if test="$namespace = 'bipm'">
3448
- <xsl:choose>
3449
- <xsl:when test="ancestor::*[local-name()='preface']">
3450
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3451
- </xsl:when>
3452
- <xsl:otherwise>
3453
- <fo:block/>
3454
- </xsl:otherwise>
3455
- </xsl:choose>
3456
- </xsl:if> -->
3457
-
3458
-
3459
- <!-- horizontal row separator -->
3460
-
3461
-
3462
- <!-- fn processing -->
3463
- <xsl:call-template name="fn_display"/>
3464
-
3465
- </fo:table-cell>
3466
- </fo:table-row>
3467
-
3468
- </xsl:if>
3469
- </fo:table-footer>
3470
-
3471
- </xsl:if>
3472
3601
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
3473
3602
  <xsl:param name="table_attributes"/>
3474
3603
  <xsl:param name="colwidths"/>
@@ -3494,17 +3623,18 @@
3494
3623
  </xsl:variable>
3495
3624
 
3496
3625
  <fo:table keep-with-previous="always">
3497
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
3626
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
3627
+ <xsl:variable name="name" select="local-name()"/>
3498
3628
  <xsl:choose>
3499
- <xsl:when test="@name = 'border-top'">
3500
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
3629
+ <xsl:when test="$name = 'border-top'">
3630
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
3501
3631
  </xsl:when>
3502
- <xsl:when test="@name = 'border'">
3503
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3632
+ <xsl:when test="$name = 'border'">
3633
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3504
3634
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
3505
3635
  </xsl:when>
3506
3636
  <xsl:otherwise>
3507
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
3637
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
3508
3638
  </xsl:otherwise>
3509
3639
  </xsl:choose>
3510
3640
  </xsl:for-each>
@@ -3539,22 +3669,22 @@
3539
3669
 
3540
3670
  <fo:table-body>
3541
3671
  <fo:table-row>
3542
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
3543
-
3672
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3544
3673
 
3545
3674
 
3675
+
3546
3676
 
3547
3677
  <xsl:if test="ancestor::*[local-name()='preface']">
3548
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3678
+ <xsl:if test="$doctype != 'service-publication'">
3679
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3680
+ </xsl:if>
3549
3681
  </xsl:if>
3550
3682
  <xsl:if test="$doctype = 'service-publication'">
3551
3683
  <xsl:attribute name="border">none</xsl:attribute>
3552
3684
  </xsl:if>
3553
3685
 
3554
- <!-- fn will be processed inside 'note' processing -->
3555
-
3556
-
3557
3686
 
3687
+ <!-- fn will be processed inside 'note' processing -->
3558
3688
 
3559
3689
 
3560
3690
 
@@ -3568,31 +3698,17 @@
3568
3698
  <!-- for BSI (not PAS) display Notes before footnotes -->
3569
3699
 
3570
3700
 
3571
- <!-- except gb -->
3572
-
3573
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3701
+ <!-- except gb and bsi -->
3574
3702
 
3575
-
3576
- <!-- <xsl:if test="$namespace = 'bipm'">
3577
- <xsl:choose>
3578
- <xsl:when test="ancestor::*[local-name()='preface']">
3579
- show Note under table in preface (ex. abstract) sections
3580
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3581
- </xsl:when>
3582
- <xsl:otherwise>
3583
- empty, because notes show at page side in main sections
3584
- <fo:block/>
3585
- </xsl:otherwise>
3586
- </xsl:choose>
3587
- </xsl:if> -->
3703
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
3704
+
3588
3705
 
3589
3706
 
3590
3707
  <!-- horizontal row separator -->
3591
3708
 
3592
3709
 
3593
3710
  <!-- fn processing -->
3594
- <xsl:call-template name="fn_display"/>
3595
-
3711
+ <xsl:call-template name="table_fn_display"/>
3596
3712
 
3597
3713
  <!-- for PAS display Notes after footnotes -->
3598
3714
 
@@ -3634,84 +3750,71 @@
3634
3750
 
3635
3751
 
3636
3752
  <xsl:apply-templates/>
3637
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
3638
-
3753
+
3639
3754
  </fo:table-body>
3640
3755
 
3641
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
3642
- <xsl:choose>
3643
- <xsl:when test="substring-after(., '—') != ''">
3644
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
3645
- </xsl:when>
3646
- <xsl:otherwise>
3647
- <xsl:value-of select="."/>
3648
- </xsl:otherwise>
3649
- </xsl:choose>
3650
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
3651
- <xsl:apply-templates mode="presentation_name"/>
3652
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
3653
- <xsl:apply-templates select="."/>
3654
- </xsl:template><xsl:template match="*[local-name()='tr']">
3655
- <xsl:variable name="parent-name" select="local-name(..)"/>
3656
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
3657
- <fo:table-row min-height="4mm">
3658
- <xsl:if test="$parent-name = 'thead'">
3659
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3660
-
3661
-
3662
-
3663
-
3664
-
3665
-
3666
-
3667
- <xsl:if test="$doctype = 'service-publication'">
3668
- <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
3669
- </xsl:if>
3670
-
3671
-
3672
- </xsl:if>
3673
- <xsl:if test="$parent-name = 'tfoot'">
3674
-
3675
-
3676
-
3756
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
3757
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
3758
+
3759
+
3760
+
3761
+
3762
+
3763
+
3764
+ <xsl:if test="$doctype = 'service-publication'">
3765
+ <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
3677
3766
  </xsl:if>
3678
-
3679
-
3680
-
3681
-
3682
-
3683
-
3684
-
3685
-
3686
-
3687
- <xsl:if test="$doctype = 'service-publication'">
3688
- <xsl:attribute name="min-height">5mm</xsl:attribute>
3689
- </xsl:if>
3690
-
3691
-
3692
- <!-- <xsl:if test="$namespace = 'bipm'">
3693
- <xsl:attribute name="height">8mm</xsl:attribute>
3694
- </xsl:if> -->
3695
-
3767
+
3768
+
3769
+ <xsl:call-template name="setTableRowAttributes"/>
3770
+
3771
+ <xsl:apply-templates/>
3772
+ </fo:table-row>
3773
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
3774
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
3775
+
3776
+ <xsl:call-template name="setTableRowAttributes"/>
3777
+ <xsl:apply-templates/>
3778
+ </fo:table-row>
3779
+ </xsl:template><xsl:template match="*[local-name()='tr']">
3780
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3781
+
3782
+
3783
+
3784
+
3785
+
3786
+ <xsl:call-template name="setTableRowAttributes"/>
3696
3787
  <xsl:apply-templates/>
3697
3788
  </fo:table-row>
3789
+ </xsl:template><xsl:template name="setTableRowAttributes">
3790
+
3791
+
3792
+
3793
+
3794
+
3795
+
3796
+ <xsl:if test="$doctype = 'service-publication'">
3797
+ <xsl:attribute name="min-height">5mm</xsl:attribute>
3798
+ </xsl:if>
3799
+
3800
+
3801
+
3698
3802
  </xsl:template><xsl:template match="*[local-name()='th']">
3699
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
3700
- <xsl:attribute name="text-align">
3701
- <xsl:choose>
3702
- <xsl:when test="@align">
3703
- <xsl:call-template name="setAlignment"/>
3704
- <!-- <xsl:value-of select="@align"/> -->
3705
- </xsl:when>
3706
- <xsl:otherwise>center</xsl:otherwise>
3707
- </xsl:choose>
3708
- </xsl:attribute>
3803
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
3804
+ <xsl:call-template name="setTextAlignment">
3805
+ <xsl:with-param name="default">center</xsl:with-param>
3806
+ </xsl:call-template>
3807
+
3808
+
3709
3809
 
3710
3810
 
3811
+
3711
3812
 
3712
3813
 
3713
3814
  <xsl:if test="ancestor::*[local-name()='preface']">
3714
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3815
+ <xsl:if test="$doctype != 'service-publication'">
3816
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3817
+ </xsl:if>
3715
3818
  </xsl:if>
3716
3819
  <xsl:if test="$doctype = 'service-publication'">
3717
3820
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
@@ -3722,30 +3825,28 @@
3722
3825
 
3723
3826
 
3724
3827
 
3725
-
3726
-
3727
-
3728
-
3729
-
3730
-
3731
3828
  <xsl:if test="$lang = 'ar'">
3732
3829
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3733
3830
  </xsl:if>
3734
- <xsl:if test="@colspan">
3735
- <xsl:attribute name="number-columns-spanned">
3736
- <xsl:value-of select="@colspan"/>
3737
- </xsl:attribute>
3738
- </xsl:if>
3739
- <xsl:if test="@rowspan">
3740
- <xsl:attribute name="number-rows-spanned">
3741
- <xsl:value-of select="@rowspan"/>
3742
- </xsl:attribute>
3743
- </xsl:if>
3744
- <xsl:call-template name="display-align"/>
3831
+
3832
+ <xsl:call-template name="setTableCellAttributes"/>
3833
+
3745
3834
  <fo:block>
3746
3835
  <xsl:apply-templates/>
3747
3836
  </fo:block>
3748
3837
  </fo:table-cell>
3838
+ </xsl:template><xsl:template name="setTableCellAttributes">
3839
+ <xsl:if test="@colspan">
3840
+ <xsl:attribute name="number-columns-spanned">
3841
+ <xsl:value-of select="@colspan"/>
3842
+ </xsl:attribute>
3843
+ </xsl:if>
3844
+ <xsl:if test="@rowspan">
3845
+ <xsl:attribute name="number-rows-spanned">
3846
+ <xsl:value-of select="@rowspan"/>
3847
+ </xsl:attribute>
3848
+ </xsl:if>
3849
+ <xsl:call-template name="display-align"/>
3749
3850
  </xsl:template><xsl:template name="display-align">
3750
3851
  <xsl:if test="@valign">
3751
3852
  <xsl:attribute name="display-align">
@@ -3758,68 +3859,64 @@
3758
3859
  </xsl:attribute>
3759
3860
  </xsl:if>
3760
3861
  </xsl:template><xsl:template match="*[local-name()='td']">
3761
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
3762
- <xsl:attribute name="text-align">
3763
- <xsl:choose>
3764
- <xsl:when test="@align">
3765
- <xsl:call-template name="setAlignment"/>
3766
- <!-- <xsl:value-of select="@align"/> -->
3767
- </xsl:when>
3768
- <xsl:otherwise>left</xsl:otherwise>
3769
- </xsl:choose>
3770
- </xsl:attribute>
3862
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
3863
+ <xsl:call-template name="setTextAlignment">
3864
+ <xsl:with-param name="default">left</xsl:with-param>
3865
+ </xsl:call-template>
3866
+
3771
3867
  <xsl:if test="$lang = 'ar'">
3772
3868
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3773
3869
  </xsl:if>
3774
3870
 
3775
3871
 
3776
3872
 
3873
+ <!-- bsi -->
3874
+
3875
+
3876
+
3877
+
3878
+
3879
+
3880
+
3777
3881
 
3778
3882
  <xsl:if test="ancestor::*[local-name()='preface']">
3779
3883
  <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3780
3884
  </xsl:if>
3781
- <xsl:attribute name="display-align">before</xsl:attribute>
3782
3885
  <xsl:if test="$doctype = 'service-publication'">
3783
3886
  <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3784
3887
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
3785
3888
  </xsl:if>
3786
3889
 
3890
+
3787
3891
 
3788
3892
 
3789
3893
 
3790
3894
 
3791
3895
 
3792
3896
 
3793
-
3794
-
3795
-
3796
-
3797
-
3798
-
3799
- <xsl:if test=".//*[local-name() = 'table']">
3897
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
3800
3898
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3801
3899
  </xsl:if>
3802
- <xsl:if test="@colspan">
3803
- <xsl:attribute name="number-columns-spanned">
3804
- <xsl:value-of select="@colspan"/>
3805
- </xsl:attribute>
3806
- </xsl:if>
3807
- <xsl:if test="@rowspan">
3808
- <xsl:attribute name="number-rows-spanned">
3809
- <xsl:value-of select="@rowspan"/>
3810
- </xsl:attribute>
3811
- </xsl:if>
3812
- <xsl:call-template name="display-align"/>
3900
+
3901
+ <xsl:call-template name="setTableCellAttributes"/>
3902
+
3813
3903
  <fo:block>
3814
-
3904
+
3905
+
3906
+
3815
3907
  <xsl:apply-templates/>
3816
3908
  </fo:block>
3817
3909
  </fo:table-cell>
3818
3910
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
3911
+
3912
+ <fo:block xsl:use-attribute-sets="table-note-style">
3913
+
3914
+
3915
+
3916
+
3819
3917
 
3820
-
3821
- <fo:block font-size="10pt" margin-bottom="12pt">
3822
-
3918
+ <!-- Table's note name (NOTE, for example) -->
3919
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
3823
3920
 
3824
3921
 
3825
3922
 
@@ -3827,22 +3924,14 @@
3827
3924
 
3828
3925
 
3829
3926
 
3830
- <!-- Table's note name (NOTE, for example) -->
3831
-
3832
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
3833
-
3927
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
3834
3928
 
3835
-
3836
-
3837
-
3838
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
3839
-
3840
- </fo:inline>
3841
-
3842
-
3843
-
3844
- <xsl:apply-templates mode="process"/>
3845
- </fo:block>
3929
+ </fo:inline>
3930
+
3931
+
3932
+
3933
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
3934
+ </fo:block>
3846
3935
 
3847
3936
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
3848
3937
  <xsl:apply-templates/>
@@ -3922,8 +4011,7 @@
3922
4011
  <xsl:copy-of select="$footnote_inline"/>
3923
4012
  <fo:footnote-body>
3924
4013
 
3925
- <fo:block-container text-indent="0" start-indent="0">
3926
-
4014
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
3927
4015
 
3928
4016
  <fo:block xsl:use-attribute-sets="fn-body-style">
3929
4017
 
@@ -3946,7 +4034,7 @@
3946
4034
  <xsl:copy-of select="$footnote_inline"/>
3947
4035
  </xsl:otherwise>
3948
4036
  </xsl:choose>
3949
- </xsl:template><xsl:template name="fn_display">
4037
+ </xsl:template><xsl:template name="table_fn_display">
3950
4038
  <xsl:variable name="references">
3951
4039
 
3952
4040
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -3957,45 +4045,28 @@
3957
4045
  <xsl:for-each select="xalan:nodeset($references)//fn">
3958
4046
  <xsl:variable name="reference" select="@reference"/>
3959
4047
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
3960
- <fo:block margin-bottom="12pt">
4048
+ <fo:block xsl:use-attribute-sets="table-fn-style">
3961
4049
 
3962
4050
 
3963
4051
 
3964
-
3965
-
3966
-
3967
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3968
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3969
- <xsl:attribute name="text-indent">-5mm</xsl:attribute>
3970
- <xsl:attribute name="start-indent">5mm</xsl:attribute>
3971
-
3972
-
3973
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
3974
-
3975
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4052
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
3976
4053
 
3977
4054
 
3978
4055
 
3979
4056
 
3980
4057
 
4058
+ <xsl:value-of select="@reference"/>
3981
4059
 
3982
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
3983
- <xsl:attribute name="font-size">70%</xsl:attribute>
3984
4060
 
3985
4061
 
3986
4062
 
3987
- <xsl:value-of select="@reference"/>
3988
4063
 
3989
4064
 
3990
- <!-- <xsl:if test="@preface = 'true'"> -->
3991
- <xsl:text>)</xsl:text>
3992
- <!-- </xsl:if> -->
4065
+ <xsl:text>)</xsl:text>
3993
4066
 
3994
4067
 
3995
4068
  </fo:inline>
3996
- <fo:inline>
3997
-
3998
- <!-- <xsl:apply-templates /> -->
4069
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
3999
4070
  <xsl:copy-of select="./node()"/>
4000
4071
  </fo:inline>
4001
4072
  </fo:block>
@@ -4011,15 +4082,7 @@
4011
4082
 
4012
4083
  <xsl:apply-templates/>
4013
4084
  </fn>
4014
- </xsl:template><xsl:template name="fn_name_display">
4015
- <!-- <xsl:variable name="references">
4016
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
4017
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
4018
- <xsl:apply-templates />
4019
- </fn>
4020
- </xsl:for-each>
4021
- </xsl:variable>
4022
- $references=<xsl:copy-of select="$references"/> -->
4085
+ </xsl:template><xsl:template name="table_name_fn_display">
4023
4086
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
4024
4087
  <xsl:variable name="reference" select="@reference"/>
4025
4088
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -4028,9 +4091,7 @@
4028
4091
  </fo:block>
4029
4092
  </xsl:for-each>
4030
4093
  </xsl:template><xsl:template name="fn_display_figure">
4031
- <xsl:variable name="key_iso">
4032
- <!-- and (not(@class) or @class !='pseudocode') -->
4033
- </xsl:variable>
4094
+
4034
4095
  <xsl:variable name="references">
4035
4096
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
4036
4097
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -4038,50 +4099,52 @@
4038
4099
  </fn>
4039
4100
  </xsl:for-each>
4040
4101
  </xsl:variable>
4102
+
4103
+ <xsl:if test="xalan:nodeset($references)//fn">
4041
4104
 
4042
- <!-- current hierarchy is 'figure' element -->
4043
- <xsl:variable name="following_dl_colwidths">
4044
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
4045
- <xsl:variable name="html-table">
4046
- <xsl:variable name="doc_ns">
4105
+ <xsl:variable name="key_iso">
4106
+
4107
+ </xsl:variable>
4108
+
4109
+ <!-- current hierarchy is 'figure' element -->
4110
+ <xsl:variable name="following_dl_colwidths">
4111
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
4112
+ <xsl:variable name="html-table">
4113
+ <xsl:variable name="doc_ns">
4114
+
4115
+ </xsl:variable>
4116
+ <xsl:variable name="ns">
4117
+ <xsl:choose>
4118
+ <xsl:when test="normalize-space($doc_ns) != ''">
4119
+ <xsl:value-of select="normalize-space($doc_ns)"/>
4120
+ </xsl:when>
4121
+ <xsl:otherwise>
4122
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
4123
+ </xsl:otherwise>
4124
+ </xsl:choose>
4125
+ </xsl:variable>
4047
4126
 
4048
- </xsl:variable>
4049
- <xsl:variable name="ns">
4050
- <xsl:choose>
4051
- <xsl:when test="normalize-space($doc_ns) != ''">
4052
- <xsl:value-of select="normalize-space($doc_ns)"/>
4053
- </xsl:when>
4054
- <xsl:otherwise>
4055
- <xsl:value-of select="substring-before(name(/*), '-')"/>
4056
- </xsl:otherwise>
4057
- </xsl:choose>
4058
- </xsl:variable>
4059
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
4060
- <!-- <xsl:element name="{$ns}:table"> -->
4061
4127
  <xsl:for-each select="*[local-name() = 'dl'][1]">
4062
4128
  <tbody>
4063
4129
  <xsl:apply-templates mode="dl"/>
4064
4130
  </tbody>
4065
4131
  </xsl:for-each>
4066
- <!-- </xsl:element> -->
4067
- </xsl:variable>
4068
-
4069
- <xsl:call-template name="calculate-column-widths">
4070
- <xsl:with-param name="cols-count" select="2"/>
4071
- <xsl:with-param name="table" select="$html-table"/>
4072
- </xsl:call-template>
4073
-
4074
- </xsl:if>
4075
- </xsl:variable>
4076
-
4077
-
4078
- <xsl:variable name="maxlength_dt">
4079
- <xsl:for-each select="*[local-name() = 'dl'][1]">
4080
- <xsl:call-template name="getMaxLength_dt"/>
4081
- </xsl:for-each>
4082
- </xsl:variable>
4083
-
4084
- <xsl:if test="xalan:nodeset($references)//fn">
4132
+ </xsl:variable>
4133
+
4134
+ <xsl:call-template name="calculate-column-widths">
4135
+ <xsl:with-param name="cols-count" select="2"/>
4136
+ <xsl:with-param name="table" select="$html-table"/>
4137
+ </xsl:call-template>
4138
+
4139
+ </xsl:if>
4140
+ </xsl:variable>
4141
+
4142
+ <xsl:variable name="maxlength_dt">
4143
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
4144
+ <xsl:call-template name="getMaxLength_dt"/>
4145
+ </xsl:for-each>
4146
+ </xsl:variable>
4147
+
4085
4148
  <fo:block>
4086
4149
  <fo:table width="95%" table-layout="fixed">
4087
4150
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -4108,20 +4171,18 @@
4108
4171
  <fo:table-row>
4109
4172
  <fo:table-cell>
4110
4173
  <fo:block>
4111
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
4112
-
4174
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
4113
4175
  <xsl:value-of select="@reference"/>
4114
4176
  </fo:inline>
4115
4177
  </fo:block>
4116
4178
  </fo:table-cell>
4117
4179
  <fo:table-cell>
4118
- <fo:block text-align="justify" margin-bottom="12pt">
4119
-
4180
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
4120
4181
  <xsl:if test="normalize-space($key_iso) = 'true'">
4121
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
4182
+
4183
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
4184
+
4122
4185
  </xsl:if>
4123
-
4124
- <!-- <xsl:apply-templates /> -->
4125
4186
  <xsl:copy-of select="./node()"/>
4126
4187
  </fo:block>
4127
4188
  </fo:table-cell>
@@ -4134,17 +4195,8 @@
4134
4195
  </xsl:if>
4135
4196
 
4136
4197
  </xsl:template><xsl:template match="*[local-name()='fn']">
4137
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
4138
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
4139
-
4140
-
4141
-
4142
-
4143
-
4144
-
4145
-
4146
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4147
- <xsl:attribute name="color">blue</xsl:attribute>
4198
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
4199
+
4148
4200
 
4149
4201
 
4150
4202
 
@@ -4168,10 +4220,10 @@
4168
4220
  <xsl:variable name="isDeleted" select="@deleted"/>
4169
4221
  <fo:block-container>
4170
4222
 
4171
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
4172
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4173
- </xsl:if>
4174
-
4223
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
4224
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4225
+ </xsl:if>
4226
+
4175
4227
 
4176
4228
  <xsl:if test="parent::*[local-name() = 'note']">
4177
4229
  <xsl:attribute name="margin-left">
@@ -4188,11 +4240,11 @@
4188
4240
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
4189
4241
  </xsl:call-template>
4190
4242
 
4191
- <fo:block-container>
4192
-
4193
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4194
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
4243
+ <fo:block-container margin-left="0mm">
4244
+
4195
4245
 
4246
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
4247
+
4196
4248
 
4197
4249
  <xsl:variable name="parent" select="local-name(..)"/>
4198
4250
 
@@ -4203,20 +4255,19 @@
4203
4255
  <xsl:choose>
4204
4256
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
4205
4257
 
4206
-
4207
- <fo:block margin-bottom="12pt" text-align="left">
4208
-
4209
- <xsl:variable name="title-where">
4210
- <xsl:call-template name="getLocalizedString">
4211
- <xsl:with-param name="key">where</xsl:with-param>
4212
- </xsl:call-template>
4213
- </xsl:variable>
4214
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
4215
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
4216
- <xsl:text/>
4217
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
4218
- </fo:block>
4219
-
4258
+ <fo:block margin-bottom="12pt" text-align="left">
4259
+
4260
+ <xsl:variable name="title-where">
4261
+ <xsl:call-template name="getLocalizedString">
4262
+ <xsl:with-param name="key">where</xsl:with-param>
4263
+ </xsl:call-template>
4264
+ </xsl:variable>
4265
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
4266
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
4267
+ <xsl:text/>
4268
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
4269
+ </fo:block>
4270
+
4220
4271
  </xsl:when>
4221
4272
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
4222
4273
  <fo:block margin-bottom="12pt" text-align="left">
@@ -4258,9 +4309,6 @@
4258
4309
  <xsl:if test="$parent = 'figure' or $parent = 'formula'">
4259
4310
  <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
4260
4311
  </xsl:if>
4261
- <xsl:if test="$parent = 'li'">
4262
- <!-- <xsl:attribute name="margin-left">-4mm</xsl:attribute> -->
4263
- </xsl:if>
4264
4312
 
4265
4313
 
4266
4314
 
@@ -4272,9 +4320,7 @@
4272
4320
  <fo:table width="95%" table-layout="fixed">
4273
4321
 
4274
4322
  <xsl:choose>
4275
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
4276
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
4277
- </xsl:when>
4323
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
4278
4324
  <xsl:when test="normalize-space($key_iso) = 'true'">
4279
4325
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4280
4326
 
@@ -4295,12 +4341,9 @@
4295
4341
  </xsl:otherwise>
4296
4342
  </xsl:choose>
4297
4343
  </xsl:variable>
4298
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
4299
- <!-- <xsl:element name="{$ns}:table"> -->
4300
- <tbody>
4301
- <xsl:apply-templates mode="dl"/>
4302
- </tbody>
4303
- <!-- </xsl:element> -->
4344
+ <tbody>
4345
+ <xsl:apply-templates mode="dl"/>
4346
+ </tbody>
4304
4347
  </xsl:variable>
4305
4348
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
4306
4349
  <xsl:variable name="colwidths">
@@ -4380,8 +4423,6 @@
4380
4423
  </xsl:for-each>
4381
4424
  </xsl:otherwise>
4382
4425
  </xsl:choose>
4383
- <!-- <fo:table-column column-width="15%"/>
4384
- <fo:table-column column-width="85%"/> -->
4385
4426
  </xsl:otherwise>
4386
4427
  </xsl:choose>
4387
4428
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -4396,12 +4437,6 @@
4396
4437
  </xsl:for-each>
4397
4438
  </xsl:variable>
4398
4439
  <xsl:variable name="maxLength">
4399
- <!-- <xsl:for-each select="*[local-name()='dt']">
4400
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
4401
- <xsl:if test="position() = 1">
4402
- <xsl:value-of select="string-length(normalize-space(.))"/>
4403
- </xsl:if>
4404
- </xsl:for-each> -->
4405
4440
  <xsl:for-each select="xalan:nodeset($lengths)/length">
4406
4441
  <xsl:sort select="." data-type="number" order="descending"/>
4407
4442
  <xsl:if test="position() = 1">
@@ -4427,12 +4462,12 @@
4427
4462
  <xsl:if test="normalize-space($key_iso) = 'true'">
4428
4463
  <xsl:attribute name="margin-top">0</xsl:attribute>
4429
4464
  </xsl:if>
4430
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
4465
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
4431
4466
  </fo:block>
4432
4467
  </fo:table-cell>
4433
4468
  <fo:table-cell>
4434
4469
  <fo:block>
4435
- <xsl:apply-templates/>
4470
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4436
4471
  </fo:block>
4437
4472
  </fo:table-cell>
4438
4473
  </fo:table-row>
@@ -4443,49 +4478,35 @@
4443
4478
  </td>
4444
4479
  <td>
4445
4480
 
4446
-
4447
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4448
-
4481
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4482
+
4449
4483
  </td>
4450
4484
  </tr>
4451
4485
 
4452
4486
  </xsl:template><xsl:template match="*[local-name()='dt']">
4453
4487
  <xsl:param name="key_iso"/>
4454
4488
 
4455
- <fo:table-row>
4456
-
4457
-
4489
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
4458
4490
  <fo:table-cell>
4459
4491
 
4460
4492
  <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
4461
4493
  <xsl:attribute name="padding-right">3mm</xsl:attribute>
4462
4494
  </xsl:if>
4463
4495
 
4464
- <fo:block margin-top="6pt">
4496
+ <fo:block xsl:use-attribute-sets="dt-style">
4465
4497
  <xsl:copy-of select="@id"/>
4466
4498
 
4467
-
4468
4499
  <xsl:if test="normalize-space($key_iso) = 'true'">
4469
4500
  <xsl:attribute name="margin-top">0</xsl:attribute>
4470
-
4471
4501
  </xsl:if>
4472
4502
 
4473
4503
 
4474
-
4475
-
4476
4504
  <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
4477
4505
  <xsl:attribute name="text-align">right</xsl:attribute>
4478
4506
  </xsl:if>
4479
4507
 
4480
4508
 
4481
-
4482
-
4483
4509
  <xsl:apply-templates/>
4484
- <!-- <xsl:if test="$namespace = 'gb'">
4485
- <xsl:if test="ancestor::*[local-name()='formula']">
4486
- <xsl:text>—</xsl:text>
4487
- </xsl:if>
4488
- </xsl:if> -->
4489
4510
  </fo:block>
4490
4511
  </fo:table-cell>
4491
4512
  <fo:table-cell>
@@ -4493,36 +4514,11 @@
4493
4514
 
4494
4515
  <xsl:attribute name="text-align">justify</xsl:attribute>
4495
4516
 
4496
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
4497
- <xsl:if test="local-name(*[1]) != 'stem'">
4498
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4499
- </xsl:if>
4500
- </xsl:if> -->
4501
-
4502
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4503
-
4517
+
4518
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4504
4519
  </fo:block>
4505
4520
  </fo:table-cell>
4506
4521
  </fo:table-row>
4507
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
4508
- <xsl:if test="local-name(*[1]) = 'stem'">
4509
- <fo:table-row>
4510
- <fo:table-cell>
4511
- <fo:block margin-top="6pt">
4512
- <xsl:if test="normalize-space($key_iso) = 'true'">
4513
- <xsl:attribute name="margin-top">0</xsl:attribute>
4514
- </xsl:if>
4515
- <xsl:text>&#xA0;</xsl:text>
4516
- </fo:block>
4517
- </fo:table-cell>
4518
- <fo:table-cell>
4519
- <fo:block>
4520
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4521
- </fo:block>
4522
- </fo:table-cell>
4523
- </fo:table-row>
4524
- </xsl:if>
4525
- </xsl:if> -->
4526
4522
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
4527
4523
  <xsl:apply-templates/>
4528
4524
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
@@ -4551,6 +4547,7 @@
4551
4547
  </fo:inline>
4552
4548
  </xsl:template><xsl:template match="*[local-name()='tt']">
4553
4549
  <fo:inline xsl:use-attribute-sets="tt-style">
4550
+
4554
4551
  <xsl:variable name="_font-size">
4555
4552
 
4556
4553
 
@@ -4587,15 +4584,21 @@
4587
4584
  <xsl:apply-templates/>
4588
4585
  </fo:inline>
4589
4586
  </xsl:template><xsl:template match="*[local-name()='add']">
4587
+ <xsl:param name="skip">true</xsl:param>
4590
4588
  <xsl:choose>
4591
4589
  <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
4592
- <fo:inline>
4593
- <xsl:call-template name="insertTag">
4594
- <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
4595
- <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4596
- <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4597
- </xsl:call-template>
4598
- </fo:inline>
4590
+ <xsl:choose>
4591
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
4592
+ <xsl:otherwise>
4593
+ <fo:inline>
4594
+ <xsl:call-template name="insertTag">
4595
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
4596
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
4597
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
4598
+ </xsl:call-template>
4599
+ </fo:inline>
4600
+ </xsl:otherwise>
4601
+ </xsl:choose>
4599
4602
  </xsl:when>
4600
4603
  <xsl:when test="@amendment">
4601
4604
  <fo:inline>
@@ -4638,8 +4641,6 @@
4638
4641
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
4639
4642
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
4640
4643
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
4641
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
4642
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
4643
4644
  <xsl:attribute name="height">5mm</xsl:attribute>
4644
4645
  <xsl:attribute name="content-width">100%</xsl:attribute>
4645
4646
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
@@ -4857,14 +4858,6 @@
4857
4858
 
4858
4859
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
4859
4860
 
4860
- <!-- <xsl:choose>
4861
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
4862
-
4863
- </xsl:when>
4864
- <xsl:otherwise>
4865
- <xsl:copy-of select="current()"/>
4866
- </xsl:otherwise>
4867
- </xsl:choose> -->
4868
4861
  </xsl:variable>
4869
4862
  <xsl:copy-of select="$simple-table"/>
4870
4863
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -4983,8 +4976,6 @@
4983
4976
  <xsl:choose>
4984
4977
  <xsl:when test="contains($str2, ' ')">
4985
4978
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
4986
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
4987
- <xsl:value-of select="substring($substr, 2)"/> -->
4988
4979
  <xsl:call-template name="capitalize">
4989
4980
  <xsl:with-param name="str" select="$substr"/>
4990
4981
  </xsl:call-template>
@@ -4994,8 +4985,6 @@
4994
4985
  </xsl:call-template>
4995
4986
  </xsl:when>
4996
4987
  <xsl:otherwise>
4997
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
4998
- <xsl:value-of select="substring($str2, 2)"/> -->
4999
4988
  <xsl:call-template name="capitalize">
5000
4989
  <xsl:with-param name="str" select="$str2"/>
5001
4990
  </xsl:call-template>
@@ -5023,6 +5012,7 @@
5023
5012
  <xsl:apply-templates select="." mode="mathml"/>
5024
5013
  </xsl:variable>
5025
5014
  <fo:instream-foreign-object fox:alt-text="Math">
5015
+
5026
5016
 
5027
5017
 
5028
5018
  <xsl:variable name="comment_text_following" select="following-sibling::node()[1][self::comment()]"/>
@@ -5054,7 +5044,7 @@
5054
5044
  </xsl:attribute>
5055
5045
 
5056
5046
 
5057
- <!-- <xsl:copy-of select="."/> -->
5047
+
5058
5048
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
5059
5049
  </fo:instream-foreign-object>
5060
5050
  </fo:inline>
@@ -5113,6 +5103,10 @@
5113
5103
 
5114
5104
 
5115
5105
 
5106
+
5107
+
5108
+
5109
+
5116
5110
  <xsl:choose>
5117
5111
  <xsl:when test="$target_text = ''">
5118
5112
  <xsl:apply-templates/>
@@ -5170,7 +5164,6 @@
5170
5164
  </fo:inline>
5171
5165
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
5172
5166
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
5173
-
5174
5167
  <xsl:apply-templates/>
5175
5168
  </fo:basic-link>
5176
5169
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -5198,53 +5191,68 @@
5198
5191
  <fo:inline>
5199
5192
  <xsl:apply-templates/>
5200
5193
  </fo:inline>
5201
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
5194
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
5202
5195
  <xsl:if test="normalize-space() != ''">
5203
5196
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
5204
5197
  </xsl:if>
5205
5198
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
5206
5199
 
5207
5200
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
5201
+
5202
+
5203
+
5204
+
5205
+
5208
5206
 
5209
5207
 
5210
5208
 
5209
+
5211
5210
 
5212
5211
 
5213
5212
  <fo:block-container margin-left="0mm">
5213
+
5214
5214
 
5215
5215
 
5216
5216
 
5217
+
5217
5218
 
5218
-
5219
-
5220
-
5221
-
5222
- <fo:block>
5223
-
5224
- <xsl:if test="ancestor::itu:figure">
5225
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5226
- </xsl:if>
5227
-
5228
-
5229
-
5230
-
5231
-
5219
+ <fo:block>
5220
+
5221
+
5232
5222
 
5233
- <fo:inline xsl:use-attribute-sets="note-name-style">
5234
5223
 
5235
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
5236
- </fo:inline>
5237
- <xsl:apply-templates/>
5238
- </fo:block>
5239
-
5240
-
5224
+ <xsl:if test="ancestor::itu:figure">
5225
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5226
+ </xsl:if>
5227
+
5228
+
5229
+
5230
+
5231
+ <fo:inline xsl:use-attribute-sets="note-name-style">
5232
+
5233
+
5234
+
5235
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
5236
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
5237
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
5238
+ <xsl:with-param name="skip">false</xsl:with-param>
5239
+ </xsl:apply-templates>
5240
+ </xsl:if>
5241
+
5242
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5243
+
5244
+ </fo:inline>
5245
+
5246
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5247
+ </fo:block>
5248
+
5241
5249
  </fo:block-container>
5242
5250
  </fo:block-container>
5243
5251
 
5244
5252
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
5245
5253
  <xsl:variable name="num"><xsl:number/></xsl:variable>
5246
5254
  <xsl:choose>
5247
- <xsl:when test="$num = 1">
5255
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
5248
5256
  <fo:inline xsl:use-attribute-sets="note-p-style">
5249
5257
  <xsl:apply-templates/>
5250
5258
  </fo:inline>
@@ -5259,12 +5267,16 @@
5259
5267
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
5260
5268
 
5261
5269
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
5270
+
5271
+
5272
+
5273
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5262
5274
 
5263
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
5264
5275
  </fo:inline>
5265
- <xsl:apply-templates/>
5276
+
5277
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5266
5278
  </fo:block>
5267
- </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">
5279
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
5268
5280
  <xsl:param name="sfx"/>
5269
5281
  <xsl:variable name="suffix">
5270
5282
  <xsl:choose>
@@ -5283,7 +5295,7 @@
5283
5295
  <xsl:apply-templates/>
5284
5296
  <xsl:value-of select="$suffix"/>
5285
5297
  </xsl:if>
5286
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
5298
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
5287
5299
  <xsl:param name="sfx"/>
5288
5300
  <xsl:variable name="suffix">
5289
5301
  <xsl:choose>
@@ -5310,25 +5322,23 @@
5310
5322
  <xsl:apply-templates/>
5311
5323
  </fo:block>
5312
5324
  </xsl:template><xsl:template match="*[local-name() = 'term']">
5313
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
5314
5325
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
5315
5326
 
5316
5327
 
5328
+
5329
+
5317
5330
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
5318
5331
 
5319
5332
  </xsl:if>
5320
- <xsl:apply-templates/>
5333
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5321
5334
  </fo:block>
5322
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
5335
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
5323
5336
  <xsl:if test="normalize-space() != ''">
5324
5337
  <xsl:variable name="level">
5325
5338
  <xsl:call-template name="getLevelTermName"/>
5326
5339
  </xsl:variable>
5327
5340
  <fo:inline role="H{$level}">
5328
5341
  <xsl:apply-templates/>
5329
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
5330
- <xsl:text>.</xsl:text>
5331
- </xsl:if> -->
5332
5342
  </fo:inline>
5333
5343
  </xsl:if>
5334
5344
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -5341,9 +5351,10 @@
5341
5351
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
5342
5352
  </xsl:call-template>
5343
5353
 
5344
- <fo:block>
5345
-
5346
- <xsl:apply-templates/>
5354
+
5355
+
5356
+ <fo:block xsl:use-attribute-sets="figure-style">
5357
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5347
5358
  </fo:block>
5348
5359
  <xsl:call-template name="fn_display_figure"/>
5349
5360
  <xsl:for-each select="*[local-name() = 'note']">
@@ -5351,14 +5362,15 @@
5351
5362
  </xsl:for-each>
5352
5363
 
5353
5364
 
5354
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
5365
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
5366
+
5355
5367
 
5356
5368
  </fo:block-container>
5357
5369
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
5358
5370
  <fo:block id="{@id}">
5359
- <xsl:apply-templates/>
5371
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5360
5372
  </fo:block>
5361
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
5373
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
5362
5374
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
5363
5375
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
5364
5376
  <xsl:apply-templates/>
@@ -5465,9 +5477,7 @@
5465
5477
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
5466
5478
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
5467
5479
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
5468
- <!-- width=<xsl:value-of select="$width"/> -->
5469
5480
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
5470
- <!-- height=<xsl:value-of select="$height"/> -->
5471
5481
  <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">
5472
5482
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
5473
5483
  <xsl:call-template name="svg_cross">
@@ -5737,7 +5747,7 @@
5737
5747
  </fo:basic-link>
5738
5748
  </fo:block>
5739
5749
  </fo:block-container>
5740
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
5750
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
5741
5751
  <xsl:apply-templates mode="contents"/>
5742
5752
  <xsl:text> </xsl:text>
5743
5753
  </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'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -5890,8 +5900,6 @@
5890
5900
 
5891
5901
 
5892
5902
 
5893
-
5894
-
5895
5903
  </fo:bookmark-tree>
5896
5904
  </xsl:if>
5897
5905
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -5962,7 +5970,7 @@
5962
5970
  <xsl:apply-templates mode="bookmark"/>
5963
5971
  </xsl:otherwise>
5964
5972
  </xsl:choose>
5965
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
5973
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
5966
5974
  <xsl:if test="normalize-space() != ''">
5967
5975
  <fo:block xsl:use-attribute-sets="figure-name-style">
5968
5976
 
@@ -5978,12 +5986,6 @@
5978
5986
  <!-- <xsl:text> </xsl:text> -->
5979
5987
  </xsl:template><xsl:template name="getSection">
5980
5988
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
5981
- <!--
5982
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
5983
- <xsl:value-of select="."/>
5984
- </xsl:for-each>
5985
- -->
5986
-
5987
5989
  </xsl:template><xsl:template name="getName">
5988
5990
  <xsl:choose>
5989
5991
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -6052,16 +6054,21 @@
6052
6054
  <xsl:apply-templates mode="contents_item">
6053
6055
  <xsl:with-param name="mode" select="$mode"/>
6054
6056
  </xsl:apply-templates>
6055
- </xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
6057
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
6056
6058
  <xsl:param name="mode">bookmarks</xsl:param>
6057
- <xsl:if test="$mode = 'contents'">
6058
- <xsl:copy>
6059
- <xsl:apply-templates mode="contents_item"/>
6060
- </xsl:copy>
6061
- </xsl:if>
6059
+ <xsl:choose>
6060
+ <xsl:when test="starts-with(text(), $ace_tag)">
6061
+ <xsl:if test="$mode = 'contents'">
6062
+ <xsl:copy>
6063
+ <xsl:apply-templates mode="contents_item"/>
6064
+ </xsl:copy>
6065
+ </xsl:if>
6066
+ </xsl:when>
6067
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
6068
+ </xsl:choose>
6062
6069
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
6063
6070
 
6064
- <fo:block-container margin-left="0mm">
6071
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
6065
6072
  <xsl:copy-of select="@id"/>
6066
6073
 
6067
6074
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -6098,6 +6105,7 @@
6098
6105
 
6099
6106
 
6100
6107
  </xsl:variable>
6108
+
6101
6109
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
6102
6110
  <xsl:if test="$font-size != ''">
6103
6111
  <xsl:attribute name="font-size">
@@ -6114,11 +6122,11 @@
6114
6122
 
6115
6123
 
6116
6124
 
6117
- <xsl:apply-templates/>
6125
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6118
6126
  </fo:block>
6119
6127
 
6120
6128
 
6121
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
6129
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
6122
6130
 
6123
6131
 
6124
6132
 
@@ -6132,7 +6140,7 @@
6132
6140
  <xsl:call-template name="add-zero-spaces-java">
6133
6141
  <xsl:with-param name="text" select="$text"/>
6134
6142
  </xsl:call-template>
6135
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
6143
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
6136
6144
  <xsl:if test="normalize-space() != ''">
6137
6145
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
6138
6146
  <xsl:apply-templates/>
@@ -6140,10 +6148,10 @@
6140
6148
  </xsl:if>
6141
6149
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
6142
6150
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
6143
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
6144
- <xsl:apply-templates/>
6151
+ <xsl:apply-templates select="*[local-name()='name']"/>
6152
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6145
6153
  </fo:block>
6146
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
6154
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
6147
6155
  <xsl:if test="normalize-space() != ''">
6148
6156
  <fo:block xsl:use-attribute-sets="permission-name-style">
6149
6157
  <xsl:apply-templates/>
@@ -6156,13 +6164,13 @@
6156
6164
  </fo:block>
6157
6165
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
6158
6166
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
6159
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
6160
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
6161
- <xsl:apply-templates select="@obligation" mode="presentation"/>
6162
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
6163
- <xsl:apply-templates/>
6167
+ <xsl:apply-templates select="*[local-name()='name']"/>
6168
+ <xsl:apply-templates select="*[local-name()='label']"/>
6169
+ <xsl:apply-templates select="@obligation"/>
6170
+ <xsl:apply-templates select="*[local-name()='subject']"/>
6171
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
6164
6172
  </fo:block>
6165
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
6173
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
6166
6174
  <xsl:if test="normalize-space() != ''">
6167
6175
  <fo:block xsl:use-attribute-sets="requirement-name-style">
6168
6176
 
@@ -6170,20 +6178,24 @@
6170
6178
 
6171
6179
  </fo:block>
6172
6180
  </xsl:if>
6173
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
6181
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
6174
6182
  <fo:block xsl:use-attribute-sets="requirement-label-style">
6175
6183
  <xsl:apply-templates/>
6176
6184
  </fo:block>
6177
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
6185
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
6178
6186
  <fo:block>
6179
6187
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
6180
6188
  </fo:block>
6189
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
6190
+ <fo:block xsl:use-attribute-sets="subject-style">
6191
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
6192
+ </fo:block>
6181
6193
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
6182
6194
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
6183
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
6184
- <xsl:apply-templates/>
6195
+ <xsl:apply-templates select="*[local-name()='name']"/>
6196
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6185
6197
  </fo:block>
6186
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
6198
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
6187
6199
  <xsl:if test="normalize-space() != ''">
6188
6200
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
6189
6201
  <xsl:apply-templates/>
@@ -6194,10 +6206,6 @@
6194
6206
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
6195
6207
  <xsl:apply-templates/>
6196
6208
  </fo:block>
6197
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
6198
- <fo:block xsl:use-attribute-sets="subject-style">
6199
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
6200
- </fo:block>
6201
6209
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
6202
6210
  <fo:block xsl:use-attribute-sets="subject-style">
6203
6211
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -6241,8 +6249,6 @@
6241
6249
  </xsl:variable>
6242
6250
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
6243
6251
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
6244
- <!-- <fo:table-column column-width="35mm"/>
6245
- <fo:table-column column-width="115mm"/> -->
6246
6252
  <fo:table-column column-width="30%"/>
6247
6253
  <fo:table-column column-width="70%"/>
6248
6254
  </xsl:if>
@@ -6252,7 +6258,7 @@
6252
6258
  <xsl:if test=".//*[local-name() = 'fn']">
6253
6259
  <xsl:for-each select="*[local-name() = 'tbody']">
6254
6260
  <fo:block font-size="90%" border-bottom="1pt solid black">
6255
- <xsl:call-template name="fn_display"/>
6261
+ <xsl:call-template name="table_fn_display"/>
6256
6262
  </fo:block>
6257
6263
  </xsl:for-each>
6258
6264
  </xsl:if>
@@ -6269,7 +6275,6 @@
6269
6275
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
6270
6276
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
6271
6277
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
6272
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
6273
6278
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
6274
6279
  </xsl:if>
6275
6280
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -6282,34 +6287,11 @@
6282
6287
  </fo:table-row>
6283
6288
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
6284
6289
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
6285
- <xsl:attribute name="text-align">
6286
- <xsl:choose>
6287
- <xsl:when test="@align">
6288
- <xsl:value-of select="@align"/>
6289
- </xsl:when>
6290
- <xsl:otherwise>left</xsl:otherwise>
6291
- </xsl:choose>
6292
- </xsl:attribute>
6293
- <xsl:if test="@colspan">
6294
- <xsl:attribute name="number-columns-spanned">
6295
- <xsl:value-of select="@colspan"/>
6296
- </xsl:attribute>
6297
- </xsl:if>
6298
- <xsl:if test="@rowspan">
6299
- <xsl:attribute name="number-rows-spanned">
6300
- <xsl:value-of select="@rowspan"/>
6301
- </xsl:attribute>
6302
- </xsl:if>
6303
- <xsl:call-template name="display-align"/>
6290
+ <xsl:call-template name="setTextAlignment">
6291
+ <xsl:with-param name="default">left</xsl:with-param>
6292
+ </xsl:call-template>
6304
6293
 
6305
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
6306
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6307
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
6308
- </xsl:if>
6309
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
6310
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6311
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
6312
- </xsl:if> -->
6294
+ <xsl:call-template name="setTableCellAttributes"/>
6313
6295
 
6314
6296
  <fo:block>
6315
6297
  <xsl:apply-templates/>
@@ -6321,37 +6303,15 @@
6321
6303
  <xsl:attribute name="padding">0mm</xsl:attribute>
6322
6304
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
6323
6305
  </xsl:if>
6324
- <xsl:attribute name="text-align">
6325
- <xsl:choose>
6326
- <xsl:when test="@align">
6327
- <xsl:value-of select="@align"/>
6328
- </xsl:when>
6329
- <xsl:otherwise>left</xsl:otherwise>
6330
- </xsl:choose>
6331
- </xsl:attribute>
6306
+ <xsl:call-template name="setTextAlignment">
6307
+ <xsl:with-param name="default">left</xsl:with-param>
6308
+ </xsl:call-template>
6309
+
6332
6310
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
6333
6311
  <xsl:attribute name="font-weight">bold</xsl:attribute>
6334
6312
  </xsl:if>
6335
- <xsl:if test="@colspan">
6336
- <xsl:attribute name="number-columns-spanned">
6337
- <xsl:value-of select="@colspan"/>
6338
- </xsl:attribute>
6339
- </xsl:if>
6340
- <xsl:if test="@rowspan">
6341
- <xsl:attribute name="number-rows-spanned">
6342
- <xsl:value-of select="@rowspan"/>
6343
- </xsl:attribute>
6344
- </xsl:if>
6345
- <xsl:call-template name="display-align"/>
6346
6313
 
6347
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
6348
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
6349
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
6350
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
6351
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
6352
- </xsl:if>
6353
- </xsl:if> -->
6354
- <!-- 2nd line and below -->
6314
+ <xsl:call-template name="setTableCellAttributes"/>
6355
6315
 
6356
6316
  <fo:block>
6357
6317
  <xsl:apply-templates/>
@@ -6363,15 +6323,15 @@
6363
6323
  <xsl:apply-templates/>
6364
6324
  </fo:block>
6365
6325
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
6366
- <fo:block> <!-- margin-bottom="10pt" -->
6326
+ <fo:block>
6367
6327
  <xsl:apply-templates/>
6368
6328
  </fo:block>
6369
6329
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
6370
6330
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
6371
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
6372
- <xsl:apply-templates/>
6331
+ <xsl:apply-templates select="*[local-name()='name']"/>
6332
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6373
6333
  </fo:block>
6374
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
6334
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
6375
6335
  <xsl:if test="normalize-space() != ''">
6376
6336
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
6377
6337
  <xsl:apply-templates/>
@@ -6397,9 +6357,7 @@
6397
6357
 
6398
6358
  <xsl:variable name="fo_element">
6399
6359
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
6400
- block
6401
-
6402
-
6360
+ block
6403
6361
  </xsl:variable>
6404
6362
 
6405
6363
  <!-- display 'EXAMPLE' -->
@@ -6472,6 +6430,8 @@
6472
6430
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
6473
6431
  <fo:block xsl:use-attribute-sets="termsource-style">
6474
6432
 
6433
+
6434
+
6475
6435
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
6476
6436
  <xsl:variable name="termsource_text">
6477
6437
  <xsl:apply-templates/>
@@ -6509,9 +6469,7 @@
6509
6469
  <xsl:value-of select="."/>
6510
6470
  </xsl:if>
6511
6471
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
6512
- <fo:inline>
6513
-
6514
-
6472
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
6515
6473
  <xsl:value-of select="."/>
6516
6474
  </fo:inline>
6517
6475
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -6554,7 +6512,6 @@
6554
6512
  <fo:block-container margin-left="0mm">
6555
6513
 
6556
6514
  <fo:block xsl:use-attribute-sets="quote-style">
6557
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
6558
6515
 
6559
6516
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
6560
6517
  </fo:block>
@@ -6597,15 +6554,13 @@
6597
6554
  </xsl:variable>
6598
6555
 
6599
6556
  <xsl:choose>
6600
- <xsl:when test="normalize-space($bibitemid) != ''">
6557
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
6601
6558
  <fo:inline xsl:use-attribute-sets="eref-style">
6602
6559
  <xsl:if test="@type = 'footnote'">
6603
-
6604
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6605
- <xsl:attribute name="font-size">80%</xsl:attribute>
6606
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6607
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6608
-
6560
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
6561
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
6562
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
6563
+ <xsl:attribute name="font-size">80%</xsl:attribute>
6609
6564
 
6610
6565
  </xsl:if>
6611
6566
 
@@ -6622,7 +6577,6 @@
6622
6577
 
6623
6578
 
6624
6579
 
6625
-
6626
6580
  </xsl:if>
6627
6581
 
6628
6582
 
@@ -6683,8 +6637,6 @@
6683
6637
  </xsl:choose>
6684
6638
  </xsl:variable>
6685
6639
 
6686
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
6687
-
6688
6640
  <xsl:choose>
6689
6641
  <xsl:when test="$lang = 'zh'">
6690
6642
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -6740,7 +6692,6 @@
6740
6692
  <xsl:apply-templates/>
6741
6693
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
6742
6694
  <fo:inline> <xsl:apply-templates/></fo:inline>
6743
- <!-- <fo:block>&#xA0;</fo:block> -->
6744
6695
  <fo:block/>
6745
6696
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
6746
6697
 
@@ -6787,11 +6738,6 @@
6787
6738
  <xsl:apply-templates/>
6788
6739
  </fo:block>
6789
6740
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
6790
- <fo:block id="{@id}">
6791
- <xsl:apply-templates/>
6792
- </fo:block>
6793
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
6794
-
6795
6741
  <fo:block id="{@id}">
6796
6742
  <xsl:apply-templates/>
6797
6743
  </fo:block>
@@ -7057,32 +7003,124 @@
7057
7003
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
7058
7004
  <fo:block><xsl:apply-templates/></fo:block>
7059
7005
  </fo:table-cell>
7060
- </xsl:template><xsl:template name="processBibitem">
7061
-
7062
-
7063
-
7064
-
7006
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
7065
7007
 
7066
7008
 
7067
7009
 
7010
+ <fo:block id="{@id}">
7011
+ <xsl:apply-templates/>
7012
+ </fo:block>
7013
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
7014
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
7015
+
7016
+ <fo:block break-after="page"/>
7017
+
7018
+ </xsl:if>
7068
7019
 
7020
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
7021
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
7022
+ <fo:block break-after="page"/>
7023
+ </xsl:if>
7024
+ </xsl:if> -->
7069
7025
 
7026
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
7027
+ <xsl:apply-templates/>
7028
+ </fo:block>
7070
7029
 
7071
7030
 
7072
-
7073
7031
 
7074
7032
 
7075
-
7033
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
7034
+ <xsl:call-template name="bibitem"/>
7035
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
7076
7036
 
7037
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
7038
+ <xsl:call-template name="processBibitem"/>
7039
+ </fo:block>
7040
+
7077
7041
 
7042
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
7078
7043
 
7079
- <!-- end MPFD bibitem processing -->
7080
7044
 
7081
- <!-- start M3D bibitem processing -->
7045
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
7046
+ <xsl:call-template name="processBibitem"/>
7047
+ </fo:block>
7048
+
7082
7049
 
7050
+ </xsl:template><xsl:template name="processBibitem">
7083
7051
 
7084
-
7085
7052
 
7053
+
7054
+ <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
7055
+ <xsl:if test="$doctype = 'implementers-guide'">
7056
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7057
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
7058
+ </xsl:if>
7059
+
7060
+ <xsl:variable name="bibitem_label">
7061
+ <xsl:choose>
7062
+ <xsl:when test="itu:docidentifier[@type = 'metanorma']">
7063
+ <xsl:value-of select="itu:docidentifier[@type = 'metanorma']"/>
7064
+ </xsl:when>
7065
+ <xsl:otherwise>
7066
+ <fo:inline padding-right="5mm">
7067
+ <xsl:text>[</xsl:text>
7068
+ <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
7069
+ <xsl:text>] </xsl:text>
7070
+ </fo:inline>
7071
+ </xsl:otherwise>
7072
+ </xsl:choose>
7073
+ </xsl:variable>
7074
+
7075
+ <xsl:variable name="bibitem_body">
7076
+ <xsl:text> </xsl:text>
7077
+ <xsl:choose>
7078
+ <xsl:when test="itu:docidentifier[@type = 'metanorma']">
7079
+ <xsl:if test="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]">
7080
+ <xsl:value-of select="itu:docidentifier[not(@type) or not(@type = 'metanorma' or @type = 'metanorma-ordinal')]"/>
7081
+ <xsl:text>, </xsl:text>
7082
+ </xsl:if>
7083
+ </xsl:when>
7084
+ <xsl:otherwise>
7085
+ <xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
7086
+ <xsl:if test="itu:title">
7087
+ <xsl:text>, </xsl:text>
7088
+ </xsl:if>
7089
+ </xsl:otherwise>
7090
+ </xsl:choose>
7091
+ <xsl:if test="itu:title">
7092
+ <xsl:choose>
7093
+ <xsl:when test="itu:title[@type = 'main' and @language = 'en']">
7094
+ <xsl:apply-templates select="itu:title[@type = 'main' and @language = 'en']"/>
7095
+ </xsl:when>
7096
+ <xsl:otherwise>
7097
+ <xsl:apply-templates select="itu:title"/>
7098
+ </xsl:otherwise>
7099
+ </xsl:choose>
7100
+ </xsl:if>
7101
+ <xsl:if test="itu:formattedref and not(itu:docidentifier[@type = 'metanorma'])">, </xsl:if>
7102
+ <xsl:apply-templates select="itu:formattedref"/>
7103
+ </xsl:variable>
7104
+
7105
+ <xsl:choose>
7106
+ <xsl:when test="$doctype = 'implementers-guide'">
7107
+ <fo:table width="100%" table-layout="fixed">
7108
+ <fo:table-column column-width="20%"/>
7109
+ <fo:table-column column-width="80%"/>
7110
+ <fo:table-body>
7111
+ <fo:table-row>
7112
+ <fo:table-cell><fo:block><xsl:copy-of select="$bibitem_label"/></fo:block></fo:table-cell>
7113
+ <fo:table-cell><fo:block><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
7114
+ </fo:table-row>
7115
+ </fo:table-body>
7116
+ </fo:table>
7117
+ </xsl:when>
7118
+ <xsl:otherwise>
7119
+ <xsl:copy-of select="$bibitem_label"/>
7120
+ <xsl:copy-of select="$bibitem_body"/>
7121
+ </xsl:otherwise>
7122
+ </xsl:choose>
7123
+
7086
7124
  </xsl:template><xsl:template name="processBibitemDocId">
7087
7125
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
7088
7126
  <xsl:choose>
@@ -7139,6 +7177,48 @@
7139
7177
  <xsl:value-of select="substring(.,1,1)"/>
7140
7178
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
7141
7179
  <fo:inline><xsl:apply-templates/></fo:inline>
7180
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
7181
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
7182
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
7183
+ <xsl:apply-templates/>
7184
+ </fo:inline>
7185
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
7186
+ <fo:footnote>
7187
+ <xsl:variable name="number">
7188
+
7189
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
7190
+
7191
+ </xsl:variable>
7192
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
7193
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
7194
+ <xsl:value-of select="$number"/>
7195
+
7196
+ </fo:basic-link>
7197
+ </fo:inline>
7198
+ <fo:footnote-body>
7199
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
7200
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
7201
+ <xsl:value-of select="$number"/>
7202
+
7203
+ </fo:inline>
7204
+ <xsl:apply-templates/>
7205
+ </fo:block>
7206
+ </fo:footnote-body>
7207
+ </fo:footnote>
7208
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
7209
+ <xsl:text> edition </xsl:text>
7210
+ <xsl:value-of select="."/>
7211
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
7212
+ <xsl:text> (</xsl:text>
7213
+ <fo:inline xsl:use-attribute-sets="link-style">
7214
+ <fo:basic-link external-destination="." fox:alt-text=".">
7215
+ <xsl:value-of select="."/>
7216
+ </fo:basic-link>
7217
+ </fo:inline>
7218
+ <xsl:text>)</xsl:text>
7219
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
7220
+
7221
+ <xsl:apply-templates/>
7142
7222
  </xsl:template><xsl:template match="*[local-name() = 'form']">
7143
7223
  <fo:block>
7144
7224
  <xsl:apply-templates/>
@@ -7211,24 +7291,7 @@
7211
7291
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
7212
7292
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
7213
7293
  <xsl:otherwise><!-- default value -->
7214
-
7215
-
7216
-
7217
-
7218
-
7219
-
7220
-
7221
7294
  2
7222
-
7223
-
7224
-
7225
-
7226
-
7227
-
7228
-
7229
-
7230
-
7231
-
7232
7295
  </xsl:otherwise>
7233
7296
  </xsl:choose>
7234
7297
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -7326,6 +7389,62 @@
7326
7389
  <xsl:copy-of select="."/>
7327
7390
  </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
7328
7391
  <xsl:call-template name="title"/>
7392
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
7393
+
7394
+
7395
+
7396
+
7397
+
7398
+ <!-- text in the box -->
7399
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
7400
+
7401
+
7402
+
7403
+
7404
+
7405
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
7406
+
7407
+
7408
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
7409
+ <xsl:call-template name="displayAdmonitionName"/>
7410
+ </fo:block>
7411
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
7412
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7413
+ </fo:block>
7414
+
7415
+ </fo:block-container>
7416
+
7417
+ </fo:block-container>
7418
+
7419
+ </xsl:template><xsl:template name="displayAdmonitionName">
7420
+
7421
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7422
+ <xsl:if test="not(*[local-name() = 'name'])">
7423
+ <xsl:apply-templates select="@type"/>
7424
+ </xsl:if>
7425
+
7426
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
7427
+ <xsl:apply-templates/>
7428
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
7429
+ <xsl:variable name="admonition_type_">
7430
+ <xsl:call-template name="getLocalizedString">
7431
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
7432
+ </xsl:call-template>
7433
+ </xsl:variable>
7434
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
7435
+ <xsl:value-of select="$admonition_type"/>
7436
+ <xsl:if test="$admonition_type = ''">
7437
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
7438
+ </xsl:if>
7439
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
7440
+
7441
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
7442
+
7443
+
7444
+
7445
+ <xsl:apply-templates/>
7446
+ </fo:block>
7447
+
7329
7448
  </xsl:template><xsl:template name="convertDate">
7330
7449
  <xsl:param name="date"/>
7331
7450
  <xsl:param name="format" select="'short'"/>
@@ -7334,78 +7453,39 @@
7334
7453
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
7335
7454
  <xsl:variable name="monthStr">
7336
7455
  <xsl:choose>
7337
- <xsl:when test="$month = '01'">January</xsl:when>
7338
- <xsl:when test="$month = '02'">February</xsl:when>
7339
- <xsl:when test="$month = '03'">March</xsl:when>
7340
- <xsl:when test="$month = '04'">April</xsl:when>
7341
- <xsl:when test="$month = '05'">May</xsl:when>
7342
- <xsl:when test="$month = '06'">June</xsl:when>
7343
- <xsl:when test="$month = '07'">July</xsl:when>
7344
- <xsl:when test="$month = '08'">August</xsl:when>
7345
- <xsl:when test="$month = '09'">September</xsl:when>
7346
- <xsl:when test="$month = '10'">October</xsl:when>
7347
- <xsl:when test="$month = '11'">November</xsl:when>
7348
- <xsl:when test="$month = '12'">December</xsl:when>
7349
- </xsl:choose>
7350
- </xsl:variable>
7351
- <xsl:variable name="result">
7352
- <xsl:choose>
7353
- <xsl:when test="$format = 'ddMMyyyy'">
7354
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7355
- <xsl:text> </xsl:text>
7356
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
7357
- </xsl:when>
7358
- <xsl:when test="$format = 'ddMM'">
7359
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7360
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
7361
- </xsl:when>
7362
- <xsl:when test="$format = 'short' or $day = ''">
7363
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
7364
- </xsl:when>
7365
- <xsl:otherwise>
7366
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
7367
- </xsl:otherwise>
7456
+ <xsl:when test="$month = '01'">january</xsl:when>
7457
+ <xsl:when test="$month = '02'">february</xsl:when>
7458
+ <xsl:when test="$month = '03'">march</xsl:when>
7459
+ <xsl:when test="$month = '04'">april</xsl:when>
7460
+ <xsl:when test="$month = '05'">may</xsl:when>
7461
+ <xsl:when test="$month = '06'">june</xsl:when>
7462
+ <xsl:when test="$month = '07'">july</xsl:when>
7463
+ <xsl:when test="$month = '08'">august</xsl:when>
7464
+ <xsl:when test="$month = '09'">september</xsl:when>
7465
+ <xsl:when test="$month = '10'">october</xsl:when>
7466
+ <xsl:when test="$month = '11'">november</xsl:when>
7467
+ <xsl:when test="$month = '12'">december</xsl:when>
7368
7468
  </xsl:choose>
7369
7469
  </xsl:variable>
7370
- <xsl:value-of select="$result"/>
7371
- </xsl:template><xsl:template name="convertDateLocalized">
7372
- <xsl:param name="date"/>
7373
- <xsl:param name="format" select="'short'"/>
7374
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
7375
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
7376
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
7377
- <xsl:variable name="monthStr">
7378
- <xsl:choose>
7379
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
7380
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
7381
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
7382
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
7383
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
7384
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
7385
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
7386
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
7387
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
7388
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
7389
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
7390
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
7391
- </xsl:choose>
7470
+ <xsl:variable name="monthStr_localized">
7471
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
7392
7472
  </xsl:variable>
7393
7473
  <xsl:variable name="result">
7394
7474
  <xsl:choose>
7395
7475
  <xsl:when test="$format = 'ddMMyyyy'">
7396
7476
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7397
7477
  <xsl:text> </xsl:text>
7398
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
7478
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
7399
7479
  </xsl:when>
7400
7480
  <xsl:when test="$format = 'ddMM'">
7401
7481
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7402
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
7482
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
7403
7483
  </xsl:when>
7404
7484
  <xsl:when test="$format = 'short' or $day = ''">
7405
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
7485
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
7406
7486
  </xsl:when>
7407
7487
  <xsl:otherwise>
7408
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
7488
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
7409
7489
  </xsl:otherwise>
7410
7490
  </xsl:choose>
7411
7491
  </xsl:variable>
@@ -7458,13 +7538,8 @@
7458
7538
  <xsl:variable name="title">
7459
7539
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
7460
7540
 
7461
-
7462
-
7463
-
7464
-
7465
-
7466
- <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
7467
-
7541
+ <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
7542
+
7468
7543
  </xsl:for-each>
7469
7544
  </xsl:variable>
7470
7545
  <xsl:choose>
@@ -7479,21 +7554,18 @@
7479
7554
  <dc:creator>
7480
7555
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
7481
7556
 
7482
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
7483
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
7484
- <xsl:if test="position() != last()">; </xsl:if>
7485
- </xsl:for-each>
7486
-
7487
-
7488
-
7557
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
7558
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
7559
+ <xsl:if test="position() != last()">; </xsl:if>
7560
+ </xsl:for-each>
7561
+
7489
7562
  </xsl:for-each>
7490
7563
  </dc:creator>
7491
7564
  <dc:description>
7492
7565
  <xsl:variable name="abstract">
7493
7566
 
7494
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
7495
-
7496
-
7567
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
7568
+
7497
7569
  </xsl:variable>
7498
7570
  <xsl:value-of select="normalize-space($abstract)"/>
7499
7571
  </dc:description>
@@ -7513,7 +7585,6 @@
7513
7585
  <xsl:value-of select="../@id"/>
7514
7586
  </xsl:when>
7515
7587
  <xsl:otherwise>
7516
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
7517
7588
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
7518
7589
  </xsl:otherwise>
7519
7590
  </xsl:choose>
@@ -7539,9 +7610,6 @@
7539
7610
  <xsl:when test="ancestor::*[local-name() = 'preface']">
7540
7611
  <xsl:value-of select="$level_total - 2"/>
7541
7612
  </xsl:when>
7542
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
7543
- <xsl:value-of select="$level_total - 1"/>
7544
- </xsl:when> -->
7545
7613
  <xsl:when test="ancestor::*[local-name() = 'sections']">
7546
7614
  <xsl:value-of select="$level_total - 1"/>
7547
7615
  </xsl:when>
@@ -7731,7 +7799,6 @@
7731
7799
  <xsl:value-of select="$key_"/>
7732
7800
  </xsl:otherwise>
7733
7801
  </xsl:choose>
7734
-
7735
7802
  </xsl:template><xsl:template name="setTrackChangesStyles">
7736
7803
  <xsl:param name="isAdded"/>
7737
7804
  <xsl:param name="isDeleted"/>
@@ -7754,7 +7821,6 @@
7754
7821
  <xsl:if test="local-name() = 'table'">
7755
7822
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
7756
7823
  </xsl:if>
7757
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
7758
7824
  <xsl:attribute name="padding">2mm</xsl:attribute>
7759
7825
  </xsl:if>
7760
7826
  </xsl:otherwise>
@@ -7774,15 +7840,18 @@
7774
7840
  </xsl:choose>
7775
7841
  </xsl:template><xsl:template name="setTextAlignment">
7776
7842
  <xsl:param name="default">left</xsl:param>
7843
+ <xsl:variable name="align" select="normalize-space(@align)"/>
7777
7844
  <xsl:attribute name="text-align">
7778
7845
  <xsl:choose>
7779
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
7846
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
7847
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
7848
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
7780
7849
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
7781
7850
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
7782
7851
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
7783
7852
  </xsl:choose>
7784
7853
  </xsl:attribute>
7785
- <xsl:if test="@align = 'indent'">
7854
+ <xsl:if test="$align = 'indent'">
7786
7855
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
7787
7856
  </xsl:if>
7788
7857
  </xsl:template><xsl:template name="number-to-words">