metanorma-cc 2.1.7 → 2.1.8
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/.github/workflows/rake.yml +1 -1
- data/.github/workflows/release.yml +24 -0
- data/lib/isodoc/cc/cc.standard.xsl +102 -146
- data/lib/metanorma/cc/biblio.rng +8 -5
- data/lib/metanorma/cc/version.rb +1 -1
- data/lib/metanorma-cc.rb +2 -1
- metadata +7 -10
- data/lib/isodoc/cc/html/_coverpage.css +0 -327
- data/lib/isodoc/cc/html/cc.css +0 -818
- data/lib/isodoc/cc/html/htmlstyle.css +0 -1066
- data/lib/isodoc/cc/html/wordstyle.css +0 -1296
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0fcb38ee820dcf15f1aaedb633347e869ef9ad52e6ba1a8cc22f5e594c8394e7
|
|
4
|
+
data.tar.gz: 753b26acfc83bff5efb0e763462d7bdf0b5a4b76de601377190b59d300fc7357
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c0a1bcb8ec47ff6d853a7fd242ffcef7db22f7aa6d3595b2197015afe5132b6e5aa4b2c6579da4c720f15b75d5c1bf7cb7c74cb9f7823dc5636e1e48aba1144
|
|
7
|
+
data.tar.gz: 8f41ce57e322347c31c350615b08957e4439d9f6403267fba890a5455f5bbee683eb26c8a876b8d0168617393feef0d89d1fb1306bd618f1b22c36877359e698
|
data/.github/workflows/rake.yml
CHANGED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Auto-generated by Cimas: Do not edit it manually!
|
|
2
|
+
# See https://github.com/metanorma/cimas
|
|
3
|
+
name: release
|
|
4
|
+
|
|
5
|
+
on:
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
next_version:
|
|
9
|
+
description: |
|
|
10
|
+
Next release version. Possible values: x.y.z, major, minor, patch or pre|rc|etc
|
|
11
|
+
required: true
|
|
12
|
+
default: 'skip'
|
|
13
|
+
push:
|
|
14
|
+
tags: [ v* ]
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
release:
|
|
18
|
+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
|
|
19
|
+
with:
|
|
20
|
+
next_version: ${{ github.event.inputs.next_version }}
|
|
21
|
+
secrets:
|
|
22
|
+
rubygems-api-key: ${{ secrets.METANORMA_CI_RUBYGEMS_API_KEY }}
|
|
23
|
+
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
|
|
24
|
+
|
|
@@ -594,8 +594,18 @@
|
|
|
594
594
|
|
|
595
595
|
<xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
|
|
596
596
|
|
|
597
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm_">
|
|
598
|
+
true
|
|
599
|
+
</xsl:variable>
|
|
600
|
+
<xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
|
|
601
|
+
|
|
597
602
|
<xsl:variable name="isGenerateTableIF_">
|
|
598
|
-
|
|
603
|
+
<xsl:choose>
|
|
604
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
|
605
|
+
<xsl:value-of select="normalize-space($table_if) = 'true'"/>
|
|
606
|
+
</xsl:when>
|
|
607
|
+
<xsl:otherwise>false</xsl:otherwise>
|
|
608
|
+
</xsl:choose>
|
|
599
609
|
</xsl:variable>
|
|
600
610
|
<xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
|
|
601
611
|
|
|
@@ -1195,7 +1205,7 @@
|
|
|
1195
1205
|
</xsl:attribute-set>
|
|
1196
1206
|
|
|
1197
1207
|
<xsl:attribute-set name="dt-block-style">
|
|
1198
|
-
<xsl:attribute name="margin-top">
|
|
1208
|
+
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
|
1199
1209
|
|
|
1200
1210
|
<xsl:attribute name="margin-left">7mm</xsl:attribute>
|
|
1201
1211
|
|
|
@@ -2144,6 +2154,7 @@
|
|
|
2144
2154
|
|
|
2145
2155
|
<xsl:variable name="margin-side">
|
|
2146
2156
|
<xsl:choose>
|
|
2157
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">0</xsl:when>
|
|
2147
2158
|
<xsl:when test="sum(xalan:nodeset($colwidths)//column) > 75">15</xsl:when>
|
|
2148
2159
|
<xsl:otherwise>0</xsl:otherwise>
|
|
2149
2160
|
</xsl:choose>
|
|
@@ -2212,6 +2223,7 @@
|
|
|
2212
2223
|
</td>
|
|
2213
2224
|
</tr>
|
|
2214
2225
|
-->
|
|
2226
|
+
<!-- Simple_table=<xsl:copy-of select="$simple-table"/> -->
|
|
2215
2227
|
<xsl:apply-templates select="xalan:nodeset($simple-table)" mode="process_table-if"/>
|
|
2216
2228
|
|
|
2217
2229
|
</xsl:when>
|
|
@@ -2346,12 +2358,17 @@
|
|
|
2346
2358
|
<xsl:template name="calculate-column-widths">
|
|
2347
2359
|
<xsl:param name="table"/>
|
|
2348
2360
|
<xsl:param name="cols-count"/>
|
|
2349
|
-
|
|
2361
|
+
<xsl:choose>
|
|
2362
|
+
<xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
|
|
2363
|
+
<xsl:call-template name="get-calculated-column-widths-autolayout-algorithm"/>
|
|
2364
|
+
</xsl:when>
|
|
2365
|
+
<xsl:otherwise>
|
|
2350
2366
|
<xsl:call-template name="calculate-column-widths-proportional">
|
|
2351
2367
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
2352
2368
|
<xsl:with-param name="table" select="$table"/>
|
|
2353
2369
|
</xsl:call-template>
|
|
2354
|
-
|
|
2370
|
+
</xsl:otherwise>
|
|
2371
|
+
</xsl:choose>
|
|
2355
2372
|
</xsl:template>
|
|
2356
2373
|
|
|
2357
2374
|
<!-- ================================================== -->
|
|
@@ -2529,6 +2546,7 @@
|
|
|
2529
2546
|
<!-- (https://www.w3.org/TR/REC-html40/appendix/notes.html#h-B.5.2) -->
|
|
2530
2547
|
<!-- ================================================== -->
|
|
2531
2548
|
|
|
2549
|
+
<!-- INPUT: table with columns widths, generated by table_if.xsl -->
|
|
2532
2550
|
<xsl:template name="calculate-column-widths-autolayout-algorithm">
|
|
2533
2551
|
<xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
|
|
2534
2552
|
|
|
@@ -2540,67 +2558,6 @@
|
|
|
2540
2558
|
|
|
2541
2559
|
<!-- Since line wrap has been disabled, paragraphs are treated as long lines unless broken by BR elements. -->
|
|
2542
2560
|
|
|
2543
|
-
<!-- get current table id -->
|
|
2544
|
-
<xsl:variable name="table_id" select="@id"/>
|
|
2545
|
-
<!-- find table by id in the file 'table_widths' -->
|
|
2546
|
-
<!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
|
|
2547
|
-
<xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
|
|
2548
|
-
|
|
2549
|
-
<!-- table='<xsl:copy-of select="$table"/>' -->
|
|
2550
|
-
<!-- table_id='<xsl:value-of select="$table_id"/>\ -->
|
|
2551
|
-
<!-- table-if='<xsl:copy-of select="$table-if"/>' -->
|
|
2552
|
-
<!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
|
|
2553
|
-
|
|
2554
|
-
<xsl:variable name="table_with_cell_widths_">
|
|
2555
|
-
<xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
|
|
2556
|
-
</xsl:variable>
|
|
2557
|
-
<xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
|
|
2558
|
-
|
|
2559
|
-
<!-- <xsl:if test="$table_if_debug = 'true'">
|
|
2560
|
-
<xsl:copy-of select="$table_with_cell_widths"/>
|
|
2561
|
-
</xsl:if> -->
|
|
2562
|
-
|
|
2563
|
-
<!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
|
|
2564
|
-
|
|
2565
|
-
<xsl:variable name="column_widths_">
|
|
2566
|
-
<!-- iteration of columns -->
|
|
2567
|
-
<xsl:for-each select="$table_with_cell_widths//tr[1]/td">
|
|
2568
|
-
<xsl:variable name="pos" select="position()"/>
|
|
2569
|
-
<column>
|
|
2570
|
-
<xsl:attribute name="width_max">
|
|
2571
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_max">
|
|
2572
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
|
2573
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
|
2574
|
-
</xsl:for-each>
|
|
2575
|
-
</xsl:attribute>
|
|
2576
|
-
<xsl:attribute name="width_min">
|
|
2577
|
-
<xsl:for-each select="ancestor::tbody//tr/td[$pos]/@width_min">
|
|
2578
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
|
2579
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
|
2580
|
-
</xsl:for-each>
|
|
2581
|
-
</xsl:attribute>
|
|
2582
|
-
</column>
|
|
2583
|
-
</xsl:for-each>
|
|
2584
|
-
</xsl:variable>
|
|
2585
|
-
<xsl:variable name="column_widths" select="xalan:nodeset($column_widths_)"/>
|
|
2586
|
-
|
|
2587
|
-
<!-- <column_widths>
|
|
2588
|
-
<xsl:copy-of select="$column_widths"/>
|
|
2589
|
-
</column_widths> -->
|
|
2590
|
-
|
|
2591
|
-
<!-- These in turn, are used to find the minimum and maximum width for the table. -->
|
|
2592
|
-
<xsl:variable name="table_widths_">
|
|
2593
|
-
<table>
|
|
2594
|
-
<xsl:attribute name="width_max">
|
|
2595
|
-
<xsl:value-of select="sum($column_widths/column/@width_max)"/>
|
|
2596
|
-
</xsl:attribute>
|
|
2597
|
-
<xsl:attribute name="width_min">
|
|
2598
|
-
<xsl:value-of select="sum($column_widths/column/@width_min)"/>
|
|
2599
|
-
</xsl:attribute>
|
|
2600
|
-
</table>
|
|
2601
|
-
</xsl:variable>
|
|
2602
|
-
<xsl:variable name="table_widths" select="xalan:nodeset($table_widths_)"/>
|
|
2603
|
-
|
|
2604
2561
|
<xsl:variable name="page_width">
|
|
2605
2562
|
<xsl:choose>
|
|
2606
2563
|
<xsl:when test="$parent_table_page-width != ''">
|
|
@@ -2613,16 +2570,13 @@
|
|
|
2613
2570
|
</xsl:variable>
|
|
2614
2571
|
|
|
2615
2572
|
<xsl:if test="$table_if_debug = 'true'">
|
|
2616
|
-
<
|
|
2617
|
-
<xsl:copy-of select="$table_widths"/>
|
|
2618
|
-
</table_width>
|
|
2619
|
-
<debug>$page_width=<xsl:value-of select="$page_width"/></debug>
|
|
2573
|
+
<page_width><xsl:value-of select="$page_width"/></page_width>
|
|
2620
2574
|
</xsl:if>
|
|
2621
2575
|
|
|
2622
2576
|
<!-- There are three cases: -->
|
|
2623
2577
|
<xsl:choose>
|
|
2624
2578
|
<!-- 1. The minimum table width is equal to or wider than the available space -->
|
|
2625
|
-
<xsl:when test="
|
|
2579
|
+
<xsl:when test="@width_min >= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
|
|
2626
2580
|
<!-- call old algorithm -->
|
|
2627
2581
|
<case1/>
|
|
2628
2582
|
<!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
|
|
@@ -2632,10 +2586,10 @@
|
|
|
2632
2586
|
</xsl:call-template> -->
|
|
2633
2587
|
</xsl:when>
|
|
2634
2588
|
<!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
|
|
2635
|
-
<xsl:when test="
|
|
2589
|
+
<xsl:when test="@width_max <= $page_width">
|
|
2636
2590
|
<case2/>
|
|
2637
2591
|
<autolayout/>
|
|
2638
|
-
<xsl:for-each select="
|
|
2592
|
+
<xsl:for-each select="column/@width_max">
|
|
2639
2593
|
<column divider="100"><xsl:value-of select="."/></column>
|
|
2640
2594
|
</xsl:for-each>
|
|
2641
2595
|
</xsl:when>
|
|
@@ -2645,19 +2599,19 @@
|
|
|
2645
2599
|
For each column, let d be the difference between maximum and minimum width of that column.
|
|
2646
2600
|
Now set the column's width to the minimum width plus d times W over D.
|
|
2647
2601
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
|
2648
|
-
<xsl:when test="(
|
|
2602
|
+
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
|
2649
2603
|
<!-- difference between the available space and the minimum table width -->
|
|
2650
|
-
<xsl:variable name="W" select="$page_width -
|
|
2604
|
+
<xsl:variable name="W" select="$page_width - @width_min"/>
|
|
2651
2605
|
<W><xsl:value-of select="$W"/></W>
|
|
2652
2606
|
<!-- difference between maximum and minimum width of the table -->
|
|
2653
|
-
<xsl:variable name="D" select="
|
|
2607
|
+
<xsl:variable name="D" select="@width_max - @width_min"/>
|
|
2654
2608
|
<D><xsl:value-of select="$D"/></D>
|
|
2655
2609
|
<case3/>
|
|
2656
2610
|
<autolayout/>
|
|
2657
|
-
<xsl:if test="
|
|
2611
|
+
<xsl:if test="@width_min >= $page_width">
|
|
2658
2612
|
<split_keep-within-line>true</split_keep-within-line>
|
|
2659
2613
|
</xsl:if>
|
|
2660
|
-
<xsl:for-each select="
|
|
2614
|
+
<xsl:for-each select="column">
|
|
2661
2615
|
<!-- difference between maximum and minimum width of that column. -->
|
|
2662
2616
|
<xsl:variable name="d" select="@width_max - @width_min"/>
|
|
2663
2617
|
<d><xsl:value-of select="$d"/></d>
|
|
@@ -2683,23 +2637,39 @@
|
|
|
2683
2637
|
|
|
2684
2638
|
<parent_element><xsl:value-of select="local-name(..)"/></parent_element>
|
|
2685
2639
|
|
|
2640
|
+
<ancestor_tree>
|
|
2641
|
+
<xsl:for-each select="ancestor::*">
|
|
2642
|
+
<ancestor><xsl:value-of select="local-name()"/></ancestor>
|
|
2643
|
+
</xsl:for-each>
|
|
2644
|
+
</ancestor_tree>
|
|
2645
|
+
|
|
2686
2646
|
<xsl:variable name="parent_table_page-width_">
|
|
2687
2647
|
<xsl:if test="$parent_table_id != ''">
|
|
2688
2648
|
<!-- determine column number in the parent table -->
|
|
2689
2649
|
<xsl:variable name="parent_table_column_number">
|
|
2690
2650
|
<xsl:choose>
|
|
2691
|
-
<xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
|
|
2651
|
+
<!-- <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when> -->
|
|
2652
|
+
<xsl:when test="(ancestor::*[local-name() = 'dd' or local-name() = 'table' or local-name() = 'dl'])[last()][local-name() = 'dd' or local-name() = 'dl']">2</xsl:when>
|
|
2692
2653
|
<xsl:otherwise> <!-- parent is table -->
|
|
2693
2654
|
<xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
|
|
2694
2655
|
</xsl:otherwise>
|
|
2695
2656
|
</xsl:choose>
|
|
2696
2657
|
</xsl:variable>
|
|
2697
2658
|
<!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
|
|
2698
|
-
|
|
2659
|
+
|
|
2660
|
+
<xsl:variable name="parent_table_column_" select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
|
|
2661
|
+
<xsl:variable name="parent_table_column" select="xalan:nodeset($parent_table_column_)"/>
|
|
2662
|
+
<!-- <xsl:variable name="divider">
|
|
2663
|
+
<xsl:value-of select="$parent_table_column/@divider"/>
|
|
2664
|
+
<xsl:if test="not($parent_table_column/@divider)">1</xsl:if>
|
|
2665
|
+
</xsl:variable> -->
|
|
2666
|
+
<xsl:value-of select="$parent_table_column/text()"/> <!-- * 10 -->
|
|
2699
2667
|
</xsl:if>
|
|
2700
2668
|
</xsl:variable>
|
|
2701
2669
|
<xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
|
|
2702
2670
|
|
|
2671
|
+
<parent_table_page-width><xsl:value-of select="$parent_table_page-width"/></parent_table_page-width>
|
|
2672
|
+
|
|
2703
2673
|
<!-- get current table id -->
|
|
2704
2674
|
<xsl:variable name="table_id" select="@id"/>
|
|
2705
2675
|
|
|
@@ -2720,50 +2690,6 @@
|
|
|
2720
2690
|
|
|
2721
2691
|
</xsl:template> <!-- get-calculated-column-widths-autolayout-algorithm -->
|
|
2722
2692
|
|
|
2723
|
-
<!-- ============================= -->
|
|
2724
|
-
<!-- mode: determine_cell_widths-if -->
|
|
2725
|
-
<!-- ============================= -->
|
|
2726
|
-
<xsl:template match="@*|node()" mode="determine_cell_widths-if">
|
|
2727
|
-
<xsl:copy>
|
|
2728
|
-
<xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
|
|
2729
|
-
</xsl:copy>
|
|
2730
|
-
</xsl:template>
|
|
2731
|
-
|
|
2732
|
-
<xsl:template match="td | th" mode="determine_cell_widths-if">
|
|
2733
|
-
<xsl:copy>
|
|
2734
|
-
<xsl:copy-of select="@*"/>
|
|
2735
|
-
|
|
2736
|
-
<!-- The maximum width is given by the widest line. -->
|
|
2737
|
-
<xsl:attribute name="width_max">
|
|
2738
|
-
<xsl:for-each select="p_len">
|
|
2739
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
|
2740
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
|
2741
|
-
</xsl:for-each>
|
|
2742
|
-
</xsl:attribute>
|
|
2743
|
-
|
|
2744
|
-
<!-- The minimum width is given by the widest text element (word, image, etc.) -->
|
|
2745
|
-
<xsl:variable name="width_min">
|
|
2746
|
-
<xsl:for-each select="word_len">
|
|
2747
|
-
<xsl:sort select="." data-type="number" order="descending"/>
|
|
2748
|
-
<xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
|
|
2749
|
-
</xsl:for-each>
|
|
2750
|
-
</xsl:variable>
|
|
2751
|
-
<xsl:attribute name="width_min">
|
|
2752
|
-
<xsl:value-of select="$width_min"/>
|
|
2753
|
-
</xsl:attribute>
|
|
2754
|
-
|
|
2755
|
-
<xsl:if test="$width_min = 0">
|
|
2756
|
-
<xsl:attribute name="width_min">1</xsl:attribute>
|
|
2757
|
-
</xsl:if>
|
|
2758
|
-
|
|
2759
|
-
<xsl:apply-templates select="node()" mode="determine_cell_widths-if"/>
|
|
2760
|
-
|
|
2761
|
-
</xsl:copy>
|
|
2762
|
-
</xsl:template>
|
|
2763
|
-
<!-- ============================= -->
|
|
2764
|
-
<!-- END mode: determine_cell_widths-if -->
|
|
2765
|
-
<!-- ============================= -->
|
|
2766
|
-
|
|
2767
2693
|
<!-- ================================================== -->
|
|
2768
2694
|
<!-- Calculate column's width based on HTML4 algorithm -->
|
|
2769
2695
|
<!-- ================================================== -->
|
|
@@ -2954,6 +2880,7 @@
|
|
|
2954
2880
|
<xsl:when test="$table_or_dl = 'table'">
|
|
2955
2881
|
<xsl:for-each select="*[local-name() = 'td' or local-name() = 'th']/*">
|
|
2956
2882
|
<fo:table-row number-columns-spanned="{$col_count}">
|
|
2883
|
+
<xsl:copy-of select="../@font-weight"/>
|
|
2957
2884
|
<!-- <test_table><xsl:copy-of select="."/></test_table> -->
|
|
2958
2885
|
<xsl:call-template name="td"/>
|
|
2959
2886
|
</fo:table-row>
|
|
@@ -3100,7 +3027,7 @@
|
|
|
3100
3027
|
|
|
3101
3028
|
<xsl:apply-templates/>
|
|
3102
3029
|
|
|
3103
|
-
<xsl:if test="$isGenerateTableIF = 'true'"
|
|
3030
|
+
<xsl:if test="$isGenerateTableIF = 'true'"> <fo:inline id="{@id}_end">end</fo:inline></xsl:if> <!-- to determine width of text --> <!-- <xsl:value-of select="$hair_space"/> -->
|
|
3104
3031
|
|
|
3105
3032
|
</fo:block>
|
|
3106
3033
|
</fo:table-cell>
|
|
@@ -3426,6 +3353,7 @@
|
|
|
3426
3353
|
<xsl:template match="*[local-name()='dl']">
|
|
3427
3354
|
<xsl:variable name="isAdded" select="@added"/>
|
|
3428
3355
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
3356
|
+
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
|
3429
3357
|
<fo:block-container>
|
|
3430
3358
|
|
|
3431
3359
|
<xsl:if test="not(ancestor::*[local-name() = 'quote'])">
|
|
@@ -3959,21 +3887,16 @@
|
|
|
3959
3887
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
|
3960
3888
|
<xsl:template match="*[local-name()='dt']" mode="dl_if">
|
|
3961
3889
|
<xsl:param name="id"/>
|
|
3962
|
-
<xsl:variable name="row_number" select="count(preceding-sibling::*[local-name()='dt']) + 1"/>
|
|
3963
3890
|
<tr>
|
|
3964
3891
|
<td>
|
|
3965
3892
|
<xsl:copy-of select="node()"/>
|
|
3966
3893
|
</td>
|
|
3967
3894
|
<td>
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
<!-- get paragraphs from nested 'dl' -->
|
|
3972
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
|
3973
|
-
|
|
3895
|
+
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
|
3896
|
+
<!-- get paragraphs from nested 'dl' -->
|
|
3897
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
|
3974
3898
|
</td>
|
|
3975
3899
|
</tr>
|
|
3976
|
-
|
|
3977
3900
|
</xsl:template>
|
|
3978
3901
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
|
3979
3902
|
|
|
@@ -4627,6 +4550,9 @@
|
|
|
4627
4550
|
<xsl:variable name="td">
|
|
4628
4551
|
<xsl:element name="td">
|
|
4629
4552
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
|
4553
|
+
<xsl:if test="local-name()='th'">
|
|
4554
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
4555
|
+
</xsl:if>
|
|
4630
4556
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
|
4631
4557
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
4632
4558
|
</xsl:element>
|
|
@@ -4639,6 +4565,9 @@
|
|
|
4639
4565
|
<xsl:otherwise>
|
|
4640
4566
|
<xsl:element name="td">
|
|
4641
4567
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
|
4568
|
+
<xsl:if test="local-name()='th'">
|
|
4569
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
4570
|
+
</xsl:if>
|
|
4642
4571
|
<xsl:apply-templates mode="simple-table-colspan"/>
|
|
4643
4572
|
</xsl:element>
|
|
4644
4573
|
</xsl:otherwise>
|
|
@@ -4768,8 +4697,14 @@
|
|
|
4768
4697
|
<xsl:copy-of select="@*"/>
|
|
4769
4698
|
<xsl:variable name="row_number" select="count(../preceding-sibling::*) + 1"/>
|
|
4770
4699
|
<xsl:variable name="col_number" select="count(preceding-sibling::*) + 1"/>
|
|
4700
|
+
<xsl:variable name="divide">
|
|
4701
|
+
<xsl:choose>
|
|
4702
|
+
<xsl:when test="@divide"><xsl:value-of select="@divide"/></xsl:when>
|
|
4703
|
+
<xsl:otherwise>1</xsl:otherwise>
|
|
4704
|
+
</xsl:choose>
|
|
4705
|
+
</xsl:variable>
|
|
4771
4706
|
<xsl:attribute name="id">
|
|
4772
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number)"/>
|
|
4707
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_',$divide)"/>
|
|
4773
4708
|
</xsl:attribute>
|
|
4774
4709
|
|
|
4775
4710
|
<xsl:for-each select="*[local-name() = 'p']">
|
|
@@ -4777,10 +4712,12 @@
|
|
|
4777
4712
|
<xsl:copy-of select="@*"/>
|
|
4778
4713
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
|
4779
4714
|
<xsl:attribute name="id">
|
|
4780
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num)"/>
|
|
4715
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
|
4781
4716
|
</xsl:attribute>
|
|
4782
4717
|
|
|
4783
|
-
<xsl:copy-of select="node()"/>
|
|
4718
|
+
<!-- <xsl:copy-of select="node()" /> -->
|
|
4719
|
+
<xsl:apply-templates mode="simple-table-noid"/>
|
|
4720
|
+
|
|
4784
4721
|
</xsl:copy>
|
|
4785
4722
|
</xsl:for-each>
|
|
4786
4723
|
|
|
@@ -4809,7 +4746,7 @@
|
|
|
4809
4746
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
|
4810
4747
|
<xsl:copy>
|
|
4811
4748
|
<xsl:attribute name="id">
|
|
4812
|
-
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num)"/>
|
|
4749
|
+
<xsl:value-of select="concat($id,'_',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
|
4813
4750
|
</xsl:attribute>
|
|
4814
4751
|
<xsl:copy-of select="node()"/>
|
|
4815
4752
|
</xsl:copy>
|
|
@@ -4818,6 +4755,24 @@
|
|
|
4818
4755
|
</xsl:copy>
|
|
4819
4756
|
|
|
4820
4757
|
</xsl:template>
|
|
4758
|
+
|
|
4759
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'p']//*" mode="simple-table-noid">
|
|
4760
|
+
<xsl:copy>
|
|
4761
|
+
<xsl:choose>
|
|
4762
|
+
<xsl:when test="$isGenerateTableIF = 'true'">
|
|
4763
|
+
<xsl:copy-of select="@*[local-name() != 'id']"/> <!-- to prevent repeat id in colspan/rowspan cells -->
|
|
4764
|
+
<!-- <xsl:if test="local-name() = 'dl' or local-name() = 'table'">
|
|
4765
|
+
<xsl:copy-of select="@id"/>
|
|
4766
|
+
</xsl:if> -->
|
|
4767
|
+
</xsl:when>
|
|
4768
|
+
<xsl:otherwise>
|
|
4769
|
+
<xsl:copy-of select="@*"/>
|
|
4770
|
+
</xsl:otherwise>
|
|
4771
|
+
</xsl:choose>
|
|
4772
|
+
<xsl:apply-templates select="node()" mode="simple-table-noid"/>
|
|
4773
|
+
</xsl:copy>
|
|
4774
|
+
</xsl:template>
|
|
4775
|
+
|
|
4821
4776
|
<!-- End mode: simple-table-id -->
|
|
4822
4777
|
<!-- ===================== -->
|
|
4823
4778
|
<!-- ===================== -->
|
|
@@ -4827,7 +4782,7 @@
|
|
|
4827
4782
|
<!-- =============================== -->
|
|
4828
4783
|
<xsl:template match="@*|node()" mode="td_text_with_formatting">
|
|
4829
4784
|
<xsl:copy>
|
|
4830
|
-
|
|
4785
|
+
<xsl:apply-templates select="@*|node()" mode="td_text_with_formatting"/>
|
|
4831
4786
|
</xsl:copy>
|
|
4832
4787
|
</xsl:template>
|
|
4833
4788
|
|
|
@@ -4941,6 +4896,10 @@
|
|
|
4941
4896
|
|
|
4942
4897
|
<fo:inline xsl:use-attribute-sets="mathml-style">
|
|
4943
4898
|
|
|
4899
|
+
<xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
|
|
4900
|
+
<!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
|
|
4901
|
+
</xsl:if>
|
|
4902
|
+
|
|
4944
4903
|
<xsl:call-template name="setTrackChangesStyles">
|
|
4945
4904
|
<xsl:with-param name="isAdded" select="$isAdded"/>
|
|
4946
4905
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
|
@@ -6914,15 +6873,12 @@
|
|
|
6914
6873
|
|
|
6915
6874
|
<xsl:template match="*[local-name()='tr']" mode="requirement">
|
|
6916
6875
|
<fo:table-row height="7mm" border-bottom="0.5pt solid grey">
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
<xsl:attribute name="background-color">rgb(252, 246, 222)</xsl:attribute>
|
|
6922
|
-
</xsl:if>
|
|
6923
|
-
<xsl:if test="starts-with(*[local-name()='td'][1], 'Recommendation ')">
|
|
6924
|
-
<xsl:attribute name="background-color">rgb(233, 235, 239)</xsl:attribute>
|
|
6876
|
+
|
|
6877
|
+
<xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
|
|
6878
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
6879
|
+
|
|
6925
6880
|
</xsl:if>
|
|
6881
|
+
|
|
6926
6882
|
<xsl:apply-templates mode="requirement"/>
|
|
6927
6883
|
</fo:table-row>
|
|
6928
6884
|
</xsl:template>
|
|
@@ -8448,7 +8404,7 @@
|
|
|
8448
8404
|
</tbody>
|
|
8449
8405
|
</xsl:variable>
|
|
8450
8406
|
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
|
8451
|
-
<xsl:call-template name="calculate-column-widths">
|
|
8407
|
+
<xsl:call-template name="calculate-column-widths-proportional">
|
|
8452
8408
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
8453
8409
|
<xsl:with-param name="table" select="$toc_table_simple"/>
|
|
8454
8410
|
</xsl:call-template>
|
data/lib/metanorma/cc/biblio.rng
CHANGED
|
@@ -225,9 +225,9 @@
|
|
|
225
225
|
<zeroOrMore>
|
|
226
226
|
<ref name="forename"/>
|
|
227
227
|
</zeroOrMore>
|
|
228
|
-
<
|
|
229
|
-
<ref name="
|
|
230
|
-
</
|
|
228
|
+
<optional>
|
|
229
|
+
<ref name="formatted-initials"/>
|
|
230
|
+
</optional>
|
|
231
231
|
<ref name="surname"/>
|
|
232
232
|
<zeroOrMore>
|
|
233
233
|
<ref name="addition"/>
|
|
@@ -247,8 +247,8 @@
|
|
|
247
247
|
<ref name="LocalizedString"/>
|
|
248
248
|
</element>
|
|
249
249
|
</define>
|
|
250
|
-
<define name="
|
|
251
|
-
<element name="
|
|
250
|
+
<define name="formatted-initials">
|
|
251
|
+
<element name="formatted-initials">
|
|
252
252
|
<ref name="LocalizedString"/>
|
|
253
253
|
</element>
|
|
254
254
|
</define>
|
|
@@ -264,6 +264,9 @@
|
|
|
264
264
|
</define>
|
|
265
265
|
<define name="forename">
|
|
266
266
|
<element name="forename">
|
|
267
|
+
<optional>
|
|
268
|
+
<attribute name="initial"/>
|
|
269
|
+
</optional>
|
|
267
270
|
<ref name="LocalizedString"/>
|
|
268
271
|
</element>
|
|
269
272
|
</define>
|
data/lib/metanorma/cc/version.rb
CHANGED
data/lib/metanorma-cc.rb
CHANGED
|
@@ -4,8 +4,9 @@ require_relative "isodoc/cc/html_convert"
|
|
|
4
4
|
require_relative "isodoc/cc/word_convert"
|
|
5
5
|
require_relative "isodoc/cc/pdf_convert"
|
|
6
6
|
require_relative "metanorma/cc/version"
|
|
7
|
+
require "metanorma"
|
|
7
8
|
|
|
8
|
-
if defined? Metanorma
|
|
9
|
+
if defined? Metanorma::Registry
|
|
9
10
|
require_relative "metanorma/cc"
|
|
10
11
|
Metanorma::Registry.instance.register(Metanorma::CC::Processor)
|
|
11
12
|
end
|
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.1.
|
|
4
|
+
version: 2.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-06 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -177,6 +177,7 @@ extensions: []
|
|
|
177
177
|
extra_rdoc_files: []
|
|
178
178
|
files:
|
|
179
179
|
- ".github/workflows/rake.yml"
|
|
180
|
+
- ".github/workflows/release.yml"
|
|
180
181
|
- ".gitignore"
|
|
181
182
|
- ".hound.yml"
|
|
182
183
|
- ".rubocop.yml"
|
|
@@ -190,21 +191,17 @@ files:
|
|
|
190
191
|
- bin/setup
|
|
191
192
|
- lib/isodoc/cc/base_convert.rb
|
|
192
193
|
- lib/isodoc/cc/cc.standard.xsl
|
|
193
|
-
- lib/isodoc/cc/html/_coverpage.css
|
|
194
194
|
- lib/isodoc/cc/html/_coverpage.scss
|
|
195
|
-
- lib/isodoc/cc/html/cc.css
|
|
196
195
|
- lib/isodoc/cc/html/cc.scss
|
|
197
196
|
- lib/isodoc/cc/html/dots-w@2x.png
|
|
198
197
|
- lib/isodoc/cc/html/dots@2x.png
|
|
199
198
|
- lib/isodoc/cc/html/header.html
|
|
200
199
|
- lib/isodoc/cc/html/html_cc_intro.html
|
|
201
200
|
- lib/isodoc/cc/html/html_cc_titlepage.html
|
|
202
|
-
- lib/isodoc/cc/html/htmlstyle.css
|
|
203
201
|
- lib/isodoc/cc/html/htmlstyle.scss
|
|
204
202
|
- lib/isodoc/cc/html/scripts.html
|
|
205
203
|
- lib/isodoc/cc/html/word_cc_intro.html
|
|
206
204
|
- lib/isodoc/cc/html/word_cc_titlepage.html
|
|
207
|
-
- lib/isodoc/cc/html/wordstyle.css
|
|
208
205
|
- lib/isodoc/cc/html/wordstyle.scss
|
|
209
206
|
- lib/isodoc/cc/html_convert.rb
|
|
210
207
|
- lib/isodoc/cc/i18n-en.yaml
|
|
@@ -233,7 +230,7 @@ homepage: https://github.com/metanorma/metanorma-cc
|
|
|
233
230
|
licenses:
|
|
234
231
|
- BSD-2-Clause
|
|
235
232
|
metadata: {}
|
|
236
|
-
post_install_message:
|
|
233
|
+
post_install_message:
|
|
237
234
|
rdoc_options: []
|
|
238
235
|
require_paths:
|
|
239
236
|
- lib
|
|
@@ -248,8 +245,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
248
245
|
- !ruby/object:Gem::Version
|
|
249
246
|
version: '0'
|
|
250
247
|
requirements: []
|
|
251
|
-
rubygems_version: 3.
|
|
252
|
-
signing_key:
|
|
248
|
+
rubygems_version: 3.1.6
|
|
249
|
+
signing_key:
|
|
253
250
|
specification_version: 4
|
|
254
251
|
summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.
|
|
255
252
|
test_files: []
|