metanorma-ogc 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/rake.yml +1 -1
- data/lib/asciidoctor/ogc/isodoc.rng +18 -1
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +312 -52
- data/lib/isodoc/ogc/ogc.best-practice.xsl +312 -52
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +312 -52
- data/lib/isodoc/ogc/ogc.community-practice.xsl +312 -52
- data/lib/isodoc/ogc/ogc.community-standard.xsl +312 -52
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +312 -52
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +312 -52
- data/lib/isodoc/ogc/ogc.other.xsl +312 -52
- data/lib/isodoc/ogc/ogc.policy.xsl +312 -52
- data/lib/isodoc/ogc/ogc.reference-model.xsl +312 -52
- data/lib/isodoc/ogc/ogc.release-notes.xsl +312 -52
- data/lib/isodoc/ogc/ogc.standard.xsl +312 -52
- data/lib/isodoc/ogc/ogc.test-suite.xsl +312 -52
- data/lib/isodoc/ogc/ogc.user-guide.xsl +312 -52
- data/lib/isodoc/ogc/ogc.white-paper.xsl +295 -35
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +2 -2
- metadata +6 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ad3456994609c7561163566d0be10cf0770f4f3423871dbefcf24657d5e551a7
|
|
4
|
+
data.tar.gz: 79a4f0da33d0194fb0684483977dcf75355f0660749d8bc649e710f72e31ae95
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 35342c6a703f8a6a3bb910cdceea76ae6500d0423c248b51efd55b5a850f25be5e645c89c8fe09a1f662a817a693dea123074c434afd7bfaadb05dc7d2ad6eb2
|
|
7
|
+
data.tar.gz: a7c312698494e453a5f12ac8450d2ebe182a8b708dbaef2352a5eeec9054a3151695cd3a2efce1f7f4d0d3e05a6050278932567d9e7da7c63c28b1ba438efc55
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -955,7 +955,24 @@
|
|
|
955
955
|
<define name="concept">
|
|
956
956
|
<element name="concept">
|
|
957
957
|
<optional>
|
|
958
|
-
<
|
|
958
|
+
<element name="refterm">
|
|
959
|
+
<zeroOrMore>
|
|
960
|
+
<choice>
|
|
961
|
+
<ref name="PureTextElement"/>
|
|
962
|
+
<ref name="stem"/>
|
|
963
|
+
</choice>
|
|
964
|
+
</zeroOrMore>
|
|
965
|
+
</element>
|
|
966
|
+
</optional>
|
|
967
|
+
<optional>
|
|
968
|
+
<element name="renderterm">
|
|
969
|
+
<zeroOrMore>
|
|
970
|
+
<choice>
|
|
971
|
+
<ref name="PureTextElement"/>
|
|
972
|
+
<ref name="stem"/>
|
|
973
|
+
</choice>
|
|
974
|
+
</zeroOrMore>
|
|
975
|
+
</element>
|
|
959
976
|
</optional>
|
|
960
977
|
<choice>
|
|
961
978
|
<ref name="eref"/>
|
|
@@ -7,8 +7,12 @@
|
|
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
|
8
8
|
<xsl:param name="basepath"/>
|
|
9
9
|
|
|
10
|
-
<xsl:variable name="pageWidth" select="
|
|
11
|
-
<xsl:variable name="pageHeight" select="
|
|
10
|
+
<xsl:variable name="pageWidth" select="215.9"/>
|
|
11
|
+
<xsl:variable name="pageHeight" select="279.4"/>
|
|
12
|
+
<xsl:variable name="marginLeftRight1" select="35"/>
|
|
13
|
+
<xsl:variable name="marginLeftRight2" select="17"/>
|
|
14
|
+
<xsl:variable name="marginTop" select="16.5"/>
|
|
15
|
+
<xsl:variable name="marginBottom" select="22.5"/>
|
|
12
16
|
|
|
13
17
|
|
|
14
18
|
|
|
@@ -74,7 +78,7 @@
|
|
|
74
78
|
<fo:root font-family="Lato, STIX Two Math, Source Han Sans" font-size="11pt" color="{$color_main}" xml:lang="{$lang}">
|
|
75
79
|
<fo:layout-master-set>
|
|
76
80
|
<!-- Cover page -->
|
|
77
|
-
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
81
|
+
<fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
78
82
|
<fo:region-body margin-top="16.5mm" margin-bottom="10mm" margin-left="16.5mm" margin-right="14mm"/>
|
|
79
83
|
<fo:region-before region-name="cover-page-header" extent="16.5mm"/>
|
|
80
84
|
<fo:region-after extent="10mm"/>
|
|
@@ -83,7 +87,7 @@
|
|
|
83
87
|
</fo:simple-page-master>
|
|
84
88
|
|
|
85
89
|
<!-- Preface pages -->
|
|
86
|
-
<fo:simple-page-master master-name="preface" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
90
|
+
<fo:simple-page-master master-name="preface" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
87
91
|
<fo:region-body margin-top="16.5mm" margin-bottom="22.5mm" margin-left="16.5mm" margin-right="16.5mm"/>
|
|
88
92
|
<fo:region-before region-name="header" extent="16.5mm"/>
|
|
89
93
|
<fo:region-after region-name="footer" extent="22.5mm"/>
|
|
@@ -93,12 +97,12 @@
|
|
|
93
97
|
|
|
94
98
|
|
|
95
99
|
<!-- Document pages -->
|
|
96
|
-
<fo:simple-page-master master-name="document" page-width="{$pageWidth}" page-height="{$pageHeight}">
|
|
97
|
-
<fo:region-body margin-top="
|
|
98
|
-
<fo:region-before region-name="header" extent="
|
|
99
|
-
<fo:region-after region-name="footer" extent="
|
|
100
|
+
<fo:simple-page-master master-name="document" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
|
|
101
|
+
<fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
|
|
102
|
+
<fo:region-before region-name="header" extent="{$marginTop}mm"/>
|
|
103
|
+
<fo:region-after region-name="footer" extent="{$marginBottom}mm"/>
|
|
100
104
|
<fo:region-start region-name="left-region" extent="16.5mm"/>
|
|
101
|
-
<fo:region-end region-name="right-region" extent="
|
|
105
|
+
<fo:region-end region-name="right-region" extent="{$marginLeftRight2}mm"/>
|
|
102
106
|
</fo:simple-page-master>
|
|
103
107
|
|
|
104
108
|
</fo:layout-master-set>
|
|
@@ -124,16 +128,16 @@
|
|
|
124
128
|
<!-- background image -->
|
|
125
129
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0">
|
|
126
130
|
<fo:block>
|
|
127
|
-
<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"/>
|
|
131
|
+
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Cover-Background))}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
|
|
128
132
|
</fo:block>
|
|
129
133
|
</fo:block-container>
|
|
130
134
|
|
|
131
135
|
<!-- background color -->
|
|
132
136
|
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
|
133
137
|
<fo:block>
|
|
134
|
-
<fo:instream-foreign-object content-height="{$pageHeight}" fox:alt-text="Background color">
|
|
135
|
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="
|
|
136
|
-
<rect width="
|
|
138
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
|
|
139
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
|
140
|
+
<rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:rgb(33,55,92);stroke-width:0;fill-opacity:0.85"/>
|
|
137
141
|
</svg>
|
|
138
142
|
</fo:instream-foreign-object>
|
|
139
143
|
</fo:block>
|
|
@@ -272,10 +276,10 @@
|
|
|
272
276
|
</xsl:if>
|
|
273
277
|
|
|
274
278
|
<!-- crossing lines -->
|
|
275
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
|
279
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
|
|
276
280
|
<fo:block>
|
|
277
|
-
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
|
278
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
|
281
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
|
|
282
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
|
279
283
|
<line x1="230" y1="0" x2="2159" y2="490" stroke="{$color_lightorange}"/>
|
|
280
284
|
<line x1="0" y1="395" x2="820" y2="0" stroke="{$color_lightorange}"/>
|
|
281
285
|
<circle style="fill:{$color_lightorange};" cx="614" cy="100" r="15"/>
|
|
@@ -305,10 +309,10 @@
|
|
|
305
309
|
<fo:flow flow-name="xsl-region-body">
|
|
306
310
|
|
|
307
311
|
<!-- crossing lines -->
|
|
308
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
|
312
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
|
|
309
313
|
<fo:block>
|
|
310
|
-
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
|
311
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
|
314
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
|
|
315
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
|
312
316
|
<line x1="0" y1="545" x2="2084" y2="0" stroke="{$color_lightorange}"/>
|
|
313
317
|
<line x1="0" y1="1374" x2="355" y2="0" stroke="{$color_lightorange}"/>
|
|
314
318
|
<circle style="fill:{$color_lightorange};" cx="227" cy="487" r="15"/>
|
|
@@ -601,9 +605,9 @@
|
|
|
601
605
|
<!-- background color -->
|
|
602
606
|
<fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
|
|
603
607
|
<fo:block>
|
|
604
|
-
<fo:instream-foreign-object content-height="{$pageHeight}" fox:alt-text="Background color">
|
|
605
|
-
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}" height="{$pageHeight}">
|
|
606
|
-
<rect width="
|
|
608
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
|
|
609
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
|
610
|
+
<rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:rgb(33,55,92);stroke-width:0;fill-opacity:1"/>
|
|
607
611
|
</svg>
|
|
608
612
|
</fo:instream-foreign-object>
|
|
609
613
|
</fo:block>
|
|
@@ -1355,10 +1359,10 @@
|
|
|
1355
1359
|
</xsl:template>
|
|
1356
1360
|
|
|
1357
1361
|
<xsl:template name="insertCrossingLines">
|
|
1358
|
-
<fo:block-container absolute-position="fixed" width="{$pageWidth}" height="{$pageHeight}" font-size="0">
|
|
1362
|
+
<fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
|
|
1359
1363
|
<fo:block>
|
|
1360
|
-
<fo:instream-foreign-object content-height="{$pageHeight}" content-width="{$pageWidth}" fox:alt-text="Crossing lines">
|
|
1361
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}" height="{$pageHeight}">
|
|
1364
|
+
<fo:instream-foreign-object content-height="{$pageHeight}mm" content-width="{$pageWidth}mm" fox:alt-text="Crossing lines">
|
|
1365
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2159 2794" width="{$pageWidth}mm" height="{$pageHeight}mm">
|
|
1362
1366
|
<line x1="0" y1="300" x2="2159" y2="675" stroke="{$color_orange}"/>
|
|
1363
1367
|
<line x1="1215" y1="0" x2="2159" y2="1380" stroke="{$color_orange}"/>
|
|
1364
1368
|
<line x1="0" y1="1850" x2="2159" y2="2390" stroke="{$color_orange}"/>
|
|
@@ -1840,6 +1844,7 @@
|
|
|
1840
1844
|
|
|
1841
1845
|
|
|
1842
1846
|
|
|
1847
|
+
|
|
1843
1848
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
|
1844
1849
|
|
|
1845
1850
|
|
|
@@ -2062,14 +2067,15 @@
|
|
|
2062
2067
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
2063
2068
|
|
|
2064
2069
|
<!-- Normative references -->
|
|
2065
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']" mode="contents"/>
|
|
2070
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
|
|
2066
2071
|
<!-- Terms and definitions -->
|
|
2067
2072
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
|
|
2068
2073
|
<!-- Another main sections -->
|
|
2069
2074
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
|
|
2070
2075
|
<xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
|
|
2071
2076
|
<!-- Bibliography -->
|
|
2072
|
-
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]" mode="contents"/>
|
|
2077
|
+
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
|
2078
|
+
|
|
2073
2079
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
2074
2080
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
2075
2081
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
@@ -2866,6 +2872,7 @@
|
|
|
2866
2872
|
|
|
2867
2873
|
|
|
2868
2874
|
|
|
2875
|
+
|
|
2869
2876
|
<xsl:attribute name="border">solid 0pt white</xsl:attribute>
|
|
2870
2877
|
|
|
2871
2878
|
|
|
@@ -2905,6 +2912,7 @@
|
|
|
2905
2912
|
|
|
2906
2913
|
|
|
2907
2914
|
|
|
2915
|
+
|
|
2908
2916
|
<fo:inline padding-right="2mm">
|
|
2909
2917
|
|
|
2910
2918
|
|
|
@@ -2954,6 +2962,7 @@
|
|
|
2954
2962
|
|
|
2955
2963
|
|
|
2956
2964
|
|
|
2965
|
+
|
|
2957
2966
|
<xsl:value-of select="@reference"/>
|
|
2958
2967
|
|
|
2959
2968
|
|
|
@@ -3094,6 +3103,9 @@
|
|
|
3094
3103
|
|
|
3095
3104
|
|
|
3096
3105
|
|
|
3106
|
+
|
|
3107
|
+
|
|
3108
|
+
|
|
3097
3109
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
|
3098
3110
|
|
|
3099
3111
|
|
|
@@ -4009,6 +4021,7 @@
|
|
|
4009
4021
|
<fo:inline xsl:use-attribute-sets="link-style">
|
|
4010
4022
|
|
|
4011
4023
|
|
|
4024
|
+
|
|
4012
4025
|
<xsl:choose>
|
|
4013
4026
|
<xsl:when test="$target_text = ''">
|
|
4014
4027
|
<xsl:apply-templates/>
|
|
@@ -4365,6 +4378,234 @@
|
|
|
4365
4378
|
<xsl:param name="height"/>
|
|
4366
4379
|
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
|
4367
4380
|
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
|
4381
|
+
</xsl:template><xsl:variable name="figure_name_height">14</xsl:variable><xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><xsl:variable name="image_dpi" select="96"/><xsl:variable name="width_effective_px" select="$width_effective div 25.4 * $image_dpi"/><xsl:variable name="height_effective_px" select="$height_effective div 25.4 * $image_dpi"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image']) and *[local-name() = 'svg']]/*[local-name() = 'name']/*[local-name() = 'bookmark']" priority="2"/><xsl:template match="*[local-name() = 'figure'][not(*[local-name() = 'image'])]/*[local-name() = 'svg']" priority="2" name="image_svg">
|
|
4382
|
+
<xsl:param name="name"/>
|
|
4383
|
+
|
|
4384
|
+
<xsl:variable name="svg_content">
|
|
4385
|
+
<xsl:apply-templates select="." mode="svg_update"/>
|
|
4386
|
+
</xsl:variable>
|
|
4387
|
+
|
|
4388
|
+
<xsl:variable name="alt-text">
|
|
4389
|
+
<xsl:choose>
|
|
4390
|
+
<xsl:when test="normalize-space(../*[local-name() = 'name']) != ''">
|
|
4391
|
+
<xsl:value-of select="../*[local-name() = 'name']"/>
|
|
4392
|
+
</xsl:when>
|
|
4393
|
+
<xsl:when test="normalize-space($name) != ''">
|
|
4394
|
+
<xsl:value-of select="$name"/>
|
|
4395
|
+
</xsl:when>
|
|
4396
|
+
<xsl:otherwise>Figure</xsl:otherwise>
|
|
4397
|
+
</xsl:choose>
|
|
4398
|
+
</xsl:variable>
|
|
4399
|
+
|
|
4400
|
+
<xsl:choose>
|
|
4401
|
+
<xsl:when test=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]">
|
|
4402
|
+
<fo:block>
|
|
4403
|
+
<xsl:variable name="width" select="@width"/>
|
|
4404
|
+
<xsl:variable name="height" select="@height"/>
|
|
4405
|
+
|
|
4406
|
+
<xsl:variable name="scale_x">
|
|
4407
|
+
<xsl:choose>
|
|
4408
|
+
<xsl:when test="$width > $width_effective_px">
|
|
4409
|
+
<xsl:value-of select="$width_effective_px div $width"/>
|
|
4410
|
+
</xsl:when>
|
|
4411
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
4412
|
+
</xsl:choose>
|
|
4413
|
+
</xsl:variable>
|
|
4414
|
+
|
|
4415
|
+
<xsl:variable name="scale_y">
|
|
4416
|
+
<xsl:choose>
|
|
4417
|
+
<xsl:when test="$height * $scale_x > $height_effective_px">
|
|
4418
|
+
<xsl:value-of select="$height_effective_px div ($height * $scale_x)"/>
|
|
4419
|
+
</xsl:when>
|
|
4420
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
4421
|
+
</xsl:choose>
|
|
4422
|
+
</xsl:variable>
|
|
4423
|
+
|
|
4424
|
+
<xsl:variable name="scale">
|
|
4425
|
+
<xsl:choose>
|
|
4426
|
+
<xsl:when test="$scale_y != 1">
|
|
4427
|
+
<xsl:value-of select="$scale_x * $scale_y"/>
|
|
4428
|
+
</xsl:when>
|
|
4429
|
+
<xsl:otherwise>
|
|
4430
|
+
<xsl:value-of select="$scale_x"/>
|
|
4431
|
+
</xsl:otherwise>
|
|
4432
|
+
</xsl:choose>
|
|
4433
|
+
</xsl:variable>
|
|
4434
|
+
|
|
4435
|
+
<xsl:variable name="width_scale" select="round($width * $scale)"/>
|
|
4436
|
+
<xsl:variable name="height_scale" select="round($height * $scale)"/>
|
|
4437
|
+
|
|
4438
|
+
<fo:table table-layout="fixed" width="100%">
|
|
4439
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
4440
|
+
<fo:table-column column-width="{$width_scale}px"/>
|
|
4441
|
+
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
4442
|
+
<fo:table-body>
|
|
4443
|
+
<fo:table-row>
|
|
4444
|
+
<fo:table-cell column-number="2">
|
|
4445
|
+
<fo:block>
|
|
4446
|
+
<fo:block-container width="{$width_scale}px" height="{$height_scale}px">
|
|
4447
|
+
<xsl:if test="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
|
4448
|
+
<fo:block line-height="0" font-size="0">
|
|
4449
|
+
<xsl:for-each select="../*[local-name() = 'name']/*[local-name() = 'bookmark']">
|
|
4450
|
+
<xsl:call-template name="bookmark"/>
|
|
4451
|
+
</xsl:for-each>
|
|
4452
|
+
</fo:block>
|
|
4453
|
+
</xsl:if>
|
|
4454
|
+
<fo:block text-depth="0" line-height="0" font-size="0">
|
|
4455
|
+
|
|
4456
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
4457
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
|
4458
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
4459
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
4460
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
4461
|
+
|
|
4462
|
+
<xsl:apply-templates select="xalan:nodeset($svg_content)" mode="svg_remove_a"/>
|
|
4463
|
+
</fo:instream-foreign-object>
|
|
4464
|
+
</fo:block>
|
|
4465
|
+
|
|
4466
|
+
<xsl:apply-templates select=".//*[local-name() = 'a'][*[local-name() = 'rect'] or *[local-name() = 'polygon'] or *[local-name() = 'circle'] or *[local-name() = 'ellipse']]" mode="svg_imagemap_links">
|
|
4467
|
+
<xsl:with-param name="scale" select="$scale"/>
|
|
4468
|
+
</xsl:apply-templates>
|
|
4469
|
+
</fo:block-container>
|
|
4470
|
+
</fo:block>
|
|
4471
|
+
</fo:table-cell>
|
|
4472
|
+
</fo:table-row>
|
|
4473
|
+
</fo:table-body>
|
|
4474
|
+
</fo:table>
|
|
4475
|
+
</fo:block>
|
|
4476
|
+
|
|
4477
|
+
</xsl:when>
|
|
4478
|
+
<xsl:otherwise>
|
|
4479
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
|
4480
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
|
4481
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
|
4482
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
|
4483
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
|
4484
|
+
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
|
4485
|
+
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
|
4486
|
+
<!-- effective height / width = 1.48, 1.4 - with title -->
|
|
4487
|
+
<xsl:if test="@height > (@width * 1.4)"> <!-- for images with big height -->
|
|
4488
|
+
<xsl:variable name="width" select="((@width * 1.4) div @height) * 100"/>
|
|
4489
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
|
4490
|
+
</xsl:if>
|
|
4491
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
|
4492
|
+
<xsl:copy-of select="$svg_content"/>
|
|
4493
|
+
</fo:instream-foreign-object>
|
|
4494
|
+
</fo:block>
|
|
4495
|
+
</xsl:otherwise>
|
|
4496
|
+
</xsl:choose>
|
|
4497
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_update">
|
|
4498
|
+
<xsl:copy>
|
|
4499
|
+
<xsl:apply-templates select="@*|node()" mode="svg_update"/>
|
|
4500
|
+
</xsl:copy>
|
|
4501
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']/@href" mode="svg_update">
|
|
4502
|
+
<xsl:attribute name="href" namespace="http://www.w3.org/1999/xlink">
|
|
4503
|
+
<xsl:value-of select="."/>
|
|
4504
|
+
</xsl:attribute>
|
|
4505
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
4506
|
+
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
4507
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
4508
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/node()">
|
|
4509
|
+
<xsl:call-template name="image_svg">
|
|
4510
|
+
<xsl:with-param name="name" select="$name"/>
|
|
4511
|
+
</xsl:call-template>
|
|
4512
|
+
</xsl:for-each>
|
|
4513
|
+
</xsl:template><xsl:template match="@*|node()" mode="svg_remove_a">
|
|
4514
|
+
<xsl:copy>
|
|
4515
|
+
<xsl:apply-templates select="@*|node()" mode="svg_remove_a"/>
|
|
4516
|
+
</xsl:copy>
|
|
4517
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_remove_a">
|
|
4518
|
+
<xsl:apply-templates mode="svg_remove_a"/>
|
|
4519
|
+
</xsl:template><xsl:template match="*[local-name() = 'a']" mode="svg_imagemap_links">
|
|
4520
|
+
<xsl:param name="scale"/>
|
|
4521
|
+
<xsl:variable name="dest">
|
|
4522
|
+
<xsl:choose>
|
|
4523
|
+
<xsl:when test="starts-with(@href, '#')">
|
|
4524
|
+
<xsl:value-of select="substring-after(@href, '#')"/>
|
|
4525
|
+
</xsl:when>
|
|
4526
|
+
<xsl:otherwise>
|
|
4527
|
+
<xsl:value-of select="@href"/>
|
|
4528
|
+
</xsl:otherwise>
|
|
4529
|
+
</xsl:choose>
|
|
4530
|
+
</xsl:variable>
|
|
4531
|
+
<xsl:for-each select="./*[local-name() = 'rect']">
|
|
4532
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
4533
|
+
<xsl:with-param name="left" select="floor(@x * $scale)"/>
|
|
4534
|
+
<xsl:with-param name="top" select="floor(@y * $scale)"/>
|
|
4535
|
+
<xsl:with-param name="width" select="floor(@width * $scale)"/>
|
|
4536
|
+
<xsl:with-param name="height" select="floor(@height * $scale)"/>
|
|
4537
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
4538
|
+
</xsl:call-template>
|
|
4539
|
+
</xsl:for-each>
|
|
4540
|
+
|
|
4541
|
+
<xsl:for-each select="./*[local-name() = 'polygon']">
|
|
4542
|
+
<xsl:variable name="points">
|
|
4543
|
+
<xsl:call-template name="split">
|
|
4544
|
+
<xsl:with-param name="pText" select="@points"/>
|
|
4545
|
+
</xsl:call-template>
|
|
4546
|
+
</xsl:variable>
|
|
4547
|
+
<xsl:variable name="x_coords">
|
|
4548
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
|
|
4549
|
+
<xsl:sort select="." data-type="number"/>
|
|
4550
|
+
<x><xsl:value-of select="."/></x>
|
|
4551
|
+
</xsl:for-each>
|
|
4552
|
+
</xsl:variable>
|
|
4553
|
+
<xsl:variable name="y_coords">
|
|
4554
|
+
<xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
|
|
4555
|
+
<xsl:sort select="." data-type="number"/>
|
|
4556
|
+
<y><xsl:value-of select="."/></y>
|
|
4557
|
+
</xsl:for-each>
|
|
4558
|
+
</xsl:variable>
|
|
4559
|
+
<xsl:variable name="x" select="xalan:nodeset($x_coords)//x[1]"/>
|
|
4560
|
+
<xsl:variable name="y" select="xalan:nodeset($y_coords)//y[1]"/>
|
|
4561
|
+
<xsl:variable name="width" select="xalan:nodeset($x_coords)//x[last()] - $x"/>
|
|
4562
|
+
<xsl:variable name="height" select="xalan:nodeset($y_coords)//y[last()] - $y"/>
|
|
4563
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
4564
|
+
<xsl:with-param name="left" select="floor($x * $scale)"/>
|
|
4565
|
+
<xsl:with-param name="top" select="floor($y * $scale)"/>
|
|
4566
|
+
<xsl:with-param name="width" select="floor($width * $scale)"/>
|
|
4567
|
+
<xsl:with-param name="height" select="floor($height * $scale)"/>
|
|
4568
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
4569
|
+
</xsl:call-template>
|
|
4570
|
+
</xsl:for-each>
|
|
4571
|
+
|
|
4572
|
+
<xsl:for-each select="./*[local-name() = 'circle']">
|
|
4573
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
4574
|
+
<xsl:with-param name="left" select="floor((@cx - @r) * $scale)"/>
|
|
4575
|
+
<xsl:with-param name="top" select="floor((@cy - @r) * $scale)"/>
|
|
4576
|
+
<xsl:with-param name="width" select="floor(@r * 2 * $scale)"/>
|
|
4577
|
+
<xsl:with-param name="height" select="floor(@r * 2 * $scale)"/>
|
|
4578
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
4579
|
+
</xsl:call-template>
|
|
4580
|
+
</xsl:for-each>
|
|
4581
|
+
<xsl:for-each select="./*[local-name() = 'ellipse']">
|
|
4582
|
+
<xsl:call-template name="insertSVGMapLink">
|
|
4583
|
+
<xsl:with-param name="left" select="floor((@cx - @rx) * $scale)"/>
|
|
4584
|
+
<xsl:with-param name="top" select="floor((@cy - @ry) * $scale)"/>
|
|
4585
|
+
<xsl:with-param name="width" select="floor(@rx * 2 * $scale)"/>
|
|
4586
|
+
<xsl:with-param name="height" select="floor(@ry * 2 * $scale)"/>
|
|
4587
|
+
<xsl:with-param name="dest" select="$dest"/>
|
|
4588
|
+
</xsl:call-template>
|
|
4589
|
+
</xsl:for-each>
|
|
4590
|
+
</xsl:template><xsl:template name="insertSVGMapLink">
|
|
4591
|
+
<xsl:param name="left"/>
|
|
4592
|
+
<xsl:param name="top"/>
|
|
4593
|
+
<xsl:param name="width"/>
|
|
4594
|
+
<xsl:param name="height"/>
|
|
4595
|
+
<xsl:param name="dest"/>
|
|
4596
|
+
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
|
4597
|
+
<fo:block font-size="1pt">
|
|
4598
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
|
4599
|
+
<fo:inline-container inline-progression-dimension="100%">
|
|
4600
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
|
4601
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
|
4602
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
|
4603
|
+
</xsl:if> -->
|
|
4604
|
+
<fo:block> </fo:block></fo:block-container>
|
|
4605
|
+
</fo:inline-container>
|
|
4606
|
+
</fo:basic-link>
|
|
4607
|
+
</fo:block>
|
|
4608
|
+
</fo:block-container>
|
|
4368
4609
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4369
4610
|
<xsl:apply-templates mode="contents"/>
|
|
4370
4611
|
<xsl:text> </xsl:text>
|
|
@@ -4393,28 +4634,39 @@
|
|
|
4393
4634
|
<xsl:when test="count(xalan:nodeset($contents)/doc) > 1">
|
|
4394
4635
|
<xsl:for-each select="xalan:nodeset($contents)/doc">
|
|
4395
4636
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
|
4637
|
+
<xsl:if test="@bundle = 'true'">
|
|
4638
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
|
4639
|
+
</xsl:if>
|
|
4396
4640
|
<fo:bookmark-title>
|
|
4397
|
-
<xsl:variable name="bookmark-title_">
|
|
4398
|
-
<xsl:call-template name="getLangVersion">
|
|
4399
|
-
<xsl:with-param name="lang" select="@lang"/>
|
|
4400
|
-
<xsl:with-param name="doctype" select="@doctype"/>
|
|
4401
|
-
<xsl:with-param name="title" select="@title-part"/>
|
|
4402
|
-
</xsl:call-template>
|
|
4403
|
-
</xsl:variable>
|
|
4404
4641
|
<xsl:choose>
|
|
4405
|
-
<xsl:when test="normalize-space(
|
|
4406
|
-
<xsl:
|
|
4407
|
-
|
|
4408
|
-
|
|
4642
|
+
<xsl:when test="not(normalize-space(@bundle) = 'true')"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
|
|
4643
|
+
<xsl:variable name="bookmark-title_">
|
|
4644
|
+
<xsl:call-template name="getLangVersion">
|
|
4645
|
+
<xsl:with-param name="lang" select="@lang"/>
|
|
4646
|
+
<xsl:with-param name="doctype" select="@doctype"/>
|
|
4647
|
+
<xsl:with-param name="title" select="@title-part"/>
|
|
4648
|
+
</xsl:call-template>
|
|
4649
|
+
</xsl:variable>
|
|
4409
4650
|
<xsl:choose>
|
|
4410
|
-
<xsl:when test="
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
<xsl:otherwise
|
|
4651
|
+
<xsl:when test="normalize-space($bookmark-title_) != ''">
|
|
4652
|
+
<xsl:value-of select="normalize-space($bookmark-title_)"/>
|
|
4653
|
+
</xsl:when>
|
|
4654
|
+
<xsl:otherwise>
|
|
4655
|
+
<xsl:choose>
|
|
4656
|
+
<xsl:when test="@lang = 'en'">English</xsl:when>
|
|
4657
|
+
<xsl:when test="@lang = 'fr'">Français</xsl:when>
|
|
4658
|
+
<xsl:when test="@lang = 'de'">Deutsche</xsl:when>
|
|
4659
|
+
<xsl:otherwise><xsl:value-of select="@lang"/> version</xsl:otherwise>
|
|
4660
|
+
</xsl:choose>
|
|
4661
|
+
</xsl:otherwise>
|
|
4414
4662
|
</xsl:choose>
|
|
4663
|
+
</xsl:when>
|
|
4664
|
+
<xsl:otherwise>
|
|
4665
|
+
<xsl:value-of select="@title-part"/>
|
|
4415
4666
|
</xsl:otherwise>
|
|
4416
4667
|
</xsl:choose>
|
|
4417
4668
|
</fo:bookmark-title>
|
|
4669
|
+
|
|
4418
4670
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
|
4419
4671
|
|
|
4420
4672
|
<xsl:call-template name="insertFigureBookmarks">
|
|
@@ -4556,16 +4808,23 @@
|
|
|
4556
4808
|
<xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
|
|
4557
4809
|
</xsl:choose>
|
|
4558
4810
|
</xsl:template><xsl:template match="item" mode="bookmark">
|
|
4559
|
-
<
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
<xsl:
|
|
4564
|
-
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4811
|
+
<xsl:choose>
|
|
4812
|
+
<xsl:when test="@id != ''">
|
|
4813
|
+
<fo:bookmark internal-destination="{@id}" starting-state="hide">
|
|
4814
|
+
<fo:bookmark-title>
|
|
4815
|
+
<xsl:if test="@section != ''">
|
|
4816
|
+
<xsl:value-of select="@section"/>
|
|
4817
|
+
<xsl:text> </xsl:text>
|
|
4818
|
+
</xsl:if>
|
|
4819
|
+
<xsl:value-of select="normalize-space(title)"/>
|
|
4820
|
+
</fo:bookmark-title>
|
|
4821
|
+
<xsl:apply-templates mode="bookmark"/>
|
|
4822
|
+
</fo:bookmark>
|
|
4823
|
+
</xsl:when>
|
|
4824
|
+
<xsl:otherwise>
|
|
4825
|
+
<xsl:apply-templates mode="bookmark"/>
|
|
4826
|
+
</xsl:otherwise>
|
|
4827
|
+
</xsl:choose>
|
|
4569
4828
|
</xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
|
|
4570
4829
|
<xsl:if test="normalize-space() != ''">
|
|
4571
4830
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
|
@@ -5133,6 +5392,7 @@
|
|
|
5133
5392
|
</xsl:if>
|
|
5134
5393
|
|
|
5135
5394
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
5395
|
+
|
|
5136
5396
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
5137
5397
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
|
5138
5398
|
</xsl:if>
|