metanorma-cc 2.7.9 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +308 -77
- data/lib/isodoc/cc/html/cc.css +5 -0
- data/lib/isodoc/cc/html/cc.scss +4 -0
- data/lib/isodoc/cc/html/htmlstyle.css +5 -1
- data/lib/isodoc/cc/html/htmlstyle.scss +1 -1
- data/lib/metanorma/cc/isodoc.rng +52 -16
- 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: 7c80db3e135f995e13f7459b98f7085de83e185636f0986326bb5fe4fca86692
|
|
4
|
+
data.tar.gz: 62ed996afcb67f966a34632724c388ba0bed95177643a76cc01c49442faffb0b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 66312c95c05747bdc27817346a75529cfed5b90b70cde5552fbd569630ed0f18347aa8aad4fac406fb51c33cb43d58d7bd5f7c20cd70aeaf0b27e9e9abaf5f89
|
|
7
|
+
data.tar.gz: 7007fd2f5181ea82e72a2114050ecb884053b7c9fc8729b062ef645f401fc7a8afe06a919ff2d9c6c59f357be2538cff6cbc0f0fb771f7be649a17f50275ec33
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
<xsl:template name="cover-page">
|
|
272
272
|
<!-- Cover Page -->
|
|
273
273
|
<xsl:choose>
|
|
274
|
-
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata
|
|
274
|
+
<xsl:when test="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:coverpage-image/mn:image and normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:full-coverpage-replacement) = 'true'">
|
|
275
275
|
<xsl:call-template name="insertCoverPageFullImage"/>
|
|
276
276
|
</xsl:when>
|
|
277
277
|
<xsl:otherwise>
|
|
@@ -693,12 +693,13 @@
|
|
|
693
693
|
<xsl:variable name="root_element">metanorma</xsl:variable>
|
|
694
694
|
|
|
695
695
|
<!---examples: 2013, 2024 -->
|
|
696
|
-
<xsl:variable name="document_scheme" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata
|
|
696
|
+
<xsl:variable name="document_scheme" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:document-scheme)"/>
|
|
697
697
|
|
|
698
698
|
<!-- external parameters -->
|
|
699
699
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
|
700
700
|
<xsl:variable name="images" select="document($svg_images)"/>
|
|
701
701
|
<xsl:param name="basepath"/> <!-- base path for images -->
|
|
702
|
+
<xsl:param name="mn2pdfpath"/> <!-- mn2pdf working directory -->
|
|
702
703
|
<xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
|
|
703
704
|
<xsl:param name="inputxml_filename"/> <!-- input xml file name -->
|
|
704
705
|
<xsl:param name="output_path"/> <!-- output PDF file name -->
|
|
@@ -821,8 +822,6 @@
|
|
|
821
822
|
</title-part>
|
|
822
823
|
<title-part lang="fr">
|
|
823
824
|
</title-part>
|
|
824
|
-
<title-part lang="ru">
|
|
825
|
-
</title-part>
|
|
826
825
|
<title-part lang="zh">第 # 部分:</title-part>
|
|
827
826
|
</xsl:variable>
|
|
828
827
|
<xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
|
|
@@ -864,31 +863,6 @@
|
|
|
864
863
|
<xsl:copy-of select="//mn:metanorma/mn:localized-strings"/>
|
|
865
864
|
</xsl:variable>
|
|
866
865
|
|
|
867
|
-
<xsl:template name="getTitle">
|
|
868
|
-
<xsl:param name="name"/>
|
|
869
|
-
<xsl:param name="lang"/>
|
|
870
|
-
<xsl:variable name="lang_">
|
|
871
|
-
<xsl:choose>
|
|
872
|
-
<xsl:when test="$lang != ''">
|
|
873
|
-
<xsl:value-of select="$lang"/>
|
|
874
|
-
</xsl:when>
|
|
875
|
-
<xsl:otherwise>
|
|
876
|
-
<xsl:call-template name="getLang"/>
|
|
877
|
-
</xsl:otherwise>
|
|
878
|
-
</xsl:choose>
|
|
879
|
-
</xsl:variable>
|
|
880
|
-
<xsl:variable name="language" select="normalize-space($lang_)"/>
|
|
881
|
-
<xsl:variable name="title_" select="$titles/*[local-name() = $name][@lang = $language]"/>
|
|
882
|
-
<xsl:choose>
|
|
883
|
-
<xsl:when test="normalize-space($title_) != ''">
|
|
884
|
-
<xsl:value-of select="$title_"/>
|
|
885
|
-
</xsl:when>
|
|
886
|
-
<xsl:otherwise>
|
|
887
|
-
<xsl:value-of select="$titles/*[local-name() = $name][@lang = 'en']"/>
|
|
888
|
-
</xsl:otherwise>
|
|
889
|
-
</xsl:choose>
|
|
890
|
-
</xsl:template>
|
|
891
|
-
|
|
892
866
|
<!-- Characters -->
|
|
893
867
|
<xsl:variable name="linebreak">
</xsl:variable>
|
|
894
868
|
<xsl:variable name="tab_zh"> </xsl:variable>
|
|
@@ -981,6 +955,22 @@
|
|
|
981
955
|
</xsl:choose>
|
|
982
956
|
</xsl:variable>
|
|
983
957
|
|
|
958
|
+
<xsl:attribute-set name="page-sequence-preface">
|
|
959
|
+
<xsl:attribute name="format">i</xsl:attribute>
|
|
960
|
+
</xsl:attribute-set>
|
|
961
|
+
|
|
962
|
+
<xsl:template name="refine_page-sequence-preface">
|
|
963
|
+
<xsl:param name="layoutVersion"/>
|
|
964
|
+
</xsl:template>
|
|
965
|
+
|
|
966
|
+
<xsl:attribute-set name="page-sequence-main">
|
|
967
|
+
|
|
968
|
+
</xsl:attribute-set>
|
|
969
|
+
|
|
970
|
+
<xsl:template name="refine_page-sequence-main">
|
|
971
|
+
<xsl:param name="layoutVersion"/>
|
|
972
|
+
</xsl:template>
|
|
973
|
+
|
|
984
974
|
<xsl:variable name="font_noto_sans">Noto Sans, Noto Sans HK, Noto Sans JP, Noto Sans KR, Noto Sans SC, Noto Sans TC</xsl:variable>
|
|
985
975
|
<xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
|
|
986
976
|
<xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable>
|
|
@@ -994,8 +984,22 @@
|
|
|
994
984
|
<xsl:param name="root-style"/>
|
|
995
985
|
<xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
|
|
996
986
|
|
|
987
|
+
<xsl:variable name="additional_fonts___">
|
|
988
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:fonts | //mn:metanorma[1]/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'fonts']/mn:value | //mn:metanorma[1]/mn:presentation-metadata[mn:name = 'fonts']/mn:value">
|
|
989
|
+
<font><xsl:value-of select="."/></font>
|
|
990
|
+
</xsl:for-each>
|
|
991
|
+
</xsl:variable>
|
|
992
|
+
<xsl:variable name="additional_fonts__">
|
|
993
|
+
<!-- unique fonts -->
|
|
994
|
+
<xsl:for-each select="xalan:nodeset($additional_fonts___)//font">
|
|
995
|
+
<xsl:choose>
|
|
996
|
+
<xsl:when test="preceding-sibling::font[text() = current()/text()]"><!-- skip --></xsl:when>
|
|
997
|
+
<xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
|
|
998
|
+
</xsl:choose>
|
|
999
|
+
</xsl:for-each>
|
|
1000
|
+
</xsl:variable>
|
|
997
1001
|
<xsl:variable name="additional_fonts_">
|
|
998
|
-
<xsl:for-each select="
|
|
1002
|
+
<xsl:for-each select="xalan:nodeset($additional_fonts__)//font">
|
|
999
1003
|
<xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
|
|
1000
1004
|
</xsl:for-each>
|
|
1001
1005
|
</xsl:variable>
|
|
@@ -2614,9 +2618,129 @@
|
|
|
2614
2618
|
<xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
|
|
2615
2619
|
|
|
2616
2620
|
<xsl:template match="*[local-name() = 'property']" mode="css">
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2621
|
+
<!-- don't delete leading and trailing spaces -->
|
|
2622
|
+
<!-- the list from https://www.data2type.de/en/xml-xslt-xslfo/xsl-fo/xsl-fo-introduction/blocks -->
|
|
2623
|
+
<xsl:variable name="allowed_attributes_">
|
|
2624
|
+
<xsl:text>
|
|
2625
|
+
background-attachment
|
|
2626
|
+
background-color
|
|
2627
|
+
background-image
|
|
2628
|
+
background-position-horizontal
|
|
2629
|
+
background-position-vertical
|
|
2630
|
+
background-repeat
|
|
2631
|
+
border
|
|
2632
|
+
border-after-color
|
|
2633
|
+
border-after-style
|
|
2634
|
+
border-after-width
|
|
2635
|
+
border-before-color
|
|
2636
|
+
border-before-style
|
|
2637
|
+
border-before-width
|
|
2638
|
+
border-bottom-color
|
|
2639
|
+
border-bottom-style
|
|
2640
|
+
border-bottom-width
|
|
2641
|
+
border-color
|
|
2642
|
+
border-end-color
|
|
2643
|
+
border-end-style
|
|
2644
|
+
border-end-width
|
|
2645
|
+
border-left-color
|
|
2646
|
+
border-left-style
|
|
2647
|
+
border-left-width
|
|
2648
|
+
border-right-color
|
|
2649
|
+
border-right-style
|
|
2650
|
+
border-right-width
|
|
2651
|
+
border-start-color
|
|
2652
|
+
border-start-style
|
|
2653
|
+
border-start-width
|
|
2654
|
+
border-style
|
|
2655
|
+
border-top-color
|
|
2656
|
+
border-top-style
|
|
2657
|
+
border-top-width
|
|
2658
|
+
border-width
|
|
2659
|
+
break-after
|
|
2660
|
+
break-before
|
|
2661
|
+
color
|
|
2662
|
+
country
|
|
2663
|
+
end-indent
|
|
2664
|
+
font-family
|
|
2665
|
+
font-model
|
|
2666
|
+
font-selection-strategy
|
|
2667
|
+
font-size
|
|
2668
|
+
font-size-adjust
|
|
2669
|
+
font-stretch
|
|
2670
|
+
font-style
|
|
2671
|
+
font-variant
|
|
2672
|
+
font-weight
|
|
2673
|
+
hyphenate
|
|
2674
|
+
hyphenation-character
|
|
2675
|
+
hyphenation-keep
|
|
2676
|
+
hyphenation-ladder-count
|
|
2677
|
+
hyphenation-push-character-count
|
|
2678
|
+
hyphenation-remain-character-count
|
|
2679
|
+
id
|
|
2680
|
+
intrusion-displace
|
|
2681
|
+
keep-together
|
|
2682
|
+
keep-with-next
|
|
2683
|
+
keep-with-previous
|
|
2684
|
+
language
|
|
2685
|
+
last-line-end-indent
|
|
2686
|
+
line-height
|
|
2687
|
+
line-height-shift-adjustment
|
|
2688
|
+
line-stacking-strategy
|
|
2689
|
+
linefeed-treatment
|
|
2690
|
+
margin
|
|
2691
|
+
margin-bottom
|
|
2692
|
+
margin-left
|
|
2693
|
+
margin-right
|
|
2694
|
+
margin-top
|
|
2695
|
+
orphans
|
|
2696
|
+
padding
|
|
2697
|
+
padding-after
|
|
2698
|
+
padding-before
|
|
2699
|
+
padding-bottom
|
|
2700
|
+
padding-end
|
|
2701
|
+
padding-left
|
|
2702
|
+
padding-right
|
|
2703
|
+
pause-after
|
|
2704
|
+
padding-start
|
|
2705
|
+
padding-top
|
|
2706
|
+
reference-orientation
|
|
2707
|
+
relative-position
|
|
2708
|
+
richness
|
|
2709
|
+
role
|
|
2710
|
+
script
|
|
2711
|
+
source-document
|
|
2712
|
+
space-after
|
|
2713
|
+
space-before
|
|
2714
|
+
span
|
|
2715
|
+
start-indent
|
|
2716
|
+
text-align
|
|
2717
|
+
text-align-last
|
|
2718
|
+
text-altitude
|
|
2719
|
+
text-depth
|
|
2720
|
+
text-indent
|
|
2721
|
+
visibility
|
|
2722
|
+
white-space-collapse
|
|
2723
|
+
white-space-treatment
|
|
2724
|
+
widows
|
|
2725
|
+
wrap-option
|
|
2726
|
+
</xsl:text>
|
|
2727
|
+
</xsl:variable>
|
|
2728
|
+
<xsl:variable name="allowed_attributes" select="concat(' ', normalize-space($allowed_attributes_), ' ')"/>
|
|
2729
|
+
<xsl:choose>
|
|
2730
|
+
<xsl:when test="contains($allowed_attributes, concat(' ', @name, ' '))">
|
|
2731
|
+
<xsl:attribute name="{@name}">
|
|
2732
|
+
<xsl:value-of select="@value"/>
|
|
2733
|
+
</xsl:attribute>
|
|
2734
|
+
</xsl:when>
|
|
2735
|
+
<xsl:when test="@name = 'border-radius'">
|
|
2736
|
+
<xsl:attribute name="fox:border-radius">
|
|
2737
|
+
<xsl:value-of select="@value"/>
|
|
2738
|
+
</xsl:attribute>
|
|
2739
|
+
</xsl:when>
|
|
2740
|
+
<xsl:otherwise>
|
|
2741
|
+
<!-- skip -->
|
|
2742
|
+
</xsl:otherwise>
|
|
2743
|
+
</xsl:choose>
|
|
2620
2744
|
</xsl:template>
|
|
2621
2745
|
|
|
2622
2746
|
<xsl:template name="get_sourcecode_attributes">
|
|
@@ -2653,11 +2777,12 @@
|
|
|
2653
2777
|
|
|
2654
2778
|
<xsl:choose>
|
|
2655
2779
|
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
|
2656
|
-
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
|
2657
|
-
<xsl:attribute name="{
|
|
2780
|
+
<!-- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
|
2781
|
+
<xsl:attribute name="{name()}">
|
|
2658
2782
|
<xsl:value-of select="."/>
|
|
2659
2783
|
</xsl:attribute>
|
|
2660
|
-
</xsl:for-each>
|
|
2784
|
+
</xsl:for-each> -->
|
|
2785
|
+
<xsl:copy-of select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*"/>
|
|
2661
2786
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
2662
2787
|
</xsl:when>
|
|
2663
2788
|
|
|
@@ -2675,11 +2800,12 @@
|
|
|
2675
2800
|
|
|
2676
2801
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
2677
2802
|
|
|
2678
|
-
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
|
2679
|
-
<xsl:attribute name="{
|
|
2803
|
+
<!-- <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
|
2804
|
+
<xsl:attribute name="{name()}">
|
|
2680
2805
|
<xsl:value-of select="."/>
|
|
2681
2806
|
</xsl:attribute>
|
|
2682
|
-
</xsl:for-each>
|
|
2807
|
+
</xsl:for-each> -->
|
|
2808
|
+
<xsl:copy-of select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*"/>
|
|
2683
2809
|
|
|
2684
2810
|
<xsl:call-template name="refine_sourcecode-style"/>
|
|
2685
2811
|
|
|
@@ -2689,10 +2815,10 @@
|
|
|
2689
2815
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
|
2690
2816
|
</xsl:if>
|
|
2691
2817
|
|
|
2692
|
-
<xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl)]"/>
|
|
2818
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name or self::mn:dl or self::mn:key)]"/>
|
|
2693
2819
|
</fo:block>
|
|
2694
2820
|
|
|
2695
|
-
<xsl:apply-templates select="mn:dl"/> <!-- Key table -->
|
|
2821
|
+
<xsl:apply-templates select="mn:dl | mn:key"/> <!-- Key table -->
|
|
2696
2822
|
|
|
2697
2823
|
<!-- <xsl:choose>
|
|
2698
2824
|
<xsl:when test="$namespace = 'rsd'"></xsl:when>
|
|
@@ -2790,7 +2916,7 @@
|
|
|
2790
2916
|
</xsl:for-each>
|
|
2791
2917
|
</xsl:variable>
|
|
2792
2918
|
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*[not(starts-with(local-name(), 'margin-') or starts-with(local-name(), 'space-'))]">
|
|
2793
|
-
<xsl:attribute name="{
|
|
2919
|
+
<xsl:attribute name="{name()}">
|
|
2794
2920
|
<xsl:value-of select="."/>
|
|
2795
2921
|
</xsl:attribute>
|
|
2796
2922
|
</xsl:for-each>
|
|
@@ -3958,6 +4084,12 @@
|
|
|
3958
4084
|
<xsl:template name="refine_term-style">
|
|
3959
4085
|
</xsl:template>
|
|
3960
4086
|
|
|
4087
|
+
<xsl:attribute-set name="term-kind-style">
|
|
4088
|
+
</xsl:attribute-set>
|
|
4089
|
+
|
|
4090
|
+
<xsl:template name="refine_term-kind-style">
|
|
4091
|
+
</xsl:template>
|
|
4092
|
+
|
|
3961
4093
|
<xsl:attribute-set name="term-number-style">
|
|
3962
4094
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3963
4095
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
@@ -4935,7 +5067,7 @@
|
|
|
4935
5067
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
|
4936
5068
|
</xsl:when>
|
|
4937
5069
|
<xsl:otherwise>
|
|
4938
|
-
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
|
5070
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name) and not(self::mn:note) and not(self::mn:example) and not(self::mn:dl) and not(self::mn:key) and not(self::mn:fmt-source) and not(self::mn:p) and not(self::mn:thead) and not(self::mn:tfoot) and not(self::mn:fmt-footnote-container)]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
|
4939
5071
|
</xsl:otherwise>
|
|
4940
5072
|
</xsl:choose>
|
|
4941
5073
|
|
|
@@ -5508,7 +5640,7 @@
|
|
|
5508
5640
|
<xsl:param name="colwidths"/>
|
|
5509
5641
|
<xsl:param name="colgroup"/>
|
|
5510
5642
|
|
|
5511
|
-
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
|
|
5643
|
+
<xsl:variable name="isNoteOrFnExist" select="../mn:note[not(@type = 'units')] or ../mn:example or ../mn:dl or ../mn:key or ..//mn:fn[not(parent::mn:fmt-name)] or ../mn:fmt-source or ../mn:p"/>
|
|
5512
5644
|
|
|
5513
5645
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
|
5514
5646
|
</xsl:variable>
|
|
@@ -5591,7 +5723,7 @@
|
|
|
5591
5723
|
|
|
5592
5724
|
<!-- fn will be processed inside 'note' processing -->
|
|
5593
5725
|
<xsl:apply-templates select="../mn:p"/>
|
|
5594
|
-
<xsl:apply-templates select="../mn:dl"/>
|
|
5726
|
+
<xsl:apply-templates select="../mn:dl | ../mn:key"/>
|
|
5595
5727
|
<xsl:apply-templates select="../mn:note[not(@type = 'units')]"/>
|
|
5596
5728
|
<xsl:apply-templates select="../mn:example"/>
|
|
5597
5729
|
<xsl:apply-templates select="../mn:fmt-source"/>
|
|
@@ -6906,7 +7038,7 @@
|
|
|
6906
7038
|
</xsl:attribute-set>
|
|
6907
7039
|
|
|
6908
7040
|
<xsl:template name="refine_dl-block-style">
|
|
6909
|
-
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
|
7041
|
+
<xsl:if test="(@key = 'true' or ancestor::mn:key) and ancestor::mn:figure">
|
|
6910
7042
|
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
|
6911
7043
|
</xsl:if>
|
|
6912
7044
|
</xsl:template>
|
|
@@ -7014,15 +7146,15 @@
|
|
|
7014
7146
|
<fo:block-container margin-left="0mm" role="SKIP">
|
|
7015
7147
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
7016
7148
|
|
|
7017
|
-
<xsl:variable name="parent" select="local-name(
|
|
7149
|
+
<xsl:variable name="parent" select="local-name(../..)"/>
|
|
7018
7150
|
|
|
7019
7151
|
<xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
|
|
7020
7152
|
</xsl:variable>
|
|
7021
7153
|
|
|
7022
|
-
<xsl:variable name="
|
|
7154
|
+
<xsl:variable name="onlyOneFormulaKeyItem" select="normalize-space($parent = 'formula' and count(mn:dt) = 1)"/>
|
|
7023
7155
|
|
|
7024
7156
|
<xsl:choose>
|
|
7025
|
-
<xsl:when test="$
|
|
7157
|
+
<xsl:when test="$onlyOneFormulaKeyItem = 'true'"> <!-- only one component -->
|
|
7026
7158
|
<fo:block margin-bottom="12pt" text-align="left">
|
|
7027
7159
|
<!-- <xsl:variable name="title-where">
|
|
7028
7160
|
<xsl:call-template name="getLocalizedString">
|
|
@@ -7030,7 +7162,7 @@
|
|
|
7030
7162
|
</xsl:call-template>
|
|
7031
7163
|
</xsl:variable>
|
|
7032
7164
|
<xsl:value-of select="$title-where"/> -->
|
|
7033
|
-
<xsl:apply-templates select="preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
|
|
7165
|
+
<xsl:apply-templates select="ancestor::mn:key/preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
|
|
7034
7166
|
<xsl:text> </xsl:text>
|
|
7035
7167
|
<xsl:apply-templates select="mn:dt/*"/>
|
|
7036
7168
|
<xsl:if test="mn:dd/node()[normalize-space() != ''][1][self::text()]">
|
|
@@ -7051,15 +7183,16 @@
|
|
|
7051
7183
|
</xsl:variable>
|
|
7052
7184
|
<xsl:value-of select="$title-where"/><xsl:if test="$namespace = 'bsi' or $namespace = 'itu'">:</xsl:if> -->
|
|
7053
7185
|
<!-- preceding 'p' with word 'where' -->
|
|
7054
|
-
<xsl:apply-templates select="preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
|
|
7186
|
+
<!-- <xsl:apply-templates select="preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/> -->
|
|
7187
|
+
<xsl:apply-templates select="ancestor::mn:key/preceding-sibling::*[1][self::mn:p and @keep-with-next = 'true']/node()"/>
|
|
7055
7188
|
</fo:block>
|
|
7056
7189
|
</xsl:when> <!-- END: a few components -->
|
|
7057
7190
|
<xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
|
|
7058
7191
|
<!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
|
|
7059
|
-
<xsl:if test="not(preceding-sibling::*[1][self::mn:p and @keep-with-next])"> <!-- for old Presentation XML -->
|
|
7192
|
+
<xsl:if test="not(preceding-sibling::*[1][self::mn:p and @keep-with-next]) and 1 = 2"> <!-- for old Presentation XML -->
|
|
7060
7193
|
<fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
|
|
7061
7194
|
|
|
7062
|
-
<xsl:call-template name="
|
|
7195
|
+
<xsl:call-template name="refine_figure-key-name-style"/>
|
|
7063
7196
|
|
|
7064
7197
|
<xsl:variable name="title-key">
|
|
7065
7198
|
<xsl:call-template name="getLocalizedString">
|
|
@@ -7073,7 +7206,7 @@
|
|
|
7073
7206
|
</xsl:choose>
|
|
7074
7207
|
|
|
7075
7208
|
<!-- a few components -->
|
|
7076
|
-
<xsl:if test="$
|
|
7209
|
+
<xsl:if test="$onlyOneFormulaKeyItem = 'false'">
|
|
7077
7210
|
<fo:block role="SKIP">
|
|
7078
7211
|
|
|
7079
7212
|
<xsl:call-template name="refine_multicomponent_style"/>
|
|
@@ -7086,7 +7219,7 @@
|
|
|
7086
7219
|
|
|
7087
7220
|
<xsl:call-template name="refine_multicomponent_block_style"/>
|
|
7088
7221
|
|
|
7089
|
-
<xsl:apply-templates select="mn:fmt-name">
|
|
7222
|
+
<xsl:apply-templates select="mn:fmt-name | parent::mn:key[parent::mn:table]/mn:name">
|
|
7090
7223
|
<xsl:with-param name="process">true</xsl:with-param>
|
|
7091
7224
|
</xsl:apply-templates>
|
|
7092
7225
|
|
|
@@ -7261,11 +7394,11 @@
|
|
|
7261
7394
|
</xsl:template> <!-- refine_dl_formula_where_style -->
|
|
7262
7395
|
|
|
7263
7396
|
<xsl:template name="refine_multicomponent_style">
|
|
7264
|
-
<xsl:variable name="parent" select="local-name(
|
|
7397
|
+
<xsl:variable name="parent" select="local-name(../..)"/>
|
|
7265
7398
|
</xsl:template> <!-- refine_multicomponent_style -->
|
|
7266
7399
|
|
|
7267
7400
|
<xsl:template name="refine_multicomponent_block_style">
|
|
7268
|
-
<xsl:variable name="parent" select="local-name(
|
|
7401
|
+
<xsl:variable name="parent" select="local-name(../..)"/>
|
|
7269
7402
|
</xsl:template> <!-- refine_multicomponent_block_style -->
|
|
7270
7403
|
|
|
7271
7404
|
<!-- dl/name -->
|
|
@@ -8273,6 +8406,18 @@
|
|
|
8273
8406
|
</xsl:if>
|
|
8274
8407
|
</xsl:template>
|
|
8275
8408
|
|
|
8409
|
+
<xsl:attribute-set name="figure-key-name-style">
|
|
8410
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
|
8411
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
8412
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
8413
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
8414
|
+
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
|
8415
|
+
</xsl:attribute-set> <!-- figure-key-name-style -->
|
|
8416
|
+
|
|
8417
|
+
<xsl:template name="refine_figure-key-name-style">
|
|
8418
|
+
|
|
8419
|
+
</xsl:template> <!-- refine_figure-key-name-style -->
|
|
8420
|
+
|
|
8276
8421
|
<!-- ============================ -->
|
|
8277
8422
|
<!-- figure's footnotes rendering -->
|
|
8278
8423
|
<!-- ============================ -->
|
|
@@ -8435,7 +8580,7 @@
|
|
|
8435
8580
|
<!-- added for https://github.com/metanorma/isodoc/issues/607 -->
|
|
8436
8581
|
<!-- figure's footnote label -->
|
|
8437
8582
|
<!-- figure/dl[@key = 'true']/dt/p/sup -->
|
|
8438
|
-
<xsl:template match="mn:figure/mn:dl[@key = 'true']/mn:dt/ mn:p[count(node()[normalize-space() != '']) = 1]/mn:sup" priority="3">
|
|
8583
|
+
<xsl:template match="mn:figure/mn:dl[@key = 'true']/mn:dt/ mn:p[count(node()[normalize-space() != '']) = 1]/mn:sup | mn:figure/mn:key/mn:dl/mn:dt/ mn:p[count(node()[normalize-space() != '']) = 1]/mn:sup" priority="3">
|
|
8439
8584
|
<xsl:variable name="key_iso">
|
|
8440
8585
|
</xsl:variable>
|
|
8441
8586
|
<xsl:if test="normalize-space($key_iso) = 'true'">
|
|
@@ -8453,16 +8598,13 @@
|
|
|
8453
8598
|
<!-- ============================ -->
|
|
8454
8599
|
|
|
8455
8600
|
<!-- caption for figure key and another caption, https://github.com/metanorma/isodoc/issues/607 -->
|
|
8456
|
-
<xsl:template match="mn:figure/mn:p[@keep-with-next = 'true' and mn:strong]" priority="3">
|
|
8457
|
-
<fo:block
|
|
8458
|
-
<xsl:call-template name="
|
|
8601
|
+
<xsl:template match="mn:figure/mn:p[@keep-with-next = 'true' and mn:strong] | mn:figure/mn:key/mn:name" priority="3">
|
|
8602
|
+
<fo:block xsl:use-attribute-sets="figure-key-name-style">
|
|
8603
|
+
<xsl:call-template name="refine_figure-key-name-style"/>
|
|
8459
8604
|
<xsl:apply-templates/>
|
|
8460
8605
|
</fo:block>
|
|
8461
8606
|
</xsl:template>
|
|
8462
8607
|
|
|
8463
|
-
<xsl:template name="refine_figure_key_style">
|
|
8464
|
-
</xsl:template> <!-- refine_figure_key_style -->
|
|
8465
|
-
|
|
8466
8608
|
<!-- ====== -->
|
|
8467
8609
|
<!-- figure -->
|
|
8468
8610
|
<!-- image -->
|
|
@@ -8775,9 +8917,15 @@
|
|
|
8775
8917
|
<xsl:otherwise>
|
|
8776
8918
|
<xsl:variable name="src_with_basepath" select="concat($basepath, @src)"/>
|
|
8777
8919
|
<xsl:variable name="file_exists" select="normalize-space(java:exists(java:java.io.File.new($src_with_basepath)))"/>
|
|
8920
|
+
<xsl:variable name="src_with_mn2pdfpath" select="concat($mn2pdfpath, @src)"/>
|
|
8921
|
+
<xsl:variable name="file_exists_in_mn2pdf_path" select="normalize-space(java:exists(java:java.io.File.new($src_with_mn2pdfpath)))"/>
|
|
8778
8922
|
<xsl:choose>
|
|
8779
8923
|
<xsl:when test="$file_exists = 'true'">
|
|
8780
|
-
<xsl:value-of select="$src_with_basepath"/>
|
|
8924
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.getURIFromPath($src_with_basepath)"/>
|
|
8925
|
+
</xsl:when>
|
|
8926
|
+
<xsl:when test="$file_exists_in_mn2pdf_path = 'true'">
|
|
8927
|
+
<!-- <xsl:value-of select="$src_with_mn2pdfpath"/> -->
|
|
8928
|
+
<xsl:value-of select="java:org.metanorma.fop.Util.getURIFromPath($src_with_mn2pdfpath)"/>
|
|
8781
8929
|
</xsl:when>
|
|
8782
8930
|
<xsl:otherwise>
|
|
8783
8931
|
<xsl:value-of select="@src"/>
|
|
@@ -8891,7 +9039,9 @@
|
|
|
8891
9039
|
<!-- =================== -->
|
|
8892
9040
|
<!-- SVG images processing -->
|
|
8893
9041
|
<!-- =================== -->
|
|
8894
|
-
<xsl:variable name="
|
|
9042
|
+
<xsl:variable name="figure_name_height_">14
|
|
9043
|
+
</xsl:variable>
|
|
9044
|
+
<xsl:variable name="figure_name_height" select="number(normalize-space($figure_name_height_))"/>
|
|
8895
9045
|
<xsl:variable name="width_effective" select="$pageWidth - $marginLeftRight1 - $marginLeftRight2"/><!-- paper width minus margins -->
|
|
8896
9046
|
<xsl:variable name="height_effective" select="$pageHeight - $marginTop - $marginBottom - $figure_name_height"/><!-- paper height minus margins and title height -->
|
|
8897
9047
|
<xsl:variable name="image_dpi" select="96"/>
|
|
@@ -9091,6 +9241,17 @@
|
|
|
9091
9241
|
</xsl:if>
|
|
9092
9242
|
|
|
9093
9243
|
<xsl:copy-of select="$svg_content"/>
|
|
9244
|
+
|
|
9245
|
+
<!-- <debug>
|
|
9246
|
+
<svg_width><xsl:value-of select="$svg_width"/></svg_width>
|
|
9247
|
+
<width_effective_px><xsl:value-of select="$width_effective_px"/></width_effective_px>
|
|
9248
|
+
<scale_x><xsl:value-of select="$scale_x"/></scale_x>
|
|
9249
|
+
<svg_height><xsl:value-of select="$svg_height"/></svg_height>
|
|
9250
|
+
<height_effective_px><xsl:value-of select="$height_effective_px"/></height_effective_px>
|
|
9251
|
+
<isPrecedingTitle><xsl:value-of select="$isPrecedingTitle"/></isPrecedingTitle>
|
|
9252
|
+
<scale_y><xsl:value-of select="$scale_y"/></scale_y>
|
|
9253
|
+
</debug> -->
|
|
9254
|
+
|
|
9094
9255
|
</fo:instream-foreign-object>
|
|
9095
9256
|
<!-- </fo:block> -->
|
|
9096
9257
|
</xsl:copy>
|
|
@@ -9224,10 +9385,12 @@
|
|
|
9224
9385
|
</xsl:for-each>
|
|
9225
9386
|
</xsl:template>
|
|
9226
9387
|
|
|
9227
|
-
<
|
|
9228
|
-
|
|
9388
|
+
<!-- <p id="."><image id="" src="..." mimetype="image/svg+xml" height="auto" width="auto"/></p> -->
|
|
9389
|
+
<xsl:template match="mn:figure/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]] | *[not(self::mn:figure)]/mn:image[@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))] and count(node()) = 0]" priority="2">
|
|
9390
|
+
<xsl:variable name="src"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
|
|
9391
|
+
<xsl:variable name="svg_content" select="document($src)"/>
|
|
9229
9392
|
<xsl:variable name="name" select="ancestor::mn:figure/mn:fmt-name"/>
|
|
9230
|
-
<xsl:for-each select="xalan:nodeset($svg_content)
|
|
9393
|
+
<xsl:for-each select="xalan:nodeset($svg_content)/*"> <!-- node() -->
|
|
9231
9394
|
<xsl:call-template name="image_svg">
|
|
9232
9395
|
<xsl:with-param name="name" select="$name"/>
|
|
9233
9396
|
</xsl:call-template>
|
|
@@ -9501,7 +9664,7 @@
|
|
|
9501
9664
|
<!-- ====== -->
|
|
9502
9665
|
|
|
9503
9666
|
<!-- ignore 'p' with 'where' in formula, before 'dl' -->
|
|
9504
|
-
<xsl:template match="mn:formula/*[self::mn:p and @keep-with-next = 'true' and following-sibling::*[1][self::mn:dl]]"/>
|
|
9667
|
+
<xsl:template match="mn:formula/*[self::mn:p and @keep-with-next = 'true' and following-sibling::*[1][self::mn:dl or self::mn:key]]"/>
|
|
9505
9668
|
|
|
9506
9669
|
<!-- ======================================= -->
|
|
9507
9670
|
<!-- math -->
|
|
@@ -10239,6 +10402,12 @@
|
|
|
10239
10402
|
<!-- END Lists processing -->
|
|
10240
10403
|
<!-- ===================================== -->
|
|
10241
10404
|
|
|
10405
|
+
<xsl:attribute-set name="footnote-separator-block-style">
|
|
10406
|
+
</xsl:attribute-set>
|
|
10407
|
+
|
|
10408
|
+
<xsl:template name="refine_footnote-separator-block-style">
|
|
10409
|
+
</xsl:template>
|
|
10410
|
+
|
|
10242
10411
|
<xsl:attribute-set name="footnote-separator-leader-style">
|
|
10243
10412
|
</xsl:attribute-set>
|
|
10244
10413
|
|
|
@@ -10777,7 +10946,7 @@
|
|
|
10777
10946
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
|
10778
10947
|
</xsl:call-template>
|
|
10779
10948
|
</fo:block>
|
|
10780
|
-
<xsl:call-template name="
|
|
10949
|
+
<xsl:call-template name="processFormattedrefNotes"/>
|
|
10781
10950
|
</fo:list-item-body>
|
|
10782
10951
|
</fo:list-item>
|
|
10783
10952
|
</xsl:otherwise>
|
|
@@ -10798,10 +10967,19 @@
|
|
|
10798
10967
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
|
10799
10968
|
</xsl:apply-templates>
|
|
10800
10969
|
<xsl:apply-templates select="mn:formattedref"/>
|
|
10801
|
-
<xsl:call-template name="
|
|
10970
|
+
<xsl:call-template name="processFormattedrefNotes"/>
|
|
10802
10971
|
<!-- end bibitem processing -->
|
|
10803
10972
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
|
10804
10973
|
|
|
10974
|
+
<!-- note at the end of formattedref, will be processed in processFormattedrefNotes -->
|
|
10975
|
+
<xsl:template match="mn:formattedref/mn:note[not(following-sibling::node()[normalize-space() != '' and not(self::mn:note)])]"/>
|
|
10976
|
+
|
|
10977
|
+
<xsl:template name="processFormattedrefNotes">
|
|
10978
|
+
<xsl:for-each select="mn:formattedref/mn:note[not(following-sibling::node()[normalize-space() != '' and not(self::mn:note)])]">
|
|
10979
|
+
<xsl:call-template name="note"/>
|
|
10980
|
+
</xsl:for-each>
|
|
10981
|
+
</xsl:template>
|
|
10982
|
+
|
|
10805
10983
|
<xsl:template name="processBibitemFollowingNotes">
|
|
10806
10984
|
<!-- current context is bibitem element -->
|
|
10807
10985
|
<xsl:variable name="bibitem_id" select="@id"/>
|
|
@@ -12173,8 +12351,8 @@
|
|
|
12173
12351
|
|
|
12174
12352
|
<xsl:variable name="toc_level">
|
|
12175
12353
|
<!-- https://www.metanorma.org/author/ref/document-attributes/ -->
|
|
12176
|
-
<xsl:variable name="pdftoclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata
|
|
12177
|
-
<xsl:variable name="toclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata
|
|
12354
|
+
<xsl:variable name="pdftoclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata/mn:pdf-toc-heading-levels)"/> <!-- :toclevels-pdf Number of table of contents levels to render in PDF output; used to override :toclevels:-->
|
|
12355
|
+
<xsl:variable name="toclevels" select="normalize-space(//mn:metanorma-extension/mn:presentation-metadata/mn:toc-heading-levels)"/> <!-- Number of table of contents levels to render -->
|
|
12178
12356
|
<xsl:choose>
|
|
12179
12357
|
<xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
|
|
12180
12358
|
<xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
|
|
@@ -12730,6 +12908,35 @@
|
|
|
12730
12908
|
<xsl:attribute name="role">H<xsl:value-of select="$level"/></xsl:attribute>
|
|
12731
12909
|
</xsl:template> <!-- refine_title-style -->
|
|
12732
12910
|
|
|
12911
|
+
<xsl:attribute-set name="key-style">
|
|
12912
|
+
|
|
12913
|
+
</xsl:attribute-set>
|
|
12914
|
+
|
|
12915
|
+
<xsl:template name="refine_key-style">
|
|
12916
|
+
|
|
12917
|
+
</xsl:template>
|
|
12918
|
+
|
|
12919
|
+
<xsl:attribute-set name="key-name-style" use-attribute-sets="dl-name-style">
|
|
12920
|
+
|
|
12921
|
+
</xsl:attribute-set>
|
|
12922
|
+
|
|
12923
|
+
<xsl:template name="refine_key-name-style">
|
|
12924
|
+
</xsl:template>
|
|
12925
|
+
|
|
12926
|
+
<xsl:template match="mn:key">
|
|
12927
|
+
<xsl:apply-templates/>
|
|
12928
|
+
</xsl:template>
|
|
12929
|
+
|
|
12930
|
+
<xsl:template match="mn:key/mn:name">
|
|
12931
|
+
<xsl:param name="process">false</xsl:param>
|
|
12932
|
+
<xsl:if test="$process = 'true'">
|
|
12933
|
+
<fo:block xsl:use-attribute-sets="key-name-style">
|
|
12934
|
+
<xsl:call-template name="refine_key-name-style"/>
|
|
12935
|
+
<xsl:apply-templates/>
|
|
12936
|
+
</fo:block>
|
|
12937
|
+
</xsl:if>
|
|
12938
|
+
</xsl:template>
|
|
12939
|
+
|
|
12733
12940
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
12734
12941
|
<xsl:param name="num"/>
|
|
12735
12942
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -13904,6 +14111,23 @@
|
|
|
13904
14111
|
<xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//mn:p[1]/@id"/>
|
|
13905
14112
|
</xsl:template>
|
|
13906
14113
|
|
|
14114
|
+
<xsl:template name="getDoctype">
|
|
14115
|
+
<xsl:variable name="doctype_alias" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias)"/>
|
|
14116
|
+
<xsl:value-of select="$doctype_alias"/>
|
|
14117
|
+
<xsl:if test="$doctype_alias = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/></xsl:if>
|
|
14118
|
+
</xsl:template>
|
|
14119
|
+
|
|
14120
|
+
<xsl:template name="getDoctypeTitle">
|
|
14121
|
+
<xsl:variable name="doctype_i18n" select="normalize-space(/mn:metanorma/mn:bibdata/mn:ext/mn:doctype[@language = $lang])"/>
|
|
14122
|
+
<xsl:value-of select="$doctype_i18n"/>
|
|
14123
|
+
<xsl:if test="$doctype_i18n = ''">
|
|
14124
|
+
<xsl:variable name="doctype"><xsl:call-template name="getDoctype"/></xsl:variable>
|
|
14125
|
+
<xsl:call-template name="capitalizeWords">
|
|
14126
|
+
<xsl:with-param name="str" select="$doctype"/>
|
|
14127
|
+
</xsl:call-template>
|
|
14128
|
+
</xsl:if>
|
|
14129
|
+
</xsl:template>
|
|
14130
|
+
|
|
13907
14131
|
<xsl:template name="setId">
|
|
13908
14132
|
<xsl:param name="prefix"/>
|
|
13909
14133
|
<xsl:attribute name="id">
|
|
@@ -13933,7 +14157,7 @@
|
|
|
13933
14157
|
<xsl:template name="setNamedDestination">
|
|
13934
14158
|
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
13935
14159
|
<!-- skip GUID, e.g. _33eac3cb-9663-4291-ae26-1d4b6f4635fc -->
|
|
13936
|
-
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}')) = 'false'">
|
|
14160
|
+
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
13937
14161
|
<fox:destination internal-destination="{@id}"/>
|
|
13938
14162
|
</xsl:if>
|
|
13939
14163
|
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
@@ -14153,7 +14377,7 @@
|
|
|
14153
14377
|
<!-- background image -->
|
|
14154
14378
|
<fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
|
|
14155
14379
|
<fo:block>
|
|
14156
|
-
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[
|
|
14380
|
+
<xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image[$num]">
|
|
14157
14381
|
|
|
14158
14382
|
<xsl:call-template name="insertPageImage"/>
|
|
14159
14383
|
|
|
@@ -14165,7 +14389,7 @@
|
|
|
14165
14389
|
<!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
|
|
14166
14390
|
<xsl:template name="insertCoverPageFullImage">
|
|
14167
14391
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
14168
|
-
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[
|
|
14392
|
+
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
14169
14393
|
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
14170
14394
|
<fo:flow flow-name="xsl-region-body">
|
|
14171
14395
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
@@ -14718,4 +14942,11 @@
|
|
|
14718
14942
|
<!-- END: mode="set_table_role_skip" -->
|
|
14719
14943
|
<!-- ============================================= -->
|
|
14720
14944
|
|
|
14945
|
+
<xsl:variable name="svg_empty">
|
|
14946
|
+
<!-- empty -->
|
|
14947
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
14948
|
+
<rect x="0" y="0" width="2" height="2" style="fill:#fff;fill-opacity:0;stroke:none"/>
|
|
14949
|
+
</svg>
|
|
14950
|
+
</xsl:variable>
|
|
14951
|
+
|
|
14721
14952
|
</xsl:stylesheet>
|
data/lib/isodoc/cc/html/cc.css
CHANGED
|
@@ -745,6 +745,11 @@ table.MsoISOTable td, table.MsoISOTableBig td {
|
|
|
745
745
|
padding: 0cm 2.85pt 0cm 2.85pt;
|
|
746
746
|
}
|
|
747
747
|
|
|
748
|
+
table.MsoNormalTable th, table.MsoNormalTable td {
|
|
749
|
+
border: none;
|
|
750
|
+
mso-border-alt: none;
|
|
751
|
+
}
|
|
752
|
+
|
|
748
753
|
table.MsoISOTable p, table.MsoISOTableBig p {
|
|
749
754
|
font-size: {{smallerfontsize}};
|
|
750
755
|
}
|
data/lib/isodoc/cc/html/cc.scss
CHANGED
|
@@ -667,6 +667,10 @@ table.MsoISOTable td, table.MsoISOTableBig td
|
|
|
667
667
|
{border:solid windowtext 1pt;
|
|
668
668
|
mso-border-alt:solid windowtext 1pt;
|
|
669
669
|
padding:0cm 2.85pt 0cm 2.85pt;}
|
|
670
|
+
table.MsoNormalTable th, table.MsoNormalTable td {
|
|
671
|
+
border: none;
|
|
672
|
+
mso-border-alt: none;
|
|
673
|
+
}
|
|
670
674
|
table.MsoISOTable p, table.MsoISOTableBig p
|
|
671
675
|
{font-size:$smallerfontsize; }
|
|
672
676
|
table.MsoTableGrid
|
|
@@ -911,7 +911,7 @@ main li {
|
|
|
911
911
|
}
|
|
912
912
|
|
|
913
913
|
/* Bibliograhy */
|
|
914
|
-
p.Biblio, p.NormRef {
|
|
914
|
+
p.Biblio, p.NormRef, div.Biblio, div.NormRef {
|
|
915
915
|
margin-top: 1em;
|
|
916
916
|
}
|
|
917
917
|
|
|
@@ -1100,6 +1100,10 @@ table th, table td {
|
|
|
1100
1100
|
table td.header {
|
|
1101
1101
|
font-weight: 400;
|
|
1102
1102
|
}
|
|
1103
|
+
table table.plain, table table.plain th, table table.plain td {
|
|
1104
|
+
border: none !important;
|
|
1105
|
+
font-size: 0.95em;
|
|
1106
|
+
}
|
|
1103
1107
|
|
|
1104
1108
|
p.TableTitle {
|
|
1105
1109
|
text-align: center;
|
data/lib/metanorma/cc/isodoc.rng
CHANGED
|
@@ -167,12 +167,6 @@ Sources are currently only rendered in metanorma-plateau</a:documentation>
|
|
|
167
167
|
</define>
|
|
168
168
|
<define name="DlAttributes">
|
|
169
169
|
<ref name="BlockAttributes"/>
|
|
170
|
-
<optional>
|
|
171
|
-
<attribute name="key">
|
|
172
|
-
<a:documentation>This definition list is the key of a figure or formula</a:documentation>
|
|
173
|
-
<data type="boolean"/>
|
|
174
|
-
</attribute>
|
|
175
|
-
</optional>
|
|
176
170
|
</define>
|
|
177
171
|
<define name="DlBody">
|
|
178
172
|
<optional>
|
|
@@ -311,7 +305,7 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
311
305
|
</ref>
|
|
312
306
|
</optional>
|
|
313
307
|
<choice>
|
|
314
|
-
<a:documentation>Content of the figure
|
|
308
|
+
<a:documentation>Content of the figure</a:documentation>
|
|
315
309
|
<ref name="image">
|
|
316
310
|
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
|
317
311
|
</ref>
|
|
@@ -340,8 +334,8 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
340
334
|
</ref>
|
|
341
335
|
</zeroOrMore>
|
|
342
336
|
<optional>
|
|
343
|
-
<ref name="
|
|
344
|
-
<a:documentation>An
|
|
337
|
+
<ref name="key">
|
|
338
|
+
<a:documentation>An key defining any symbols used in the figure</a:documentation>
|
|
345
339
|
</ref>
|
|
346
340
|
</optional>
|
|
347
341
|
<zeroOrMore>
|
|
@@ -365,7 +359,7 @@ and is intended to be referenced by a callout within the source code</a:document
|
|
|
365
359
|
</ref>
|
|
366
360
|
</optional>
|
|
367
361
|
<choice>
|
|
368
|
-
<a:documentation>Content of the figure
|
|
362
|
+
<a:documentation>Content of the figure</a:documentation>
|
|
369
363
|
<ref name="image-no-id">
|
|
370
364
|
<a:documentation>by default the content of a figure is a media file</a:documentation>
|
|
371
365
|
</ref>
|
|
@@ -429,7 +423,7 @@ in order to be applicable in this standardisation document</a:documentation>
|
|
|
429
423
|
</element>
|
|
430
424
|
</define>
|
|
431
425
|
<define name="sourcecodebody">
|
|
432
|
-
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
|
426
|
+
<a:documentation>The computer code or other such text presented in the block, as a single unformatted string.
|
|
433
427
|
(The string should be treated as pre-formatted text, with whitespace treated as significant)</a:documentation>
|
|
434
428
|
<element name="body">
|
|
435
429
|
<oneOrMore>
|
|
@@ -549,7 +543,7 @@ normative or informative references, some split references into sections organiz
|
|
|
549
543
|
<choice>
|
|
550
544
|
<a:documentation>Table cell contains a block</a:documentation>
|
|
551
545
|
<ref name="paragraph-with-footnote"/>
|
|
552
|
-
<ref name="
|
|
546
|
+
<ref name="key"/>
|
|
553
547
|
<ref name="ul"/>
|
|
554
548
|
<ref name="ol"/>
|
|
555
549
|
<ref name="figure"/>
|
|
@@ -632,8 +626,40 @@ This is done if the footnote reference is already presented in some other form,
|
|
|
632
626
|
<a:documentation>The number of the footnote, used to identify it visually</a:documentation>
|
|
633
627
|
</attribute>
|
|
634
628
|
</define>
|
|
629
|
+
<define name="FormulaBody">
|
|
630
|
+
<ref name="stem">
|
|
631
|
+
<a:documentation>The content of the formula, as a mathematical expression</a:documentation>
|
|
632
|
+
</ref>
|
|
633
|
+
<optional>
|
|
634
|
+
<ref name="key">
|
|
635
|
+
<a:documentation>A key defining any symbols used in the formula</a:documentation>
|
|
636
|
+
</ref>
|
|
637
|
+
</optional>
|
|
638
|
+
<zeroOrMore>
|
|
639
|
+
<ref name="note">
|
|
640
|
+
<a:documentation>Notes whose scope is the current block</a:documentation>
|
|
641
|
+
</ref>
|
|
642
|
+
</zeroOrMore>
|
|
643
|
+
</define>
|
|
635
644
|
</include>
|
|
636
645
|
<!-- end overrides -->
|
|
646
|
+
<define name="key">
|
|
647
|
+
<a:documentation>Key to a table, figure, or formula</a:documentation>
|
|
648
|
+
<element name="key">
|
|
649
|
+
<optional>
|
|
650
|
+
<ref name="tname">
|
|
651
|
+
<a:documentation>optional title of key</a:documentation>
|
|
652
|
+
</ref>
|
|
653
|
+
</optional>
|
|
654
|
+
<oneOrMore>
|
|
655
|
+
<choice>
|
|
656
|
+
<a:documentation>Definition list and/or paragraph content</a:documentation>
|
|
657
|
+
<ref name="dl"/>
|
|
658
|
+
<ref name="paragraph"/>
|
|
659
|
+
</choice>
|
|
660
|
+
</oneOrMore>
|
|
661
|
+
</element>
|
|
662
|
+
</define>
|
|
637
663
|
<define name="TdAttributes" combine="interleave">
|
|
638
664
|
<ref name="RequiredId"/>
|
|
639
665
|
<optional>
|
|
@@ -1042,7 +1068,7 @@ parargaph sources are currently only rendered in metanorma-plateau</a:documentat
|
|
|
1042
1068
|
</optional>
|
|
1043
1069
|
<optional>
|
|
1044
1070
|
<attribute name="custom-charset">
|
|
1045
|
-
<a:documentation>Character set that the contained text belongs to;
|
|
1071
|
+
<a:documentation>Character set that the contained text belongs to;
|
|
1046
1072
|
is used in particular to capture mutually agreed definitions of codepoints in Unicode Private Use Area</a:documentation>
|
|
1047
1073
|
</attribute>
|
|
1048
1074
|
</optional>
|
|
@@ -1623,7 +1649,7 @@ numbers</a:documentation>
|
|
|
1623
1649
|
<define name="definitions">
|
|
1624
1650
|
<a:documentation>One or more definition lists, used to define symbols and abbreviations used in the remainder of the document.
|
|
1625
1651
|
These can also be used as glossaries, with simple definitions, in contrast to the more elaborate definitions given in
|
|
1626
|
-
terms sections
|
|
1652
|
+
terms sections</a:documentation>
|
|
1627
1653
|
<element name="definitions">
|
|
1628
1654
|
<ref name="OptionalId"/>
|
|
1629
1655
|
<ref name="LocalizedStringAttributes"/>
|
|
@@ -1864,7 +1890,7 @@ used in document amendments</a:documentation>
|
|
|
1864
1890
|
</zeroOrMore>
|
|
1865
1891
|
<zeroOrMore>
|
|
1866
1892
|
<ref name="related">
|
|
1867
|
-
<a:documentation>Zero or more names which are related to the term being defined
|
|
1893
|
+
<a:documentation>Zero or more names which are related to the term being defined.</a:documentation>
|
|
1868
1894
|
</ref>
|
|
1869
1895
|
</zeroOrMore>
|
|
1870
1896
|
<optional>
|
|
@@ -2025,7 +2051,7 @@ used in document amendments</a:documentation>
|
|
|
2025
2051
|
<element name="letter-symbol">
|
|
2026
2052
|
<optional>
|
|
2027
2053
|
<attribute name="isInternational">
|
|
2028
|
-
<a:documentation>Whether the designation is the same across languages, or language-specific
|
|
2054
|
+
<a:documentation>Whether the designation is the same across languages, or language-specific</a:documentation>
|
|
2029
2055
|
<data type="boolean"/>
|
|
2030
2056
|
</attribute>
|
|
2031
2057
|
</optional>
|
|
@@ -2632,6 +2658,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2632
2658
|
<a:documentation>Connective linking this location to its predecessor. _from/to_ are presumed to nest more closely than _and_ or _or_</a:documentation>
|
|
2633
2659
|
<ref name="XrefConnectiveType"/>
|
|
2634
2660
|
</attribute>
|
|
2661
|
+
<optional>
|
|
2662
|
+
<attribute name="custom-connective">
|
|
2663
|
+
<a:documentation>Custom wording for connnective linking this location to its predecessor, custom wording. If provided, is treated as equivalent semantically to connective value</a:documentation>
|
|
2664
|
+
</attribute>
|
|
2665
|
+
</optional>
|
|
2635
2666
|
</element>
|
|
2636
2667
|
</define>
|
|
2637
2668
|
<define name="XrefStyleType">
|
|
@@ -2658,6 +2689,11 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
|
2658
2689
|
<ref name="XrefConnectiveType"/>
|
|
2659
2690
|
</attribute>
|
|
2660
2691
|
</optional>
|
|
2692
|
+
<optional>
|
|
2693
|
+
<attribute name="custom-connective">
|
|
2694
|
+
<a:documentation>Custom wording for connnective linking this location to its predecessor, custom wording. If provided, is treated as equivalent semantically to connective value</a:documentation>
|
|
2695
|
+
</attribute>
|
|
2696
|
+
</optional>
|
|
2661
2697
|
<ref name="erefType"/>
|
|
2662
2698
|
</define>
|
|
2663
2699
|
<define name="erefstack">
|
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", "~> 3.2.
|
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 3.2.3"
|
|
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.
|
|
4
|
+
version: 2.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-02-16 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: 3.2.
|
|
19
|
+
version: 3.2.3
|
|
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: 3.2.
|
|
26
|
+
version: 3.2.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|