metanorma-plateau 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 38805e986aa828aaf5643505c602f768a9fcca059f609fd9277ea19d27a96d75
4
- data.tar.gz: 80505ea36d9ad9add5ad0bbf58e263914ff98510c824dac89e5c221164baca6a
3
+ metadata.gz: e7e6a06814e7807141de2f9d749c608e5a1ef7c74d332acd5ddc47a7536490e8
4
+ data.tar.gz: d06df3e9c20eb21306001e6023558948977ce69b00f783b8cdd2b086e7bf53a9
5
5
  SHA512:
6
- metadata.gz: 55b12233299061c56b7de9977489402fb1c3410b6e3f1740a19347e6673b2b5ec5c869ed0707e9464146e67fd1d769eaa3c9bcead010ea4c48f9261933ccd676
7
- data.tar.gz: b2926315ab374f5227748b6216db23e501dd00dcdb3984f3814854cbfc6ddb038b637541e69f3497b31ede8b9ee579381c7149d3192f8646b841d588b60a38b6
6
+ metadata.gz: f4752b529260e640321944866c0a94f080dfbd2b011627ec8d956e6a25d710fe5ef2efee36ad88d82b34255e0f01af1fc58a654130efe19a412936038a5d176f
7
+ data.tar.gz: c5704f8dc54eb064989a551fe608838532735133f31cb970255a091228b7e43e46275ccaace4dcb2da93083dbb3fa2aac7e8f2c21443285dbd16d0b6a0f84381
@@ -3702,13 +3702,23 @@
3702
3702
  <xsl:attribute-set name="copyright-statement-style">
3703
3703
  </xsl:attribute-set> <!-- copyright-statement-style -->
3704
3704
 
3705
+ <xsl:template name="refine_copyright-statement-style">
3706
+ </xsl:template>
3707
+
3705
3708
  <xsl:attribute-set name="copyright-statement-title-style">
3706
3709
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
3707
3710
 
3711
+ <xsl:template name="refine_copyright-statement-title-style">
3712
+ </xsl:template>
3713
+
3708
3714
  <xsl:attribute-set name="copyright-statement-p-style">
3709
3715
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
3710
3716
 
3711
- <xsl:attribute-set name="license-statement-style">
3717
+ <xsl:template name="refine_copyright-statement-p-style">
3718
+
3719
+ </xsl:template>
3720
+
3721
+ <xsl:attribute-set name="license-statement-style">
3712
3722
  </xsl:attribute-set> <!-- license-statement-style -->
3713
3723
 
3714
3724
  <xsl:attribute-set name="license-statement-title-style">
@@ -3718,6 +3728,10 @@
3718
3728
  <xsl:attribute-set name="license-statement-p-style">
3719
3729
  </xsl:attribute-set> <!-- license-statement-p-style -->
3720
3730
 
3731
+ <xsl:template name="refine_license-statement-p-style">
3732
+
3733
+ </xsl:template>
3734
+
3721
3735
  <xsl:attribute-set name="legal-statement-style">
3722
3736
  </xsl:attribute-set> <!-- legal-statement-style -->
3723
3737
 
@@ -3745,6 +3759,8 @@
3745
3759
  <!-- ================================= -->
3746
3760
  <xsl:template match="mn:copyright-statement">
3747
3761
  <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
3762
+ <xsl:call-template name="refine_copyright-statement-style"/>
3763
+
3748
3764
  <xsl:apply-templates/>
3749
3765
  </fo:block>
3750
3766
  </xsl:template> <!-- copyright-statement -->
@@ -4834,7 +4850,7 @@
4834
4850
  </xsl:otherwise>
4835
4851
  </xsl:choose>
4836
4852
  </xsl:variable>
4837
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
4853
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
4838
4854
  <style name="{$key}"><xsl:value-of select="$value"/></style>
4839
4855
  </xsl:if>
4840
4856
  <xsl:if test="$key = 'text-indent'">
@@ -12399,13 +12415,31 @@
12399
12415
  <!-- skip here, see the template 'fmt-review-start' -->
12400
12416
  </xsl:when>
12401
12417
  <xsl:otherwise>
12402
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12403
- <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
12404
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12405
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12418
+ <xsl:choose>
12419
+ <xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
12420
+ <fo:block font-size="1pt" line-height="0.1">
12421
+ <xsl:call-template name="fo_inline_bookmark">
12422
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
12423
+ </xsl:call-template>
12424
+ </fo:block>
12425
+ </xsl:when>
12426
+ <xsl:otherwise>
12427
+ <xsl:call-template name="fo_inline_bookmark">
12428
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
12429
+ </xsl:call-template>
12430
+ </xsl:otherwise>
12431
+ </xsl:choose>
12406
12432
  </xsl:otherwise>
