metanorma-ribose 2.1.12 → 2.1.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 268b734209bf9e456b7d95d528e6a2c4f14fe95f1f92e3e83dacb4c16f8ebada
4
- data.tar.gz: 0ab71f407a6def8ea94f1e7018fa3a6d13e43e05c700174851fc5e28e0ca8dde
3
+ metadata.gz: 3edc722be912cd5f552285f32943aa7a98ccbe0a92b2fd217b47ba729559f8da
4
+ data.tar.gz: 77651772301d839682f696cb4c7f07578b0fe5d19011be84ada83a7e619b3515
5
5
  SHA512:
6
- metadata.gz: e7a1d13851816a8cbcccf78966735ecd2054afe1620da5c229a33f256b2f2fbdf8556a210e64318b71d9a4a20fbd01b6dff0b9f80b4fbb8bb07cfec644777518
7
- data.tar.gz: 3c4a06497c211388410f5f0890668de4bb6feffa2ae78a9b8598ebb15258eca8604cb21ff87a0ec53e8e0f5f1466c6bbc1c04fc293b8a3f36bc90d07431c7f8d
6
+ metadata.gz: b5ccc82c2937fcb82983c65f0d10762fb64a9f1736d81e528ad2d98311e52912cb48dd57b3bbc9c56c8b50f7ecbbeeafdabc3eb01653be2af353dd1da2cba448
7
+ data.tar.gz: 288f73b49dac4cf6cdde93e3f19f794466ada5691a3a4dac93adab4763a8db804e25c5b48912489a9bf1166292f1b90fe0bd281af6dfd08a06b519fa4fe2a9e6
@@ -268,6 +268,12 @@ main {
268
268
  padding-left: 30px; }
269
269
  #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
270
270
  padding-left: 50px; }
271
+ #toc .h4, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h4 {
272
+ padding-left: 70px; }
273
+ #toc .h5, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h5 {
274
+ padding-left: 90px; }
275
+ #toc .h6, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h6 {
276
+ padding-left: 110px; }
271
277
  #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
272
278
  background: #1661AD;
273
279
  box-shadow: inset -5px 0px 10px -5px #1661AD !important; }
@@ -690,6 +690,156 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3 {
690
690
  font-weight: normal;
691
691
  mso-bidi-font-weight: normal; }
692
692
 
