metanorma-itu 1.4.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +4 -32
- data/.gitignore +3 -0
- data/bin/console +1 -1
- data/lib/isodoc/itu/cleanup.rb +1 -1
- data/lib/isodoc/itu/html/_coverpage.css +9 -0
- data/lib/isodoc/itu/html/htmlstyle.css +31 -13
- data/lib/isodoc/itu/html/htmlstyle.scss +7 -7
- data/lib/isodoc/itu/html/itu.css +0 -1
- data/lib/isodoc/itu/html/itu.scss +0 -1
- data/lib/isodoc/itu/html/scripts.html +0 -1
- data/lib/isodoc/itu/html/wordstyle.css +30 -18
- data/lib/isodoc/itu/html/wordstyle.scss +30 -18
- data/lib/isodoc/itu/itu.implementers-guide.xsl +504 -262
- data/lib/isodoc/itu/itu.in-force.xsl +504 -262
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +504 -262
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +504 -262
- data/lib/isodoc/itu/itu.recommendation.xsl +504 -262
- data/lib/isodoc/itu/itu.resolution.xsl +504 -262
- data/lib/isodoc/itu/itu.service-publication.xsl +504 -262
- data/lib/isodoc/itu/itu.technical-paper.xsl +504 -262
- data/lib/isodoc/itu/itu.technical-report.xsl +504 -262
- data/lib/isodoc/itu/ref.rb +2 -2
- data/lib/{asciidoctor → metanorma}/itu/basicdoc.rng +0 -0
- data/lib/{asciidoctor → metanorma}/itu/biblio.rng +0 -0
- data/lib/{asciidoctor → metanorma}/itu/boilerplate.xml +0 -0
- data/lib/{asciidoctor → metanorma}/itu/cleanup.rb +1 -1
- data/lib/{asciidoctor → metanorma}/itu/converter.rb +6 -9
- data/lib/{asciidoctor → metanorma}/itu/front.rb +2 -2
- data/lib/{asciidoctor → metanorma}/itu/front_id.rb +1 -1
- data/lib/{asciidoctor → metanorma}/itu/isodoc.rng +90 -18
- data/lib/{asciidoctor → metanorma}/itu/itu.rng +1 -0
- data/lib/{asciidoctor → metanorma}/itu/reqt.rng +0 -0
- data/lib/{asciidoctor → metanorma}/itu/validate.rb +2 -2
- data/lib/metanorma/itu/version.rb +1 -1
- data/lib/metanorma/itu.rb +1 -0
- data/lib/metanorma-itu.rb +0 -1
- data/metanorma-itu.gemspec +2 -2
- metadata +21 -22
- data/lib/asciidoctor/itu.rb +0 -6
@@ -9,7 +9,7 @@
|
|
9
9
|
|
10
10
|
|
11
11
|
|
12
|
-
<xsl:key name="kfn" match="
|
12
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
13
13
|
|
14
14
|
|
15
15
|
|
@@ -540,6 +540,7 @@
|
|
540
540
|
</fo:block>
|
541
541
|
</fo:block-container>
|
542
542
|
<fo:block-container font-family="Arial">
|
543
|
+
<xsl:variable name="annexid" select="normalize-space(/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid)"/>
|
543
544
|
<fo:table width="100%" table-layout="fixed"> <!-- 175.4mm-->
|
544
545
|
<fo:table-column column-width="25.2mm"/>
|
545
546
|
<fo:table-column column-width="44.4mm"/>
|
@@ -638,16 +639,15 @@
|
|
638
639
|
</fo:block-container>
|
639
640
|
</fo:table-cell>
|
640
641
|
<fo:table-cell text-align="right">
|
641
|
-
<xsl:if test="
|
642
|
+
<xsl:if test="$annexid != ''">
|
642
643
|
<fo:block-container>
|
643
|
-
|
644
|
+
<xsl:call-template name="setWritingMode"/>
|
644
645
|
<fo:block font-size="18pt" font-weight="bold">
|
645
|
-
|
646
|
-
<xsl:
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
<xsl:value-of select="$title-annex"/><xsl:value-of select="/itu:itu-standard/itu:bibdata/itu:ext/itu:structuredidentifier/itu:annexid"/>
|
646
|
+
<xsl:call-template name="getLocalizedString">
|
647
|
+
<xsl:with-param name="key">annex</xsl:with-param>
|
648
|
+
</xsl:call-template>
|
649
|
+
<xsl:text> </xsl:text>
|
650
|
+
<xsl:value-of select="$annexid"/>
|
651
651
|
</fo:block>
|
652
652
|
</fo:block-container>
|
653
653
|
</xsl:if>
|
@@ -888,13 +888,13 @@
|
|
888
888
|
</xsl:otherwise>
|
889
889
|
</xsl:choose>
|
890
890
|
|
891
|
-
<xsl:if test="
|
892
|
-
<xsl:
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
</xsl:
|
897
|
-
<xsl:
|
891
|
+
<xsl:if test="$annexid != ''">
|
892
|
+
<xsl:text> — </xsl:text>
|
893
|
+
<xsl:call-template name="getLocalizedString">
|
894
|
+
<xsl:with-param name="key">annex</xsl:with-param>
|
895
|
+
</xsl:call-template>
|
896
|
+
<xsl:text> </xsl:text>
|
897
|
+
<xsl:value-of select="$annexid"/>
|
898
898
|
</xsl:if>
|
899
899
|
</fo:block>
|
900
900
|
</fo:block-container>
|
@@ -963,12 +963,9 @@
|
|
963
963
|
<xsl:value-of select="$linebreak"/>
|
964
964
|
</fo:block>
|
965
965
|
<fo:block font-weight="bold" margin-top="18pt" margin-bottom="18pt">
|
966
|
-
<xsl:
|
967
|
-
<xsl:
|
968
|
-
|
969
|
-
</xsl:call-template>
|
970
|
-
</xsl:variable>
|
971
|
-
<xsl:value-of select="$title-keywords"/>
|
966
|
+
<xsl:call-template name="getLocalizedString">
|
967
|
+
<xsl:with-param name="key">keywords</xsl:with-param>
|
968
|
+
</xsl:call-template>
|
972
969
|
</fo:block>
|
973
970
|
<fo:block>
|
974
971
|
<xsl:call-template name="insertKeywords"/>
|
@@ -1015,7 +1012,7 @@
|
|
1015
1012
|
<xsl:if test="@level = 1">
|
1016
1013
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
1017
1014
|
</xsl:if>
|
1018
|
-
<xsl:if test="@level
|
1015
|
+
<xsl:if test="@level >= 2">
|
1019
1016
|
<xsl:attribute name="margin-top">4pt</xsl:attribute>
|
1020
1017
|
<!-- <xsl:attribute name="margin-left">12mm</xsl:attribute> -->
|
1021
1018
|
</xsl:if>
|
@@ -1031,15 +1028,15 @@
|
|
1031
1028
|
<xsl:otherwise>12mm</xsl:otherwise>
|
1032
1029
|
</xsl:choose>
|
1033
1030
|
</xsl:if>
|
1034
|
-
<xsl:if test="@level
|
1031
|
+
<xsl:if test="@level >= 2"><xsl:value-of select="(@level - 1) * 26"/>mm</xsl:if>
|
1035
1032
|
</xsl:when> <!-- -->
|
1036
1033
|
<xsl:otherwise>0mm</xsl:otherwise>
|
1037
1034
|
</xsl:choose>
|
1038
1035
|
</xsl:attribute>
|
1039
1036
|
<fo:list-item>
|
1040
1037
|
<fo:list-item-label end-indent="label-end()">
|
1041
|
-
<xsl:if test="@level
|
1042
|
-
<xsl:attribute name="start-indent"
|
1038
|
+
<xsl:if test="@level >= 2">
|
1039
|
+
<xsl:attribute name="start-indent"><xsl:value-of select="(@level - 1) * 12"/>mm</xsl:attribute>
|
1043
1040
|
</xsl:if>
|
1044
1041
|
<fo:block>
|
1045
1042
|
<xsl:if test="@section">
|
@@ -1258,7 +1255,7 @@
|
|
1258
1255
|
|
1259
1256
|
<xsl:variable name="display">
|
1260
1257
|
<xsl:choose>
|
1261
|
-
<xsl:when test="$level >
|
1258
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
1262
1259
|
<xsl:when test="$section = '' and $type = 'clause' and $level >= 2">false</xsl:when>
|
1263
1260
|
<xsl:otherwise>true</xsl:otherwise>
|
1264
1261
|
</xsl:choose>
|
@@ -1298,10 +1295,7 @@
|
|
1298
1295
|
<xsl:template match="itu:br" mode="contents_item" priority="2">
|
1299
1296
|
<fo:inline> </fo:inline>
|
1300
1297
|
</xsl:template>
|
1301
|
-
|
1302
1298
|
|
1303
|
-
|
1304
|
-
<xsl:template match="itu:bibitem" mode="contents"/>
|
1305
1299
|
|
1306
1300
|
<xsl:template match="itu:references" mode="contents">
|
1307
1301
|
<xsl:apply-templates mode="contents"/>
|
@@ -1512,7 +1506,7 @@
|
|
1512
1506
|
<xsl:otherwise>
|
1513
1507
|
<fo:inline padding-right="5mm">
|
1514
1508
|
<xsl:text>[</xsl:text>
|
1515
|
-
<xsl:value-of select="itu:docidentifier"/>
|
1509
|
+
<xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
|
1516
1510
|
<xsl:text>] </xsl:text>
|
1517
1511
|
</fo:inline>
|
1518
1512
|
</xsl:otherwise>
|
@@ -1523,13 +1517,13 @@
|
|
1523
1517
|
<xsl:text> </xsl:text>
|
1524
1518
|
<xsl:choose>
|
1525
1519
|
<xsl:when test="itu:docidentifier[@type = 'metanorma']">
|
1526
|
-
<xsl:if test="itu:docidentifier[not(@type) or not(@type = 'metanorma')]">
|
1527
|
-
<xsl:value-of select="itu:docidentifier[not(@type) or not(@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')]"/>
|
1528
1522
|
<xsl:text>, </xsl:text>
|
1529
1523
|
</xsl:if>
|
1530
1524
|
</xsl:when>
|
1531
1525
|
<xsl:otherwise>
|
1532
|
-
<xsl:value-of select="itu:docidentifier"/>
|
1526
|
+
<xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>
|
1533
1527
|
<xsl:if test="itu:title">
|
1534
1528
|
<xsl:text>, </xsl:text>
|
1535
1529
|
</xsl:if>
|
@@ -1636,7 +1630,7 @@
|
|
1636
1630
|
</fo:block>
|
1637
1631
|
</xsl:template>
|
1638
1632
|
|
1639
|
-
<xsl:template match="itu:title">
|
1633
|
+
<xsl:template match="itu:title" name="title">
|
1640
1634
|
|
1641
1635
|
<xsl:variable name="level">
|
1642
1636
|
<xsl:call-template name="getLevel"/>
|
@@ -1771,6 +1765,7 @@
|
|
1771
1765
|
<xsl:apply-templates select="ancestor::itu:term[1]/itu:name" mode="presentation"/>
|
1772
1766
|
</fo:inline>
|
1773
1767
|
<fo:inline font-weight="bold">
|
1768
|
+
<xsl:call-template name="setStyle_preferred"/>
|
1774
1769
|
<xsl:apply-templates/>
|
1775
1770
|
</fo:inline>
|
1776
1771
|
<xsl:if test="../itu:termsource/itu:origin">
|
@@ -1845,58 +1840,6 @@
|
|
1845
1840
|
</fo:footnote>
|
1846
1841
|
</xsl:template>
|
1847
1842
|
|
1848
|
-
<xsl:variable name="p_fn">
|
1849
|
-
<xsl:for-each select="//itu:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
1850
|
-
<!-- copy unique fn -->
|
1851
|
-
<fn gen_id="{generate-id(.)}">
|
1852
|
-
<xsl:copy-of select="@*"/>
|
1853
|
-
<xsl:copy-of select="node()"/>
|
1854
|
-
</fn>
|
1855
|
-
</xsl:for-each>
|
1856
|
-
</xsl:variable>
|
1857
|
-
|
1858
|
-
<xsl:template match="itu:fn[local-name(..) = 'p' or ancestor::*[local-name() = 'title']]" priority="2">
|
1859
|
-
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
1860
|
-
<xsl:variable name="reference" select="@reference"/>
|
1861
|
-
<xsl:variable name="number">
|
1862
|
-
<!-- <xsl:number level="any" count="itu:p/itu:fn"/> -->
|
1863
|
-
<xsl:value-of select="count(xalan:nodeset($p_fn)//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
1864
|
-
</xsl:variable>
|
1865
|
-
<xsl:variable name="count_title_footnotes" select="count(/itu:itu-standard/itu:bibdata/itu:note[@type='title-footnote'])"/>
|
1866
|
-
<xsl:variable name="count_bibitem_notes" select="count(//itu:bibitem/itu:note)"/>
|
1867
|
-
<xsl:variable name="current_fn_number" select="$number + $count_title_footnotes + $count_bibitem_notes"/>
|
1868
|
-
<xsl:choose>
|
1869
|
-
<xsl:when test="xalan:nodeset($p_fn)//fn[@gen_id = $gen_id]">
|
1870
|
-
<fo:footnote>
|
1871
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1872
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1873
|
-
<xsl:value-of select="$current_fn_number"/>
|
1874
|
-
</fo:basic-link>
|
1875
|
-
</fo:inline>
|
1876
|
-
<fo:footnote-body>
|
1877
|
-
<fo:block font-size="11pt" margin-bottom="12pt" text-align="justify" font-style="normal" font-weight="normal">
|
1878
|
-
<xsl:if test="$doctype = 'service-publication'">
|
1879
|
-
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
1880
|
-
</xsl:if>
|
1881
|
-
<fo:inline id="footnote_{@reference}_{$number}" font-size="85%" padding-right="2mm" keep-with-next.within-line="always" baseline-shift="30%">
|
1882
|
-
<xsl:value-of select="$current_fn_number"/>
|
1883
|
-
</fo:inline>
|
1884
|
-
<xsl:for-each select="itu:p">
|
1885
|
-
<xsl:apply-templates/>
|
1886
|
-
</xsl:for-each>
|
1887
|
-
</fo:block>
|
1888
|
-
</fo:footnote-body>
|
1889
|
-
</fo:footnote>
|
1890
|
-
</xsl:when>
|
1891
|
-
<xsl:otherwise>
|
1892
|
-
<fo:inline font-size="60%" keep-with-previous.within-line="always" vertical-align="super">
|
1893
|
-
<fo:basic-link internal-destination="footnote_{@reference}_{$number}" fox:alt-text="footnote {@reference} {$number}">
|
1894
|
-
<xsl:value-of select="$current_fn_number"/>
|
1895
|
-
</fo:basic-link>
|
1896
|
-
</fo:inline>
|
1897
|
-
</xsl:otherwise>
|
1898
|
-
</xsl:choose>
|
1899
|
-
</xsl:template>
|
1900
1843
|
|
1901
1844
|
|
1902
1845
|
<xsl:template match="*[local-name()='tt']" priority="2">
|
@@ -1929,9 +1872,9 @@
|
|
1929
1872
|
-->
|
1930
1873
|
<xsl:template match="itu:annex//itu:bibitem">
|
1931
1874
|
<fo:block margin-top="6pt" margin-left="10mm" text-indent="-10mm">
|
1932
|
-
<fo:inline id="{@id}" padding-right="5mm">[<xsl:value-of select="itu:docidentifier"/>]</fo:inline>
|
1875
|
+
<fo:inline id="{@id}" padding-right="5mm">[<xsl:value-of select="itu:docidentifier[not(@type = 'metanorma-ordinal')]"/>]</fo:inline>
|
1933
1876
|
<xsl:text> </xsl:text>
|
1934
|
-
<xsl:apply-templates select="itu:docidentifier" mode="content"/>
|
1877
|
+
<xsl:apply-templates select="itu:docidentifier[not(@type = 'metanorma-ordinal')]" mode="content"/>
|
1935
1878
|
<xsl:if test="node()[local-name(.) != current()/itu:docidentifier]">, </xsl:if>
|
1936
1879
|
<xsl:apply-templates/>
|
1937
1880
|
</fo:block>
|
@@ -2349,13 +2292,6 @@
|
|
2349
2292
|
|
2350
2293
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
|
2351
2294
|
|
2352
|
-
<title-annex lang="en">Annex </title-annex>
|
2353
|
-
<title-annex lang="fr">Annexe </title-annex>
|
2354
|
-
|
2355
|
-
<title-annex lang="zh">Annex </title-annex>
|
2356
|
-
|
2357
|
-
|
2358
|
-
|
2359
2295
|
<title-edition lang="en">
|
2360
2296
|
|
2361
2297
|
<xsl:text>Edition </xsl:text>
|
@@ -2369,33 +2305,18 @@
|
|
2369
2305
|
|
2370
2306
|
</title-edition>
|
2371
2307
|
|
2372
|
-
|
2308
|
+
|
2309
|
+
<!-- These titles of Table of contents renders different than determined in localized-strings -->
|
2373
2310
|
<title-toc lang="en">
|
2374
2311
|
|
2375
2312
|
|
2376
|
-
<xsl:text>Table of Contents</xsl:text>
|
2377
|
-
|
2378
2313
|
|
2379
2314
|
</title-toc>
|
2380
2315
|
<title-toc lang="fr">
|
2381
2316
|
|
2382
|
-
|
2383
|
-
|
2384
|
-
|
2385
|
-
</title-toc>
|
2386
|
-
|
2387
|
-
<title-toc lang="zh">Contents</title-toc>
|
2388
|
-
|
2389
|
-
|
2317
|
+
</title-toc>
|
2390
2318
|
|
2391
|
-
<title-page lang="en">Page</title-page>
|
2392
|
-
<title-page lang="fr">Page</title-page>
|
2393
2319
|
|
2394
|
-
<title-key lang="en">Key</title-key>
|
2395
|
-
<title-key lang="fr">Légende</title-key>
|
2396
|
-
|
2397
|
-
<title-where lang="en">where</title-where>
|
2398
|
-
<title-where lang="fr">où</title-where>
|
2399
2320
|
|
2400
2321
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
2401
2322
|
|
@@ -2418,25 +2339,6 @@
|
|
2418
2339
|
|
2419
2340
|
</title-subpart>
|
2420
2341
|
|
2421
|
-
<title-modified lang="en">modified</title-modified>
|
2422
|
-
<title-modified lang="fr">modifiée</title-modified>
|
2423
|
-
|
2424
|
-
<title-modified lang="zh">modified</title-modified>
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
<title-source lang="en">
|
2429
|
-
|
2430
|
-
<xsl:text>SOURCE</xsl:text>
|
2431
|
-
|
2432
|
-
|
2433
|
-
</title-source>
|
2434
|
-
|
2435
|
-
<title-keywords lang="en">Keywords</title-keywords>
|
2436
|
-
|
2437
|
-
<title-deprecated lang="en">DEPRECATED</title-deprecated>
|
2438
|
-
<title-deprecated lang="fr">DEPRECATED</title-deprecated>
|
2439
|
-
|
2440
2342
|
<title-list-tables lang="en">List of Tables</title-list-tables>
|
2441
2343
|
|
2442
2344
|
<title-list-figures lang="en">List of Figures</title-list-figures>
|
@@ -2445,37 +2347,8 @@
|
|
2445
2347
|
|
2446
2348
|
<title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
|
2447
2349
|
|
2448
|
-
<title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
|
2449
|
-
|
2450
|
-
<title-abstract lang="en">Abstract</title-abstract>
|
2451
|
-
|
2452
2350
|
<title-summary lang="en">Summary</title-summary>
|
2453
2351
|
|
2454
|
-
<title-in lang="en">in </title-in>
|
2455
|
-
|
2456
|
-
<title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
|
2457
|
-
<title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
|
2458
|
-
|
2459
|
-
<title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
|
2460
|
-
<title-completion-date lang="zh">本稿完成日期</title-completion-date>
|
2461
|
-
|
2462
|
-
<title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
|
2463
|
-
<title-issuance-date lang="zh"># 发布</title-issuance-date>
|
2464
|
-
|
2465
|
-
<title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
|
2466
|
-
<title-implementation-date lang="zh"># 实施</title-implementation-date>
|
2467
|
-
|
2468
|
-
<title-obligation-normative lang="en">normative</title-obligation-normative>
|
2469
|
-
<title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
|
2470
|
-
|
2471
|
-
<title-caution lang="en">CAUTION</title-caution>
|
2472
|
-
<title-caution lang="zh">注意</title-caution>
|
2473
|
-
|
2474
|
-
<title-warning lang="en">WARNING</title-warning>
|
2475
|
-
<title-warning lang="zh">警告</title-warning>
|
2476
|
-
|
2477
|
-
<title-amendment lang="en">AMENDMENT</title-amendment>
|
2478
|
-
|
2479
2352
|
<title-continued lang="en">(continued)</title-continued>
|
2480
2353
|
<title-continued lang="fr">(continué)</title-continued>
|
2481
2354
|
|
@@ -2575,6 +2448,7 @@
|
|
2575
2448
|
|
2576
2449
|
|
2577
2450
|
|
2451
|
+
|
2578
2452
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2579
2453
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2580
2454
|
|
@@ -2589,7 +2463,9 @@
|
|
2589
2463
|
|
2590
2464
|
|
2591
2465
|
|
2466
|
+
|
2592
2467
|
</xsl:attribute-set><xsl:attribute-set name="example-name-style">
|
2468
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2593
2469
|
|
2594
2470
|
|
2595
2471
|
|
@@ -2616,6 +2492,7 @@
|
|
2616
2492
|
|
2617
2493
|
|
2618
2494
|
|
2495
|
+
|
2619
2496
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2620
2497
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
2621
2498
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
@@ -2897,7 +2774,80 @@
|
|
2897
2774
|
|
2898
2775
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2899
2776
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2900
|
-
</xsl:attribute-set><xsl:
|
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
|
+
|
2782
|
+
|
2783
|
+
|
2784
|
+
|
2785
|
+
|
2786
|
+
|
2787
|
+
|
2788
|
+
|
2789
|
+
|
2790
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
2791
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2792
|
+
|
2793
|
+
|
2794
|
+
|
2795
|
+
|
2796
|
+
|
2797
|
+
|
2798
|
+
|
2799
|
+
|
2800
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
2801
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2802
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
2803
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
2804
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
2805
|
+
|
2806
|
+
|
2807
|
+
|
2808
|
+
|
2809
|
+
|
2810
|
+
|
2811
|
+
|
2812
|
+
|
2813
|
+
|
2814
|
+
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
2815
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2816
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
2817
|
+
|
2818
|
+
|
2819
|
+
|
2820
|
+
|
2821
|
+
|
2822
|
+
|
2823
|
+
|
2824
|
+
|
2825
|
+
|
2826
|
+
|
2827
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
2828
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2829
|
+
|
2830
|
+
|
2831
|
+
|
2832
|
+
|
2833
|
+
|
2834
|
+
|
2835
|
+
|
2836
|
+
|
2837
|
+
|
2838
|
+
<xsl:attribute name="font-size">85%</xsl:attribute>
|
2839
|
+
<xsl:attribute name="padding-right">2mm</xsl:attribute>
|
2840
|
+
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
2841
|
+
|
2842
|
+
|
2843
|
+
|
2844
|
+
|
2845
|
+
|
2846
|
+
|
2847
|
+
|
2848
|
+
|
2849
|
+
|
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">
|
2901
2851
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2902
2852
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
2903
2853
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -2922,7 +2872,8 @@
|
|
2922
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"/>
|
2923
2873
|
|
2924
2874
|
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
2925
|
-
|
2875
|
+
|
2876
|
+
<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']]">
|
2926
2877
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2927
2878
|
<xsl:apply-templates select="." mode="contents"/>
|
2928
2879
|
</xsl:for-each>
|
@@ -2932,7 +2883,7 @@
|
|
2932
2883
|
<xsl:apply-templates select="." mode="contents"/>
|
2933
2884
|
</xsl:for-each>
|
2934
2885
|
|
2935
|
-
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2886
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true') and not(*[local-name()='references'][@normative='true'])] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2936
2887
|
<xsl:sort select="@displayorder" data-type="number"/>
|
2937
2888
|
<xsl:apply-templates select="." mode="contents"/>
|
2938
2889
|
</xsl:for-each>
|
@@ -3895,6 +3846,106 @@
|
|
3895
3846
|
|
3896
3847
|
</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">
|
3897
3848
|
<xsl:apply-templates/>
|
3849
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
|
3850
|
+
|
3851
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
3852
|
+
<xsl:variable name="p_fn_">
|
3853
|
+
<xsl:choose>
|
3854
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
3855
|
+
<fn gen_id="{generate-id(.)}">
|
3856
|
+
<xsl:copy-of select="@*"/>
|
3857
|
+
<xsl:copy-of select="node()"/>
|
3858
|
+
</fn>
|
3859
|
+
</xsl:when>
|
3860
|
+
<xsl:otherwise>
|
3861
|
+
<!-- itetation for:
|
3862
|
+
footnotes in bibdata/title
|
3863
|
+
footnotes in bibliography
|
3864
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
3865
|
+
-->
|
3866
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
3867
|
+
<fn gen_id="{generate-id(.)}">
|
3868
|
+
<xsl:copy-of select="@*"/>
|
3869
|
+
<xsl:copy-of select="node()"/>
|
3870
|
+
</fn>
|
3871
|
+
</xsl:for-each>
|
3872
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
3873
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3874
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
3875
|
+
<!-- copy unique fn -->
|
3876
|
+
<fn gen_id="{generate-id(.)}">
|
3877
|
+
<xsl:copy-of select="@*"/>
|
3878
|
+
<xsl:copy-of select="node()"/>
|
3879
|
+
</fn>
|
3880
|
+
</xsl:for-each>
|
3881
|
+
</xsl:for-each>
|
3882
|
+
</xsl:otherwise>
|
3883
|
+
</xsl:choose>
|
3884
|
+
</xsl:variable>
|
3885
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3886
|
+
|
3887
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
3888
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
3889
|
+
<xsl:variable name="reference" select="@reference"/>
|
3890
|
+
<!-- fn sequence number in document -->
|
3891
|
+
<xsl:variable name="current_fn_number">
|
3892
|
+
<xsl:choose>
|
3893
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
3894
|
+
<xsl:otherwise>
|
3895
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
3896
|
+
</xsl:otherwise>
|
3897
|
+
</xsl:choose>
|
3898
|
+
</xsl:variable>
|
3899
|
+
<xsl:variable name="current_fn_number_text">
|
3900
|
+
<xsl:value-of select="$current_fn_number"/>
|
3901
|
+
|
3902
|
+
|
3903
|
+
</xsl:variable>
|
3904
|
+
|
3905
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
3906
|
+
<xsl:variable name="footnote_inline">
|
3907
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
3908
|
+
|
3909
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3910
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3911
|
+
</fo:basic-link>
|
3912
|
+
</fo:inline>
|
3913
|
+
</xsl:variable>
|
3914
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
3915
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3916
|
+
<xsl:choose>
|
3917
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3918
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3919
|
+
</xsl:when>
|
3920
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
3921
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
3922
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3923
|
+
<fo:footnote-body>
|
3924
|
+
|
3925
|
+
<fo:block-container text-indent="0" start-indent="0">
|
3926
|
+
|
3927
|
+
|
3928
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3929
|
+
|
3930
|
+
|
3931
|
+
<xsl:if test="$doctype = 'service-publication'">
|
3932
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
3933
|
+
</xsl:if>
|
3934
|
+
|
3935
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3936
|
+
|
3937
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3938
|
+
</fo:inline>
|
3939
|
+
<xsl:apply-templates/>
|
3940
|
+
</fo:block>
|
3941
|
+
</fo:block-container>
|
3942
|
+
</fo:footnote-body>
|
3943
|
+
</fo:footnote>
|
3944
|
+
</xsl:when>
|
3945
|
+
<xsl:otherwise>
|
3946
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3947
|
+
</xsl:otherwise>
|
3948
|
+
</xsl:choose>
|
3898
3949
|
</xsl:template><xsl:template name="fn_display">
|
3899
3950
|
<xsl:variable name="references">
|
3900
3951
|
|
@@ -4106,6 +4157,8 @@
|
|
4106
4157
|
|
4107
4158
|
</fo:basic-link>
|
4108
4159
|
</fo:inline>
|
4160
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
4161
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
4109
4162
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
4110
4163
|
<fo:inline>
|
4111
4164
|
<xsl:apply-templates/>
|
@@ -4154,12 +4207,9 @@
|
|
4154
4207
|
<fo:block margin-bottom="12pt" text-align="left">
|
4155
4208
|
|
4156
4209
|
<xsl:variable name="title-where">
|
4157
|
-
|
4158
|
-
|
4159
|
-
|
4160
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
4161
|
-
</xsl:call-template>
|
4162
|
-
|
4210
|
+
<xsl:call-template name="getLocalizedString">
|
4211
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
4212
|
+
</xsl:call-template>
|
4163
4213
|
</xsl:variable>
|
4164
4214
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
4165
4215
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -4177,12 +4227,9 @@
|
|
4177
4227
|
|
4178
4228
|
|
4179
4229
|
<xsl:variable name="title-where">
|
4180
|
-
|
4181
|
-
|
4182
|
-
|
4183
|
-
<xsl:with-param name="name" select="'title-where'"/>
|
4184
|
-
</xsl:call-template>
|
4185
|
-
|
4230
|
+
<xsl:call-template name="getLocalizedString">
|
4231
|
+
<xsl:with-param name="key">where</xsl:with-param>
|
4232
|
+
</xsl:call-template>
|
4186
4233
|
</xsl:variable>
|
4187
4234
|
<xsl:value-of select="$title-where"/>:
|
4188
4235
|
</fo:block>
|
@@ -4194,12 +4241,9 @@
|
|
4194
4241
|
|
4195
4242
|
|
4196
4243
|
<xsl:variable name="title-key">
|
4197
|
-
|
4198
|
-
|
4199
|
-
|
4200
|
-
<xsl:with-param name="name" select="'title-key'"/>
|
4201
|
-
</xsl:call-template>
|
4202
|
-
|
4244
|
+
<xsl:call-template name="getLocalizedString">
|
4245
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
4246
|
+
</xsl:call-template>
|
4203
4247
|
</xsl:variable>
|
4204
4248
|
<xsl:value-of select="$title-key"/>
|
4205
4249
|
</fo:block>
|
@@ -4482,6 +4526,7 @@
|
|
4482
4526
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
4483
4527
|
<xsl:apply-templates/>
|
4484
4528
|
</xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
|
4529
|
+
<xsl:apply-templates select="@language"/>
|
4485
4530
|
<xsl:apply-templates/>
|
4486
4531
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
4487
4532
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
@@ -4543,6 +4588,15 @@
|
|
4543
4588
|
</fo:inline>
|
4544
4589
|
</xsl:template><xsl:template match="*[local-name()='add']">
|
4545
4590
|
<xsl:choose>
|
4591
|
+
<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>
|
4599
|
+
</xsl:when>
|
4546
4600
|
<xsl:when test="@amendment">
|
4547
4601
|
<fo:inline>
|
4548
4602
|
<xsl:call-template name="insertTag">
|
@@ -4577,7 +4631,6 @@
|
|
4577
4631
|
</fo:inline>
|
4578
4632
|
</xsl:otherwise>
|
4579
4633
|
</xsl:choose>
|
4580
|
-
|
4581
4634
|
</xsl:template><xsl:template name="insertTag">
|
4582
4635
|
<xsl:param name="type"/>
|
4583
4636
|
<xsl:param name="kind"/>
|
@@ -4593,14 +4646,14 @@
|
|
4593
4646
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
4594
4647
|
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
4595
4648
|
<g>
|
4596
|
-
<xsl:if test="$type = 'closing'">
|
4649
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
4597
4650
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
4598
4651
|
</xsl:if>
|
4599
4652
|
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
4600
4653
|
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
4601
4654
|
</g>
|
4602
4655
|
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
4603
|
-
<xsl:if test="$type = 'closing'">
|
4656
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
4604
4657
|
<xsl:attribute name="x">25</xsl:attribute>
|
4605
4658
|
</xsl:if>
|
4606
4659
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
@@ -5093,9 +5146,9 @@
|
|
5093
5146
|
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
5094
5147
|
</xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
5095
5148
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
5096
|
-
<xsl:apply-templates select="*[local-name()='name']"
|
5149
|
+
<xsl:apply-templates select="*[local-name()='name']"/>
|
5097
5150
|
</fo:block>
|
5098
|
-
<xsl:apply-templates/>
|
5151
|
+
<xsl:apply-templates select="node()[not(local-name()='name')]"/>
|
5099
5152
|
</xsl:template><xsl:template match="*[local-name() = 'callout']">
|
5100
5153
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}"><<xsl:apply-templates/>></fo:basic-link>
|
5101
5154
|
</xsl:template><xsl:template match="*[local-name() = 'annotation']">
|
@@ -5115,22 +5168,6 @@
|
|
5115
5168
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
5116
5169
|
<xsl:apply-templates/>
|
5117
5170
|
</fo:inline>
|
5118
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5119
|
-
<xsl:variable name="title-modified">
|
5120
|
-
|
5121
|
-
|
5122
|
-
<xsl:call-template name="getTitle">
|
5123
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
5124
|
-
</xsl:call-template>
|
5125
|
-
|
5126
|
-
</xsl:variable>
|
5127
|
-
|
5128
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5129
|
-
<xsl:choose>
|
5130
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5131
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5132
|
-
</xsl:choose>
|
5133
|
-
<xsl:apply-templates/>
|
5134
5171
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
5135
5172
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5136
5173
|
|
@@ -5703,20 +5740,67 @@
|
|
5703
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">
|
5704
5741
|
<xsl:apply-templates mode="contents"/>
|
5705
5742
|
<xsl:text> </xsl:text>
|
5706
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
5743
|
+
</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">
|
5707
5744
|
<xsl:apply-templates mode="bookmarks"/>
|
5708
5745
|
<xsl:text> </xsl:text>
|
5709
5746
|
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
5710
5747
|
<xsl:value-of select="."/>
|
5711
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
5748
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement' or local-name() = 'sourcecode']/*[local-name() = 'name']//text()" mode="bookmarks" priority="2">
|
5712
5749
|
<xsl:value-of select="."/>
|
5713
5750
|
</xsl:template><xsl:template match="node()" mode="contents">
|
5714
5751
|
<xsl:apply-templates mode="contents"/>
|
5752
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
5753
|
+
<xsl:variable name="level">
|
5754
|
+
<xsl:call-template name="getLevel">
|
5755
|
+
<xsl:with-param name="depth" select="@depth"/>
|
5756
|
+
</xsl:call-template>
|
5757
|
+
</xsl:variable>
|
5758
|
+
|
5759
|
+
<xsl:variable name="section">
|
5760
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
5761
|
+
</xsl:variable>
|
5762
|
+
|
5763
|
+
<xsl:variable name="type">floating-title</xsl:variable>
|
5764
|
+
|
5765
|
+
<xsl:variable name="display">
|
5766
|
+
<xsl:choose>
|
5767
|
+
<xsl:when test="normalize-space(@id) = ''">false</xsl:when>
|
5768
|
+
<xsl:when test="$level <= $toc_level">true</xsl:when>
|
5769
|
+
<xsl:otherwise>false</xsl:otherwise>
|
5770
|
+
</xsl:choose>
|
5771
|
+
</xsl:variable>
|
5772
|
+
|
5773
|
+
<xsl:variable name="skip">false</xsl:variable>
|
5774
|
+
|
5775
|
+
<xsl:if test="$skip = 'false'">
|
5776
|
+
|
5777
|
+
<xsl:variable name="title">
|
5778
|
+
<xsl:choose>
|
5779
|
+
<xsl:when test="*[local-name() = 'tab']">
|
5780
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
5781
|
+
</xsl:when>
|
5782
|
+
<xsl:otherwise>
|
5783
|
+
<xsl:copy-of select="node()"/>
|
5784
|
+
</xsl:otherwise>
|
5785
|
+
</xsl:choose>
|
5786
|
+
</xsl:variable>
|
5787
|
+
|
5788
|
+
<xsl:variable name="root">
|
5789
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
|
5790
|
+
<xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
|
5791
|
+
</xsl:variable>
|
5792
|
+
|
5793
|
+
<item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
|
5794
|
+
<title>
|
5795
|
+
<xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
|
5796
|
+
</title>
|
5797
|
+
</item>
|
5798
|
+
</xsl:if>
|
5715
5799
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
5716
5800
|
<xsl:apply-templates mode="bookmarks"/>
|
5717
5801
|
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
5718
5802
|
<xsl:apply-templates select="."/>
|
5719
|
-
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5803
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
5720
5804
|
<xsl:apply-templates mode="bookmarks"/>
|
5721
5805
|
</xsl:template><xsl:template name="addBookmarks">
|
5722
5806
|
<xsl:param name="contents"/>
|
@@ -5887,7 +5971,10 @@
|
|
5887
5971
|
</fo:block>
|
5888
5972
|
</xsl:if>
|
5889
5973
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
5890
|
-
<xsl:
|
5974
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
5975
|
+
<xsl:apply-templates mode="contents_item">
|
5976
|
+
<xsl:with-param name="mode" select="$mode"/>
|
5977
|
+
</xsl:apply-templates>
|
5891
5978
|
<!-- <xsl:text> </xsl:text> -->
|
5892
5979
|
</xsl:template><xsl:template name="getSection">
|
5893
5980
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
@@ -5960,6 +6047,18 @@
|
|
5960
6047
|
<xsl:copy-of select="."/>
|
5961
6048
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
5962
6049
|
<xsl:text> </xsl:text>
|
6050
|
+
</xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
|
6051
|
+
<xsl:param name="mode">bookmarks</xsl:param>
|
6052
|
+
<xsl:apply-templates mode="contents_item">
|
6053
|
+
<xsl:with-param name="mode" select="$mode"/>
|
6054
|
+
</xsl:apply-templates>
|
6055
|
+
</xsl:template><xsl:template match="*[local-name() = 'add'][starts-with(text(), $ace_tag)]" mode="contents_item">
|
6056
|
+
<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>
|
5963
6062
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
5964
6063
|
|
5965
6064
|
<fo:block-container margin-left="0mm">
|
@@ -5978,6 +6077,8 @@
|
|
5978
6077
|
|
5979
6078
|
|
5980
6079
|
|
6080
|
+
|
6081
|
+
|
5981
6082
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
5982
6083
|
<xsl:variable name="_font-size">
|
5983
6084
|
|
@@ -6011,13 +6112,17 @@
|
|
6011
6112
|
|
6012
6113
|
|
6013
6114
|
|
6115
|
+
|
6116
|
+
|
6014
6117
|
<xsl:apply-templates/>
|
6015
6118
|
</fo:block>
|
6016
|
-
|
6119
|
+
|
6017
6120
|
|
6018
6121
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
6019
6122
|
|
6020
6123
|
|
6124
|
+
|
6125
|
+
|
6021
6126
|
</fo:block-container>
|
6022
6127
|
</fo:block-container>
|
6023
6128
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -6290,42 +6395,48 @@
|
|
6290
6395
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
6291
6396
|
|
6292
6397
|
|
6293
|
-
<xsl:
|
6294
|
-
|
6295
|
-
<xsl:variable name="element">
|
6398
|
+
<xsl:variable name="fo_element">
|
6399
|
+
<xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
|
6296
6400
|
block
|
6297
6401
|
|
6298
|
-
|
6402
|
+
|
6299
6403
|
</xsl:variable>
|
6300
6404
|
|
6405
|
+
<!-- display 'EXAMPLE' -->
|
6406
|
+
<xsl:apply-templates select="*[local-name()='name']">
|
6407
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
6408
|
+
</xsl:apply-templates>
|
6409
|
+
|
6301
6410
|
<xsl:choose>
|
6302
|
-
<xsl:when test="contains(normalize-space($
|
6303
|
-
<fo:block xsl:use-attribute-sets="example-body-style">
|
6304
|
-
<
|
6305
|
-
|
6411
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
6412
|
+
<fo:block-container xsl:use-attribute-sets="example-body-style">
|
6413
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6414
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
6415
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
6416
|
+
</xsl:apply-templates>
|
6417
|
+
</fo:block-container>
|
6418
|
+
</fo:block-container>
|
6306
6419
|
</xsl:when>
|
6307
6420
|
<xsl:otherwise>
|
6308
6421
|
<fo:inline>
|
6309
|
-
<xsl:apply-templates
|
6422
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]">
|
6423
|
+
<xsl:with-param name="fo_element" select="$fo_element"/>
|
6424
|
+
</xsl:apply-templates>
|
6310
6425
|
</fo:inline>
|
6311
6426
|
</xsl:otherwise>
|
6312
6427
|
</xsl:choose>
|
6313
6428
|
|
6314
6429
|
</fo:block>
|
6315
|
-
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"
|
6316
|
-
|
6317
|
-
|
6318
|
-
block
|
6319
|
-
|
6320
|
-
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
6321
|
-
</xsl:variable>
|
6430
|
+
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
|
6431
|
+
<xsl:param name="fo_element">block</xsl:param>
|
6432
|
+
|
6322
6433
|
<xsl:choose>
|
6323
6434
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
6324
6435
|
<fo:inline>
|
6325
6436
|
<xsl:apply-templates/>
|
6326
6437
|
</fo:inline>
|
6327
6438
|
</xsl:when>
|
6328
|
-
<xsl:when test="contains(normalize-space($
|
6439
|
+
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
6329
6440
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
6330
6441
|
<xsl:apply-templates/>
|
6331
6442
|
</fo:block>
|
@@ -6338,14 +6449,15 @@
|
|
6338
6449
|
</xsl:choose>
|
6339
6450
|
|
6340
6451
|
</xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
|
6452
|
+
<xsl:param name="fo_element">block</xsl:param>
|
6453
|
+
|
6341
6454
|
<xsl:variable name="num"><xsl:number/></xsl:variable>
|
6342
6455
|
<xsl:variable name="element">
|
6343
|
-
block
|
6344
|
-
|
6345
6456
|
|
6457
|
+
<xsl:value-of select="$fo_element"/>
|
6346
6458
|
</xsl:variable>
|
6347
6459
|
<xsl:choose>
|
6348
|
-
<xsl:when test="normalize-space($element)
|
6460
|
+
<xsl:when test="starts-with(normalize-space($element), 'block')">
|
6349
6461
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
6350
6462
|
|
6351
6463
|
<xsl:apply-templates/>
|
@@ -6364,45 +6476,66 @@
|
|
6364
6476
|
<xsl:variable name="termsource_text">
|
6365
6477
|
<xsl:apply-templates/>
|
6366
6478
|
</xsl:variable>
|
6367
|
-
|
6368
|
-
<xsl:choose>
|
6479
|
+
<xsl:copy-of select="$termsource_text"/>
|
6480
|
+
<!-- <xsl:choose>
|
6369
6481
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
6370
|
-
<!-- <xsl:apply-templates /> -->
|
6371
6482
|
<xsl:copy-of select="$termsource_text"/>
|
6372
6483
|
</xsl:when>
|
6373
6484
|
<xsl:otherwise>
|
6374
|
-
|
6375
|
-
|
6485
|
+
<xsl:if test="$namespace = 'bsi'">
|
6486
|
+
<xsl:choose>
|
6487
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
6488
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
6489
|
+
</xsl:choose>
|
6490
|
+
</xsl:if>
|
6491
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
6376
6492
|
<xsl:text>[</xsl:text>
|
6377
|
-
|
6378
|
-
<!-- <xsl:apply-templates /> -->
|
6493
|
+
</xsl:if>
|
6379
6494
|
<xsl:copy-of select="$termsource_text"/>
|
6380
|
-
|
6381
|
-
|
6495
|
+
<xsl:if test="$namespace = 'bsi'">
|
6496
|
+
<xsl:choose>
|
6497
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
6498
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
6499
|
+
</xsl:choose>
|
6500
|
+
</xsl:if>
|
6501
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
6382
6502
|
<xsl:text>]</xsl:text>
|
6383
|
-
|
6503
|
+
</xsl:if>
|
6384
6504
|
</xsl:otherwise>
|
6385
|
-
</xsl:choose>
|
6505
|
+
</xsl:choose> -->
|
6386
6506
|
</fo:block>
|
6387
6507
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
6388
6508
|
<xsl:if test="normalize-space() != ''">
|
6389
6509
|
<xsl:value-of select="."/>
|
6390
6510
|
</xsl:if>
|
6391
|
-
</xsl:template><xsl:
|
6392
|
-
<
|
6393
|
-
|
6394
|
-
|
6395
|
-
|
6511
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
6512
|
+
<fo:inline>
|
6513
|
+
|
6514
|
+
|
6515
|
+
<xsl:value-of select="."/>
|
6516
|
+
</fo:inline>
|
6517
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
6396
6518
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6397
6519
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6398
6520
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6399
6521
|
</xsl:if>
|
6400
|
-
|
6401
6522
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6402
6523
|
<xsl:apply-templates/>
|
6403
6524
|
</fo:inline>
|
6404
|
-
|
6405
|
-
|
6525
|
+
</fo:basic-link>
|
6526
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
6527
|
+
<xsl:variable name="title-modified">
|
6528
|
+
<xsl:call-template name="getLocalizedString">
|
6529
|
+
<xsl:with-param name="key">modified</xsl:with-param>
|
6530
|
+
</xsl:call-template>
|
6531
|
+
</xsl:variable>
|
6532
|
+
|
6533
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
6534
|
+
<xsl:choose>
|
6535
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
6536
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
6537
|
+
</xsl:choose>
|
6538
|
+
<xsl:apply-templates/>
|
6406
6539
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6407
6540
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
6408
6541
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -6586,25 +6719,29 @@
|
|
6586
6719
|
</fo:block>
|
6587
6720
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
6588
6721
|
<xsl:variable name="title-deprecated">
|
6589
|
-
|
6590
|
-
|
6591
|
-
|
6592
|
-
<xsl:with-param name="name" select="'title-deprecated'"/>
|
6593
|
-
</xsl:call-template>
|
6594
|
-
|
6722
|
+
<xsl:call-template name="getLocalizedString">
|
6723
|
+
<xsl:with-param name="key">deprecated</xsl:with-param>
|
6724
|
+
</xsl:call-template>
|
6595
6725
|
</xsl:variable>
|
6596
6726
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
6597
6727
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
6598
6728
|
</fo:block>
|
6729
|
+
</xsl:template><xsl:template name="setStyle_preferred">
|
6730
|
+
<xsl:if test="*[local-name() = 'strong']">
|
6731
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
6732
|
+
</xsl:if>
|
6733
|
+
</xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
|
6734
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
|
6599
6735
|
</xsl:template><xsl:template match="*[local-name() = 'definition']">
|
6600
6736
|
<fo:block xsl:use-attribute-sets="definition-style">
|
6601
6737
|
<xsl:apply-templates/>
|
6602
6738
|
</fo:block>
|
6603
6739
|
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]">
|
6604
6740
|
<xsl:apply-templates/>
|
6605
|
-
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p']">
|
6741
|
+
</xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
|
6606
6742
|
<fo:inline> <xsl:apply-templates/></fo:inline>
|
6607
|
-
<fo:block
|
6743
|
+
<!-- <fo:block> </fo:block> -->
|
6744
|
+
<fo:block/>
|
6608
6745
|
</xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
|
6609
6746
|
|
6610
6747
|
<fo:block>
|
@@ -6671,6 +6808,49 @@
|
|
6671
6808
|
</xsl:template><xsl:template match="*[local-name() = 'name']/text()">
|
6672
6809
|
<!-- 0xA0 to space replacement -->
|
6673
6810
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
6811
|
+
</xsl:template><xsl:variable name="ul_labels_">
|
6812
|
+
|
6813
|
+
|
6814
|
+
|
6815
|
+
|
6816
|
+
|
6817
|
+
|
6818
|
+
|
6819
|
+
|
6820
|
+
|
6821
|
+
|
6822
|
+
|
6823
|
+
|
6824
|
+
|
6825
|
+
|
6826
|
+
|
6827
|
+
|
6828
|
+
|
6829
|
+
</xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
|
6830
|
+
<xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
6831
|
+
<xsl:variable name="list_level">
|
6832
|
+
<xsl:choose>
|
6833
|
+
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
6834
|
+
<xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
|
6835
|
+
</xsl:choose>
|
6836
|
+
</xsl:variable>
|
6837
|
+
<xsl:choose>
|
6838
|
+
<xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
|
6839
|
+
<xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
|
6840
|
+
</xsl:when>
|
6841
|
+
<xsl:when test="$list_level mod 3 = 0">
|
6842
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
|
6843
|
+
</xsl:when>
|
6844
|
+
<xsl:when test="$list_level mod 2 = 0">
|
6845
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
|
6846
|
+
</xsl:when>
|
6847
|
+
<xsl:otherwise>
|
6848
|
+
<xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
|
6849
|
+
</xsl:otherwise>
|
6850
|
+
</xsl:choose>
|
6851
|
+
</xsl:template><xsl:template match="label" mode="ul_labels">
|
6852
|
+
<xsl:copy-of select="@*[not(local-name() = 'level')]"/>
|
6853
|
+
<xsl:value-of select="."/>
|
6674
6854
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
6675
6855
|
<xsl:choose>
|
6676
6856
|
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
@@ -6881,16 +7061,30 @@
|
|
6881
7061
|
|
6882
7062
|
|
6883
7063
|
|
6884
|
-
|
7064
|
+
|
7065
|
+
|
7066
|
+
|
7067
|
+
|
7068
|
+
|
7069
|
+
|
6885
7070
|
|
6886
7071
|
|
6887
7072
|
|
6888
7073
|
|
6889
7074
|
|
7075
|
+
|
7076
|
+
|
7077
|
+
|
7078
|
+
|
7079
|
+
<!-- end MPFD bibitem processing -->
|
7080
|
+
|
7081
|
+
<!-- start M3D bibitem processing -->
|
6890
7082
|
|
6891
7083
|
|
7084
|
+
|
7085
|
+
|
6892
7086
|
</xsl:template><xsl:template name="processBibitemDocId">
|
6893
|
-
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
7087
|
+
<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')]"/>
|
6894
7088
|
<xsl:choose>
|
6895
7089
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
6896
7090
|
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
@@ -6904,7 +7098,7 @@
|
|
6904
7098
|
<xsl:if test="$type != ''">
|
6905
7099
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
6906
7100
|
</xsl:if> -->
|
6907
|
-
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
7101
|
+
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
|
6908
7102
|
</xsl:otherwise>
|
6909
7103
|
</xsl:choose>
|
6910
7104
|
</xsl:template><xsl:template name="processPersonalAuthor">
|
@@ -7009,7 +7203,35 @@
|
|
7009
7203
|
<fo:block-container border="1pt solid black" width="50%">
|
7010
7204
|
<fo:block> </fo:block>
|
7011
7205
|
</fo:block-container>
|
7012
|
-
</xsl:template><xsl:
|
7206
|
+
</xsl:template><xsl:variable name="toc_level">
|
7207
|
+
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
7208
|
+
<xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
|
7209
|
+
<xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
|
7210
|
+
<xsl:choose>
|
7211
|
+
<xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
7212
|
+
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
7213
|
+
<xsl:otherwise><!-- default value -->
|
7214
|
+
|
7215
|
+
|
7216
|
+
|
7217
|
+
|
7218
|
+
|
7219
|
+
|
7220
|
+
|
7221
|
+
2
|
7222
|
+
|
7223
|
+
|
7224
|
+
|
7225
|
+
|
7226
|
+
|
7227
|
+
|
7228
|
+
|
7229
|
+
|
7230
|
+
|
7231
|
+
|
7232
|
+
</xsl:otherwise>
|
7233
|
+
</xsl:choose>
|
7234
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
7013
7235
|
<xsl:param name="colwidths"/>
|
7014
7236
|
<xsl:variable name="colwidths_">
|
7015
7237
|
<xsl:choose>
|
@@ -7089,7 +7311,7 @@
|
|
7089
7311
|
</td>
|
7090
7312
|
</xsl:for-each>
|
7091
7313
|
<td>333</td> <!-- page number, just for fill -->
|
7092
|
-
</xsl:template><xsl:template match="*[local-name() = 'variant-title']
|
7314
|
+
</xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7093
7315
|
<fo:inline padding-right="5mm"> </fo:inline>
|
7094
7316
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
7095
7317
|
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
@@ -7100,6 +7322,10 @@
|
|
7100
7322
|
</svg>
|
7101
7323
|
</fo:instream-foreign-object>
|
7102
7324
|
</fo:inline>
|
7325
|
+
</xsl:template><xsl:template match="@language">
|
7326
|
+
<xsl:copy-of select="."/>
|
7327
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
7328
|
+
<xsl:call-template name="title"/>
|
7103
7329
|
</xsl:template><xsl:template name="convertDate">
|
7104
7330
|
<xsl:param name="date"/>
|
7105
7331
|
<xsl:param name="format" select="'short'"/>
|
@@ -7457,9 +7683,15 @@
|
|
7457
7683
|
</xsl:template><xsl:template name="getLocalizedString">
|
7458
7684
|
<xsl:param name="key"/>
|
7459
7685
|
<xsl:param name="formatted">false</xsl:param>
|
7686
|
+
<xsl:param name="lang"/>
|
7460
7687
|
|
7461
7688
|
<xsl:variable name="curr_lang">
|
7462
|
-
<xsl:
|
7689
|
+
<xsl:choose>
|
7690
|
+
<xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
|
7691
|
+
<xsl:otherwise>
|
7692
|
+
<xsl:call-template name="getLang"/>
|
7693
|
+
</xsl:otherwise>
|
7694
|
+
</xsl:choose>
|
7463
7695
|
</xsl:variable>
|
7464
7696
|
|
7465
7697
|
<xsl:variable name="data_value">
|
@@ -7649,4 +7881,14 @@
|
|
7649
7881
|
</xsl:otherwise>
|
7650
7882
|
</xsl:choose>
|
7651
7883
|
</xsl:if>
|
7884
|
+
</xsl:template><xsl:template name="setAltText">
|
7885
|
+
<xsl:param name="value"/>
|
7886
|
+
<xsl:attribute name="fox:alt-text">
|
7887
|
+
<xsl:choose>
|
7888
|
+
<xsl:when test="normalize-space($value) != ''">
|
7889
|
+
<xsl:value-of select="$value"/>
|
7890
|
+
</xsl:when>
|
7891
|
+
<xsl:otherwise>_</xsl:otherwise>
|
7892
|
+
</xsl:choose>
|
7893
|
+
</xsl:attribute>
|
7652
7894
|
</xsl:template></xsl:stylesheet>
|