metanorma-ogc 1.2.6 → 1.2.11
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 +29 -8
- 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 +61 -3
- data/lib/isodoc/ogc/base_convert.rb +2 -3
- data/lib/isodoc/ogc/biblio.rb +1 -0
- data/lib/isodoc/ogc/html/htmlstyle.css +206 -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 +293 -69
- data/lib/isodoc/ogc/ogc.best-practice.xsl +293 -69
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +293 -69
- data/lib/isodoc/ogc/ogc.community-practice.xsl +293 -69
- data/lib/isodoc/ogc/ogc.community-standard.xsl +293 -69
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +293 -69
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +293 -69
- data/lib/isodoc/ogc/ogc.other.xsl +293 -69
- data/lib/isodoc/ogc/ogc.policy.xsl +293 -69
- data/lib/isodoc/ogc/ogc.reference-model.xsl +293 -69
- data/lib/isodoc/ogc/ogc.release-notes.xsl +293 -69
- data/lib/isodoc/ogc/ogc.standard.xsl +293 -69
- data/lib/isodoc/ogc/ogc.test-suite.xsl +293 -69
- data/lib/isodoc/ogc/ogc.user-guide.xsl +293 -69
- data/lib/isodoc/ogc/ogc.white-paper.xsl +289 -66
- data/lib/isodoc/ogc/presentation_xml_convert.rb +13 -0
- data/lib/isodoc/ogc/word_convert.rb +7 -1
- data/lib/isodoc/ogc/xref.rb +8 -4
- 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 +6 -6
@@ -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}">
|
@@ -201,7 +201,8 @@
|
|
201
201
|
</xsl:call-template>
|
202
202
|
</fo:block>
|
203
203
|
<fo:block font-size="12pt" font-weight="bold">
|
204
|
-
<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]))"/>
|
205
206
|
<xsl:call-template name="addLetterSpacing">
|
206
207
|
<xsl:with-param name="text" select="$stage"/>
|
207
208
|
</xsl:call-template>
|
@@ -1068,13 +1069,13 @@
|
|
1068
1069
|
<xsl:otherwise> <!-- for ordered lists -->
|
1069
1070
|
<xsl:choose>
|
1070
1071
|
<xsl:when test="../@type = 'arabic'">
|
1071
|
-
<xsl:number format="a)"/>
|
1072
|
+
<xsl:number format="a)" lang="en"/>
|
1072
1073
|
</xsl:when>
|
1073
1074
|
<xsl:when test="../@type = 'alphabet'">
|
1074
1075
|
<xsl:number format="1)"/>
|
1075
1076
|
</xsl:when>
|
1076
1077
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1077
|
-
<xsl:number format="A)"/>
|
1078
|
+
<xsl:number format="A)" lang="en"/>
|
1078
1079
|
</xsl:when>
|
1079
1080
|
|
1080
1081
|
<xsl:when test="../@type = 'roman'">
|
@@ -1327,7 +1328,7 @@
|
|
1327
1328
|
<xsl:variable name="sectionNum">
|
1328
1329
|
<xsl:choose>
|
1329
1330
|
<xsl:when test="normalize-space($sectionNum_) = '' and local-name() = 'annex'">
|
1330
|
-
<xsl:number format="A" count="ogc:annex"/>
|
1331
|
+
<xsl:number format="A" count="ogc:annex" lang="en"/>
|
1331
1332
|
</xsl:when>
|
1332
1333
|
<xsl:otherwise>
|
1333
1334
|
<xsl:value-of select="$sectionNum_"/>
|
@@ -1515,13 +1516,22 @@
|
|
1515
1516
|
<title-part lang="en">
|
1516
1517
|
|
1517
1518
|
|
1519
|
+
|
1518
1520
|
</title-part>
|
1519
1521
|
<title-part lang="fr">
|
1520
1522
|
|
1521
1523
|
|
1524
|
+
|
1522
1525
|
</title-part>
|
1523
1526
|
<title-part lang="zh">第 # 部分:</title-part>
|
1524
1527
|
|
1528
|
+
<title-subpart lang="en">
|
1529
|
+
|
1530
|
+
</title-subpart>
|
1531
|
+
<title-subpart lang="fr">
|
1532
|
+
|
1533
|
+
</title-subpart>
|
1534
|
+
|
1525
1535
|
<title-modified lang="en">modified</title-modified>
|
1526
1536
|
<title-modified lang="fr">modifiée</title-modified>
|
1527
1537
|
|
@@ -1623,7 +1633,7 @@
|
|
1623
1633
|
|
1624
1634
|
|
1625
1635
|
|
1626
|
-
<xsl:attribute name="font-family">
|
1636
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1627
1637
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1628
1638
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
1629
1639
|
|
@@ -1877,6 +1887,7 @@
|
|
1877
1887
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1878
1888
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1879
1889
|
|
1890
|
+
|
1880
1891
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1881
1892
|
|
1882
1893
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1912,6 +1923,7 @@
|
|
1912
1923
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1913
1924
|
|
1914
1925
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1926
|
+
|
1915
1927
|
|
1916
1928
|
|
1917
1929
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1961,7 +1973,7 @@
|
|
1961
1973
|
|
1962
1974
|
|
1963
1975
|
|
1964
|
-
<xsl:attribute name="font-family">
|
1976
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1965
1977
|
|
1966
1978
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1967
1979
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -2039,7 +2051,9 @@
|
|
2039
2051
|
<fo:block> </fo:block>
|
2040
2052
|
|
2041
2053
|
|
2042
|
-
|
2054
|
+
<!-- <xsl:if test="$namespace = 'bipm'">
|
2055
|
+
<fo:block> </fo:block>
|
2056
|
+
</xsl:if> -->
|
2043
2057
|
|
2044
2058
|
<!-- $namespace = 'iso' or -->
|
2045
2059
|
|
@@ -2073,10 +2087,12 @@
|
|
2073
2087
|
|
2074
2088
|
|
2075
2089
|
<xsl:variable name="colwidths">
|
2076
|
-
<xsl:
|
2077
|
-
<xsl:
|
2078
|
-
|
2079
|
-
|
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>
|
2080
2096
|
</xsl:variable>
|
2081
2097
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2082
2098
|
|
@@ -2123,7 +2139,12 @@
|
|
2123
2139
|
|
2124
2140
|
<xsl:variable name="table_attributes">
|
2125
2141
|
<attribute name="table-layout">fixed</attribute>
|
2126
|
-
<attribute name="width">
|
2142
|
+
<attribute name="width">
|
2143
|
+
<xsl:choose>
|
2144
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
2145
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
2146
|
+
</xsl:choose>
|
2147
|
+
</attribute>
|
2127
2148
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2128
2149
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2129
2150
|
|
@@ -2155,16 +2176,25 @@
|
|
2155
2176
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2156
2177
|
</xsl:if>
|
2157
2178
|
|
2158
|
-
<xsl:
|
2159
|
-
<xsl:
|
2160
|
-
<xsl:
|
2161
|
-
<fo:table-column column-width="
|
2162
|
-
</xsl:
|
2163
|
-
|
2164
|
-
|
2165
|
-
|
2166
|
-
|
2167
|
-
|
2179
|
+
<xsl:choose>
|
2180
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2181
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2182
|
+
<fo:table-column column-width="{@width}"/>
|
2183
|
+
</xsl:for-each>
|
2184
|
+
</xsl:when>
|
2185
|
+
<xsl:otherwise>
|
2186
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2187
|
+
<xsl:choose>
|
2188
|
+
<xsl:when test=". = 1 or . = 0">
|
2189
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2190
|
+
</xsl:when>
|
2191
|
+
<xsl:otherwise>
|
2192
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2193
|
+
</xsl:otherwise>
|
2194
|
+
</xsl:choose>
|
2195
|
+
</xsl:for-each>
|
2196
|
+
</xsl:otherwise>
|
2197
|
+
</xsl:choose>
|
2168
2198
|
|
2169
2199
|
<xsl:choose>
|
2170
2200
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -2177,10 +2207,12 @@
|
|
2177
2207
|
|
2178
2208
|
</fo:table>
|
2179
2209
|
|
2210
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2180
2211
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2181
2212
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2182
2213
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2183
2214
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2215
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2184
2216
|
</xsl:call-template>
|
2185
2217
|
</xsl:for-each>
|
2186
2218
|
|
@@ -2213,6 +2245,7 @@
|
|
2213
2245
|
<xsl:if test="normalize-space() != ''">
|
2214
2246
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
2215
2247
|
|
2248
|
+
|
2216
2249
|
<xsl:apply-templates/>
|
2217
2250
|
</fo:block>
|
2218
2251
|
</xsl:if>
|
@@ -2435,12 +2468,22 @@
|
|
2435
2468
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2436
2469
|
<xsl:param name="table_attributes"/>
|
2437
2470
|
<xsl:param name="colwidths"/>
|
2471
|
+
<xsl:param name="colgroup"/>
|
2438
2472
|
|
2439
2473
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2440
2474
|
|
2441
2475
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2442
2476
|
|
2443
|
-
<xsl:variable name="cols-count"
|
2477
|
+
<xsl:variable name="cols-count">
|
2478
|
+
<xsl:choose>
|
2479
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2480
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
2481
|
+
</xsl:when>
|
2482
|
+
<xsl:otherwise>
|
2483
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
2484
|
+
</xsl:otherwise>
|
2485
|
+
</xsl:choose>
|
2486
|
+
</xsl:variable>
|
2444
2487
|
|
2445
2488
|
<fo:table keep-with-previous="always">
|
2446
2489
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -2458,16 +2501,25 @@
|
|
2458
2501
|
</xsl:choose>
|
2459
2502
|
</xsl:for-each>
|
2460
2503
|
|
2461
|
-
<xsl:
|
2462
|
-
<xsl:
|
2463
|
-
<xsl:
|
2464
|
-
<fo:table-column column-width="
|
2465
|
-
</xsl:
|
2466
|
-
|
2467
|
-
|
2468
|
-
|
2469
|
-
|
2470
|
-
|
2504
|
+
<xsl:choose>
|
2505
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2506
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2507
|
+
<fo:table-column column-width="{@width}"/>
|
2508
|
+
</xsl:for-each>
|
2509
|
+
</xsl:when>
|
2510
|
+
<xsl:otherwise>
|
2511
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2512
|
+
<xsl:choose>
|
2513
|
+
<xsl:when test=". = 1 or . = 0">
|
2514
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2515
|
+
</xsl:when>
|
2516
|
+
<xsl:otherwise>
|
2517
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2518
|
+
</xsl:otherwise>
|
2519
|
+
</xsl:choose>
|
2520
|
+
</xsl:for-each>
|
2521
|
+
</xsl:otherwise>
|
2522
|
+
</xsl:choose>
|
2471
2523
|
|
2472
2524
|
<fo:table-body>
|
2473
2525
|
<fo:table-row>
|
@@ -2582,6 +2634,7 @@
|
|
2582
2634
|
</xsl:if>
|
2583
2635
|
</xsl:if>
|
2584
2636
|
|
2637
|
+
|
2585
2638
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
2586
2639
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
2587
2640
|
</xsl:if> -->
|
@@ -2671,7 +2724,8 @@
|
|
2671
2724
|
</xsl:attribute>
|
2672
2725
|
</xsl:if>
|
2673
2726
|
<xsl:call-template name="display-align"/>
|
2674
|
-
<fo:block>
|
2727
|
+
<fo:block>
|
2728
|
+
|
2675
2729
|
<xsl:apply-templates/>
|
2676
2730
|
</fo:block>
|
2677
2731
|
</fo:table-cell>
|
@@ -2896,7 +2950,13 @@
|
|
2896
2950
|
<xsl:apply-templates/>
|
2897
2951
|
</fo:inline>
|
2898
2952
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2899
|
-
<fo:block-container
|
2953
|
+
<fo:block-container>
|
2954
|
+
|
2955
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2956
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2957
|
+
</xsl:if>
|
2958
|
+
|
2959
|
+
|
2900
2960
|
<xsl:if test="parent::*[local-name() = 'note']">
|
2901
2961
|
<xsl:attribute name="margin-left">
|
2902
2962
|
<xsl:choose>
|
@@ -2906,8 +2966,12 @@
|
|
2906
2966
|
</xsl:attribute>
|
2907
2967
|
|
2908
2968
|
</xsl:if>
|
2909
|
-
<fo:block-container
|
2910
|
-
|
2969
|
+
<fo:block-container>
|
2970
|
+
|
2971
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2972
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2973
|
+
|
2974
|
+
|
2911
2975
|
<xsl:variable name="parent" select="local-name(..)"/>
|
2912
2976
|
|
2913
2977
|
<xsl:variable name="key_iso">
|
@@ -2921,9 +2985,12 @@
|
|
2921
2985
|
<fo:block margin-bottom="12pt" text-align="left">
|
2922
2986
|
|
2923
2987
|
<xsl:variable name="title-where">
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2988
|
+
|
2989
|
+
|
2990
|
+
<xsl:call-template name="getTitle">
|
2991
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
2992
|
+
</xsl:call-template>
|
2993
|
+
|
2927
2994
|
</xsl:variable>
|
2928
2995
|
<xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
|
2929
2996
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
@@ -2939,9 +3006,12 @@
|
|
2939
3006
|
|
2940
3007
|
|
2941
3008
|
<xsl:variable name="title-where">
|
2942
|
-
|
2943
|
-
|
2944
|
-
|
3009
|
+
|
3010
|
+
|
3011
|
+
<xsl:call-template name="getTitle">
|
3012
|
+
<xsl:with-param name="name" select="'title-where'"/>
|
3013
|
+
</xsl:call-template>
|
3014
|
+
|
2945
3015
|
</xsl:variable>
|
2946
3016
|
<xsl:value-of select="$title-where"/>
|
2947
3017
|
</fo:block>
|
@@ -2952,9 +3022,12 @@
|
|
2952
3022
|
|
2953
3023
|
|
2954
3024
|
<xsl:variable name="title-key">
|
2955
|
-
|
2956
|
-
|
2957
|
-
|
3025
|
+
|
3026
|
+
|
3027
|
+
<xsl:call-template name="getTitle">
|
3028
|
+
<xsl:with-param name="name" select="'title-key'"/>
|
3029
|
+
</xsl:call-template>
|
3030
|
+
|
2958
3031
|
</xsl:variable>
|
2959
3032
|
<xsl:value-of select="$title-key"/>
|
2960
3033
|
</fo:block>
|
@@ -3080,12 +3153,32 @@
|
|
3080
3153
|
</xsl:otherwise>
|
3081
3154
|
</xsl:choose>
|
3082
3155
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
3083
|
-
<xsl:
|
3084
|
-
<xsl:
|
3085
|
-
|
3086
|
-
<xsl:
|
3087
|
-
|
3088
|
-
|
3156
|
+
<xsl:variable name="lengths">
|
3157
|
+
<xsl:for-each select="*[local-name()='dt']">
|
3158
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
3159
|
+
<xsl:variable name="attributes">
|
3160
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
3161
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
3162
|
+
</xsl:variable>
|
3163
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
3164
|
+
</xsl:for-each>
|
3165
|
+
</xsl:variable>
|
3166
|
+
<xsl:variable name="maxLength">
|
3167
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
3168
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
3169
|
+
<xsl:if test="position() = 1">
|
3170
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
3171
|
+
</xsl:if>
|
3172
|
+
</xsl:for-each> -->
|
3173
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
3174
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
3175
|
+
<xsl:if test="position() = 1">
|
3176
|
+
<xsl:value-of select="."/>
|
3177
|
+
</xsl:if>
|
3178
|
+
</xsl:for-each>
|
3179
|
+
</xsl:variable>
|
3180
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
3181
|
+
<xsl:value-of select="$maxLength"/>
|
3089
3182
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
3090
3183
|
<xsl:param name="key_iso"/>
|
3091
3184
|
|
@@ -3202,6 +3295,7 @@
|
|
3202
3295
|
</fo:inline>
|
3203
3296
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3204
3297
|
<fo:inline font-weight="bold">
|
3298
|
+
|
3205
3299
|
<xsl:apply-templates/>
|
3206
3300
|
</fo:inline>
|
3207
3301
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -3241,6 +3335,10 @@
|
|
3241
3335
|
</xsl:if>
|
3242
3336
|
<xsl:apply-templates/>
|
3243
3337
|
</fo:inline>
|
3338
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
3339
|
+
<fo:inline text-decoration="underline">
|
3340
|
+
<xsl:apply-templates/>
|
3341
|
+
</fo:inline>
|
3244
3342
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3245
3343
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3246
3344
|
<xsl:apply-templates/>
|
@@ -3530,7 +3628,18 @@
|
|
3530
3628
|
<xsl:with-param name="previousRow" select="$newRow"/>
|
3531
3629
|
</xsl:apply-templates>
|
3532
3630
|
</xsl:template><xsl:template name="getLang">
|
3533
|
-
<xsl:variable name="
|
3631
|
+
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
3632
|
+
<xsl:variable name="language">
|
3633
|
+
<xsl:choose>
|
3634
|
+
<xsl:when test="$language_current != ''">
|
3635
|
+
<xsl:value-of select="$language_current"/>
|
3636
|
+
</xsl:when>
|
3637
|
+
<xsl:otherwise>
|
3638
|
+
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
3639
|
+
</xsl:otherwise>
|
3640
|
+
</xsl:choose>
|
3641
|
+
</xsl:variable>
|
3642
|
+
|
3534
3643
|
<xsl:choose>
|
3535
3644
|
<xsl:when test="$language = 'English'">en</xsl:when>
|
3536
3645
|
<xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
|
@@ -3565,6 +3674,7 @@
|
|
3565
3674
|
<xsl:value-of select="substring($str, 2)"/>
|
3566
3675
|
</xsl:template><xsl:template match="mathml:math">
|
3567
3676
|
<fo:inline font-family="STIX Two Math"> <!-- -->
|
3677
|
+
|
3568
3678
|
<xsl:variable name="mathml">
|
3569
3679
|
<xsl:apply-templates select="." mode="mathml"/>
|
3570
3680
|
</xsl:variable>
|
@@ -3594,6 +3704,7 @@
|
|
3594
3704
|
</xsl:choose>
|
3595
3705
|
</xsl:variable>
|
3596
3706
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3707
|
+
|
3597
3708
|
<xsl:choose>
|
3598
3709
|
<xsl:when test="$target = ''">
|
3599
3710
|
<xsl:apply-templates/>
|
@@ -3647,10 +3758,14 @@
|
|
3647
3758
|
</fo:inline>
|
3648
3759
|
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
3649
3760
|
<xsl:variable name="title-modified">
|
3650
|
-
|
3651
|
-
|
3652
|
-
|
3761
|
+
|
3762
|
+
|
3763
|
+
<xsl:call-template name="getTitle">
|
3764
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
3765
|
+
</xsl:call-template>
|
3766
|
+
|
3653
3767
|
</xsl:variable>
|
3768
|
+
|
3654
3769
|
<xsl:choose>
|
3655
3770
|
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:text>—</xsl:text></xsl:when>
|
3656
3771
|
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:text> — </xsl:text></xsl:otherwise>
|
@@ -3809,7 +3924,8 @@
|
|
3809
3924
|
</fo:inline>
|
3810
3925
|
</xsl:if>
|
3811
3926
|
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3812
|
-
<fo:block-container id="{@id}">
|
3927
|
+
<fo:block-container id="{@id}">
|
3928
|
+
|
3813
3929
|
<fo:block>
|
3814
3930
|
<xsl:apply-templates/>
|
3815
3931
|
</fo:block>
|
@@ -3860,7 +3976,7 @@
|
|
3860
3976
|
<xsl:apply-templates mode="bookmarks"/>
|
3861
3977
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3862
3978
|
<xsl:apply-templates select="."/>
|
3863
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3979
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3864
3980
|
<xsl:apply-templates mode="bookmarks"/>
|
3865
3981
|
</xsl:template><xsl:template name="addBookmarks">
|
3866
3982
|
<xsl:param name="contents"/>
|
@@ -3876,6 +3992,8 @@
|
|
3876
3992
|
<xsl:variable name="bookmark-title_">
|
3877
3993
|
<xsl:call-template name="getLangVersion">
|
3878
3994
|
<xsl:with-param name="lang" select="@lang"/>
|
3995
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3996
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3879
3997
|
</xsl:call-template>
|
3880
3998
|
</xsl:variable>
|
3881
3999
|
<xsl:choose>
|
@@ -3893,13 +4011,34 @@
|
|
3893
4011
|
</xsl:choose>
|
3894
4012
|
</fo:bookmark-title>
|
3895
4013
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4014
|
+
|
4015
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4016
|
+
<xsl:with-param name="contents" select="contents"/>
|
4017
|
+
</xsl:call-template>
|
4018
|
+
|
4019
|
+
<xsl:call-template name="insertTableBookmarks">
|
4020
|
+
<xsl:with-param name="contents" select="contents"/>
|
4021
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4022
|
+
</xsl:call-template>
|
4023
|
+
|
3896
4024
|
</fo:bookmark>
|
3897
4025
|
|
3898
4026
|
</xsl:for-each>
|
3899
4027
|
</xsl:when>
|
3900
4028
|
<xsl:otherwise>
|
3901
4029
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4030
|
+
|
3902
4031
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4032
|
+
|
4033
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4034
|
+
<xsl:with-param name="contents" select="contents"/>
|
4035
|
+
</xsl:call-template>
|
4036
|
+
|
4037
|
+
<xsl:call-template name="insertTableBookmarks">
|
4038
|
+
<xsl:with-param name="contents" select="contents"/>
|
4039
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4040
|
+
</xsl:call-template>
|
4041
|
+
|
3903
4042
|
</xsl:for-each>
|
3904
4043
|
</xsl:otherwise>
|
3905
4044
|
</xsl:choose>
|
@@ -3961,8 +4100,44 @@
|
|
3961
4100
|
|
3962
4101
|
</fo:bookmark-tree>
|
3963
4102
|
</xsl:if>
|
4103
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
4104
|
+
<xsl:param name="contents"/>
|
4105
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
4106
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
4107
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4108
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
4109
|
+
<fo:bookmark internal-destination="{@id}">
|
4110
|
+
<fo:bookmark-title>
|
4111
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4112
|
+
</fo:bookmark-title>
|
4113
|
+
</fo:bookmark>
|
4114
|
+
</xsl:for-each>
|
4115
|
+
</fo:bookmark>
|
4116
|
+
</xsl:if>
|
4117
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
4118
|
+
<xsl:param name="contents"/>
|
4119
|
+
<xsl:param name="lang"/>
|
4120
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
4121
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
4122
|
+
<fo:bookmark-title>
|
4123
|
+
<xsl:choose>
|
4124
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
4125
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4126
|
+
</xsl:choose>
|
4127
|
+
</fo:bookmark-title>
|
4128
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
4129
|
+
<fo:bookmark internal-destination="{@id}">
|
4130
|
+
<fo:bookmark-title>
|
4131
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4132
|
+
</fo:bookmark-title>
|
4133
|
+
</fo:bookmark>
|
4134
|
+
</xsl:for-each>
|
4135
|
+
</fo:bookmark>
|
4136
|
+
</xsl:if>
|
3964
4137
|
</xsl:template><xsl:template name="getLangVersion">
|
3965
4138
|
<xsl:param name="lang"/>
|
4139
|
+
<xsl:param name="doctype" select="''"/>
|
4140
|
+
<xsl:param name="title" select="''"/>
|
3966
4141
|
<xsl:choose>
|
3967
4142
|
<xsl:when test="$lang = 'en'">
|
3968
4143
|
|
@@ -4433,9 +4608,14 @@
|
|
4433
4608
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4434
4609
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4435
4610
|
|
4436
|
-
|
4437
|
-
|
4438
|
-
|
4611
|
+
|
4612
|
+
|
4613
|
+
|
4614
|
+
<xsl:call-template name="getTitle">
|
4615
|
+
<xsl:with-param name="name" select="'title-source'"/>
|
4616
|
+
</xsl:call-template>
|
4617
|
+
|
4618
|
+
|
4439
4619
|
<xsl:text>: </xsl:text>
|
4440
4620
|
</fo:inline>
|
4441
4621
|
|
@@ -4460,7 +4640,8 @@
|
|
4460
4640
|
<fo:block-container margin-left="0mm">
|
4461
4641
|
|
4462
4642
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4463
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4643
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4644
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4464
4645
|
</fo:block>
|
4465
4646
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4466
4647
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4585,9 +4766,12 @@
|
|
4585
4766
|
</fo:block>
|
4586
4767
|
</xsl:template><xsl:template match="*[local-name() = 'deprecates']">
|
4587
4768
|
<xsl:variable name="title-deprecated">
|
4588
|
-
|
4589
|
-
|
4590
|
-
|
4769
|
+
|
4770
|
+
|
4771
|
+
<xsl:call-template name="getTitle">
|
4772
|
+
<xsl:with-param name="name" select="'title-deprecated'"/>
|
4773
|
+
</xsl:call-template>
|
4774
|
+
|
4591
4775
|
</xsl:variable>
|
4592
4776
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
4593
4777
|
<xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
|
@@ -4641,7 +4825,7 @@
|
|
4641
4825
|
<fo:block id="{@id}">
|
4642
4826
|
<xsl:apply-templates/>
|
4643
4827
|
</fo:block>
|
4644
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4828
|
+
</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']">
|
4645
4829
|
|
4646
4830
|
<fo:block id="{@id}">
|
4647
4831
|
<xsl:apply-templates/>
|
@@ -4698,7 +4882,8 @@
|
|
4698
4882
|
<fo:table-column column-width="107mm"/>
|
4699
4883
|
<fo:table-column column-width="15mm"/>
|
4700
4884
|
<fo:table-body>
|
4701
|
-
<fo:table-row
|
4885
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4886
|
+
|
4702
4887
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
4703
4888
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
4704
4889
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -4717,6 +4902,10 @@
|
|
4717
4902
|
</fo:table-cell>
|
4718
4903
|
</xsl:template><xsl:template name="processBibitem">
|
4719
4904
|
|
4905
|
+
|
4906
|
+
<!-- end BIPM bibitem processing-->
|
4907
|
+
|
4908
|
+
|
4720
4909
|
<!-- start OGC bibtem processing -->
|
4721
4910
|
<xsl:choose>
|
4722
4911
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -4916,6 +5105,8 @@
|
|
4916
5105
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4917
5106
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4918
5107
|
<xsl:value-of select="substring(.,1,1)"/>
|
5108
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5109
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4919
5110
|
</xsl:template><xsl:template name="convertDate">
|
4920
5111
|
<xsl:param name="date"/>
|
4921
5112
|
<xsl:param name="format" select="'short'"/>
|
@@ -5095,13 +5286,22 @@
|
|
5095
5286
|
</xsl:template><xsl:template name="split">
|
5096
5287
|
<xsl:param name="pText" select="."/>
|
5097
5288
|
<xsl:param name="sep" select="','"/>
|
5289
|
+
<xsl:param name="normalize-space" select="'true'"/>
|
5098
5290
|
<xsl:if test="string-length($pText) >0">
|
5099
5291
|
<item>
|
5100
|
-
<xsl:
|
5292
|
+
<xsl:choose>
|
5293
|
+
<xsl:when test="$normalize-space = 'true'">
|
5294
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
5295
|
+
</xsl:when>
|
5296
|
+
<xsl:otherwise>
|
5297
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
5298
|
+
</xsl:otherwise>
|
5299
|
+
</xsl:choose>
|
5101
5300
|
</item>
|
5102
5301
|
<xsl:call-template name="split">
|
5103
5302
|
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
5104
5303
|
<xsl:with-param name="sep" select="$sep"/>
|
5304
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
5105
5305
|
</xsl:call-template>
|
5106
5306
|
</xsl:if>
|
5107
5307
|
</xsl:template><xsl:template name="getDocumentId">
|
@@ -5167,4 +5367,28 @@
|
|
5167
5367
|
<xsl:with-param name="letter-spacing" select="$letter-spacing"/>
|
5168
5368
|
</xsl:call-template>
|
5169
5369
|
</xsl:if>
|
5370
|
+
</xsl:template><xsl:template name="repeat">
|
5371
|
+
<xsl:param name="char" select="'*'"/>
|
5372
|
+
<xsl:param name="count"/>
|
5373
|
+
<xsl:if test="$count > 0">
|
5374
|
+
<xsl:value-of select="$char"/>
|
5375
|
+
<xsl:call-template name="repeat">
|
5376
|
+
<xsl:with-param name="char" select="$char"/>
|
5377
|
+
<xsl:with-param name="count" select="$count - 1"/>
|
5378
|
+
</xsl:call-template>
|
5379
|
+
</xsl:if>
|
5380
|
+
</xsl:template><xsl:template name="getLocalizedString">
|
5381
|
+
<xsl:param name="key"/>
|
5382
|
+
|
5383
|
+
<xsl:variable name="curr_lang">
|
5384
|
+
<xsl:call-template name="getLang"/>
|
5385
|
+
</xsl:variable>
|
5386
|
+
|
5387
|
+
<xsl:choose>
|
5388
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5389
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5390
|
+
</xsl:when>
|
5391
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
5392
|
+
</xsl:choose>
|
5393
|
+
|
5170
5394
|
</xsl:template></xsl:stylesheet>
|