693
+ p.MsoToc4, li.MsoToc4, div.MsoToc4 {
694
+ mso-style-noshow: yes;
695
+ mso-style-priority: 39;
696
+ mso-style-unhide: no;
697
+ mso-style-name: "TOC 4";
698
+ mso-style-parent: "TOC 3";
699
+ mso-style-next: Normal;
700
+ margin-top: 0cm;
701
+ margin-right: 25.0pt;
702
+ margin-bottom: 0cm;
703
+ margin-left: 36.0pt;
704
+ margin-bottom: .0001pt;
705
+ text-indent: -36.0pt;
706
+ line-height: 12.0pt;
707
+ mso-pagination: widow-orphan;
708
+ mso-hyphenate: none;
709
+ tab-stops: 20.15pt 47.9pt right dotted 487.6pt;
710
+ font-size: 10.5pt;
711
+ font-family: {{bodyfont}};
712
+ mso-fareast-font-family: {{bodyfont}};
713
+ mso-bidi-font-family: {{bodyfont}};
714
+ mso-ansi-language: EN-GB;
715
+ font-weight: bold;
716
+ mso-bidi-font-weight: normal; }
717
+
718
+ p.MsoToc5, li.MsoToc5, div.MsoToc5 {
719
+ mso-style-noshow: yes;
720
+ mso-style-priority: 39;
721
+ mso-style-unhide: no;
722
+ mso-style-name: "TOC 5";
723
+ mso-style-parent: "TOC 4";
724
+ mso-style-next: Normal;
725
+ margin-top: 0cm;
726
+ margin-right: 25.0pt;
727
+ margin-bottom: 0cm;
728
+ margin-left: 36.0pt;
729
+ margin-bottom: .0001pt;
730
+ text-indent: -36.0pt;
731
+ line-height: 12.0pt;
732
+ mso-pagination: widow-orphan;
733
+ mso-hyphenate: none;
734
+ tab-stops: 20.15pt 47.9pt right dotted 487.6pt;
735
+ font-size: 10.5pt;
736
+ font-family: {{bodyfont}};
737
+ mso-fareast-font-family: {{bodyfont}};
738
+ mso-bidi-font-family: {{bodyfont}};
739
+ mso-ansi-language: EN-GB;
740
+ font-weight: bold;
741
+ mso-bidi-font-weight: normal; }
742
+
743
+ p.MsoToc6, li.MsoToc6, div.MsoToc6 {
744
+ mso-style-noshow: yes;
745
+ mso-style-priority: 39;
746
+ mso-style-unhide: no;
747
+ mso-style-name: "TOC 6";
748
+ mso-style-parent: "TOC 5";
749
+ mso-style-next: Normal;
750
+ margin-top: 0cm;
751
+ margin-right: 25.0pt;
752
+ margin-bottom: 0cm;
753
+ margin-left: 36.0pt;
754
+ margin-bottom: .0001pt;
755
+ text-indent: -36.0pt;
756
+ line-height: 12.0pt;
757
+ mso-pagination: widow-orphan;
758
+ mso-hyphenate: none;
759
+ tab-stops: 20.15pt 55.0pt right dotted 487.6pt;
760
+ font-size: 10.5pt;
761
+ font-family: {{bodyfont}};
762
+ mso-fareast-font-family: {{bodyfont}};
763
+ mso-bidi-font-family: {{bodyfont}};
764
+ mso-ansi-language: EN-GB;
765
+ font-weight: bold;
766
+ mso-bidi-font-weight: normal; }
767
+
768
+ p.MsoToc7, li.MsoToc7, div.MsoToc7 {
769
+ mso-style-noshow: yes;
770
+ mso-style-priority: 39;
771
+ mso-style-unhide: no;
772
+ mso-style-name: "TOC 7";
773
+ mso-style-parent: "TOC 6";
774
+ mso-style-next: Normal;
775
+ margin-top: 0cm;
776
+ margin-right: 25.0pt;
777
+ margin-bottom: 0cm;
778
+ margin-left: 36.0pt;
779
+ margin-bottom: .0001pt;
780
+ text-indent: -36.0pt;
781
+ line-height: 12.0pt;
782
+ mso-pagination: widow-orphan;
783
+ mso-hyphenate: none;
784
+ tab-stops: 20.15pt 62.7pt right dotted 487.6pt;
785
+ font-size: 10.5pt;
786
+ font-family: {{bodyfont}};
787
+ mso-fareast-font-family: {{bodyfont}};
788
+ mso-bidi-font-family: {{bodyfont}};
789
+ mso-ansi-language: EN-GB;
790
+ font-weight: bold;
791
+ mso-bidi-font-weight: normal; }
792
+
793
+ p.MsoToc8, li.MsoToc8, div.MsoToc8 {
794
+ mso-style-noshow: yes;
795
+ mso-style-priority: 39;
796
+ mso-style-unhide: no;
797
+ mso-style-name: "TOC 8";
798
+ mso-style-parent: "TOC 7";
799
+ mso-style-next: Normal;
800
+ margin-top: 0cm;
801
+ margin-right: 25.0pt;
802
+ margin-bottom: 0cm;
803
+ margin-left: 36.0pt;
804
+ margin-bottom: .0001pt;
805
+ text-indent: -36.0pt;
806
+ line-height: 12.0pt;
807
+ mso-pagination: widow-orphan;
808
+ mso-hyphenate: none;
809
+ tab-stops: 20.15pt 70.3pt right dotted 487.6pt;
810
+ font-size: 10.5pt;
811
+ font-family: {{bodyfont}};
812
+ mso-fareast-font-family: {{bodyfont}};
813
+ mso-bidi-font-family: {{bodyfont}};
814
+ mso-ansi-language: EN-GB;
815
+ font-weight: bold;
816
+ mso-bidi-font-weight: normal; }
817
+
818
+ p.MsoToc9, li.MsoToc9, div.MsoToc9 {
819
+ mso-style-noshow: yes;
820
+ mso-style-priority: 39;
821
+ mso-style-unhide: no;
822
+ mso-style-name: "TOC 9";
823
+ mso-style-parent: "TOC 8";
824
+ mso-style-next: Normal;
825
+ margin-top: 0cm;
826
+ margin-right: 25.0pt;
827
+ margin-bottom: 0cm;
828
+ margin-left: 36.0pt;
829
+ margin-bottom: .0001pt;
830
+ text-indent: -36.0pt;
831
+ line-height: 12.0pt;
832
+ mso-pagination: widow-orphan;
833
+ mso-hyphenate: none;
834
+ tab-stops: 20.15pt 78.0pt right dotted 487.6pt;
835
+ font-size: 10.5pt;
836
+ font-family: {{bodyfont}};
837
+ mso-fareast-font-family: {{bodyfont}};
838
+ mso-bidi-font-family: {{bodyfont}};
839
+ mso-ansi-language: EN-GB;
840
+ font-weight: bold;
841
+ mso-bidi-font-weight: normal; }
842
+
693
843
  span.MsoFootnoteReference {
694
844
  mso-style-priority: 99;
695
845
  mso-style-name: "Footnote Reference";
@@ -649,6 +649,150 @@ p.MsoToc3, li.MsoToc3, div.MsoToc3
649
649
  mso-ansi-language:EN-GB;
650
650
  font-weight:normal;
651
651
  mso-bidi-font-weight:normal;}
