metanorma-ogc 2.5.14 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20a42aacc8919672ff6672fba3620817651a5e0e7b6d13dbac7d9d51a7a34bc0
4
- data.tar.gz: a781bdab6a4550bc6d04f0a3cde51775d6755f680f2d9a22b4dfe65d9e8e5933
3
+ metadata.gz: a3c9e7230287337f9903c6e2628a5fb7b47ef3c8318e0a404d783564db1776c9
4
+ data.tar.gz: cb7741ebe5cf3875f498388f88cd52c20bb67ff0801ed9f91384a92ed7e2d445
5
5
  SHA512:
6
- metadata.gz: e309309936b82e9e266346b7c630f845a9e77269724a31e20e1e29fc5b7ec2aa3a0d906664a67d34398ade90168276d1b66979aad8c46664b39a71a19b0bf868
7
- data.tar.gz: 358c573ed7cd006c1fc6a25a1b94ea13b47f43a4ba78fb80f934c12c0dd45bab470e9c55d0c699e6d589a69f104b0944b04c17b85a723603d305f4c36014b814
6
+ metadata.gz: 4ea130e97e8ad1a5d7500c1f624ef62b89295921e4b112c0ca7e0ad46be1de1cd0e48e5270a2c9e3206d2b710b3396ab4f1a03eee009ce610e4ad004ec483f81
7
+ data.tar.gz: a3018511b9c1cca08f3c5d6c8ed8c6f500d1aebb839d352bef4724933bdfb74c36e34c1c18f0b6e421865a4cd78c68ab049e4ca3056dd0d010dab0d73c01bfdc
data/Gemfile.devel ADDED
@@ -0,0 +1,4 @@
1
+ #gem "metanorma-plugin-glossarist", git: "https://github.com/metanorma/metanorma-plugin-glossarist"
2
+ gem "isodoc", git: "https://github.com/metanorma/isodoc", branch: "main"
3
+ #gem "metanorma-cli"
4
+ #gem "ruby-prof"
@@ -222,6 +222,46 @@ h6:hover > a.anchor,
222
222
  .inline-header:hover > a.anchor {
223
223
  visibility: visible; }
224
224
 