12407
12433
  </xsl:choose>
12408
12434
  </xsl:template>
12435
+
12436
+ <xsl:template name="fo_inline_bookmark">
12437
+ <xsl:param name="bookmark_id"/>
12438
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
12439
+ <fo:inline id="{@id}" font-size="1pt"><xsl:if test="preceding-sibling::node()[self::mn:fmt-annotation-start][@source = $bookmark_id] and following-sibling::node()[self::mn:fmt-annotation-end][@source = $bookmark_id]"><xsl:attribute name="line-height">0.1</xsl:attribute></xsl:if><xsl:value-of select="$hair_space"/></fo:inline>
12440
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
12441
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
12442
+ </xsl:template>
12409
12443
  <!-- =================== -->
12410
12444
  <!-- End of Index processing -->
12411
12445
  <!-- =================== -->
@@ -14271,11 +14305,35 @@
14271
14305
 
14272
14306
  <xsl:template match="mn:svgmap"/>
14273
14307
 
14308
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
14309
+
14274
14310
  <!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
14275
14311
  <xsl:template match="*[local-name() = 'lang_none']">
14276
14312
  <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
14277
14313
  </xsl:template>
14278
14314
 
14315
+ <xsl:template name="addTagElementT">
14316
+ <xsl:variable name="title_">
14317
+ <xsl:apply-templates select="mn:fmt-title"/>
14318
+ </xsl:variable>
14319
+ <xsl:variable name="title__">
14320
+ <xsl:for-each select="xalan:nodeset($title_)/*/node()">
14321
+ <xsl:choose>
14322
+ <xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
14323
+ <xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
14324
+ </xsl:choose>
14325
+ </xsl:for-each>
14326
+ </xsl:variable>
14327
+ <xsl:variable name="title" select="normalize-space($title__)"/>
14328
+ <xsl:if test="$title != ''">
14329
+ <xsl:attribute name="fox:title">
14330
+ <xsl:if test="ancestor::mn:sections">
14331
+ <xsl:text>Section </xsl:text>
14332
+ </xsl:if>
14333
+ <xsl:value-of select="$title"/></xsl:attribute>
14334
+ </xsl:if>
14335
+ </xsl:template>
14336
+
14279
14337
  <xsl:template name="replaceChar">
14280
14338
  <xsl:param name="text"/>
14281
14339
  <xsl:param name="replace"/>
@@ -15066,6 +15124,13 @@
15066
15124
  <xsl:with-param name="default" select="$text_align_default"/>
15067
15125
  </xsl:call-template>
15068
15126
  <xsl:call-template name="setKeepAttributes"/>
15127
+ <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
15128
+ <xsl:variable name="styles">
15129
+ <xsl:apply-templates select="*[1]"/>
15130
+ </xsl:variable>
15131
+ <!-- move attribute line-height from inline to block -->
15132
+ <xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
15133
+ </xsl:if>
15069
15134
  </xsl:template>
15070
15135
 
15071
15136
  <xsl:template name="setKeepAttributes">
@@ -15091,34 +15156,41 @@
15091
15156
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
15092
15157
  <fo:block>
15093
15158
  <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
15094
- <xsl:choose>
15095
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
15096
- <fo:instream-foreign-object fox:alt-text="Image Front">
15097
- <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
15098
- <xsl:call-template name="getSVG"/>
15099
- </fo:instream-foreign-object>
15100
- </xsl:when>
15101
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
15102
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
15103
- </xsl:when>
15104
- <xsl:otherwise> <!-- bitmap image -->
15105
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
15106
- <xsl:if test="$coverimage_src != ''">
15107
- <xsl:variable name="coverpage">
15108
- <xsl:call-template name="getImageURL">
15109
- <xsl:with-param name="src" select="$coverimage_src"/>
15110
- </xsl:call-template>
15111
- </xsl:variable>
15112
- <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
15113
- <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
15114
- </xsl:if>
15115
- </xsl:otherwise>
15116
- </xsl:choose>
15159
+
15160
+ <xsl:call-template name="insertPageImage"/>
15161
+
15117
15162
  </xsl:for-each>
15118
15163
  </fo:block>