652
+ p.MsoToc4, li.MsoToc4, div.MsoToc4
653
+ {mso-style-noshow:yes;
654
+ mso-style-priority:39;
655
+ mso-style-unhide:no;
656
+ mso-style-name:"TOC 4";
657
+ mso-style-parent:"TOC 3";
658
+ mso-style-next:Normal;
659
+ margin-top:0cm;
660
+ margin-right:25.0pt;
661
+ margin-bottom:0cm;
662
+ margin-left:36.0pt;
663
+ margin-bottom:.0001pt;
664
+ text-indent:-36.0pt;
665
+ line-height:12.0pt;
666
+ mso-pagination:widow-orphan;
667
+ mso-hyphenate:none;
668
+ tab-stops:20.15pt 47.9pt right dotted 487.6pt;
669
+ font-size:10.5pt;
670
+ font-family:$bodyfont;
671
+ mso-fareast-font-family:$bodyfont;
672
+ mso-bidi-font-family:$bodyfont;
673
+ mso-ansi-language:EN-GB;
674
+ font-weight:bold;
675
+ mso-bidi-font-weight:normal;}
676
+ p.MsoToc5, li.MsoToc5, div.MsoToc5
677
+ {mso-style-noshow:yes;
678
+ mso-style-priority:39;
679
+ mso-style-unhide:no;
680
+ mso-style-name:"TOC 5";
681
+ mso-style-parent:"TOC 4";
682
+ mso-style-next:Normal;
683
+ margin-top:0cm;
684
+ margin-right:25.0pt;
685
+ margin-bottom:0cm;
686
+ margin-left:36.0pt;
687
+ margin-bottom:.0001pt;
688
+ text-indent:-36.0pt;
689
+ line-height:12.0pt;
690
+ mso-pagination:widow-orphan;
691
+ mso-hyphenate:none;
692
+ tab-stops:20.15pt 47.9pt right dotted 487.6pt;
693
+ font-size:10.5pt;
694
+ font-family:$bodyfont;
695
+ mso-fareast-font-family:$bodyfont;
696
+ mso-bidi-font-family:$bodyfont;
697
+ mso-ansi-language:EN-GB;
698
+ font-weight:bold;
699
+ mso-bidi-font-weight:normal;}
700
+ p.MsoToc6, li.MsoToc6, div.MsoToc6
701
+ {mso-style-noshow:yes;
702
+ mso-style-priority:39;
703
+ mso-style-unhide:no;
704
+ mso-style-name:"TOC 6";
705
+ mso-style-parent:"TOC 5";
706
+ mso-style-next:Normal;
707
+ margin-top:0cm;
708
+ margin-right:25.0pt;
709
+ margin-bottom:0cm;
710
+ margin-left:36.0pt;
711
+ margin-bottom:.0001pt;
712
+ text-indent:-36.0pt;
713
+ line-height:12.0pt;
714
+ mso-pagination:widow-orphan;
715
+ mso-hyphenate:none;
716
+ tab-stops:20.15pt 55.0pt right dotted 487.6pt;
717
+ font-size:10.5pt;
718
+ font-family:$bodyfont;
719
+ mso-fareast-font-family:$bodyfont;
720
+ mso-bidi-font-family:$bodyfont;
721
+ mso-ansi-language:EN-GB;
722
+ font-weight:bold;
723
+ mso-bidi-font-weight:normal;}
724
+ p.MsoToc7, li.MsoToc7, div.MsoToc7
725
+ {mso-style-noshow:yes;
726
+ mso-style-priority:39;
727
+ mso-style-unhide:no;
728
+ mso-style-name:"TOC 7";
729
+ mso-style-parent:"TOC 6";
730
+ mso-style-next:Normal;
731
+ margin-top:0cm;
732
+ margin-right:25.0pt;
733
+ margin-bottom:0cm;
734
+ margin-left:36.0pt;
735
+ margin-bottom:.0001pt;
736
+ text-indent:-36.0pt;
737
+ line-height:12.0pt;
738
+ mso-pagination:widow-orphan;
739
+ mso-hyphenate:none;
740
+ tab-stops:20.15pt 62.7pt right dotted 487.6pt;
741
+ font-size:10.5pt;
742
+ font-family:$bodyfont;
743
+ mso-fareast-font-family:$bodyfont;
744
+ mso-bidi-font-family:$bodyfont;
745
+ mso-ansi-language:EN-GB;
746
+ font-weight:bold;
747
+ mso-bidi-font-weight:normal;}
748
+ p.MsoToc8, li.MsoToc8, div.MsoToc8
749
+ {mso-style-noshow:yes;
750
+ mso-style-priority:39;
751
+ mso-style-unhide:no;
752
+ mso-style-name:"TOC 8";
753
+ mso-style-parent:"TOC 7";
754
+ mso-style-next:Normal;
755
+ margin-top:0cm;
756
+ margin-right:25.0pt;
757
+ margin-bottom:0cm;
758
+ margin-left:36.0pt;
759
+ margin-bottom:.0001pt;
760
+ text-indent:-36.0pt;
761
+ line-height:12.0pt;
762
+ mso-pagination:widow-orphan;
763
+ mso-hyphenate:none;
764
+ tab-stops:20.15pt 70.3pt right dotted 487.6pt;
765
+ font-size:10.5pt;
766
+ font-family:$bodyfont;
767
+ mso-fareast-font-family:$bodyfont;
768
+ mso-bidi-font-family:$bodyfont;
769
+ mso-ansi-language:EN-GB;
770
+ font-weight:bold;
771
+ mso-bidi-font-weight:normal;}
772
+ p.MsoToc9, li.MsoToc9, div.MsoToc9
773
+ {mso-style-noshow:yes;
774
+ mso-style-priority:39;
775
+ mso-style-unhide:no;
776
+ mso-style-name:"TOC 9";
777
+ mso-style-parent:"TOC 8";
778
+ mso-style-next:Normal;
779
+ margin-top:0cm;
780
+ margin-right:25.0pt;
781
+ margin-bottom:0cm;
782
+ margin-left:36.0pt;
783
+ margin-bottom:.0001pt;
784
+ text-indent:-36.0pt;
785
+ line-height:12.0pt;
786
+ mso-pagination:widow-orphan;
787
+ mso-hyphenate:none;
788
+ tab-stops:20.15pt 78.0pt right dotted 487.6pt;
789
+ font-size:10.5pt;
790
+ font-family:$bodyfont;
791
+ mso-fareast-font-family:$bodyfont;
792
+ mso-bidi-font-family:$bodyfont;
793
+ mso-ansi-language:EN-GB;
794
+ font-weight:bold;
795
+ mso-bidi-font-weight:normal;}
652
796
  span.MsoFootnoteReference
