metanorma-taste 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +9 -14
  3. data/README.adoc +109 -27
  4. data/data/csa/boilerplate.adoc +35 -0
  5. data/data/csa/config.yaml +63 -0
  6. data/data/csa/csa.scss +782 -0
  7. data/data/csa/csa.standard.xsl +14577 -0
  8. data/data/csa/header.html +246 -0
  9. data/data/csa/html_csa_intro.html +7 -0
  10. data/data/csa/html_csa_titlepage.html +94 -0
  11. data/data/csa/htmlstyle.scss +820 -0
  12. data/data/csa/i18n-en.yaml +10 -0
  13. data/data/csa/logo.svg +1 -0
  14. data/data/csa/metanorma.yml +70 -0
  15. data/data/csa/word_csa_intro.html +11 -0
  16. data/data/csa/word_csa_titlepage.html +75 -0
  17. data/data/csa/wordstyle.scss +1343 -0
  18. data/data/elf/config.yaml +10 -7
  19. data/data/enosema/config.yaml +10 -7
  20. data/data/icc/config.yaml +14 -11
  21. data/data/icc/icc-full.emf +0 -0
  22. data/data/icc/icc-small.emf +0 -0
  23. data/data/mbxif/config.yaml +26 -0
  24. data/data/mbxif/copyright.adoc +36 -0
  25. data/data/mbxif/i18n.yaml +4 -0
  26. data/data/mbxif/mbxif-back-cover.pdf +3504 -7
  27. data/data/mbxif/mbxif-front-cover.pdf +54968 -16
  28. data/data/mbxif/mbxif-logos.pdf +11330 -46
  29. data/data/mbxif/mbxif-logos_caeif.svg +1 -0
  30. data/data/mbxif/mbxif-logos_caxif.svg +1 -0
  31. data/data/mbxif/mbxif-logos_ewisif.svg +1 -0
  32. data/data/mbxif/mbxif-logos_jtif.svg +1 -0
  33. data/data/mbxif/mbxif-logos_lotar.svg +1 -0
  34. data/data/mbxif/mbxif-logos_mbxif.svg +1 -0
  35. data/data/mbxif/mbxif-logos_pdmif.svg +1 -0
  36. data/data/mbxif/mbxif.xsl +361 -0
  37. data/data/pdfa/config.yaml +38 -0
  38. data/data/pdfa/copyright-de.adoc +39 -0
  39. data/data/pdfa/copyright.adoc +45 -0
  40. data/data/pdfa/coverpage.pdf +0 -0
  41. data/data/pdfa/htmlcoverpage.html +18 -0
  42. data/data/pdfa/htmlstylesheet-override.scss +14 -0
  43. data/data/pdfa/i18n.yaml +11 -0
  44. data/data/pdfa/inside-cover.pdf +0 -0
  45. data/data/pdfa/pdfa-logo.emf +0 -0
  46. data/data/pdfa/pdfa-logo.svg +1 -0
  47. data/data/pdfa/pdfa.xsl +288 -0
  48. data/data/swf/config.yaml +24 -0
  49. data/data/swf/copyright.adoc +28 -0
  50. data/data/swf/i18n.yaml +3 -0
  51. data/data/swf/swf-back-cover.pdf +3504 -7
  52. data/data/swf/swf-front-cover.pdf +3472 -3
  53. data/data/swf/swf-full.svg +1 -0
  54. data/data/swf/swf-icon.svg +1 -0
  55. data/data/swf/swf-logo-with-graphic.svg +1 -0
  56. data/data/swf/swf-logo.pdf +3590 -13
  57. data/data/swf/swf-logo.svg +1 -0
  58. data/data/swf/swf.xsl +361 -0
  59. data/lib/metanorma/taste/base.rb +40 -21
  60. data/lib/metanorma/taste/base_override.rb +7 -16
  61. data/lib/metanorma/taste/filename_attributes.rb +53 -0
  62. data/lib/metanorma/taste/stage_config.rb +20 -0
  63. data/lib/metanorma/taste/taste_config.rb +2 -26
  64. data/lib/metanorma/taste/value_attributes.rb +59 -0
  65. data/lib/metanorma/taste/version.rb +1 -1
  66. data/lib/metanorma/taste_register.rb +18 -0
  67. data/metanorma-taste.gemspec +20 -0
  68. metadata +323 -2
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><svg id="uuid-e99cb179-c768-46e8-b32b-bba4bb636e01" xmlns="http://www.w3.org/2000/svg" width="530mm" height="160mm" viewBox="0 0 1502.36 453.54"><path d="M61.88,321.34v67.9h-9.48v-139.91h94.48v8.35H61.88v55.33h69.13v8.35H61.88Z" style="fill:#231f20;"/><path d="M237.3,247.27c43.17,0,73.77,29.88,73.77,72.02s-30.6,72.02-73.77,72.02-73.77-29.88-73.77-72.02,30.6-72.02,73.77-72.02ZM237.3,382.96c37.6,0,64.29-27.1,64.29-63.67s-26.99-63.67-64.29-63.67-64.29,26.48-64.29,63.67,26.68,63.67,64.29,63.67Z" style="fill:#231f20;"/><path d="M346.92,249.33h9.48v89.32c0,26.79,19.78,44.1,51,44.1s50.79-17.31,50.79-44.1v-89.32h9.48v89.32c0,31.84-23.28,52.65-60.27,52.65s-60.48-20.81-60.48-52.65v-89.32Z" style="fill:#231f20;"/><path d="M641.12,389.24h-10.71l-106.74-126.93v126.93h-9.48v-139.91h10.92l106.53,126.83v-126.72h9.48v139.81Z" style="fill:#231f20;"/><path d="M743.89,249.33c47.8,0,71.71,29.05,71.71,70.06,0,43.58-24.11,69.85-72.12,69.85h-54.6v-139.91h55.02ZM698.36,257.67v123.22h46.57c38.22,0,61.2-21.74,61.2-61.51s-22.98-61.71-61.2-61.71h-46.57Z" style="fill:#231f20;"/><path d="M960.3,389.24h-9.48l-15.35-35.65h-82.32l-15.35,35.65h-9.89l60.27-139.91h12.36l59.76,139.91ZM856.76,345.25h75.11l-37.5-86.96-37.6,86.96Z" style="fill:#231f20;"/><path d="M1011.21,257.67v131.57h-9.48v-131.57h-49.66v-8.35h108.69v8.35h-49.56Z" style="fill:#231f20;"/><path d="M1090.15,249.33h9.48v139.91h-9.48v-139.91Z" style="fill:#231f20;"/><path d="M1211.38,247.27c43.17,0,73.77,29.88,73.77,72.02s-30.6,72.02-73.77,72.02-73.77-29.88-73.77-72.02,30.6-72.02,73.77-72.02ZM1211.38,382.96c37.6,0,64.29-27.1,64.29-63.67s-26.99-63.67-64.29-63.67-64.29,26.48-64.29,63.67,26.68,63.67,64.29,63.67Z" style="fill:#231f20;"/><path d="M1449.71,389.24h-10.71l-106.74-126.93v126.93h-9.48v-139.91h10.92l106.53,126.83v-126.72h9.48v139.81Z" style="fill:#231f20;"/><path d="M164.92,71.57l-3.55,34.76c-9.04-5.02-26.7-10.36-44.79-10.36-11.31,0-20.67,1.74-20.67,10.05,0,5.74,6.78,7.08,14.1,9.13l23.26,6.46c25.3,6.97,40.27,18.35,40.27,40.09,0,26.25-23.58,44.19-61.37,44.19-27.78,0-49.42-6.87-59.65-11.59l4.31-34.86c8.51,4.41,28.85,12.1,52.22,12.1,10.77,0,18.95-2.36,18.95-9.02,0-4.2-3.23-7.08-12.06-9.33l-22.5-5.74c-19.49-4.92-41.34-15.18-41.34-41.94s25.09-43.27,62.34-43.27c21.96,0,38.87,4.1,50.5,9.33Z" style="fill:#231f20;"/><path d="M229.24,166.22v37.43h-42.96V64.4h73.97c36.5,0,56.96,22.05,56.96,50.14s-20.46,51.68-56.96,51.68h-31.01ZM229.24,98.13v34.45h23.69c12.6,0,20.67-5.95,20.67-17.23,0-11.89-7.64-17.23-20.67-17.23h-23.69Z" style="fill:#231f20;"/><path d="M407.01,180.37h-52.97l-9.37,23.28h-45.87l56.2-139.25h51.25l56.09,139.25h-45.87l-9.47-23.28ZM363.84,149.5h33.48l-16.69-46.55-16.8,46.55Z" style="fill:#231f20;"/><path d="M479.31,97.82h-41.67v-33.43h127.37v33.43h-42.74v105.82h-42.96v-105.82Z" style="fill:#231f20;"/><path d="M617.41,203.64h-42.96V64.4h42.96v139.25Z" style="fill:#231f20;"/><path d="M734.71,180.37h-52.97l-9.37,23.28h-45.87l56.2-139.25h51.25l56.09,139.25h-45.87l-9.47-23.28ZM691.54,149.5h33.48l-16.69-46.55-16.8,46.55Z" style="fill:#231f20;"/><path d="M911.69,203.64h-113.16V64.4h42.96v106.64h70.2v32.61Z" style="fill:#231f20;"/><path d="M958.68,64.4h42.31l24.55,95.26,29.72-93.31h32.3l29.72,93.31,24.66-95.26h42.2l-38.76,139.25h-50.28l-23.69-66.96-23.58,66.96h-50.39l-38.76-139.25Z" style="fill:#231f20;"/><path d="M1307.71,203.64h-114.02V64.4h113.48v32.81h-70.52v19.58h63.42v32.61h-63.42v21.64h71.06v32.61Z" style="fill:#231f20;"/><path d="M1321.04,203.64V64.4h77.73c23.58,0,44.25,13.23,44.25,36.3,0,13.95-5.71,24.4-18.73,31.48,17.98,5.74,26.05,18.56,26.05,33.43,0,23.89-19.81,38.04-44.57,38.04h-84.73ZM1362.5,95.16v23.69h27.35c7.11,0,11.3-5.02,11.3-12.2,0-6.67-4.52-11.48-12.17-11.48h-26.49ZM1362.5,148.17v26.15h30.04c8.18,0,13.35-5.64,13.35-12.82,0-7.69-5.06-13.33-13.35-13.33h-30.04Z" style="fill:#231f20;"/><rect x="52.01" y="225.72" width="1398.09" height="2.27" style="fill:#231f20;"/></svg>
data/data/swf/swf.xsl ADDED
@@ -0,0 +1,361 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:mn="https://www.metanorma.org/ns/standoc" xmlns:mnx="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:java="http://xml.apache.org/xalan/java" xmlns:barcode="http://barcode4j.krysalis.org/ns" xmlns:redirect="http://xml.apache.org/xalan/redirect" exclude-result-prefixes="java" extension-element-prefixes="redirect" version="1.0">
2
+
3
+ <xsl:variable name="pageWidth">210</xsl:variable>
4
+ <xsl:variable name="pageHeight">297</xsl:variable>
5
+
6
+ <xsl:variable name="marginTop">25</xsl:variable>
7
+ <xsl:variable name="marginBottom">25</xsl:variable>
8
+
9
+ <xsl:variable name="color_black">rgb(30, 25, 29)</xsl:variable>
10
+ <xsl:variable name="color_header_background">rgb(240, 234, 219)</xsl:variable>
11
+
12
+ <xsl:template name="layout-master-set">
13
+ <fo:layout-master-set>
14
+ <fo:simple-page-master master-name="cover-page" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
15
+ <fo:region-body margin-top="60mm" margin-bottom="30mm" margin-left="19mm" margin-right="20mm"/>
16
+ <fo:region-before region-name="header" extent="10mm"/>
17
+ <fo:region-after region-name="footer" extent="20mm"/>
18
+ </fo:simple-page-master>
19
+
20
+ <fo:simple-page-master master-name="even" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
21
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
22
+ <fo:region-before region-name="header-even" extent="20mm"/>
23
+ <fo:region-after region-name="footer-even" extent="20mm"/>
24
+ <fo:region-start region-name="left-region" extent="13mm"/>
25
+ <fo:region-end region-name="right-region" extent="12mm"/>
26
+ </fo:simple-page-master>
27
+ <fo:simple-page-master master-name="odd" page-width="{$pageWidth}mm" page-height="{$pageHeight}mm">
28
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
29
+ <fo:region-before region-name="header-odd" extent="20mm"/>
30
+ <fo:region-after region-name="footer-odd" extent="20mm"/>
31
+ <fo:region-start region-name="left-region" extent="13mm"/>
32
+ <fo:region-end region-name="right-region" extent="12mm"/>
33
+ </fo:simple-page-master>
34
+ <fo:page-sequence-master master-name="document">
35
+ <fo:repeatable-page-master-alternatives>
36
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even"/>
37
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd"/>
38
+ </fo:repeatable-page-master-alternatives>
39
+ </fo:page-sequence-master>
40
+
41
+
42
+ <fo:simple-page-master master-name="even-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
43
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
44
+ <fo:region-before region-name="header-even" extent="20mm"/>
45
+ <fo:region-after region-name="footer-even" extent="20mm"/>
46
+ <fo:region-start region-name="left-region" extent="13mm"/>
47
+ <fo:region-end region-name="right-region" extent="12mm"/>
48
+ </fo:simple-page-master>
49
+ <fo:simple-page-master master-name="odd-landscape" page-width="{$pageHeight}mm" page-height="{$pageWidth}mm">
50
+ <fo:region-body margin-top="{$marginTop}mm" margin-bottom="{$marginBottom}mm" margin-left="{$marginLeftRight1}mm" margin-right="{$marginLeftRight2}mm"/>
51
+ <fo:region-before region-name="header-odd" extent="20mm"/>
52
+ <fo:region-after region-name="footer-odd" extent="20mm"/>
53
+ <fo:region-start region-name="left-region" extent="13mm"/>
54
+ <fo:region-end region-name="right-region" extent="12mm"/>
55
+ </fo:simple-page-master>
56
+ <fo:page-sequence-master master-name="document-landscape">
57
+ <fo:repeatable-page-master-alternatives>
58
+ <fo:conditional-page-master-reference odd-or-even="even" master-reference="even-landscape"/>
59
+ <fo:conditional-page-master-reference odd-or-even="odd" master-reference="odd-landscape"/>
60
+ </fo:repeatable-page-master-alternatives>
61
+ </fo:page-sequence-master>
62
+
63
+ </fo:layout-master-set>
64
+ </xsl:template>
65
+
66
+
67
+ <xsl:variable name="copyright_year" select="/mn:metanorma/mn:bibdata/mn:copyright/mn:from"/>
68
+ <xsl:variable name="copyright_holder" select="normalize-space(/mn:metanorma/mn:bibdata/mn:copyright/mn:owner/mn:organization/mn:name)"/>
69
+ <xsl:variable name="copyrightText">
70
+ <xsl:text>© </xsl:text>
71
+ <xsl:value-of select="$copyright_year"/>
72
+ <xsl:text>. The </xsl:text>
73
+ <xsl:value-of select="$copyright_holder"/>
74
+ <xsl:text>, Inc. </xsl:text>
75
+ <xsl:variable name="all_rights_reserved">
76
+ <xsl:call-template name="getLocalizedString">
77
+ <xsl:with-param name="key">all_rights_reserved</xsl:with-param>
78
+ </xsl:call-template>
79
+ </xsl:variable>
80
+ <xsl:value-of select="$all_rights_reserved"/>
81
+ <xsl:text>.</xsl:text>
82
+ </xsl:variable>
83
+
84
+ <xsl:template name="cover-page">
85
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force" font-family="Nacelle" >
86
+ <fo:static-content flow-name="header">
87
+ <xsl:call-template name="insertBackgroundPageImage"/>
88
+ </fo:static-content>
89
+
90
+ <fo:static-content flow-name="footer">
91
+ <fo:block-container height="20mm" display-align="center">
92
+ <fo:block font-size="12pt" font-weight="300" color="white" margin-left="11.3mm">
93
+ <xsl:value-of select="$copyrightText"/>
94
+ </fo:block>
95
+ </fo:block-container>
96
+ </fo:static-content>
97
+
98
+ <fo:flow flow-name="xsl-region-body" color="{$color_black}">
99
+
100
+ <fo:block-container margin-right="30mm">
101
+ <fo:block-container margin-right="0mm">
102
+
103
+ <fo:block font-size="20pt" font-weight="600" margin-left="1mm">
104
+ <xsl:value-of select="/mn:metanorma/mn:bibdata/mn:docidentifier"/>
105
+ </fo:block>
106
+
107
+ <xsl:variable name="titles">
108
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and (@type = 'intro' or not(@type))]"/>
109
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and @type = 'main'][last()]"/>
110
+ </xsl:variable>
111
+
112
+ <xsl:for-each select="xalan:nodeset($titles)/mn:title">
113
+ <fo:block font-size="21pt" font-weight="600" margin-top="6mm" role="H1">
114
+ <xsl:if test="position() = 1">
115
+ <xsl:attribute name="font-size">22pt</xsl:attribute>
116
+ <xsl:attribute name="margin-top">17mm</xsl:attribute>
117
+ </xsl:if>
118
+ <xsl:apply-templates />
119
+ </fo:block>
120
+ </xsl:for-each>
121
+
122
+ <xsl:variable name="title_part">
123
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and @type = 'part']"/>
124
+ </xsl:variable>
125
+ <xsl:for-each select="xalan:nodeset($title_part)/mn:title">
126
+ <fo:block font-size="21pt" font-weight="600" margin-top="9mm">
127
+ <xsl:apply-templates />
128
+ </fo:block>
129
+ </xsl:for-each>
130
+
131
+ <fo:block font-size="14pt" font-weight="normal" margin-top="17mm">
132
+ <xsl:call-template name="convertDate">
133
+ <xsl:with-param name="date" select="/mn:metanorma/mn:bibdata/mn:version/mn:revision-date"/>
134
+ <xsl:with-param name="format">full</xsl:with-param>
135
+ </xsl:call-template>
136
+ </fo:block>
137
+ </fo:block-container>
138
+ </fo:block-container>
139
+ </fo:flow>
140
+ </fo:page-sequence>
141
+ </xsl:template> <!-- END cover-page -->
142
+
143
+
144
+ <xsl:template name="back-page">
145
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force" font-family="Nacelle" >
146
+ <fo:static-content flow-name="header">
147
+ <xsl:call-template name="insertBackgroundPageImage">
148
+ <xsl:with-param name="name">backpage-image</xsl:with-param>
149
+ <xsl:with-param name="suffix">back</xsl:with-param>
150
+ </xsl:call-template>
151
+ </fo:static-content>
152
+
153
+ <fo:static-content flow-name="footer">
154
+ <fo:block-container height="20mm" display-align="center">
155
+ <fo:block font-size="12pt" font-weight="300" color="white" margin-left="11.3mm">
156
+ <xsl:value-of select="$copyrightText"/>
157
+ </fo:block>
158
+ </fo:block-container>
159
+ </fo:static-content>
160
+
161
+ <fo:flow flow-name="xsl-region-body" color="{$color_black}">
162
+ <fo:block-container margin-left="1mm" margin-right="5mm">
163
+ <fo:block-container margin-left="0mm">
164
+
165
+ <xsl:variable name="contributors_">
166
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author' and normalize-space(mn:description) != 'leadership']]/mn:person/mn:name/mn:completename">
167
+ <xsl:copy-of select="."/>
168
+ </xsl:for-each>
169
+ </xsl:variable>
170
+ <xsl:variable name="contributors" select="xalan:nodeset($contributors_)"/>
171
+
172
+ <xsl:if test="$contributors/*">
173
+ <fo:block font-size="14pt" font-weight="600">Document contributors</fo:block>
174
+ <fo:block font-size="12pt" font-weight="300" margin-top="5.5mm">
175
+ <xsl:for-each select="$contributors/*">
176
+ <fo:inline keep-together.within-line="always"><xsl:value-of select="."/></fo:inline><xsl:if test="position() != last()">, </xsl:if>
177
+ </xsl:for-each>
178
+ </fo:block>
179
+ </xsl:if>
180
+
181
+ <xsl:variable name="leadership_">
182
+ <xsl:for-each select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author' and mn:description = 'leadership']]/mn:person">
183
+ <xsl:copy-of select="."/>
184
+ </xsl:for-each>
185
+ </xsl:variable>
186
+ <xsl:variable name="leadership" select="xalan:nodeset($leadership_)"/>
187
+
188
+ <xsl:if test="$leadership/*">
189
+ <fo:block font-size="14pt" font-weight="600" margin-top="11mm">Spatial Web Foundation leadership</fo:block>
190
+
191
+ <fo:block font-size="12pt" font-weight="300" margin-top="5.5mm">
192
+ <fo:table table-layout="fixed" width="100%">
193
+ <fo:table-column column-width="51mm"/>
194
+ <fo:table-column column-width="90mm"/>
195
+ <fo:table-body>
196
+ <xsl:for-each select="$leadership/*">
197
+ <fo:table-row>
198
+ <fo:table-cell>
199
+ <fo:block font-weight="600">
200
+ <xsl:value-of select="mn:name/mn:completename"/>
201
+ </fo:block>
202
+ </fo:table-cell>
203
+ <fo:table-cell>
204
+ <fo:block font-weight="300">
205
+ <xsl:value-of select="mn:affiliation"/>
206
+ </fo:block>
207
+ </fo:table-cell>
208
+ </fo:table-row>
209
+ </xsl:for-each>
210
+ </fo:table-body>
211
+ </fo:table>
212
+ </fo:block>
213
+ </xsl:if>
214
+
215
+
216
+ <fo:block font-size="12pt" font-weight="300" margin-top="15mm">
217
+ <xsl:text>Comments about the Spatial Web and this document can be sent to</xsl:text>
218
+ <xsl:value-of select="$linebreak"/>
219
+ <xsl:text>the Spatial Web Foundation at info@spatialwebfoundation.org</xsl:text>
220
+ </fo:block>
221
+ </fo:block-container>
222
+ </fo:block-container>
223
+ </fo:flow>
224
+ </fo:page-sequence>
225
+ </xsl:template> <!-- Ena back-page -->
226
+
227
+
228
+ <xsl:template name="insertHeaderFooter">
229
+ <xsl:call-template name="insertHeader"/>
230
+ <xsl:call-template name="insertFooter"/>
231
+ </xsl:template>
232
+
233
+ <xsl:template name="insertHeader">
234
+ <xsl:variable name="docidentifier" select="/mn:metanorma/mn:bibdata/mn:docidentifier"/>
235
+ <xsl:call-template name="insertHeaderOdd">
236
+ <xsl:with-param name="text" select="$docidentifier"/>
237
+ </xsl:call-template>
238
+ <xsl:call-template name="insertHeaderEven">
239
+ <xsl:with-param name="text" select="$docidentifier"/>
240
+ </xsl:call-template>
241
+ </xsl:template>
242
+
243
+ <xsl:attribute-set name="header-style">
244
+ <xsl:attribute name="absolute-position">fixed</xsl:attribute>
245
+ <xsl:attribute name="left">0mm</xsl:attribute>
246
+ <xsl:attribute name="top">0mm</xsl:attribute>
247
+ <xsl:attribute name="width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
248
+ <xsl:attribute name="font-family">Nacelle</xsl:attribute>
249
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
250
+ <xsl:attribute name="font-weight">300</xsl:attribute>
251
+ <xsl:attribute name="height">20mm</xsl:attribute>
252
+ <xsl:attribute name="color"><xsl:value-of select="$color_black"/></xsl:attribute>
253
+ <xsl:attribute name="background-color"><xsl:value-of select="$color_header_background"/></xsl:attribute>
254
+ <xsl:attribute name="display-align">center</xsl:attribute>
255
+ </xsl:attribute-set>
256
+
257
+ <xsl:template name="insertHeaderOdd">
258
+ <xsl:param name="text"/>
259
+ <fo:static-content flow-name="header-odd" role="artifact">
260
+ <fo:block-container xsl:use-attribute-sets="header-style" id="__internal_layout__headerodd_{generate-id()}_{.//*[@id][1]/@id}">
261
+ <fo:block text-align="right" margin-right="7mm">
262
+ <xsl:value-of select="$text"/>
263
+ </fo:block>
264
+ </fo:block-container>
265
+ </fo:static-content>
266
+ </xsl:template>
267
+
268
+ <xsl:template name="insertHeaderEven">
269
+ <xsl:param name="text"/>
270
+ <fo:static-content flow-name="header-even" role="artifact">
271
+ <fo:block-container xsl:use-attribute-sets="header-style" id="__internal_layout__headereven_{generate-id()}_{.//*[@id][1]/@id}">
272
+ <fo:block margin-left="10mm">
273
+ <xsl:value-of select="$text"/>
274
+ </fo:block>
275
+ </fo:block-container>
276
+ </fo:static-content>
277
+ </xsl:template>
278
+
279
+ <xsl:attribute-set name="footer-style">
280
+ <xsl:attribute name="absolute-position">fixed</xsl:attribute>
281
+ <xsl:attribute name="left">0mm</xsl:attribute>
282
+ <xsl:attribute name="top"><xsl:value-of select="$pageHeight - 20"/>mm</xsl:attribute>
283
+ <xsl:attribute name="width"><xsl:value-of select="$pageWidth"/>mm</xsl:attribute>
284
+ <xsl:attribute name="font-family">Nacelle</xsl:attribute>
285
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
286
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
287
+ <xsl:attribute name="height">20mm</xsl:attribute>
288
+ <xsl:attribute name="color">white</xsl:attribute>
289
+ <xsl:attribute name="background-color"><xsl:value-of select="$color_black"/></xsl:attribute>
290
+ <xsl:attribute name="display-align">center</xsl:attribute>
291
+ </xsl:attribute-set>
292
+
293
+ <xsl:template name="insertFooter">
294
+ <xsl:variable name="titles_">
295
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and (@type = 'intro' or not(@type))]"/>
296
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and @type = 'main'][last()]"/>
297
+ <xsl:copy-of select="/mn:metanorma/mn:bibdata/mn:title[@language = $lang and @type = 'part']"/>
298
+ </xsl:variable>
299
+ <xsl:variable name="titles">
300
+ <xsl:for-each select="xalan:nodeset($titles_)/mn:title">
301
+ <xsl:apply-templates />
302
+ <xsl:if test="position() != last()"> — </xsl:if>
303
+ </xsl:for-each>
304
+ </xsl:variable>
305
+ <xsl:call-template name="insertFooterOdd">
306
+ <xsl:with-param name="text" select="$titles"/>
307
+ </xsl:call-template>
308
+ <xsl:call-template name="insertFooterEven">
309
+ <xsl:with-param name="text" select="$titles"/>
310
+ </xsl:call-template>
311
+ </xsl:template>
312
+
313
+ <xsl:template name="insertFooterOdd">
314
+ <xsl:param name="text"/>
315
+ <fo:static-content flow-name="footer-odd" role="artifact">
316
+ <fo:block-container xsl:use-attribute-sets="footer-style" id="__internal_layout__footerodd_{generate-id()}_{.//*[@id][1]/@id}">
317
+ <fo:table table-layout="fixed" width="100%">
318
+ <fo:table-column column-width="proportional-column-width(9)"/>
319
+ <fo:table-column column-width="proportional-column-width(1)"/>
320
+ <fo:table-body>
321
+ <fo:table-row>
322
+ <fo:table-cell padding-left="7mm">
323
+ <fo:block>
324
+ <xsl:copy-of select="$text"/>
325
+ </fo:block>
326
+ </fo:table-cell>
327
+ <fo:table-cell text-align="right" padding-right="7mm">
328
+ <fo:block><fo:page-number/></fo:block>
329
+ </fo:table-cell>
330
+ </fo:table-row>
331
+ </fo:table-body>
332
+ </fo:table>
333
+ </fo:block-container>
334
+ </fo:static-content>
335
+ </xsl:template>
336
+
337
+ <xsl:template name="insertFooterEven">
338
+ <xsl:param name="text"/>
339
+ <fo:static-content flow-name="footer-even" role="artifact">
340
+ <fo:block-container xsl:use-attribute-sets="footer-style" id="__internal_layout__footereven_{generate-id()}_{.//*[@id][1]/@id}">
341
+ <fo:table table-layout="fixed" width="100%">
342
+ <fo:table-column column-width="proportional-column-width(1)"/>
343
+ <fo:table-column column-width="proportional-column-width(9)"/>
344
+ <fo:table-body>
345
+ <fo:table-row>
346
+ <fo:table-cell padding-left="10mm">
347
+ <fo:block><fo:page-number/></fo:block>
348
+ </fo:table-cell>
349
+ <fo:table-cell text-align="right" padding-right="9mm">
350
+ <fo:block>
351
+ <xsl:copy-of select="$text"/>
352
+ </fo:block>
353
+ </fo:table-cell>
354
+ </fo:table-row>
355
+ </fo:table-body>
356
+ </fo:table>
357
+ </fo:block-container>
358
+ </fo:static-content>
359
+ </xsl:template>
360
+
361
+ </xsl:stylesheet>
@@ -7,7 +7,7 @@ module Metanorma
7
7
  # Base processor for taste-specific document attribute handling
