metanorma-ogc 1.2.5 → 1.2.10
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 +50 -3
- data/lib/asciidoctor/ogc/boilerplate.xml +1 -1
- data/lib/asciidoctor/ogc/converter.rb +0 -1
- data/lib/asciidoctor/ogc/isodoc.rng +36 -43
- data/lib/isodoc/ogc/base_convert.rb +1 -2
- data/lib/isodoc/ogc/biblio.rb +1 -0
- data/lib/isodoc/ogc/html/htmlstyle.css +210 -206
- 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/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 +4 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +319 -74
- data/lib/isodoc/ogc/ogc.best-practice.xsl +319 -74
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +319 -74
- data/lib/isodoc/ogc/ogc.community-practice.xsl +319 -74
- data/lib/isodoc/ogc/ogc.community-standard.xsl +319 -74
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +319 -74
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +319 -74
- data/lib/isodoc/ogc/ogc.other.xsl +319 -74
- data/lib/isodoc/ogc/ogc.policy.xsl +319 -74
- data/lib/isodoc/ogc/ogc.reference-model.xsl +319 -74
- data/lib/isodoc/ogc/ogc.release-notes.xsl +319 -74
- data/lib/isodoc/ogc/ogc.standard.xsl +319 -74
- data/lib/isodoc/ogc/ogc.test-suite.xsl +319 -74
- data/lib/isodoc/ogc/ogc.user-guide.xsl +319 -74
- data/lib/isodoc/ogc/ogc.white-paper.xsl +299 -68
- data/lib/isodoc/ogc/presentation_xml_convert.rb +13 -0
- data/lib/isodoc/ogc/word_convert.rb +7 -1
- data/lib/metanorma/ogc.rb +7 -0
- data/lib/metanorma/ogc/processor.rb +16 -8
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +7 -9
- data/.github/workflows/macos.yml +0 -38
- data/.github/workflows/ubuntu.yml +0 -56
- data/.github/workflows/windows.yml +0 -40
@@ -69,7 +69,7 @@
|
|
69
69
|
|
70
70
|
<xsl:template match="/">
|
71
71
|
<xsl:call-template name="namespaceCheck"/>
|
72
|
-
<fo:root font-family="Lato, STIX Two Math,
|
72
|
+
<fo:root font-family="Lato, STIX Two Math, Source Han Sans" font-size="11pt" color="{$color_main}" xml:lang="{$lang}">
|
73
73
|
<fo:layout-master-set>
|
74
74
|
<!-- Cover page -->
|
75
75
|
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
@@ -181,13 +181,28 @@
|
|
181
181
|
<xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($doctype))"/>
|
182
182
|
</xsl:call-template>
|
183
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>
|
184
198
|
<xsl:call-template name="addLetterSpacing">
|
185
|
-
<xsl:with-param name="text" select="
|
199
|
+
<xsl:with-param name="text" select="$docsubtype_str"/>
|
186
200
|
<xsl:with-param name="letter-spacing" select="0.25"/>
|
187
201
|
</xsl:call-template>
|
188
202
|
</fo:block>
|
189
203
|
<fo:block font-size="12pt" font-weight="bold">
|
190
|
-
<xsl:variable name="
|
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]))"/>
|
191
206
|
<xsl:call-template name="addLetterSpacing">
|
192
207
|
<xsl:with-param name="text" select="$stage"/>
|
193
208
|
</xsl:call-template>
|
@@ -1054,13 +1069,13 @@
|
|
1054
1069
|
<xsl:otherwise> <!-- for ordered lists -->
|
1055
1070
|
<xsl:choose>
|
1056
1071
|
<xsl:when test="../@type = 'arabic'">
|
1057
|
-
<xsl:number format="a)"/>
|
1072
|
+
<xsl:number format="a)" lang="en"/>
|
1058
1073
|
</xsl:when>
|
1059
1074
|
<xsl:when test="../@type = 'alphabet'">
|
1060
1075
|
<xsl:number format="1)"/>
|
1061
1076
|
</xsl:when>
|
1062
1077
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1063
|
-
<xsl:number format="A)"/>
|
1078
|
+
<xsl:number format="A)" lang="en"/>
|
1064
1079
|
</xsl:when>
|
1065
1080
|
|
1066
1081
|
<xsl:when test="../@type = 'roman'">
|
@@ -1313,7 +1328,7 @@
|
|
1313
1328
|
<xsl:variable name="sectionNum">
|
1314
1329
|
<xsl:choose>
|
1315
1330
|
<xsl:when test="normalize-space($sectionNum_) = '' and local-name() = 'annex'">
|
1316
|
-
<xsl:number format="A" count="ogc:annex"/>
|
1331
|
+
<xsl:number format="A" count="ogc:annex" lang="en"/>
|
1317
1332
|
</xsl:when>
|
1318
1333
|
<xsl:otherwise>
|
1319
1334
|
<xsl:value-of select="$sectionNum_"/>
|
@@ -1501,13 +1516,22 @@
|
|
1501
1516
|
<title-part lang="en">
|
1502
1517
|
|
1503
1518
|
|
1519
|
+
|
1504
1520
|
</title-part>
|
1505
1521
|
<title-part lang="fr">
|
1506
1522
|
|
1507
1523
|
|
1524
|
+
|
1508
1525
|
</title-part>
|
1509
1526
|
<title-part lang="zh">第 # 部分:</title-part>
|
1510
1527
|
|
1528
|
+
<title-subpart lang="en">
|
1529
|
+
|
1530
|
+
</title-subpart>
|
1531
|
+
<title-subpart lang="fr">
|
1532
|
+
|
1533
|
+
</title-subpart>
|
1534
|
+
|
1511
1535
|
<title-modified lang="en">modified</title-modified>
|
1512
1536
|
<title-modified lang="fr">modifiée</title-modified>
|
1513
1537
|
|
@@ -1609,7 +1633,7 @@
|
|
1609
1633
|
|
1610
1634
|
|
1611
1635
|
|
1612
|
-
<xsl:attribute name="font-family">
|
1636
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1613
1637
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1614
1638
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
1615
1639
|
|
@@ -1815,6 +1839,7 @@
|
|
1815
1839
|
|
1816
1840
|
|
1817
1841
|
|
1842
|
+
|
1818
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">
|
1819
1844
|
|
1820
1845
|
|
@@ -1862,6 +1887,7 @@
|
|
1862
1887
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1863
1888
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1864
1889
|
|
1890
|
+
|
1865
1891
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1866
1892
|
|
1867
1893
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1897,6 +1923,7 @@
|
|
1897
1923
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1898
1924
|
|
1899
1925
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1926
|
+
|
1900
1927
|
|
1901
1928
|
|
1902
1929
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1946,7 +1973,7 @@
|
|
1946
1973
|
|
1947
1974
|
|
1948
1975
|
|
1949
|
-
<xsl:attribute name="font-family">
|
1976
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1950
1977
|
|
1951
1978
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1952
1979
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -2024,7 +2051,9 @@
|
|
2024
2051
|
<fo:block> </fo:block>
|
2025
2052
|
|
2026
2053
|
|
2027
|
-
|
2054
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2055
|
+
<fo:block> </fo:block>
|
2056
|
+
</xsl:if> -->
|
2028
2057
|
|
2029
2058
|
<!-- $namespace = 'iso' or -->
|
2030
2059
|
|
@@ -2058,10 +2087,12 @@
|
|
2058
2087
|
|
2059
2088
|
|
2060
2089
|
<xsl:variable name="colwidths">
|
2061
|
-
<xsl:
|
2062
|
-
<xsl:
|
2063
|
-
|
2064
|
-
|
2090
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2091
|
+
<xsl:call-template name="calculate-column-widths">
|
2092
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2093
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2094
|
+
</xsl:call-template>
|
2095
|
+
</xsl:if>
|
2065
2096
|
</xsl:variable>
|
2066
2097
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2067
2098
|
|
@@ -2140,16 +2171,25 @@
|
|
2140
2171
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2141
2172
|
</xsl:if>
|
2142
2173
|
|
2143
|
-
<xsl:
|
2144
|
-
<xsl:
|
2145
|
-
<xsl:
|
2146
|
-
<fo:table-column column-width="
|
2147
|
-
</xsl:
|
2148
|
-
|
2149
|
-
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
2174
|
+
<xsl:choose>
|
2175
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2176
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2177
|
+
<fo:table-column column-width="{@width}"/>
|
2178
|
+
</xsl:for-each>
|
2179
|
+
</xsl:when>
|
2180
|
+
<xsl:otherwise>
|
2181
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2182
|
+
<xsl:choose>
|
2183
|
+
<xsl:when test=". = 1 or . = 0">
|
2184
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2185
|
+
</xsl:when>
|
2186
|
+
<xsl:otherwise>
|
2187
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2188
|
+
</xsl:otherwise>
|
2189
|
+
</xsl:choose>
|
2190
|
+
</xsl:for-each>
|
2191
|
+
</xsl:otherwise>
|
2192
|
+
</xsl:choose>
|
2153
2193
|
|
2154
2194
|
<xsl:choose>
|
2155
2195
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -2162,10 +2202,12 @@
|
|
2162
2202
|
|
2163
2203
|
</fo:table>
|
2164
2204
|
|
2205
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2165
2206
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2166
2207
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2167
2208
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2168
2209
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2210
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2169
2211
|
</xsl:call-template>
|
2170
2212
|
</xsl:for-each>
|
2171
2213
|
|
@@ -2198,6 +2240,7 @@
|
|
2198
2240
|
<xsl:if test="normalize-space() != ''">
|
2199
2241
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2200
2242
|
|
2243
|
+
|
2201
2244
|
<xsl:apply-templates/>
|
2202
2245
|
</fo:block>
|
2203
2246
|
</xsl:if>
|
@@ -2382,13 +2425,27 @@
|
|
2382
2425
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2383
2426
|
|
2384
2427
|
|
2385
|
-
<!-- except gb and bipm -->
|
2386
2428
|
|
2387
|
-
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2388
2429
|
|
2389
2430
|
|
2431
|
+
<!-- except gb -->
|
2432
|
+
|
2433
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2390
2434
|
|
2391
2435
|
|
2436
|
+
<!-- show Note under table in preface (ex. abstract) sections -->
|
2437
|
+
<!-- empty, because notes show at page side in main sections -->
|
2438
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2439
|
+
<xsl:choose>
|
2440
|
+
<xsl:when test="ancestor::*[local-name()='preface']">
|
2441
|
+
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2442
|
+
</xsl:when>
|
2443
|
+
<xsl:otherwise>
|
2444
|
+
<fo:block/>
|
2445
|
+
</xsl:otherwise>
|
2446
|
+
</xsl:choose>
|
2447
|
+
</xsl:if> -->
|
2448
|
+
|
2392
2449
|
|
2393
2450
|
<!-- horizontal row separator -->
|
2394
2451
|
|
@@ -2406,12 +2463,22 @@
|
|
2406
2463
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2407
2464
|
<xsl:param name="table_attributes"/>
|
2408
2465
|
<xsl:param name="colwidths"/>
|
2466
|
+
<xsl:param name="colgroup"/>
|
2409
2467
|
|
2410
2468
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2411
2469
|
|
2412
2470
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2413
2471
|
|
2414
|
-
<xsl:variable name="cols-count"
|
2472
|
+
<xsl:variable name="cols-count">
|
2473
|
+
<xsl:choose>
|
2474
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2475
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
2476
|
+
</xsl:when>
|
2477
|
+
<xsl:otherwise>
|
2478
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
2479
|
+
</xsl:otherwise>
|
2480
|
+
</xsl:choose>
|
2481
|
+
</xsl:variable>
|
2415
2482
|
|
2416
2483
|
<fo:table keep-with-previous="always">
|
2417
2484
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -2429,16 +2496,25 @@
|
|
2429
2496
|
</xsl:choose>
|
2430
2497
|
</xsl:for-each>
|
2431
2498
|
|
2432
|
-
<xsl:
|
2433
|
-
<xsl:
|
2434
|
-
<xsl:
|
2435
|
-
<fo:table-column column-width="
|
2436
|
-
</xsl:
|
2437
|
-
|
2438
|
-
|
2439
|
-
|
2440
|
-
|
2441
|
-
|
2499
|
+
<xsl:choose>
|
2500
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2501
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2502
|
+
<fo:table-column column-width="{@width}"/>
|
2503
|
+
</xsl:for-each>
|
2504
|
+
</xsl:when>
|
2505
|
+
<xsl:otherwise>
|
2506
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2507
|
+
<xsl:choose>
|
2508
|
+
<xsl:when test=". = 1 or . = 0">
|
2509
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2510
|
+
</xsl:when>
|
2511
|
+
<xsl:otherwise>
|
2512
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2513
|
+
</xsl:otherwise>
|
2514
|
+
</xsl:choose>
|
2515
|
+
</xsl:for-each>
|
2516
|
+
</xsl:otherwise>
|
2517
|
+
</xsl:choose>
|
2442
2518
|
|
2443
2519
|
<fo:table-body>
|
2444
2520
|
<fo:table-row>
|
@@ -2452,7 +2528,11 @@
|
|
2452
2528
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
2453
2529
|
|
2454
2530
|
|
2455
|
-
|
2531
|
+
|
2532
|
+
|
2533
|
+
|
2534
|
+
|
2535
|
+
<!-- except gb -->
|
2456
2536
|
|
2457
2537
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
2458
2538
|
|
@@ -2547,10 +2627,13 @@
|
|
2547
2627
|
<xsl:if test="$number mod 2 = 0">
|
2548
2628
|
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
2549
2629
|
</xsl:if>
|
2550
|
-
</xsl:if>
|
2551
|
-
|
2630
|
+
</xsl:if>
|
2552
2631
|
|
2553
2632
|
|
2633
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2634
|
+
<xsl:attribute name="height">8mm</xsl:attribute>
|
2635
|
+
</xsl:if> -->
|
2636
|
+
|
2554
2637
|
<xsl:apply-templates/>
|
2555
2638
|
</fo:table-row>
|
2556
2639
|
</xsl:template><xsl:template match="*[local-name()='th']">
|
@@ -2636,7 +2719,8 @@
|
|
2636
2719
|
</xsl:attribute>
|
2637
2720
|
</xsl:if>
|
2638
2721
|
<xsl:call-template name="display-align"/>
|
2639
|
-
<fo:block>
|
2722
|
+
<fo:block>
|
2723
|
+
|
2640
2724
|
<xsl:apply-templates/>
|
2641
2725
|
</fo:block>
|
2642
2726
|
</fo:table-cell>
|
@@ -2861,7 +2945,13 @@
|
|
2861
2945
|
<xsl:apply-templates/>
|
2862
2946
|
</fo:inline>
|
2863
2947
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2864
|
-
<fo:block-container
|
2948
|
+
<fo:block-container>
|
2949
|
+
|
2950
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2951
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2952
|
+
</xsl:if>
|
2953
|
+
|
2954
|
+
|
2865
2955
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2866
2956
|
<xsl:attribute name="margin-left">
|
2867
2957
|
<xsl:choose>
|
@@ -2871,8 +2961,12 @@
|
|
2871
2961
|
</xsl:attribute>
|
2872
2962
|
|
2873
2963
|
</xsl:if>
|
2874
|
-
<fo:block-container
|
2875
|
-
|
2964
|
+
<fo:block-container>
|
2965
|
+
|
2966
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2967
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2968
|
+
|
2969
|
+
|
2876
2970
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2877
2971
|
|
2878
2972
|
<xsl:variable name="key_iso">
|
@@ -2886,9 +2980,12 @@
|
|
2886
2980
|
<fo:block margin-bottom="12pt" text-align="left">
|
2887
2981
|
|
2888
2982
|
<xsl:variable name="title-where">
|
2889
|
-
|
2890
|
-
|
2891
|
-
|
2983
|
+
|
2984
|
+
|
2985
|
+
<xsl:call-template name="getTitle">
|
2986
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2987
|
+
</xsl:call-template>
|
2988
|
+
|
2892
2989
|
</xsl:variable>
|
2893
2990
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2894
2991
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2904,9 +3001,12 @@
|
|
2904
3001
|
|
2905
3002
|
|
2906
3003
|
<xsl:variable name="title-where">
|
2907
|
-
|
2908
|
-
|
2909
|
-
|
3004
|
+
|
3005
|
+
|
3006
|
+
<xsl:call-template name="getTitle">
|
3007
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3008
|
+
</xsl:call-template>
|
3009
|
+
|
2910
3010
|
</xsl:variable>
|
2911
3011
|
<xsl:value-of select="$title-where"/>
|
2912
3012
|
</fo:block>
|
@@ -2917,9 +3017,12 @@
|
|
2917
3017
|
|
2918
3018
|
|
2919
3019
|
<xsl:variable name="title-key">
|
2920
|
-
|
2921
|
-
|
2922
|
-
|
3020
|
+
|
3021
|
+
|
3022
|
+
<xsl:call-template name="getTitle">
|
3023
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3024
|
+
</xsl:call-template>
|
3025
|
+
|
2923
3026
|
</xsl:variable>
|
2924
3027
|
<xsl:value-of select="$title-key"/>
|
2925
3028
|
</fo:block>
|
@@ -3045,12 +3148,32 @@
|
|
3045
3148
|
</xsl:otherwise>
|
3046
3149
|
</xsl:choose>
|
3047
3150
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
3048
|
-
<xsl:
|
3049
|
-
<xsl:
|
3050
|
-
|
3051
|
-
<xsl:
|
3052
|
-
|
3053
|
-
|
3151
|
+
<xsl:variable name="lengths">
|
3152
|
+
<xsl:for-each select="*[local-name()='dt']">
|
3153
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
3154
|
+
<xsl:variable name="attributes">
|
3155
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
3156
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
3157
|
+
</xsl:variable>
|
3158
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
3159
|
+
</xsl:for-each>
|
3160
|
+
</xsl:variable>
|
3161
|
+
<xsl:variable name="maxLength">
|
3162
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
3163
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
3164
|
+
<xsl:if test="position() = 1">
|
3165
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
3166
|
+
</xsl:if>
|
3167
|
+
</xsl:for-each> -->
|
3168
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
3169
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
3170
|
+
<xsl:if test="position() = 1">
|
3171
|
+
<xsl:value-of select="."/>
|
3172
|
+
</xsl:if>
|
3173
|
+
</xsl:for-each>
|
3174
|
+
</xsl:variable>
|
3175
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
3176
|
+
<xsl:value-of select="$maxLength"/>
|
3054
3177
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
3055
3178
|
<xsl:param name="key_iso"/>
|
3056
3179
|
|
@@ -3167,6 +3290,7 @@
|
|
3167
3290
|
</fo:inline>
|
3168
3291
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3169
3292
|
<fo:inline font-weight="bold">
|
3293
|
+
|
3170
3294
|
<xsl:apply-templates/>
|
3171
3295
|
</fo:inline>
|
3172
3296
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -3495,7 +3619,18 @@
|
|
3495
3619
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3496
3620
|
</xsl:apply-templates>
|
3497
3621
|
</xsl:template><xsl:template name="getLang">
|
3498
|
-
<xsl:variable name="
|
3622
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3623
|
+
<xsl:variable name="language">
|
3624
|
+
<xsl:choose>
|
3625
|
+
<xsl:when test="$language_current != ''">
|
3626
|
+
<xsl:value-of select="$language_current"/>
|
3627
|
+
</xsl:when>
|
3628
|
+
<xsl:otherwise>
|
3629
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3630
|
+
</xsl:otherwise>
|
3631
|
+
</xsl:choose>
|
3632
|
+
</xsl:variable>
|
3633
|
+
|
3499
3634
|
<xsl:choose>
|
3500
3635
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3501
3636
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3530,6 +3665,7 @@
|
|
3530
3665
|
<xsl:value-of select="substring($str, 2)"/>
|
3531
3666
|
</xsl:template><xsl:template match="mathml:math">
|
3532
3667
|
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3668
|
+
|
3533
3669
|
<xsl:variable name="mathml">
|
3534
3670
|
<xsl:apply-templates select="." mode="mathml"/>
|
3535
3671
|
</xsl:variable>
|
@@ -3559,6 +3695,7 @@
|
|
3559
3695
|
</xsl:choose>
|
3560
3696
|
</xsl:variable>
|
3561
3697
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3698
|
+
|
3562
3699
|
<xsl:choose>
|
3563
3700
|
<xsl:when test="$target = ''">
|
3564
3701
|
<xsl:apply-templates/>
|
@@ -3612,10 +3749,14 @@
|
|
3612
3749
|
</fo:inline>
|
3613
3750
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3614
3751
|
<xsl:variable name="title-modified">
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3752
|
+
|
3753
|
+
|
3754
|
+
<xsl:call-template name="getTitle">
|
3755
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3756
|
+
</xsl:call-template>
|
3757
|
+
|
3618
3758
|
</xsl:variable>
|
3759
|
+
|
3619
3760
|
<xsl:choose>
|
3620
3761
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3621
3762
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -3680,6 +3821,8 @@
|
|
3680
3821
|
|
3681
3822
|
|
3682
3823
|
|
3824
|
+
|
3825
|
+
|
3683
3826
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
3684
3827
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
3685
3828
|
</fo:inline>
|
@@ -3772,7 +3915,8 @@
|
|
3772
3915
|
</fo:inline>
|
3773
3916
|
</xsl:if>
|
3774
3917
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3775
|
-
<fo:block-container id="{@id}">
|
3918
|
+
<fo:block-container id="{@id}">
|
3919
|
+
|
3776
3920
|
<fo:block>
|
3777
3921
|
<xsl:apply-templates/>
|
3778
3922
|
</fo:block>
|
@@ -3823,7 +3967,7 @@
|
|
3823
3967
|
<xsl:apply-templates mode="bookmarks"/>
|
3824
3968
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3825
3969
|
<xsl:apply-templates select="."/>
|
3826
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3970
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3827
3971
|
<xsl:apply-templates mode="bookmarks"/>
|
3828
3972
|
</xsl:template><xsl:template name="addBookmarks">
|
3829
3973
|
<xsl:param name="contents"/>
|
@@ -3839,6 +3983,8 @@
|
|
3839
3983
|
<xsl:variable name="bookmark-title_">
|
3840
3984
|
<xsl:call-template name="getLangVersion">
|
3841
3985
|
<xsl:with-param name="lang" select="@lang"/>
|
3986
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3987
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3842
3988
|
</xsl:call-template>
|
3843
3989
|
</xsl:variable>
|
3844
3990
|
<xsl:choose>
|
@@ -3856,13 +4002,34 @@
|
|
3856
4002
|
</xsl:choose>
|
3857
4003
|
</fo:bookmark-title>
|
3858
4004
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4005
|
+
|
4006
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4007
|
+
<xsl:with-param name="contents" select="contents"/>
|
4008
|
+
</xsl:call-template>
|
4009
|
+
|
4010
|
+
<xsl:call-template name="insertTableBookmarks">
|
4011
|
+
<xsl:with-param name="contents" select="contents"/>
|
4012
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4013
|
+
</xsl:call-template>
|
4014
|
+
|
3859
4015
|
</fo:bookmark>
|
3860
4016
|
|
3861
4017
|
</xsl:for-each>
|
3862
4018
|
</xsl:when>
|
3863
4019
|
<xsl:otherwise>
|
3864
4020
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4021
|
+
|
3865
4022
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4023
|
+
|
4024
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4025
|
+
<xsl:with-param name="contents" select="contents"/>
|
4026
|
+
</xsl:call-template>
|
4027
|
+
|
4028
|
+
<xsl:call-template name="insertTableBookmarks">
|
4029
|
+
<xsl:with-param name="contents" select="contents"/>
|
4030
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4031
|
+
</xsl:call-template>
|
4032
|
+
|
3866
4033
|
</xsl:for-each>
|
3867
4034
|
</xsl:otherwise>
|
3868
4035
|
</xsl:choose>
|
@@ -3924,8 +4091,44 @@
|
|
3924
4091
|
|
3925
4092
|
</fo:bookmark-tree>
|
3926
4093
|
</xsl:if>
|
4094
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
4095
|
+
<xsl:param name="contents"/>
|
4096
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
4097
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
4098
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4099
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
4100
|
+
<fo:bookmark internal-destination="{@id}">
|
4101
|
+
<fo:bookmark-title>
|
4102
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4103
|
+
</fo:bookmark-title>
|
4104
|
+
</fo:bookmark>
|
4105
|
+
</xsl:for-each>
|
4106
|
+
</fo:bookmark>
|
4107
|
+
</xsl:if>
|
4108
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
4109
|
+
<xsl:param name="contents"/>
|
4110
|
+
<xsl:param name="lang"/>
|
4111
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
4112
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
4113
|
+
<fo:bookmark-title>
|
4114
|
+
<xsl:choose>
|
4115
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
4116
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4117
|
+
</xsl:choose>
|
4118
|
+
</fo:bookmark-title>
|
4119
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
4120
|
+
<fo:bookmark internal-destination="{@id}">
|
4121
|
+
<fo:bookmark-title>
|
4122
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4123
|
+
</fo:bookmark-title>
|
4124
|
+
</fo:bookmark>
|
4125
|
+
</xsl:for-each>
|
4126
|
+
</fo:bookmark>
|
4127
|
+
</xsl:if>
|
3927
4128
|
</xsl:template><xsl:template name="getLangVersion">
|
3928
4129
|
<xsl:param name="lang"/>
|
4130
|
+
<xsl:param name="doctype" select="''"/>
|
4131
|
+
<xsl:param name="title" select="''"/>
|
3929
4132
|
<xsl:choose>
|
3930
4133
|
<xsl:when test="$lang = 'en'">
|
3931
4134
|
|
@@ -4396,9 +4599,14 @@
|
|
4396
4599
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4397
4600
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4398
4601
|
|
4399
|
-
|
4400
|
-
|
4401
|
-
|
4602
|
+
|
4603
|
+
|
4604
|
+
|
4605
|
+
<xsl:call-template name="getTitle">
|
4606
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
4607
|
+
</xsl:call-template>
|
4608
|
+
|
4609
|
+
|
4402
4610
|
<xsl:text>: </xsl:text>
|
4403
4611
|
</fo:inline>
|
4404
4612
|
|
@@ -4423,7 +4631,8 @@
|
|
4423
4631
|
<fo:block-container margin-left="0mm">
|
4424
4632
|
|
4425
4633
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4426
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4634
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4635
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4427
4636
|
</fo:block>
|
4428
4637
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4429
4638
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4548,9 +4757,12 @@
|
|
4548
4757
|
</fo:block>
|
4549
4758
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
4550
4759
|
<xsl:variable name="title-deprecated">
|
4551
|
-
|
4552
|
-
|
4553
|
-
|
4760
|
+
|
4761
|
+
|
4762
|
+
<xsl:call-template name="getTitle">
|
4763
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4764
|
+
</xsl:call-template>
|
4765
|
+
|
4554
4766
|
</xsl:variable>
|
4555
4767
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4556
4768
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -4604,7 +4816,7 @@
|
|
4604
4816
|
<fo:block id="{@id}">
|
4605
4817
|
<xsl:apply-templates/>
|
4606
4818
|
</fo:block>
|
4607
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4819
|
+
</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']">
|
4608
4820
|
|
4609
4821
|
<fo:block id="{@id}">
|
4610
4822
|
<xsl:apply-templates/>
|
@@ -4661,7 +4873,8 @@
|
|
4661
4873
|
<fo:table-column column-width="107mm"/>
|
4662
4874
|
<fo:table-column column-width="15mm"/>
|
4663
4875
|
<fo:table-body>
|
4664
|
-
<fo:table-row
|
4876
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4877
|
+
|
4665
4878
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
4666
4879
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
4667
4880
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -4680,6 +4893,10 @@
|
|
4680
4893
|
</fo:table-cell>
|
4681
4894
|
</xsl:template><xsl:template name="processBibitem">
|
4682
4895
|
|
4896
|
+
|
4897
|
+
<!-- end BIPM bibitem processing-->
|
4898
|
+
|
4899
|
+
|
4683
4900
|
<!-- start OGC bibtem processing -->
|
4684
4901
|
<xsl:choose>
|
4685
4902
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -5058,13 +5275,22 @@
|
|
5058
5275
|
</xsl:template><xsl:template name="split">
|
5059
5276
|
<xsl:param name="pText" select="."/>
|
5060
5277
|
<xsl:param name="sep" select="','"/>
|
5278
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
5061
5279
|
<xsl:if test="string-length($pText) >0">
|
5062
5280
|
<item>
|
5063
|
-
<xsl:
|
5281
|
+
<xsl:choose>
|
5282
|
+
<xsl:when test="$normalize-space = 'true'">
|
5283
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5284
|
+
</xsl:when>
|
5285
|
+
<xsl:otherwise>
|
5286
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5287
|
+
</xsl:otherwise>
|
5288
|
+
</xsl:choose>
|
5064
5289
|
</item>
|
5065
5290
|
<xsl:call-template name="split">
|
5066
5291
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5067
5292
|
<xsl:with-param name="sep" select="$sep"/>
|
5293
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
5068
5294
|
</xsl:call-template>
|
5069
5295
|
</xsl:if>
|
5070
5296
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -5130,4 +5356,23 @@
|
|
5130
5356
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5131
5357
|
</xsl:call-template>
|
5132
5358
|
</xsl:if>
|
5359
|
+
</xsl:template><xsl:template name="repeat">
|
5360
|
+
<xsl:param name="char" select="'*'"/>
|
5361
|
+
<xsl:param name="count"/>
|
5362
|
+
<xsl:if test="$count > 0">
|
5363
|
+
<xsl:value-of select="$char"/>
|
5364
|
+
<xsl:call-template name="repeat">
|
5365
|
+
<xsl:with-param name="char" select="$char"/>
|
5366
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5367
|
+
</xsl:call-template>
|
5368
|
+
</xsl:if>
|
5369
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5370
|
+
<xsl:param name="key"/>
|
5371
|
+
|
5372
|
+
<xsl:variable name="curr_lang">
|
5373
|
+
<xsl:call-template name="getLang"/>
|
5374
|
+
</xsl:variable>
|
5375
|
+
|
5376
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5377
|
+
|
5133
5378
|
</xsl:template></xsl:stylesheet>
|