653
797
  {mso-style-priority:99;
654
798
  mso-style-name:"Footnote Reference";
@@ -1195,6 +1195,8 @@
1195
1195
  </xsl:if>
1196
1196
  </xsl:template>
1197
1197
 
1198
+ <xsl:strip-space elements="rsd:xref"/>
1199
+
1198
1200
  <!-- external parameters -->
1199
1201
 
1200
1202
  <xsl:param name="svg_images"/> <!-- svg images array -->
@@ -1620,6 +1622,15 @@
1620
1622
 
1621
1623
  </xsl:attribute-set>
1622
1624
 
1625
+ <xsl:attribute-set name="pre-style">
1626
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1627
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1628
+
1629
+ <xsl:attribute name="font-family"><xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
1630
+ <xsl:attribute name="line-height">113%</xsl:attribute>
1631
+
1632
+ </xsl:attribute-set>
1633
+
1623
1634
  <xsl:attribute-set name="permission-style">
1624
1635
 
1625
1636
  </xsl:attribute-set>
@@ -2655,17 +2666,22 @@
2655
2666
  </xsl:for-each>
2656
2667
  </xsl:template>
2657
2668
 
2669
+ <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2658
2670
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
2659
2671
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
2660
2672
  <xsl:template match="text()" name="text">
2661
2673
 
2662
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
2663
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
2664
- <xsl:call-template name="replace_fo_inline_tags">
2665
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2666
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2667
- <xsl:with-param name="text" select="$text"/>
2668
- </xsl:call-template>
2674
+ <xsl:choose>
2675
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
2676
+ <xsl:otherwise>
2677
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
2678
+ <xsl:call-template name="replace_fo_inline_tags">
2679
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
2680
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
2681
+ <xsl:with-param name="text" select="$text"/>
2682
+ </xsl:call-template>
2683
+ </xsl:otherwise>
2684
+ </xsl:choose>
2669
2685
 
2670
2686
  </xsl:template>
2671
2687
 
@@ -3033,7 +3049,7 @@
3033
3049
 
3034
3050
  <!-- centered table when table name is centered (see table-name-style) -->
3035
3051
 
3036
- <fo:table table-layout="fixed" width="100%">
3052
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
3037
3053
  <fo:table-column column-width="proportional-column-width(1)"/>
3038
3054
  <fo:table-column column-width="{@width}"/>
3039
3055
  <fo:table-column column-width="proportional-column-width(1)"/>
@@ -3686,7 +3702,7 @@
3686
3702
  <xsl:template match="*[local-name()='tr']">
3687
3703
  <fo:table-row xsl:use-attribute-sets="table-body-row-style">
3688
3704
 
3689
- <xsl:if test="*[local-name() = 'th']">
3705
+ <xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
3690
3706
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3691
3707
  </xsl:if>
3692
3708
 
@@ -4653,7 +4669,8 @@
4653
4669
  <xsl:copy-of select="node()"/>
4654
4670
  </td>
4655
4671
  <td>
4656
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4672
+ <!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
4673
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
4657
4674
  <!-- get paragraphs from nested 'dl' -->
4658
4675
  <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4659
4676
  </td>
@@ -4661,6 +4678,53 @@
4661
4678
  </xsl:template>
4662
4679
  <xsl:template match="*[local-name()='dd']" mode="dl_if"/>
4663
4680
 
4681
+ <xsl:template match="*" mode="dl_if">
4682
+ <xsl:copy-of select="."/>
4683
+ </xsl:template>
4684
+
4685
+ <xsl:template match="*[local-name() = 'p']" mode="dl_if">
4686
+ <xsl:param name="indent"/>
4687
+ <p>
4688
+ <xsl:copy-of select="@*"/>
4689
+ <xsl:value-of select="$indent"/>
4690
+ <xsl:copy-of select="node()"/>
4691
+ </p>
4692
+
4693
+ </xsl:template>
4694
+
4695
+ <xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
4696
+ <xsl:variable name="list_rendered_">
4697
+ <xsl:apply-templates select="."/>
4698
+ </xsl:variable>
4699
+ <xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
4700
+
4701
+ <xsl:variable name="indent">
4702
+ <xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
4703
+ <xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
4704
+ </xsl:for-each>
4705
+ </xsl:variable>
4706
+
4707
+ <xsl:apply-templates mode="dl_if">
4708
+ <xsl:with-param name="indent" select="$indent"/>
4709
+ </xsl:apply-templates>
4710
+ </xsl:template>
4711
+
4712
+ <xsl:template match="*[local-name() = 'li']" mode="dl_if">
4713
+ <xsl:param name="indent"/>
4714
+ <xsl:apply-templates mode="dl_if">
4715
+ <xsl:with-param name="indent" select="$indent"/>
4716
+ </xsl:apply-templates>
4717
+ </xsl:template>
4718
+
4719
+ <xsl:template match="@provisional-distance-between-starts" mode="dl_if">
4720
+ <xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
4721
+ <!-- emulate left indent for list item -->
4722
+ <xsl:call-template name="repeat">
4723
+ <xsl:with-param name="char" select="'x'"/>
4724
+ <xsl:with-param name="count" select="$value"/>
4725
+ </xsl:call-template>
4726
+ </xsl:template>
4727
+
4664
4728
  <xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
4665
4729
  <xsl:for-each select="*[local-name() = 'dt']">
4666
4730
  <p>
@@ -5064,6 +5128,7 @@
5064
5128
  </word>
5065
5129
  <xsl:call-template name="tokenize_with_tags">
5066
5130
  <xsl:with-param name="text" select="substring-after($text, $separator)"/>
5131
+ <xsl:with-param name="tags" select="$tags"/>
5067
5132
  </xsl:call-template>
5068
5133
  </xsl:otherwise>
5069
5134
  </xsl:choose>
@@ -5103,8 +5168,18 @@
5103
5168
 
5104
5169
  <xsl:template name="add-zero-spaces-java">
5105
5170
  <xsl:param name="text" select="."/>
5106
- <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
5107
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| )','$1​')"/>
5171
+ <!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
5172
+ <xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1​')"/>
5173
+ <!-- add zero-width space (#x200B) after characters: 'great than' -->
5174
+ <xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1), '(\u003e)(?!\u003e)', '$1​')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
5175
+ <!-- add zero-width space (#x200B) before characters: 'less than' -->
5176
+ <xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?&lt;!\u003c)(\u003c)', '​$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
5177
+ <!-- add zero-width space (#x200B) before character: { -->
5178
+ <xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?&lt;!\W)(\{)', '​$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
5179
+ <!-- add zero-width space (#x200B) after character: , -->
5180
+ <xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1​')"/> <!-- negative lookahead: ',' not followed by digit -->
5181
+
5182
+ <xsl:value-of select="$text5"/>
5108
5183
  </xsl:template>
5109
5184
 
5110
5185
  <xsl:template name="add-zero-spaces-link-java">
@@ -5250,7 +5325,7 @@
5250
5325
  </xsl:copy>
5251
5326
  </xsl:template>
5252
5327
 
5253
- <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
5328
+ <xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
5254
5329
  <xsl:copy>
5255
5330
  <xsl:copy-of select="@*"/>
5256
5331
  <p>
@@ -5298,6 +5373,28 @@
5298
5373
  </xsl:for-each>
5299
5374
  </xsl:template>
5300
5375
 
5376
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
5377
+ <xsl:apply-templates mode="table-without-br"/>
5378
+ </xsl:template>
5379
+
5380
+ <xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., '&#13;') or contains(., '&#10;')]" mode="table-without-br">
5381
+
5382
+ <xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
5383
+ <xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'(&#13;&#10;|&#13;|&#10;)', $sep)"/>
5384
+ <xsl:variable name="items">
5385
+ <xsl:call-template name="split">
5386
+ <xsl:with-param name="pText" select="$sourcecode_text"/>
5387
+ <xsl:with-param name="sep" select="$sep"/>
5388
+ <xsl:with-param name="normalize-space">false</xsl:with-param>
5389
+ </xsl:call-template>
5390
+ </xsl:variable>
5391
+ <xsl:for-each select="xalan:nodeset($items)/*">
5392
+ <p>
5393
+ <sourcecode><xsl:copy-of select="node()"/></sourcecode>
5394
+ </p>
5395
+ </xsl:for-each>
5396
+ </xsl:template>
5397
+
5301
5398
  <!-- remove redundant white spaces -->
