metanorma-ogc 1.2.8 → 1.2.13
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 +3 -0
- data/.rubocop.yml +0 -4
- data/lib/asciidoctor/ogc/basicdoc.rng +52 -3
- data/lib/asciidoctor/ogc/converter.rb +5 -6
- data/lib/asciidoctor/ogc/isodoc.rng +114 -3
- data/lib/isodoc/ogc/base_convert.rb +2 -2
- data/lib/isodoc/ogc/html_convert.rb +2 -2
- data/lib/isodoc/ogc/i18n-en.yaml +1 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +253 -49
- data/lib/isodoc/ogc/ogc.best-practice.xsl +253 -49
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +253 -49
- data/lib/isodoc/ogc/ogc.community-practice.xsl +253 -49
- data/lib/isodoc/ogc/ogc.community-standard.xsl +253 -49
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +253 -49
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +253 -49
- data/lib/isodoc/ogc/ogc.other.xsl +253 -49
- data/lib/isodoc/ogc/ogc.policy.xsl +253 -49
- data/lib/isodoc/ogc/ogc.reference-model.xsl +253 -49
- data/lib/isodoc/ogc/ogc.release-notes.xsl +253 -49
- data/lib/isodoc/ogc/ogc.standard.xsl +253 -49
- data/lib/isodoc/ogc/ogc.test-suite.xsl +253 -49
- data/lib/isodoc/ogc/ogc.user-guide.xsl +253 -49
- data/lib/isodoc/ogc/ogc.white-paper.xsl +246 -42
- data/lib/isodoc/ogc/word_convert.rb +7 -9
- data/lib/isodoc/ogc/xref.rb +8 -4
- data/lib/metanorma/ogc/processor.rb +16 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +7 -8
- data/lib/metanorma/ogc/fonts_manifest.yaml +0 -6
@@ -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}">
|
@@ -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>
|
@@ -2038,7 +2040,7 @@
|
|
2038
2040
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
2039
2041
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
2040
2042
|
<xsl:call-template name="add-zero-spaces-java"/>
|
2041
|
-
</xsl:template><xsl:template match="*[local-name()='table']">
|
2043
|
+
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
2042
2044
|
|
2043
2045
|
<xsl:variable name="simple-table">
|
2044
2046
|
<xsl:call-template name="getSimpleTable"/>
|
@@ -2086,10 +2088,12 @@
|
|
2086
2088
|
|
2087
2089
|
|
2088
2090
|
<xsl:variable name="colwidths">
|
2089
|
-
<xsl:
|
2090
|
-
<xsl:
|
2091
|
-
|
2092
|
-
|
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>
|
2093
2097
|
</xsl:variable>
|
2094
2098
|
<!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
|
2095
2099
|
|
@@ -2136,7 +2140,12 @@
|
|
2136
2140
|
|
2137
2141
|
<xsl:variable name="table_attributes">
|
2138
2142
|
<attribute name="table-layout">fixed</attribute>
|
2139
|
-
<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>
|
2140
2149
|
<attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2141
2150
|
<attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
|
2142
2151
|
|
@@ -2168,16 +2177,25 @@
|
|
2168
2177
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2169
2178
|
</xsl:if>
|
2170
2179
|
|
2171
|
-
<xsl:
|
2172
|
-
<xsl:
|
2173
|
-
<xsl:
|
2174
|
-
<fo:table-column column-width="
|
2175
|
-
</xsl:
|
2176
|
-
|
2177
|
-
|
2178
|
-
|
2179
|
-
|
2180
|
-
|
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>
|
2181
2199
|
|
2182
2200
|
<xsl:choose>
|
2183
2201
|
<xsl:when test="not(*[local-name()='tbody']) and *[local-name()='thead']">
|
@@ -2190,10 +2208,12 @@
|
|
2190
2208
|
|
2191
2209
|
</fo:table>
|
2192
2210
|
|
2211
|
+
<xsl:variable name="colgroup" select="*[local-name()='colgroup']"/>
|
2193
2212
|
<xsl:for-each select="*[local-name()='tbody']"><!-- select context to tbody -->
|
2194
2213
|
<xsl:call-template name="insertTableFooterInSeparateTable">
|
2195
2214
|
<xsl:with-param name="table_attributes" select="$table_attributes"/>
|
2196
2215
|
<xsl:with-param name="colwidths" select="$colwidths"/>
|
2216
|
+
<xsl:with-param name="colgroup" select="$colgroup"/>
|
2197
2217
|
</xsl:call-template>
|
2198
2218
|
</xsl:for-each>
|
2199
2219
|
|
@@ -2449,12 +2469,22 @@
|
|
2449
2469
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
2450
2470
|
<xsl:param name="table_attributes"/>
|
2451
2471
|
<xsl:param name="colwidths"/>
|
2472
|
+
<xsl:param name="colgroup"/>
|
2452
2473
|
|
2453
2474
|
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2454
2475
|
|
2455
2476
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2456
2477
|
|
2457
|
-
<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>
|
2458
2488
|
|
2459
2489
|
<fo:table keep-with-previous="always">
|
2460
2490
|
<xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
|
@@ -2472,16 +2502,25 @@
|
|
2472
2502
|
</xsl:choose>
|
2473
2503
|
</xsl:for-each>
|
2474
2504
|
|
2475
|
-
<xsl:
|
2476
|
-
<xsl:
|
2477
|
-
<xsl:
|
2478
|
-
<fo:table-column column-width="
|
2479
|
-
</xsl:
|
2480
|
-
|
2481
|
-
|
2482
|
-
|
2483
|
-
|
2484
|
-
|
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>
|
2485
2524
|
|
2486
2525
|
<fo:table-body>
|
2487
2526
|
<fo:table-row>
|
@@ -2914,7 +2953,9 @@
|
|
2914
2953
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
2915
2954
|
<fo:block-container>
|
2916
2955
|
|
2917
|
-
<xsl:
|
2956
|
+
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
2957
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2958
|
+
</xsl:if>
|
2918
2959
|
|
2919
2960
|
|
2920
2961
|
<xsl:if test="parent::*[local-name() = 'note']">
|
@@ -2929,6 +2970,7 @@
|
|
2929
2970
|
<fo:block-container>
|
2930
2971
|
|
2931
2972
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2973
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2932
2974
|
|
2933
2975
|
|
2934
2976
|
<xsl:variable name="parent" select="local-name(..)"/>
|
@@ -3112,12 +3154,32 @@
|
|
3112
3154
|
</xsl:otherwise>
|
3113
3155
|
</xsl:choose>
|
3114
3156
|
</xsl:template><xsl:template name="getMaxLength_dt">
|
3115
|
-
<xsl:
|
3116
|
-
<xsl:
|
3117
|
-
|
3118
|
-
<xsl:
|
3119
|
-
|
3120
|
-
|
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"/>
|
3121
3183
|
</xsl:template><xsl:template match="*[local-name()='dl']/*[local-name()='note']" priority="2">
|
3122
3184
|
<xsl:param name="key_iso"/>
|
3123
3185
|
|
@@ -3258,6 +3320,7 @@
|
|
3258
3320
|
|
3259
3321
|
|
3260
3322
|
|
3323
|
+
|
3261
3324
|
10
|
3262
3325
|
|
3263
3326
|
|
@@ -3274,6 +3337,10 @@
|
|
3274
3337
|
</xsl:if>
|
3275
3338
|
<xsl:apply-templates/>
|
3276
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>
|
3277
3344
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
3278
3345
|
<fo:inline font-size="10pt" color="red" text-decoration="line-through">
|
3279
3346
|
<xsl:apply-templates/>
|
@@ -3858,7 +3925,7 @@
|
|
3858
3925
|
</xsl:if> -->
|
3859
3926
|
</fo:inline>
|
3860
3927
|
</xsl:if>
|
3861
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']">
|
3928
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
3862
3929
|
<fo:block-container id="{@id}">
|
3863
3930
|
|
3864
3931
|
<fo:block>
|
@@ -3927,6 +3994,8 @@
|
|
3927
3994
|
<xsl:variable name="bookmark-title_">
|
3928
3995
|
<xsl:call-template name="getLangVersion">
|
3929
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"/>
|
3930
3999
|
</xsl:call-template>
|
3931
4000
|
</xsl:variable>
|
3932
4001
|
<xsl:choose>
|
@@ -3944,13 +4013,34 @@
|
|
3944
4013
|
</xsl:choose>
|
3945
4014
|
</fo:bookmark-title>
|
3946
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
|
+
|
3947
4026
|
</fo:bookmark>
|
3948
4027
|
|
3949
4028
|
</xsl:for-each>
|
3950
4029
|
</xsl:when>
|
3951
4030
|
<xsl:otherwise>
|
3952
4031
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
4032
|
+
|
3953
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
|
+
|
3954
4044
|
</xsl:for-each>
|
3955
4045
|
</xsl:otherwise>
|
3956
4046
|
</xsl:choose>
|
@@ -4012,8 +4102,44 @@
|
|
4012
4102
|
|
4013
4103
|
</fo:bookmark-tree>
|
4014
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>
|
4015
4139
|
</xsl:template><xsl:template name="getLangVersion">
|
4016
4140
|
<xsl:param name="lang"/>
|
4141
|
+
<xsl:param name="doctype" select="''"/>
|
4142
|
+
<xsl:param name="title" select="''"/>
|
4017
4143
|
<xsl:choose>
|
4018
4144
|
<xsl:when test="$lang = 'en'">
|
4019
4145
|
|
@@ -4049,6 +4175,12 @@
|
|
4049
4175
|
<!-- <xsl:text> </xsl:text> -->
|
4050
4176
|
</xsl:template><xsl:template name="getSection">
|
4051
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
|
+
|
4052
4184
|
</xsl:template><xsl:template name="getName">
|
4053
4185
|
<xsl:choose>
|
4054
4186
|
<xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
|
@@ -4101,6 +4233,10 @@
|
|
4101
4233
|
<xsl:copy>
|
4102
4234
|
<xsl:apply-templates mode="contents_item"/>
|
4103
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>
|
4104
4240
|
</xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
|
4105
4241
|
<xsl:text> </xsl:text>
|
4106
4242
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
@@ -4126,6 +4262,7 @@
|
|
4126
4262
|
|
4127
4263
|
|
4128
4264
|
|
4265
|
+
|
4129
4266
|
|
4130
4267
|
|
4131
4268
|
|
@@ -4516,7 +4653,8 @@
|
|
4516
4653
|
<fo:block-container margin-left="0mm">
|
4517
4654
|
|
4518
4655
|
<fo:block xsl:use-attribute-sets="quote-style">
|
4519
|
-
<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 -->
|
4520
4658
|
</fo:block>
|
4521
4659
|
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
4522
4660
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
@@ -4668,6 +4806,7 @@
|
|
4668
4806
|
|
4669
4807
|
|
4670
4808
|
|
4809
|
+
|
4671
4810
|
|
4672
4811
|
|
4673
4812
|
|
@@ -4684,7 +4823,7 @@
|
|
4684
4823
|
|
4685
4824
|
|
4686
4825
|
|
4687
|
-
</xsl:template><xsl:template match="
|
4826
|
+
</xsl:template><xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
|
4688
4827
|
<fo:block break-after="page"/>
|
4689
4828
|
<fo:block>
|
4690
4829
|
<xsl:call-template name="setId"/>
|
@@ -4692,7 +4831,8 @@
|
|
4692
4831
|
</fo:block>
|
4693
4832
|
</xsl:template><xsl:template match="*[local-name() = 'clause']">
|
4694
4833
|
<fo:block>
|
4695
|
-
<xsl:call-template name="setId"/>
|
4834
|
+
<xsl:call-template name="setId"/>
|
4835
|
+
|
4696
4836
|
|
4697
4837
|
<xsl:apply-templates/>
|
4698
4838
|
</fo:block>
|
@@ -4757,7 +4897,8 @@
|
|
4757
4897
|
<fo:table-column column-width="107mm"/>
|
4758
4898
|
<fo:table-column column-width="15mm"/>
|
4759
4899
|
<fo:table-body>
|
4760
|
-
<fo:table-row
|
4900
|
+
<fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
|
4901
|
+
|
4761
4902
|
<fo:table-cell border="1pt solid black"><fo:block>Date</fo:block></fo:table-cell>
|
4762
4903
|
<fo:table-cell border="1pt solid black"><fo:block>Type</fo:block></fo:table-cell>
|
4763
4904
|
<fo:table-cell border="1pt solid black"><fo:block>Change</fo:block></fo:table-cell>
|
@@ -4776,6 +4917,10 @@
|
|
4776
4917
|
</fo:table-cell>
|
4777
4918
|
</xsl:template><xsl:template name="processBibitem">
|
4778
4919
|
|
4920
|
+
|
4921
|
+
<!-- end BIPM bibitem processing-->
|
4922
|
+
|
4923
|
+
|
4779
4924
|
<!-- start OGC bibtem processing -->
|
4780
4925
|
<xsl:choose>
|
4781
4926
|
<xsl:when test="*[local-name() = 'formattedref']">
|
@@ -4975,6 +5120,8 @@
|
|
4975
5120
|
<xsl:value-of select="translate(.,'. ','')"/>
|
4976
5121
|
</xsl:template><xsl:template match="*[local-name() = 'name']/*[local-name() = 'forename']/text()" mode="strip">
|
4977
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>
|
4978
5125
|
</xsl:template><xsl:template name="convertDate">
|
4979
5126
|
<xsl:param name="date"/>
|
4980
5127
|
<xsl:param name="format" select="'short'"/>
|
@@ -4999,6 +5146,57 @@
|
|
4999
5146
|
</xsl:variable>
|
5000
5147
|
<xsl:variable name="result">
|
5001
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>
|
5002
5200
|
<xsl:when test="$format = 'short' or $day = ''">
|
5003
5201
|
<xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
|
5004
5202
|
</xsl:when>
|
@@ -5193,6 +5391,7 @@
|
|
5193
5391
|
|
5194
5392
|
|
5195
5393
|
|
5394
|
+
|
5196
5395
|
</xsl:variable>
|
5197
5396
|
<xsl:if test="$documentNS != $XSLNS">
|
5198
5397
|
<xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
|
@@ -5252,6 +5451,11 @@
|
|
5252
5451
|
<xsl:call-template name="getLang"/>
|
5253
5452
|
</xsl:variable>
|
5254
5453
|
|
5255
|
-
<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>
|
5256
5460
|
|
5257
5461
|
</xsl:template></xsl:stylesheet>
|