metanorma-ogc 2.5.14 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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/i18n-en.yaml +15 -9
- data/lib/isodoc/ogc/metadata.rb +11 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +253 -76
- data/lib/isodoc/ogc/ogc.best-practice.xsl +253 -76
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +253 -76
- data/lib/isodoc/ogc/ogc.community-practice.xsl +253 -76
- data/lib/isodoc/ogc/ogc.community-standard.xsl +253 -76
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +253 -76
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +253 -76
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +253 -76
- data/lib/isodoc/ogc/ogc.other.xsl +253 -76
- data/lib/isodoc/ogc/ogc.policy.xsl +253 -76
- data/lib/isodoc/ogc/ogc.reference-model.xsl +253 -76
- data/lib/isodoc/ogc/ogc.release-notes.xsl +253 -76
- data/lib/isodoc/ogc/ogc.standard.xsl +253 -76
- data/lib/isodoc/ogc/ogc.test-suite.xsl +253 -76
- data/lib/isodoc/ogc/ogc.user-guide.xsl +253 -76
- data/lib/isodoc/ogc/ogc.white-paper.xsl +108 -40
- data/lib/isodoc/ogc/presentation_xml_convert.rb +15 -1
- data/lib/isodoc/ogc/word_convert.rb +1 -1
- data/lib/isodoc/ogc/xref.rb +20 -0
- data/lib/metanorma/ogc/basicdoc.rng +71 -6
- data/lib/metanorma/ogc/biblio.rng +3 -1
- data/lib/metanorma/ogc/cleanup.rb +1 -1
- data/lib/metanorma/ogc/converter.rb +70 -0
- data/lib/metanorma/ogc/isodoc.rng +8 -5
- data/lib/metanorma/ogc/reqt.rng +3 -0
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +1 -1
- metadata +4 -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"/>
|
@@ -7982,6 +8103,12 @@
|
|
7982
8103
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
7983
8104
|
<attachment filename="{@name}"/>
|
7984
8105
|
</xsl:for-each>
|
8106
|
+
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
8107
|
+
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
8108
|
+
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
8109
|
+
<attachment filename="{$attachment_path}"/>
|
8110
|
+
</xsl:for-each>
|
8111
|
+
</xsl:if>
|
7985
8112
|
</xsl:variable>
|
7986
8113
|
<xsl:variable name="pdfAttachmentsList" select="xalan:nodeset($pdfAttachmentsList_)"/>
|
7987
8114
|
|
@@ -7994,7 +8121,7 @@
|
|
7994
8121
|
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
7995
8122
|
</xsl:when>
|
7996
8123
|
<!-- link to the PDF attachment -->
|
7997
|
-
<xsl:when test="$pdfAttachmentsList//attachment[@filename = current()/@target]">
|
8124
|
+
<xsl:when test="@attachment = 'true' and $pdfAttachmentsList//attachment[@filename = current()/@target]">
|
7998
8125
|
<xsl:value-of select="concat('url(embedded-file:', @target, ')')"/>
|
7999
8126
|
</xsl:when>
|
8000
8127
|
<!-- <xsl:when test="starts-with($target_normalized, '_') and contains($target_normalized, '_attachments/') and $pdfAttachmentsList//attachment[@filename = $target_attachment_name]">
|
@@ -8649,7 +8776,16 @@
|
|
8649
8776
|
</xsl:variable>
|
8650
8777
|
<xsl:variable name="img_src">
|
8651
8778
|
<xsl:choose>
|
8652
|
-
<xsl:when test="not(starts-with(@src, 'data:'))"
|
8779
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8780
|
+
<xsl:choose>
|
8781
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8782
|
+
<xsl:value-of select="@src"/>
|
8783
|
+
</xsl:when>
|
8784
|
+
<xsl:otherwise>
|
8785
|
+
<xsl:value-of select="concat($basepath, @src)"/>
|
8786
|
+
</xsl:otherwise>
|
8787
|
+
</xsl:choose>
|
8788
|
+
</xsl:when>
|
8653
8789
|
<xsl:otherwise><xsl:value-of select="@src"/></xsl:otherwise>
|
8654
8790
|
</xsl:choose>
|
8655
8791
|
</xsl:variable>
|
@@ -8662,7 +8798,7 @@
|
|
8662
8798
|
<!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
|
8663
8799
|
<xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
|
8664
8800
|
<xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
|
8665
|
-
<xsl:variable name="scale" select="java:org.metanorma.fop.
|
8801
|
+
<xsl:variable name="scale" select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
|
8666
8802
|
<xsl:value-of select="$scale"/>
|
8667
8803
|
</xsl:template>
|
8668
8804
|
|
@@ -8681,7 +8817,14 @@
|
|
8681
8817
|
<xsl:value-of select="concat('url(file:///',$basepath, $src_png, ')')"/>
|
8682
8818
|
</xsl:when>
|
8683
8819
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8684
|
-
<xsl:
|
8820
|
+
<xsl:choose>
|
8821
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8822
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
8823
|
+
</xsl:when>
|
8824
|
+
<xsl:otherwise>
|
8825
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
8826
|
+
</xsl:otherwise>
|
8827
|
+
</xsl:choose>
|
8685
8828
|
</xsl:when>
|
8686
8829
|
<xsl:otherwise>
|
8687
8830
|
<xsl:value-of select="@src"/>
|
@@ -8703,7 +8846,14 @@
|
|
8703
8846
|
</xsl:when>
|
8704
8847
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
8705
8848
|
<xsl:variable name="src">
|
8706
|
-
<xsl:
|
8849
|
+
<xsl:choose>
|
8850
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
8851
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
8852
|
+
</xsl:when>
|
8853
|
+
<xsl:otherwise>
|
8854
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
8855
|
+
</xsl:otherwise>
|
8856
|
+
</xsl:choose>
|
8707
8857
|
</xsl:variable>
|
8708
8858
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
8709
8859
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -10459,7 +10609,7 @@
|
|
10459
10609
|
|
10460
10610
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
10461
10611
|
<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"
|
10612
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color_table_header_row"/></xsl:attribute>
|
10463
10613
|
</xsl:if>
|
10464
10614
|
<xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
|
10465
10615
|
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
@@ -12379,6 +12529,12 @@
|
|
12379
12529
|
|
12380
12530
|
<xsl:call-template name="setBlockSpanAll"/>
|
12381
12531
|
|
12532
|
+
<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)"/>
|
12533
|
+
<xsl:if test="$admonition_color != ''">
|
12534
|
+
<xsl:attribute name="border">0.5pt solid <xsl:value-of select="$admonition_color"/></xsl:attribute>
|
12535
|
+
<xsl:attribute name="color"><xsl:value-of select="$admonition_color"/></xsl:attribute>
|
12536
|
+
</xsl:if>
|
12537
|
+
|
12382
12538
|
<fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
|
12383
12539
|
|
12384
12540
|
<fo:block xsl:use-attribute-sets="admonition-name-style">
|
@@ -12654,10 +12810,12 @@
|
|
12654
12810
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
12655
12811
|
<xsl:copy>
|
12656
12812
|
<xsl:copy-of select="@*"/>
|
12657
|
-
<xsl:
|
12658
|
-
|
12659
|
-
|
12660
|
-
<xsl:
|
12813
|
+
<xsl:if test="1 = 2"> <!-- remove attachment/text(), because attachments added in the template 'addPDFUAmeta' before applying 'update_xml_step1' -->
|
12814
|
+
<xsl:variable name="name_filepath" select="concat($inputxml_basepath, @name)"/>
|
12815
|
+
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($name_filepath)))"/>
|
12816
|
+
<xsl:if test="$file_exists = 'false'"> <!-- copy attachment content only if file on disk doesnt exist -->
|
12817
|
+
<xsl:value-of select="normalize-space(.)"/>
|
12818
|
+
</xsl:if>
|
12661
12819
|
</xsl:if>
|
12662
12820
|
</xsl:copy>
|
12663
12821
|
</xsl:template>
|
@@ -13530,25 +13688,37 @@
|
|
13530
13688
|
</x:xmpmeta>
|
13531
13689
|
<!-- add attachments -->
|
13532
13690
|
<xsl:for-each select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']">
|
13533
|
-
<xsl:
|
13534
|
-
|
13535
|
-
|
13536
|
-
|
13537
|
-
|
13538
|
-
|
13539
|
-
|
13540
|
-
|
13541
|
-
|
13542
|
-
|
13543
|
-
|
13691
|
+
<xsl:variable name="description" select="normalize-space(//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment'] = current()/@name]/*[local-name() = 'formattedref'])"/>
|
13692
|
+
|
13693
|
+
<pdf:embedded-file filename="{@name}">
|
13694
|
+
<xsl:attribute name="src">
|
13695
|
+
<xsl:choose>
|
13696
|
+
<xsl:when test="normalize-space() != ''">
|
13697
|
+
<xsl:variable name="src_attachment" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', '')"/> <!-- remove line breaks -->
|
13698
|
+
<xsl:value-of select="$src_attachment"/>
|
13699
|
+
</xsl:when>
|
13700
|
+
<xsl:otherwise>
|
13701
|
+
<xsl:variable name="url" select="concat('url(file:///',$inputxml_basepath , @name, ')')"/>
|
13702
|
+
<xsl:value-of select="$url"/>
|
13703
|
+
</xsl:otherwise>
|
13704
|
+
</xsl:choose>
|
13705
|
+
</xsl:attribute>
|
13706
|
+
<xsl:if test="$description != ''">
|
13707
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13708
|
+
</xsl:if>
|
13709
|
+
</pdf:embedded-file>
|
13544
13710
|
</xsl:for-each>
|
13545
13711
|
<!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
|
13546
13712
|
<xsl:if test="not(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment'])">
|
13547
13713
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
|
13548
13714
|
<xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
|
13549
|
-
<xsl:variable name="url" select="concat('url(file:///',$
|
13550
|
-
<xsl:variable name="
|
13551
|
-
<pdf:embedded-file src="{$url}" filename="{$
|
13715
|
+
<xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
|
13716
|
+
<xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
|
13717
|
+
<pdf:embedded-file src="{$url}" filename="{$attachment_path}">
|
13718
|
+
<xsl:if test="$description != ''">
|
13719
|
+
<xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
|
13720
|
+
</xsl:if>
|
13721
|
+
</pdf:embedded-file>
|
13552
13722
|
</xsl:for-each>
|
13553
13723
|
</xsl:if>
|
13554
13724
|
</xsl:template> <!-- addPDFUAmeta -->
|
@@ -13926,7 +14096,14 @@
|
|
13926
14096
|
<xsl:value-of select="$src"/>
|
13927
14097
|
</xsl:when>
|
13928
14098
|
<xsl:otherwise>
|
13929
|
-
<xsl:
|
14099
|
+
<xsl:choose>
|
14100
|
+
<xsl:when test="@extracted = 'true'"> <!-- added in mn2pdf v1.97 -->
|
14101
|
+
<xsl:value-of select="concat('url(file:///', @src, ')')"/>
|
14102
|
+
</xsl:when>
|
14103
|
+
<xsl:otherwise>
|
14104
|
+
<xsl:value-of select="concat('url(file:///',$basepath, $src, ')')"/>
|
14105
|
+
</xsl:otherwise>
|
14106
|
+
</xsl:choose>
|
13930
14107
|
</xsl:otherwise>
|
13931
14108
|
</xsl:choose>
|
13932
14109
|
</xsl:template>
|