5302
5399
  <xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
5303
5400
  <xsl:variable name="text" select="translate(.,'&#9;&#10;&#13;','')"/>
@@ -5608,6 +5705,7 @@
5608
5705
  <xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
5609
5706
  <xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
5610
5707
  <xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
5708
+ <xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
5611
5709
  <xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
5612
5710
  </tags>
5613
5711
  </xsl:template>
@@ -6102,6 +6200,12 @@
6102
6200
 
6103
6201
  <fo:block-container margin-left="0mm">
6104
6202
 
6203
+ <!-- <xsl:if test="$namespace = 'iho'">
6204
+ <xsl:if test="ancestor::iho:td">
6205
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
6206
+ </xsl:if>
6207
+ </xsl:if> -->
6208
+
6105
6209
  <fo:block>
6106
6210
 
6107
6211
  <fo:inline xsl:use-attribute-sets="note-name-style">
@@ -7241,49 +7345,25 @@
7241
7345
  <xsl:apply-templates mode="contents_item"/>
7242
7346
  </xsl:template>
7243
7347
 
7244
- <!-- ====== -->
7245
- <!-- sourcecode -->
7246
- <!-- ====== -->
7348
+ <!-- =============== -->
7349
+ <!-- sourcecode -->
7350
+ <!-- =============== -->
7247
7351
  <xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