15119
15164
  </fo:block-container>
15120
15165
  </xsl:template>
15121
15166
 
15167
+ <xsl:template name="insertPageImage">
15168
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
15169
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
15170
+ <xsl:choose>
15171
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
15172
+ <fo:instream-foreign-object fox:alt-text="Image Front">
15173
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
15174
+ <xsl:call-template name="getSVG"/>
15175
+ </fo:instream-foreign-object>
15176
+ </xsl:when>
15177
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
15178
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
15179
+ </xsl:when>
15180
+ <xsl:otherwise> <!-- bitmap image -->
15181
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
15182
+ <xsl:if test="$coverimage_src != ''">
15183
+ <xsl:variable name="coverpage">
15184
+ <xsl:call-template name="getImageURL">
15185
+ <xsl:with-param name="src" select="$coverimage_src"/>
15186
+ </xsl:call-template>
15187
+ </xsl:variable>
15188
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
15189
+ </xsl:if>
15190
+ </xsl:otherwise>
15191
+ </xsl:choose>
15192
+ </xsl:template>
15193
+
15122
15194
  <xsl:template name="getImageURL">
15123
15195
  <xsl:param name="src"/>
15124
15196
  <xsl:choose>
@@ -15546,6 +15618,14 @@
15546
15618
  </xsl:attribute>
15547
15619
  </xsl:template>
15548
15620
 
15621
+ <xsl:template name="getCharByCodePoint">
15622
+ <xsl:param name="codepoint"/>
15623
+ <xsl:param name="radix">16</xsl:param>
15624
+ <xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
15625
+ <xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
15626
+ <xsl:value-of select="java:java.lang.String.new($chars)"/>
15627
+ </xsl:template>
15628
+
15549
15629
  <xsl:template name="substring-after-last">
15550
15630
  <xsl:param name="value"/>
15551
15631
  <xsl:param name="delimiter"/>
@@ -76,12 +76,6 @@ from other documents in the same doctype</a:documentation>
76
76
  <ref name="flavor">
77
77
  <a:documentation>Flavour of Metanorma used to process this document</a:documentation>
78
78
  </ref>
79
- <optional>
80
- <ref name="editorialgroup">
81
- <a:documentation>Groups associated with the production of the standards document, typically within
82
- a standards definition organization</a:documentation>
83
- </ref>
84
- </optional>
85
79
  <zeroOrMore>
86
80
  <ref name="ics">
87
81
  <a:documentation>Classification of the document contents taken from the International Classification of Standards</a:documentation>
@@ -130,49 +124,6 @@ a standards definition organization</a:documentation>
130
124
  However we prefer not to hardcode it, given ongoing extension.</a:documentation>
131
125
  <text/>
132
126
  </define>
133
- <define name="editorialgroup">
134
- <a:documentation>A group associated with the production of the standards document, typically within
135
- a standards definition organization</a:documentation>
136
- <element name="editorialgroup">
137
- <oneOrMore>
138
- <ref name="technical-committee">
139
- <a:documentation>A technical committee associated with the production of the standards document</a:documentation>
140
- </ref>
141
- </oneOrMore>
142
- </element>
143
- </define>
144
- <define name="technical-committee">
145
- <a:documentation>Technical committee associated with the production of a standards document</a:documentation>
146
- <element name="technical-committee">
147
- <ref name="IsoWorkgroup"/>
148
- </element>
149
- </define>
150
- <define name="IsoWorkgroup">
151
- <optional>
152
- <attribute name="number">
153
- <a:documentation>Numeric identifier of the technical committee</a:documentation>
154
- </attribute>
155
- </optional>
156
- <optional>
157
- <attribute name="type">
158
- <a:documentation>Type of the technical committee, used in identifying the technical committee</a:documentation>
159
- </attribute>
160
- </optional>
161
- <optional>
162
- <attribute name="identifier">
163
- <a:documentation>Non-numeric, complete identifier of the technical committee</a:documentation>
164
- </attribute>
165
- </optional>
166
- <optional>
167
- <attribute name="prefix">
168
- <a:documentation>Disambiguating prefix added to number to form the identifier of the technical committee,
169
- typically indicating its type</a:documentation>
170
- </attribute>
171
- </optional>
172
- <text>
173
- <a:documentation>Name of the technical committee</a:documentation>
174
- </text>
175
- </define>
176
127
  <define name="ics">
177
128
  <a:documentation>Classification taken from the International Classification of Standards.
