metanorma-ogc 1.2.7 → 1.2.12
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 +7 -5
- data/lib/asciidoctor/ogc/basicdoc.rng +52 -3
- data/lib/asciidoctor/ogc/converter.rb +0 -1
- data/lib/asciidoctor/ogc/isodoc.rng +51 -3
- data/lib/isodoc/ogc/base_convert.rb +2 -2
- 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 +6 -3
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +263 -55
- data/lib/isodoc/ogc/ogc.best-practice.xsl +263 -55
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +263 -55
- data/lib/isodoc/ogc/ogc.community-practice.xsl +263 -55
- data/lib/isodoc/ogc/ogc.community-standard.xsl +263 -55
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +263 -55
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +263 -55
- data/lib/isodoc/ogc/ogc.other.xsl +263 -55
- data/lib/isodoc/ogc/ogc.policy.xsl +263 -55
- data/lib/isodoc/ogc/ogc.reference-model.xsl +263 -55
- data/lib/isodoc/ogc/ogc.release-notes.xsl +263 -55
- data/lib/isodoc/ogc/ogc.standard.xsl +263 -55
- data/lib/isodoc/ogc/ogc.test-suite.xsl +263 -55
- data/lib/isodoc/ogc/ogc.user-guide.xsl +263 -55
- data/lib/isodoc/ogc/ogc.white-paper.xsl +255 -47
- data/lib/isodoc/ogc/presentation_xml_convert.rb +13 -0
- data/lib/isodoc/ogc/word_convert.rb +9 -5
- 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}">
|
@@ -118,14 +118,14 @@
|
|
118
118
|
<fo:flow flow-name="xsl-region-body" color="white">
|
119
119
|
|
120
120
|
<!-- background image -->
|
121
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm">
|
121
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
122
122
|
<fo:block>
|
123
123
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
124
124
|
</fo:block>
|
125
125
|
</fo:block-container>
|
126
126
|
|
127
127
|
<!-- background color -->
|
128
|
-
<fo:block-container absolute-position="fixed" left="0" top="0">
|
128
|
+
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
129
129
|
<fo:block>
|
130
130
|
<fo:instream-foreign-object content-height="{$pageHeight}" fox:alt-text="Background color">
|
131
131
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="215.9mm" height="279.4mm">
|
@@ -268,7 +268,7 @@
|
|
268
268
|
</xsl:if>
|
269
269
|
|
270
270
|
<!-- crossing lines -->
|
271
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}">
|
271
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
272
272
|
<fo:block>
|
273
273
|
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
274
274
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -301,7 +301,7 @@
|
|
301
301
|
<fo:flow flow-name="xsl-region-body">
|
302
302
|
|
303
303
|
<!-- crossing lines -->
|
304
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}">
|
304
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
305
305
|
<fo:block>
|
306
306
|
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
307
307
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -595,7 +595,7 @@
|
|
595
595
|
</xsl:call-template>
|
596
596
|
<fo:flow flow-name="xsl-region-body">
|
597
597
|
<!-- background color -->
|
598
|
-
<fo:block-container absolute-position="fixed" left="0" top="0">
|
598
|
+
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
599
599
|
<fo:block>
|
600
600
|
<fo:instream-foreign-object content-height="{$pageHeight}" fox:alt-text="Background color">
|
601
601
|
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -1069,13 +1069,13 @@
|
|
1069
1069
|
<xsl:otherwise> <!-- for ordered lists -->
|
1070
1070
|
<xsl:choose>
|
1071
1071
|
<xsl:when test="../@type = 'arabic'">
|
1072
|
-
<xsl:number format="a)"/>
|
1072
|
+
<xsl:number format="a)" lang="en"/>
|
1073
1073
|
</xsl:when>
|
1074
1074
|
<xsl:when test="../@type = 'alphabet'">
|
1075
1075
|
<xsl:number format="1)"/>
|
1076
1076
|
</xsl:when>
|
1077
1077
|
<xsl:when test="../@type = 'alphabet_upper'">
|
1078
|
-
<xsl:number format="A)"/>
|
1078
|
+
<xsl:number format="A)" lang="en"/>
|
1079
1079
|
</xsl:when>
|
1080
1080
|
|
1081
1081
|
<xsl:when test="../@type = 'roman'">
|
@@ -1328,7 +1328,7 @@
|
|
1328
1328
|
<xsl:variable name="sectionNum">
|
1329
1329
|
<xsl:choose>
|
1330
1330
|
<xsl:when test="normalize-space($sectionNum_) = '' and local-name() = 'annex'">
|
1331
|
-
<xsl:number format="A" count="ogc:annex"/>
|
1331
|
+
<xsl:number format="A" count="ogc:annex" lang="en"/>
|
1332
1332
|
</xsl:when>
|
1333
1333
|
<xsl:otherwise>
|
1334
1334
|
<xsl:value-of select="$sectionNum_"/>
|
@@ -1351,7 +1351,7 @@
|
|
1351
1351
|
</xsl:template>
|
1352
1352
|
|
1353
1353
|
<xsl:template name="insertCrossingLines">
|
1354
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}">
|
1354
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
1355
1355
|
<fo:block>
|
1356
1356
|
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
1357
1357
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
@@ -1633,7 +1633,7 @@
|
|
1633
1633
|
|
1634
1634
|
|
1635
1635
|
|
1636
|
-
<xsl:attribute name="font-family">
|
1636
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1637
1637
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
1638
1638
|
<xsl:attribute name="line-height">113%</xsl:attribute>
|
1639
1639
|
|
@@ -1887,6 +1887,7 @@
|
|
1887
1887
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
1888
1888
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
1889
1889
|
|
1890
|
+
|
1890
1891
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
1891
1892
|
|
1892
1893
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1898,6 +1899,7 @@
|
|
1898
1899
|
|
1899
1900
|
|
1900
1901
|
|
1902
|
+
|
1901
1903
|
</xsl:attribute-set><xsl:attribute-set name="quote-source-style">
|
1902
1904
|
|
1903
1905
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
@@ -1922,6 +1924,7 @@
|
|
1922
1924
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
1923
1925
|
|
1924
1926
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
1927
|
+
|
1925
1928
|
|
1926
1929
|
|
1927
1930
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
@@ -1971,7 +1974,7 @@
|
|
1971
1974
|
|
1972
1975
|
|
1973
1976
|
|
1974
|
-
<xsl:attribute name="font-family">
|
1977
|
+
<xsl:attribute name="font-family">Fira Code</xsl:attribute>
|
1975
1978
|
|
1976
1979
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
|
1977
1980
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
@@ -2037,7 +2040,7 @@
|
|
2037
2040
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2038
2041
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
2039
2042
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2040
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
2043
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2041
2044
|
|
2042
2045
|
<xsl:variable name="simple-table">
|
2043
2046
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -2085,10 +2088,12 @@
|
|
2085
2088
|
|
2086
2089
|
|
2087
2090
|
<xsl:variable name="colwidths">
|
2088
|
-
<xsl:
|
2089
|
-
<xsl:
|
2090
|
-
|
2091
|
-
|
2091
|
+
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
2092
|
+
<xsl:call-template name="calculate-column-widths">
|
2093
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2094
|
+
<xsl:with-param name="table" select="$simple-table"/>
|
2095
|
+
</xsl:call-template>
|
2096
|
+
</xsl:if>
|
2092
2097
|
</xsl:variable>
|
2093
2098
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2094
2099
|
|
@@ -2135,7 +2140,12 @@
|
|
2135
2140
|
|
2136
2141
|
<xsl:variable name="table_attributes">
|
2137
2142
|
<attribute name="table-layout">fixed</attribute>
|
2138
|
-
<attribute name="width">
|
2143
|
+
<attribute name="width">
|
2144
|
+
<xsl:choose>
|
2145
|
+
<xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
|
2146
|
+
<xsl:otherwise>100%</xsl:otherwise>
|
2147
|
+
</xsl:choose>
|
2148
|
+
</attribute>
|
2139
2149
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2140
2150
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2141
2151
|
|
@@ -2167,16 +2177,25 @@
|
|
2167
2177
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2168
2178
|
</xsl:if>
|
2169
2179
|
|
2170
|
-
<xsl:
|
2171
|
-
<xsl:
|
2172
|
-
<xsl:
|
2173
|
-
<fo:table-column column-width="
|
2174
|
-
</xsl:
|
2175
|
-
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
+
<xsl:choose>
|
2181
|
+
<xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
|
2182
|
+
<xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
|
2183
|
+
<fo:table-column column-width="{@width}"/>
|
2184
|
+
</xsl:for-each>
|
2185
|
+
</xsl:when>
|
2186
|
+
<xsl:otherwise>
|
2187
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2188
|
+
<xsl:choose>
|
2189
|
+
<xsl:when test=". = 1 or . = 0">
|
2190
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2191
|
+
</xsl:when>
|
2192
|
+
<xsl:otherwise>
|
2193
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2194
|
+
</xsl:otherwise>
|
2195
|
+
</xsl:choose>
|
2196
|
+
</xsl:for-each>
|
2197
|
+
</xsl:otherwise>
|
2198
|
+
</xsl:choose>
|
2180
2199
|
|
2181
2200
|
<xsl:choose>
|
2182
2201
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -2189,10 +2208,12 @@
|
|
2189
2208
|
|
2190
2209
|
</fo:table>
|
2191
2210
|
|
2211
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2192
2212
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2193
2213
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2194
2214
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2195
2215
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2216
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2196
2217
|
</xsl:call-template>
|
2197
2218
|
</xsl:for-each>
|
2198
2219
|
|
@@ -2448,12 +2469,22 @@
|
|
2448
2469
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2449
2470
|
<xsl:param name="table_attributes"/>
|
2450
2471
|
<xsl:param name="colwidths"/>
|
2472
|
+
<xsl:param name="colgroup"/>
|
2451
2473
|
|
2452
2474
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2453
2475
|
|
2454
2476
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2455
2477
|
|
2456
|
-
<xsl:variable name="cols-count"
|
2478
|
+
<xsl:variable name="cols-count">
|
2479
|
+
<xsl:choose>
|
2480
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2481
|
+
<xsl:value-of select="count(xalan:nodeset($colgroup)//*[local-name()='col'])"/>
|
2482
|
+
</xsl:when>
|
2483
|
+
<xsl:otherwise>
|
2484
|
+
<xsl:value-of select="count(xalan:nodeset($colwidths)//column)"/>
|
2485
|
+
</xsl:otherwise>
|
2486
|
+
</xsl:choose>
|
2487
|
+
</xsl:variable>
|
2457
2488
|
|
2458
2489
|
<fo:table keep-with-previous="always">
|
2459
2490
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -2471,16 +2502,25 @@
|
|
2471
2502
|
</xsl:choose>
|
2472
2503
|
</xsl:for-each>
|
2473
2504
|
|
2474
|
-
<xsl:
|
2475
|
-
<xsl:
|
2476
|
-
<xsl:
|
2477
|
-
<fo:table-column column-width="
|
2478
|
-
</xsl:
|
2479
|
-
|
2480
|
-
|
2481
|
-
|
2482
|
-
|
2483
|
-
|
2505
|
+
<xsl:choose>
|
2506
|
+
<xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2507
|
+
<xsl:for-each select="xalan:nodeset($colgroup)//*[local-name()='col']">
|
2508
|
+
<fo:table-column column-width="{@width}"/>
|
2509
|
+
</xsl:for-each>
|
2510
|
+
</xsl:when>
|
2511
|
+
<xsl:otherwise>
|
2512
|
+
<xsl:for-each select="xalan:nodeset($colwidths)//column">
|
2513
|
+
<xsl:choose>
|
2514
|
+
<xsl:when test=". = 1 or . = 0">
|
2515
|
+
<fo:table-column column-width="proportional-column-width(2)"/>
|
2516
|
+
</xsl:when>
|
2517
|
+
<xsl:otherwise>
|
2518
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
2519
|
+
</xsl:otherwise>
|
2520
|
+
</xsl:choose>
|
2521
|
+
</xsl:for-each>
|
2522
|
+
</xsl:otherwise>
|
2523
|
+
</xsl:choose>
|
2484
2524
|
|
2485
2525
|
<fo:table-body>
|
2486
2526
|
<fo:table-row>
|
@@ -2913,7 +2953,9 @@
|
|
2913
2953
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2914
2954
|
<fo:block-container>
|
2915
2955
|
|
2916
|
-
<xsl:
|
2956
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2957
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2958
|
+
</xsl:if>
|
2917
2959
|
|
2918
2960
|
|
2919
2961
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2928,6 +2970,7 @@
|
|
2928
2970
|
<fo:block-container>
|
2929
2971
|
|
2930
2972
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2973
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2931
2974
|
|
2932
2975
|
|
2933
2976
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -3111,12 +3154,32 @@
|
|
3111
3154
|
</xsl:otherwise>
|
3112
3155
|
</xsl:choose>
|
3113
3156
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
3114
|
-
<xsl:
|
3115
|
-
<xsl:
|
3116
|
-
|
3117
|
-
<xsl:
|
3118
|
-
|
3119
|
-
|
3157
|
+
<xsl:variable name="lengths">
|
3158
|
+
<xsl:for-each select="*[local-name()='dt']">
|
3159
|
+
<xsl:variable name="maintext_length" select="string-length(normalize-space(.))"/>
|
3160
|
+
<xsl:variable name="attributes">
|
3161
|
+
<xsl:for-each select=".//@open"><xsl:value-of select="."/></xsl:for-each>
|
3162
|
+
<xsl:for-each select=".//@close"><xsl:value-of select="."/></xsl:for-each>
|
3163
|
+
</xsl:variable>
|
3164
|
+
<length><xsl:value-of select="string-length(normalize-space(.)) + string-length($attributes)"/></length>
|
3165
|
+
</xsl:for-each>
|
3166
|
+
</xsl:variable>
|
3167
|
+
<xsl:variable name="maxLength">
|
3168
|
+
<!-- <xsl:for-each select="*[local-name()='dt']">
|
3169
|
+
<xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
|
3170
|
+
<xsl:if test="position() = 1">
|
3171
|
+
<xsl:value-of select="string-length(normalize-space(.))"/>
|
3172
|
+
</xsl:if>
|
3173
|
+
</xsl:for-each> -->
|
3174
|
+
<xsl:for-each select="xalan:nodeset($lengths)/length">
|
3175
|
+
<xsl:sort select="." data-type="number" order="descending"/>
|
3176
|
+
<xsl:if test="position() = 1">
|
3177
|
+
<xsl:value-of select="."/>
|
3178
|
+
</xsl:if>
|
3179
|
+
</xsl:for-each>
|
3180
|
+
</xsl:variable>
|
3181
|
+
<!-- <xsl:message>DEBUG:<xsl:value-of select="$maxLength"/></xsl:message> -->
|
3182
|
+
<xsl:value-of select="$maxLength"/>
|
3120
3183
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
3121
3184
|
<xsl:param name="key_iso"/>
|
3122
3185
|
|
@@ -3233,6 +3296,7 @@
|
|
3233
3296
|
</fo:inline>
|
3234
3297
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3235
3298
|
<fo:inline font-weight="bold">
|
3299
|
+
|
3236
3300
|
<xsl:apply-templates/>
|
3237
3301
|
</fo:inline>
|
3238
3302
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
@@ -3256,6 +3320,7 @@
|
|
3256
3320
|
|
3257
3321
|
|
3258
3322
|
|
3323
|
+
|
3259
3324
|
10
|
3260
3325
|
|
3261
3326
|
|
@@ -3272,6 +3337,10 @@
|
|
3272
3337
|
</xsl:if>
|
3273
3338
|
<xsl:apply-templates/>
|
3274
3339
|
</fo:inline>
|
3340
|
+
</xsl:template><xsl:template match="*[local-name()='underline']">
|
3341
|
+
<fo:inline text-decoration="underline">
|
3342
|
+
<xsl:apply-templates/>
|
3343
|
+
</fo:inline>
|
3275
3344
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3276
3345
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3277
3346
|
<xsl:apply-templates/>
|
@@ -3637,6 +3706,7 @@
|
|
3637
3706
|
</xsl:choose>
|
3638
3707
|
</xsl:variable>
|
3639
3708
|
<fo:inline xsl:use-attribute-sets="link-style">
|
3709
|
+
|
3640
3710
|
<xsl:choose>
|
3641
3711
|
<xsl:when test="$target = ''">
|
3642
3712
|
<xsl:apply-templates/>
|
@@ -3855,8 +3925,9 @@
|
|
3855
3925
|
</xsl:if> -->
|
3856
3926
|
</fo:inline>
|
3857
3927
|
</xsl:if>
|
3858
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3859
|
-
<fo:block-container id="{@id}">
|
3928
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3929
|
+
<fo:block-container id="{@id}">
|
3930
|
+
|
3860
3931
|
<fo:block>
|
3861
3932
|
<xsl:apply-templates/>
|
3862
3933
|
</fo:block>
|
@@ -3907,7 +3978,7 @@
|
|
3907
3978
|
<xsl:apply-templates mode="bookmarks"/>
|
3908
3979
|
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
3909
3980
|
<xsl:apply-templates select="."/>
|
3910
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3981
|
+
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
3911
3982
|
<xsl:apply-templates mode="bookmarks"/>
|
3912
3983
|
</xsl:template><xsl:template name="addBookmarks">
|
3913
3984
|
<xsl:param name="contents"/>
|
@@ -3923,6 +3994,8 @@
|
|
3923
3994
|
<xsl:variable name="bookmark-title_">
|
3924
3995
|
<xsl:call-template name="getLangVersion">
|
3925
3996
|
<xsl:with-param name="lang" select="@lang"/>
|
3997
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
3998
|
+
<xsl:with-param name="title" select="@title-part"/>
|
3926
3999
|
</xsl:call-template>
|
3927
4000
|
</xsl:variable>
|
3928
4001
|
<xsl:choose>
|
@@ -3940,13 +4013,34 @@
|
|
3940
4013
|
</xsl:choose>
|
3941
4014
|
</fo:bookmark-title>
|
3942
4015
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4016
|
+
|
4017
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4018
|
+
<xsl:with-param name="contents" select="contents"/>
|
4019
|
+
</xsl:call-template>
|
4020
|
+
|
4021
|
+
<xsl:call-template name="insertTableBookmarks">
|
4022
|
+
<xsl:with-param name="contents" select="contents"/>
|
4023
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4024
|
+
</xsl:call-template>
|
4025
|
+
|
3943
4026
|
</fo:bookmark>
|
3944
4027
|
|
3945
4028
|
</xsl:for-each>
|
3946
4029
|
</xsl:when>
|
3947
4030
|
<xsl:otherwise>
|
3948
4031
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4032
|
+
|
3949
4033
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4034
|
+
|
4035
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4036
|
+
<xsl:with-param name="contents" select="contents"/>
|
4037
|
+
</xsl:call-template>
|
4038
|
+
|
4039
|
+
<xsl:call-template name="insertTableBookmarks">
|
4040
|
+
<xsl:with-param name="contents" select="contents"/>
|
4041
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4042
|
+
</xsl:call-template>
|
4043
|
+
|
3950
4044
|
</xsl:for-each>
|
3951
4045
|
</xsl:otherwise>
|
3952
4046
|
</xsl:choose>
|
@@ -4008,8 +4102,44 @@
|
|
4008
4102
|
|
4009
4103
|
</fo:bookmark-tree>
|
4010
4104
|
</xsl:if>
|
4105
|
+
</xsl:template><xsl:template name="insertFigureBookmarks">
|
4106
|
+
<xsl:param name="contents"/>
|
4107
|
+
<xsl:if test="xalan:nodeset($contents)/figure">
|
4108
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
|
4109
|
+
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4110
|
+
<xsl:for-each select="xalan:nodeset($contents)/figure">
|
4111
|
+
<fo:bookmark internal-destination="{@id}">
|
4112
|
+
<fo:bookmark-title>
|
4113
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4114
|
+
</fo:bookmark-title>
|
4115
|
+
</fo:bookmark>
|
4116
|
+
</xsl:for-each>
|
4117
|
+
</fo:bookmark>
|
4118
|
+
</xsl:if>
|
4119
|
+
</xsl:template><xsl:template name="insertTableBookmarks">
|
4120
|
+
<xsl:param name="contents"/>
|
4121
|
+
<xsl:param name="lang"/>
|
4122
|
+
<xsl:if test="xalan:nodeset($contents)/table">
|
4123
|
+
<fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
|
4124
|
+
<fo:bookmark-title>
|
4125
|
+
<xsl:choose>
|
4126
|
+
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
4127
|
+
<xsl:otherwise>Tables</xsl:otherwise>
|
4128
|
+
</xsl:choose>
|
4129
|
+
</fo:bookmark-title>
|
4130
|
+
<xsl:for-each select="xalan:nodeset($contents)/table">
|
4131
|
+
<fo:bookmark internal-destination="{@id}">
|
4132
|
+
<fo:bookmark-title>
|
4133
|
+
<xsl:value-of select="normalize-space(title)"/>
|
4134
|
+
</fo:bookmark-title>
|
4135
|
+
</fo:bookmark>
|
4136
|
+
</xsl:for-each>
|
4137
|
+
</fo:bookmark>
|
4138
|
+
</xsl:if>
|
4011
4139
|
</xsl:template><xsl:template name="getLangVersion">
|
4012
4140
|
<xsl:param name="lang"/>
|
4141
|
+
<xsl:param name="doctype" select="''"/>
|
4142
|
+
<xsl:param name="title" select="''"/>
|
4013
4143
|
<xsl:choose>
|
4014
4144
|
<xsl:when test="$lang = 'en'">
|
4015
4145
|
|
@@ -4045,6 +4175,12 @@
|
|
4045
4175
|
<!-- <xsl:text> </xsl:text> -->
|
4046
4176
|
</xsl:template><xsl:template name="getSection">
|
4047
4177
|
<xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4178
|
+
<!--
|
4179
|
+
<xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
|
4180
|
+
<xsl:value-of select="."/>
|
4181
|
+
</xsl:for-each>
|
4182
|
+
-->
|
4183
|
+
|
4048
4184
|
</xsl:template><xsl:template name="getName">
|
4049
4185
|
<xsl:choose>
|
4050
4186
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -4097,6 +4233,10 @@
|
|
4097
4233
|
<xsl:copy>
|
4098
4234
|
<xsl:apply-templates mode="contents_item"/>
|
4099
4235
|
</xsl:copy>
|
4236
|
+
</xsl:template><xsl:template match="*[local-name() = 'em']" mode="contents_item">
|
4237
|
+
<xsl:copy>
|
4238
|
+
<xsl:apply-templates mode="contents_item"/>
|
4239
|
+
</xsl:copy>
|
4100
4240
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4101
4241
|
<xsl:text> </xsl:text>
|
4102
4242
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -4122,6 +4262,7 @@
|
|
4122
4262
|
|
4123
4263
|
|
4124
4264
|
|
4265
|
+
|
4125
4266
|
|
4126
4267
|
|
4127
4268
|
|
@@ -4512,7 +4653,8 @@
|
|
4512
4653
|
<fo:block-container margin-left="0mm">
|
4513
4654
|
|
4514
4655
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4515
|
-
<xsl:apply-templates select=".//*[local-name() = 'p']"/>
|
4656
|
+
<!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
|
4657
|
+
<xsl:apply-templates select="./*[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
|
4516
4658
|
</fo:block>
|
4517
4659
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4518
4660
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4664,6 +4806,7 @@
|
|
4664
4806
|
|
4665
4807
|
|
4666
4808
|
|
4809
|
+
|
4667
4810
|
|
4668
4811
|
|
4669
4812
|
|
@@ -4680,7 +4823,7 @@
|
|
4680
4823
|
|
4681
4824
|
|
4682
4825
|
|
4683
|
-
</xsl:template><xsl:template match="
|
4826
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4684
4827
|
<fo:block break-after="page"/>
|
4685
4828
|
<fo:block>
|
4686
4829
|
<xsl:call-template name="setId"/>
|
@@ -4688,7 +4831,8 @@
|
|
4688
4831
|
</fo:block>
|
4689
4832
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4690
4833
|
<fo:block>
|
4691
|
-
<xsl:call-template name="setId"/>
|
4834
|
+
<xsl:call-template name="setId"/>
|
4835
|
+
|
4692
4836
|
|
4693
4837
|
<xsl:apply-templates/>
|
4694
4838
|
</fo:block>
|
@@ -4696,7 +4840,7 @@
|
|
4696
4840
|
<fo:block id="{@id}">
|
4697
4841
|
<xsl:apply-templates/>
|
4698
4842
|
</fo:block>
|
4699
|
-
</xsl:template><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
|
4843
|
+
</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']">
|
4700
4844
|
|
4701
4845
|
<fo:block id="{@id}">
|
4702
4846
|
<xsl:apply-templates/>
|
@@ -4753,7 +4897,8 @@
|
|
4753
4897
|
<fo:table-column column-width="107mm"/>
|
4754
4898
|
<fo:table-column column-width="15mm"/>
|
4755
4899
|
<fo:table-body>
|
4756
|
-
<fo:table-row
|
4900
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4901
|
+
|
4757
4902
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
4758
4903
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
4759
4904
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -4772,6 +4917,10 @@
|
|
4772
4917
|
</fo:table-cell>
|
4773
4918
|
</xsl:template><xsl:template name="processBibitem">
|
4774
4919
|
|
4920
|
+
|
4921
|
+
<!-- end BIPM bibitem processing-->
|
4922
|
+
|
4923
|
+
|
4775
4924
|
<!-- start OGC bibtem processing -->
|
4776
4925
|
<xsl:choose>
|
4777
4926
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -4971,6 +5120,8 @@
|
|
4971
5120
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4972
5121
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4973
5122
|
<xsl:value-of select="substring(.,1,1)"/>
|
5123
|
+
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
5124
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
4974
5125
|
</xsl:template><xsl:template name="convertDate">
|
4975
5126
|
<xsl:param name="date"/>
|
4976
5127
|
<xsl:param name="format" select="'short'"/>
|
@@ -4995,6 +5146,57 @@
|
|
4995
5146
|
</xsl:variable>
|
4996
5147
|
<xsl:variable name="result">
|
4997
5148
|
<xsl:choose>
|
5149
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
5150
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5151
|
+
<xsl:text> </xsl:text>
|
5152
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
5153
|
+
</xsl:when>
|
5154
|
+
<xsl:when test="$format = 'ddMM'">
|
5155
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5156
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
5157
|
+
</xsl:when>
|
5158
|
+
<xsl:when test="$format = 'short' or $day = ''">
|
5159
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5160
|
+
</xsl:when>
|
5161
|
+
<xsl:otherwise>
|
5162
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
|
5163
|
+
</xsl:otherwise>
|
5164
|
+
</xsl:choose>
|
5165
|
+
</xsl:variable>
|
5166
|
+
<xsl:value-of select="$result"/>
|
5167
|
+
</xsl:template><xsl:template name="convertDateLocalized">
|
5168
|
+
<xsl:param name="date"/>
|
5169
|
+
<xsl:param name="format" select="'short'"/>
|
5170
|
+
<xsl:variable name="year" select="substring($date, 1, 4)"/>
|
5171
|
+
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
5172
|
+
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
5173
|
+
<xsl:variable name="monthStr">
|
5174
|
+
<xsl:choose>
|
5175
|
+
<xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
|
5176
|
+
<xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
|
5177
|
+
<xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
|
5178
|
+
<xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
|
5179
|
+
<xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
|
5180
|
+
<xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
|
5181
|
+
<xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
|
5182
|
+
<xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
|
5183
|
+
<xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
|
5184
|
+
<xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
|
5185
|
+
<xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
|
5186
|
+
<xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
|
5187
|
+
</xsl:choose>
|
5188
|
+
</xsl:variable>
|
5189
|
+
<xsl:variable name="result">
|
5190
|
+
<xsl:choose>
|
5191
|
+
<xsl:when test="$format = 'ddMMyyyy'">
|
5192
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5193
|
+
<xsl:text> </xsl:text>
|
5194
|
+
<xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
|
5195
|
+
</xsl:when>
|
5196
|
+
<xsl:when test="$format = 'ddMM'">
|
5197
|
+
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5198
|
+
<xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
|
5199
|
+
</xsl:when>
|
4998
5200
|
<xsl:when test="$format = 'short' or $day = ''">
|
4999
5201
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5000
5202
|
</xsl:when>
|
@@ -5189,6 +5391,7 @@
|
|
5189
5391
|
|
5190
5392
|
|
5191
5393
|
|
5394
|
+
|
5192
5395
|
</xsl:variable>
|
5193
5396
|
<xsl:if test="$documentNS != $XSLNS">
|
5194
5397
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5248,6 +5451,11 @@
|
|
5248
5451
|
<xsl:call-template name="getLang"/>
|
5249
5452
|
</xsl:variable>
|
5250
5453
|
|
5251
|
-
<xsl:
|
5454
|
+
<xsl:choose>
|
5455
|
+
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
5456
|
+
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
5457
|
+
</xsl:when>
|
5458
|
+
<xsl:otherwise><xsl:value-of select="$key"/></xsl:otherwise>
|
5459
|
+
</xsl:choose>
|
5252
5460
|
|
5253
5461
|
</xsl:template></xsl:stylesheet>
|