metanorma-ogc 1.2.4 → 1.2.9
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 +62 -0
- data/README.adoc +3 -4
- data/lib/asciidoctor/ogc/basicdoc.rng +32 -0
- data/lib/asciidoctor/ogc/boilerplate.xml +2 -2
- data/lib/asciidoctor/ogc/converter.rb +25 -1
- data/lib/asciidoctor/ogc/isodoc.rng +29 -44
- data/lib/asciidoctor/ogc/validate.rb +1 -1
- data/lib/isodoc/ogc/base_convert.rb +0 -1
- data/lib/isodoc/ogc/biblio.rb +1 -0
- data/lib/isodoc/ogc/html/_coverpage.css +6 -0
- data/lib/isodoc/ogc/html/_coverpage.scss +8 -0
- data/lib/isodoc/ogc/html/html_ogc_titlepage.html +3 -3
- data/lib/isodoc/ogc/html/htmlstyle.css +211 -201
- data/lib/isodoc/ogc/html/htmlstyle.scss +4 -4
- data/lib/isodoc/ogc/html/ogc.css +21 -21
- data/lib/isodoc/ogc/html/ogc.scss +21 -21
- data/lib/isodoc/ogc/html/ogc_wp.css +35 -35
- data/lib/isodoc/ogc/html/ogc_wp.scss +35 -35
- data/lib/isodoc/ogc/html/word_ogc_titlepage.html +1 -1
- data/lib/isodoc/ogc/html/wordstyle.css +19 -19
- data/lib/isodoc/ogc/html/wordstyle.scss +19 -19
- data/lib/isodoc/ogc/html/wordstyle_wp.css +23 -23
- data/lib/isodoc/ogc/html/wordstyle_wp.scss +23 -23
- data/lib/isodoc/ogc/html_convert.rb +5 -1
- data/lib/isodoc/ogc/i18n-en.yaml +10 -0
- data/lib/isodoc/ogc/init.rb +1 -1
- data/lib/isodoc/ogc/metadata.rb +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +521 -109
- data/lib/isodoc/ogc/ogc.best-practice.xsl +521 -109
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +521 -109
- data/lib/isodoc/ogc/ogc.community-practice.xsl +521 -109
- data/lib/isodoc/ogc/ogc.community-standard.xsl +521 -109
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +521 -109
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +521 -109
- data/lib/isodoc/ogc/ogc.other.xsl +521 -109
- data/lib/isodoc/ogc/ogc.policy.xsl +521 -109
- data/lib/isodoc/ogc/ogc.reference-model.xsl +521 -109
- data/lib/isodoc/ogc/ogc.release-notes.xsl +521 -109
- data/lib/isodoc/ogc/ogc.standard.xsl +521 -109
- data/lib/isodoc/ogc/ogc.test-suite.xsl +521 -109
- data/lib/isodoc/ogc/ogc.user-guide.xsl +521 -109
- data/lib/isodoc/ogc/ogc.white-paper.xsl +470 -88
- data/lib/isodoc/ogc/presentation_xml_convert.rb +25 -0
- data/lib/isodoc/ogc/sections.rb +6 -1
- data/lib/isodoc/ogc/word_convert.rb +8 -1
- data/lib/isodoc/ogc/xref.rb +30 -5
- data/lib/metanorma/ogc.rb +7 -0
- data/lib/metanorma/ogc/fonts_manifest.yaml +6 -0
- data/lib/metanorma/ogc/processor.rb +0 -8
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +6 -7
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -36,10 +36,11 @@
|
|
36
36
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:abstract" mode="contents"/>
|
37
37
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'keywords']" mode="contents"/>
|
38
38
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword" mode="contents"/>
|
39
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'security']" mode="contents"/>
|
39
40
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']" mode="contents"/>
|
40
41
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters" mode="contents"/>
|
41
42
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:introduction" mode="contents"/>
|
42
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'submitting_orgs') and not(@type = 'keywords')]" mode="contents"/>
|
43
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'security') and not(@type = 'submitting_orgs') and not(@type = 'keywords')]" mode="contents"/>
|
43
44
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements" mode="contents"/>
|
44
45
|
|
45
46
|
|
@@ -68,7 +69,7 @@
|
|
68
69
|
|
69
70
|
<xsl:template match="/">
|
70
71
|
<xsl:call-template name="namespaceCheck"/>
|
71
|
-
<fo:root font-family="Lato,
|
72
|
+
<fo:root font-family="Lato, STIX Two Math, Source Han Sans" font-size="11pt" color="{$color_main}" xml:lang="{$lang}">
|
72
73
|
<fo:layout-master-set>
|
73
74
|
<!-- Cover page -->
|
74
75
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -180,14 +181,30 @@
|
|
180
181
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
|
181
182
|
</xsl:call-template>
|
182
183
|
<xsl:value-of select="$linebreak"/>
|
184
|
+
<xsl:variable name="docsubtype" select="normalize-space(/ogc:ogc-standard/ogc:bibdata/ogc:ext/ogc:docsubtype)"/>
|
185
|
+
<xsl:variable name="docsubtype_str">
|
186
|
+
<xsl:choose>
|
187
|
+
<xsl:when test="$docsubtype = 'implementation'">Implementation</xsl:when>
|
188
|
+
<xsl:when test="$docsubtype = 'conceptual-model'">Conceptual model</xsl:when>
|
189
|
+
<xsl:when test="$docsubtype = 'conceptual-model-and-encoding'">Conceptual model & encoding</xsl:when>
|
190
|
+
<xsl:when test="$docsubtype = 'conceptual-model-and-implementation'">Conceptual model & implementation</xsl:when>
|
191
|
+
<xsl:when test="$docsubtype = 'encoding'">Encoding</xsl:when>
|
192
|
+
<xsl:when test="$docsubtype = 'extension'">Extension</xsl:when>
|
193
|
+
<xsl:when test="$docsubtype = 'profile'">Profile</xsl:when>
|
194
|
+
<xsl:when test="$docsubtype = 'profile-with-extension'">Profile with extension</xsl:when>
|
195
|
+
<xsl:when test="$docsubtype = 'general'">General</xsl:when>
|
196
|
+
</xsl:choose>
|
197
|
+
</xsl:variable>
|
183
198
|
<xsl:call-template name="addLetterSpacing">
|
184
|
-
<xsl:with-param name="text" select="
|
199
|
+
<xsl:with-param name="text" select="$docsubtype_str"/>
|
185
200
|
<xsl:with-param name="letter-spacing" select="0.25"/>
|
186
201
|
</xsl:call-template>
|
187
202
|
</fo:block>
|
188
203
|
<fo:block font-size="12pt" font-weight="bold">
|
204
|
+
<xsl:variable name="curr_lang" select="/ogc:ogc-standard/ogc:bibdata/ogc:language[@current = 'true']"/>
|
205
|
+
<xsl:variable name="stage" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:status/ogc:stage[@language = $curr_lang]))"/>
|
189
206
|
<xsl:call-template name="addLetterSpacing">
|
190
|
-
<xsl:with-param name="text" select="
|
207
|
+
<xsl:with-param name="text" select="$stage"/>
|
191
208
|
</xsl:call-template>
|
192
209
|
</fo:block>
|
193
210
|
</fo:block>
|
@@ -494,10 +511,17 @@
|
|
494
511
|
<fo:block break-after="page"/>
|
495
512
|
</xsl:if>
|
496
513
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:foreword"/>
|
514
|
+
|
515
|
+
<xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'security']">
|
516
|
+
<fo:block break-after="page"/>
|
517
|
+
</xsl:if>
|
518
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'security']"/>
|
519
|
+
|
497
520
|
<xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']">
|
498
521
|
<fo:block break-after="page"/>
|
499
522
|
</xsl:if>
|
500
523
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[@type = 'submitting_orgs']"/>
|
524
|
+
|
501
525
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:submitters"/>
|
502
526
|
<xsl:if test="/ogc:ogc-standard/ogc:preface/ogc:introduction">
|
503
527
|
<fo:block break-after="page"/>
|
@@ -506,7 +530,7 @@
|
|
506
530
|
|
507
531
|
|
508
532
|
|
509
|
-
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'submitting_orgs') and not(@type = 'keywords')]"/>
|
533
|
+
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:clause[not(@type = 'security') and not(@type = 'submitting_orgs') and not(@type = 'keywords')]"/>
|
510
534
|
<xsl:apply-templates select="/ogc:ogc-standard/ogc:preface/ogc:acknowledgements"/>
|
511
535
|
</fo:block>
|
512
536
|
</fo:flow>
|
@@ -547,7 +571,7 @@
|
|
547
571
|
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
548
572
|
</xsl:template>
|
549
573
|
|
550
|
-
<xsl:template match="text()" priority="
|
574
|
+
<xsl:template match="text()" priority="3" mode="contents">
|
551
575
|
<xsl:value-of select="translate(., $thinspace, ' ')"/>
|
552
576
|
</xsl:template>
|
553
577
|
|
@@ -853,11 +877,20 @@
|
|
853
877
|
<xsl:when test="$level = 2">
|
854
878
|
<fo:block space-before="24pt" margin-bottom="10pt">
|
855
879
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
856
|
-
|
857
|
-
<xsl:
|
858
|
-
|
880
|
+
<xsl:variable name="title">
|
881
|
+
<xsl:choose>
|
882
|
+
<xsl:when test="*[local-name() = 'tab']">
|
883
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
884
|
+
</xsl:when>
|
885
|
+
<xsl:otherwise>
|
886
|
+
<xsl:copy-of select="."/>
|
887
|
+
</xsl:otherwise>
|
888
|
+
</xsl:choose>
|
889
|
+
</xsl:variable>
|
890
|
+
<xsl:variable name="section" select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
859
891
|
<xsl:call-template name="insertSectionTitle">
|
860
|
-
<xsl:with-param name="
|
892
|
+
<xsl:with-param name="section" select="$section"/>
|
893
|
+
<xsl:with-param name="title" select="$title"/>
|
861
894
|
</xsl:call-template>
|
862
895
|
</fo:block>
|
863
896
|
</xsl:when>
|
@@ -1002,8 +1035,14 @@
|
|
1002
1035
|
|
1003
1036
|
<xsl:template match="ogc:ul | ogc:ol" mode="ul_ol">
|
1004
1037
|
<fo:block-container margin-left="13mm">
|
1038
|
+
<xsl:if test="ancestor::ogc:table">
|
1039
|
+
<xsl:attribute name="margin-left">1.5mm</xsl:attribute>
|
1040
|
+
</xsl:if>
|
1005
1041
|
<fo:block-container margin-left="0mm">
|
1006
1042
|
<fo:list-block provisional-distance-between-starts="12mm" space-after="12pt" line-height="115%">
|
1043
|
+
<xsl:if test="ancestor::ogc:table">
|
1044
|
+
<xsl:attribute name="provisional-distance-between-starts">5mm</xsl:attribute>
|
1045
|
+
</xsl:if>
|
1007
1046
|
<xsl:if test="ancestor::ogc:ul | ancestor::ogc:ol">
|
1008
1047
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
1009
1048
|
</xsl:if>
|
@@ -1030,13 +1069,13 @@
|
|
1030
1069
|
<xsl:otherwise> <!-- for ordered lists -->
|
1031
1070
|
<xsl:choose>
|
1032
1071
|
<xsl:when test="../@type = 'arabic'">
|
1033
|
-
<xsl:number format="a)"/>
|
1072
|
+
<xsl:number format="a)" lang="en"/>
|
1034
1073
|
</xsl:when>
|
1035
1074
|
<xsl:when test="../@type = 'alphabet'">
|
1036
1075
|
<xsl:number format="1)"/>
|
1037
1076
|
</xsl:when>
|
1038
1077
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1039
|
-
<xsl:number format="A)"/>
|
1078
|
+
<xsl:number format="A)" lang="en"/>
|
1040
1079
|
</xsl:when>
|
1041
1080
|
|
1042
1081
|
<xsl:when test="../@type = 'roman'">
|
@@ -1289,7 +1328,7 @@
|
|
1289
1328
|
<xsl:variable name="sectionNum">
|
1290
1329
|
<xsl:choose>
|
1291
1330
|
<xsl:when test="normalize-space($sectionNum_) = '' and local-name() = 'annex'">
|
1292
|
-
<xsl:number format="A" count="ogc:annex"/>
|
1331
|
+
<xsl:number format="A" count="ogc:annex" lang="en"/>
|
1293
1332
|
</xsl:when>
|
1294
1333
|
<xsl:otherwise>
|
1295
1334
|
<xsl:value-of select="$sectionNum_"/>
|
@@ -1363,9 +1402,18 @@
|
|
1363
1402
|
</xsl:template>
|
1364
1403
|
|
1365
1404
|
<xsl:template name="insertSectionTitle">
|
1405
|
+
<xsl:param name="section"/>
|
1366
1406
|
<xsl:param name="title"/>
|
1367
1407
|
<fo:block>
|
1368
1408
|
<fo:block font-size="18pt" color="{$color_blue}" keep-with-next="always" line-height="150%">
|
1409
|
+
<xsl:if test="$section != ''">
|
1410
|
+
<fo:inline padding-right="2mm">
|
1411
|
+
<xsl:call-template name="addLetterSpacing">
|
1412
|
+
<xsl:with-param name="text" select="$section"/>
|
1413
|
+
<xsl:with-param name="letter-spacing" select="0.6"/>
|
1414
|
+
</xsl:call-template>
|
1415
|
+
</fo:inline>
|
1416
|
+
</xsl:if>
|
1369
1417
|
<xsl:apply-templates select="xalan:nodeset($title)" mode="titlesmall"/>
|
1370
1418
|
</fo:block>
|
1371
1419
|
<xsl:call-template name="insertOrangeHorizontalLine"/>
|
@@ -1374,9 +1422,9 @@
|
|
1374
1422
|
|
1375
1423
|
<xsl:template match="text()" mode="titlesmall">
|
1376
1424
|
<xsl:call-template name="addLetterSpacing">
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1425
|
+
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new(.))"/>
|
1426
|
+
<xsl:with-param name="letter-spacing" select="0.6"/>
|
1427
|
+
</xsl:call-template>
|
1380
1428
|
</xsl:template>
|
1381
1429
|
|
1382
1430
|
<xsl:template match="ogc:strong" mode="titlesmall">
|
@@ -1443,7 +1491,12 @@
|
|
1443
1491
|
|
1444
1492
|
|
1445
1493
|
</title-toc>
|
1446
|
-
<title-toc lang="fr">
|
1494
|
+
<title-toc lang="fr">
|
1495
|
+
|
1496
|
+
<xsl:text>Sommaire</xsl:text>
|
1497
|
+
|
1498
|
+
|
1499
|
+
</title-toc>
|
1447
1500
|
|
1448
1501
|
<title-toc lang="zh">Contents</title-toc>
|
1449
1502
|
|
@@ -1463,13 +1516,22 @@
|
|
1463
1516
|
<title-part lang="en">
|
1464
1517
|
|
1465
1518
|
|
1519
|
+
|
1466
1520
|
</title-part>
|
1467
1521
|
<title-part lang="fr">
|
1468
1522
|
|
1469
1523
|
|
1524
|
+
|
1470
1525
|
</title-part>
|
1471
1526
|
<title-part lang="zh">第 # 部分:</title-part>
|
1472
1527
|
|
1528
|
+
<title-subpart lang="en">
|
1529
|
+
|
1530
|
+
</title-subpart>
|
1531
|
+
<title-subpart lang="fr">
|
1532
|
+
|
1533
|
+
</title-subpart>
|
1534
|
+
|
1473
1535
|
<title-modified lang="en">modified</title-modified>
|
1474
1536
|
<title-modified lang="fr">modifiée</title-modified>
|
1475
1537
|
|
@@ -1531,10 +1593,19 @@
|
|
1531
1593
|
|
1532
1594
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
1533
1595
|
<xsl:param name="name"/>
|
1534
|
-
<xsl:
|
1535
|
-
|
1596
|
+
<xsl:param name="lang"/>
|
1597
|
+
<xsl:variable name="lang_">
|
1598
|
+
<xsl:choose>
|
1599
|
+
<xsl:when test="$lang != ''">
|
1600
|
+
<xsl:value-of select="$lang"/>
|
1601
|
+
</xsl:when>
|
1602
|
+
<xsl:otherwise>
|
1603
|
+
<xsl:call-template name="getLang"/>
|
1604
|
+
</xsl:otherwise>
|
1605
|
+
</xsl:choose>
|
1536
1606
|
</xsl:variable>
|
1537
|
-
<xsl:variable name="
|
1607
|
+
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
1608
|
+
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
1538
1609
|
<xsl:choose>
|
1539
1610
|
<xsl:when test="normalize-space($title_) != ''">
|
1540
1611
|
<xsl:value-of select="$title_"/>
|
@@ -1562,7 +1633,7 @@
|
|
1562
1633
|
|
1563
1634
|
|
1564
1635
|
|
1565
|
-
<xsl:attribute name="font-family">
|
1636
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1566
1637
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1567
1638
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
1568
1639
|
|
@@ -1722,6 +1793,7 @@
|
|
1722
1793
|
|
1723
1794
|
|
1724
1795
|
|
1796
|
+
|
1725
1797
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
1726
1798
|
|
1727
1799
|
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
@@ -1767,6 +1839,7 @@
|
|
1767
1839
|
|
1768
1840
|
|
1769
1841
|
|
1842
|
+
|
1770
1843
|
</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">
|
1771
1844
|
|
1772
1845
|
|
@@ -1849,6 +1922,7 @@
|
|
1849
1922
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1850
1923
|
|
1851
1924
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1925
|
+
|
1852
1926
|
|
1853
1927
|
|
1854
1928
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1898,7 +1972,7 @@
|
|
1898
1972
|
|
1899
1973
|
|
1900
1974
|
|
1901
|
-
<xsl:attribute name="font-family">
|
1975
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1902
1976
|
|
1903
1977
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1904
1978
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -1976,6 +2050,10 @@
|
|
1976
2050
|
<fo:block> </fo:block>
|
1977
2051
|
|
1978
2052
|
|
2053
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2054
|
+
<fo:block> </fo:block>
|
2055
|
+
</xsl:if> -->
|
2056
|
+
|
1979
2057
|
<!-- $namespace = 'iso' or -->
|
1980
2058
|
|
1981
2059
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
@@ -2008,11 +2086,14 @@
|
|
2008
2086
|
|
2009
2087
|
|
2010
2088
|
<xsl:variable name="colwidths">
|
2011
|
-
<xsl:
|
2012
|
-
<xsl:
|
2013
|
-
|
2014
|
-
|
2089
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2090
|
+
<xsl:call-template name="calculate-column-widths">
|
2091
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2092
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2093
|
+
</xsl:call-template>
|
2094
|
+
</xsl:if>
|
2015
2095
|
</xsl:variable>
|
2096
|
+
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2016
2097
|
|
2017
2098
|
<!-- <xsl:variable name="colwidths2">
|
2018
2099
|
<xsl:call-template name="calculate-column-widths">
|
@@ -2034,38 +2115,108 @@
|
|
2034
2115
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
2035
2116
|
|
2036
2117
|
|
2037
|
-
|
2118
|
+
|
2119
|
+
|
2120
|
+
|
2038
2121
|
|
2039
2122
|
|
2040
2123
|
|
2041
2124
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2042
2125
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2043
2126
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
2044
|
-
|
2127
|
+
|
2045
2128
|
|
2129
|
+
<xsl:if test="ancestor::*[local-name()='sections']">
|
2130
|
+
<xsl:attribute name="font-size">9pt</xsl:attribute>
|
2131
|
+
</xsl:if>
|
2046
2132
|
|
2047
2133
|
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2134
|
+
|
2135
|
+
|
2136
|
+
|
2137
|
+
|
2138
|
+
|
2139
|
+
<xsl:variable name="table_attributes">
|
2140
|
+
<attribute name="table-layout">fixed</attribute>
|
2141
|
+
<attribute name="width">100%</attribute>
|
2142
|
+
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2143
|
+
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2052
2144
|
|
2053
2145
|
|
2054
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2055
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2056
2146
|
|
2057
2147
|
|
2058
2148
|
|
2149
|
+
<attribute name="margin-left">0mm</attribute>
|
2150
|
+
<attribute name="margin-right">0mm</attribute>
|
2151
|
+
|
2152
|
+
|
2153
|
+
|
2059
2154
|
|
2155
|
+
|
2060
2156
|
|
2157
|
+
</xsl:variable>
|
2158
|
+
|
2159
|
+
|
2160
|
+
<fo:table id="{@id}" table-omit-footer-at-break="true">
|
2061
2161
|
|
2062
|
-
|
2063
|
-
|
2064
|
-
|
2162
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2163
|
+
<xsl:attribute name="{@name}">
|
2164
|
+
<xsl:value-of select="."/>
|
2165
|
+
</xsl:attribute>
|
2166
|
+
</xsl:for-each>
|
2065
2167
|
|
2168
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2169
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2170
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2171
|
+
</xsl:if>
|
2066
2172
|
|
2173
|
+
<xsl:choose>
|
2174
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2175
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2176
|
+
<fo:table-column column-width="{@width}"/>
|
2177
|
+
</xsl:for-each>
|
2178
|
+
</xsl:when>
|
2179
|
+
<xsl:otherwise>
|
2180
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2181
|
+
<xsl:choose>
|
2182
|
+
<xsl:when test=". = 1 or . = 0">
|
2183
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2184
|
+
</xsl:when>
|
2185
|
+
<xsl:otherwise>
|
2186
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2187
|
+
</xsl:otherwise>
|
2188
|
+
</xsl:choose>
|
2189
|
+
</xsl:for-each>
|
2190
|
+
</xsl:otherwise>
|
2191
|
+
</xsl:choose>
|
2067
2192
|
|
2193
|
+
<xsl:choose>
|
2194
|
+
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2195
|
+
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2196
|
+
</xsl:when>
|
2197
|
+
<xsl:otherwise>
|
2198
|
+
<xsl:apply-templates/>
|
2199
|
+
</xsl:otherwise>
|
2200
|
+
</xsl:choose>
|
2068
2201
|
|
2202
|
+
</fo:table>
|
2203
|
+
|
2204
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2205
|
+
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2206
|
+
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2207
|
+
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2208
|
+
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2209
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2210
|
+
</xsl:call-template>
|
2211
|
+
</xsl:for-each>
|
2212
|
+
|
2213
|
+
<!-- insert footer as table -->
|
2214
|
+
<!-- <fo:table>
|
2215
|
+
<xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
|
2216
|
+
<xsl:attribute name="{@name}">
|
2217
|
+
<xsl:value-of select="."/>
|
2218
|
+
</xsl:attribute>
|
2219
|
+
</xsl:for-each>
|
2069
2220
|
|
2070
2221
|
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2071
2222
|
<xsl:choose>
|
@@ -2077,17 +2228,7 @@
|
|
2077
2228
|
</xsl:otherwise>
|
2078
2229
|
</xsl:choose>
|
2079
2230
|
</xsl:for-each>
|
2080
|
-
|
2081
|
-
<xsl:choose>
|
2082
|
-
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
2083
|
-
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2084
|
-
</xsl:when>
|
2085
|
-
<xsl:otherwise>
|
2086
|
-
<xsl:apply-templates/>
|
2087
|
-
</xsl:otherwise>
|
2088
|
-
</xsl:choose>
|
2089
|
-
|
2090
|
-
</fo:table>
|
2231
|
+
</fo:table>-->
|
2091
2232
|
|
2092
2233
|
|
2093
2234
|
|
@@ -2098,6 +2239,7 @@
|
|
2098
2239
|
<xsl:if test="normalize-space() != ''">
|
2099
2240
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2100
2241
|
|
2242
|
+
|
2101
2243
|
<xsl:apply-templates/>
|
2102
2244
|
</fo:block>
|
2103
2245
|
</xsl:if>
|
@@ -2153,6 +2295,13 @@
|
|
2153
2295
|
<xsl:for-each select="xalan:nodeset($table)//tr">
|
2154
2296
|
<xsl:variable name="td_text">
|
2155
2297
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
2298
|
+
|
2299
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2300
|
+
<xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
|
2301
|
+
<word><xsl:value-of select="normalize-space(.)"/></word>
|
2302
|
+
</xsl:for-each>
|
2303
|
+
</xsl:if> -->
|
2304
|
+
|
2156
2305
|
</xsl:variable>
|
2157
2306
|
<xsl:variable name="words">
|
2158
2307
|
<xsl:variable name="string_with_added_zerospaces">
|
@@ -2212,11 +2361,14 @@
|
|
2212
2361
|
<xsl:value-of select="*[local-name()='origin']/@citeas"/>
|
2213
2362
|
</xsl:template><xsl:template match="*[local-name()='link']" mode="td_text">
|
2214
2363
|
<xsl:value-of select="@target"/>
|
2364
|
+
</xsl:template><xsl:template match="*[local-name()='math']" mode="td_text">
|
2365
|
+
<xsl:variable name="math_text" select="normalize-space(.)"/>
|
2366
|
+
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2215
2367
|
</xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
|
2216
2368
|
<xsl:param name="cols-count"/>
|
2217
2369
|
<!-- font-weight="bold" -->
|
2218
2370
|
<fo:table-header>
|
2219
|
-
|
2371
|
+
|
2220
2372
|
<xsl:apply-templates/>
|
2221
2373
|
</fo:table-header>
|
2222
2374
|
</xsl:template><xsl:template name="table-header-title">
|
@@ -2241,6 +2393,13 @@
|
|
2241
2393
|
</xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
|
2242
2394
|
<xsl:apply-templates/>
|
2243
2395
|
</xsl:template><xsl:template name="insertTableFooter">
|
2396
|
+
<xsl:param name="cols-count"/>
|
2397
|
+
<xsl:if test="../*[local-name()='tfoot']">
|
2398
|
+
<fo:table-footer>
|
2399
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
|
2400
|
+
</fo:table-footer>
|
2401
|
+
</xsl:if>
|
2402
|
+
</xsl:template><xsl:template name="insertTableFooter2">
|
2244
2403
|
<xsl:param name="cols-count"/>
|
2245
2404
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2246
2405
|
<xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
|
@@ -2264,11 +2423,29 @@
|
|
2264
2423
|
|
2265
2424
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2266
2425
|
|
2426
|
+
|
2427
|
+
|
2428
|
+
|
2429
|
+
|
2267
2430
|
<!-- except gb -->
|
2268
2431
|
|
2269
2432
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2270
2433
|
|
2271
2434
|
|
2435
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2436
|
+
<!-- empty, because notes show at page side in main sections -->
|
2437
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2438
|
+
<xsl:choose>
|
2439
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2440
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2441
|
+
</xsl:when>
|
2442
|
+
<xsl:otherwise>
|
2443
|
+
<fo:block/>
|
2444
|
+
</xsl:otherwise>
|
2445
|
+
</xsl:choose>
|
2446
|
+
</xsl:if> -->
|
2447
|
+
|
2448
|
+
|
2272
2449
|
<!-- horizontal row separator -->
|
2273
2450
|
|
2274
2451
|
|
@@ -2282,6 +2459,109 @@
|
|
2282
2459
|
</fo:table-footer>
|
2283
2460
|
|
2284
2461
|
</xsl:if>
|
2462
|
+
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2463
|
+
<xsl:param name="table_attributes"/>
|
2464
|
+
<xsl:param name="colwidths"/>
|
2465
|
+
<xsl:param name="colgroup"/>
|
2466
|
+
|
2467
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2468
|
+
|
2469
|
+
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2470
|
+
|
2471
|
+
<xsl:variable name="cols-count">
|
2472
|
+
<xsl:choose>
|
2473
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2474
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
2475
|
+
</xsl:when>
|
2476
|
+
<xsl:otherwise>
|
2477
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
2478
|
+
</xsl:otherwise>
|
2479
|
+
</xsl:choose>
|
2480
|
+
</xsl:variable>
|
2481
|
+
|
2482
|
+
<fo:table keep-with-previous="always">
|
2483
|
+
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
2484
|
+
<xsl:choose>
|
2485
|
+
<xsl:when test="@name = 'border-top'">
|
2486
|
+
<xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
|
2487
|
+
</xsl:when>
|
2488
|
+
<xsl:when test="@name = 'border'">
|
2489
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2490
|
+
<xsl:attribute name="border-top">0pt solid black</xsl:attribute>
|
2491
|
+
</xsl:when>
|
2492
|
+
<xsl:otherwise>
|
2493
|
+
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
2494
|
+
</xsl:otherwise>
|
2495
|
+
</xsl:choose>
|
2496
|
+
</xsl:for-each>
|
2497
|
+
|
2498
|
+
<xsl:choose>
|
2499
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2500
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2501
|
+
<fo:table-column column-width="{@width}"/>
|
2502
|
+
</xsl:for-each>
|
2503
|
+
</xsl:when>
|
2504
|
+
<xsl:otherwise>
|
2505
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2506
|
+
<xsl:choose>
|
2507
|
+
<xsl:when test=". = 1 or . = 0">
|
2508
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2509
|
+
</xsl:when>
|
2510
|
+
<xsl:otherwise>
|
2511
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2512
|
+
</xsl:otherwise>
|
2513
|
+
</xsl:choose>
|
2514
|
+
</xsl:for-each>
|
2515
|
+
</xsl:otherwise>
|
2516
|
+
</xsl:choose>
|
2517
|
+
|
2518
|
+
<fo:table-body>
|
2519
|
+
<fo:table-row>
|
2520
|
+
<fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
|
2521
|
+
|
2522
|
+
|
2523
|
+
|
2524
|
+
<!-- fn will be processed inside 'note' processing -->
|
2525
|
+
|
2526
|
+
|
2527
|
+
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2528
|
+
|
2529
|
+
|
2530
|
+
|
2531
|
+
|
2532
|
+
|
2533
|
+
|
2534
|
+
<!-- except gb -->
|
2535
|
+
|
2536
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2537
|
+
|
2538
|
+
|
2539
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2540
|
+
<xsl:choose>
|
2541
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2542
|
+
show Note under table in preface (ex. abstract) sections
|
2543
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2544
|
+
</xsl:when>
|
2545
|
+
<xsl:otherwise>
|
2546
|
+
empty, because notes show at page side in main sections
|
2547
|
+
<fo:block/>
|
2548
|
+
</xsl:otherwise>
|
2549
|
+
</xsl:choose>
|
2550
|
+
</xsl:if> -->
|
2551
|
+
|
2552
|
+
|
2553
|
+
<!-- horizontal row separator -->
|
2554
|
+
|
2555
|
+
|
2556
|
+
<!-- fn processing -->
|
2557
|
+
<xsl:call-template name="fn_display"/>
|
2558
|
+
|
2559
|
+
</fo:table-cell>
|
2560
|
+
</fo:table-row>
|
2561
|
+
</fo:table-body>
|
2562
|
+
|
2563
|
+
</fo:table>
|
2564
|
+
</xsl:if>
|
2285
2565
|
</xsl:template><xsl:template match="*[local-name()='tbody']">
|
2286
2566
|
|
2287
2567
|
<xsl:variable name="cols-count">
|
@@ -2334,7 +2614,7 @@
|
|
2334
2614
|
|
2335
2615
|
</xsl:if>
|
2336
2616
|
|
2337
|
-
|
2617
|
+
|
2338
2618
|
|
2339
2619
|
<xsl:attribute name="min-height">8.5mm</xsl:attribute>
|
2340
2620
|
<xsl:if test="$parent-name = 'thead'">
|
@@ -2346,8 +2626,12 @@
|
|
2346
2626
|
<xsl:if test="$number mod 2 = 0">
|
2347
2627
|
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
2348
2628
|
</xsl:if>
|
2349
|
-
</xsl:if>
|
2350
|
-
|
2629
|
+
</xsl:if>
|
2630
|
+
|
2631
|
+
|
2632
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2633
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2634
|
+
</xsl:if> -->
|
2351
2635
|
|
2352
2636
|
<xsl:apply-templates/>
|
2353
2637
|
</fo:table-row>
|
@@ -2366,8 +2650,8 @@
|
|
2366
2650
|
|
2367
2651
|
|
2368
2652
|
|
2369
|
-
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2370
|
-
|
2653
|
+
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2654
|
+
|
2371
2655
|
|
2372
2656
|
|
2373
2657
|
|
@@ -2413,7 +2697,7 @@
|
|
2413
2697
|
|
2414
2698
|
|
2415
2699
|
|
2416
|
-
|
2700
|
+
|
2417
2701
|
|
2418
2702
|
|
2419
2703
|
<xsl:attribute name="border">solid 0pt white</xsl:attribute>
|
@@ -2422,6 +2706,7 @@
|
|
2422
2706
|
|
2423
2707
|
|
2424
2708
|
|
2709
|
+
|
2425
2710
|
<xsl:if test="@colspan">
|
2426
2711
|
<xsl:attribute name="number-columns-spanned">
|
2427
2712
|
<xsl:value-of select="@colspan"/>
|
@@ -2433,7 +2718,8 @@
|
|
2433
2718
|
</xsl:attribute>
|
2434
2719
|
</xsl:if>
|
2435
2720
|
<xsl:call-template name="display-align"/>
|
2436
|
-
<fo:block>
|
2721
|
+
<fo:block>
|
2722
|
+
|
2437
2723
|
<xsl:apply-templates/>
|
2438
2724
|
</fo:block>
|
2439
2725
|
</fo:table-cell>
|
@@ -2445,14 +2731,17 @@
|
|
2445
2731
|
|
2446
2732
|
|
2447
2733
|
|
2734
|
+
|
2735
|
+
|
2448
2736
|
<fo:inline padding-right="2mm">
|
2449
2737
|
|
2450
2738
|
|
2451
2739
|
|
2452
|
-
|
2740
|
+
|
2453
2741
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
2454
2742
|
|
2455
2743
|
</fo:inline>
|
2744
|
+
|
2456
2745
|
<xsl:apply-templates mode="process"/>
|
2457
2746
|
</fo:block>
|
2458
2747
|
|
@@ -2482,6 +2771,7 @@
|
|
2482
2771
|
|
2483
2772
|
|
2484
2773
|
|
2774
|
+
|
2485
2775
|
<fo:inline font-size="80%" padding-right="5mm" id="{@id}">
|
2486
2776
|
|
2487
2777
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
@@ -2491,12 +2781,15 @@
|
|
2491
2781
|
|
2492
2782
|
|
2493
2783
|
|
2784
|
+
|
2494
2785
|
<xsl:value-of select="@reference"/>
|
2495
2786
|
|
2787
|
+
|
2496
2788
|
</fo:inline>
|
2497
2789
|
<fo:inline>
|
2498
2790
|
|
2499
|
-
<xsl:apply-templates/>
|
2791
|
+
<!-- <xsl:apply-templates /> -->
|
2792
|
+
<xsl:copy-of select="./node()"/>
|
2500
2793
|
</fo:inline>
|
2501
2794
|
</fo:block>
|
2502
2795
|
</xsl:if>
|
@@ -2533,7 +2826,20 @@
|
|
2533
2826
|
<xsl:variable name="following_dl_colwidths">
|
2534
2827
|
<xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
|
2535
2828
|
<xsl:variable name="html-table">
|
2536
|
-
<xsl:variable name="
|
2829
|
+
<xsl:variable name="doc_ns">
|
2830
|
+
|
2831
|
+
</xsl:variable>
|
2832
|
+
<xsl:variable name="ns">
|
2833
|
+
<xsl:choose>
|
2834
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
2835
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
2836
|
+
</xsl:when>
|
2837
|
+
<xsl:otherwise>
|
2838
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
2839
|
+
</xsl:otherwise>
|
2840
|
+
</xsl:choose>
|
2841
|
+
</xsl:variable>
|
2842
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2537
2843
|
<xsl:element name="{$ns}:table">
|
2538
2844
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
2539
2845
|
<tbody>
|
@@ -2598,7 +2904,8 @@
|
|
2598
2904
|
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
2599
2905
|
</xsl:if>
|
2600
2906
|
|
2601
|
-
<xsl:apply-templates/>
|
2907
|
+
<!-- <xsl:apply-templates /> -->
|
2908
|
+
<xsl:copy-of select="./node()"/>
|
2602
2909
|
</fo:block>
|
2603
2910
|
</fo:table-cell>
|
2604
2911
|
</fo:table-row>
|
@@ -2619,6 +2926,7 @@
|
|
2619
2926
|
|
2620
2927
|
|
2621
2928
|
|
2929
|
+
|
2622
2930
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
2623
2931
|
|
2624
2932
|
<xsl:attribute name="internal-destination">
|
@@ -2626,7 +2934,9 @@
|
|
2626
2934
|
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
2627
2935
|
</xsl:attribute>
|
2628
2936
|
|
2937
|
+
|
2629
2938
|
<xsl:value-of select="@reference"/>
|
2939
|
+
|
2630
2940
|
</fo:basic-link>
|
2631
2941
|
</fo:inline>
|
2632
2942
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
@@ -2634,7 +2944,11 @@
|
|
2634
2944
|
<xsl:apply-templates/>
|
2635
2945
|
</fo:inline>
|
2636
2946
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2637
|
-
<fo:block-container
|
2947
|
+
<fo:block-container>
|
2948
|
+
|
2949
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2950
|
+
|
2951
|
+
|
2638
2952
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2639
2953
|
<xsl:attribute name="margin-left">
|
2640
2954
|
<xsl:choose>
|
@@ -2644,8 +2958,11 @@
|
|
2644
2958
|
</xsl:attribute>
|
2645
2959
|
|
2646
2960
|
</xsl:if>
|
2647
|
-
<fo:block-container
|
2648
|
-
|
2961
|
+
<fo:block-container>
|
2962
|
+
|
2963
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2964
|
+
|
2965
|
+
|
2649
2966
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2650
2967
|
|
2651
2968
|
<xsl:variable name="key_iso">
|
@@ -2659,9 +2976,12 @@
|
|
2659
2976
|
<fo:block margin-bottom="12pt" text-align="left">
|
2660
2977
|
|
2661
2978
|
<xsl:variable name="title-where">
|
2662
|
-
|
2663
|
-
|
2664
|
-
|
2979
|
+
|
2980
|
+
|
2981
|
+
<xsl:call-template name="getTitle">
|
2982
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2983
|
+
</xsl:call-template>
|
2984
|
+
|
2665
2985
|
</xsl:variable>
|
2666
2986
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2667
2987
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2677,9 +2997,12 @@
|
|
2677
2997
|
|
2678
2998
|
|
2679
2999
|
<xsl:variable name="title-where">
|
2680
|
-
|
2681
|
-
|
2682
|
-
|
3000
|
+
|
3001
|
+
|
3002
|
+
<xsl:call-template name="getTitle">
|
3003
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3004
|
+
</xsl:call-template>
|
3005
|
+
|
2683
3006
|
</xsl:variable>
|
2684
3007
|
<xsl:value-of select="$title-where"/>
|
2685
3008
|
</fo:block>
|
@@ -2690,9 +3013,12 @@
|
|
2690
3013
|
|
2691
3014
|
|
2692
3015
|
<xsl:variable name="title-key">
|
2693
|
-
|
2694
|
-
|
2695
|
-
|
3016
|
+
|
3017
|
+
|
3018
|
+
<xsl:call-template name="getTitle">
|
3019
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3020
|
+
</xsl:call-template>
|
3021
|
+
|
2696
3022
|
</xsl:variable>
|
2697
3023
|
<xsl:value-of select="$title-key"/>
|
2698
3024
|
</fo:block>
|
@@ -2724,7 +3050,20 @@
|
|
2724
3050
|
</xsl:choose>
|
2725
3051
|
<!-- create virtual html table for dl/[dt and dd] -->
|
2726
3052
|
<xsl:variable name="html-table">
|
2727
|
-
<xsl:variable name="
|
3053
|
+
<xsl:variable name="doc_ns">
|
3054
|
+
|
3055
|
+
</xsl:variable>
|
3056
|
+
<xsl:variable name="ns">
|
3057
|
+
<xsl:choose>
|
3058
|
+
<xsl:when test="normalize-space($doc_ns) != ''">
|
3059
|
+
<xsl:value-of select="normalize-space($doc_ns)"/>
|
3060
|
+
</xsl:when>
|
3061
|
+
<xsl:otherwise>
|
3062
|
+
<xsl:value-of select="substring-before(name(/*), '-')"/>
|
3063
|
+
</xsl:otherwise>
|
3064
|
+
</xsl:choose>
|
3065
|
+
</xsl:variable>
|
3066
|
+
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
2728
3067
|
<xsl:element name="{$ns}:table">
|
2729
3068
|
<tbody>
|
2730
3069
|
<xsl:apply-templates mode="dl"/>
|
@@ -2873,6 +3212,7 @@
|
|
2873
3212
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
2874
3213
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
2875
3214
|
|
3215
|
+
|
2876
3216
|
<xsl:apply-templates/>
|
2877
3217
|
<!-- <xsl:if test="$namespace = 'gb'">
|
2878
3218
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -2926,6 +3266,7 @@
|
|
2926
3266
|
</fo:inline>
|
2927
3267
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
2928
3268
|
<fo:inline font-weight="bold">
|
3269
|
+
|
2929
3270
|
<xsl:apply-templates/>
|
2930
3271
|
</fo:inline>
|
2931
3272
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -2939,18 +3280,18 @@
|
|
2939
3280
|
</xsl:template><xsl:template match="*[local-name()='tt']">
|
2940
3281
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
2941
3282
|
<xsl:variable name="_font-size">
|
2942
|
-
|
2943
|
-
|
2944
|
-
|
2945
3283
|
|
2946
3284
|
|
2947
3285
|
|
2948
3286
|
|
2949
3287
|
|
2950
3288
|
|
2951
|
-
|
3289
|
+
|
3290
|
+
|
3291
|
+
|
3292
|
+
|
2952
3293
|
10
|
2953
|
-
|
3294
|
+
|
2954
3295
|
|
2955
3296
|
|
2956
3297
|
</xsl:variable>
|
@@ -3254,7 +3595,18 @@
|
|
3254
3595
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3255
3596
|
</xsl:apply-templates>
|
3256
3597
|
</xsl:template><xsl:template name="getLang">
|
3257
|
-
<xsl:variable name="
|
3598
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3599
|
+
<xsl:variable name="language">
|
3600
|
+
<xsl:choose>
|
3601
|
+
<xsl:when test="$language_current != ''">
|
3602
|
+
<xsl:value-of select="$language_current"/>
|
3603
|
+
</xsl:when>
|
3604
|
+
<xsl:otherwise>
|
3605
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3606
|
+
</xsl:otherwise>
|
3607
|
+
</xsl:choose>
|
3608
|
+
</xsl:variable>
|
3609
|
+
|
3258
3610
|
<xsl:choose>
|
3259
3611
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3260
3612
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3288,7 +3640,8 @@
|
|
3288
3640
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
3289
3641
|
<xsl:value-of select="substring($str, 2)"/>
|
3290
3642
|
</xsl:template><xsl:template match="mathml:math">
|
3291
|
-
<fo:inline font-family="
|
3643
|
+
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3644
|
+
|
3292
3645
|
<xsl:variable name="mathml">
|
3293
3646
|
<xsl:apply-templates select="." mode="mathml"/>
|
3294
3647
|
</xsl:variable>
|
@@ -3318,6 +3671,7 @@
|
|
3318
3671
|
</xsl:choose>
|
3319
3672
|
</xsl:variable>
|
3320
3673
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3674
|
+
|
3321
3675
|
<xsl:choose>
|
3322
3676
|
<xsl:when test="$target = ''">
|
3323
3677
|
<xsl:apply-templates/>
|
@@ -3371,10 +3725,14 @@
|
|
3371
3725
|
</fo:inline>
|
3372
3726
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3373
3727
|
<xsl:variable name="title-modified">
|
3374
|
-
|
3375
|
-
|
3376
|
-
|
3728
|
+
|
3729
|
+
|
3730
|
+
<xsl:call-template name="getTitle">
|
3731
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3732
|
+
</xsl:call-template>
|
3733
|
+
|
3377
3734
|
</xsl:variable>
|
3735
|
+
|
3378
3736
|
<xsl:choose>
|
3379
3737
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3380
3738
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -3382,7 +3740,7 @@
|
|
3382
3740
|
<xsl:apply-templates/>
|
3383
3741
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
3384
3742
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
3385
|
-
|
3743
|
+
|
3386
3744
|
<xsl:apply-templates/>
|
3387
3745
|
</fo:basic-link>
|
3388
3746
|
</xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
|
@@ -3439,6 +3797,8 @@
|
|
3439
3797
|
|
3440
3798
|
|
3441
3799
|
|
3800
|
+
|
3801
|
+
|
3442
3802
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3443
3803
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3444
3804
|
</fo:inline>
|
@@ -3531,7 +3891,8 @@
|
|
3531
3891
|
</fo:inline>
|
3532
3892
|
</xsl:if>
|
3533
3893
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3534
|
-
<fo:block-container id="{@id}">
|
3894
|
+
<fo:block-container id="{@id}">
|
3895
|
+
|
3535
3896
|
<fo:block>
|
3536
3897
|
<xsl:apply-templates/>
|
3537
3898
|
</fo:block>
|
@@ -3582,7 +3943,7 @@
|
|
3582
3943
|
<xsl:apply-templates mode="bookmarks"/>
|
3583
3944
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3584
3945
|
<xsl:apply-templates select="."/>
|
3585
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3946
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3586
3947
|
<xsl:apply-templates mode="bookmarks"/>
|
3587
3948
|
</xsl:template><xsl:template name="addBookmarks">
|
3588
3949
|
<xsl:param name="contents"/>
|
@@ -3596,18 +3957,9 @@
|
|
3596
3957
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
3597
3958
|
<fo:bookmark-title>
|
3598
3959
|
<xsl:variable name="bookmark-title_">
|
3599
|
-
<xsl:
|
3600
|
-
<xsl:
|
3601
|
-
|
3602
|
-
|
3603
|
-
</xsl:when>
|
3604
|
-
<xsl:when test="@lang = 'fr'">
|
3605
|
-
|
3606
|
-
|
3607
|
-
</xsl:when>
|
3608
|
-
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
3609
|
-
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
3610
|
-
</xsl:choose>
|
3960
|
+
<xsl:call-template name="getLangVersion">
|
3961
|
+
<xsl:with-param name="lang" select="@lang"/>
|
3962
|
+
</xsl:call-template>
|
3611
3963
|
</xsl:variable>
|
3612
3964
|
<xsl:choose>
|
3613
3965
|
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
@@ -3669,7 +4021,7 @@
|
|
3669
4021
|
</fo:bookmark>
|
3670
4022
|
</xsl:for-each>
|
3671
4023
|
</fo:bookmark>
|
3672
|
-
</xsl:if>
|
4024
|
+
</xsl:if>
|
3673
4025
|
|
3674
4026
|
|
3675
4027
|
|
@@ -3692,6 +4044,20 @@
|
|
3692
4044
|
|
3693
4045
|
</fo:bookmark-tree>
|
3694
4046
|
</xsl:if>
|
4047
|
+
</xsl:template><xsl:template name="getLangVersion">
|
4048
|
+
<xsl:param name="lang"/>
|
4049
|
+
<xsl:choose>
|
4050
|
+
<xsl:when test="$lang = 'en'">
|
4051
|
+
|
4052
|
+
|
4053
|
+
</xsl:when>
|
4054
|
+
<xsl:when test="$lang = 'fr'">
|
4055
|
+
|
4056
|
+
|
4057
|
+
</xsl:when>
|
4058
|
+
<xsl:when test="$lang = 'de'">Deutsche</xsl:when>
|
4059
|
+
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
4060
|
+
</xsl:choose>
|
3695
4061
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
3696
4062
|
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
3697
4063
|
<fo:bookmark-title>
|
@@ -3706,7 +4072,7 @@
|
|
3706
4072
|
</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">
|
3707
4073
|
<xsl:if test="normalize-space() != ''">
|
3708
4074
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
3709
|
-
|
4075
|
+
|
3710
4076
|
<xsl:apply-templates/>
|
3711
4077
|
</fo:block>
|
3712
4078
|
</xsl:if>
|
@@ -4150,9 +4516,14 @@
|
|
4150
4516
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4151
4517
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4152
4518
|
|
4153
|
-
|
4154
|
-
|
4155
|
-
|
4519
|
+
|
4520
|
+
|
4521
|
+
|
4522
|
+
<xsl:call-template name="getTitle">
|
4523
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
4524
|
+
</xsl:call-template>
|
4525
|
+
|
4526
|
+
|
4156
4527
|
<xsl:text>: </xsl:text>
|
4157
4528
|
</fo:inline>
|
4158
4529
|
|
@@ -4302,9 +4673,12 @@
|
|
4302
4673
|
</fo:block>
|
4303
4674
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
4304
4675
|
<xsl:variable name="title-deprecated">
|
4305
|
-
|
4306
|
-
|
4307
|
-
|
4676
|
+
|
4677
|
+
|
4678
|
+
<xsl:call-template name="getTitle">
|
4679
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4680
|
+
</xsl:call-template>
|
4681
|
+
|
4308
4682
|
</xsl:variable>
|
4309
4683
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4310
4684
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -4351,13 +4725,14 @@
|
|
4351
4725
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4352
4726
|
<fo:block>
|
4353
4727
|
<xsl:call-template name="setId"/>
|
4728
|
+
|
4354
4729
|
<xsl:apply-templates/>
|
4355
4730
|
</fo:block>
|
4356
4731
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
4357
4732
|
<fo:block id="{@id}">
|
4358
4733
|
<xsl:apply-templates/>
|
4359
4734
|
</fo:block>
|
4360
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4735
|
+
</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']">
|
4361
4736
|
|
4362
4737
|
<fo:block id="{@id}">
|
4363
4738
|
<xsl:apply-templates/>
|
@@ -4386,6 +4761,7 @@
|
|
4386
4761
|
</xsl:choose>
|
4387
4762
|
</xsl:attribute>
|
4388
4763
|
|
4764
|
+
|
4389
4765
|
<fo:block-container margin-left="0mm">
|
4390
4766
|
<fo:block>
|
4391
4767
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -4413,7 +4789,8 @@
|
|
4413
4789
|
<fo:table-column column-width="107mm"/>
|
4414
4790
|
<fo:table-column column-width="15mm"/>
|
4415
4791
|
<fo:table-body>
|
4416
|
-
<fo:table-row
|
4792
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4793
|
+
|
4417
4794
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
4418
4795
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
4419
4796
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -4432,6 +4809,10 @@
|
|
4432
4809
|
</fo:table-cell>
|
4433
4810
|
</xsl:template><xsl:template name="processBibitem">
|
4434
4811
|
|
4812
|
+
|
4813
|
+
<!-- end BIPM bibitem processing-->
|
4814
|
+
|
4815
|
+
|
4435
4816
|
<!-- start OGC bibtem processing -->
|
4436
4817
|
<xsl:choose>
|
4437
4818
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -4709,6 +5090,7 @@
|
|
4709
5090
|
<dc:title>
|
4710
5091
|
<xsl:variable name="title">
|
4711
5092
|
|
5093
|
+
|
4712
5094
|
|
4713
5095
|
<xsl:value-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'title'][@language = 'en']"/>
|
4714
5096
|
|
@@ -4727,6 +5109,7 @@
|
|
4727
5109
|
<dc:creator>
|
4728
5110
|
|
4729
5111
|
|
5112
|
+
|
4730
5113
|
</dc:creator>
|
4731
5114
|
<dc:description>
|
4732
5115
|
<xsl:variable name="abstract">
|
@@ -4736,6 +5119,7 @@
|
|
4736
5119
|
|
4737
5120
|
<xsl:copy-of select="/*/*[local-name() = 'bibdata']/*[local-name() = 'abstract']//text()"/>
|
4738
5121
|
|
5122
|
+
|
4739
5123
|
</xsl:variable>
|
4740
5124
|
<xsl:value-of select="normalize-space($abstract)"/>
|
4741
5125
|
</dc:description>
|
@@ -4807,13 +5191,22 @@
|
|
4807
5191
|
</xsl:template><xsl:template name="split">
|
4808
5192
|
<xsl:param name="pText" select="."/>
|
4809
5193
|
<xsl:param name="sep" select="','"/>
|
5194
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
4810
5195
|
<xsl:if test="string-length($pText) >0">
|
4811
5196
|
<item>
|
4812
|
-
<xsl:
|
5197
|
+
<xsl:choose>
|
5198
|
+
<xsl:when test="$normalize-space = 'true'">
|
5199
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5200
|
+
</xsl:when>
|
5201
|
+
<xsl:otherwise>
|
5202
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5203
|
+
</xsl:otherwise>
|
5204
|
+
</xsl:choose>
|
4813
5205
|
</item>
|
4814
5206
|
<xsl:call-template name="split">
|
4815
5207
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
4816
5208
|
<xsl:with-param name="sep" select="$sep"/>
|
5209
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
4817
5210
|
</xsl:call-template>
|
4818
5211
|
</xsl:if>
|
4819
5212
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -4879,4 +5272,23 @@
|
|
4879
5272
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
4880
5273
|
</xsl:call-template>
|
4881
5274
|
</xsl:if>
|
5275
|
+
</xsl:template><xsl:template name="repeat">
|
5276
|
+
<xsl:param name="char" select="'*'"/>
|
5277
|
+
<xsl:param name="count"/>
|
5278
|
+
<xsl:if test="$count > 0">
|
5279
|
+
<xsl:value-of select="$char"/>
|
5280
|
+
<xsl:call-template name="repeat">
|
5281
|
+
<xsl:with-param name="char" select="$char"/>
|
5282
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5283
|
+
</xsl:call-template>
|
5284
|
+
</xsl:if>
|
5285
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5286
|
+
<xsl:param name="key"/>
|
5287
|
+
|
5288
|
+
<xsl:variable name="curr_lang">
|
5289
|
+
<xsl:call-template name="getLang"/>
|
5290
|
+
</xsl:variable>
|
5291
|
+
|
5292
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5293
|
+
|
4882
5294
|
</xsl:template></xsl:stylesheet>
|