metanorma-csa 2.5.5 → 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/csa/csa.standard.xsl +196 -22
- data/lib/metanorma/csa/biblio.rng +13 -1
- data/lib/metanorma/csa/csa.rng +2 -2
- data/lib/metanorma/csa/isodoc.rng +6 -6
- data/lib/metanorma/csa/version.rb +1 -1
- data/metanorma-csa.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: 36b52f4b3444d0cbcd89254b5a8610a9af1f8fb63cc9ba20b07a211a93eec13c
|
4
|
+
data.tar.gz: 21a1c124c59be971f99aba0872b3297b41d21cb5bae424be07670eac8863ee11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1767135930059c7ad65765dc32a45916e70d7114febee345cc48a3915c3878af842f15cceb308f8abfe0a48a7295f440457693dd99d7417592f4b5edf74bebb
|
7
|
+
data.tar.gz: 7d037aa690673ddec0eb1ded7b0c831e2c643f6892c953f4569eda91acb46640a4cb14accb6bcbd3eb4a7a05eb584b4c594291aef75d1799ae8c28663a0f8a1f
|
@@ -4139,6 +4139,11 @@
|
|
4139
4139
|
|
4140
4140
|
<xsl:value-of select="@reference"/>
|
4141
4141
|
|
4142
|
+
<!-- commented https://github.com/metanorma/isodoc/issues/614 -->
|
4143
|
+
<!-- <xsl:if test="$namespace = 'itu'">
|
4144
|
+
<xsl:text>)</xsl:text>
|
4145
|
+
</xsl:if> -->
|
4146
|
+
|
4142
4147
|
</fo:inline>
|
4143
4148
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4144
4149
|
<xsl:copy-of select="./node()"/>
|
@@ -4148,7 +4153,7 @@
|
|
4148
4153
|
|
4149
4154
|
</xsl:if>
|
4150
4155
|
</xsl:for-each>
|
4151
|
-
</xsl:template>
|
4156
|
+
</xsl:template> <!-- table_fn_display -->
|
4152
4157
|
|
4153
4158
|
<xsl:template name="create_fn">
|
4154
4159
|
<fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
|
@@ -4176,8 +4181,10 @@
|
|
4176
4181
|
<!-- EMD table's footnotes rendering -->
|
4177
4182
|
<!-- ============================ -->
|
4178
4183
|
|
4184
|
+
<!-- ============================ -->
|
4179
4185
|
<!-- figure's footnotes rendering -->
|
4180
|
-
|
4186
|
+
<!-- ============================ -->
|
4187
|
+
<xsl:template name="fn_display_figure"> <!-- figure_fn_display -->
|
4181
4188
|
|
4182
4189
|
<!-- current figure id -->
|
4183
4190
|
<xsl:variable name="figure_id_">
|
@@ -4290,9 +4297,28 @@
|
|
4290
4297
|
|
4291
4298
|
</fo:block>
|
4292
4299
|
</xsl:if>
|
4293
|
-
|
4294
4300
|
</xsl:template> <!-- fn_display_figure -->
|
4295
4301
|
|
4302
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
4303
|
+
<!-- figure's footnote label -->
|
4304
|
+
<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">
|
4305
|
+
<xsl:variable name="key_iso">
|
4306
|
+
|
4307
|
+
</xsl:variable>
|
4308
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
4309
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
4310
|
+
|
4311
|
+
</xsl:if>
|
4312
|
+
<fo:inline xsl:use-attribute-sets="figure-fn-number-style"> <!-- id="{@id}" -->
|
4313
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
4314
|
+
<xsl:apply-templates/>
|
4315
|
+
</fo:inline>
|
4316
|
+
</xsl:template>
|
4317
|
+
|
4318
|
+
<!-- ============================ -->
|
4319
|
+
<!-- END: figure's footnotes rendering -->
|
4320
|
+
<!-- ============================ -->
|
4321
|
+
|
4296
4322
|
<!-- fn reference in the text rendering (for instance, 'some text 1) some text' ) -->
|
4297
4323
|
<xsl:template match="*[local-name()='fn']">
|
4298
4324
|
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
@@ -4308,6 +4334,10 @@
|
|
4308
4334
|
|
4309
4335
|
<xsl:value-of select="@reference"/>
|
4310
4336
|
|
4337
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
4338
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
4339
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
4340
|
+
</xsl:if> -->
|
4311
4341
|
</fo:basic-link>
|
4312
4342
|
</fo:inline>
|
4313
4343
|
</xsl:template>
|
@@ -4434,17 +4464,22 @@
|
|
4434
4464
|
</fo:block>
|
4435
4465
|
</xsl:when> <!-- END: a few components -->
|
4436
4466
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
4437
|
-
|
4467
|
+
<!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4468
|
+
<xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
|
4438
4469
|
|
4439
|
-
|
4470
|
+
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4440
4471
|
|
4441
|
-
|
4442
|
-
|
4443
|
-
|
4444
|
-
|
4445
|
-
|
4446
|
-
|
4447
|
-
|
4472
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4473
|
+
|
4474
|
+
<xsl:variable name="title-key">
|
4475
|
+
<xsl:call-template name="getLocalizedString">
|
4476
|
+
<xsl:with-param name="key">key</xsl:with-param>
|
4477
|
+
</xsl:call-template>
|
4478
|
+
</xsl:variable>
|
4479
|
+
<xsl:value-of select="$title-key"/>
|
4480
|
+
</fo:block>
|
4481
|
+
|
4482
|
+
</xsl:if>
|
4448
4483
|
</xsl:when> <!-- END: definition list in a figure -->
|
4449
4484
|
</xsl:choose>
|
4450
4485
|
|
@@ -4630,6 +4665,14 @@
|
|
4630
4665
|
|
4631
4666
|
</xsl:template> <!-- END: dl -->
|
4632
4667
|
|
4668
|
+
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
4669
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'p'][@keep-with-next = 'true' and *[local-name() = 'strong']]" priority="3">
|
4670
|
+
<fo:block text-align="left" margin-bottom="12pt" keep-with-next="always">
|
4671
|
+
<xsl:call-template name="refine_figure_key_style"/>
|
4672
|
+
<xsl:apply-templates/>
|
4673
|
+
</fo:block>
|
4674
|
+
</xsl:template>
|
4675
|
+
|
4633
4676
|
<xsl:template name="refine_dl_formula_where_style">
|
4634
4677
|
|
4635
4678
|
</xsl:template> <!-- refine_dl_formula_where_style -->
|
@@ -6662,6 +6705,39 @@
|
|
6662
6705
|
</xsl:copy>
|
6663
6706
|
</xsl:template>
|
6664
6707
|
|
6708
|
+
<xsl:template match="@*|node()" mode="mathml_linebreak">
|
6709
|
+
<xsl:copy>
|
6710
|
+
<xsl:apply-templates select="@*|node()" mode="mathml_linebreak"/>
|
6711
|
+
</xsl:copy>
|
6712
|
+
</xsl:template>
|
6713
|
+
|
6714
|
+
<!-- split math into two math -->
|
6715
|
+
<xsl:template match="mathml:mo[@linebreak] | mathml:mspace[@linebreak]" mode="mathml_linebreak">
|
6716
|
+
<xsl:variable name="math_elements_tree_">
|
6717
|
+
<xsl:for-each select="ancestor::*[ancestor-or-self::mathml:math]">
|
6718
|
+
<element pos="{position()}">
|
6719
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/>
|
6720
|
+
<xsl:value-of select="name()"/>
|
6721
|
+
</element>
|
6722
|
+
</xsl:for-each>
|
6723
|
+
</xsl:variable>
|
6724
|
+
|
6725
|
+
<xsl:variable name="math_elements_tree" select="xalan:nodeset($math_elements_tree_)"/>
|
6726
|
+
|
6727
|
+
<xsl:call-template name="insertClosingElements">
|
6728
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
6729
|
+
</xsl:call-template>
|
6730
|
+
|
6731
|
+
<xsl:element name="br" namespace="{$namespace_full}"/>
|
6732
|
+
|
6733
|
+
<xsl:call-template name="insertOpeningElements">
|
6734
|
+
<xsl:with-param name="tree" select="$math_elements_tree"/>
|
6735
|
+
<xsl:with-param name="xmlns">http://www.w3.org/1998/Math/MathML</xsl:with-param>
|
6736
|
+
<xsl:with-param name="add_continue">false</xsl:with-param>
|
6737
|
+
</xsl:call-template>
|
6738
|
+
|
6739
|
+
</xsl:template>
|
6740
|
+
|
6665
6741
|
<!-- Examples:
|
6666
6742
|
<stem type="AsciiMath">x = 1</stem>
|
6667
6743
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -6913,9 +6989,11 @@
|
|
6913
6989
|
</xsl:template>
|
6914
6990
|
|
6915
6991
|
<xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"> <!-- show in 'stem' template -->
|
6992
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
6916
6993
|
<xsl:if test="normalize-space() != ''">
|
6917
|
-
<xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
|
6918
|
-
</xsl:if>
|
6994
|
+
<xsl:text>(</xsl:text><xsl:apply-templates /><xsl:text>)</xsl:text>
|
6995
|
+
</xsl:if> -->
|
6996
|
+
<xsl:apply-templates/>
|
6919
6997
|
</xsl:template>
|
6920
6998
|
|
6921
6999
|
<!-- stem inside formula with name (with formula's number) -->
|
@@ -7075,6 +7153,17 @@
|
|
7075
7153
|
</xsl:when>
|
7076
7154
|
<xsl:otherwise>
|
7077
7155
|
|
7156
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7157
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7158
|
+
<xsl:text>—</xsl:text> em dash —
|
7159
|
+
</xsl:if> -->
|
7160
|
+
<!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
|
7161
|
+
<xsl:text>:</xsl:text>
|
7162
|
+
</xsl:if> -->
|
7163
|
+
|
7164
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
|
7165
|
+
<xsl:text> – </xsl:text> en dash –
|
7166
|
+
</xsl:if> -->
|
7078
7167
|
</xsl:otherwise>
|
7079
7168
|
</xsl:choose>
|
7080
7169
|
</xsl:variable>
|
@@ -7093,6 +7182,16 @@
|
|
7093
7182
|
</xsl:when>
|
7094
7183
|
<xsl:otherwise>
|
7095
7184
|
|
7185
|
+
<!-- https://github.com/metanorma/isodoc/issues/607 -->
|
7186
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7187
|
+
<xsl:text>—</xsl:text> em dash —
|
7188
|
+
</xsl:if> -->
|
7189
|
+
<!-- <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'">
|
7190
|
+
<xsl:text>:</xsl:text>
|
7191
|
+
</xsl:if> -->
|
7192
|
+
<!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'unece-rec' or $namespace = 'unece'">
|
7193
|
+
<xsl:text> – </xsl:text> en dash –
|
7194
|
+
</xsl:if> -->
|
7096
7195
|
</xsl:otherwise>
|
7097
7196
|
</xsl:choose>
|
7098
7197
|
</xsl:variable>
|
@@ -9260,7 +9359,7 @@
|
|
9260
9359
|
<xsl:if test="normalize-space() != ''">
|
9261
9360
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
9262
9361
|
<xsl:call-template name="refine_termexample-name-style"/>
|
9263
|
-
<xsl:apply-templates/>
|
9362
|
+
<xsl:apply-templates/> <!-- commented $namespace = 'ieee', https://github.com/metanorma/isodoc/issues/614-->
|
9264
9363
|
</fo:inline>
|
9265
9364
|
</xsl:if>
|
9266
9365
|
</xsl:template>
|
@@ -9422,7 +9521,7 @@
|
|
9422
9521
|
<xsl:otherwise>
|
9423
9522
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
9424
9523
|
<xsl:call-template name="refine_example-name-style"/>
|
9425
|
-
<xsl:apply-templates/>
|
9524
|
+
<xsl:apply-templates/> <!-- $namespace = 'ieee', see https://github.com/metanorma/isodoc/issues/614 -->
|
9426
9525
|
</fo:inline>
|
9427
9526
|
</xsl:otherwise>
|
9428
9527
|
</xsl:choose>
|
@@ -9604,15 +9703,17 @@
|
|
9604
9703
|
|
9605
9704
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9606
9705
|
<fo:block role="BlockQuote">
|
9607
|
-
<xsl:apply-templates select="./node()[not(local-name() = 'author') and
|
9706
|
+
<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 -->
|
9608
9707
|
</fo:block>
|
9609
9708
|
</fo:block-container>
|
9610
9709
|
</fo:block-container>
|
9611
|
-
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source']">
|
9710
|
+
<xsl:if test="*[local-name() = 'author'] or *[local-name() = 'source'] or *[local-name() = 'attribution']">
|
9612
9711
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
9613
9712
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
9614
9713
|
<xsl:apply-templates select="*[local-name() = 'author']"/>
|
9615
9714
|
<xsl:apply-templates select="*[local-name() = 'source']"/>
|
9715
|
+
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
9716
|
+
<xsl:apply-templates select="*[local-name() = 'attribution']/*[local-name() = 'p']/node()"/>
|
9616
9717
|
</fo:block>
|
9617
9718
|
</xsl:if>
|
9618
9719
|
|
@@ -9634,9 +9735,13 @@
|
|
9634
9735
|
</xsl:template>
|
9635
9736
|
|
9636
9737
|
<xsl:template match="*[local-name() = 'author']">
|
9637
|
-
<xsl:
|
9738
|
+
<xsl:if test="local-name(..) = 'quote'"> <!-- for old Presentation XML, https://github.com/metanorma/isodoc/issues/607 -->
|
9739
|
+
<xsl:text>— </xsl:text>
|
9740
|
+
</xsl:if>
|
9638
9741
|
<xsl:apply-templates/>
|
9639
9742
|
</xsl:template>
|
9743
|
+
|
9744
|
+
<xsl:template match="*[local-name() = 'quote']//*[local-name() = 'referenceFrom']"/>
|
9640
9745
|
<!-- ====== -->
|
9641
9746
|
<!-- ====== -->
|
9642
9747
|
|
@@ -9816,8 +9921,12 @@
|
|
9816
9921
|
</xsl:template>
|
9817
9922
|
|
9818
9923
|
<xsl:template match="*[local-name() = 'domain']">
|
9924
|
+
<!-- https://github.com/metanorma/isodoc/issues/607
|
9819
9925
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
9820
|
-
<xsl:text> </xsl:text>
|
9926
|
+
<xsl:text> </xsl:text> -->
|
9927
|
+
<xsl:if test="not(@hidden = 'true')">
|
9928
|
+
<xsl:apply-templates/>
|
9929
|
+
</xsl:if>
|
9821
9930
|
</xsl:template>
|
9822
9931
|
|
9823
9932
|
<xsl:template match="*[local-name() = 'admitted']">
|
@@ -9865,6 +9974,29 @@
|
|
9865
9974
|
<!-- END definition -->
|
9866
9975
|
<!-- ========== -->
|
9867
9976
|
|
9977
|
+
<xsl:variable name="reviews_">
|
9978
|
+
<xsl:for-each select="//*[local-name() = 'review'][@from]">
|
9979
|
+
<xsl:copy>
|
9980
|
+
<xsl:copy-of select="@from"/>
|
9981
|
+
<xsl:copy-of select="@id"/>
|
9982
|
+
</xsl:copy>
|
9983
|
+
</xsl:for-each>
|
9984
|
+
</xsl:variable>
|
9985
|
+
<xsl:variable name="reviews" select="xalan:nodeset($reviews_)"/>
|
9986
|
+
|
9987
|
+
<xsl:template name="addReviewHelper">
|
9988
|
+
<!-- if there is review with from="...", then add small helper block for Annot tag adding, see 'review' template -->
|
9989
|
+
<xsl:variable name="curr_id" select="@id"/>
|
9990
|
+
<xsl:variable name="review_id" select="normalize-space($reviews//*[local-name() = 'review'][@from = $curr_id]/@id)"/>
|
9991
|
+
<xsl:if test="$review_id != ''"> <!-- i.e. if review found -->
|
9992
|
+
<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>
|
9993
|
+
</xsl:if>
|
9994
|
+
<!-- <fo:block>
|
9995
|
+
<curr_id><xsl:value-of select="$curr_id"/></curr_id>
|
9996
|
+
<xsl:copy-of select="$reviews"/>
|
9997
|
+
</fo:block> -->
|
9998
|
+
</xsl:template>
|
9999
|
+
|
9868
10000
|
<!-- main sections -->
|
9869
10001
|
<xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
|
9870
10002
|
|
@@ -9873,6 +10005,8 @@
|
|
9873
10005
|
|
9874
10006
|
<xsl:call-template name="sections_element_style"/>
|
9875
10007
|
|
10008
|
+
<xsl:call-template name="addReviewHelper"/>
|
10009
|
+
|
9876
10010
|
<xsl:apply-templates/>
|
9877
10011
|
</fo:block>
|
9878
10012
|
|
@@ -9913,6 +10047,7 @@
|
|
9913
10047
|
|
9914
10048
|
<fo:block>
|
9915
10049
|
<xsl:call-template name="setId"/>
|
10050
|
+
<xsl:call-template name="addReviewHelper"/>
|
9916
10051
|
<xsl:apply-templates/>
|
9917
10052
|
</fo:block>
|
9918
10053
|
</xsl:template>
|
@@ -9949,6 +10084,8 @@
|
|
9949
10084
|
|
9950
10085
|
<xsl:call-template name="refine_clause_style"/>
|
9951
10086
|
|
10087
|
+
<xsl:call-template name="addReviewHelper"/>
|
10088
|
+
|
9952
10089
|
<xsl:apply-templates/>
|
9953
10090
|
</fo:block>
|
9954
10091
|
</xsl:template>
|
@@ -10001,6 +10138,23 @@
|
|
10001
10138
|
|
10002
10139
|
<xsl:variable name="id_from" select="normalize-space(current()/@from)"/>
|
10003
10140
|
|
10141
|
+
<xsl:if test="1 = 1">
|
10142
|
+
<xsl:choose>
|
10143
|
+
<!-- if there isn't the attribute '@from', then -->
|
10144
|
+
<xsl:when test="$id_from = ''">
|
10145
|
+
<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>
|
10146
|
+
</xsl:when>
|
10147
|
+
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10148
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10149
|
+
<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>
|
10150
|
+
</xsl:when>
|
10151
|
+
<xsl:when test="not(/*[@id = $id_from]) and not(/*//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10152
|
+
<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>
|
10153
|
+
</xsl:when>
|
10154
|
+
</xsl:choose>
|
10155
|
+
</xsl:if>
|
10156
|
+
|
10157
|
+
<xsl:if test="1 = 2">
|
10004
10158
|
<xsl:choose>
|
10005
10159
|
<!-- if there isn't the attribute '@from', then -->
|
10006
10160
|
<xsl:when test="$id_from = ''">
|
@@ -10014,6 +10168,7 @@
|
|
10014
10168
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10015
10169
|
</xsl:when>
|
10016
10170
|
</xsl:choose>
|
10171
|
+
</xsl:if>
|
10017
10172
|
|
10018
10173
|
</xsl:template>
|
10019
10174
|
|
@@ -11353,7 +11508,7 @@
|
|
11353
11508
|
<!-- remove preprocess-xslt -->
|
11354
11509
|
<xsl:template match="*[local-name() = 'preprocess-xslt']" mode="update_xml_step1"/>
|
11355
11510
|
|
11356
|
-
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image'] | *[local-name() = 'sourcecode'] | *[local-name() = 'bibdata'] | *[local-name() = 'localized-strings']" mode="update_xml_step1">
|
11511
|
+
<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">
|
11357
11512
|
<xsl:copy-of select="."/>
|
11358
11513
|
</xsl:template>
|
11359
11514
|
|
@@ -11419,6 +11574,22 @@
|
|
11419
11574
|
</xsl:choose>
|
11420
11575
|
</xsl:template>
|
11421
11576
|
|
11577
|
+
<xsl:variable name="regex_passthrough">.*\bpdf\b.*</xsl:variable>
|
11578
|
+
<xsl:template match="*[local-name() = 'passthrough']" mode="update_xml_step1">
|
11579
|
+
<!-- <xsl:if test="contains(@formats, ' pdf ')"> -->
|
11580
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@formats), $regex_passthrough)) = 'true'">
|
11581
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
11582
|
+
</xsl:if>
|
11583
|
+
</xsl:template>
|
11584
|
+
|
11585
|
+
<!-- split math by element with @linebreak into maths -->
|
11586
|
+
<xsl:template match="mathml:math[.//mathml:mo[@linebreak] or .//mathml:mspace[@linebreak]]" mode="update_xml_step1">
|
11587
|
+
<xsl:variable name="maths">
|
11588
|
+
<xsl:apply-templates select="." mode="mathml_linebreak"/>
|
11589
|
+
</xsl:variable>
|
11590
|
+
<xsl:copy-of select="$maths"/>
|
11591
|
+
</xsl:template>
|
11592
|
+
|
11422
11593
|
<!-- =========================================================================== -->
|
11423
11594
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
11424
11595
|
<!-- =========================================================================== -->
|
@@ -11522,6 +11693,8 @@
|
|
11522
11693
|
|
11523
11694
|
<xsl:template name="insertOpeningElements">
|
11524
11695
|
<xsl:param name="tree"/>
|
11696
|
+
<xsl:param name="xmlns"/>
|
11697
|
+
<xsl:param name="add_continue">true</xsl:param>
|
11525
11698
|
<xsl:for-each select="$tree//element">
|
11526
11699
|
<xsl:text disable-output-escaping="yes"><</xsl:text>
|
11527
11700
|
<xsl:value-of select="."/>
|
@@ -11532,7 +11705,8 @@
|
|
11532
11705
|
<xsl:value-of select="."/>
|
11533
11706
|
<xsl:text>"</xsl:text>
|
11534
11707
|
</xsl:for-each>
|
11535
|
-
<xsl:if test="position() = 1"> continue="true"</xsl:if>
|
11708
|
+
<xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
|
11709
|
+
<xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
|
11536
11710
|
<xsl:text disable-output-escaping="yes">></xsl:text>
|
11537
11711
|
<xsl:if test="$debug = 'true'">
|
11538
11712
|
<xsl:message><<xsl:value-of select="."/>></xsl:message>
|
@@ -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/csa/csa.rng
CHANGED
@@ -9,7 +9,7 @@
|
|
9
9
|
<include href="relaton-csa.rng"/>
|
10
10
|
<include href="isodoc.rng">
|
11
11
|
<start>
|
12
|
-
<ref name="
|
12
|
+
<ref name="csa-standard"/>
|
13
13
|
</start>
|
14
14
|
<define name="FigureBody">
|
15
15
|
<zeroOrMore>
|
@@ -39,7 +39,7 @@
|
|
39
39
|
</choice>
|
40
40
|
</define>
|
41
41
|
</include>
|
42
|
-
<define name="
|
42
|
+
<define name="csa-standard">
|
43
43
|
<element name="csa-standard">
|
44
44
|
<ref name="Root-Attributes"/>
|
45
45
|
<ref name="bibdata"/>
|
@@ -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/metanorma-csa.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-csa
|
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
|