8
8
  #
9
9
  # This class handles the processing of AsciiDoc attributes for taste-specific
10
- # document generation, including file-based overrides, base configuration overrides,
10
+ # document generation, including filename-based attributes, value-based attributes,
11
11
  # and doctype-specific transformations.
12
12
  #
13
13
  # @example Basic usage
@@ -30,24 +30,35 @@ module Metanorma
30
30
  # @return [TasteConfig] The taste configuration object
31
31
  attr_reader :config
32
32
 
33
- # Mapping of base override configuration keys to AsciiDoc attribute names
33
+ # Mapping of value-based attribute configuration keys to AsciiDoc attribute names
34
34
  #
35
- # This constant defines how base_override configuration properties
35
+ # This constant defines how base_override.value_attributes configuration properties
36
36
  # are translated into AsciiDoc document attributes.
37
37
  #
38
38
  # @example Configuration to attribute mapping
39
- # config.base_override.publisher => :publisher:
40
- # config.base_override.presentation_metadata_color_secondary => :presentation-metadata-color-secondary:
41
- BASE_OVERRIDE_MAPPINGS = {
39
+ # config.base_override.value_attributes.publisher => :publisher:
40
+ # config.base_override.value_attributes.presentation_metadata_color_secondary => :presentation-metadata-color-secondary:
41
+ VALUE_ATTRIBUTE_MAPPINGS = {
42
42
  publisher: "publisher",
43
43
  publisher_abbr: "publisher_abbr",
44
44
  presentation_metadata_color_secondary: "presentation-metadata-color-secondary",
45
45
  presentation_metadata_backcover_text: "presentation-metadata-backcover-text",
46
+ presentation_metadata_ul_label_list: "presentation-metadata-ul-label-list",
47
+ presentation_metadata_annex_delim: "presentation-metadata-annex-delim",
48
+ presentation_metadata_middle_title: "presentation-metadata-middle-title",
49
+ presentation_metadata_ol_label_template_alphabet: "presentation-metadata-ol-label-template-alphabet",
50
+ presentation_metadata_ol_label_template_alphabet_upper: "presentation-metadata-ol-label-template-alphabet_upper",
51
+ presentation_metadata_ol_label_template_roman: "presentation-metadata-ol-label-template-roman",
52
+ presentation_metadata_ol_label_template_roman_upper: "presentation-metadata-ol-label-template-roman_upper",
53
+ presentation_metadata_ol_label_template_arabic: "presentation-metadata-ol-label-template-arabic",
46
54
  body_font: "body-font",
47
55
  header_font: "header-font",
48
56
  monospace_font: "monospace-font",
57
+ fonts: "fonts",
58
+ output_extensions: "output-extensions",
49
59
  }.freeze
50
60
 
61
+
51
62
  # Initialize a new Base processor
52
63
  #
53
64
  # @param flavor [String, Symbol] The taste flavor identifier
@@ -111,8 +122,8 @@ module Metanorma
111
122
  # Build all attribute overrides from various sources
112
123
  #
113
124
  # This method coordinates the building of attributes from:
114
- # - File-based sources (copyright, logo, i18n)
115
- # - Base override configuration
125
+ # - Filename-based attributes (copyright, logo, i18n, stylesheets)
126
+ # - Value-based attributes (publisher, fonts, presentation metadata)
116
127
  # - Doctype-specific overrides
117
128
  #
118
129
  # @param attrs [Array<String>] Original attributes array
@@ -128,10 +139,10 @@ module Metanorma
128
139
  [attrs, override_attrs]
129
140
  end
130
141
 
131
- # Add file-based attribute overrides
142
+ # Add filename-based attribute overrides
132
143
  #
133
- # Processes file-based configuration properties and adds corresponding
134
- # attributes if the files exist.
144
+ # Processes filename-based configuration properties from base_override.filename_attributes
145
+ # and adds corresponding attributes if the files exist.
135
146
  #
136
147
  # @param override_attrs [Array<String>] Array to append override attributes to
137
148
  def add_file_based_overrides(override_attrs)
@@ -140,7 +151,7 @@ module Metanorma
140
151
  end
141
152
  end
142
153
 
143
- # Get the mapping of file-based configuration attributes to AsciiDoc attributes
154
+ # Get the mapping of filename-based configuration attributes to AsciiDoc attributes
144
155
  #
145
156
  # @return [Hash<Symbol, String>] Mapping of config attributes to AsciiDoc attribute names
146
157
  def file_override_mappings
@@ -156,8 +167,14 @@ module Metanorma
156
167
  wordintropage: "wordintropage",
157
168
  wordstylesheet: "wordstylesheet",
158
169
  wordstylesheet_override: "wordstylesheet-override",
159
- pdfstylesheet: "pdfstylesheet",
160
- pdfstylesheet_override: "pdfstylesheet-override",
170
+ header: "header",
171
+ standardstylesheet: "standardstylesheet",
172
+ standardstylesheet_override: "standardstylesheet-override",
173
+ pdfstylesheet: "pdf-stylesheet",
174
+ pdfstylesheet_override: "pdf-stylesheet-override",
175
+ customize: "customize",
176
+ coverpage_image: "coverpage-image",
177
+ backpage_image: "backpage-image",
161
178
  }