7248
7352
 
7249
- <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7250
-
7251
- <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7252
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
7253
- </xsl:if>
7254
-
7255
- <xsl:if test="ancestor::*[local-name() = 'example']">
7256
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
7257
- </xsl:if>
7258
-
7259
- <xsl:copy-of select="@id"/>
7260
-
7261
- <xsl:if test="parent::*[local-name() = 'note']">
7262
- <xsl:attribute name="margin-left">
7263
- <xsl:choose>
7264
- <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
7265
- <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7266
- </xsl:choose>
7267
- </xsl:attribute>
7268
-
7269
- </xsl:if>
7270
- <fo:block-container margin-left="0mm">
7271
-
7272
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
7353
+ <xsl:variable name="sourcecode_attributes">
7354
+ <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
7355
+ <xsl:variable name="_font-size">
7273
7356
 
7274
- <fo:block xsl:use-attribute-sets="sourcecode-style">
7275
- <xsl:variable name="_font-size">
7357
+ <!-- 9 -->
7276
7358
 
7277
- <!-- 9 -->
7278
-
7279
- <!-- <xsl:if test="$namespace = 'ieee'">
7280
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
7281
- </xsl:if> -->
7359
+ <!-- <xsl:if test="$namespace = 'ieee'">
7360
+ <xsl:if test="$current_template = 'standard'">8</xsl:if>
7361
+ </xsl:if> -->
7282
7362
 
