metanorma-ribose 2.7.1 → 2.7.2

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: e200de00102ebf717f3b8b5282e64614182b4a2e5b7cd222bf75b10b7fd34b4e
4
- data.tar.gz: 7313553ba686df4b63f11a8880b062cf88e56c10b3d94d10bbe83520ccce03c4
3
+ metadata.gz: 828c938e91fe7fcae5d27663b31d76ff96e9db5b4ea295c25004f5a0407fe5e3
4
+ data.tar.gz: 8ca578e85bd6fbd5bc24aa2936c4e9e153ac5356ffd03512457e54648c6134ab
5
5
  SHA512:
6
- metadata.gz: 319070c0b9830d8cc75583a573223787f79ef76dc56502b40f4d96664e8aeefc55120c4e14f7ccfaba0418e9a92f338d264b7e611708856dd00fbab4ec00e5f1
7
- data.tar.gz: 3295a46c84c16478ecc56d9f4cf11b036c2275cc89a12780a1ca8b375608b0052c407823e304ea5544f6073796bb75c9461a57f80143117235fefd411d8ddd19
6
+ metadata.gz: 157776f1f2ba976594289d5b92d97622eb35b82c4cf36741e4bcd86ef93771d2e1a834998f2b3b2738de3e56bcf21dab23692bd271928ecdb4001ab8861258f8
7
+ data.tar.gz: ad55e604bfee6dfb05ca0e68a77ead2f97f5a0c95f1a03c95ae176563b5009c8856e998c12759edc3ad21e502c51c3dcc5c3f574201e26b7c1861cdc6851dfd6
@@ -466,7 +466,8 @@
466
466
  </xsl:call-template>
467
467
  </fo:block>
468
468
  <fo:block><xsl:value-of select="$docnumber_version"/></fo:block>
469
- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/>
469
+ <!-- <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"/> -->
470
+ <xsl:apply-templates select="/mn:metanorma/mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name"/>
470
471
  <fo:block>
471
472
  <xsl:text>© </xsl:text>
472
473
  <xsl:value-of select="$copyright_year"/>
@@ -678,7 +679,8 @@
678
679
  </fo:block>
679
680
  </xsl:template>
680
681
 
681
- <xsl:template match="mn:bibdata/mn:ext/mn:editorialgroup/mn:committee">
682
+ <!-- <xsl:template match="mn:bibdata/mn:ext/mn:editorialgroup/mn:committee"> -->
683
+ <xsl:template match="mn:bibdata/mn:contributor[mn:role[@type = 'author']/mn:description = 'committee']/mn:organization/mn:subdivision[@type = 'Committee']/mn:name">
682
684
  <fo:block><xsl:apply-templates/></fo:block>
683
685
  </xsl:template>
684
686
 
@@ -2859,13 +2861,23 @@
2859
2861
  <xsl:attribute-set name="copyright-statement-style">
2860
2862
  </xsl:attribute-set> <!-- copyright-statement-style -->
2861
2863
 
2864
+ <xsl:template name="refine_copyright-statement-style">
2865
+ </xsl:template>
2866
+
2862
2867
  <xsl:attribute-set name="copyright-statement-title-style">
2863
2868
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
2864
2869
 
2870
+ <xsl:template name="refine_copyright-statement-title-style">
2871
+ </xsl:template>
2872
+
2865
2873
  <xsl:attribute-set name="copyright-statement-p-style">
2866
2874
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
2867
2875
 
2868
- <xsl:attribute-set name="license-statement-style">
2876
+ <xsl:template name="refine_copyright-statement-p-style">
2877
+
2878
+ </xsl:template>
2879
+
2880
+ <xsl:attribute-set name="license-statement-style">
2869
2881
  </xsl:attribute-set> <!-- license-statement-style -->
2870
2882
 
2871
2883
  <xsl:attribute-set name="license-statement-title-style">
@@ -2875,6 +2887,10 @@
2875
2887
  <xsl:attribute-set name="license-statement-p-style">
2876
2888
  </xsl:attribute-set> <!-- license-statement-p-style -->
2877
2889
 
2890
+ <xsl:template name="refine_license-statement-p-style">
2891
+
2892
+ </xsl:template>
2893
+
2878
2894
  <xsl:attribute-set name="legal-statement-style">
2879
2895
  </xsl:attribute-set> <!-- legal-statement-style -->
2880
2896
 
@@ -2905,6 +2921,8 @@
2905
2921
  <!-- ================================= -->
2906
2922
  <xsl:template match="mn:copyright-statement">
2907
2923
  <fo:block xsl:use-attribute-sets="copyright-statement-style" role="SKIP">
2924
+ <xsl:call-template name="refine_copyright-statement-style"/>
2925
+
2908
2926
  <xsl:apply-templates/>
2909
2927
  </fo:block>