162
179
  end
163
180
 
@@ -173,7 +190,7 @@ module Metanorma
173
190
  override_attrs << ":#{attr_name}: #{filepath}"
174
191
  end
175
192
 
176
- # Get the full file path for a configuration attribute
193
+ # Get the full file path for a filename-based configuration attribute
177
194
  #
178
195
  # @param config_attr [Symbol] The configuration attribute name
179
196
  # @return [String, nil] The full file path, or nil if not configured
@@ -182,23 +199,25 @@ module Metanorma
182
199
  # file_path_for(:copyright_notice) # => "data/icc/copyright.adoc"
183
200
  # file_path_for(:publisher_logo) # => "data/icc/logo.svg"
184
201
  def file_path_for(config_attr)
185
- filename = @config.send(config_attr)
202
+ return nil unless @config.base_override&.filename_attributes
203
+
204
+ filename = @config.base_override.filename_attributes.send(config_attr)
186
205
  return nil unless filename
187
206
 
188
207
  File.join(@directory, filename)
189
208
  end
190
209
 
191
- # Add base configuration override attributes
210
+ # Add value-based configuration override attributes
192
211
  #
193
- # Processes base_override configuration and adds corresponding
212
+ # Processes base_override.value_attributes configuration and adds corresponding
194
213
  # AsciiDoc attributes for each configured property.