225
+ /* collapsible snippets: collapsible before hidable */
226
+ .hidable {
227
+ max-height: 0;
228
+ overflow: hidden;
229
+ transition: max-height 0.2s ease-out; }
230
+
231
+ .collapsible {
232
+ background-color: #777;
233
+ color: white;
234
+ cursor: pointer;
235
+ padding: 12px 0;
236
+ margin: 0;
237
+ width: 100%;
238
+ border: none;
239
+ text-align: left;
240
+ outline: none;
241
+ font-size: 15px; }
242
+
243
+ .active, .collapsible:hover {
244
+ background-color: #555; }
245
+
246
+ .collapsible:after {
247
+ content: '\25bc';
248
+ color: white;
249
+ font-weight: bold;
250
+ float: right;
251
+ margin-left: 12px;
252
+ margin-right: 12px; }
253
+
254
+ .active:after {
255
+ content: "\25b2"; }
256
+
257
+ /* collapsible: */
258
+ .collapsible + .hidable {
259
+ margin-top: 0; }
260
+
261
+ .collapsible:not(.active) + .hidable {
262
+ overflow: hidden;
263
+ padding: 0; }
264
+
225
265
  #standard-band {
226
266
  background-color: #3D9970; }
227
267
 
@@ -1037,7 +1077,7 @@ p.AltTerms {
1037
1077
  font-size: 24px;
1038
1078
  margin-top: 1em; }
1039
1079
 
1040
- span.AdmittedLabel {
1080
+ span.AdmittedLabel, span.DeprecatedLabel {
1041
1081
  color: #00335b;
1042
1082
  background-color: #CFE2F3;
1043
1083
  font-size: 70%;
@@ -401,7 +401,7 @@ p.AltTerms {
401
401
  margin-top: 1em;
402
402
  }
403
403
 
404
- span.AdmittedLabel {
404
+ span.AdmittedLabel, span.DeprecatedLabel {
405
405
  color: #00335b;
406
406
  background-color: #CFE2F3;
407
407
  font-size: 70%;
@@ -856,6 +856,6 @@ div.warning p {
856
856
  span.hi {
857
857
  background-color: yellow; }
858
858
 
859
- span.AdmittedLabel {
859
+ span.AdmittedLabel, span.DeprecatedLabel {
860
860
  color: #00335b;
861
861
  background-color: #CFE2F3; }
@@ -814,7 +814,7 @@ padding:0cm;mso-padding-alt:1.0pt 4.0pt 1.0pt 4.0pt;
814
814
  span.hi {
815
815
  background-color: yellow;
816
816
  }
817
- span.AdmittedLabel {
817
+ span.AdmittedLabel, span.DeprecatedLabel {
818
818
  color: #00335b;
819
819
  background-color: #CFE2F3;
820
820
  }
@@ -41,8 +41,13 @@ module IsoDoc
41
41
 
42
42
  def admonition_class(node)
43
43
  case node["type"]
44
- when "important" then "Admonition.Important"
45
- when "warning" then "Admonition.Warning"
44
+ when "important" then "Admonition Important"
45
+ when "warning" then "Admonition Warning"
46
+ when "caution" then "Admonition Caution"
47
+ when "todo" then "Admonition Todo"
48
+ when "editor" then "Admonition Editor"
49
+ when "tip" then "Admonition Tip"
50
+ when "safety-precaution" then "Admonition Safety-Precaution"
46
51
  else "Admonition"
47
52
  end
48
53
  end
@@ -135,6 +140,18 @@ module IsoDoc
135
140
  html
136
141
  end
137
142
 
143
+ # to pass on to imported _coverpage.scss
144
+ def scss_fontheader(is_html_css)
145
+ super + <<~SCSS
146
+ $color_text : #{@meta.get[:"presentation_metadata_color-text"].first};
147
+ $color_background_page : #{@meta.get[:"presentation_metadata_color-background-page"].first};
148
+ $color_background_definition_term : #{@meta.get[:"presentation_metadata_color-background-definition-term"].first};
149
+ $color_background_definition_description : #{@meta.get[:"presentation_metadata_color-background-definition-description"].first};
150
+ $color_secondary_shade_1 : #{@meta.get[:"presentation_metadata_color-secondary-shade-1"].first};
151
+ $color_background : #f6f8fa;
152
+ SCSS
153
+ end
154
+
138
155
  include BaseConvert
139
156
  include Init
140
157
  end
@@ -157,6 +157,17 @@ module IsoDoc
157
157
  end
158
158
  set(:logo_word, old ? get[:logo_old] : get[:logo_new])
159
159
  end
160
+
161
+ def presentation(xml, _out)
162
+ super
163
+ @metadata.each do |k, v|
164
+ /^presentation_metadata_color_/.match?(k) or next
165
+ v.is_a?(Array) or next
166
+ m = /^rgb\((\d+),\s*(\d+),\s*(\d+)\s*\)/.match(Array(v).first)
167
+ @metadata[k] =
168
+ sprintf("#%02x%02x%02x", m[1].to_i, m[2].to_i, m[3].to_i)
169
+ end
170
+ end
160
171
  end
161
172
  end
162
173
  end
@@ -41,23 +41,119 @@
41
41
 
42
42
  <xsl:variable name="copyright-owner" select="java:toUpperCase(java:java.lang.String.new(/ogc:ogc-standard/ogc:bibdata/ogc:copyright/ogc:owner/ogc:organization/ogc:name))"/>
43
43
 
44
- <xsl:variable name="color_main">rgb(88, 89, 91)</xsl:variable>
44
+ <xsl:variable name="presentation_metadata_color_text" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text']/ogc:value)"/>
45
+ <xsl:variable name="color_main">
46
+ <xsl:choose>
47
+ <xsl:when test="$presentation_metadata_color_text != ''"><xsl:value-of select="$presentation_metadata_color_text"/></xsl:when>
48
+ <xsl:otherwise>rgb(88, 89, 91)</xsl:otherwise>
49
+ </xsl:choose>
50
+ </xsl:variable>
51
+
52
+ <xsl:variable name="presentation_metadata_color_secondary_shade_1" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-secondary-shade-1']/ogc:value)"/>
45
53
  <xsl:variable name="color_design">
46
54
  <xsl:choose>
55
+ <xsl:when test="$presentation_metadata_color_secondary_shade_1 != ''"><xsl:value-of select="$presentation_metadata_color_secondary_shade_1"/></xsl:when>
47
56
  <xsl:when test="$layoutVersion = '2022'">rgb(0, 177, 255)</xsl:when>
48
57
  <xsl:otherwise>rgb(237, 193, 35)</xsl:otherwise>
49
58
  </xsl:choose>
50
59
  </xsl:variable>
60
+
61
+ <xsl:variable name="presentation_metadata_color_secondary_shade_2" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-secondary-shade-2']/ogc:value)"/>
51
62
  <xsl:variable name="color_design_light">
52
63
  <xsl:choose>
64
+ <xsl:when test="$presentation_metadata_color_secondary_shade_2 != ''"><xsl:value-of select="$presentation_metadata_color_secondary_shade_2"/></xsl:when>
53
65
  <xsl:when test="$layoutVersion = '2022'">rgb(0, 177, 255)</xsl:when>
54
66
  <xsl:otherwise>rgb(246, 223, 140)</xsl:otherwise>
55
67
  </xsl:choose>
56
68
  </xsl:variable>
57
- <xsl:variable name="color_dl_dt">rgb(215,243,255)</xsl:variable>
58
- <xsl:variable name="color_dl_dd">rgb(242,251,255)</xsl:variable>
59
- <xsl:variable name="color_blue">rgb(33, 55, 92)</xsl:variable>
60
- <xsl:variable name="color_background_blue">rgb(33,60,107)</xsl:variable>
69
+
70
+ <xsl:variable name="presentation_metadata_color_background_definition_term" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-definition-term']/ogc:value)"/>
71
+ <xsl:variable name="color_dl_dt">
72
+ <xsl:choose>
73
+ <xsl:when test="$presentation_metadata_color_background_definition_term != ''"><xsl:value-of select="$presentation_metadata_color_background_definition_term"/></xsl:when>
74
+ <xsl:otherwise>rgb(215, 243, 255)</xsl:otherwise>
75
+ </xsl:choose>
76
+ </xsl:variable>
77
+
78
+ <xsl:variable name="presentation_metadata_color_background_definition_description" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-definition-description']/ogc:value)"/>
79
+ <xsl:variable name="color_dl_dd">
80
+ <xsl:choose>
81
+ <xsl:when test="$presentation_metadata_color_background_definition_description != ''"><xsl:value-of select="$presentation_metadata_color_background_definition_description"/></xsl:when>
82
+ <xsl:otherwise>rgb(242, 251, 255)</xsl:otherwise>
83
+ </xsl:choose>
84
+ </xsl:variable>
85
+
86
+ <xsl:variable name="presentation_metadata_color_text_title" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text-title']/ogc:value)"/>
87
+ <xsl:variable name="color_text_title">
88
+ <xsl:choose>
89
+ <xsl:when test="$presentation_metadata_color_text_title != ''"><xsl:value-of select="$presentation_metadata_color_text_title"/></xsl:when>
90
+ <xsl:otherwise>rgb(33, 55, 92)</xsl:otherwise>
91
+ </xsl:choose>
92
+ </xsl:variable>
93
+
94
+ <xsl:variable name="presentation_metadata_color_background_page" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-page']/ogc:value)"/>
95
+ <xsl:variable name="color-background-page">
96
+ <xsl:choose>
97
+ <xsl:when test="$presentation_metadata_color_background_page != ''"><xsl:value-of select="$presentation_metadata_color_background_page"/></xsl:when>
98
+ <xsl:otherwise>rgb(33, 55, 92)</xsl:otherwise>
99
+ </xsl:choose>
100
+ </xsl:variable>
101
+
102
+ <xsl:variable name="presentation_metadata_color_background_text_label_legacy" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-text-label-legacy']/ogc:value)"/>
103
+ <xsl:variable name="color_background_blue">
104
+ <xsl:choose>
105
+ <xsl:when test="$presentation_metadata_color_background_text_label_legacy != ''"><xsl:value-of select="$presentation_metadata_color_background_text_label_legacy"/></xsl:when>
106
+ <xsl:otherwise>rgb(33, 60, 107)</xsl:otherwise>
107
+ </xsl:choose>
108
+ </xsl:variable>
109
+
110
+ <xsl:variable name="presentation_metadata_color_background_term_preferred_label" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-term-preferred-label']/ogc:value)"/>
111
+ <xsl:variable name="color_term_preferred">
112
+ <xsl:choose>
113
+ <xsl:when test="$presentation_metadata_color_background_term_preferred_label != ''"><xsl:value-of select="$presentation_metadata_color_background_term_preferred_label"/></xsl:when>
114
+ <xsl:otherwise>rgb(249, 235, 187)</xsl:otherwise>
115
+ </xsl:choose>
116
+ </xsl:variable>
117
+
118
+ <xsl:variable name="presentation_metadata_color_background_term_deprecated_label" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-term-deprecated-label']/ogc:value)"/>
119
+ <xsl:variable name="color_term_deprecated">
120
+ <xsl:choose>
121
+ <xsl:when test="$presentation_metadata_color_background_term_deprecated_label != ''"><xsl:value-of select="$presentation_metadata_color_background_term_deprecated_label"/></xsl:when>
122
+ <xsl:otherwise>rgb(237, 237, 238)</xsl:otherwise>
123
+ </xsl:choose>
124
+ </xsl:variable>
125
+
126
+ <xsl:variable name="presentation_metadata_color_background_term_admitted_label" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-term-admitted-label']/ogc:value)"/>
127
+ <xsl:variable name="color_term_admitted">
128
+ <xsl:choose>
129
+ <xsl:when test="$presentation_metadata_color_background_term_admitted_label != ''"><xsl:value-of select="$presentation_metadata_color_background_term_admitted_label"/></xsl:when>
130
+ <xsl:otherwise>rgb(223, 236, 249)</xsl:otherwise>
131
+ </xsl:choose>
132
+ </xsl:variable>
133
+
134
+ <xsl:variable name="presentation_metadata_color_background_table_header" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-header']/ogc:value)"/>
135
+ <xsl:variable name="color_table_header_row">
136
+ <xsl:choose>
137
+ <xsl:when test="$presentation_metadata_color_background_table_header != ''"><xsl:value-of select="$presentation_metadata_color_background_table_header"/></xsl:when>
138
+ <xsl:otherwise>rgb(33, 55, 92)</xsl:otherwise>
139
+ </xsl:choose>
140
+ </xsl:variable>
141
+
142
+ <xsl:variable name="presentation_metadata_color_background_table_row_even" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-row-even']/ogc:value)"/>
143
+ <xsl:variable name="color_table_row_even">
144
+ <xsl:choose>
145
+ <xsl:when test="$presentation_metadata_color_background_table_row_even != ''"><xsl:value-of select="$presentation_metadata_color_background_table_row_even"/></xsl:when>
146
+ <xsl:otherwise>rgb(252, 246, 222)</xsl:otherwise>
147
+ </xsl:choose>
148
+ </xsl:variable>
149
+
150
+ <xsl:variable name="presentation_metadata_color_background_table_row_odd" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-row-odd']/ogc:value)"/>
151
+ <xsl:variable name="color_table_row_odd">
152
+ <xsl:choose>
153
+ <xsl:when test="$presentation_metadata_color_background_table_row_odd != ''"><xsl:value-of select="$presentation_metadata_color_background_table_row_odd"/></xsl:when>
154
+ <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
155
+ </xsl:choose>
156
+ </xsl:variable>
61
157
 
62
158
  <xsl:variable name="toc_recommendations_">
63
159
  <xsl:for-each select="//ogc:table[.//ogc:p[@class = 'RecommendationTitle']]">
@@ -140,12 +236,6 @@
140
236
  <xsl:template match="/">
141
237
  <xsl:call-template name="namespaceCheck"/>
142
238
 
143
- <xsl:variable name="updated_xml_step1">
144
- <xsl:apply-templates mode="update_xml_step1"/>
145
- </xsl:variable>
146
-
147
- <xsl:for-each select="xalan:nodeset($updated_xml_step1)">
148
-
149
239
  <fo:root xml:lang="{$lang}">
150
240
  <xsl:variable name="root-style">
151
241
  <root-style xsl:use-attribute-sets="root-style"/>
@@ -226,16 +316,9 @@
226
316
  </fo:block>
227
317
  </fo:block-container>
228
318
 
229
- <!-- background color -->
230
- <fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
231
- <fo:block>
232
- <fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
233
- <svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
234
- <rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:rgb(33,55,92);stroke-width:0;fill-opacity:0.85"/>
235
- </svg>
236
- </fo:instream-foreign-object>
237
- </fo:block>
238
- </fo:block-container>
319
+ <xsl:call-template name="insertBackgroundColor">
320
+ <xsl:with-param name="opacity">0.85</xsl:with-param>
321
+ </xsl:call-template>
239
322
 
240
323
  <xsl:call-template name="insertCrossingLines"/>
241
324
 
@@ -502,6 +585,12 @@
502
585
 
503
586
  <xsl:for-each select="xalan:nodeset($updated_xml)/*"> -->
504
587
 
588
+ <xsl:variable name="updated_xml_step1">
589
+ <xsl:apply-templates mode="update_xml_step1"/>
590
+ </xsl:variable>
591
+
592
+ <xsl:for-each select="xalan:nodeset($updated_xml_step1)">
593
+
505
594
  <xsl:variable name="updated_xml_with_pages">
506
595
  <xsl:call-template name="processPrefaceAndMainSectionsOGC_items"/>
507
596
  </xsl:variable>
@@ -615,9 +704,10 @@
615
704
 
616
705
  <xsl:apply-templates select="//ogc:indexsect" mode="sections"/>
617
706
 
618
- </fo:root>
707
+ </xsl:for-each>
708
+
709
+ </fo:root>
619
710
 
620
- </xsl:for-each>
621
711
  </xsl:template>
622
712
 
623
713
  <xsl:template name="processPrefaceAndMainSectionsOGC_items">
@@ -703,7 +793,7 @@
703
793
  </xsl:template>
704
794
 
705
795
  <xsl:template match="ogc:preface//ogc:clause[@type = 'toc']" priority="4">
706
- <fo:block color="{$color_blue}">
796
+ <fo:block color="{$color_text_title}">
707
797
 
708
798
  <xsl:apply-templates/>
709
799
 
@@ -957,16 +1047,8 @@
957
1047
  <xsl:with-param name="color">white</xsl:with-param>
958
1048
  </xsl:call-template>
959
1049
  <fo:flow flow-name="xsl-region-body">
960
- <!-- background color -->
961
- <fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
962
- <fo:block>
963
- <fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
964
- <svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
965
- <rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:rgb(33,55,92);stroke-width:0;fill-opacity:1"/>
966
- </svg>
967
- </fo:instream-foreign-object>
968
- </fo:block>
969
- </fo:block-container>
1050
+
1051
+ <xsl:call-template name="insertBackgroundColor"/>
970
1052
 
971
1053
  <xsl:call-template name="insertCrossingLines"/>
972
1054
 
@@ -1268,7 +1350,7 @@
1268
1350
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
1269
1351
  <xsl:attribute name="margin-top">30pt</xsl:attribute>
1270
1352
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
1271
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
1353
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
1272
1354
  <xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
1273
1355
  <xsl:apply-templates/>
1274
1356
  <xsl:apply-templates select="following-sibling::*[1][local-name() = 'variant-title'][@type = 'sub']" mode="subtitle"/>
@@ -1399,7 +1481,7 @@
1399
1481
  <xsl:call-template name="getLevelTermName"/>
1400
1482
  </xsl:variable>
1401
1483
  <fo:block space-before="36pt" margin-bottom="10pt" keep-with-next="always" role="H{$levelTerm}">
1402
- <fo:list-block color="{$color_blue}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3.25}mm">
1484
+ <fo:list-block color="{$color_text_title}" keep-with-next="always" provisional-distance-between-starts="{string-length()*3.25}mm">
1403
1485
  <fo:list-item>
1404
1486
  <fo:list-item-label end-indent="label-end()">
1405
1487
  <fo:block><fo:inline font-size="18pt"><xsl:apply-templates/></fo:inline></fo:block> <!-- padding-right="1mm" -->
@@ -1465,9 +1547,12 @@
1465
1547
  <xsl:variable name="label" select="text()"/>
1466
1548
  <xsl:attribute name="background-color">
1467
1549
  <xsl:choose>
1468
- <xsl:when test="$kind = 'PreferredLabel' or $label = 'PREFERRED'">rgb(249, 235, 187)</xsl:when>
1550
+ <!-- <xsl:when test="$kind = 'PreferredLabel' or $label = 'PREFERRED'">rgb(249, 235, 187)</xsl:when>
1469
1551
  <xsl:when test="$kind = 'DeprecatedLabel' or $label = 'DEPRECATED'">rgb(237, 237, 238)</xsl:when>
1470
- <xsl:when test="$kind = 'AdmittedLabel' or $label = 'ADMITTED'">rgb(223, 236, 249)</xsl:when>
1552
+ <xsl:when test="$kind = 'AdmittedLabel' or $label = 'ADMITTED'">rgb(223, 236, 249)</xsl:when> -->
1553
+ <xsl:when test="$kind = 'PreferredLabel' or $label = 'PREFERRED'"><xsl:value-of select="$color_term_preferred"/></xsl:when>
1554
+ <xsl:when test="$kind = 'DeprecatedLabel' or $label = 'DEPRECATED'"><xsl:value-of select="$color_term_deprecated"/></xsl:when>
1555
+ <xsl:when test="$kind = 'AdmittedLabel' or $label = 'ADMITTED'"><xsl:value-of select="$color_term_admitted"/></xsl:when>
1471
1556
  </xsl:choose>
1472
1557
  </xsl:attribute>
1473
1558
  <xsl:call-template name="addLetterSpacing">
@@ -1505,7 +1590,7 @@
1505
1590
  </xsl:template>
1506
1591
 
1507
1592
  <xsl:template name="insertHeaderFooter">
1508
- <xsl:param name="color" select="$color_blue"/>
1593
+ <xsl:param name="color" select="$color_text_title"/>
1509
1594
  <fo:static-content flow-name="footer" role="artifact">
1510
1595
  <fo:block-container font-size="8pt" color="{$color}" padding-top="6mm">
1511
1596
  <fo:table table-layout="fixed" width="100%">
@@ -1637,6 +1722,20 @@
1637
1722
  </fo:block>
1638
1723
  </xsl:template>
1639
1724
 
1725
+ <xsl:template name="insertBackgroundColor">
1726
+ <xsl:param name="opacity">1</xsl:param>
1727
+ <!-- background color -->
1728
+ <fo:block-container absolute-position="fixed" left="0" top="0" font-size="0">
1729
+ <fo:block>
1730
+ <fo:instream-foreign-object content-height="{$pageHeight}mm" fox:alt-text="Background color">
1731
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="{$pageWidth}mm" height="{$pageHeight}mm">
1732
+ <rect width="{$pageWidth}mm" height="{$pageHeight}mm" style="fill:{$color-background-page};stroke-width:0;fill-opacity:{$opacity}"/>
1733
+ </svg>
1734
+ </fo:instream-foreign-object>
1735
+ </fo:block>
1736
+ </fo:block-container>
1737
+ </xsl:template>
1738
+
1640
1739
  <xsl:template name="insertCrossingLines">
1641
1740
  <fo:block-container absolute-position="fixed" width="{$pageWidth}mm" height="{$pageHeight}mm" font-size="0">
1642
1741
  <fo:block>
@@ -1693,7 +1792,7 @@
1693
1792
  <xsl:param name="title"/>
1694
1793
  <xsl:param name="level">1</xsl:param>
1695
1794
  <fo:block>
1696
- <fo:block font-size="18pt" color="{$color_blue}" keep-with-next="always" line-height="150%">
1795
+ <fo:block font-size="18pt" color="{$color_text_title}" keep-with-next="always" line-height="150%">
1697
1796
  <xsl:if test="$section != ''">
1698
1797
  <fo:inline padding-right="2mm">
1699
1798
  <xsl:call-template name="addLetterSpacing">
@@ -2221,7 +2320,7 @@
2221
2320
  <xsl:attribute-set name="copyright-statement-title-style">
2222
2321
 
2223
2322
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2224
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2323
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
2225
2324
  <xsl:attribute name="margin-top">24pt</xsl:attribute>
2226
2325
 
2227
2326
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
@@ -2243,7 +2342,7 @@
2243
2342
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
2244
2343
 
2245
2344
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2246
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2345
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
2247
2346
 
2248
2347
  </xsl:attribute-set> <!-- license-statement-title-style -->
2249
2348
 
@@ -2535,7 +2634,7 @@
2535
2634
  <xsl:attribute name="text-align">left</xsl:attribute>
2536
2635
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2537
2636
  <xsl:attribute name="font-weight">normal</xsl:attribute>
2538
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2637
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
2539
2638
  <xsl:attribute name="font-size">11pt</xsl:attribute>
2540
2639
 
2541
2640
  </xsl:attribute-set> <!-- table-name-style -->
@@ -2555,7 +2654,7 @@
2555
2654
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
2556
2655
  <xsl:attribute name="font-weight">bold</xsl:attribute>
2557
2656
 
2558
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
2657
+ <xsl:attribute name="background-color"><xsl:value-of select="$color_table_header_row"/></xsl:attribute>
2559
2658
  <xsl:attribute name="color">white</xsl:attribute>
2560
2659
 
2561
2660
  </xsl:attribute-set>
@@ -2585,8 +2684,8 @@
2585
2684
  <xsl:variable name="number"><xsl:number/></xsl:variable>
2586
2685
  <xsl:attribute name="background-color">
2587
2686
  <xsl:choose>
2588
- <xsl:when test="$number mod 2 = 0">rgb(252, 246, 222)</xsl:when>
2589
- <xsl:otherwise>rgb(254, 252, 245)</xsl:otherwise>
2687
+ <xsl:when test="$number mod 2 = 0"><xsl:value-of select="$color_table_row_even"/></xsl:when>
2688
+ <xsl:otherwise><xsl:value-of select="$color_table_row_odd"/></xsl:otherwise>
2590
2689
  </xsl:choose>
2591
2690
  </xsl:attribute>
2592
2691
 
@@ -2772,7 +2871,7 @@
2772
2871
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2773
2872
 
2774
2873
  <xsl:attribute name="font-weight">normal</xsl:attribute>
2775
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
2874
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
2776
2875
 
2777
2876
  </xsl:attribute-set> <!-- dl-name-style -->
2778
2877
 
@@ -2968,7 +3067,7 @@
2968
3067
  <xsl:attribute-set name="figure-name-style">
2969
3068
  <xsl:attribute name="role">Caption</xsl:attribute>
2970
3069
 
2971
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
3070
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
2972
3071
  <!-- <xsl:attribute name="margin-top">12pt</xsl:attribute> -->
2973
3072
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
2974
3073
  <xsl:attribute name="space-after">12pt</xsl:attribute>
@@ -3139,7 +3238,7 @@
3139
3238
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3140
3239
 
3141
3240
  <xsl:attribute name="font-weight">normal</xsl:attribute>
3142
- <xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
3241
+ <xsl:attribute name="color"><xsl:value-of select="$color_text_title"/></xsl:attribute>
3143
3242
 
3144
3243
  </xsl:attribute-set> <!-- list-name-style -->
3145
3244
 
@@ -3749,13 +3848,35 @@
3749
3848
  </xsl:for-each>
3750
3849
  </xsl:element>
3751
3850
 
3752
- <xsl:call-template name="insertAnnexInSeparatePageSequences"/>
3851
+ <xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
3753
3852
 
3754
- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
3853
+ <!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
3755
3854
 
3756
3855
  <!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
3757
3856
  </xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
3758
3857
 
3858
+ <xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
3859
+ <xsl:for-each select="/*/*[local-name()='annex'] | /*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]] | /*/*[local-name()='indexsect']">
3860
+ <xsl:sort select="@displayorder" data-type="number"/>
3861
+ <xsl:choose>
3862
+ <xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
3863
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
3864
+ <xsl:attribute name="main_page_sequence"/>
3865
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
3866
+ </xsl:element>
3867
+ </xsl:when>
3868
+ <xsl:otherwise> <!-- bibliography -->
3869
+ <xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
3870
+ <xsl:element name="page_sequence" namespace="{$namespace_full}">
3871
+ <xsl:attribute name="main_page_sequence"/>
3872
+ <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
3873
+ </xsl:element>
3874
+ </xsl:element>
3875
+ </xsl:otherwise>
3876
+ </xsl:choose>
3877
+ </xsl:for-each>
3878
+ </xsl:template>
3879
+
3759
3880
  <xsl:template name="insertAnnexInSeparatePageSequences">
3760
3881
  <xsl:for-each select="/*/*[local-name()='annex']">
3761
3882
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -10459,7 +10580,7 @@
10459
10580
 
10460
10581
  <xsl:attribute name="font-weight">normal</xsl:attribute>
10461
10582
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
10462
- <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
10583
+ <xsl:attribute name="background-color"><xsl:value-of select="$color_table_header_row"/></xsl:attribute>
10463
10584
  </xsl:if>
10464
10585
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
10465
10586
  <xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
@@ -12379,6 +12500,12 @@
12379
12500
 
12380
12501
  <xsl:call-template name="setBlockSpanAll"/>
12381
12502
 
12503
+ <xsl:variable name="admonition_color" select="normalize-space(/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = concat('color-admonition-', @type)]/ogc:value)"/>
12504
+ <xsl:if test="$admonition_color != ''">
12505
+ <xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
12506
+ <xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
12507
+ </xsl:if>
12508
+
12382
12509
  <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
12383
12510
 
12384
12511
  <fo:block xsl:use-attribute-sets="admonition-name-style">
@@ -12654,10 +12781,12 @@
12654
12781
  <xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
12655
12782
  <xsl:copy>
12656
12783
  <xsl:copy-of select="@*"/>
12657
- <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
12658
- <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
12659
- <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
12660
- <xsl:value-of select="."/>
12784
+ <xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
12785
+ <xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
12786
+ <xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
12787
+ <xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
12788
+ <xsl:value-of select="normalize-space(.)"/>
12789
+ </xsl:if>
12661
12790
  </xsl:if>
12662
12791
  </xsl:copy>
12663
12792
  </xsl:template>
@@ -13532,7 +13661,8 @@
13532
13661
  <xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
13533
13662
  <xsl:choose>
13534
13663
  <xsl:when test="normalize-space() != ''">
13535
- <pdf:embedded-file src="{.}" filename="{@name}"/>
13664
+ <xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', '')"/> <!-- remove line breaks -->
13665
+ <pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
13536
13666
  </xsl:when>
13537
13667
  <xsl:otherwise>
13538
13668
  <!-- _{filename}_attachments -->