2910
2928
  </xsl:template> <!-- copyright-statement -->
@@ -4046,7 +4064,7 @@
4046
4064
  </xsl:otherwise>
4047
4065
  </xsl:choose>
4048
4066
  </xsl:variable>
4049
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
4067
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift' or $key = 'line-height' ">
4050
4068
  <style name="{$key}"><xsl:value-of select="$value"/></style>
4051
4069
  </xsl:if>
4052
4070
  <xsl:if test="$key = 'text-indent'">
@@ -11605,13 +11623,31 @@
11605
11623
  <!-- skip here, see the template 'fmt-review-start' -->
11606
11624
  </xsl:when>
11607
11625
  <xsl:otherwise>
11608
- <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
11609
- <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>
11610
- <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
11611
- <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
11626
+ <xsl:choose>
11627
+ <xsl:when test="parent::mn:example or parent::mn:termexample or parent::mn:note or parent::mn:termnote">
11628
+ <fo:block font-size="1pt" line-height="0.1">
11629
+ <xsl:call-template name="fo_inline_bookmark">
11630
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
11631
+ </xsl:call-template>
11632
+ </fo:block>
11633
+ </xsl:when>
11634
+ <xsl:otherwise>
11635
+ <xsl:call-template name="fo_inline_bookmark">
11636
+ <xsl:with-param name="bookmark_id" select="$bookmark_id"/>
11637
+ </xsl:call-template>
11638
+ </xsl:otherwise>
11639
+ </xsl:choose>
11612
11640
  </xsl:otherwise>
11613
11641
  </xsl:choose>
11614
11642
  </xsl:template>
11643
+
11644
+ <xsl:template name="fo_inline_bookmark">
11645
+ <xsl:param name="bookmark_id"/>
11646
+ <!-- <fo:inline id="{@id}" font-size="1pt"/> -->
11647
+ <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>
11648
+ <!-- we need to add zero-width space, otherwise this fo:inline is missing in IF xml -->
11649
+ <xsl:if test="not(following-sibling::node()[normalize-space() != ''])"><fo:inline font-size="1pt"> </fo:inline></xsl:if>
11650
+ </xsl:template>
11615
11651
  <!-- =================== -->
11616
11652
  <!-- End of Index processing -->
11617
11653
  <!-- =================== -->
@@ -13510,11 +13546,35 @@
13510
13546
 
13511
13547
  <xsl:template match="mn:svgmap"/>
13512
13548
 
13549
+ <xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
13550
+
13513
13551
  <!-- for correct rendering combining chars, added in mode="update_xml_step2" -->
13514
13552
  <xsl:template match="*[local-name() = 'lang_none']">
13515
13553
  <fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
13516
13554
  </xsl:template>
13517
13555
 
13556
+ <xsl:template name="addTagElementT">
13557
+ <xsl:variable name="title_">
13558
+ <xsl:apply-templates select="mn:fmt-title"/>
13559
+ </xsl:variable>
13560
+ <xsl:variable name="title__">
13561
+ <xsl:for-each select="xalan:nodeset($title_)/*/node()">
13562
+ <xsl:choose>
13563
+ <xsl:when test="self::text()"><xsl:text> </xsl:text><xsl:value-of select="."/><xsl:text> </xsl:text></xsl:when>
13564
+ <xsl:otherwise><xsl:text> </xsl:text><xsl:copy-of select="."/><xsl:text> </xsl:text></xsl:otherwise>
13565
+ </xsl:choose>
13566
+ </xsl:for-each>
13567
+ </xsl:variable>
13568
+ <xsl:variable name="title" select="normalize-space($title__)"/>
13569
+ <xsl:if test="$title != ''">
13570
+ <xsl:attribute name="fox:title">
13571
+ <xsl:if test="ancestor::mn:sections">
13572
+ <xsl:text>Section </xsl:text>
13573
+ </xsl:if>
13574
+ <xsl:value-of select="$title"/></xsl:attribute>
13575
+ </xsl:if>
13576
+ </xsl:template>
13577
+
13518
13578
  <xsl:template name="replaceChar">
13519
13579
  <xsl:param name="text"/>
13520
13580
  <xsl:param name="replace"/>
@@ -14281,6 +14341,13 @@
14281
14341
  <xsl:with-param name="default" select="$text_align_default"/>
14282
14342
  </xsl:call-template>
14283
14343
  <xsl:call-template name="setKeepAttributes"/>
14344
+ <xsl:if test="node()[1][self::mn:span][contains(@style, 'line-height')]">
14345
+ <xsl:variable name="styles">
14346
+ <xsl:apply-templates select="*[1]"/>
14347
+ </xsl:variable>
14348
+ <!-- move attribute line-height from inline to block -->
14349
+ <xsl:attribute name="line-height"><xsl:value-of select="xalan:nodeset($styles)//*/@line-height"/></xsl:attribute>
14350
+ </xsl:if>
14284
14351
  </xsl:template>
