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 +4 -4
- data/Gemfile.devel +4 -0
- data/lib/isodoc/ogc/html/htmlstyle.css +41 -1
- data/lib/isodoc/ogc/html/htmlstyle.scss +1 -1
- data/lib/isodoc/ogc/html/ogc.css +1 -1
- data/lib/isodoc/ogc/html/ogc.scss +1 -1
- data/lib/isodoc/ogc/html_convert.rb +19 -2
- data/lib/isodoc/ogc/metadata.rb +11 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +187 -57
- data/lib/isodoc/ogc/ogc.best-practice.xsl +187 -57
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +187 -57
- data/lib/isodoc/ogc/ogc.community-practice.xsl +187 -57
- data/lib/isodoc/ogc/ogc.community-standard.xsl +187 -57
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +187 -57
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +187 -57
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +187 -57
- data/lib/isodoc/ogc/ogc.other.xsl +187 -57
- data/lib/isodoc/ogc/ogc.policy.xsl +187 -57
- data/lib/isodoc/ogc/ogc.reference-model.xsl +187 -57
- data/lib/isodoc/ogc/ogc.release-notes.xsl +187 -57
- data/lib/isodoc/ogc/ogc.standard.xsl +187 -57
- data/lib/isodoc/ogc/ogc.test-suite.xsl +187 -57
- data/lib/isodoc/ogc/ogc.user-guide.xsl +187 -57
- data/lib/isodoc/ogc/ogc.white-paper.xsl +42 -21
- data/lib/isodoc/ogc/presentation_xml_convert.rb +15 -1
- data/lib/isodoc/ogc/xref.rb +20 -0
- data/lib/metanorma/ogc/cleanup.rb +1 -1
- data/lib/metanorma/ogc/converter.rb +70 -0
- data/lib/metanorma/ogc/isodoc.rng +5 -5
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +5 -4
@@ -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="
|
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
|
-
|
58
|
-
<xsl:variable name="
|
59
|
-
<xsl:variable name="
|
60
|
-
|
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
|
-
|
230
|
-
|
231
|
-
|
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
|
-
</
|
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="{$
|
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
|
-
|
961
|
-
<
|
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="$
|
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="{$
|
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="$
|
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="{$
|
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="$
|
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="$
|
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="$
|
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"
|
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"
|
2589
|
-
<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="$
|
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="$
|
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="$
|
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="
|
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"
|
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:
|
12658
|
-
|
12659
|
-
|
12660
|
-
<xsl:
|
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
|
-
<
|
13664
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
13665
|
+
<pdf:embedded-file src="{$src_attachment}" filename="{@name}"/>
|
13536
13666
|
</xsl:when>
|
13537
13667
|
<xsl:otherwise>
|
13538
13668
|
<!-- _{filename}_attachments -->
|
@@ -23,12 +23,9 @@
|
|
23
23
|
<xsl:variable name="selectedStyle" select="normalize-space($selectedStyle_)"/>
|
24
24
|
|
25
25
|
<xsl:variable name="color">rgb(0, 51, 102)</xsl:variable>
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<xsl:otherwise>rgb(237, 193, 35)</xsl:otherwise>
|
30
|
-
</xsl:choose>
|
31
|
-
</xsl:variable>
|
26
|
+
|
27
|
+
<xsl:variable name="color_text_title" select="/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-text-title']/ogc:value"/>
|
28
|
+
<xsl:variable name="color_table_header_row" select="/ogc:ogc-standard/ogc:metanorma-extension/ogc:presentation-metadata[ogc:name = 'color-background-table-header']/ogc:value"/>
|
32
29
|
|
33
30
|
<xsl:attribute-set name="title-toc-style">
|
34
31
|
<xsl:attribute name="font-size">26pt</xsl:attribute>
|
@@ -86,12 +83,6 @@
|
|
86
83
|
<xsl:template match="/">
|
87
84
|
<xsl:call-template name="namespaceCheck"/>
|
88
85
|
|
89
|
-
<xsl:variable name="updated_xml_step1">
|
90
|
-
<xsl:apply-templates mode="update_xml_step1"/>
|
91
|
-
</xsl:variable>
|
92
|
-
|
93
|
-
<xsl:for-each select="xalan:nodeset($updated_xml_step1)">
|
94
|
-
|
95
86
|
<fo:root xml:lang="{$lang}">
|
96
87
|
<xsl:variable name="root-style">
|
97
88
|
<root-style xsl:use-attribute-sets="root-style"/>
|
@@ -286,7 +277,6 @@
|
|
286
277
|
|
287
278
|
</fo:root>
|
288
279
|
|
289
|
-
</xsl:for-each>
|
290
280
|
</xsl:template>
|
291
281
|
|
292
282
|
<xsl:template name="processPrefaceAndMainSectionsOGC_items">
|
@@ -2642,13 +2632,35 @@
|
|
2642
2632
|
</xsl:for-each>
|
2643
2633
|
</xsl:element>
|
2644
2634
|
|
2645
|
-
<xsl:call-template name="
|
2635
|
+
<xsl:call-template name="insertAnnexAndBibliographyInSeparatePageSequences"/>
|
2646
2636
|
|
2647
|
-
<xsl:call-template name="insertBibliographyInSeparatePageSequences"/>
|
2637
|
+
<!-- <xsl:call-template name="insertBibliographyInSeparatePageSequences"/> -->
|
2648
2638
|
|
2649
2639
|
<!-- <xsl:call-template name="insertIndexInSeparatePageSequences"/> -->
|
2650
2640
|
</xsl:template> <!-- END: insertMainSectionsInSeparatePageSequences -->
|
2651
2641
|
|
2642
|
+
<xsl:template name="insertAnnexAndBibliographyInSeparatePageSequences">
|
2643
|
+
<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']">
|
2644
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2645
|
+
<xsl:choose>
|
2646
|
+
<xsl:when test="local-name() = 'annex' or local-name() = 'indexsect'">
|
2647
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2648
|
+
<xsl:attribute name="main_page_sequence"/>
|
2649
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
2650
|
+
</xsl:element>
|
2651
|
+
</xsl:when>
|
2652
|
+
<xsl:otherwise> <!-- bibliography -->
|
2653
|
+
<xsl:element name="bibliography" namespace="{$namespace_full}"> <!-- save context element -->
|
2654
|
+
<xsl:element name="page_sequence" namespace="{$namespace_full}">
|
2655
|
+
<xsl:attribute name="main_page_sequence"/>
|
2656
|
+
<xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
|
2657
|
+
</xsl:element>
|
2658
|
+
</xsl:element>
|
2659
|
+
</xsl:otherwise>
|
2660
|
+
</xsl:choose>
|
2661
|
+
</xsl:for-each>
|
2662
|
+
</xsl:template>
|
2663
|
+
|
2652
2664
|
<xsl:template name="insertAnnexInSeparatePageSequences">
|
2653
2665
|
<xsl:for-each select="/*/*[local-name()='annex']">
|
2654
2666
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -9325,7 +9337,7 @@
|
|
9325
9337
|
|
9326
9338
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9327
9339
|
<xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
|
9328
|
-
<xsl:attribute name="background-color"
|
9340
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color_table_header_row"/></xsl:attribute>
|
9329
9341
|
</xsl:if>
|
9330
9342
|
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
9331
9343
|
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
@@ -11257,6 +11269,12 @@
|
|
11257
11269
|
|
11258
11270
|
<xsl:call-template name="setBlockSpanAll"/>
|
11259
11271
|
|
11272
|
+
<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)"/>
|
11273
|
+
<xsl:if test="$admonition_color != ''">
|
11274
|
+
<xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
|
11275
|
+
<xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
|
11276
|
+
</xsl:if>
|
11277
|
+
|
11260
11278
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
11261
11279
|
|
11262
11280
|
<fo:block xsl:use-attribute-sets="admonition-name-style">
|
@@ -11532,10 +11550,12 @@
|
|
11532
11550
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
11533
11551
|
<xsl:copy>
|
11534
11552
|
<xsl:copy-of select="@*"/>
|
11535
|
-
<xsl:
|
11536
|
-
|
11537
|
-
|
11538
|
-
<xsl:
|
11553
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
11554
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
11555
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
11556
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
11557
|
+
<xsl:value-of select="normalize-space(.)"/>
|
11558
|
+
</xsl:if>
|
11539
11559
|
</xsl:if>
|
11540
11560
|
</xsl:copy>
|
11541
11561
|
</xsl:template>
|
@@ -12410,7 +12430,8 @@
|
|
12410
12430
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
12411
12431
|
<xsl:choose>
|
12412
12432
|
<xsl:when test="normalize-space() != ''">
|
12413
|
-
<
|
12433
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
12434
|
+
<pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$src_attachment}" filename="{@name}"/>
|
12414
12435
|
</xsl:when>
|
12415
12436
|
<xsl:otherwise>
|
12416
12437
|
<!-- _{filename}_attachments -->
|
@@ -12,6 +12,7 @@ module IsoDoc
|
|
12
12
|
|
13
13
|
def convert1(docxml, filename, dir)
|
14
14
|
info docxml, nil
|
15
|
+
unnumber_biblio(docxml)
|
15
16
|
super
|
16
17
|
end
|
17
18
|
|
@@ -179,7 +180,7 @@ module IsoDoc
|
|
179
180
|
end
|
180
181
|
|
181
182
|
def deprecates(elem)
|
182
|
-
elem << " <span class='
|
183
|
+
elem << " <span class='DeprecatedLabel'>#{@i18n.deprecated}</span>"
|
183
184
|
end
|
184
185
|
|
185
186
|
def admits(elem)
|
@@ -193,6 +194,19 @@ module IsoDoc
|
|
193
194
|
l10n("#{lower2cap @i18n.sourcecode} #{lbl}"), "name")
|
194
195
|
end
|
195
196
|
|
197
|
+
def references(docxml)
|
198
|
+
unnumber_biblio(docxml)
|
199
|
+
super
|
200
|
+
end
|
201
|
+
|
202
|
+
# prevent Eng Rept Biblio, which appears before Annexes, being numbered
|
203
|
+
# needs to happen before xrefs first invoked
|
204
|
+
def unnumber_biblio(docxml)
|
205
|
+
@doctype == "engineering-report" or return
|
206
|
+
b = docxml.at(ns(@xrefs.klass.bibliography_xpath)) or return
|
207
|
+
b["unnumbered"] = true
|
208
|
+
end
|
209
|
+
|
196
210
|
include Init
|
197
211
|
end
|
198
212
|
end
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -19,6 +19,26 @@ module IsoDoc
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
+
def clause_order_annex(_docxml)
|
23
|
+
if @doctype == "engineering-report"
|
24
|
+
[
|
25
|
+
{ path: @klass.bibliography_xpath },
|
26
|
+
{ path: "//annex", multi: true },
|
27
|
+
]
|
28
|
+
else super
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def clause_order_back(_docxml)
|
33
|
+
if @doctype == "engineering-report"
|
34
|
+
[
|
35
|
+
{ path: "//indexsect", multi: true },
|
36
|
+
{ path: "//colophon/*", multi: true },
|
37
|
+
]
|
38
|
+
else super
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
22
42
|
def middle_section_asset_names(doc)
|
23
43
|
middle_sections =
|
24
44
|
"//clause[@type = 'scope' or @type = 'conformance'] | //foreword | " \
|
@@ -231,7 +231,7 @@ module Metanorma
|
|
231
231
|
def symbol_key(sym)
|
232
232
|
@c.decode(asciimath_key(sym).text)
|
233
233
|
.gsub(/[\[\]{}<>()]/, "").gsub(/\s/m, "")
|
234
|
-
.gsub(/[[:punct:]]|[_^]/, ":\\0").
|
234
|
+
.gsub(/[[:punct:]]|[_^]/, ":\\0").delete("`")
|
235
235
|
end
|
236
236
|
|
237
237
|
def symbols_cleanup(docxml)
|