metanorma-cc 2.5.4 → 2.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +249 -52
- data/lib/metanorma/cc/biblio.rng +13 -1
- data/lib/metanorma/cc/cc.rng +3 -3
- data/lib/metanorma/cc/isodoc.rng +6 -6
- data/lib/metanorma/cc/version.rb +1 -1
- data/metanorma-cc.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdee98655f21152c7fb1523b8ccba8af7a4b887f82439c3cb397a3726ce932ce
|
4
|
+
data.tar.gz: e3a9bddee0dc3d95c62981ea333b89533bf9bf0146637b955b4ac8c1c79fa92f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 532ed62afb3d428e10cae116d10d5f236dfa1684a929980d75bcfce9d75eda5518e10e11ffe65b228f849910289c95b910ae78c337dd48472a82dc56350cc367
|
7
|
+
data.tar.gz: '05999ea26e85ad7bdcf2b5675141a78182a4edfb7aaebfcc5c45e025aa69e1c615e892970a77499b6a948bb814254d4a952699020046c0b3cd81842d8736e93e'
|
@@ -3984,10 +3984,14 @@
|
|
3984
3984
|
<xsl:variable name="fn_styles">
|
3985
3985
|
<xsl:choose>
|
3986
3986
|
<xsl:when test="ancestor::*[local-name() = 'bibitem']">
|
3987
|
-
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style"
|
3987
|
+
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
3988
|
+
|
3989
|
+
</fn_styles>
|
3988
3990
|
</xsl:when>
|
3989
3991
|
<xsl:otherwise>
|
3990
|
-
<fn_styles xsl:use-attribute-sets="fn-num-style"
|
3992
|
+
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
3993
|
+
|
3994
|
+
</fn_styles>
|
3991
3995
|
</xsl:otherwise>
|
3992
3996
|
</xsl:choose>
|
3993
3997
|
</xsl:variable>
|
@@ -4126,6 +4130,11 @@
|
|
4126
4130
|
|
4127
4131
|
<xsl:value-of select="@reference"/>
|
4128
4132
|
|
4133
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
4134
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
4135
|
+
<xsl:text>)</xsl:text>
|
4136
|
+
</xsl:if> -->
|
4137
|
+
|
4129
4138
|
</fo:inline>
|
4130
4139
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4131
4140
|
<xsl:copy-of select="./node()"/>
|
@@ -4135,7 +4144,7 @@
|
|
4135
4144
|
|
4136
4145
|
</xsl:if>
|
4137
4146
|
</xsl:for-each>
|
4138
|
-
</xsl:template>
|
4147
|
+
</xsl:template> <!-- table_fn_display -->
|
4139
4148
|
|
4140
4149
|
<xsl:template name="create_fn">
|
4141
4150
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -4163,8 +4172,10 @@
|
|
4163
4172
|
<!-- EMD table's footnotes rendering -->
|
4164
4173
|
<!-- ============================ -->
|
4165
4174
|
|
4175
|
+
<!-- ============================ -->
|
4166
4176
|
<!-- figure's footnotes rendering -->
|
4167
|
-
|
4177
|
+
<!-- ============================ -->
|
4178
|
+
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
4168
4179
|
|
4169
4180
|
<!-- current figure id -->
|
4170
4181
|
<xsl:variable name="figure_id_">
|
@@ -4277,9 +4288,28 @@
|
|
4277
4288
|
|
4278
4289
|
</fo:block>
|
4279
4290
|
</xsl:if>
|
4280
|
-
|
4281
4291
|
</xsl:template> <!-- fn_display_figure -->
|
4282
4292
|
|
4293
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
4294
|
+
<!-- figure's footnote label -->
|
4295
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
|
4296
|
+
<xsl:variable name="key_iso">
|
4297
|
+
|
4298
|
+
</xsl:variable>
|
4299
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4300
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4301
|
+
|
4302
|
+
</xsl:if>
|
4303
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
4304
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
4305
|
+
<xsl:apply-templates/>
|
4306
|
+
</fo:inline>
|
4307
|
+
</xsl:template>
|
4308
|
+
|
4309
|
+
<!-- ============================ -->
|
4310
|
+
<!-- END: figure's footnotes rendering -->
|
4311
|
+
<!-- ============================ -->
|
4312
|
+
|
4283
4313
|
<!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
|
4284
4314
|
<xsl:template match="*[local-name()='fn']">
|
4285
4315
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
@@ -4295,6 +4325,10 @@
|
|
4295
4325
|
|
4296
4326
|
<xsl:value-of select="@reference"/>
|
4297
4327
|
|
4328
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
4329
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
4330
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
4331
|
+
</xsl:if> -->
|
4298
4332
|
</fo:basic-link>
|
4299
4333
|
</fo:inline>
|
4300
4334
|
</xsl:template>
|
@@ -4421,17 +4455,22 @@
|
|
4421
4455
|
</fo:block>
|
4422
4456
|
</xsl:when> <!-- END: a few components -->
|
4423
4457
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4424
|
-
|
4458
|
+
<!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4459
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
|
4425
4460
|
|
4426
|
-
|
4461
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4427
4462
|
|
4428
|
-
|
4429
|
-
|
4430
|
-
|
4431
|
-
|
4432
|
-
|
4433
|
-
|
4434
|
-
|
4463
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4464
|
+
|
4465
|
+
<xsl:variable name="title-key">
|
4466
|
+
<xsl:call-template name="getLocalizedString">
|
4467
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
4468
|
+
</xsl:call-template>
|
4469
|
+
</xsl:variable>
|
4470
|
+
<xsl:value-of select="$title-key"/>
|
4471
|
+
</fo:block>
|
4472
|
+
|
4473
|
+
</xsl:if>
|
4435
4474
|
</xsl:when> <!-- END: definition list in a figure -->
|
4436
4475
|
</xsl:choose>
|
4437
4476
|
|
@@ -4617,6 +4656,14 @@
|
|
4617
4656
|
|
4618
4657
|
</xsl:template> <!-- END: dl -->
|
4619
4658
|
|
4659
|
+
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4660
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4661
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4662
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4663
|
+
<xsl:apply-templates/>
|
4664
|
+
</fo:block>
|
4665
|
+
</xsl:template>
|
4666
|
+
|
4620
4667
|
<xsl:template name="refine_dl_formula_where_style">
|
4621
4668
|
|
4622
4669
|
</xsl:template> <!-- refine_dl_formula_where_style -->
|
@@ -6650,6 +6697,39 @@
|
|
6650
6697
|
</xsl:copy>
|
6651
6698
|
</xsl:template>
|
6652
6699
|
|
6700
|
+
<xsl:template match="@*|node()" mode="mathml_linebreak">
|
6701
|
+
<xsl:copy>
|
6702
|
+
<xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
|
6703
|
+
</xsl:copy>
|
6704
|
+
</xsl:template>
|
6705
|
+
|
6706
|
+
<!-- split math into two math -->
|
6707
|
+
<xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
|
6708
|
+
<xsl:variable name="math_elements_tree_">
|
6709
|
+
<xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
|
6710
|
+
<element pos="{position()}">
|
6711
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
6712
|
+
<xsl:value-of select="name()"/>
|
6713
|
+
</element>
|
6714
|
+
</xsl:for-each>
|
6715
|
+
</xsl:variable>
|
6716
|
+
|
6717
|
+
<xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
|
6718
|
+
|
6719
|
+
<xsl:call-template name="insertClosingElements">
|
6720
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
6721
|
+
</xsl:call-template>
|
6722
|
+
|
6723
|
+
<xsl:element name="br" namespace="{$namespace_full}"/>
|
6724
|
+
|
6725
|
+
<xsl:call-template name="insertOpeningElements">
|
6726
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
6727
|
+
<xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
|
6728
|
+
<xsl:with-param name="add_continue">false</xsl:with-param>
|
6729
|
+
</xsl:call-template>
|
6730
|
+
|
6731
|
+
</xsl:template>
|
6732
|
+
|
6653
6733
|
<!-- Examples:
|
6654
6734
|
<stem type="AsciiMath">x = 1</stem>
|
6655
6735
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -6851,6 +6931,7 @@
|
|
6851
6931
|
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
|
6852
6932
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
6853
6933
|
</xsl:if>
|
6934
|
+
|
6854
6935
|
<xsl:if test="parent::*[local-name() = 'add']">
|
6855
6936
|
<xsl:call-template name="append_add-style"/>
|
6856
6937
|
</xsl:if>
|
@@ -6900,9 +6981,11 @@
|
|
6900
6981
|
</xsl:template>
|
6901
6982
|
|
6902
6983
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
|
6984
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
6903
6985
|
<xsl:if test="normalize-space() != ''">
|
6904
|
-
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
6905
|
-
</xsl:if>
|
6986
|
+
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
6987
|
+
</xsl:if> -->
|
6988
|
+
<xsl:apply-templates/>
|
6906
6989
|
</xsl:template>
|
6907
6990
|
|
6908
6991
|
<!-- stem inside formula with name (with formula's number) -->
|
@@ -6959,44 +7042,44 @@
|
|
6959
7042
|
|
6960
7043
|
<xsl:template match="*[local-name() = 'note']" name="note">
|
6961
7044
|
|
6962
|
-
|
7045
|
+
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
|
6963
7046
|
|
6964
|
-
|
7047
|
+
<xsl:call-template name="setBlockSpanAll"/>
|
6965
7048
|
|
6966
|
-
|
7049
|
+
<xsl:call-template name="refine_note-style"/>
|
6967
7050
|
|
6968
|
-
|
7051
|
+
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
6969
7052
|
|
6970
|
-
|
7053
|
+
<fo:block>
|
6971
7054
|
|
6972
|
-
|
7055
|
+
<xsl:call-template name="refine_note_block_style"/>
|
6973
7056
|
|
6974
|
-
|
7057
|
+
<fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
|
6975
7058
|
|
6976
|
-
|
7059
|
+
<xsl:call-template name="refine_note-name-style"/>
|
6977
7060
|
|
6978
|
-
|
6979
|
-
|
6980
|
-
|
6981
|
-
|
6982
|
-
|
7061
|
+
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
7062
|
+
<!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
|
7063
|
+
<xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
7064
|
+
<xsl:call-template name="append_add-style"/>
|
7065
|
+
</xsl:if>
|
6983
7066
|
|
6984
|
-
|
6985
|
-
|
6986
|
-
|
6987
|
-
|
6988
|
-
|
6989
|
-
|
7067
|
+
<!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
|
7068
|
+
<xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
7069
|
+
<xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
|
7070
|
+
<xsl:with-param name="skip">false</xsl:with-param>
|
7071
|
+
</xsl:apply-templates>
|
7072
|
+
</xsl:if>
|
6990
7073
|
|
6991
|
-
|
7074
|
+
<xsl:apply-templates select="*[local-name() = 'name']"/>
|
6992
7075
|
|
6993
|
-
|
7076
|
+
</fo:inline>
|
6994
7077
|
|
6995
|
-
|
6996
|
-
|
7078
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7079
|
+
</fo:block>
|
6997
7080
|
|
6998
|
-
|
6999
|
-
|
7081
|
+
</fo:block-container>
|
7082
|
+
</fo:block-container>
|
7000
7083
|
|
7001
7084
|
</xsl:template>
|
7002
7085
|
|
@@ -7058,6 +7141,17 @@
|
|
7058
7141
|
</xsl:when>
|
7059
7142
|
<xsl:otherwise>
|
7060
7143
|
|
7144
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7145
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7146
|
+
<xsl:text>—</xsl:text> em dash —
|
7147
|
+
</xsl:if> -->
|
7148
|
+
<!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
|
7149
|
+
<xsl:text>:</xsl:text>
|
7150
|
+
</xsl:if> -->
|
7151
|
+
|
7152
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
7153
|
+
<xsl:text> – </xsl:text> en dash –
|
7154
|
+
</xsl:if> -->
|
7061
7155
|
</xsl:otherwise>
|
7062
7156
|
</xsl:choose>
|
7063
7157
|
</xsl:variable>
|
@@ -7076,6 +7170,16 @@
|
|
7076
7170
|
</xsl:when>
|
7077
7171
|
<xsl:otherwise>
|
7078
7172
|
|
7173
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7174
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7175
|
+
<xsl:text>—</xsl:text> em dash —
|
7176
|
+
</xsl:if> -->
|
7177
|
+
<!-- <xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' or $namespace = 'rsd' or $namespace = 'jcgm'">
|
7178
|
+
<xsl:text>:</xsl:text>
|
7179
|
+
</xsl:if> -->
|
7180
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
|
7181
|
+
<xsl:text> – </xsl:text> en dash –
|
7182
|
+
</xsl:if> -->
|
7079
7183
|
</xsl:otherwise>
|
7080
7184
|
</xsl:choose>
|
7081
7185
|
</xsl:variable>
|
@@ -9244,7 +9348,7 @@
|
|
9244
9348
|
<xsl:if test="normalize-space() != ''">
|
9245
9349
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9246
9350
|
<xsl:call-template name="refine_termexample-name-style"/>
|
9247
|
-
<xsl:apply-templates/>
|
9351
|
+
<xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
|
9248
9352
|
</fo:inline>
|
9249
9353
|
</xsl:if>
|
9250
9354
|
</xsl:template>
|
@@ -9399,13 +9503,14 @@
|
|
9399
9503
|
</xsl:when>
|
9400
9504
|
<xsl:when test="contains(normalize-space($fo_element), 'block')">
|
9401
9505
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
9506
|
+
|
9402
9507
|
<xsl:apply-templates/>
|
9403
9508
|
</fo:block>
|
9404
9509
|
</xsl:when>
|
9405
9510
|
<xsl:otherwise>
|
9406
9511
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9407
9512
|
<xsl:call-template name="refine_example-name-style"/>
|
9408
|
-
<xsl:apply-templates/>
|
9513
|
+
<xsl:apply-templates/> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
|
9409
9514
|
</fo:inline>
|
9410
9515
|
</xsl:otherwise>
|
9411
9516
|
</xsl:choose>
|
@@ -9414,6 +9519,7 @@
|
|
9414
9519
|
|
9415
9520
|
<xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
|
9416
9521
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9522
|
+
|
9417
9523
|
<xsl:apply-templates/>
|
9418
9524
|
</fo:inline>
|
9419
9525
|
</xsl:template>
|
@@ -9586,15 +9692,17 @@
|
|
9586
9692
|
|
9587
9693
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9588
9694
|
<fo:block role="BlockQuote">
|
9589
|
-
<xsl:apply-templates select="./node()[not(local-name() = 'author') and
|
9695
|
+
<xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source') and not(local-name() = 'attribution')]"/> <!-- process all nested nodes, except author and source -->
|
9590
9696
|
</fo:block>
|
9591
9697
|
</fo:block-container>
|
9592
9698
|
</fo:block-container>
|
9593
|
-
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
9699
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
|
9594
9700
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9595
9701
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9596
9702
|
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
9597
9703
|
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
9704
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
9705
|
+
<xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
|
9598
9706
|
</fo:block>
|
9599
9707
|
</xsl:if>
|
9600
9708
|
|
@@ -9616,9 +9724,13 @@
|
|
9616
9724
|
</xsl:template>
|
9617
9725
|
|
9618
9726
|
<xsl:template match="*[local-name() = 'author']">
|
9619
|
-
<xsl:
|
9727
|
+
<xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
|
9728
|
+
<xsl:text>— </xsl:text>
|
9729
|
+
</xsl:if>
|
9620
9730
|
<xsl:apply-templates/>
|
9621
9731
|
</xsl:template>
|
9732
|
+
|
9733
|
+
<xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
|
9622
9734
|
<!-- ====== -->
|
9623
9735
|
<!-- ====== -->
|
9624
9736
|
|
@@ -9791,20 +9903,26 @@
|
|
9791
9903
|
|
9792
9904
|
<xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'preferred'])"> <!-- if first preffered in term, then display term's name -->
|
9793
9905
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
9906
|
+
|
9794
9907
|
<xsl:apply-templates select="ancestor::*[local-name() = 'term'][1]/*[local-name() = 'name']"/>
|
9795
9908
|
</fo:block>
|
9796
9909
|
</xsl:if>
|
9797
9910
|
|
9798
9911
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
9799
9912
|
<xsl:call-template name="setStyle_preferred"/>
|
9913
|
+
|
9800
9914
|
<xsl:apply-templates/>
|
9801
9915
|
</fo:block>
|
9802
9916
|
</fo:block>
|
9803
9917
|
</xsl:template>
|
9804
9918
|
|
9805
9919
|
<xsl:template match="*[local-name() = 'domain']">
|
9920
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
9806
9921
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
9807
|
-
<xsl:text> </xsl:text>
|
9922
|
+
<xsl:text> </xsl:text> -->
|
9923
|
+
<xsl:if test="not(@hidden = 'true')">
|
9924
|
+
<xsl:apply-templates/>
|
9925
|
+
</xsl:if>
|
9808
9926
|
</xsl:template>
|
9809
9927
|
|
9810
9928
|
<xsl:template match="*[local-name() = 'admitted']">
|
@@ -9852,6 +9970,29 @@
|
|
9852
9970
|
<!-- END definition -->
|
9853
9971
|
<!-- ========== -->
|
9854
9972
|
|
9973
|
+
<xsl:variable name="reviews_">
|
9974
|
+
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
9975
|
+
<xsl:copy>
|
9976
|
+
<xsl:copy-of select="@from"/>
|
9977
|
+
<xsl:copy-of select="@id"/>
|
9978
|
+
</xsl:copy>
|
9979
|
+
</xsl:for-each>
|
9980
|
+
</xsl:variable>
|
9981
|
+
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
9982
|
+
|
9983
|
+
<xsl:template name="addReviewHelper">
|
9984
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
9985
|
+
<xsl:variable name="curr_id" select="@id"/>
|
9986
|
+
<xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
|
9987
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
9988
|
+
<fo:block keep-with-next="always" line-height="0.1" id="{$review_id}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{$review_id}" fox:alt-text="Annot___{$review_id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
9989
|
+
</xsl:if>
|
9990
|
+
<!-- <fo:block>
|
9991
|
+
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
9992
|
+
<xsl:copy-of select="$reviews"/>
|
9993
|
+
</fo:block> -->
|
9994
|
+
</xsl:template>
|
9995
|
+
|
9855
9996
|
<!-- main sections -->
|
9856
9997
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
9857
9998
|
|
@@ -9860,6 +10001,8 @@
|
|
9860
10001
|
|
9861
10002
|
<xsl:call-template name="sections_element_style"/>
|
9862
10003
|
|
10004
|
+
<xsl:call-template name="addReviewHelper"/>
|
10005
|
+
|
9863
10006
|
<xsl:apply-templates/>
|
9864
10007
|
</fo:block>
|
9865
10008
|
|
@@ -9900,6 +10043,7 @@
|
|
9900
10043
|
|
9901
10044
|
<fo:block>
|
9902
10045
|
<xsl:call-template name="setId"/>
|
10046
|
+
<xsl:call-template name="addReviewHelper"/>
|
9903
10047
|
<xsl:apply-templates/>
|
9904
10048
|
</fo:block>
|
9905
10049
|
</xsl:template>
|
@@ -9936,6 +10080,8 @@
|
|
9936
10080
|
|
9937
10081
|
<xsl:call-template name="refine_clause_style"/>
|
9938
10082
|
|
10083
|
+
<xsl:call-template name="addReviewHelper"/>
|
10084
|
+
|
9939
10085
|
<xsl:apply-templates/>
|
9940
10086
|
</fo:block>
|
9941
10087
|
</xsl:template>
|
@@ -9988,6 +10134,23 @@
|
|
9988
10134
|
|
9989
10135
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
9990
10136
|
|
10137
|
+
<xsl:if test="1 = 1">
|
10138
|
+
<xsl:choose>
|
10139
|
+
<!-- if there isn't the attribute '@from', then -->
|
10140
|
+
<xsl:when test="$id_from = ''">
|
10141
|
+
<fo:block id="{@id}" font-size="1pt" role="SKIP"><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>
|
10142
|
+
</xsl:when>
|
10143
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10144
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10145
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
10146
|
+
</xsl:when>
|
10147
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10148
|
+
<fo:block id="{@from}" font-size="1pt" role="SKIP"><xsl:value-of select="$hair_space"/><fo:basic-link internal-destination="{@from}" fox:alt-text="Annot___{@id}" role="Annot"><xsl:value-of select="$hair_space"/></fo:basic-link></fo:block>
|
10149
|
+
</xsl:when>
|
10150
|
+
</xsl:choose>
|
10151
|
+
</xsl:if>
|
10152
|
+
|
10153
|
+
<xsl:if test="1 = 2">
|
9991
10154
|
<xsl:choose>
|
9992
10155
|
<!-- if there isn't the attribute '@from', then -->
|
9993
10156
|
<xsl:when test="$id_from = ''">
|
@@ -10001,6 +10164,7 @@
|
|
10001
10164
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10002
10165
|
</xsl:when>
|
10003
10166
|
</xsl:choose>
|
10167
|
+
</xsl:if>
|
10004
10168
|
|
10005
10169
|
</xsl:template>
|
10006
10170
|
|
@@ -11364,7 +11528,7 @@
|
|
11364
11528
|
<!-- remove preprocess-xslt -->
|
11365
11529
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11366
11530
|
|
11367
|
-
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11531
|
+
<xsl:template match="*[local-name() = 'stem'][not(.//*[local-name() = 'passthrough']) and not(.//*[@linebreak])] | *[local-name() = 'image'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'sourcecode'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'bibdata'][not(.//*[local-name() = 'passthrough'])] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11368
11532
|
<xsl:copy-of select="."/>
|
11369
11533
|
</xsl:template>
|
11370
11534
|
|
@@ -11430,6 +11594,22 @@
|
|
11430
11594
|
</xsl:choose>
|
11431
11595
|
</xsl:template>
|
11432
11596
|
|
11597
|
+
<xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
|
11598
|
+
<xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
|
11599
|
+
<!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
|
11600
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
|
11601
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11602
|
+
</xsl:if>
|
11603
|
+
</xsl:template>
|
11604
|
+
|
11605
|
+
<!-- split math by element with @linebreak into maths -->
|
11606
|
+
<xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
|
11607
|
+
<xsl:variable name="maths">
|
11608
|
+
<xsl:apply-templates select="." mode="mathml_linebreak"/>
|
11609
|
+
</xsl:variable>
|
11610
|
+
<xsl:copy-of select="$maths"/>
|
11611
|
+
</xsl:template>
|
11612
|
+
|
11433
11613
|
<!-- =========================================================================== -->
|
11434
11614
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11435
11615
|
<!-- =========================================================================== -->
|
@@ -11533,6 +11713,8 @@
|
|
11533
11713
|
|
11534
11714
|
<xsl:template name="insertOpeningElements">
|
11535
11715
|
<xsl:param name="tree"/>
|
11716
|
+
<xsl:param name="xmlns"/>
|
11717
|
+
<xsl:param name="add_continue">true</xsl:param>
|
11536
11718
|
<xsl:for-each select="$tree//element">
|
11537
11719
|
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
11538
11720
|
<xsl:value-of select="."/>
|
@@ -11543,7 +11725,8 @@
|
|
11543
11725
|
<xsl:value-of select="."/>
|
11544
11726
|
<xsl:text>"</xsl:text>
|
11545
11727
|
</xsl:for-each>
|
11546
|
-
<xsl:if test="position() = 1"> continue="true"</xsl:if>
|
11728
|
+
<xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
|
11729
|
+
<xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
|
11547
11730
|
<xsl:text disable-output-escaping="yes">></xsl:text>
|
11548
11731
|
<xsl:if test="$debug = 'true'">
|
11549
11732
|
<xsl:message><<xsl:value-of select="."/>></xsl:message>
|
@@ -12753,9 +12936,10 @@
|
|
12753
12936
|
<xsl:template name="insertBackgroundPageImage">
|
12754
12937
|
<xsl:param name="number">1</xsl:param>
|
12755
12938
|
<xsl:param name="name">coverpage-image</xsl:param>
|
12939
|
+
<xsl:param name="suffix"/>
|
12756
12940
|
<xsl:variable name="num" select="number($number)"/>
|
12757
12941
|
<!-- background image -->
|
12758
|
-
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="
|
12942
|
+
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
12759
12943
|
<fo:block>
|
12760
12944
|
<xsl:for-each select="/*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = $name][1]/*[local-name() = 'value']/*[local-name() = 'image'][$num]">
|
12761
12945
|
<xsl:choose>
|
@@ -12821,16 +13005,29 @@
|
|
12821
13005
|
|
12822
13006
|
<!-- END: insert cover page image -->
|
12823
13007
|
|
13008
|
+
<xsl:variable name="regex_ja_spec">[\uFF08\uFF09]</xsl:variable>
|
12824
13009
|
<xsl:template name="insertVerticalChar">
|
12825
13010
|
<xsl:param name="str"/>
|
13011
|
+
<xsl:param name="writing-mode">lr-tb</xsl:param>
|
13012
|
+
<xsl:param name="reference-orientation">90</xsl:param>
|
12826
13013
|
<xsl:if test="string-length($str) > 0">
|
12827
|
-
<fo:inline-container
|
13014
|
+
<fo:inline-container text-align="center" alignment-baseline="central" width="1em" margin="0" padding="0" text-indent="0mm" last-line-end-indent="0mm" start-indent="0mm" end-indent="0mm">
|
13015
|
+
<xsl:if test="normalize-space($writing-mode) != ''">
|
13016
|
+
<xsl:attribute name="writing-mode"><xsl:value-of select="$writing-mode"/></xsl:attribute>
|
13017
|
+
<xsl:attribute name="reference-orientation">90</xsl:attribute>
|
13018
|
+
</xsl:if>
|
13019
|
+
<xsl:variable name="char" select="substring($str,1,1)"/>
|
13020
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new($char), concat('(', $regex_ja_spec, '{1,})'))) = 'true'">
|
13021
|
+
<xsl:attribute name="reference-orientation">0</xsl:attribute>
|
13022
|
+
</xsl:if>
|
12828
13023
|
<fo:block-container width="1em">
|
12829
|
-
<fo:block line-height="1em"><xsl:value-of select="
|
13024
|
+
<fo:block line-height="1em"><xsl:value-of select="$char"/></fo:block>
|
12830
13025
|
</fo:block-container>
|
12831
13026
|
</fo:inline-container>
|
12832
13027
|
<xsl:call-template name="insertVerticalChar">
|
12833
13028
|
<xsl:with-param name="str" select="substring($str, 2)"/>
|
13029
|
+
<xsl:with-param name="writing-mode" select="$writing-mode"/>
|
13030
|
+
<xsl:with-param name="reference-orientation" select="$reference-orientation"/>
|
12834
13031
|
</xsl:call-template>
|
12835
13032
|
</xsl:if>
|
12836
13033
|
</xsl:template>
|
data/lib/metanorma/cc/biblio.rng
CHANGED
@@ -1783,9 +1783,21 @@ that the `number` given for the series applies to the second iteration of number
|
|
1783
1783
|
May be used to differentiate rendering of notes in bibliographies</a:documentation>
|
1784
1784
|
</attribute>
|
1785
1785
|
</optional>
|
1786
|
-
<ref name="
|
1786
|
+
<ref name="LocalizedStringAttributes">
|
1787
1787
|
<a:documentation>The content of the note</a:documentation>
|
1788
1788
|
</ref>
|
1789
|
+
<choice>
|
1790
|
+
<oneOrMore>
|
1791
|
+
<ref name="BasicBlockNoId">
|
1792
|
+
<a:documentation>Multiple blocks of content</a:documentation>
|
1793
|
+
</ref>
|
1794
|
+
</oneOrMore>
|
1795
|
+
<oneOrMore>
|
1796
|
+
<ref name="TextElement">
|
1797
|
+
<a:documentation>Single block of content</a:documentation>
|
1798
|
+
</ref>
|
1799
|
+
</oneOrMore>
|
1800
|
+
</choice>
|
1789
1801
|
</element>
|
1790
1802
|
</define>
|
1791
1803
|
<define name="bibabstract">
|
data/lib/metanorma/cc/cc.rng
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
<include href="relaton-cc.rng"/>
|
11
11
|
<include href="isodoc.rng">
|
12
12
|
<start>
|
13
|
-
<ref name="
|
13
|
+
<ref name="cc-standard"/>
|
14
14
|
</start>
|
15
15
|
<define name="FigureBody">
|
16
16
|
<zeroOrMore>
|
@@ -40,8 +40,8 @@
|
|
40
40
|
</choice>
|
41
41
|
</define>
|
42
42
|
</include>
|
43
|
-
<define name="
|
44
|
-
<element name="
|
43
|
+
<define name="cc-standard">
|
44
|
+
<element name="cc-standard">
|
45
45
|
<ref name="Root-Attributes"/>
|
46
46
|
<ref name="bibdata"/>
|
47
47
|
<zeroOrMore>
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.
|
20
|
+
<!-- VERSION v1.4.0 -->
|
21
21
|
<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">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -326,7 +326,7 @@ normative or informative references, some split references into sections organiz
|
|
326
326
|
<a:documentation>Content of note</a:documentation>
|
327
327
|
<oneOrMore>
|
328
328
|
<choice>
|
329
|
-
<ref name="paragraph"/>
|
329
|
+
<ref name="paragraph-with-footnote"/>
|
330
330
|
<ref name="ul"/>
|
331
331
|
<ref name="ol"/>
|
332
332
|
<ref name="dl"/>
|
@@ -412,7 +412,7 @@ normative or informative references, some split references into sections organiz
|
|
412
412
|
<element name="note">
|
413
413
|
<ref name="OptionalId"/>
|
414
414
|
<oneOrMore>
|
415
|
-
<ref name="paragraph"/>
|
415
|
+
<ref name="paragraph-with-footnote"/>
|
416
416
|
</oneOrMore>
|
417
417
|
</element>
|
418
418
|
</define>
|
@@ -1977,7 +1977,7 @@ used in document amendments</a:documentation>
|
|
1977
1977
|
<oneOrMore>
|
1978
1978
|
<choice>
|
1979
1979
|
<a:documentation>Content of the verbal representation of the term</a:documentation>
|
1980
|
-
<ref name="paragraph"/>
|
1980
|
+
<ref name="paragraph-with-footnote"/>
|
1981
1981
|
<ref name="dl"/>
|
1982
1982
|
<ref name="ol"/>
|
1983
1983
|
<ref name="ul"/>
|
@@ -2015,7 +2015,7 @@ used in document amendments</a:documentation>
|
|
2015
2015
|
<oneOrMore>
|
2016
2016
|
<choice>
|
2017
2017
|
<a:documentation>Content of the term note</a:documentation>
|
2018
|
-
<ref name="paragraph"/>
|
2018
|
+
<ref name="paragraph-with-footnote"/>
|
2019
2019
|
<ref name="ul"/>
|
2020
2020
|
<ref name="ol"/>
|
2021
2021
|
<ref name="dl"/>
|
@@ -2037,7 +2037,7 @@ used in document amendments</a:documentation>
|
|
2037
2037
|
<ref name="dl"/>
|
2038
2038
|
<ref name="quote"/>
|
2039
2039
|
<ref name="sourcecode"/>
|
2040
|
-
<ref name="paragraph"/>
|
2040
|
+
<ref name="paragraph-with-footnote"/>
|
2041
2041
|
<ref name="figure"/>
|
2042
2042
|
</choice>
|
2043
2043
|
</oneOrMore>
|
data/lib/metanorma/cc/version.rb
CHANGED
data/metanorma-cc.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ["lib"]
|
30
30
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
31
31
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~> 2.7.
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 2.7.2"
|
33
33
|
|
34
34
|
spec.add_development_dependency "debug"
|
35
35
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-cc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.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: 2024-
|
11
|
+
date: 2024-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.7.
|
19
|
+
version: 2.7.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.7.
|
26
|
+
version: 2.7.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|