195
214
  #
196
215
  # @param override_attrs [Array<String>] Array to append override attributes to
197
216
  def add_base_configuration_overrides(override_attrs)
198
- return unless @config.base_override
217
+ return unless @config.base_override&.value_attributes
199
218
 
200
- BASE_OVERRIDE_MAPPINGS.each do |config_key, attr_key|
201
- value = @config.base_override.send(config_key)
219
+ VALUE_ATTRIBUTE_MAPPINGS.each do |config_key, attr_key|
220
+ value = @config.base_override.value_attributes.send(config_key)
202
221
  next unless value
203
222
 
204
223
  override_attrs << ":#{attr_key}: #{value}"
@@ -1,29 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "lutaml/model"
4
+ require_relative "filename_attributes"
5
+ require_relative "value_attributes"
4
6
 
5
7
  module Metanorma
6
8
  module Taste
7
9
  # Model for base-override configuration
10
+ # Contains nested filename-attributes and value-attributes
8
11
  class BaseOverride < Lutaml::Model::Serializable
9
- attribute :publisher, :string
10
- attribute :publisher_abbr, :string
11
- attribute :body_font, :string
12
- attribute :header_font, :string
13
- attribute :monospace_font, :string
14
- attribute :presentation_metadata_color_secondary, :string
15
- attribute :presentation_metadata_backcover_text, :string
12
+ attribute :filename_attributes, FilenameAttributes
13
+ attribute :value_attributes, ValueAttributes
16
14
 