7283
- <xsl:choose>
7284
- <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
7285
- <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
7286
- </xsl:choose>
7363
+ <xsl:choose>
7364
+ <xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
7365
+ <xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
7366
+ </xsl:choose>
7287
7367
 
7288
7368
  </xsl:variable>
7289
7369
 
@@ -7298,26 +7378,74 @@
7298
7378
  </xsl:choose>
7299
7379
  </xsl:attribute>
7300
7380
  </xsl:if>
7381
+ </xsl:element>
7382
+ </xsl:variable>
7301
7383
 
7302
- <!-- background for image -->
7303
- <xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
7304
- <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
7305
- <xsl:attribute name="padding-left">11mm</xsl:attribute>
7384
+ <xsl:choose>
7385
+ <xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
7386
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
7387
+ <xsl:attribute name="{local-name()}">
7388
+ <xsl:value-of select="."/>
7389
+ </xsl:attribute>
7390
+ </xsl:for-each>
7391
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7392
+ </xsl:when>
7393
+
7394
+ <xsl:otherwise>
7395
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
7396
+
7397
+ <xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
7306
7398
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
7307
- <xsl:attribute name="padding-right">11mm</xsl:attribute>
7399
+ </xsl:if>
7400
+
7401
+ <xsl:if test="ancestor::*[local-name() = 'example']">
7308
7402
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
7309
- <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
7310
- <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
7311
- <xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
7312
- <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
7313
- </xsl:if>
7314
7403
  </xsl:if>
7315
7404
 
7316
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7317
- </fo:block>
7405
+ <xsl:copy-of select="@id"/>
7318
7406
 
7319
- </fo:block-container>
7320
- </fo:block-container>
7407
+ <xsl:if test="parent::*[local-name() = 'note']">
7408
+ <xsl:attribute name="margin-left">
7409
+ <xsl:choose>
7410
+ <xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
7411
+ <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7412
+ </xsl:choose>
7413
+ </xsl:attribute>
7414
+
7415
+ </xsl:if>
7416
+ <fo:block-container margin-left="0mm">
7417
+
7418
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
7419
+
7420
+ <fo:block xsl:use-attribute-sets="sourcecode-style">
7421
+
7422
+ <xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
7423
+ <xsl:attribute name="{local-name()}">
7424
+ <xsl:value-of select="."/>
7425
+ </xsl:attribute>
7426
+ </xsl:for-each>
7427
+
7428
+ <!-- background for image -->
7429
+ <xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
7430
+ <xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
7431
+ <xsl:attribute name="padding-left">11mm</xsl:attribute>
7432
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
7433
+ <xsl:attribute name="padding-right">11mm</xsl:attribute>
7434
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7435
+ <xsl:attribute name="padding-top">7.5mm</xsl:attribute>
7436
+ <xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
7437
+ <xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
7438
+ <xsl:attribute name="margin-bottom">16pt</xsl:attribute>
7439
+ </xsl:if>
7440
+ </xsl:if>
7441
+
7442
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7443
+ </fo:block>
7444
+
7445
+ </fo:block-container>
7446
+ </fo:block-container>
7447
+ </xsl:otherwise>
7448
+ </xsl:choose>
7321
7449
  </xsl:template>
