metanorma-ribose 2.6.4 → 2.6.6
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 +197 -28
- data/lib/metanorma/ribose/basicdoc.rng +9 -5
- data/lib/metanorma/ribose/converter.rb +1 -22
- data/lib/metanorma/ribose/isodoc.rng +147 -5
- 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: b678c3d155cefccab49f35c5109b569c900a37d277663a3c6191423dff1431bd
|
4
|
+
data.tar.gz: 3d01716c920a42dac6176ed3d83ea715c2cf9b3aed83217087a063aa31a18b8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d5e748a18cd25f42ee3a985d1d6c7af7f658879f352b8f2a0d6110d2cb1caf0088b3eb0229ecb9519d240cab75a109f64c3ec7f43ef705d10d8c446afc73fa7
|
7
|
+
data.tar.gz: 2c0fb3df59d0ab4420469774bcae9ff3921904b8708e1cd8e8a2b759e9e674d1246b13ad1d4e885afed02081d52d64e6d6e6a106c4d49e974ed8fd11cf17ba1f
|
@@ -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">
|
@@ -9689,11 +9747,11 @@
|
|
9689
9747
|
</xsl:template>
|
9690
9748
|
|
9691
9749
|
<!-- figure/fn -->
|
9692
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
9750
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'fn']" priority="2"/>
|
9693
9751
|
<!-- figure/note -->
|
9694
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']" priority="2"/>
|
9752
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'note']" priority="2"/>
|
9695
9753
|
<!-- figure/example -->
|
9696
|
-
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'example']" priority="2"/>
|
9754
|
+
<xsl:template match="*[local-name() = 'figure'][not(@class = 'pseudocode')]/*[local-name() = 'example']" priority="2"/>
|
9697
9755
|
|
9698
9756
|
<!-- figure/note[@type = 'units'] -->
|
9699
9757
|
<!-- image/note[@type = 'units'] -->
|
@@ -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>
|
@@ -13132,6 +13248,9 @@
|
|
13132
13248
|
<xsl:template match="*[local-name() = 'quote']/*[local-name() = 'author']" mode="update_xml_pres"/>
|
13133
13249
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_step1"/>
|
13134
13250
|
<xsl:template match="*[local-name() = 'amend']" mode="update_xml_pres"/>
|
13251
|
+
<!-- https://github.com/metanorma/isodoc/issues/687 -->
|
13252
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_step1"/>
|
13253
|
+
<xsl:template match="*[local-name() = 'source']" mode="update_xml_pres"/>
|
13135
13254
|
|
13136
13255
|
<xsl:template match="*[local-name() = 'metanorma-extension']/*[local-name() = 'attachment']" mode="update_xml_step1">
|
13137
13256
|
<xsl:copy>
|
@@ -13266,16 +13385,24 @@
|
|
13266
13385
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_step1">
|
13267
13386
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13268
13387
|
<xsl:copy-of select="@*"/>
|
13388
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13389
|
+
|
13269
13390
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13270
13391
|
</xsl:element>
|
13271
13392
|
</xsl:template>
|
13272
13393
|
<xsl:template match="*[local-name() = 'fmt-title']" mode="update_xml_pres">
|
13273
13394
|
<xsl:element name="title" namespace="{$namespace_full}">
|
13274
13395
|
<xsl:copy-of select="@*"/>
|
13396
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13397
|
+
|
13275
13398
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13276
13399
|
</xsl:element>
|
13277
13400
|
</xsl:template>
|
13278
13401
|
|
13402
|
+
<xsl:template name="addNamedDestinationAttribute">
|
13403
|
+
|
13404
|
+
</xsl:template>
|
13405
|
+
|
13279
13406
|
<xsl:template match="*[local-name() = 'fmt-name']"/>
|
13280
13407
|
<xsl:template match="*[local-name() = 'fmt-name']" mode="update_xml_step1">
|
13281
13408
|
<xsl:choose>
|
@@ -13285,6 +13412,8 @@
|
|
13285
13412
|
<xsl:otherwise>
|
13286
13413
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13287
13414
|
<xsl:copy-of select="@*"/>
|
13415
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13416
|
+
|
13288
13417
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13289
13418
|
</xsl:element>
|
13290
13419
|
</xsl:otherwise>
|
@@ -13298,6 +13427,8 @@
|
|
13298
13427
|
<xsl:otherwise>
|
13299
13428
|
<xsl:element name="name" namespace="{$namespace_full}">
|
13300
13429
|
<xsl:copy-of select="@*"/>
|
13430
|
+
<xsl:call-template name="addNamedDestinationAttribute"/>
|
13431
|
+
|
13301
13432
|
<xsl:apply-templates mode="update_xml_pres"/>
|
13302
13433
|
</xsl:element>
|
13303
13434
|
</xsl:otherwise>
|
@@ -13402,6 +13533,20 @@
|
|
13402
13533
|
</xsl:element>
|
13403
13534
|
</xsl:template>
|
13404
13535
|
|
13536
|
+
<xsl:template match="*[local-name() = 'fmt-source']"/>
|
13537
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_step1">
|
13538
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
13539
|
+
<xsl:copy-of select="@*"/>
|
13540
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
13541
|
+
</xsl:element>
|
13542
|
+
</xsl:template>
|
13543
|
+
<xsl:template match="*[local-name() = 'fmt-source']" mode="update_xml_pres">
|
13544
|
+
<xsl:element name="source" namespace="{$namespace_full}">
|
13545
|
+
<xsl:copy-of select="@*"/>
|
13546
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
13547
|
+
</xsl:element>
|
13548
|
+
</xsl:template>
|
13549
|
+
|
13405
13550
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
13406
13551
|
<xsl:apply-templates mode="update_xml_step1"/>
|
13407
13552
|
</xsl:template>
|
@@ -14755,6 +14900,30 @@
|
|
14755
14900
|
</xsl:attribute>
|
14756
14901
|
</xsl:template>
|
14757
14902
|
|
14903
|
+
<xsl:template name="setIDforNamedDestination">
|
14904
|
+
<xsl:if test="@named_dest">
|
14905
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
14906
|
+
</xsl:if>
|
14907
|
+
</xsl:template>
|
14908
|
+
|
14909
|
+
<xsl:template name="setIDforNamedDestinationInline">
|
14910
|
+
<xsl:if test="@named_dest">
|
14911
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
14912
|
+
</xsl:if>
|
14913
|
+
</xsl:template>
|
14914
|
+
|
14915
|
+
<xsl:template name="setNamedDestination">
|
14916
|
+
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
14917
|
+
<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'">
|
14918
|
+
<fox:destination internal-destination="{@id}"/>
|
14919
|
+
</xsl:if>
|
14920
|
+
<xsl:for-each select=". | *[local-name() = 'title'] | *[local-name() = 'name']">
|
14921
|
+
<xsl:if test="@named_dest">
|
14922
|
+
<fox:destination internal-destination="{@named_dest}"/>
|
14923
|
+
</xsl:if>
|
14924
|
+
</xsl:for-each>
|
14925
|
+
</xsl:template>
|
14926
|
+
|
14758
14927
|
<xsl:template name="add-letter-spacing">
|
14759
14928
|
<xsl:param name="text"/>
|
14760
14929
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
@@ -267,6 +267,10 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
267
267
|
<value>justified</value>
|
268
268
|
</choice>
|
269
269
|
</define>
|
270
|
+
<define name="IdRefType">
|
271
|
+
<a:documentation>Type of cross-references to elements. In BasicDoc, these always point to id { xsd:ID } </a:documentation>
|
272
|
+
<data type="IDREF"/>
|
273
|
+
</define>
|
270
274
|
<define name="RequiredId">
|
271
275
|
<a:documentation>Mandatory anchor of element, to be used for cross-references within the document</a:documentation>
|
272
276
|
<attribute name="id">
|
@@ -409,13 +413,13 @@ in a document (e.g. sourcecode annotations)</a:documentation>
|
|
409
413
|
<attribute name="from">
|
410
414
|
<a:documentation>Identifier for the start of the text or point in the text to which the comment applies.
|
411
415
|
If not provided, the comment applies in the vicinity of the place it has been inserted into the text</a:documentation>
|
412
|
-
<
|
416
|
+
<ref name="IdRefType"/>
|
413
417
|
</attribute>
|
414
418
|
</optional>
|
415
419
|
<optional>
|
416
420
|
<attribute name="to">
|
417
421
|
<a:documentation>Identifier for the end of the text to which the comment applies</a:documentation>
|
418
|
-
<
|
422
|
+
<ref name="IdRefType"/>
|
419
423
|
</attribute>
|
420
424
|
</optional>
|
421
425
|
</define>
|
@@ -1504,7 +1508,7 @@ Restricted recursively to contain only other such inline elements with no identi
|
|
1504
1508
|
<attribute name="to">
|
1505
1509
|
<a:documentation>A reference to an anchor element (typically a bookmark),
|
1506
1510
|
to indicate that the index range covers a range of locations between the current index element and the `to` anchor</a:documentation>
|
1507
|
-
<
|
1511
|
+
<ref name="IdRefType"/>
|
1508
1512
|
</attribute>
|
1509
1513
|
</optional>
|
1510
1514
|
<ref name="index-primary">
|
@@ -1662,7 +1666,7 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1662
1666
|
<define name="XrefAttributes">
|
1663
1667
|
<attribute name="target">
|
1664
1668
|
<a:documentation>The identifier of a section, block or inlined element being referenced</a:documentation>
|
1665
|
-
<
|
1669
|
+
<ref name="IdRefType"/>
|
1666
1670
|
</attribute>
|
1667
1671
|
<optional>
|
1668
1672
|
<attribute name="type">
|
@@ -1723,7 +1727,7 @@ The target of a footnote is the location it is embedded in within the text</a:do
|
|
1723
1727
|
<attribute name="target">
|
1724
1728
|
<a:documentation>The target of the callout is understood to be the location of the callout within the source code;
|
1725
1729
|
the extent of the target is not expressed overtly</a:documentation>
|
1726
|
-
<
|
1730
|
+
<ref name="IdRefType"/>
|
1727
1731
|
</attribute>
|
1728
1732
|
<text>
|
1729
1733
|
<a:documentation>The label of the callout, used to identify its target within the source code</a:documentation>
|
@@ -3,13 +3,7 @@ require "metanorma/generic/converter"
|
|
3
3
|
|
4
4
|
module Metanorma
|
5
5
|
module Ribose
|
6
|
-
# A {Converter} implementation that generates RSD output, and a document
|
7
|
-
# schema encapsulation of the document for validation
|
8
|
-
#
|
9
6
|
class Converter < Metanorma::Generic::Converter
|
10
|
-
#XML_ROOT_TAG = "rsd-standard".freeze
|
11
|
-
#XML_NAMESPACE = "https://www.metanorma.org/ns/ribose".freeze
|
12
|
-
|
13
7
|
register_for "ribose"
|
14
8
|
|
15
9
|
def sectiontype(node, level = true)
|
@@ -37,20 +31,6 @@ module Metanorma
|
|
37
31
|
make_abstract(xml, sect)
|
38
32
|
end
|
39
33
|
|
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
34
|
def configuration
|
55
35
|
Metanorma::Ribose.configuration
|
56
36
|
end
|
@@ -66,8 +46,7 @@ module Metanorma
|
|
66
46
|
end
|
67
47
|
|
68
48
|
def pdf_converter(node)
|
69
|
-
|
70
|
-
|
49
|
+
node.attr("no-pdf") and return nil
|
71
50
|
IsoDoc::Ribose::PdfConvert.new(pdf_extract_attributes(node))
|
72
51
|
end
|
73
52
|
|
@@ -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.5 -->
|
4
4
|
|
5
5
|
<!--
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
@@ -36,6 +36,12 @@
|
|
36
36
|
</zeroOrMore>
|
37
37
|
</element>
|
38
38
|
</define>
|
39
|
+
<define name="IdRefType">
|
40
|
+
<a:documentation>Cross-references are not normalised to xsd:IDREF in Semantic XML: that is deferred to Presentation XML.
|
41
|
+
All IdRefType instances point not to `@id` in Semantic XML, which is the Content GUID for an element,
|
42
|
+
but to `@anchor`, the user-supplied cross-reference</a:documentation>
|
43
|
+
<text/>
|
44
|
+
</define>
|
39
45
|
<define name="index-primary">
|
40
46
|
<element name="primary">
|
41
47
|
<oneOrMore>
|
@@ -238,7 +244,7 @@
|
|
238
244
|
<a:documentation>Notes specific to this block</a:documentation>
|
239
245
|
</ref>
|
240
246
|
</zeroOrMore>
|
241
|
-
<ref name="
|
247
|
+
<ref name="BlockSource">
|
242
248
|
<a:documentation>A source for the table</a:documentation>
|
243
249
|
</ref>
|
244
250
|
</define>
|
@@ -262,10 +268,112 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
262
268
|
<a:documentation>Notes whose scope is the current block</a:documentation>
|
263
269
|
</ref>
|
264
270
|
</zeroOrMore>
|
265
|
-
<ref name="
|
271
|
+
<ref name="BlockSource">
|
272
|
+
<a:documentation>A source for the block</a:documentation>
|
273
|
+
</ref>
|
274
|
+
</define>
|
275
|
+
<define name="FigureBody">
|
276
|
+
<optional>
|
277
|
+
<ref name="tname">
|
278
|
+
<a:documentation>The caption of the block</a:documentation>
|
279
|
+
</ref>
|
280
|
+
</optional>
|
281
|
+
<choice>
|
282
|
+
<a:documentation>Content of the figure</a:documentation>
|
283
|
+
<ref name="image"/>
|
284
|
+
<ref name="video"/>
|
285
|
+
<ref name="audio"/>
|
286
|
+
<ref name="pre"/>
|
287
|
+
<oneOrMore>
|
288
|
+
<ref name="paragraph-with-footnote"/>
|
289
|
+
</oneOrMore>
|
290
|
+
<zeroOrMore>
|
291
|
+
<ref name="figure"/>
|
292
|
+
</zeroOrMore>
|
293
|
+
</choice>
|
294
|
+
<zeroOrMore>
|
295
|
+
<ref name="fn">
|
296
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
297
|
+
</ref>
|
298
|
+
</zeroOrMore>
|
299
|
+
<optional>
|
300
|
+
<ref name="dl">
|
301
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
302
|
+
</ref>
|
303
|
+
</optional>
|
304
|
+
<zeroOrMore>
|
305
|
+
<ref name="note">
|
306
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
307
|
+
</ref>
|
308
|
+
</zeroOrMore>
|
309
|
+
<ref name="BlockSource">
|
266
310
|
<a:documentation>A source for the block</a:documentation>
|
267
311
|
</ref>
|
268
312
|
</define>
|
313
|
+
<define name="FigureNoIdBody">
|
314
|
+
<optional>
|
315
|
+
<ref name="source">
|
316
|
+
<a:documentation>A URI or other reference intended to link to an externally hosted image (or equivalent)</a:documentation>
|
317
|
+
</ref>
|
318
|
+
</optional>
|
319
|
+
<optional>
|
320
|
+
<ref name="tname">
|
321
|
+
<a:documentation>The caption of the block</a:documentation>
|
322
|
+
</ref>
|
323
|
+
</optional>
|
324
|
+
<choice>
|
325
|
+
<a:documentation>Content of the figure</a:documentation>
|
326
|
+
<ref name="image-no-id"/>
|
327
|
+
<ref name="video-no-id"/>
|
328
|
+
<ref name="audio-no-id"/>
|
329
|
+
<ref name="pre-no-id"/>
|
330
|
+
<oneOrMore>
|
331
|
+
<ref name="paragraph-with-footnote-no-id"/>
|
332
|
+
</oneOrMore>
|
333
|
+
<zeroOrMore>
|
334
|
+
<ref name="figure-no-id"/>
|
335
|
+
</zeroOrMore>
|
336
|
+
</choice>
|
337
|
+
<zeroOrMore>
|
338
|
+
<ref name="fn">
|
339
|
+
<a:documentation>Footnotes specific to the figure</a:documentation>
|
340
|
+
</ref>
|
341
|
+
</zeroOrMore>
|
342
|
+
<optional>
|
343
|
+
<ref name="dl-no-id">
|
344
|
+
<a:documentation>An optional definitions list defining any symbols used in the figure</a:documentation>
|
345
|
+
</ref>
|
346
|
+
</optional>
|
347
|
+
<zeroOrMore>
|
348
|
+
<ref name="note-no-id">
|
349
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
350
|
+
</ref>
|
351
|
+
</zeroOrMore>
|
352
|
+
<ref name="BlockSource">
|
353
|
+
<a:documentation>A source for the block</a:documentation>
|
354
|
+
</ref>
|
355
|
+
</define>
|
356
|
+
<define name="source">
|
357
|
+
<element name="source">
|
358
|
+
<attribute name="status">
|
359
|
+
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
360
|
+
<ref name="SourceStatusType"/>
|
361
|
+
</attribute>
|
362
|
+
<attribute name="type">
|
363
|
+
<a:documentation>The type of the managed term in the present context</a:documentation>
|
364
|
+
<ref name="SourceTypeType"/>
|
365
|
+
</attribute>
|
366
|
+
<ref name="origin">
|
367
|
+
<a:documentation>The original document and location where the term definition has been obtained from</a:documentation>
|
368
|
+
</ref>
|
369
|
+
<optional>
|
370
|
+
<ref name="modification">
|
371
|
+
<a:documentation>Any changes that the definition of the term has undergone relative to the original document,
|
372
|
+
in order to be applicable in this standardisation document</a:documentation>
|
373
|
+
</ref>
|
374
|
+
</optional>
|
375
|
+
</element>
|
376
|
+
</define>
|
269
377
|
<define name="sourcecodebody">
|
270
378
|
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
271
379
|
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
@@ -687,6 +795,20 @@ titlecase, or lowercase</a:documentation>
|
|
687
795
|
</attribute>
|
688
796
|
</optional>
|
689
797
|
</define>
|
798
|
+
<define name="RequiredId" combine="interleave">
|
799
|
+
<optional>
|
800
|
+
<attribute name="anchor">
|
801
|
+
<a:documentation>User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
802
|
+
</attribute>
|
803
|
+
</optional>
|
804
|
+
</define>
|
805
|
+
<define name="OptionalId" combine="interleave">
|
806
|
+
<optional>
|
807
|
+
<attribute name="anchor">
|
808
|
+
<a:documentation> User-supplied anchor of element; replaced by content-based id, with all references to the anchor updated accordingly</a:documentation>
|
809
|
+
</attribute>
|
810
|
+
</optional>
|
811
|
+
</define>
|
690
812
|
<define name="ObligationType">
|
691
813
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
692
814
|
<choice>
|
@@ -1081,7 +1203,7 @@ That concept may be defined as a term within the current document, or it may be
|
|
1081
1203
|
<element name="label">
|
1082
1204
|
<!-- Identifier of form input element that this element is a label of -->
|
1083
1205
|
<attribute name="for">
|
1084
|
-
<
|
1206
|
+
<ref name="IdRefType"/>
|
1085
1207
|
</attribute>
|
1086
1208
|
<zeroOrMore>
|
1087
1209
|
<ref name="PureTextElement"/>
|
@@ -1328,6 +1450,7 @@ numbers</a:documentation>
|
|
1328
1450
|
<ref name="foreword"/>
|
1329
1451
|
<ref name="introduction"/>
|
1330
1452
|
<ref name="acknowledgements"/>
|
1453
|
+
<ref name="executivesummary"/>
|
1331
1454
|
</choice>
|
1332
1455
|
</oneOrMore>
|
1333
1456
|
</element>
|
@@ -1351,6 +1474,11 @@ numbers</a:documentation>
|
|
1351
1474
|
<ref name="Content-Section"/>
|
1352
1475
|
</element>
|
1353
1476
|
</define>
|
1477
|
+
<define name="executivesummary">
|
1478
|
+
<element name="executivesummary">
|
1479
|
+
<ref name="Content-Section"/>
|
1480
|
+
</element>
|
1481
|
+
</define>
|
1354
1482
|
<define name="indexsect">
|
1355
1483
|
<element name="indexsect">
|
1356
1484
|
<ref name="Content-Section"/>
|
@@ -1576,6 +1704,15 @@ used in document amendments</a:documentation>
|
|
1576
1704
|
<define name="annex">
|
1577
1705
|
<element name="annex">
|
1578
1706
|
<ref name="Annex-Section"/>
|
1707
|
+
<zeroOrMore>
|
1708
|
+
<ref name="annex-appendix"/>
|
1709
|
+
</zeroOrMore>
|
1710
|
+
</element>
|
1711
|
+
</define>
|
1712
|
+
<define name="annex-appendix">
|
1713
|
+
<a:documentation>Appendix, distinct subclause type for annexes (annex to annex, rather than subclause to annex)</a:documentation>
|
1714
|
+
<element name="appendix">
|
1715
|
+
<ref name="Clause-Section"/>
|
1579
1716
|
</element>
|
1580
1717
|
</define>
|
1581
1718
|
<define name="terms">
|
@@ -2106,7 +2243,7 @@ used in document amendments</a:documentation>
|
|
2106
2243
|
</define>
|
2107
2244
|
<define name="termsource">
|
2108
2245
|
<a:documentation>The bibliographic source where a term is defined in the sense applicable in this standardisation document</a:documentation>
|
2109
|
-
<element name="
|
2246
|
+
<element name="source">
|
2110
2247
|
<attribute name="status">
|
2111
2248
|
<a:documentation>The status of the term as it is used in this document, relative to its definition in the original document</a:documentation>
|
2112
2249
|
<ref name="SourceStatusType"/>
|
@@ -2488,6 +2625,11 @@ Normative References contents contain normative references, but as a clause in t
|
|
2488
2625
|
<ref name="termsource"/>
|
2489
2626
|
</zeroOrMore>
|
2490
2627
|
</define>
|
2628
|
+
<define name="BlockSource">
|
2629
|
+
<zeroOrMore>
|
2630
|
+
<ref name="source"/>
|
2631
|
+
</zeroOrMore>
|
2632
|
+
</define>
|
2491
2633
|
<start>
|
2492
2634
|
<ref name="standard-document"/>
|
2493
2635
|
</start>
|
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.6
|
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-
|
11
|
+
date: 2025-05-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|