metanorma-ribose 2.1.10 → 2.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ribose/html/htmlstyle.css +1 -1
- data/lib/isodoc/ribose/ribose.standard.xsl +128 -29
- data/lib/metanorma/ribose/basicdoc.rng +0 -27
- data/lib/metanorma/ribose/biblio-standoc.rng +164 -0
- data/lib/metanorma/ribose/biblio.rng +50 -18
- data/lib/metanorma/ribose/isodoc.rng +68 -206
- data/lib/metanorma/ribose/relaton-ribose.rng +58 -0
- data/lib/metanorma/ribose/rsd.rng +1 -50
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma-ribose.gemspec +3 -2
- metadata +6 -10
- data/.github/workflows/rake.yml +0 -15
- data/.github/workflows/release.yml +0 -24
- data/Rakefile +0 -8
- data/bin/console +0 -14
- data/bin/rspec +0 -17
- data/bin/setup +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 268b734209bf9e456b7d95d528e6a2c4f14fe95f1f92e3e83dacb4c16f8ebada
|
4
|
+
data.tar.gz: 0ab71f407a6def8ea94f1e7018fa3a6d13e43e05c700174851fc5e28e0ca8dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7a1d13851816a8cbcccf78966735ecd2054afe1620da5c229a33f256b2f2fbdf8556a210e64318b71d9a4a20fbd01b6dff0b9f80b4fbb8bb07cfec644777518
|
7
|
+
data.tar.gz: 3c4a06497c211388410f5f0890668de4bb6feffa2ae78a9b8598ebb15258eca8604cb21ff87a0ec53e8e0f5f1466c6bbc1c04fc293b8a3f36bc90d07431c7f8d
|
@@ -320,7 +320,7 @@
|
|
320
320
|
</fo:block-container>
|
321
321
|
|
322
322
|
<!-- Ribose logo -->
|
323
|
-
<fo:block-container absolute-position="fixed" left="171mm" top="{$pageHeight - 33.4}mm" height="30mm" width="40mm"> <!-- top="246mm" -->
|
323
|
+
<fo:block-container absolute-position="fixed" left="171mm" top="{$pageHeight - 33.4}mm" height="30mm" width="40mm" id="__internal_layout__logo_{generate-id()}"> <!-- top="246mm" -->
|
324
324
|
<fo:block>
|
325
325
|
<fo:instream-foreign-object content-width="32mm" fox:alt-text="Ribose Logo">
|
326
326
|
<xsl:copy-of select="$Ribose-Logo"/>
|
@@ -405,7 +405,9 @@
|
|
405
405
|
|
406
406
|
<!-- ToC pages -->
|
407
407
|
<fo:page-sequence master-reference="document" force-page-count="no-force"> <!-- master-reference="toc" -->
|
408
|
-
<xsl:call-template name="insertHeaderFooter"
|
408
|
+
<xsl:call-template name="insertHeaderFooter">
|
409
|
+
<xsl:with-param name="section">toc</xsl:with-param>
|
410
|
+
</xsl:call-template>
|
409
411
|
<fo:flow flow-name="xsl-region-body">
|
410
412
|
<xsl:if test="$contents//item[@display = 'true']">
|
411
413
|
<fo:block role="TOC">
|
@@ -493,7 +495,9 @@
|
|
493
495
|
<fo:leader leader-pattern="rule" leader-length="30%"/>
|
494
496
|
</fo:block>
|
495
497
|
</fo:static-content>
|
496
|
-
<xsl:call-template name="insertHeaderFooter"
|
498
|
+
<xsl:call-template name="insertHeaderFooter">
|
499
|
+
<xsl:with-param name="section">main</xsl:with-param>
|
500
|
+
</xsl:call-template>
|
497
501
|
<fo:flow flow-name="xsl-region-body">
|
498
502
|
|
499
503
|
<fo:block line-height="130%">
|
@@ -983,7 +987,7 @@
|
|
983
987
|
</xsl:template>
|
984
988
|
|
985
989
|
<xsl:template name="insertHeaderFooter">
|
986
|
-
|
990
|
+
<xsl:param name="section"/>
|
987
991
|
<!-- LT - left top -->
|
988
992
|
<!-- RT - right top -->
|
989
993
|
<!-- LB - left bottom -->
|
@@ -995,28 +999,28 @@
|
|
995
999
|
<xsl:variable name="top_bottom">194</xsl:variable>
|
996
1000
|
<!-- Yellow -->
|
997
1001
|
<fo:static-content flow-name="header-LT-yellow" role="artifact">
|
998
|
-
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0">
|
1002
|
+
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0" id="__internal_layout__header-LT-yellow_{$section}_{generate-id()}">
|
999
1003
|
<fo:block>
|
1000
1004
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1001
1005
|
</fo:block>
|
1002
1006
|
</fo:block-container>
|
1003
1007
|
</fo:static-content>
|
1004
1008
|
<fo:static-content flow-name="header-RT-yellow" role="artifact">
|
1005
|
-
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0">
|
1009
|
+
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0" id="__internal_layout__header-RT-yellow_{$section}_{generate-id()}">
|
1006
1010
|
<fo:block>
|
1007
1011
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1008
1012
|
</fo:block>
|
1009
1013
|
</fo:block-container>
|
1010
1014
|
</fo:static-content>
|
1011
1015
|
<fo:static-content flow-name="header-LB-yellow" role="artifact">
|
1012
|
-
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0">
|
1016
|
+
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0" id="__internal_layout__header-LB-yellow_{$section}_{generate-id()}">
|
1013
1017
|
<fo:block>
|
1014
1018
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1015
1019
|
</fo:block>
|
1016
1020
|
</fo:block-container>
|
1017
1021
|
</fo:static-content>
|
1018
1022
|
<fo:static-content flow-name="header-RB-yellow" role="artifact">
|
1019
|
-
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0">
|
1023
|
+
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0" id="__internal_layout__header-RB-yellow_{$section}_{generate-id()}">
|
1020
1024
|
<fo:block>
|
1021
1025
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-yellow-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1022
1026
|
</fo:block>
|
@@ -1024,28 +1028,28 @@
|
|
1024
1028
|
</fo:static-content>
|
1025
1029
|
<!-- Blue -->
|
1026
1030
|
<fo:static-content flow-name="header-LT-blue" role="artifact">
|
1027
|
-
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0">
|
1031
|
+
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0" id="__internal_layout__header-LT-blue_{$section}_{generate-id()}">
|
1028
1032
|
<fo:block>
|
1029
1033
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1030
1034
|
</fo:block>
|
1031
1035
|
</fo:block-container>
|
1032
1036
|
</fo:static-content>
|
1033
1037
|
<fo:static-content flow-name="header-RT-blue" role="artifact">
|
1034
|
-
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0">
|
1038
|
+
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0" id="__internal_layout__header-RT-blue_{$section}_{generate-id()}">
|
1035
1039
|
<fo:block>
|
1036
1040
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1037
1041
|
</fo:block>
|
1038
1042
|
</fo:block-container>
|
1039
1043
|
</fo:static-content>
|
1040
1044
|
<fo:static-content flow-name="header-LB-blue" role="artifact">
|
1041
|
-
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0">
|
1045
|
+
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0" id="__internal_layout__header-LB-blue_{$section}_{generate-id()}">
|
1042
1046
|
<fo:block>
|
1043
1047
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1044
1048
|
</fo:block>
|
1045
1049
|
</fo:block-container>
|
1046
1050
|
</fo:static-content>
|
1047
1051
|
<fo:static-content flow-name="header-RB-blue" role="artifact">
|
1048
|
-
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0">
|
1052
|
+
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0" id="__internal_layout__header-RB-blue_{$section}_{generate-id()}">
|
1049
1053
|
<fo:block>
|
1050
1054
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-blue-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1051
1055
|
</fo:block>
|
@@ -1053,28 +1057,28 @@
|
|
1053
1057
|
</fo:static-content>
|
1054
1058
|
<!-- Orange -->
|
1055
1059
|
<fo:static-content flow-name="header-LT-orange" role="artifact">
|
1056
|
-
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0">
|
1060
|
+
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_top}mm" font-size="0" id="__internal_layout__header-LT-orange_{$section}_{generate-id()}">
|
1057
1061
|
<fo:block>
|
1058
1062
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1059
1063
|
</fo:block>
|
1060
1064
|
</fo:block-container>
|
1061
1065
|
</fo:static-content>
|
1062
1066
|
<fo:static-content flow-name="header-RT-orange" role="artifact">
|
1063
|
-
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0">
|
1067
|
+
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_top}mm" font-size="0" id="__internal_layout__header-RT-orange_{$section}_{generate-id()}">
|
1064
1068
|
<fo:block>
|
1065
1069
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1066
1070
|
</fo:block>
|
1067
1071
|
</fo:block-container>
|
1068
1072
|
</fo:static-content>
|
1069
1073
|
<fo:static-content flow-name="header-LB-orange" role="artifact">
|
1070
|
-
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0">
|
1074
|
+
<fo:block-container absolute-position="fixed" left="{$left_left}mm" top="{$top_bottom}mm" font-size="0" id="__internal_layout__header-LB-orange_{$section}_{generate-id()}">
|
1071
1075
|
<fo:block>
|
1072
1076
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-left))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1073
1077
|
</fo:block>
|
1074
1078
|
</fo:block-container>
|
1075
1079
|
</fo:static-content>
|
1076
1080
|
<fo:static-content flow-name="header-RB-orange" role="artifact">
|
1077
|
-
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0">
|
1081
|
+
<fo:block-container absolute-position="fixed" left="{$left_right}mm" top="{$top_bottom}mm" font-size="0" id="__internal_layout__header-RB-orange_{$section}_{generate-id()}">
|
1078
1082
|
<fo:block>
|
1079
1083
|
<fo:external-graphic src="{concat('data:image/png;base64,', normalize-space($Image-Page-Background-orange-right))}" content-width="100%" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Page"/>
|
1080
1084
|
</fo:block>
|
@@ -1724,6 +1728,11 @@
|
|
1724
1728
|
</xsl:variable>
|
1725
1729
|
<xsl:variable name="table-border" select="normalize-space($table-border_)"/>
|
1726
1730
|
|
1731
|
+
<xsl:variable name="table-cell-border_">
|
1732
|
+
|
1733
|
+
</xsl:variable>
|
1734
|
+
<xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
|
1735
|
+
|
1727
1736
|
<xsl:attribute-set name="table-container-style">
|
1728
1737
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1729
1738
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -1735,8 +1744,6 @@
|
|
1735
1744
|
<xsl:attribute-set name="table-style">
|
1736
1745
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
1737
1746
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
1738
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
1739
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
1740
1747
|
|
1741
1748
|
<xsl:attribute name="border">0pt solid black</xsl:attribute>
|
1742
1749
|
<xsl:attribute name="font-size">9.5pt</xsl:attribute> <!-- 8pt -->
|
@@ -2917,6 +2924,12 @@
|
|
2917
2924
|
<xsl:variable name="table_attributes">
|
2918
2925
|
|
2919
2926
|
<xsl:element name="table_attributes" use-attribute-sets="table-style">
|
2927
|
+
|
2928
|
+
<xsl:if test="$margin-side != 0">
|
2929
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
2930
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
2931
|
+
</xsl:if>
|
2932
|
+
|
2920
2933
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
2921
2934
|
|
2922
2935
|
</xsl:element>
|
@@ -3673,6 +3686,10 @@
|
|
3673
3686
|
<xsl:template match="*[local-name()='tr']">
|
3674
3687
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
3675
3688
|
|
3689
|
+
<xsl:if test="*[local-name() = 'th']">
|
3690
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
3691
|
+
</xsl:if>
|
3692
|
+
|
3676
3693
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
3677
3694
|
<xsl:if test="$number mod 2 = 0">
|
3678
3695
|
<xsl:attribute name="background-color">rgb(254, 247, 228)</xsl:attribute>
|
@@ -4726,8 +4743,17 @@
|
|
4726
4743
|
</fo:inline>
|
4727
4744
|
</xsl:template> <!-- tt -->
|
4728
4745
|
|
4746
|
+
<xsl:variable name="regex_url_start">^(http://|https://|www\.)?(.*)</xsl:variable>
|
4729
4747
|
<xsl:template match="*[local-name()='tt']/text()" priority="2">
|
4730
|
-
<xsl:
|
4748
|
+
<xsl:choose>
|
4749
|
+
<xsl:when test="java:replaceAll(java:java.lang.String.new(.), '$2', '') != ''">
|
4750
|
+
<!-- url -->
|
4751
|
+
<xsl:call-template name="add-zero-spaces-link-java"/>
|
4752
|
+
</xsl:when>
|
4753
|
+
<xsl:otherwise>
|
4754
|
+
<xsl:call-template name="add_spaces_to_sourcecode"/>
|
4755
|
+
</xsl:otherwise>
|
4756
|
+
</xsl:choose>
|
4731
4757
|
</xsl:template>
|
4732
4758
|
|
4733
4759
|
<xsl:template match="*[local-name()='underline']">
|
@@ -5083,8 +5109,11 @@
|
|
5083
5109
|
|
5084
5110
|
<xsl:template name="add-zero-spaces-link-java">
|
5085
5111
|
<xsl:param name="text" select="."/>
|
5112
|
+
|
5113
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
5114
|
+
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
5086
5115
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
5087
|
-
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($
|
5116
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
5088
5117
|
</xsl:template>
|
5089
5118
|
|
5090
5119
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -5641,6 +5670,9 @@
|
|
5641
5670
|
<xsl:value-of select="substring($str, 2)"/>
|
5642
5671
|
</xsl:template>
|
5643
5672
|
|
5673
|
+
<!-- ======================================= -->
|
5674
|
+
<!-- math -->
|
5675
|
+
<!-- ======================================= -->
|
5644
5676
|
<xsl:template match="mathml:math">
|
5645
5677
|
<xsl:variable name="isAdded" select="@added"/>
|
5646
5678
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -5691,14 +5723,57 @@
|
|
5691
5723
|
<xsl:value-of select="$comment_text"/>
|
5692
5724
|
</xsl:template>
|
5693
5725
|
|
5726
|
+
<xsl:template match="*[local-name() = 'asciimath']">
|
5727
|
+
<xsl:param name="process" select="'false'"/>
|
5728
|
+
<xsl:if test="$process = 'true'">
|
5729
|
+
<xsl:apply-templates/>
|
5730
|
+
</xsl:if>
|
5731
|
+
</xsl:template>
|
5732
|
+
|
5733
|
+
<xsl:template match="*[local-name() = 'latexmath']"/>
|
5734
|
+
|
5735
|
+
<xsl:template name="getMathml_asciimath_text">
|
5736
|
+
<xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
|
5737
|
+
<xsl:variable name="latexmath">
|
5738
|
+
|
5739
|
+
</xsl:variable>
|
5740
|
+
<xsl:variable name="asciimath_text_following">
|
5741
|
+
<xsl:choose>
|
5742
|
+
<xsl:when test="normalize-space($latexmath) != ''">
|
5743
|
+
<xsl:value-of select="$latexmath"/>
|
5744
|
+
</xsl:when>
|
5745
|
+
<xsl:when test="normalize-space($asciimath) != ''">
|
5746
|
+
<xsl:value-of select="$asciimath"/>
|
5747
|
+
</xsl:when>
|
5748
|
+
<xsl:otherwise>
|
5749
|
+
<xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
|
5750
|
+
</xsl:otherwise>
|
5751
|
+
</xsl:choose>
|
5752
|
+
</xsl:variable>
|
5753
|
+
<xsl:variable name="asciimath_text_">
|
5754
|
+
<xsl:choose>
|
5755
|
+
<xsl:when test="normalize-space($asciimath_text_following) != ''">
|
5756
|
+
<xsl:value-of select="$asciimath_text_following"/>
|
5757
|
+
</xsl:when>
|
5758
|
+
<xsl:otherwise>
|
5759
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
5760
|
+
</xsl:otherwise>
|
5761
|
+
</xsl:choose>
|
5762
|
+
</xsl:variable>
|
5763
|
+
<xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
|
5764
|
+
<xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
|
5765
|
+
<xsl:value-of select="$asciimath_text"/>
|
5766
|
+
</xsl:template>
|
5767
|
+
|
5694
5768
|
<xsl:template name="mathml_instream_object">
|
5695
|
-
<xsl:param name="
|
5769
|
+
<xsl:param name="asciimath_text"/>
|
5696
5770
|
<xsl:param name="mathml_content"/>
|
5697
5771
|
|
5698
|
-
<xsl:variable name="
|
5772
|
+
<xsl:variable name="asciimath_text_">
|
5699
5773
|
<xsl:choose>
|
5700
|
-
<xsl:when test="normalize-space($
|
5701
|
-
<xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
|
5774
|
+
<xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
|
5775
|
+
<!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
|
5776
|
+
<xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
|
5702
5777
|
</xsl:choose>
|
5703
5778
|
</xsl:variable>
|
5704
5779
|
|
@@ -5715,10 +5790,10 @@
|
|
5715
5790
|
</xsl:attribute>
|
5716
5791
|
|
5717
5792
|
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
5718
|
-
<xsl:if test="normalize-space($
|
5793
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
5719
5794
|
<!-- put Mathin Alternate Text -->
|
5720
5795
|
<xsl:attribute name="fox:alt-text">
|
5721
|
-
<xsl:value-of select="$
|
5796
|
+
<xsl:value-of select="$asciimath_text_"/>
|
5722
5797
|
</xsl:attribute>
|
5723
5798
|
</xsl:if>
|
5724
5799
|
<!-- </xsl:if> -->
|
@@ -5791,6 +5866,29 @@
|
|
5791
5866
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
5792
5867
|
</xsl:template>
|
5793
5868
|
|
5869
|
+
<!-- Examples:
|
5870
|
+
<stem type="AsciiMath">x = 1</stem>
|
5871
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
5872
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
5873
|
+
-->
|
5874
|
+
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
5875
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
5876
|
+
|
5877
|
+
<xsl:choose>
|
5878
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
5879
|
+
<xsl:otherwise>
|
5880
|
+
<xsl:apply-templates>
|
5881
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
5882
|
+
</xsl:apply-templates>
|
5883
|
+
</xsl:otherwise>
|
5884
|
+
</xsl:choose>
|
5885
|
+
|
5886
|
+
</fo:inline>
|
5887
|
+
</xsl:template>
|
5888
|
+
<!-- ======================================= -->
|
5889
|
+
<!-- END: math -->
|
5890
|
+
<!-- ======================================= -->
|
5891
|
+
|
5794
5892
|
<xsl:template match="*[local-name()='localityStack']"/>
|
5795
5893
|
|
5796
5894
|
<xsl:template match="*[local-name()='link']" name="link">
|
@@ -9537,7 +9635,7 @@
|
|
9537
9635
|
|
9538
9636
|
<xsl:variable name="element_name_keep-together_within-line">keep-together_within-line</xsl:variable>
|
9539
9637
|
|
9540
|
-
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'sourcecode'] or
|
9638
|
+
<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">
|
9541
9639
|
|
9542
9640
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
9543
9641
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
@@ -10013,13 +10111,14 @@
|
|
10013
10111
|
</xsl:template>
|
10014
10112
|
|
10015
10113
|
<xsl:template name="setId">
|
10114
|
+
<xsl:param name="prefix"/>
|
10016
10115
|
<xsl:attribute name="id">
|
10017
10116
|
<xsl:choose>
|
10018
10117
|
<xsl:when test="@id">
|
10019
|
-
<xsl:value-of select="@id"/>
|
10118
|
+
<xsl:value-of select="concat($prefix, @id)"/>
|
10020
10119
|
</xsl:when>
|
10021
10120
|
<xsl:otherwise>
|
10022
|
-
<xsl:value-of select="generate-id()"/>
|
10121
|
+
<xsl:value-of select="concat($prefix, generate-id())"/>
|
10023
10122
|
</xsl:otherwise>
|
10024
10123
|
</xsl:choose>
|
10025
10124
|
</xsl:attribute>
|
@@ -1,10 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
3
|
-
<include href="biblio.rng">
|
4
|
-
<start>
|
5
|
-
<ref name="document"/>
|
6
|
-
</start>
|
7
|
-
</include>
|
8
3
|
<define name="document">
|
9
4
|
<element name="document">
|
10
5
|
<optional>
|
@@ -1125,26 +1120,4 @@
|
|
1125
1120
|
</zeroOrMore>
|
1126
1121
|
</element>
|
1127
1122
|
</define>
|
1128
|
-
<define name="ext">
|
1129
|
-
<element name="ext">
|
1130
|
-
<ref name="BibDataExtensionType"/>
|
1131
|
-
</element>
|
1132
|
-
</define>
|
1133
|
-
<define name="BibDataExtensionType">
|
1134
|
-
<ref name="doctype"/>
|
1135
|
-
</define>
|
1136
|
-
<define name="doctype">
|
1137
|
-
<element name="doctype">
|
1138
|
-
<ref name="DocumentType"/>
|
1139
|
-
</element>
|
1140
|
-
</define>
|
1141
|
-
<define name="DocumentType">
|
1142
|
-
<value>document</value>
|
1143
|
-
</define>
|
1144
|
-
<define name="BibData">
|
1145
|
-
<ref name="BibliographicItem"/>
|
1146
|
-
<optional>
|
1147
|
-
<ref name="ext"/>
|
1148
|
-
</optional>
|
1149
|
-
</define>
|
1150
1123
|
</grammar>
|
@@ -0,0 +1,164 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
3
|
+
<!--
|
4
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
|
+
of relaton
|
6
|
+
|
7
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
8
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
9
|
+
-->
|
10
|
+
<include href="biblio.rng">
|
11
|
+
<define name="BibData">
|
12
|
+
<ref name="BibliographicItem"/>
|
13
|
+
<optional>
|
14
|
+
<ref name="ext"/>
|
15
|
+
</optional>
|
16
|
+
</define>
|
17
|
+
</include>
|
18
|
+
<define name="ext">
|
19
|
+
<element name="ext">
|
20
|
+
<ref name="BibDataExtensionType"/>
|
21
|
+
</element>
|
22
|
+
</define>
|
23
|
+
<define name="BibDataExtensionType">
|
24
|
+
<optional>
|
25
|
+
<attribute name="schema-version"/>
|
26
|
+
</optional>
|
27
|
+
<ref name="doctype"/>
|
28
|
+
<optional>
|
29
|
+
<ref name="docsubtype"/>
|
30
|
+
</optional>
|
31
|
+
<optional>
|
32
|
+
<ref name="editorialgroup"/>
|
33
|
+
</optional>
|
34
|
+
<zeroOrMore>
|
35
|
+
<ref name="ics"/>
|
36
|
+
</zeroOrMore>
|
37
|
+
<zeroOrMore>
|
38
|
+
<ref name="structuredidentifier"/>
|
39
|
+
</zeroOrMore>
|
40
|
+
</define>
|
41
|
+
<define name="doctype">
|
42
|
+
<element name="doctype">
|
43
|
+
<optional>
|
44
|
+
<attribute name="abbreviation"/>
|
45
|
+
</optional>
|
46
|
+
<ref name="DocumentType"/>
|
47
|
+
</element>
|
48
|
+
</define>
|
49
|
+
<define name="DocumentType">
|
50
|
+
<value>document</value>
|
51
|
+
</define>
|
52
|
+
<define name="docsubtype">
|
53
|
+
<element name="subdoctype">
|
54
|
+
<ref name="DocumentSubtype"/>
|
55
|
+
</element>
|
56
|
+
</define>
|
57
|
+
<define name="DocumentSubtype">
|
58
|
+
<text/>
|
59
|
+
</define>
|
60
|
+
<define name="editorialgroup">
|
61
|
+
<element name="editorialgroup">
|
62
|
+
<oneOrMore>
|
63
|
+
<ref name="technical-committee"/>
|
64
|
+
</oneOrMore>
|
65
|
+
</element>
|
66
|
+
</define>
|
67
|
+
<define name="technical-committee">
|
68
|
+
<element name="technical-committee">
|
69
|
+
<ref name="IsoWorkgroup"/>
|
70
|
+
</element>
|
71
|
+
</define>
|
72
|
+
<define name="IsoWorkgroup">
|
73
|
+
<optional>
|
74
|
+
<attribute name="number"/>
|
75
|
+
</optional>
|
76
|
+
<optional>
|
77
|
+
<attribute name="type"/>
|
78
|
+
</optional>
|
79
|
+
<optional>
|
80
|
+
<attribute name="identifier"/>
|
81
|
+
</optional>
|
82
|
+
<optional>
|
83
|
+
<attribute name="prefix"/>
|
84
|
+
</optional>
|
85
|
+
<text/>
|
86
|
+
</define>
|
87
|
+
<define name="ics">
|
88
|
+
<element name="ics">
|
89
|
+
<element name="code">
|
90
|
+
<text/>
|
91
|
+
</element>
|
92
|
+
<optional>
|
93
|
+
<element name="text">
|
94
|
+
<text/>
|
95
|
+
</element>
|
96
|
+
</optional>
|
97
|
+
</element>
|
98
|
+
</define>
|
99
|
+
<define name="structuredidentifier">
|
100
|
+
<element name="structuredidentifier">
|
101
|
+
<optional>
|
102
|
+
<attribute name="type"/>
|
103
|
+
</optional>
|
104
|
+
<oneOrMore>
|
105
|
+
<element name="agency">
|
106
|
+
<text/>
|
107
|
+
</element>
|
108
|
+
</oneOrMore>
|
109
|
+
<optional>
|
110
|
+
<element name="class">
|
111
|
+
<text/>
|
112
|
+
</element>
|
113
|
+
</optional>
|
114
|
+
<element name="docnumber">
|
115
|
+
<text/>
|
116
|
+
</element>
|
117
|
+
<optional>
|
118
|
+
<element name="partnumber">
|
119
|
+
<text/>
|
120
|
+
</element>
|
121
|
+
</optional>
|
122
|
+
<optional>
|
123
|
+
<element name="edition">
|
124
|
+
<text/>
|
125
|
+
</element>
|
126
|
+
</optional>
|
127
|
+
<optional>
|
128
|
+
<element name="version">
|
129
|
+
<text/>
|
130
|
+
</element>
|
131
|
+
</optional>
|
132
|
+
<optional>
|
133
|
+
<element name="supplementtype">
|
134
|
+
<text/>
|
135
|
+
</element>
|
136
|
+
</optional>
|
137
|
+
<optional>
|
138
|
+
<element name="supplementnumber">
|
139
|
+
<text/>
|
140
|
+
</element>
|
141
|
+
</optional>
|
142
|
+
<optional>
|
143
|
+
<element name="amendment">
|
144
|
+
<text/>
|
145
|
+
</element>
|
146
|
+
</optional>
|
147
|
+
<optional>
|
148
|
+
<element name="corrigendum">
|
149
|
+
<text/>
|
150
|
+
</element>
|
151
|
+
</optional>
|
152
|
+
<optional>
|
153
|
+
<element name="language">
|
154
|
+
<text/>
|
155
|
+
</element>
|
156
|
+
</optional>
|
157
|
+
<optional>
|
158
|
+
<element name="year">
|
159
|
+
<text/>
|
160
|
+
</element>
|
161
|
+
</optional>
|
162
|
+
</element>
|
163
|
+
</define>
|
164
|
+
</grammar>
|