7322
7450
 
7323
7451
  <xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
@@ -7559,8 +7687,22 @@
7559
7687
  </fo:block>
7560
7688
  </xsl:if>
7561
7689
  </xsl:template>
7562
- <!-- ====== -->
7563
- <!-- ====== -->
7690
+ <!-- =============== -->
7691
+ <!-- END sourcecode -->
7692
+ <!-- =============== -->
7693
+
7694
+ <!-- =============== -->
7695
+ <!-- pre -->
7696
+ <!-- =============== -->
7697
+ <xsl:template match="*[local-name()='pre']" name="pre">
7698
+ <fo:block xsl:use-attribute-sets="pre-style">
7699
+ <xsl:copy-of select="@id"/>
7700
+ <xsl:apply-templates/>
7701
+ </fo:block>
7702
+ </xsl:template>
7703
+ <!-- =============== -->
7704
+ <!-- pre -->
7705
+ <!-- =============== -->
7564
7706
 
7565
7707
  <!-- ========== -->
7566
7708
  <!-- permission -->
@@ -9527,7 +9669,9 @@
9527
9669
  <!-- ===================================== -->
9528
9670
  <!-- Update xml -->
9529
9671
  <!-- ===================================== -->
9672
+ <!-- =========================================================================== -->
9530
9673
  <!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
9674
+ <!-- =========================================================================== -->
9531
9675
  <xsl:template match="@*|node()" mode="update_xml_step1">
9532
9676
  <xsl:copy>
9533
9677
  <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
@@ -9619,10 +9763,15 @@
9619
9763
  <xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
9620
9764
  <xsl:apply-templates mode="update_xml_step1"/>
9621
9765
  </xsl:template>
9622
-
9766
+ <!-- =========================================================================== -->
9623
9767
  <!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
9768
+ <!-- =========================================================================== -->
9624
9769
 
9770
+ <!-- =========================================================================== -->
9625
9771
  <!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
9772
+ <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
9773
+ <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
9774
+ <!-- =========================================================================== -->
9626
9775
  <!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
9627
9776
  <xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
9628
9777
  <xsl:copy>
@@ -9638,10 +9787,15 @@
9638
9787
  <xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
9639
9788
 
9640
9789
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
9641
- <xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
9642
9790
  <xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
9643
9791
  <xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
9644
- <xsl:variable name="text_" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
9792
+ <xsl:variable name="text__" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
9793
+ <xsl:variable name="text_">
9794
+ <xsl:choose>
9795
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
9796
+ <xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
9797
+ </xsl:choose>
9798
+ </xsl:variable>
9645
9799
  <xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
9646
9800
  <xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
9647
9801
  <xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
@@ -9657,7 +9811,11 @@
9657
9811
  </xsl:variable>
9658
9812
 
9659
9813
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
9660
- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable>
9814
+ <!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
9815
+ <!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
9816
+ <!-- add &lt; and &gt; to \S -->
9817
+ <xsl:variable name="regex_S">[^\r\n\t\f\v \&lt;&gt;]</xsl:variable>
9818
+ <xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
9661
9819
  <xsl:variable name="text3">
9662
9820
  <text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
9663
9821
  <xsl:choose>
@@ -9721,9 +9879,8 @@
9721
9879
  <xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
9722
9880
  </xsl:choose>
9723
9881
  </xsl:template>
9724
-
9725
9882
  <!-- ===================================== -->
9726
- <!-- End Update xml -->
9883
+ <!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
9727
9884
  <!-- ===================================== -->
9728
9885
 
9729
9886
  <!-- for correct rendering combining chars -->
@@ -1152,7 +1152,7 @@
1152
1152
  <data type="boolean"/>
1153
1153
  </attribute>
1154
1154
  </optional>
1155
- <ref name="BibliographicItem"/>
1155
+ <ref name="ReducedBibliographicItem"/>
1156
1156
  </element>
1157
1157
  </define>
1158
1158
  <define name="image" combine="choice">
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ribose
3
- VERSION = "2.1.12".freeze
3
+ VERSION = "2.1.13".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ribose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.12
4
+ version: 2.1.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-11-07 00:00:00.000000000 Z
11
+ date: 2022-11-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic