metanorma-cc 2.4.4 → 2.4.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 +140 -28
- data/lib/metanorma/cc/biblio.rng +24 -8
- data/lib/metanorma/cc/cc.rng +3 -18
- data/lib/metanorma/cc/isodoc.rng +67 -55
- data/lib/metanorma/cc/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: 8ef050243a3a0899b2e8c49e156320fa698b24accdbcb338e24f699c02315003
|
4
|
+
data.tar.gz: c534fe646b808872dd71f9bebec16aa6107c649fa5fd56e6633915c9e0183625
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 33e79e69d60d689509211a7899250bc46065677f9585377bd90ef5f0a4194badb3a1b7937b4945b2a8261a3de51d8567d61937dba806ed80e155815cbc2eeac7
|
7
|
+
data.tar.gz: 808f2f3e374606facb56c1d5cd19f0e81414a0a7fc05e1a971d396871fdbc58e65c11ef1732436e353ac1b26d23206bef0030093b2eaed8f95db762d8ed5355b
|
@@ -593,17 +593,30 @@
|
|
593
593
|
<xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
|
594
594
|
|
595
595
|
<xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
|
596
|
-
<xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
596
|
+
<xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
|
597
597
|
<!-- Example: <tables>
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
598
|
+
<table page-width="509103" id="table1" width_max="223561" width_min="223560">
|
599
|
+
<column width_max="39354" width_min="39354"/>
|
600
|
+
<column width_max="75394" width_min="75394"/>
|
601
|
+
<column width_max="108813" width_min="108813"/>
|
602
|
+
<tbody>
|
603
|
+
<tr>
|
604
|
+
<td width_max="39354" width_min="39354">
|
605
|
+
<p_len>39354</p_len>
|
606
|
+
<word_len>39354</word_len>
|
607
|
+
</td>
|
608
|
+
|
609
|
+
OLD:
|
610
|
+
<tables>
|
611
|
+
<table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
|
612
|
+
<tbody>
|
613
|
+
<tr>
|
614
|
+
<td id="tab-symdu_1_1">
|
615
|
+
<p_len>6</p_len>
|
616
|
+
<p_len>100</p_len> for 2nd paragraph
|
617
|
+
<word_len>6</word_len>
|
618
|
+
<word_len>20</word_len>
|
619
|
+
...
|
607
620
|
-->
|
608
621
|
|
609
622
|
<!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
|
@@ -822,6 +835,10 @@
|
|
822
835
|
<xsl:variable name="zero_width_space"></xsl:variable>
|
823
836
|
<xsl:variable name="hair_space"> </xsl:variable>
|
824
837
|
<xsl:variable name="en_dash">–</xsl:variable>
|
838
|
+
<xsl:variable name="em_dash">—</xsl:variable>
|
839
|
+
<xsl:variable name="cr"> </xsl:variable>
|
840
|
+
<xsl:variable name="lf">
|
841
|
+
</xsl:variable>
|
825
842
|
|
826
843
|
<xsl:template name="getTitle">
|
827
844
|
<xsl:param name="name"/>
|
@@ -1138,6 +1155,10 @@
|
|
1138
1155
|
|
1139
1156
|
</xsl:attribute-set> <!-- example-name-style -->
|
1140
1157
|
|
1158
|
+
<xsl:template name="refine_example-name-style">
|
1159
|
+
|
1160
|
+
</xsl:template>
|
1161
|
+
|
1141
1162
|
<xsl:attribute-set name="example-p-style">
|
1142
1163
|
|
1143
1164
|
<xsl:attribute name="margin-bottom">14pt</xsl:attribute>
|
@@ -1154,6 +1175,10 @@
|
|
1154
1175
|
|
1155
1176
|
</xsl:attribute-set> <!-- termexample-name-style -->
|
1156
1177
|
|
1178
|
+
<xsl:template name="refine_termexample-name-style">
|
1179
|
+
|
1180
|
+
</xsl:template>
|
1181
|
+
|
1157
1182
|
<!-- ========================== -->
|
1158
1183
|
<!-- Table styles -->
|
1159
1184
|
<!-- ========================== -->
|
@@ -1316,6 +1341,10 @@
|
|
1316
1341
|
|
1317
1342
|
</xsl:attribute-set> <!-- table-fn-style -->
|
1318
1343
|
|
1344
|
+
<xsl:template name="refine_table-fn-style">
|
1345
|
+
|
1346
|
+
</xsl:template>
|
1347
|
+
|
1319
1348
|
<xsl:attribute-set name="table-fn-number-style">
|
1320
1349
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
1321
1350
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -1324,6 +1353,10 @@
|
|
1324
1353
|
|
1325
1354
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
1326
1355
|
|
1356
|
+
<xsl:template name="refine_table-fn-number-style">
|
1357
|
+
|
1358
|
+
</xsl:template>
|
1359
|
+
|
1327
1360
|
<xsl:attribute-set name="fn-container-body-style">
|
1328
1361
|
<xsl:attribute name="text-indent">0</xsl:attribute>
|
1329
1362
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
@@ -2423,6 +2456,20 @@
|
|
2423
2456
|
</xsl:for-each>
|
2424
2457
|
</xsl:template>
|
2425
2458
|
|
2459
|
+
<xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
|
2460
|
+
|
2461
|
+
<xsl:template match="*[local-name()='table']" priority="2">
|
2462
|
+
<xsl:choose>
|
2463
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
2464
|
+
<xsl:call-template name="table"/>
|
2465
|
+
</xsl:when>
|
2466
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
2467
|
+
<xsl:otherwise>
|
2468
|
+
<xsl:call-template name="table"/>
|
2469
|
+
</xsl:otherwise>
|
2470
|
+
</xsl:choose>
|
2471
|
+
</xsl:template>
|
2472
|
+
|
2426
2473
|
<xsl:template match="*[local-name()='table']" name="table">
|
2427
2474
|
|
2428
2475
|
<xsl:variable name="table-preamble">
|
@@ -2432,9 +2479,11 @@
|
|
2432
2479
|
<xsl:variable name="table">
|
2433
2480
|
|
2434
2481
|
<xsl:variable name="simple-table">
|
2435
|
-
<xsl:
|
2436
|
-
<xsl:
|
2437
|
-
|
2482
|
+
<xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
|
2483
|
+
<xsl:call-template name="getSimpleTable">
|
2484
|
+
<xsl:with-param name="id" select="@id"/>
|
2485
|
+
</xsl:call-template>
|
2486
|
+
</xsl:if>
|
2438
2487
|
</xsl:variable>
|
2439
2488
|
<!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
|
2440
2489
|
|
@@ -2530,9 +2579,9 @@
|
|
2530
2579
|
</xsl:attribute>
|
2531
2580
|
</xsl:for-each>
|
2532
2581
|
|
2533
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2582
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2534
2583
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2535
|
-
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute
|
2584
|
+
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
|
2536
2585
|
</xsl:if>
|
2537
2586
|
|
2538
2587
|
<xsl:choose>
|
@@ -2617,6 +2666,7 @@
|
|
2617
2666
|
<!-- centered table when table name is centered (see table-name-style) -->
|
2618
2667
|
|
2619
2668
|
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
2669
|
+
|
2620
2670
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
2621
2671
|
<fo:table-column column-width="{@width}"/>
|
2622
2672
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
@@ -2684,9 +2734,28 @@
|
|
2684
2734
|
|
2685
2735
|
</fo:block>
|
2686
2736
|
|
2737
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
2738
|
+
<xsl:if test="$continued = 'true'">
|
2739
|
+
<fo:block text-align="right">
|
2740
|
+
<xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
|
2741
|
+
</fo:block>
|
2742
|
+
</xsl:if>
|
2743
|
+
<!-- </xsl:if> -->
|
2744
|
+
|
2687
2745
|
</xsl:if>
|
2688
2746
|
</xsl:template> <!-- table/name -->
|
2689
2747
|
|
2748
|
+
<!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
|
2749
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
|
2750
|
+
<xsl:choose>
|
2751
|
+
<xsl:when test="preceding-sibling::*[local-name() = 'br']">
|
2752
|
+
<!-- remove CR or LF at start -->
|
2753
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^( | | )', '')"/>
|
2754
|
+
</xsl:when>
|
2755
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
2756
|
+
</xsl:choose>
|
2757
|
+
</xsl:template>
|
2758
|
+
|
2690
2759
|
<!-- SOURCE: ... -->
|
2691
2760
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
2692
2761
|
<xsl:call-template name="termsource"/>
|
@@ -3097,7 +3166,7 @@
|
|
3097
3166
|
<xsl:param name="colwidths"/>
|
3098
3167
|
<xsl:param name="colgroup"/>
|
3099
3168
|
|
3100
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3169
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
|
3101
3170
|
|
3102
3171
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3103
3172
|
|
@@ -3169,7 +3238,7 @@
|
|
3169
3238
|
|
3170
3239
|
<xsl:apply-templates select="../*[local-name()='p']"/>
|
3171
3240
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3172
|
-
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3241
|
+
<xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
|
3173
3242
|
<xsl:apply-templates select="../*[local-name()='example']"/>
|
3174
3243
|
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3175
3244
|
|
@@ -3179,7 +3248,7 @@
|
|
3179
3248
|
|
3180
3249
|
<!-- horizontal row separator -->
|
3181
3250
|
<xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
|
3182
|
-
<xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3251
|
+
<xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
|
3183
3252
|
<fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
|
3184
3253
|
|
3185
3254
|
<xsl:call-template name="setBordersTableArray"/>
|
@@ -3658,8 +3727,9 @@
|
|
3658
3727
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
3659
3728
|
|
3660
3729
|
<fo:block xsl:use-attribute-sets="table-fn-style">
|
3661
|
-
|
3730
|
+
<xsl:call-template name="refine_table-fn-style"/>
|
3662
3731
|
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
3732
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
3663
3733
|
|
3664
3734
|
<xsl:value-of select="@reference"/>
|
3665
3735
|
|
@@ -3843,7 +3913,20 @@
|
|
3843
3913
|
<!-- Definition List -->
|
3844
3914
|
<!-- ===================== -->
|
3845
3915
|
|
3846
|
-
|
3916
|
+
<!-- for table auto-layout algorithm -->
|
3917
|
+
<xsl:template match="*[local-name()='dl']" priority="2">
|
3918
|
+
<xsl:choose>
|
3919
|
+
<xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
|
3920
|
+
<xsl:call-template name="dl"/>
|
3921
|
+
</xsl:when>
|
3922
|
+
<xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
|
3923
|
+
<xsl:otherwise>
|
3924
|
+
<xsl:call-template name="dl"/>
|
3925
|
+
</xsl:otherwise>
|
3926
|
+
</xsl:choose>
|
3927
|
+
</xsl:template>
|
3928
|
+
|
3929
|
+
<xsl:template match="*[local-name()='dl']" name="dl">
|
3847
3930
|
<xsl:variable name="isAdded" select="@added"/>
|
3848
3931
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3849
3932
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
@@ -4800,11 +4883,16 @@
|
|
4800
4883
|
<xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
|
4801
4884
|
<!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
|
4802
4885
|
<xsl:variable name="text" select="."/>
|
4803
|
-
<
|
4886
|
+
<xsl:variable name="ratio_">
|
4887
|
+
0.75
|
4888
|
+
</xsl:variable>
|
4889
|
+
<xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
|
4890
|
+
<fo:inline font-size="{$ratio * 100}%" role="SKIP">
|
4804
4891
|
<xsl:if test="string-length($text) > 0">
|
4805
4892
|
<xsl:variable name="smallCapsText">
|
4806
4893
|
<xsl:call-template name="recursiveSmallCaps">
|
4807
4894
|
<xsl:with-param name="text" select="$text"/>
|
4895
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
4808
4896
|
</xsl:call-template>
|
4809
4897
|
</xsl:variable>
|
4810
4898
|
<!-- merge neighboring fo:inline -->
|
@@ -4841,12 +4929,13 @@
|
|
4841
4929
|
|
4842
4930
|
<xsl:template name="recursiveSmallCaps">
|
4843
4931
|
<xsl:param name="text"/>
|
4932
|
+
<xsl:param name="ratio"/>
|
4844
4933
|
<xsl:variable name="char" select="substring($text,1,1)"/>
|
4845
4934
|
<!-- <xsl:variable name="upperCase" select="translate($char, $lower, $upper)"/> -->
|
4846
4935
|
<xsl:variable name="upperCase" select="java:toUpperCase(java:java.lang.String.new($char))"/>
|
4847
4936
|
<xsl:choose>
|
4848
4937
|
<xsl:when test="$char=$upperCase">
|
4849
|
-
<fo:inline font-size="{100 div
|
4938
|
+
<fo:inline font-size="{100 div $ratio}%" role="SKIP">
|
4850
4939
|
<xsl:value-of select="$upperCase"/>
|
4851
4940
|
</fo:inline>
|
4852
4941
|
</xsl:when>
|
@@ -4857,6 +4946,7 @@
|
|
4857
4946
|
<xsl:if test="string-length($text) > 1">
|
4858
4947
|
<xsl:call-template name="recursiveSmallCaps">
|
4859
4948
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
4949
|
+
<xsl:with-param name="ratio" select="$ratio"/>
|
4860
4950
|
</xsl:call-template>
|
4861
4951
|
</xsl:if>
|
4862
4952
|
</xsl:template>
|
@@ -4893,6 +4983,9 @@
|
|
4893
4983
|
<xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
|
4894
4984
|
<style name="{$key}"><xsl:value-of select="$value"/></style>
|
4895
4985
|
</xsl:if>
|
4986
|
+
<xsl:if test="$key = 'text-indent'">
|
4987
|
+
<style name="padding-left"><xsl:value-of select="$value"/></style>
|
4988
|
+
</xsl:if>
|
4896
4989
|
</xsl:for-each>
|
4897
4990
|
</xsl:variable>
|
4898
4991
|
<xsl:variable name="styles" select="xalan:nodeset($styles_)"/>
|
@@ -5765,7 +5858,13 @@
|
|
5765
5858
|
<xsl:value-of select="$language_current_2"/>
|
5766
5859
|
</xsl:when>
|
5767
5860
|
<xsl:otherwise>
|
5768
|
-
<xsl:
|
5861
|
+
<xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
|
5862
|
+
<xsl:choose>
|
5863
|
+
<xsl:when test="$language_current_3 != ''">
|
5864
|
+
<xsl:value-of select="$language_current_3"/>
|
5865
|
+
</xsl:when>
|
5866
|
+
<xsl:otherwise>en</xsl:otherwise>
|
5867
|
+
</xsl:choose>
|
5769
5868
|
</xsl:otherwise>
|
5770
5869
|
</xsl:choose>
|
5771
5870
|
</xsl:otherwise>
|
@@ -6295,6 +6394,11 @@
|
|
6295
6394
|
</xsl:call-template>
|
6296
6395
|
</xsl:template>
|
6297
6396
|
|
6397
|
+
<!-- command between two xref points to non-standard bibitem -->
|
6398
|
+
<xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
|
6399
|
+
<xsl:value-of select="."/>
|
6400
|
+
</xsl:template>
|
6401
|
+
|
6298
6402
|
<!-- ====== -->
|
6299
6403
|
<!-- formula -->
|
6300
6404
|
<!-- ====== -->
|
@@ -6661,7 +6765,7 @@
|
|
6661
6765
|
</xsl:when>
|
6662
6766
|
<xsl:otherwise>
|
6663
6767
|
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
|
6664
|
-
<xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
|
6768
|
+
<xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
|
6665
6769
|
|
6666
6770
|
<xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
|
6667
6771
|
<xsl:attribute name="width">
|
@@ -6996,6 +7100,8 @@
|
|
6996
7100
|
</xsl:attribute>
|
6997
7101
|
</xsl:template>
|
6998
7102
|
|
7103
|
+
<xsl:variable name="regex_starts_with_digit">^[0-9].*</xsl:variable>
|
7104
|
+
|
6999
7105
|
<xsl:template match="*[local-name() = 'svg'][not(@width and @height)]" mode="svg_update">
|
7000
7106
|
<xsl:copy>
|
7001
7107
|
<xsl:apply-templates select="@*" mode="svg_update"/>
|
@@ -7014,7 +7120,8 @@
|
|
7014
7120
|
|
7015
7121
|
<xsl:attribute name="width">
|
7016
7122
|
<xsl:choose>
|
7017
|
-
|
7123
|
+
<!-- width is non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
7124
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
7018
7125
|
<xsl:when test="$width != ''">
|
7019
7126
|
<xsl:value-of select="round($width)"/>
|
7020
7127
|
</xsl:when>
|
@@ -7023,7 +7130,8 @@
|
|
7023
7130
|
</xsl:attribute>
|
7024
7131
|
<xsl:attribute name="height">
|
7025
7132
|
<xsl:choose>
|
7026
|
-
|
7133
|
+
<!-- height non 'auto', 'text-width', 'full-page-width' or 'narrow' -->
|
7134
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
7027
7135
|
<xsl:when test="$height != ''">
|
7028
7136
|
<xsl:value-of select="round($height)"/>
|
7029
7137
|
</xsl:when>
|
@@ -7040,7 +7148,7 @@
|
|
7040
7148
|
<xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[2][local-name() = 'image']/@width)"/>
|
7041
7149
|
<xsl:attribute name="width">
|
7042
7150
|
<xsl:choose>
|
7043
|
-
<xsl:when test="$parent_image_width != '' and $parent_image_width
|
7151
|
+
<xsl:when test="$parent_image_width != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_width), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_width"/></xsl:when>
|
7044
7152
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
7045
7153
|
</xsl:choose>
|
7046
7154
|
</xsl:attribute>
|
@@ -7051,7 +7159,7 @@
|
|
7051
7159
|
<xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[2][local-name() = 'image']/@height)"/>
|
7052
7160
|
<xsl:attribute name="height">
|
7053
7161
|
<xsl:choose>
|
7054
|
-
<xsl:when test="$parent_image_height != '' and $parent_image_height
|
7162
|
+
<xsl:when test="$parent_image_height != '' and normalize-space(java:matches(java:java.lang.String.new($parent_image_height), $regex_starts_with_digit)) = 'true'"><xsl:value-of select="$parent_image_height"/></xsl:when>
|
7055
7163
|
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
7056
7164
|
</xsl:choose>
|
7057
7165
|
</xsl:attribute>
|
@@ -8515,6 +8623,7 @@
|
|
8515
8623
|
<xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
|
8516
8624
|
<xsl:if test="normalize-space() != ''">
|
8517
8625
|
<fo:inline xsl:use-attribute-sets="termexample-name-style">
|
8626
|
+
<xsl:call-template name="refine_termexample-name-style"/>
|
8518
8627
|
<xsl:apply-templates/>
|
8519
8628
|
</fo:inline>
|
8520
8629
|
</xsl:if>
|
@@ -8665,6 +8774,7 @@
|
|
8665
8774
|
</xsl:when>
|
8666
8775
|
<xsl:otherwise>
|
8667
8776
|
<fo:inline xsl:use-attribute-sets="example-name-style">
|
8777
|
+
<xsl:call-template name="refine_example-name-style"/>
|
8668
8778
|
<xsl:apply-templates/>
|
8669
8779
|
</fo:inline>
|
8670
8780
|
</xsl:otherwise>
|
@@ -9876,6 +9986,7 @@
|
|
9876
9986
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
9877
9987
|
|
9878
9988
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
9989
|
+
|
9879
9990
|
<xsl:call-template name="processBibitem"/>
|
9880
9991
|
</fo:block>
|
9881
9992
|
|
@@ -9917,6 +10028,7 @@
|
|
9917
10028
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
9918
10029
|
<xsl:otherwise>
|
9919
10030
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
10031
|
+
|
9920
10032
|
<fo:list-item-label end-indent="label-end()">
|
9921
10033
|
<fo:block role="SKIP">
|
9922
10034
|
<fo:inline role="SKIP">
|
data/lib/metanorma/cc/biblio.rng
CHANGED
@@ -208,7 +208,9 @@
|
|
208
208
|
</define>
|
209
209
|
<define name="roledescription">
|
210
210
|
<element name="description">
|
211
|
-
<
|
211
|
+
<oneOrMore>
|
212
|
+
<ref name="TextElement"/>
|
213
|
+
</oneOrMore>
|
212
214
|
</element>
|
213
215
|
</define>
|
214
216
|
<define name="person">
|
@@ -333,7 +335,9 @@
|
|
333
335
|
</define>
|
334
336
|
<define name="affiliationdescription">
|
335
337
|
<element name="description">
|
336
|
-
<
|
338
|
+
<oneOrMore>
|
339
|
+
<ref name="TextElement"/>
|
340
|
+
</oneOrMore>
|
337
341
|
</element>
|
338
342
|
</define>
|
339
343
|
<define name="organization">
|
@@ -897,7 +901,9 @@
|
|
897
901
|
</define>
|
898
902
|
<define name="formattedref">
|
899
903
|
<element name="formattedref">
|
900
|
-
<
|
904
|
+
<oneOrMore>
|
905
|
+
<ref name="TextElement"/>
|
906
|
+
</oneOrMore>
|
901
907
|
</element>
|
902
908
|
</define>
|
903
909
|
<define name="license">
|
@@ -942,7 +948,9 @@
|
|
942
948
|
<optional>
|
943
949
|
<attribute name="type"/>
|
944
950
|
</optional>
|
945
|
-
<
|
951
|
+
<zeroOrMore>
|
952
|
+
<ref name="TextElement"/>
|
953
|
+
</zeroOrMore>
|
946
954
|
</define>
|
947
955
|
<!-- TitleType = ( "alternative" | "original" | "unofficial" | "subtitle" | "main" ) -->
|
948
956
|
<define name="TypedUri">
|
@@ -1042,7 +1050,9 @@
|
|
1042
1050
|
<optional>
|
1043
1051
|
<attribute name="script"/>
|
1044
1052
|
</optional>
|
1045
|
-
<
|
1053
|
+
<oneOrMore>
|
1054
|
+
<ref name="TextElement"/>
|
1055
|
+
</oneOrMore>
|
1046
1056
|
</element>
|
1047
1057
|
</define>
|
1048
1058
|
<define name="docnumber">
|
@@ -1267,12 +1277,16 @@
|
|
1267
1277
|
<optional>
|
1268
1278
|
<attribute name="type"/>
|
1269
1279
|
</optional>
|
1270
|
-
<
|
1280
|
+
<oneOrMore>
|
1281
|
+
<ref name="TextElement"/>
|
1282
|
+
</oneOrMore>
|
1271
1283
|
</element>
|
1272
1284
|
</define>
|
1273
1285
|
<define name="bibabstract">
|
1274
1286
|
<element name="abstract">
|
1275
|
-
<
|
1287
|
+
<oneOrMore>
|
1288
|
+
<ref name="TextElement"/>
|
1289
|
+
</oneOrMore>
|
1276
1290
|
</element>
|
1277
1291
|
</define>
|
1278
1292
|
<define name="copyright">
|
@@ -1377,7 +1391,9 @@
|
|
1377
1391
|
</attribute>
|
1378
1392
|
<optional>
|
1379
1393
|
<element name="description">
|
1380
|
-
<
|
1394
|
+
<oneOrMore>
|
1395
|
+
<ref name="TextElement"/>
|
1396
|
+
</oneOrMore>
|
1381
1397
|
</element>
|
1382
1398
|
</optional>
|
1383
1399
|
<element name="bibitem">
|
data/lib/metanorma/cc/cc.rng
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns='https://www.metanorma.org/ns/cc' xmlns="http://relaxng.org/ns/structure/1.0"
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/cc' xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<!--
|
4
4
|
VERSION v1.2.1
|
5
5
|
default namespace = "http://riboseinc.com/csd"
|
@@ -14,23 +14,8 @@
|
|
14
14
|
</start>
|
15
15
|
<define name="figure">
|
16
16
|
<element name="figure">
|
17
|
-
<
|
18
|
-
|
19
|
-
</attribute>
|
20
|
-
<optional>
|
21
|
-
<attribute name="unnumbered">
|
22
|
-
<data type="boolean"/>
|
23
|
-
</attribute>
|
24
|
-
</optional>
|
25
|
-
<optional>
|
26
|
-
<attribute name="number"/>
|
27
|
-
</optional>
|
28
|
-
<optional>
|
29
|
-
<attribute name="subsequence"/>
|
30
|
-
</optional>
|
31
|
-
<optional>
|
32
|
-
<attribute name="class"/>
|
33
|
-
</optional>
|
17
|
+
<ref name="FigureAttributes"/>
|
18
|
+
<ref name="BlockAttributes"/>
|
34
19
|
<optional>
|
35
20
|
<ref name="source"/>
|
36
21
|
</optional>
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
@@ -156,44 +156,7 @@
|
|
156
156
|
</define>
|
157
157
|
<define name="xref">
|
158
158
|
<element name="xref">
|
159
|
-
<
|
160
|
-
<data type="string">
|
161
|
-
<param name="pattern">\i\c*|\c+#\c+</param>
|
162
|
-
</data>
|
163
|
-
</attribute>
|
164
|
-
<optional>
|
165
|
-
<attribute name="to">
|
166
|
-
<data type="string">
|
167
|
-
<param name="pattern">\i\c*|\c+#\c+</param>
|
168
|
-
</data>
|
169
|
-
</attribute>
|
170
|
-
</optional>
|
171
|
-
<optional>
|
172
|
-
<attribute name="type">
|
173
|
-
<ref name="ReferenceFormat"/>
|
174
|
-
</attribute>
|
175
|
-
</optional>
|
176
|
-
<optional>
|
177
|
-
<attribute name="alt"/>
|
178
|
-
</optional>
|
179
|
-
<optional>
|
180
|
-
<attribute name="case">
|
181
|
-
<choice>
|
182
|
-
<value>capital</value>
|
183
|
-
<value>lowercase</value>
|
184
|
-
</choice>
|
185
|
-
</attribute>
|
186
|
-
</optional>
|
187
|
-
<optional>
|
188
|
-
<attribute name="droploc">
|
189
|
-
<data type="boolean"/>
|
190
|
-
</attribute>
|
191
|
-
</optional>
|
192
|
-
<optional>
|
193
|
-
<attribute name="style">
|
194
|
-
<ref name="XrefStyleType"/>
|
195
|
-
</attribute>
|
196
|
-
</optional>
|
159
|
+
<ref name="XrefAttributes"/>
|
197
160
|
<ref name="XrefBody"/>
|
198
161
|
</element>
|
199
162
|
</define>
|
@@ -407,23 +370,7 @@
|
|
407
370
|
</define>
|
408
371
|
<define name="figure">
|
409
372
|
<element name="figure">
|
410
|
-
<
|
411
|
-
<data type="ID"/>
|
412
|
-
</attribute>
|
413
|
-
<optional>
|
414
|
-
<attribute name="unnumbered">
|
415
|
-
<data type="boolean"/>
|
416
|
-
</attribute>
|
417
|
-
</optional>
|
418
|
-
<optional>
|
419
|
-
<attribute name="number"/>
|
420
|
-
</optional>
|
421
|
-
<optional>
|
422
|
-
<attribute name="subsequence"/>
|
423
|
-
</optional>
|
424
|
-
<optional>
|
425
|
-
<attribute name="class"/>
|
426
|
-
</optional>
|
373
|
+
<ref name="FigureAttributes"/>
|
427
374
|
<ref name="BlockAttributes"/>
|
428
375
|
<optional>
|
429
376
|
<ref name="tname"/>
|
@@ -2450,6 +2397,49 @@
|
|
2450
2397
|
</zeroOrMore>
|
2451
2398
|
</element>
|
2452
2399
|
</define>
|
2400
|
+
<define name="XrefAttributes">
|
2401
|
+
<attribute name="target">
|
2402
|
+
<data type="string">
|
2403
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
2404
|
+
</data>
|
2405
|
+
</attribute>
|
2406
|
+
<optional>
|
2407
|
+
<attribute name="to">
|
2408
|
+
<data type="string">
|
2409
|
+
<param name="pattern">\i\c*|\c+#\c+</param>
|
2410
|
+
</data>
|
2411
|
+
</attribute>
|
2412
|
+
</optional>
|
2413
|
+
<optional>
|
2414
|
+
<attribute name="type">
|
2415
|
+
<ref name="ReferenceFormat"/>
|
2416
|
+
</attribute>
|
2417
|
+
</optional>
|
2418
|
+
<optional>
|
2419
|
+
<attribute name="alt"/>
|
2420
|
+
</optional>
|
2421
|
+
<optional>
|
2422
|
+
<attribute name="case">
|
2423
|
+
<choice>
|
2424
|
+
<value>capital</value>
|
2425
|
+
<value>lowercase</value>
|
2426
|
+
</choice>
|
2427
|
+
</attribute>
|
2428
|
+
</optional>
|
2429
|
+
<optional>
|
2430
|
+
<attribute name="droploc">
|
2431
|
+
<data type="boolean"/>
|
2432
|
+
</attribute>
|
2433
|
+
</optional>
|
2434
|
+
<optional>
|
2435
|
+
<attribute name="style">
|
2436
|
+
<ref name="XrefStyleType"/>
|
2437
|
+
</attribute>
|
2438
|
+
</optional>
|
2439
|
+
<optional>
|
2440
|
+
<attribute name="label"/>
|
2441
|
+
</optional>
|
2442
|
+
</define>
|
2453
2443
|
<define name="XrefBody">
|
2454
2444
|
<zeroOrMore>
|
2455
2445
|
<ref name="XrefTarget"/>
|
@@ -2528,6 +2518,28 @@
|
|
2528
2518
|
<attribute name="columns"/>
|
2529
2519
|
</optional>
|
2530
2520
|
</define>
|
2521
|
+
<define name="FigureAttributes">
|
2522
|
+
<attribute name="id">
|
2523
|
+
<data type="ID"/>
|
2524
|
+
</attribute>
|
2525
|
+
<optional>
|
2526
|
+
<attribute name="unnumbered">
|
2527
|
+
<data type="boolean"/>
|
2528
|
+
</attribute>
|
2529
|
+
</optional>
|
2530
|
+
<optional>
|
2531
|
+
<attribute name="number"/>
|
2532
|
+
</optional>
|
2533
|
+
<optional>
|
2534
|
+
<attribute name="subsequence"/>
|
2535
|
+
</optional>
|
2536
|
+
<optional>
|
2537
|
+
<attribute name="class"/>
|
2538
|
+
</optional>
|
2539
|
+
<optional>
|
2540
|
+
<attribute name="width"/>
|
2541
|
+
</optional>
|
2542
|
+
</define>
|
2531
2543
|
<start>
|
2532
2544
|
<ref name="standard-document"/>
|
2533
2545
|
</start>
|
data/lib/metanorma/cc/version.rb
CHANGED
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.4.
|
4
|
+
version: 2.4.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-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|