14285
14352
 
14286
14353
  <xsl:template name="setKeepAttributes">
@@ -14306,34 +14373,41 @@
14306
14373
  <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
14307
14374
  <fo:block>
14308
14375
  <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = $name][1]/mn:value/mn:image[$num]">
14309
- <xsl:choose>
14310
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
14311
- <fo:instream-foreign-object fox:alt-text="Image Front">
14312
- <xsl:attribute name="content-height"><xsl:value-of select="$pageHeight"/>mm</xsl:attribute>
14313
- <xsl:call-template name="getSVG"/>
14314
- </fo:instream-foreign-object>
14315
- </xsl:when>
14316
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
14317
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
14318
- </xsl:when>
14319
- <xsl:otherwise> <!-- bitmap image -->
14320
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
14321
- <xsl:if test="$coverimage_src != ''">
14322
- <xsl:variable name="coverpage">
14323
- <xsl:call-template name="getImageURL">
14324
- <xsl:with-param name="src" select="$coverimage_src"/>
14325
- </xsl:call-template>
14326
- </xsl:variable>
14327
- <!-- <xsl:variable name="coverpage" select="concat('url(file:',$basepath, 'coverpage1.png', ')')"/> --> <!-- for DEBUG -->
14328
- <fo:external-graphic src="{$coverpage}" width="{$pageWidth}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
14329
- </xsl:if>
14330
- </xsl:otherwise>
14331
- </xsl:choose>
14376
+
14377
+ <xsl:call-template name="insertPageImage"/>
14378
+
14332
14379
  </xsl:for-each>
14333
14380
  </fo:block>
14334
14381
  </fo:block-container>
14335
14382
  </xsl:template>
14336
14383
 
14384
+ <xsl:template name="insertPageImage">
14385
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
14386
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
14387
+ <xsl:choose>
14388
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
14389
+ <fo:instream-foreign-object fox:alt-text="Image Front">
14390
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
14391
+ <xsl:call-template name="getSVG"/>
14392
+ </fo:instream-foreign-object>
14393
+ </xsl:when>
14394
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
14395
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front"/>
14396
+ </xsl:when>
14397
+ <xsl:otherwise> <!-- bitmap image -->
14398
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
14399
+ <xsl:if test="$coverimage_src != ''">
14400
+ <xsl:variable name="coverpage">
14401
+ <xsl:call-template name="getImageURL">
14402
+ <xsl:with-param name="src" select="$coverimage_src"/>
14403
+ </xsl:call-template>
14404
+ </xsl:variable>
14405
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front"/>
14406
+ </xsl:if>
14407
+ </xsl:otherwise>
14408
+ </xsl:choose>
14409
+ </xsl:template>
14410
+
14337
14411
  <xsl:template name="getImageURL">
14338
14412
  <xsl:param name="src"/>
14339
14413
  <xsl:choose>
@@ -14761,6 +14835,14 @@
14761
14835
  </xsl:attribute>
14762
14836
  </xsl:template>
14763
14837
 
14838
+ <xsl:template name="getCharByCodePoint">
14839
+ <xsl:param name="codepoint"/>
14840
+ <xsl:param name="radix">16</xsl:param>
14841
+ <xsl:variable name="codepointInt" select="java:java.lang.Integer.parseInt($codepoint,$radix)"/>
14842
+ <xsl:variable name="chars" select="java:java.lang.Character.toChars($codepointInt)"/>
14843
+ <xsl:value-of select="java:java.lang.String.new($chars)"/>
14844
+ </xsl:template>
14845
+
14764
14846
  <xsl:template name="substring-after-last">
14765
14847
  <xsl:param name="value"/>
14766
14848
  <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>
@@ -13,13 +13,6 @@
13
13
  <value>standard</value>
14
14
  </choice>
15
15
  </define>
16
- <define name="editorialgroup">
17
- <element name="editorialgroup">
18
- <oneOrMore>
19
- <ref name="committee"/>
20
- </oneOrMore>
21
- </element>
22
- </define>
23
16
  </include>
24
17
  <define name="BibDataExtensionType" combine="interleave">
25
18
  <optional>
@@ -28,17 +21,6 @@
28
21
  </ref>
29
22
  </optional>
30
23
  </define>
31
- <define name="committee">
32
- <element name="committee">
33
- <attribute name="type">
34
- <choice>
35
- <value>technical</value>
36
- <value>provisional</value>
37
- </choice>
38
- </attribute>
39
- <text/>
40
- </element>
41
- </define>
42
24
  <define name="security">
43
25
  <element name="security">
44
26
  <text/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.7.1".freeze
3
+ VERSION = "2.7.2".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.1
4
+ version: 2.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
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-generic