metanorma-ribose 2.1.12 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/lib/isodoc/ribose/html/htmlstyle.css +6 -0
- data/lib/isodoc/ribose/html/wordstyle.css +150 -0
- data/lib/isodoc/ribose/html/wordstyle.scss +144 -0
- data/lib/isodoc/ribose/presentation_xml_convert.rb +1 -1
- data/lib/isodoc/ribose/ribose.standard.xsl +279 -79
- data/lib/metanorma/ribose/basicdoc.rng +3 -0
- data/lib/metanorma/ribose/biblio-standoc.rng +1 -1
- data/lib/metanorma/ribose/isodoc.rng +2 -1
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a6232179686f66cbd2c5eff24711ccfc03c241075f8338c74ff0dd9b62ab305
|
4
|
+
data.tar.gz: bd5d151cd18b5b372b9b7bdd9fb0d49ed4137fb0f297f766244363a0cd46f9c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f7c60b4dec2755741d5e109311acda0ef95a3c7cd9bde3c8701360fcde125c7b883e0678a3ab76a98ecd5da8337cd738f93b9a4ea1223b067365b079880b66ed
|
7
|
+
data.tar.gz: 4f6924cf224c226380ba24a208e80afdb5b129d962541002823bf75901190b616fdd3dd0e08d424e77f7e1d9e5120a16b90469b0fbe07034700ae6096876fccb
|
data/.gitignore
CHANGED
@@ -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";
|
@@ -14,7 +14,7 @@ module IsoDoc
|
|
14
14
|
mod = elem.at(ns("./modification")) and
|
15
15
|
termsource_modification(mod)
|
16
16
|
elem.children = l10n("<strong>#{@i18n.source}:</strong> "\
|
17
|
-
"#{elem.children.
|
17
|
+
"#{to_xml(elem.children).strip}")
|
18
18
|
elem&.next_element&.name == "termsource" and elem.next = "; "
|
19
19
|
end
|
20
20
|
|
@@ -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:
|
2663
|
-
|
2664
|
-
|
2665
|
-
|
2666
|
-
|
2667
|
-
|
2668
|
-
|
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
|
|
@@ -3853,6 +3869,10 @@
|
|
3853
3869
|
<xsl:variable name="footnote_inline">
|
3854
3870
|
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
3855
3871
|
|
3872
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'fn']">
|
3873
|
+
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
3874
|
+
</xsl:if>
|
3875
|
+
|
3856
3876
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3857
3877
|
<xsl:value-of select="$current_fn_number_text"/>
|
3858
3878
|
</fo:basic-link>
|
@@ -4653,7 +4673,8 @@
|
|
4653
4673
|
<xsl:copy-of select="node()"/>
|
4654
4674
|
</td>
|
4655
4675
|
<td>
|
4656
|
-
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
4676
|
+
<!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
|
4677
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
|
4657
4678
|
<!-- get paragraphs from nested 'dl' -->
|
4658
4679
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
4659
4680
|
</td>
|
@@ -4661,6 +4682,53 @@
|
|
4661
4682
|
</xsl:template>
|
4662
4683
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
4663
4684
|
|
4685
|
+
<xsl:template match="*" mode="dl_if">
|
4686
|
+
<xsl:copy-of select="."/>
|
4687
|
+
</xsl:template>
|
4688
|
+
|
4689
|
+
<xsl:template match="*[local-name() = 'p']" mode="dl_if">
|
4690
|
+
<xsl:param name="indent"/>
|
4691
|
+
<p>
|
4692
|
+
<xsl:copy-of select="@*"/>
|
4693
|
+
<xsl:value-of select="$indent"/>
|
4694
|
+
<xsl:copy-of select="node()"/>
|
4695
|
+
</p>
|
4696
|
+
|
4697
|
+
</xsl:template>
|
4698
|
+
|
4699
|
+
<xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
|
4700
|
+
<xsl:variable name="list_rendered_">
|
4701
|
+
<xsl:apply-templates select="."/>
|
4702
|
+
</xsl:variable>
|
4703
|
+
<xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
|
4704
|
+
|
4705
|
+
<xsl:variable name="indent">
|
4706
|
+
<xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
|
4707
|
+
<xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
|
4708
|
+
</xsl:for-each>
|
4709
|
+
</xsl:variable>
|
4710
|
+
|
4711
|
+
<xsl:apply-templates mode="dl_if">
|
4712
|
+
<xsl:with-param name="indent" select="$indent"/>
|
4713
|
+
</xsl:apply-templates>
|
4714
|
+
</xsl:template>
|
4715
|
+
|
4716
|
+
<xsl:template match="*[local-name() = 'li']" mode="dl_if">
|
4717
|
+
<xsl:param name="indent"/>
|
4718
|
+
<xsl:apply-templates mode="dl_if">
|
4719
|
+
<xsl:with-param name="indent" select="$indent"/>
|
4720
|
+
</xsl:apply-templates>
|
4721
|
+
</xsl:template>
|
4722
|
+
|
4723
|
+
<xsl:template match="@provisional-distance-between-starts" mode="dl_if">
|
4724
|
+
<xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
|
4725
|
+
<!-- emulate left indent for list item -->
|
4726
|
+
<xsl:call-template name="repeat">
|
4727
|
+
<xsl:with-param name="char" select="'x'"/>
|
4728
|
+
<xsl:with-param name="count" select="$value"/>
|
4729
|
+
</xsl:call-template>
|
4730
|
+
</xsl:template>
|
4731
|
+
|
4664
4732
|
<xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
4665
4733
|
<xsl:for-each select="*[local-name() = 'dt']">
|
4666
4734
|
<p>
|
@@ -4966,6 +5034,23 @@
|
|
4966
5034
|
<xsl:apply-templates/>
|
4967
5035
|
</xsl:template>
|
4968
5036
|
|
5037
|
+
<!-- Don't break standard's numbers -->
|
5038
|
+
<!-- Example : <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
5039
|
+
<xsl:template match="*[local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" priority="2">
|
5040
|
+
<xsl:choose>
|
5041
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:apply-templates/></xsl:when>
|
5042
|
+
<xsl:when test="following-sibling::*[2][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']">
|
5043
|
+
<fo:inline keep-with-next.within-line="always"><xsl:apply-templates/></fo:inline>
|
5044
|
+
</xsl:when>
|
5045
|
+
<xsl:otherwise>
|
5046
|
+
<xsl:apply-templates/>
|
5047
|
+
</xsl:otherwise>
|
5048
|
+
</xsl:choose>
|
5049
|
+
</xsl:template>
|
5050
|
+
<xsl:template match="text()[not(ancestor::*[local-name() = 'table']) and preceding-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear'] and following-sibling::*[1][local-name() = 'span'][@class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']]" priority="2">
|
5051
|
+
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5052
|
+
</xsl:template>
|
5053
|
+
|
4969
5054
|
<!-- ========================= -->
|
4970
5055
|
<!-- END Rich text formatting -->
|
4971
5056
|
<!-- ========================= -->
|
@@ -5064,6 +5149,7 @@
|
|
5064
5149
|
</word>
|
5065
5150
|
<xsl:call-template name="tokenize_with_tags">
|
5066
5151
|
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
5152
|
+
<xsl:with-param name="tags" select="$tags"/>
|
5067
5153
|
</xsl:call-template>
|
5068
5154
|
</xsl:otherwise>
|
5069
5155
|
</xsl:choose>
|
@@ -5103,8 +5189,18 @@
|
|
5103
5189
|
|
5104
5190
|
<xsl:template name="add-zero-spaces-java">
|
5105
5191
|
<xsl:param name="text" select="."/>
|
5106
|
-
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space
|
5107
|
-
<xsl:
|
5192
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
|
5193
|
+
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1')"/>
|
5194
|
+
<!-- add zero-width space (#x200B) after characters: 'great than' -->
|
5195
|
+
<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' -->
|
5196
|
+
<!-- add zero-width space (#x200B) before characters: 'less than' -->
|
5197
|
+
<xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?<!\u003c)(\u003c)', '$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
|
5198
|
+
<!-- add zero-width space (#x200B) before character: { -->
|
5199
|
+
<xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?<!\W)(\{)', '$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
|
5200
|
+
<!-- add zero-width space (#x200B) after character: , -->
|
5201
|
+
<xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1')"/> <!-- negative lookahead: ',' not followed by digit -->
|
5202
|
+
|
5203
|
+
<xsl:value-of select="$text5"/>
|
5108
5204
|
</xsl:template>
|
5109
5205
|
|
5110
5206
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -5250,7 +5346,7 @@
|
|
5250
5346
|
</xsl:copy>
|
5251
5347
|
</xsl:template>
|
5252
5348
|
|
5253
|
-
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
|
5349
|
+
<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
5350
|
<xsl:copy>
|
5255
5351
|
<xsl:copy-of select="@*"/>
|
5256
5352
|
<p>
|
@@ -5298,6 +5394,28 @@
|
|
5298
5394
|
</xsl:for-each>
|
5299
5395
|
</xsl:template>
|
5300
5396
|
|
5397
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
|
5398
|
+
<xsl:apply-templates mode="table-without-br"/>
|
5399
|
+
</xsl:template>
|
5400
|
+
|
5401
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., ' ') or contains(., ' ')]" mode="table-without-br">
|
5402
|
+
|
5403
|
+
<xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
|
5404
|
+
<xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', $sep)"/>
|
5405
|
+
<xsl:variable name="items">
|
5406
|
+
<xsl:call-template name="split">
|
5407
|
+
<xsl:with-param name="pText" select="$sourcecode_text"/>
|
5408
|
+
<xsl:with-param name="sep" select="$sep"/>
|
5409
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
5410
|
+
</xsl:call-template>
|
5411
|
+
</xsl:variable>
|
5412
|
+
<xsl:for-each select="xalan:nodeset($items)/*">
|
5413
|
+
<p>
|
5414
|
+
<sourcecode><xsl:copy-of select="node()"/></sourcecode>
|
5415
|
+
</p>
|
5416
|
+
</xsl:for-each>
|
5417
|
+
</xsl:template>
|
5418
|
+
|
5301
5419
|
<!-- remove redundant white spaces -->
|
5302
5420
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
|
5303
5421
|
<xsl:variable name="text" select="translate(.,'	 ','')"/>
|
@@ -5328,7 +5446,7 @@
|
|
5328
5446
|
<xsl:choose>
|
5329
5447
|
<xsl:when test="@colspan">
|
5330
5448
|
<xsl:variable name="td">
|
5331
|
-
<xsl:element name="
|
5449
|
+
<xsl:element name="{local-name()}">
|
5332
5450
|
<xsl:attribute name="divide"><xsl:value-of select="@colspan"/></xsl:attribute>
|
5333
5451
|
<xsl:if test="local-name()='th'">
|
5334
5452
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5343,7 +5461,7 @@
|
|
5343
5461
|
</xsl:call-template>
|
5344
5462
|
</xsl:when>
|
5345
5463
|
<xsl:otherwise>
|
5346
|
-
<xsl:element name="
|
5464
|
+
<xsl:element name="{local-name()}">
|
5347
5465
|
<xsl:apply-templates select="@*" mode="simple-table-colspan"/>
|
5348
5466
|
<xsl:if test="local-name()='th'">
|
5349
5467
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -5410,7 +5528,7 @@
|
|
5410
5528
|
<xsl:variable name="currentRow" select="."/>
|
5411
5529
|
|
5412
5530
|
<xsl:variable name="normalizedTDs">
|
5413
|
-
<xsl:for-each select="xalan:nodeset($previousRow)
|
5531
|
+
<xsl:for-each select="xalan:nodeset($previousRow)//*[self::td or self::th]">
|
5414
5532
|
<xsl:choose>
|
5415
5533
|
<xsl:when test="@rowspan > 1">
|
5416
5534
|
<xsl:copy>
|
@@ -5422,7 +5540,7 @@
|
|
5422
5540
|
</xsl:copy>
|
5423
5541
|
</xsl:when>
|
5424
5542
|
<xsl:otherwise>
|
5425
|
-
<xsl:copy-of select="$currentRow
|
5543
|
+
<xsl:copy-of select="$currentRow/*[self::td or self::th][1 + count(current()/preceding-sibling::*[self::td or self::th][not(@rowspan) or (@rowspan = 1)])]"/>
|
5426
5544
|
</xsl:otherwise>
|
5427
5545
|
</xsl:choose>
|
5428
5546
|
</xsl:for-each>
|
@@ -5608,6 +5726,7 @@
|
|
5608
5726
|
<xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
|
5609
5727
|
<xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
|
5610
5728
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
5729
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
5611
5730
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
5612
5731
|
</tags>
|
5613
5732
|
</xsl:template>
|
@@ -6608,6 +6727,31 @@
|
|
6608
6727
|
<xsl:apply-templates mode="svg_update"/>
|
6609
6728
|
</xsl:copy>
|
6610
6729
|
</xsl:template>
|
6730
|
+
|
6731
|
+
<!-- regex for 'display: inline-block;' -->
|
6732
|
+
<xsl:variable name="regex_svg_style_notsupported">display(\s|\h)*:(\s|\h)*inline-block(\s|\h)*;</xsl:variable>
|
6733
|
+
<xsl:template match="*[local-name() = 'svg']//*[local-name() = 'style']/text()" mode="svg_update">
|
6734
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), $regex_svg_style_notsupported, '')"/>
|
6735
|
+
</xsl:template>
|
6736
|
+
|
6737
|
+
<!-- replace
|
6738
|
+
stroke="rgba(r, g, b, alpha)" to
|
6739
|
+
stroke="rgb(r,g,b)" stroke-opacity="alpha", and
|
6740
|
+
fill="rgba(r, g, b, alpha)" to
|
6741
|
+
fill="rgb(r,g,b)" fill-opacity="alpha" -->
|
6742
|
+
<xsl:template match="@*[local-name() = 'stroke' or local-name() = 'fill'][starts-with(normalize-space(.), 'rgba')]" mode="svg_update">
|
6743
|
+
<xsl:variable name="components_">
|
6744
|
+
<xsl:call-template name="split">
|
6745
|
+
<xsl:with-param name="pText" select="substring-before(substring-after(., '('), ')')"/>
|
6746
|
+
<xsl:with-param name="sep" select="','"/>
|
6747
|
+
</xsl:call-template>
|
6748
|
+
</xsl:variable>
|
6749
|
+
<xsl:variable name="components" select="xalan:nodeset($components_)"/>
|
6750
|
+
<xsl:variable name="att_name" select="local-name()"/>
|
6751
|
+
<xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
|
6752
|
+
<xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
|
6753
|
+
</xsl:template>
|
6754
|
+
|
6611
6755
|
<!-- ============== -->
|
6612
6756
|
<!-- END: svg_update -->
|
6613
6757
|
<!-- ============== -->
|
@@ -7241,49 +7385,25 @@
|
|
7241
7385
|
<xsl:apply-templates mode="contents_item"/>
|
7242
7386
|
</xsl:template>
|
7243
7387
|
|
7244
|
-
<!--
|
7245
|
-
<!-- sourcecode
|
7246
|
-
<!--
|
7388
|
+
<!-- =============== -->
|
7389
|
+
<!-- sourcecode -->
|
7390
|
+
<!-- =============== -->
|
7247
7391
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
7248
7392
|
|
7249
|
-
<
|
7250
|
-
|
7251
|
-
|
7252
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7253
|
-
</xsl:if>
|
7393
|
+
<xsl:variable name="sourcecode_attributes">
|
7394
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
7395
|
+
<xsl:variable name="_font-size">
|
7254
7396
|
|
7255
|
-
|
7256
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
7257
|
-
</xsl:if>
|
7397
|
+
<!-- 9 -->
|
7258
7398
|
|
7259
|
-
|
7260
|
-
|
7261
|
-
|
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 -->
|
7273
|
-
|
7274
|
-
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
7275
|
-
<xsl:variable name="_font-size">
|
7276
|
-
|
7277
|
-
<!-- 9 -->
|
7278
|
-
|
7279
|
-
<!-- <xsl:if test="$namespace = 'ieee'">
|
7280
|
-
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
7281
|
-
</xsl:if> -->
|
7399
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
7400
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
7401
|
+
</xsl:if> -->
|
7282
7402
|
|
7283
|
-
|
7284
|
-
|
7285
|
-
|
7286
|
-
|
7403
|
+
<xsl:choose>
|
7404
|
+
<xsl:when test="ancestor::*[local-name() = 'table']">inherit</xsl:when>
|
7405
|
+
<xsl:otherwise>95%</xsl:otherwise><!-- 110% -->
|
7406
|
+
</xsl:choose>
|
7287
7407
|
|
7288
7408
|
</xsl:variable>
|
7289
7409
|
|
@@ -7298,26 +7418,74 @@
|
|
7298
7418
|
</xsl:choose>
|
7299
7419
|
</xsl:attribute>
|
7300
7420
|
</xsl:if>
|
7421
|
+
</xsl:element>
|
7422
|
+
</xsl:variable>
|
7301
7423
|
|
7302
|
-
|
7303
|
-
|
7304
|
-
|
7305
|
-
|
7424
|
+
<xsl:choose>
|
7425
|
+
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
7426
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
7427
|
+
<xsl:attribute name="{local-name()}">
|
7428
|
+
<xsl:value-of select="."/>
|
7429
|
+
</xsl:attribute>
|
7430
|
+
</xsl:for-each>
|
7431
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7432
|
+
</xsl:when>
|
7433
|
+
|
7434
|
+
<xsl:otherwise>
|
7435
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
7436
|
+
|
7437
|
+
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
7306
7438
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7307
|
-
|
7439
|
+
</xsl:if>
|
7440
|
+
|
7441
|
+
<xsl:if test="ancestor::*[local-name() = 'example']">
|
7308
7442
|
<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
7443
|
</xsl:if>
|
7315
7444
|
|
7316
|
-
|
7317
|
-
</fo:block>
|
7445
|
+
<xsl:copy-of select="@id"/>
|
7318
7446
|
|
7319
|
-
|
7320
|
-
|
7447
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
7448
|
+
<xsl:attribute name="margin-left">
|
7449
|
+
<xsl:choose>
|
7450
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
7451
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
7452
|
+
</xsl:choose>
|
7453
|
+
</xsl:attribute>
|
7454
|
+
|
7455
|
+
</xsl:if>
|
7456
|
+
<fo:block-container margin-left="0mm">
|
7457
|
+
|
7458
|
+
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name BEFORE content -->
|
7459
|
+
|
7460
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
7461
|
+
|
7462
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
7463
|
+
<xsl:attribute name="{local-name()}">
|
7464
|
+
<xsl:value-of select="."/>
|
7465
|
+
</xsl:attribute>
|
7466
|
+
</xsl:for-each>
|
7467
|
+
|
7468
|
+
<!-- background for image -->
|
7469
|
+
<xsl:if test="starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
|
7470
|
+
<xsl:attribute name="background-color">rgb(236,242,246)</xsl:attribute>
|
7471
|
+
<xsl:attribute name="padding-left">11mm</xsl:attribute>
|
7472
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7473
|
+
<xsl:attribute name="padding-right">11mm</xsl:attribute>
|
7474
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
7475
|
+
<xsl:attribute name="padding-top">7.5mm</xsl:attribute>
|
7476
|
+
<xsl:attribute name="padding-bottom">7.5mm</xsl:attribute>
|
7477
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'sourcecode'] and starts-with(*[local-name() = 'name']/text()[1], 'Figure ')">
|
7478
|
+
<xsl:attribute name="margin-bottom">16pt</xsl:attribute>
|
7479
|
+
</xsl:if>
|
7480
|
+
</xsl:if>
|
7481
|
+
|
7482
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7483
|
+
</fo:block>
|
7484
|
+
|
7485
|
+
</fo:block-container>
|
7486
|
+
</fo:block-container>
|
7487
|
+
</xsl:otherwise>
|
7488
|
+
</xsl:choose>
|
7321
7489
|
</xsl:template>
|
7322
7490
|
|
7323
7491
|
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -7559,8 +7727,22 @@
|
|
7559
7727
|
</fo:block>
|
7560
7728
|
</xsl:if>
|
7561
7729
|
</xsl:template>
|
7562
|
-
<!--
|
7563
|
-
<!--
|
7730
|
+
<!-- =============== -->
|
7731
|
+
<!-- END sourcecode -->
|
7732
|
+
<!-- =============== -->
|
7733
|
+
|
7734
|
+
<!-- =============== -->
|
7735
|
+
<!-- pre -->
|
7736
|
+
<!-- =============== -->
|
7737
|
+
<xsl:template match="*[local-name()='pre']" name="pre">
|
7738
|
+
<fo:block xsl:use-attribute-sets="pre-style">
|
7739
|
+
<xsl:copy-of select="@id"/>
|
7740
|
+
<xsl:apply-templates/>
|
7741
|
+
</fo:block>
|
7742
|
+
</xsl:template>
|
7743
|
+
<!-- =============== -->
|
7744
|
+
<!-- pre -->
|
7745
|
+
<!-- =============== -->
|
7564
7746
|
|
7565
7747
|
<!-- ========== -->
|
7566
7748
|
<!-- permission -->
|
@@ -9527,7 +9709,11 @@
|
|
9527
9709
|
<!-- ===================================== -->
|
9528
9710
|
<!-- Update xml -->
|
9529
9711
|
<!-- ===================================== -->
|
9530
|
-
<!--
|
9712
|
+
<!-- =========================================================================== -->
|
9713
|
+
<!-- STEP1: -->
|
9714
|
+
<!-- - Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9715
|
+
<!-- - Ignore 'span' without style -->
|
9716
|
+
<!-- =========================================================================== -->
|
9531
9717
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
9532
9718
|
<xsl:copy>
|
9533
9719
|
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
|
@@ -9609,7 +9795,8 @@
|
|
9609
9795
|
</xsl:copy>
|
9610
9796
|
</xsl:template>
|
9611
9797
|
|
9612
|
-
|
9798
|
+
<!-- Example with 'class': <span class="stdpublisher">ISO</span> <span class="stddocNumber">10303</span>-<span class="stddocPartNumber">1</span>:<span class="stdyear">1994</span> -->
|
9799
|
+
<xsl:template match="*[local-name() = 'span'][@style or @class = 'stdpublisher' or @class = 'stddocNumber' or @class = 'stddocPartNumber' or @class = 'stdyear']" mode="update_xml_step1" priority="2">
|
9613
9800
|
<xsl:copy>
|
9614
9801
|
<xsl:copy-of select="@*"/>
|
9615
9802
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -9619,10 +9806,15 @@
|
|
9619
9806
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
9620
9807
|
<xsl:apply-templates mode="update_xml_step1"/>
|
9621
9808
|
</xsl:template>
|
9622
|
-
|
9809
|
+
<!-- =========================================================================== -->
|
9623
9810
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9811
|
+
<!-- =========================================================================== -->
|
9624
9812
|
|
9813
|
+
<!-- =========================================================================== -->
|
9625
9814
|
<!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
9815
|
+
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
9816
|
+
<!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
|
9817
|
+
<!-- =========================================================================== -->
|
9626
9818
|
<!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
|
9627
9819
|
<xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
|
9628
9820
|
<xsl:copy>
|
@@ -9638,10 +9830,15 @@
|
|
9638
9830
|
<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
9831
|
|
9640
9832
|
<!-- 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
9833
|
<xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
9643
9834
|
<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="
|
9835
|
+
<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))"/>
|
9836
|
+
<xsl:variable name="text_">
|
9837
|
+
<xsl:choose>
|
9838
|
+
<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 -->
|
9839
|
+
<xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
|
9840
|
+
</xsl:choose>
|
9841
|
+
</xsl:variable>
|
9645
9842
|
<xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
|
9646
9843
|
<xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
|
9647
9844
|
<xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
|
@@ -9657,7 +9854,11 @@
|
|
9657
9854
|
</xsl:variable>
|
9658
9855
|
|
9659
9856
|
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
9660
|
-
|
9857
|
+
<!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
|
9858
|
+
<!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
|
9859
|
+
<!-- add < and > to \S -->
|
9860
|
+
<xsl:variable name="regex_S">[^\r\n\t\f\v \<>]</xsl:variable>
|
9861
|
+
<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
9862
|
<xsl:variable name="text3">
|
9662
9863
|
<text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
|
9663
9864
|
<xsl:choose>
|
@@ -9721,9 +9922,8 @@
|
|
9721
9922
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
9722
9923
|
</xsl:choose>
|
9723
9924
|
</xsl:template>
|
9724
|
-
|
9725
9925
|
<!-- ===================================== -->
|
9726
|
-
<!--
|
9926
|
+
<!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
9727
9927
|
<!-- ===================================== -->
|
9728
9928
|
|
9729
9929
|
<!-- for correct rendering combining chars -->
|
@@ -1152,7 +1152,7 @@
|
|
1152
1152
|
<data type="boolean"/>
|
1153
1153
|
</attribute>
|
1154
1154
|
</optional>
|
1155
|
-
<ref name="
|
1155
|
+
<ref name="ReducedBibliographicItem"/>
|
1156
1156
|
</element>
|
1157
1157
|
</define>
|
1158
1158
|
<define name="image" combine="choice">
|
@@ -2653,6 +2653,7 @@
|
|
2653
2653
|
<value>full</value>
|
2654
2654
|
<value>short</value>
|
2655
2655
|
<value>id</value>
|
2656
|
+
<value>modspec</value>
|
2656
2657
|
</choice>
|
2657
2658
|
</define>
|
2658
2659
|
<define name="erefTypeWithConnective">
|
data/metanorma-ribose.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(">= 2.7.0")
|
31
31
|
|
32
|
-
spec.add_dependency "metanorma-generic", "~> 2.
|
32
|
+
spec.add_dependency "metanorma-generic", "~> 2.3.0"
|
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-ribose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.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: 2022-
|
11
|
+
date: 2022-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.
|
26
|
+
version: 2.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -241,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
|
-
rubygems_version: 3.3.
|
244
|
+
rubygems_version: 3.3.26
|
245
245
|
signing_key:
|
246
246
|
specification_version: 4
|
247
247
|
summary: metanorma-ribose lets you write Ribose standards in AsciiDoc.
|