178
129
  ICS is defined by ISO here -- https://www.iso.org/publication/PUB100033.html</a:documentation>
@@ -242,6 +242,8 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
242
242
  </choice>
243
243
  </define>
244
244
  <define name="roledescription">
245
+ <a:documentation>A more detailed description of the role of the contributor
246
+ Some descriptions are reserved words; in particular, the editorial committee of a standard has the role description "committee"</a:documentation>
245
247
  <element name="description">
246
248
  <ref name="LocalizedMarkedUpString"/>
247
249
  </element>
@@ -443,7 +445,10 @@ real names (if the person is named with a pseudonym or user name); previous lega
443
445
  </oneOrMore>
444
446
  <zeroOrMore>
445
447
  <ref name="subdivision">
446
- <a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item</a:documentation>
448
+ <a:documentation>The subdivision of the organization directly involved with the production of the bibliographic item.
449
+ Multiple subdivisions can be specified for an organization, with no implication of hierarchical
450
+ relation between them
451
+ Editorial and advisory groups are represented as consecutive subdivisions of the SDO</a:documentation>
447
452
  </ref>
448
453
  </zeroOrMore>
449
454
  <optional>
@@ -485,6 +490,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
485
490
  <a:documentation>The type of subdivision</a:documentation>
486
491
  </attribute>
487
492
  </optional>
493
+ <optional>
494
+ <attribute name="subtype">
495
+ <a:documentation>The subtype of subdivision; e.g. different types of technical committee</a:documentation>
496
+ </attribute>
497
+ </optional>
488
498
  <ref name="OrganizationType">
489
499
  <a:documentation>The subdivision, modelled recursively as an organization</a:documentation>
490
500
  </ref>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- VERSION v2.1.0 -->
3
+ <!-- VERSION v2.1.1 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -2233,6 +2233,11 @@ used in document amendments</a:documentation>
2233
2233
  <ref name="RequiredId"/>
2234
2234
  <ref name="NumberingAttributes"/>
2235
2235
  <ref name="BlockAttributes"/>
2236
+ <optional>
2237
+ <attribute name="type">
2238
+ <a:documentation>Semantic classification of note</a:documentation>
2239
+ </attribute>
2240
+ </optional>
2236
2241
  <oneOrMore>
2237
2242
  <choice>
2238
2243
  <a:documentation>Content of the term note</a:documentation>
@@ -22,11 +22,6 @@
22
22
  </group>
23
23
  </element>
24
24
  </define>
25
- <define name="editorialgroup">
26
- <element name="editorialgroup">
27
- <ref name="ISOProjectGroup"/>
28
- </element>
29
- </define>
30
25
  </include>
31
26
  <define name="BibDataExtensionType" combine="interleave">
32
27
  <optional>
@@ -35,28 +30,6 @@
35
30
  </ref>
36
31
  </optional>
37
32
  </define>
38
- <define name="ISOProjectGroup">
39
- <zeroOrMore>
40
- <ref name="agency"/>
41
- </zeroOrMore>
42
- <oneOrMore>
43
- <ref name="technical-committee"/>
44
- </oneOrMore>
45
- <zeroOrMore>
46
- <ref name="subcommittee"/>
47
- </zeroOrMore>
48
- <zeroOrMore>
49
- <ref name="workgroup"/>
50
- </zeroOrMore>
51
- <optional>
52
- <ref name="secretariat"/>
53
- </optional>
54
- </define>
55
- <define name="agency">
56
- <element name="agency">
57
- <text/>
58
- </element>
59
- </define>
60
33
  <define name="documentnumber">
61
34
  <element name="project-number">
62
35
  <optional>
@@ -92,21 +65,6 @@
92
65
  <data type="int"/>
93
66
  </element>
94
67
  </define>
95
- <define name="subcommittee">
96
- <element name="subcommittee">
97
- <ref name="IsoWorkgroup"/>
98
- </element>
99
- </define>
100
- <define name="workgroup">
101
- <element name="workgroup">
102
- <ref name="IsoWorkgroup"/>
103
- </element>
104
- </define>
105
- <define name="secretariat">
106
- <element name="secretariat">
107
- <text/>
108
- </element>
109
- </define>
110
68
  <define name="stagename">
111
69
  <element name="stagename">
112
70
  <optional>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Plateau
3
- VERSION = "1.1.2".freeze
3
+ VERSION = "1.1.3".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-plateau
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-08-04 00:00:00.000000000 Z
11
+ date: 2025-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-jis