metanorma-ribose 2.6.4 → 2.6.5
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 +4 -4
- data/lib/isodoc/ribose/base_convert.rb +0 -21
- data/lib/isodoc/ribose/presentation_xml_convert.rb +3 -2
- data/lib/isodoc/ribose/ribose.standard.xsl +171 -25
- data/lib/metanorma/ribose/converter.rb +0 -17
- data/lib/metanorma/ribose/isodoc.rng +16 -1
- data/lib/metanorma/ribose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5229a5ccf9480972e8979ef14fd73619e5cd481f81ab26313003ae01ab2d98ee
|
4
|
+
data.tar.gz: a03a1d74cbf873a7dd04527159150679520d078763c2fe50ad087d9cf24721ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d99403628ebd6ce17e3eeaabec0602aadfec85cbe648074ac187f7604ee15833cfcbbf864d5329ebedd798d29fc7beac1ac9898c02ad179ec9e908bd9c2dd7fe
|
7
|
+
data.tar.gz: e447b7a12a251deecdb7c05e6ae776f604f4d7fb7eeddfdb41a20e36482e9eb6d6fcf7b00748bdd462220c13560a974b38da34897fb9df41da8e0692ad0d3f28
|
@@ -1,27 +1,6 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Ribose
|
3
3
|
module BaseConvert
|
4
|
-
def executivesummary(clause, out)
|
5
|
-
title_attr = { class: "IntroTitle" }
|
6
|
-
page_break(out)
|
7
|
-
out.div class: "Section3", id: clause["id"] do |div|
|
8
|
-
clause_name(clause, clause&.at(ns("./fmt-title")), div, title_attr)
|
9
|
-
clause.elements.each do |e|
|
10
|
-
parse(e, div) unless e.name == "fmt-title"
|
11
|
-
end
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
def sections_names
|
16
|
-
super << "executivesummary"
|
17
|
-
end
|
18
|
-
|
19
|
-
def is_clause?(name)
|
20
|
-
return true if name == "executivesummary"
|
21
|
-
|
22
|
-
super
|
23
|
-
end
|
24
|
-
|
25
4
|
def clausedelim
|
26
5
|
""
|
27
6
|
end
|
@@ -3728,8 +3728,14 @@
|
|
3728
3728
|
</xsl:choose>
|
3729
3729
|
</xsl:variable>
|
3730
3730
|
|
3731
|
+
<xsl:call-template name="setNamedDestination"/>
|
3732
|
+
|
3731
3733
|
<fo:block-container xsl:use-attribute-sets="table-container-style" role="SKIP">
|
3732
3734
|
|
3735
|
+
<xsl:for-each select="*[local-name() = 'name']">
|
3736
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
3737
|
+
</xsl:for-each>
|
3738
|
+
|
3733
3739
|
<xsl:call-template name="refine_table-container-style">
|
3734
3740
|
<xsl:with-param name="margin-side" select="$margin-side"/>
|
3735
3741
|
</xsl:call-template>
|
@@ -3934,6 +3940,7 @@
|
|
3934
3940
|
<!-- table/name-->
|
3935
3941
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3936
3942
|
<xsl:param name="continued"/>
|
3943
|
+
<xsl:param name="cols-count"/>
|
3937
3944
|
<xsl:if test="normalize-space() != ''">
|
3938
3945
|
|
3939
3946
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
@@ -3955,9 +3962,30 @@
|
|
3955
3962
|
|
3956
3963
|
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
3957
3964
|
<xsl:if test="$continued = 'true'">
|
3958
|
-
|
3959
|
-
|
3960
|
-
|
3965
|
+
|
3966
|
+
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
3967
|
+
|
3968
|
+
<xsl:choose>
|
3969
|
+
<xsl:when test="string(number($cols-count)) != 'NaN'">
|
3970
|
+
<fo:table width="100%" table-layout="fixed" role="SKIP">
|
3971
|
+
<fo:table-body role="SKIP">
|
3972
|
+
<fo:table-row>
|
3973
|
+
<fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
|
3974
|
+
<fo:block text-align="right" role="SKIP">
|
3975
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3976
|
+
</fo:block>
|
3977
|
+
</fo:table-cell>
|
3978
|
+
</fo:table-row>
|
3979
|
+
</fo:table-body>
|
3980
|
+
</fo:table>
|
3981
|
+
</xsl:when>
|
3982
|
+
<xsl:otherwise>
|
3983
|
+
<fo:block text-align="right">
|
3984
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
3985
|
+
</fo:block>
|
3986
|
+
</xsl:otherwise>
|
3987
|
+
</xsl:choose>
|
3988
|
+
|
3961
3989
|
</xsl:if>
|
3962
3990
|
<!-- </xsl:if> -->
|
3963
3991
|
|
@@ -4350,6 +4378,7 @@
|
|
4350
4378
|
|
4351
4379
|
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
|
4352
4380
|
<xsl:with-param name="continued">true</xsl:with-param>
|
4381
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
4353
4382
|
</xsl:apply-templates>
|
4354
4383
|
|
4355
4384
|
<xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
|
@@ -4731,8 +4760,8 @@
|
|
4731
4760
|
<xsl:for-each select="xalan:nodeset($styles__)/item">
|
4732
4761
|
<xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
|
4733
4762
|
<xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
|
4734
|
-
<xsl:if test="$key = 'color' or
|
4735
|
-
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
4763
|
+
<xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
|
4764
|
+
<style name="{$key}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($value), 'currentColor', 'inherit')"/></style>
|
4736
4765
|
</xsl:if>
|
4737
4766
|
</xsl:for-each>
|
4738
4767
|
</xsl:variable>
|
@@ -4796,6 +4825,7 @@
|
|
4796
4825
|
<!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
|
4797
4826
|
<xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
|
4798
4827
|
|
4828
|
+
<xsl:call-template name="setNamedDestination"/>
|
4799
4829
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
4800
4830
|
<xsl:copy-of select="@id"/>
|
4801
4831
|
|
@@ -5321,7 +5351,7 @@
|
|
5321
5351
|
<xsl:variable name="target" select="@target"/>
|
5322
5352
|
<xsl:choose>
|
5323
5353
|
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
5324
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]
|
5354
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body'][@id = $target]) and $footnotes/*[local-name() = 'fmt-fn-body'][@id = $target]">
|
5325
5355
|
<xsl:call-template name="fn">
|
5326
5356
|
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
5327
5357
|
</xsl:call-template>
|
@@ -5417,6 +5447,10 @@
|
|
5417
5447
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
5418
5448
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
5419
5449
|
|
5450
|
+
<xsl:if test="@key = 'true' and ancestor::*[local-name() = 'figure']">
|
5451
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
5452
|
+
</xsl:if>
|
5453
|
+
|
5420
5454
|
<xsl:call-template name="setBlockSpanAll"/>
|
5421
5455
|
|
5422
5456
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
@@ -5710,7 +5744,7 @@
|
|
5710
5744
|
|
5711
5745
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
5712
5746
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
5713
|
-
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
5747
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always" keep-with-previous="always">
|
5714
5748
|
<xsl:call-template name="refine_figure_key_style"/>
|
5715
5749
|
<xsl:apply-templates/>
|
5716
5750
|
</fo:block>
|
@@ -5964,6 +5998,7 @@
|
|
5964
5998
|
|
5965
5999
|
<xsl:call-template name="refine_dt-cell-style"/>
|
5966
6000
|
|
6001
|
+
<xsl:call-template name="setNamedDestination"/>
|
5967
6002
|
<fo:block xsl:use-attribute-sets="dt-block-style" role="SKIP">
|
5968
6003
|
|
5969
6004
|
<xsl:choose>
|
@@ -6408,7 +6443,7 @@
|
|
6408
6443
|
<!-- ================= -->
|
6409
6444
|
|
6410
6445
|
<!-- highlight text -->
|
6411
|
-
<xsl:template match="*[local-name()='hi']">
|
6446
|
+
<xsl:template match="*[local-name()='hi'] | *[local-name() = 'span'][@class = 'fmt-hi']" priority="3">
|
6412
6447
|
<fo:inline background-color="yellow">
|
6413
6448
|
<xsl:apply-templates/>
|
6414
6449
|
</fo:inline>
|
@@ -8003,6 +8038,7 @@
|
|
8003
8038
|
<!-- Appendix processing -->
|
8004
8039
|
<!-- ======================== -->
|
8005
8040
|
<xsl:template match="*[local-name()='appendix']">
|
8041
|
+
<xsl:call-template name="setNamedDestination"/>
|
8006
8042
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
8007
8043
|
<xsl:apply-templates select="*[local-name()='title']"/>
|
8008
8044
|
</fo:block>
|
@@ -8013,13 +8049,14 @@
|
|
8013
8049
|
<xsl:variable name="level">
|
8014
8050
|
<xsl:call-template name="getLevel"/>
|
8015
8051
|
</xsl:variable>
|
8016
|
-
<fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
|
8052
|
+
<fo:inline role="H{$level}"><xsl:call-template name="setIDforNamedDestination"/><xsl:apply-templates/></fo:inline>
|
8017
8053
|
</xsl:template>
|
8018
8054
|
<!-- ======================== -->
|
8019
8055
|
<!-- END Appendix processing -->
|
8020
8056
|
<!-- ======================== -->
|
8021
8057
|
|
8022
8058
|
<xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
|
8059
|
+
<xsl:call-template name="setNamedDestination"/>
|
8023
8060
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
8024
8061
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
8025
8062
|
</fo:block>
|
@@ -8049,6 +8086,7 @@
|
|
8049
8086
|
<xsl:template match="*[local-name() = 'annotation']/*[local-name() = 'p']">
|
8050
8087
|
<xsl:param name="callout"/>
|
8051
8088
|
<fo:inline id="{@id}">
|
8089
|
+
<xsl:call-template name="setNamedDestination"/>
|
8052
8090
|
<!-- for first p in annotation, put <x> -->
|
8053
8091
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
8054
8092
|
<xsl:apply-templates/>
|
@@ -8095,6 +8133,7 @@
|
|
8095
8133
|
|
8096
8134
|
</xsl:if>
|
8097
8135
|
<fo:block-container margin-left="0mm" role="SKIP">
|
8136
|
+
<xsl:call-template name="setNamedDestination"/>
|
8098
8137
|
<fo:block id="{@id}">
|
8099
8138
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/> <!-- formula's number will be process in 'stem' template -->
|
8100
8139
|
</fo:block>
|
@@ -8140,8 +8179,13 @@
|
|
8140
8179
|
</fo:block>
|
8141
8180
|
</fo:table-cell>
|
8142
8181
|
<fo:table-cell display-align="center">
|
8182
|
+
|
8143
8183
|
<fo:block xsl:use-attribute-sets="formula-stem-number-style" role="SKIP">
|
8144
8184
|
|
8185
|
+
<xsl:for-each select="../*[local-name() = 'name']">
|
8186
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
8187
|
+
</xsl:for-each>
|
8188
|
+
|
8145
8189
|
<xsl:call-template name="refine_formula-stem-number-style"/>
|
8146
8190
|
|
8147
8191
|
<xsl:apply-templates select="../*[local-name() = 'name']"/>
|
@@ -8176,6 +8220,8 @@
|
|
8176
8220
|
|
8177
8221
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
8178
8222
|
|
8223
|
+
<xsl:call-template name="setNamedDestination"/>
|
8224
|
+
|
8179
8225
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
8180
8226
|
|
8181
8227
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -8240,6 +8286,7 @@
|
|
8240
8286
|
</xsl:template>
|
8241
8287
|
|
8242
8288
|
<xsl:template match="*[local-name() = 'termnote']">
|
8289
|
+
<xsl:call-template name="setNamedDestination"/>
|
8243
8290
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
8244
8291
|
|
8245
8292
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -8346,12 +8393,14 @@
|
|
8346
8393
|
|
8347
8394
|
<xsl:template match="*[local-name() = 'terms']">
|
8348
8395
|
<!-- <xsl:message>'terms' <xsl:number/> processing...</xsl:message> -->
|
8396
|
+
<xsl:call-template name="setNamedDestination"/>
|
8349
8397
|
<fo:block id="{@id}">
|
8350
8398
|
<xsl:apply-templates/>
|
8351
8399
|
</fo:block>
|
8352
8400
|
</xsl:template>
|
8353
8401
|
|
8354
8402
|
<xsl:template match="*[local-name() = 'term']">
|
8403
|
+
<xsl:call-template name="setNamedDestination"/>
|
8355
8404
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
8356
8405
|
|
8357
8406
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
|
@@ -8383,6 +8432,7 @@
|
|
8383
8432
|
<xsl:template match="*[local-name() = 'figure']" name="figure">
|
8384
8433
|
<xsl:variable name="isAdded" select="@added"/>
|
8385
8434
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
8435
|
+
<xsl:call-template name="setNamedDestination"/>
|
8386
8436
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="figure-block-style">
|
8387
8437
|
<xsl:call-template name="refine_figure-block-style"/>
|
8388
8438
|
|
@@ -8402,6 +8452,11 @@
|
|
8402
8452
|
</xsl:variable>
|
8403
8453
|
|
8404
8454
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
8455
|
+
|
8456
|
+
<xsl:for-each select="*[local-name() = 'name']"> <!-- set context -->
|
8457
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
8458
|
+
</xsl:for-each>
|
8459
|
+
|
8405
8460
|
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
8406
8461
|
</fo:block>
|
8407
8462
|
|
@@ -8432,6 +8487,7 @@
|
|
8432
8487
|
</xsl:template>
|
8433
8488
|
|
8434
8489
|
<xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
8490
|
+
<xsl:call-template name="setNamedDestination"/>
|
8435
8491
|
<fo:block id="{@id}">
|
8436
8492
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
8437
8493
|
</fo:block>
|
@@ -8445,6 +8501,7 @@
|
|
8445
8501
|
</xsl:template>
|
8446
8502
|
|
8447
8503
|
<!-- SOURCE: ... -->
|
8504
|
+
<!-- figure/source -->
|
8448
8505
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
8449
8506
|
|
8450
8507
|
<xsl:call-template name="termsource"/>
|
@@ -9677,6 +9734,7 @@
|
|
9677
9734
|
<xsl:template match="title" mode="bookmark"/>
|
9678
9735
|
<xsl:template match="text()" mode="bookmark"/>
|
9679
9736
|
|
9737
|
+
<!-- figure/name -->
|
9680
9738
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
|
9681
9739
|
<xsl:if test="normalize-space() != ''">
|
9682
9740
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
@@ -10396,6 +10454,7 @@
|
|
10396
10454
|
<!-- permission -->
|
10397
10455
|
<!-- ========== -->
|
10398
10456
|
<xsl:template match="*[local-name() = 'permission']">
|
10457
|
+
<xsl:call-template name="setNamedDestination"/>
|
10399
10458
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
10400
10459
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
10401
10460
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -10404,10 +10463,12 @@
|
|
10404
10463
|
|
10405
10464
|
<xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
|
10406
10465
|
<xsl:if test="normalize-space() != ''">
|
10407
|
-
<fo:block xsl:use-attribute-sets="permission-name-style">
|
10408
|
-
<xsl:apply-templates/>
|
10409
10466
|
|
10410
|
-
|
10467
|
+
<fo:block xsl:use-attribute-sets="permission-name-style">
|
10468
|
+
<xsl:apply-templates/>
|
10469
|
+
|
10470
|
+
</fo:block>
|
10471
|
+
|
10411
10472
|
</xsl:if>
|
10412
10473
|
</xsl:template>
|
10413
10474
|
|
@@ -10423,6 +10484,7 @@
|
|
10423
10484
|
<!-- requirement -->
|
10424
10485
|
<!-- ========== -->
|
10425
10486
|
<xsl:template match="*[local-name() = 'requirement']">
|
10487
|
+
<xsl:call-template name="setNamedDestination"/>
|
10426
10488
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
10427
10489
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
10428
10490
|
<xsl:apply-templates select="*[local-name()='label']"/>
|
@@ -10434,11 +10496,13 @@
|
|
10434
10496
|
|
10435
10497
|
<xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
|
10436
10498
|
<xsl:if test="normalize-space() != ''">
|
10437
|
-
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
10438
10499
|
|
10439
|
-
|
10500
|
+
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
10501
|
+
|
10502
|
+
<xsl:apply-templates/>
|
10503
|
+
|
10504
|
+
</fo:block>
|
10440
10505
|
|
10441
|
-
</fo:block>
|
10442
10506
|
</xsl:if>
|
10443
10507
|
</xsl:template>
|
10444
10508
|
|
@@ -10467,6 +10531,7 @@
|
|
10467
10531
|
<!-- recommendation -->
|
10468
10532
|
<!-- ========== -->
|
10469
10533
|
<xsl:template match="*[local-name() = 'recommendation']">
|
10534
|
+
<xsl:call-template name="setNamedDestination"/>
|
10470
10535
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
10471
10536
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
10472
10537
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
@@ -10475,10 +10540,12 @@
|
|
10475
10540
|
|
10476
10541
|
<xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
|
10477
10542
|
<xsl:if test="normalize-space() != ''">
|
10478
|
-
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
10479
|
-
<xsl:apply-templates/>
|
10480
10543
|
|
10481
|
-
|
10544
|
+
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
10545
|
+
<xsl:apply-templates/>
|
10546
|
+
|
10547
|
+
</fo:block>
|
10548
|
+
|
10482
10549
|
</xsl:if>
|
10483
10550
|
</xsl:template>
|
10484
10551
|
|
@@ -10557,6 +10624,7 @@
|
|
10557
10624
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
10558
10625
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
10559
10626
|
</xsl:if>
|
10627
|
+
<xsl:call-template name="setNamedDestination"/>
|
10560
10628
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
10561
10629
|
<fo:table id="{@id}" table-layout="fixed" width="100%"> <!-- border="1pt solid black" -->
|
10562
10630
|
<xsl:if test="ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']">
|
@@ -10666,6 +10734,7 @@
|
|
10666
10734
|
<!-- termexample -->
|
10667
10735
|
<!-- ====== -->
|
10668
10736
|
<xsl:template match="*[local-name() = 'termexample']">
|
10737
|
+
<xsl:call-template name="setNamedDestination"/>
|
10669
10738
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
10670
10739
|
<xsl:call-template name="refine_termexample-style"/>
|
10671
10740
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -10720,6 +10789,7 @@
|
|
10720
10789
|
-->
|
10721
10790
|
<xsl:template match="*[local-name() = 'example']" name="example">
|
10722
10791
|
|
10792
|
+
<xsl:call-template name="setNamedDestination"/>
|
10723
10793
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
|
10724
10794
|
|
10725
10795
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11239,8 +11309,13 @@
|
|
11239
11309
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
11240
11310
|
|
11241
11311
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
11312
|
+
|
11242
11313
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
11243
11314
|
|
11315
|
+
<xsl:for-each select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"><!-- change context -->
|
11316
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
11317
|
+
</xsl:for-each>
|
11318
|
+
|
11244
11319
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
11245
11320
|
</fo:block>
|
11246
11321
|
</xsl:if>
|
@@ -11359,6 +11434,7 @@
|
|
11359
11434
|
<!-- main sections -->
|
11360
11435
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
11361
11436
|
|
11437
|
+
<xsl:call-template name="setNamedDestination"/>
|
11362
11438
|
<fo:block>
|
11363
11439
|
<xsl:call-template name="setId"/>
|
11364
11440
|
|
@@ -11404,6 +11480,7 @@
|
|
11404
11480
|
|
11405
11481
|
<fo:block break-after="page"/>
|
11406
11482
|
|
11483
|
+
<xsl:call-template name="setNamedDestination"/>
|
11407
11484
|
<fo:block>
|
11408
11485
|
<xsl:call-template name="setId"/>
|
11409
11486
|
<xsl:call-template name="addReviewHelper"/>
|
@@ -11432,6 +11509,7 @@
|
|
11432
11509
|
</xsl:template>
|
11433
11510
|
|
11434
11511
|
<xsl:template match="*[local-name() = 'clause'][normalize-space() != '' or *[local-name() = 'figure'] or @id]" name="template_clause"> <!-- if clause isn't empty -->
|
11512
|
+
<xsl:call-template name="setNamedDestination"/>
|
11435
11513
|
<fo:block>
|
11436
11514
|
<xsl:if test="parent::*[local-name() = 'copyright-statement']">
|
11437
11515
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
@@ -11454,6 +11532,7 @@
|
|
11454
11532
|
</xsl:template> <!-- refine_clause_style -->
|
11455
11533
|
|
11456
11534
|
<xsl:template match="*[local-name() = 'definitions']">
|
11535
|
+
<xsl:call-template name="setNamedDestination"/>
|
11457
11536
|
<fo:block id="{@id}">
|
11458
11537
|
<xsl:apply-templates/>
|
11459
11538
|
</fo:block>
|
@@ -11469,6 +11548,8 @@
|
|
11469
11548
|
<xsl:otherwise>
|
11470
11549
|
|
11471
11550
|
<fo:block break-after="page"/>
|
11551
|
+
<xsl:call-template name="setNamedDestination"/>
|
11552
|
+
|
11472
11553
|
<fo:block id="{@id}">
|
11473
11554
|
|
11474
11555
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -11540,6 +11621,7 @@
|
|
11540
11621
|
<!-- following-sibling::node()[1][local-name() = 'bookmark'][@id = $source] and
|
11541
11622
|
following-sibling::node()[2][local-name() = 'fmt-review-end'][@source = $source] -->
|
11542
11623
|
<!-- <fo:block id="{$source}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$source}" fox:alt-text="Annot___{$source}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block> -->
|
11624
|
+
<xsl:call-template name="setNamedDestination"/>
|
11543
11625
|
<fo:block id="{@id}" font-size="1pt" role="SKIP" keep-with-next="always" line-height="0.1"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@id}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
11544
11626
|
<!-- </xsl:if> -->
|
11545
11627
|
</xsl:if>
|
@@ -12257,6 +12339,7 @@
|
|
12257
12339
|
<!-- Normative references -->
|
12258
12340
|
<xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
|
12259
12341
|
|
12342
|
+
<xsl:call-template name="setNamedDestination"/>
|
12260
12343
|
<fo:block id="{@id}">
|
12261
12344
|
<xsl:apply-templates/>
|
12262
12345
|
|
@@ -12277,6 +12360,7 @@
|
|
12277
12360
|
</xsl:if>
|
12278
12361
|
</xsl:if> -->
|
12279
12362
|
|
12363
|
+
<xsl:call-template name="setNamedDestination"/>
|
12280
12364
|
<fo:block id="{@id}"/>
|
12281
12365
|
|
12282
12366
|
<xsl:apply-templates select="*[local-name() = 'title'][@columns = 1]"/>
|
@@ -12296,6 +12380,7 @@
|
|
12296
12380
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
12297
12381
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12298
12382
|
|
12383
|
+
<xsl:call-template name="setNamedDestination"/>
|
12299
12384
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
12300
12385
|
|
12301
12386
|
<xsl:call-template name="processBibitem"/>
|
@@ -12307,6 +12392,7 @@
|
|
12307
12392
|
<xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
|
12308
12393
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
12309
12394
|
|
12395
|
+
<xsl:call-template name="setNamedDestination"/>
|
12310
12396
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
12311
12397
|
<fo:list-item>
|
12312
12398
|
<fo:list-item-label end-indent="label-end()">
|
@@ -12334,6 +12420,7 @@
|
|
12334
12420
|
<xsl:choose>
|
12335
12421
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
12336
12422
|
<xsl:otherwise>
|
12423
|
+
<xsl:call-template name="setNamedDestination"/>
|
12337
12424
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
12338
12425
|
|
12339
12426
|
<fo:list-item-label end-indent="label-end()">
|
@@ -12728,6 +12815,7 @@
|
|
12728
12815
|
<xsl:template match="*[local-name() = 'admonition']">
|
12729
12816
|
|
12730
12817
|
<!-- text in the box -->
|
12818
|
+
<xsl:call-template name="setNamedDestination"/>
|
12731
12819
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
|
12732
12820
|
|
12733
12821
|
<xsl:call-template name="setBlockSpanAll"/>
|
@@ -12984,7 +13072,7 @@
|
|
12984
13072
|
</xsl:template>
|
12985
13073
|
|
12986
13074
|
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
12987
|
-
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
13075
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear' or @class = 'fmt-hi' or @class = 'horizontal' or @class = 'norotate' or @class = 'halffontsize']" mode="update_xml_step1" priority="2">
|
12988
13076
|
<xsl:copy>
|
12989
13077
|
<xsl:copy-of select="@*"/>
|
12990
13078
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -13016,28 +13104,56 @@
|
|
13016
13104
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_step1"/>
|
13017
13105
|
<xsl:template match="*[local-name() = 'stem']" mode="update_xml_pres"/>
|
13018
13106
|
|
13019
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13107
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_step1">
|
13020
13108
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13021
13109
|
<xsl:copy-of select="@*"/>
|
13022
13110
|
<xsl:choose>
|
13023
13111
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13024
|
-
<xsl:
|
13112
|
+
<xsl:choose>
|
13113
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13114
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13115
|
+
</xsl:when>
|
13116
|
+
<xsl:otherwise>
|
13117
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_step1"/>
|
13118
|
+
</xsl:otherwise>
|
13119
|
+
</xsl:choose>
|
13025
13120
|
</xsl:when>
|
13026
13121
|
<xsl:otherwise>
|
13027
|
-
<xsl:
|
13122
|
+
<xsl:choose>
|
13123
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13124
|
+
<xsl:copy-of select="node()"/>
|
13125
|
+
</xsl:when>
|
13126
|
+
<xsl:otherwise>
|
13127
|
+
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
13128
|
+
</xsl:otherwise>
|
13129
|
+
</xsl:choose>
|
13028
13130
|
</xsl:otherwise>
|
13029
13131
|
</xsl:choose>
|
13030
13132
|
</xsl:element>
|
13031
13133
|
</xsl:template>
|
13032
|
-
<xsl:template match="*[local-name() = 'fmt-stem']
|
13134
|
+
<xsl:template match="*[local-name() = 'fmt-stem']" mode="update_xml_pres">
|
13033
13135
|
<xsl:element name="stem" namespace="{$namespace_full}">
|
13034
13136
|
<xsl:copy-of select="@*"/>
|
13035
13137
|
<xsl:choose>
|
13036
13138
|
<xsl:when test="*[local-name() = 'semx'] and count(node()) = 1">
|
13037
|
-
<xsl:
|
13139
|
+
<xsl:choose>
|
13140
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13141
|
+
<xsl:copy-of select="*[local-name() = 'semx']/node()"/>
|
13142
|
+
</xsl:when>
|
13143
|
+
<xsl:otherwise>
|
13144
|
+
<xsl:apply-templates select="*[local-name() = 'semx']/node()" mode="update_xml_pres"/>
|
13145
|
+
</xsl:otherwise>
|
13146
|
+
</xsl:choose>
|
13038
13147
|
</xsl:when>
|
13039
13148
|
<xsl:otherwise>
|
13040
|
-
<xsl:
|
13149
|
+
<xsl:choose>
|
13150
|
+
<xsl:when test="not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])">
|
13151
|
+
<xsl:copy-of select="node()"/>
|
13152
|
+
</xsl:when>
|
13153
|
+
<xsl:otherwise>
|
13154
|
+
<xsl:apply-templates select="node()" mode="update_xml_pres"/>
|
13155
|
+
</xsl:otherwise>
|
13156
|
+
</xsl:choose>
|
13041
13157
|
</xsl:otherwise>
|
13042
13158
|
</xsl:choose>
|
13043
13159
|
</xsl:element>
|
@@ -13266,16 +13382,24 @@
|
|
13266
13382
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
13267
13383
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13268
13384
|
<xsl:copy-of select="@*"/>
|
13385
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13386
|
+
|
13269
13387
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13270
13388
|
</xsl:element>
|
13271
13389
|
</xsl:template>
|
13272
13390
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
13273
13391
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13274
13392
|
<xsl:copy-of select="@*"/>
|
13393
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13394
|
+
|
13275
13395
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13276
13396
|
</xsl:element>
|
13277
13397
|
</xsl:template>
|
13278
13398
|
|
13399
|
+
<xsl:template name="addNamedDestinationAttribute">
|
13400
|
+
|
13401
|
+
</xsl:template>
|
13402
|
+
|
13279
13403
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13280
13404
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13281
13405
|
<xsl:choose>
|
@@ -13285,6 +13409,8 @@
|
|
13285
13409
|
<xsl:otherwise>
|
13286
13410
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13287
13411
|
<xsl:copy-of select="@*"/>
|
13412
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13413
|
+
|
13288
13414
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13289
13415
|
</xsl:element>
|
13290
13416
|
</xsl:otherwise>
|
@@ -13298,6 +13424,8 @@
|
|
13298
13424
|
<xsl:otherwise>
|
13299
13425
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13300
13426
|
<xsl:copy-of select="@*"/>
|
13427
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13428
|
+
|
13301
13429
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13302
13430
|
</xsl:element>
|
13303
13431
|
</xsl:otherwise>
|
@@ -14755,6 +14883,24 @@
|
|
14755
14883
|
</xsl:attribute>
|
14756
14884
|
</xsl:template>
|
14757
14885
|
|
14886
|
+
<xsl:template name="setIDforNamedDestination">
|
14887
|
+
<xsl:if test="@named_dest">
|
14888
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
14889
|
+
</xsl:if>
|
14890
|
+
</xsl:template>
|
14891
|
+
|
14892
|
+
<xsl:template name="setNamedDestination">
|
14893
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14894
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
14895
|
+
<fox:destination internal-destination="{@id}"/>
|
14896
|
+
</xsl:if>
|
14897
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
14898
|
+
<xsl:if test="@named_dest">
|
14899
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14900
|
+
</xsl:if>
|
14901
|
+
</xsl:for-each>
|
14902
|
+
</xsl:template>
|
14903
|
+
|
14758
14904
|
<xsl:template name="add-letter-spacing">
|
14759
14905
|
<xsl:param name="text"/>
|
14760
14906
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -7,9 +7,6 @@ module Metanorma
|
|
7
7
|
# schema encapsulation of the document for validation
|
8
8
|
#
|
9
9
|
class Converter < Metanorma::Generic::Converter
|
10
|
-
#XML_ROOT_TAG = "rsd-standard".freeze
|
11
|
-
#XML_NAMESPACE = "https://www.metanorma.org/ns/ribose".freeze
|
12
|
-
|
13
10
|
register_for "ribose"
|
14
11
|
|
15
12
|
def sectiontype(node, level = true)
|
@@ -37,20 +34,6 @@ module Metanorma
|
|
37
34
|
make_abstract(xml, sect)
|
38
35
|
end
|
39
36
|
|
40
|
-
def clause_parse(attrs, xml, node)
|
41
|
-
sectiontype1(node) == "executive summary" and
|
42
|
-
return executivesummary_parse(attrs, xml, node)
|
43
|
-
super
|
44
|
-
end
|
45
|
-
|
46
|
-
def executivesummary_parse(attrs, xml, node)
|
47
|
-
xml.executivesummary **attr_code(attrs) do |xml_section|
|
48
|
-
xml_section.title { |t| t << (node.title || "Executive Summary") }
|
49
|
-
content = node.content
|
50
|
-
xml_section << content
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
37
|
def configuration
|
55
38
|
Metanorma::Ribose.configuration
|
56
39
|
end
|
@@ -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.0.
|
3
|
+
<!-- VERSION v2.0.4 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -1328,6 +1328,7 @@ numbers</a:documentation>
|
|
1328
1328
|
<ref name="foreword"/>
|
1329
1329
|
<ref name="introduction"/>
|
1330
1330
|
<ref name="acknowledgements"/>
|
1331
|
+
<ref name="executivesummary"/>
|
1331
1332
|
</choice>
|
1332
1333
|
</oneOrMore>
|
1333
1334
|
</element>
|
@@ -1351,6 +1352,11 @@ numbers</a:documentation>
|
|
1351
1352
|
<ref name="Content-Section"/>
|
1352
1353
|
</element>
|
1353
1354
|
</define>
|
1355
|
+
<define name="executivesummary">
|
1356
|
+
<element name="executivesummary">
|
1357
|
+
<ref name="Content-Section"/>
|
1358
|
+
</element>
|
1359
|
+
</define>
|
1354
1360
|
<define name="indexsect">
|
1355
1361
|
<element name="indexsect">
|
1356
1362
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1582,15 @@ used in document amendments</a:documentation>
|
|
1576
1582
|
<define name="annex">
|
1577
1583
|
<element name="annex">
|
1578
1584
|
<ref name="Annex-Section"/>
|
1585
|
+
<zeroOrMore>
|
1586
|
+
<ref name="annex-appendix"/>
|
1587
|
+
</zeroOrMore>
|
1588
|
+
</element>
|
1589
|
+
</define>
|
1590
|
+
<define name="annex-appendix">
|
1591
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1592
|
+
<element name="appendix">
|
1593
|
+
<ref name="Clause-Section"/>
|
1579
1594
|
</element>
|
1580
1595
|
</define>
|
1581
1596
|
<define name="terms">
|
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.6.
|
4
|
+
version: 2.6.5
|
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-04-
|
11
|
+
date: 2025-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|