17
15
  key_value do
18
- map "publisher", to: :publisher
19
- map "publisher_abbr", to: :publisher_abbr
20
- map "body-font", to: :body_font
21
- map "header-font", to: :header_font
22
- map "monospace-font", to: :monospace_font
23
- map "presentation-metadata-color-secondary",
24
- to: :presentation_metadata_color_secondary
25
- map "presentation-metadata-backcover-text",
26
- to: :presentation_metadata_backcover_text
16
+ map "filename-attributes", to: :filename_attributes
17
+ map "value-attributes", to: :value_attributes
27
18
  end
28
19
  end
29
20
  end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Metanorma
6
+ module Taste
7
+ # Model for filename-based attributes configuration
8
+ # These are Metanorma document attributes that contain filenames
9
+ class FilenameAttributes < Lutaml::Model::Serializable
10
+ attribute :copyright_notice, :string
11
+ attribute :i18n_dictionary, :string
12
+ attribute :publisher_logo, :string
13
+ attribute :htmlcoverpage, :string
14
+ attribute :htmlintropage, :string
15
+ attribute :htmlstylesheet, :string
16
+ attribute :htmlstylesheet_override, :string
17
+ attribute :wordcoverpage, :string
18
+ attribute :wordintropage, :string
19
+ attribute :wordstylesheet, :string
20
+ attribute :wordstylesheet_override, :string
21
+ attribute :header, :string
22
+ attribute :standardstylesheet, :string
23
+ attribute :standardstylesheet_override, :string
24
+ attribute :pdfstylesheet, :string
25
+ attribute :pdfstylesheet_override, :string
26
+ attribute :customize, :string
27
+ attribute :coverpage_image, :string
28
+ attribute :backpage_image, :string
29
+
30
+ key_value do
31
+ map "copyright-notice", to: :copyright_notice
32
+ map "i18n-dictionary", to: :i18n_dictionary
33
+ map "publisher-logo", to: :publisher_logo
34
+ map "htmlcoverpage", to: :htmlcoverpage
35
+ map "htmlintropage", to: :htmlintropage
36
+ map "htmlstylesheet", to: :htmlstylesheet
37
+ map "htmlstylesheet-override", to: :htmlstylesheet_override
38
+ map "wordcoverpage", to: :wordcoverpage
39
+ map "wordintropage", to: :wordintropage
40
+ map "wordstylesheet", to: :wordstylesheet
41
+ map "wordstylesheet-override", to: :wordstylesheet_override
42
+ map "standardstylesheet", to: :standardstylesheet
43
+ map "standardstylesheet-override", to: :standardstylesheet_override
44
+ map "header", to: :header
45
+ map "pdf-stylesheet", to: :pdfstylesheet
46
+ map "pdf-stylesheet-override", to: :pdfstylesheet_override
47
+ map "customize", to: :customize
48
+ map "coverpage-image", to: :coverpage_image
49
+ map "backpage-image", to: :backpage_image
50
+ end
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "lutaml/model"
4
+
5
+ module Metanorma
6
+ module Taste
7
+ # Model for individual stage configuration
8
+ class StageConfig < Lutaml::Model::Serializable
9
+ attribute :default, :string
10
+ attribute :published, :string
11
+ attribute :abbreviation, :string
12
+
13
+ key_value do
14
+ map "default", to: :default
15
+ map "published", to: :published
16
+ map "abbreviation", to: :abbreviation
17
+ end
18
+ end
19
+ end
20
+ end