metanorma-ogc 2.2.5 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/html/htmlstyle.css +6 -0
- data/lib/isodoc/ogc/html/htmlstyle.scss +1 -0
- data/lib/isodoc/ogc/metadata.rb +7 -6
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +122 -16
- data/lib/isodoc/ogc/ogc.best-practice.xsl +122 -16
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +122 -16
- data/lib/isodoc/ogc/ogc.community-practice.xsl +122 -16
- data/lib/isodoc/ogc/ogc.community-standard.xsl +122 -16
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +122 -16
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +10902 -0
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +122 -16
- data/lib/isodoc/ogc/ogc.other.xsl +122 -16
- data/lib/isodoc/ogc/ogc.policy.xsl +122 -16
- data/lib/isodoc/ogc/ogc.reference-model.xsl +122 -16
- data/lib/isodoc/ogc/ogc.release-notes.xsl +122 -16
- data/lib/isodoc/ogc/ogc.standard.xsl +122 -16
- data/lib/isodoc/ogc/ogc.test-suite.xsl +122 -16
- data/lib/isodoc/ogc/ogc.user-guide.xsl +122 -16
- data/lib/isodoc/ogc/ogc.white-paper.xsl +120 -15
- data/lib/isodoc/ogc/pdf_convert.rb +5 -4
- data/lib/isodoc/ogc/presentation_xml_convert.rb +5 -5
- data/lib/metanorma/ogc/biblio.rng +5 -0
- data/lib/metanorma/ogc/cleanup.rb +14 -14
- data/lib/metanorma/ogc/converter.rb +2 -2
- data/lib/metanorma/ogc/front.rb +12 -8
- data/lib/metanorma/ogc/isodoc.rng +46 -12
- data/lib/metanorma/ogc/relaton-ogc.rng +1 -0
- data/lib/metanorma/ogc/validate.rb +15 -15
- data/lib/metanorma/ogc/version.rb +1 -1
- data/metanorma-ogc.gemspec +3 -2
- metadata +5 -11
- data/.github/workflows/automerge.yml +0 -31
- 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: 6ae48fbcbe15955982e5f3af106711b970fb68fe864f978a92bc39dc8844bb34
|
|
4
|
+
data.tar.gz: a9c1ec81b04dbd973f6a43fdd9a8371f13c442c9c88bce45901cfde102cb0863
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0a617dd4f0bb0de1e0420fbe7a3c198cd1de02d69b5832fa0bb8603e7eda07f645e44caec0e9293e424cc31c4de52f584d50b3b8eb759f5f5c16c7bb7db083a2
|
|
7
|
+
data.tar.gz: f1eb4e409703355e1759044d8b6e31058bd1aae151a94d927b94eaf034f3a614df7bb7fcff0fc32c554d485c379e8e02712dbbcc3635cd3830adf331b9e56305
|
|
@@ -130,6 +130,12 @@ a.FootnoteRef + a.FootnoteRef:before {
|
|
|
130
130
|
#standard {
|
|
131
131
|
border-bottom: solid 3px #3D9970; }
|
|
132
132
|
|
|
133
|
+
#draft-standard-band {
|
|
134
|
+
background-color: #3D9970; }
|
|
135
|
+
|
|
136
|
+
#draft-standard {
|
|
137
|
+
border-bottom: solid 3px #3D9970; }
|
|
138
|
+
|
|
133
139
|
#abstract-specification-topic-band {
|
|
134
140
|
background-color: #3D9970; }
|
|
135
141
|
|
data/lib/isodoc/ogc/metadata.rb
CHANGED
|
@@ -5,6 +5,7 @@ module IsoDoc
|
|
|
5
5
|
module Ogc
|
|
6
6
|
DOCTYPE_ABBR = {
|
|
7
7
|
"standard" => "IS",
|
|
8
|
+
"draft-standard" => "DS",
|
|
8
9
|
"abstract-specification-topic" => "AST",
|
|
9
10
|
"best-practice" => "BP",
|
|
10
11
|
"change-request-supporting-document" => "CRSD",
|
|
@@ -57,22 +58,22 @@ module IsoDoc
|
|
|
57
58
|
def author(isoxml, _out)
|
|
58
59
|
tc = isoxml.at(ns("//bibdata/ext/editorialgroup/committee"))
|
|
59
60
|
set(:tc, tc.text) if tc
|
|
60
|
-
authors = isoxml.xpath(ns("//bibdata/contributor"\
|
|
61
|
+
authors = isoxml.xpath(ns("//bibdata/contributor" \
|
|
61
62
|
"[role/@type = 'author']/person"))
|
|
62
63
|
set(:authors, extract_person_names(authors))
|
|
63
|
-
editors = isoxml.xpath(ns("//bibdata/contributor"\
|
|
64
|
+
editors = isoxml.xpath(ns("//bibdata/contributor" \
|
|
64
65
|
"[role/@type = 'editor']/person"))
|
|
65
66
|
set(:editors, extract_person_names(editors))
|
|
66
|
-
contributors = isoxml.xpath(ns("//bibdata/contributor"\
|
|
67
|
-
|
|
67
|
+
contributors = isoxml.xpath(ns("//bibdata/contributor" \
|
|
68
|
+
"[role/@type = 'contributor']/person"))
|
|
68
69
|
set(:contributors, extract_person_names(contributors))
|
|
69
70
|
agency(isoxml)
|
|
70
71
|
end
|
|
71
72
|
|
|
72
73
|
def docid(isoxml, _out)
|
|
73
|
-
set(:docnumber, isoxml&.at(ns("//bibdata/docidentifier"\
|
|
74
|
+
set(:docnumber, isoxml&.at(ns("//bibdata/docidentifier" \
|
|
74
75
|
"[@type = 'ogc-internal']"))&.text)
|
|
75
|
-
set(:externalid, isoxml&.at(ns("//bibdata/docidentifier"\
|
|
76
|
+
set(:externalid, isoxml&.at(ns("//bibdata/docidentifier" \
|
|
76
77
|
"[@type = 'ogc-external']"))&.text)
|
|
77
78
|
end
|
|
78
79
|
|
|
@@ -1143,7 +1143,7 @@
|
|
|
1143
1143
|
<xsl:template name="insertHeaderFooter">
|
|
1144
1144
|
<xsl:param name="color" select="$color_blue"/>
|
|
1145
1145
|
<fo:static-content flow-name="footer" role="artifact">
|
|
1146
|
-
<fo:block-container font-size="8pt"
|
|
1146
|
+
<fo:block-container font-size="8pt" color="{$color}" padding-top="6mm">
|
|
1147
1147
|
<fo:table table-layout="fixed" width="100%">
|
|
1148
1148
|
<fo:table-column column-width="90%"/>
|
|
1149
1149
|
<fo:table-column column-width="10%"/>
|
|
@@ -1883,6 +1883,15 @@
|
|
|
1883
1883
|
|
|
1884
1884
|
</xsl:attribute-set>
|
|
1885
1885
|
|
|
1886
|
+
<xsl:attribute-set name="pre-style">
|
|
1887
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
1888
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1889
|
+
|
|
1890
|
+
<xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
1891
|
+
<xsl:attribute name="line-height">113%</xsl:attribute>
|
|
1892
|
+
|
|
1893
|
+
</xsl:attribute-set>
|
|
1894
|
+
|
|
1886
1895
|
<xsl:attribute-set name="permission-style">
|
|
1887
1896
|
|
|
1888
1897
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
@@ -2026,6 +2035,11 @@
|
|
|
2026
2035
|
</xsl:variable>
|
|
2027
2036
|
<xsl:variable name="table-border" select="normalize-space($table-border_)"/>
|
|
2028
2037
|
|
|
2038
|
+
<xsl:variable name="table-cell-border_">
|
|
2039
|
+
|
|
2040
|
+
</xsl:variable>
|
|
2041
|
+
<xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
|
|
2042
|
+
|
|
2029
2043
|
<xsl:attribute-set name="table-container-style">
|
|
2030
2044
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2031
2045
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
@@ -2037,8 +2051,6 @@
|
|
|
2037
2051
|
<xsl:attribute-set name="table-style">
|
|
2038
2052
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
|
2039
2053
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
|
2040
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2041
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
2042
2054
|
|
|
2043
2055
|
</xsl:attribute-set><!-- table-style -->
|
|
2044
2056
|
|
|
@@ -3208,6 +3220,12 @@
|
|
|
3208
3220
|
<xsl:variable name="table_attributes">
|
|
3209
3221
|
|
|
3210
3222
|
<xsl:element name="table_attributes" use-attribute-sets="table-style">
|
|
3223
|
+
|
|
3224
|
+
<xsl:if test="$margin-side != 0">
|
|
3225
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
3226
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
3227
|
+
</xsl:if>
|
|
3228
|
+
|
|
3211
3229
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
|
3212
3230
|
|
|
3213
3231
|
</xsl:element>
|
|
@@ -3961,6 +3979,10 @@
|
|
|
3961
3979
|
<xsl:template match="*[local-name()='tr']">
|
|
3962
3980
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
|
3963
3981
|
|
|
3982
|
+
<xsl:if test="*[local-name() = 'th']">
|
|
3983
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3984
|
+
</xsl:if>
|
|
3985
|
+
|
|
3964
3986
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
|
3965
3987
|
<xsl:attribute name="background-color">
|
|
3966
3988
|
<xsl:choose>
|
|
@@ -5953,6 +5975,9 @@
|
|
|
5953
5975
|
<xsl:value-of select="substring($str, 2)"/>
|
|
5954
5976
|
</xsl:template>
|
|
5955
5977
|
|
|
5978
|
+
<!-- ======================================= -->
|
|
5979
|
+
<!-- math -->
|
|
5980
|
+
<!-- ======================================= -->
|
|
5956
5981
|
<xsl:template match="mathml:math">
|
|
5957
5982
|
<xsl:variable name="isAdded" select="@added"/>
|
|
5958
5983
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
@@ -6003,14 +6028,57 @@
|
|
|
6003
6028
|
<xsl:value-of select="$comment_text"/>
|
|
6004
6029
|
</xsl:template>
|
|
6005
6030
|
|
|
6031
|
+
<xsl:template match="*[local-name() = 'asciimath']">
|
|
6032
|
+
<xsl:param name="process" select="'false'"/>
|
|
6033
|
+
<xsl:if test="$process = 'true'">
|
|
6034
|
+
<xsl:apply-templates/>
|
|
6035
|
+
</xsl:if>
|
|
6036
|
+
</xsl:template>
|
|
6037
|
+
|
|
6038
|
+
<xsl:template match="*[local-name() = 'latexmath']"/>
|
|
6039
|
+
|
|
6040
|
+
<xsl:template name="getMathml_asciimath_text">
|
|
6041
|
+
<xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
|
|
6042
|
+
<xsl:variable name="latexmath">
|
|
6043
|
+
|
|
6044
|
+
</xsl:variable>
|
|
6045
|
+
<xsl:variable name="asciimath_text_following">
|
|
6046
|
+
<xsl:choose>
|
|
6047
|
+
<xsl:when test="normalize-space($latexmath) != ''">
|
|
6048
|
+
<xsl:value-of select="$latexmath"/>
|
|
6049
|
+
</xsl:when>
|
|
6050
|
+
<xsl:when test="normalize-space($asciimath) != ''">
|
|
6051
|
+
<xsl:value-of select="$asciimath"/>
|
|
6052
|
+
</xsl:when>
|
|
6053
|
+
<xsl:otherwise>
|
|
6054
|
+
<xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
|
|
6055
|
+
</xsl:otherwise>
|
|
6056
|
+
</xsl:choose>
|
|
6057
|
+
</xsl:variable>
|
|
6058
|
+
<xsl:variable name="asciimath_text_">
|
|
6059
|
+
<xsl:choose>
|
|
6060
|
+
<xsl:when test="normalize-space($asciimath_text_following) != ''">
|
|
6061
|
+
<xsl:value-of select="$asciimath_text_following"/>
|
|
6062
|
+
</xsl:when>
|
|
6063
|
+
<xsl:otherwise>
|
|
6064
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
|
6065
|
+
</xsl:otherwise>
|
|
6066
|
+
</xsl:choose>
|
|
6067
|
+
</xsl:variable>
|
|
6068
|
+
<xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
|
|
6069
|
+
<xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
|
|
6070
|
+
<xsl:value-of select="$asciimath_text"/>
|
|
6071
|
+
</xsl:template>
|
|
6072
|
+
|
|
6006
6073
|
<xsl:template name="mathml_instream_object">
|
|
6007
|
-
<xsl:param name="
|
|
6074
|
+
<xsl:param name="asciimath_text"/>
|
|
6008
6075
|
<xsl:param name="mathml_content"/>
|
|
6009
6076
|
|
|
6010
|
-
<xsl:variable name="
|
|
6077
|
+
<xsl:variable name="asciimath_text_">
|
|
6011
6078
|
<xsl:choose>
|
|
6012
|
-
<xsl:when test="normalize-space($
|
|
6013
|
-
<xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
|
|
6079
|
+
<xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
|
|
6080
|
+
<!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
|
|
6081
|
+
<xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
|
|
6014
6082
|
</xsl:choose>
|
|
6015
6083
|
</xsl:variable>
|
|
6016
6084
|
|
|
@@ -6027,10 +6095,10 @@
|
|
|
6027
6095
|
</xsl:attribute>
|
|
6028
6096
|
|
|
6029
6097
|
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
|
6030
|
-
<xsl:if test="normalize-space($
|
|
6098
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
|
6031
6099
|
<!-- put Mathin Alternate Text -->
|
|
6032
6100
|
<xsl:attribute name="fox:alt-text">
|
|
6033
|
-
<xsl:value-of select="$
|
|
6101
|
+
<xsl:value-of select="$asciimath_text_"/>
|
|
6034
6102
|
</xsl:attribute>
|
|
6035
6103
|
</xsl:if>
|
|
6036
6104
|
<!-- </xsl:if> -->
|
|
@@ -6103,6 +6171,29 @@
|
|
|
6103
6171
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
|
6104
6172
|
</xsl:template>
|
|
6105
6173
|
|
|
6174
|
+
<!-- Examples:
|
|
6175
|
+
<stem type="AsciiMath">x = 1</stem>
|
|
6176
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
|
6177
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
|
6178
|
+
-->
|
|
6179
|
+
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
|
6180
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
|
6181
|
+
|
|
6182
|
+
<xsl:choose>
|
|
6183
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
6184
|
+
<xsl:otherwise>
|
|
6185
|
+
<xsl:apply-templates>
|
|
6186
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
|
6187
|
+
</xsl:apply-templates>
|
|
6188
|
+
</xsl:otherwise>
|
|
6189
|
+
</xsl:choose>
|
|
6190
|
+
|
|
6191
|
+
</fo:inline>
|
|
6192
|
+
</xsl:template>
|
|
6193
|
+
<!-- ======================================= -->
|
|
6194
|
+
<!-- END: math -->
|
|
6195
|
+
<!-- ======================================= -->
|
|
6196
|
+
|
|
6106
6197
|
<xsl:template match="*[local-name()='localityStack']"/>
|
|
6107
6198
|
|
|
6108
6199
|
<xsl:template match="*[local-name()='link']" name="link">
|
|
@@ -7467,9 +7558,9 @@
|
|
|
7467
7558
|
<xsl:apply-templates mode="contents_item"/>
|
|
7468
7559
|
</xsl:template>
|
|
7469
7560
|
|
|
7470
|
-
<!--
|
|
7471
|
-
<!-- sourcecode
|
|
7472
|
-
<!--
|
|
7561
|
+
<!-- =============== -->
|
|
7562
|
+
<!-- sourcecode -->
|
|
7563
|
+
<!-- =============== -->
|
|
7473
7564
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
|
7474
7565
|
|
|
7475
7566
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
|
@@ -7783,8 +7874,22 @@
|
|
|
7783
7874
|
</fo:block>
|
|
7784
7875
|
</xsl:if>
|
|
7785
7876
|
</xsl:template>
|
|
7786
|
-
<!--
|
|
7787
|
-
<!--
|
|
7877
|
+
<!-- =============== -->
|
|
7878
|
+
<!-- END sourcecode -->
|
|
7879
|
+
<!-- =============== -->
|
|
7880
|
+
|
|
7881
|
+
<!-- =============== -->
|
|
7882
|
+
<!-- pre -->
|
|
7883
|
+
<!-- =============== -->
|
|
7884
|
+
<xsl:template match="*[local-name()='pre']" name="pre">
|
|
7885
|
+
<fo:block xsl:use-attribute-sets="pre-style">
|
|
7886
|
+
<xsl:copy-of select="@id"/>
|
|
7887
|
+
<xsl:apply-templates/>
|
|
7888
|
+
</fo:block>
|
|
7889
|
+
</xsl:template>
|
|
7890
|
+
<!-- =============== -->
|
|
7891
|
+
<!-- pre -->
|
|
7892
|
+
<!-- =============== -->
|
|
7788
7893
|
|
|
7789
7894
|
<!-- ========== -->
|
|
7790
7895
|
<!-- permission -->
|
|
@@ -10341,13 +10446,14 @@
|
|
|
10341
10446
|
</xsl:template>
|
|
10342
10447
|
|
|
10343
10448
|
<xsl:template name="setId">
|
|
10449
|
+
<xsl:param name="prefix"/>
|
|
10344
10450
|
<xsl:attribute name="id">
|
|
10345
10451
|
<xsl:choose>
|
|
10346
10452
|
<xsl:when test="@id">
|
|
10347
|
-
<xsl:value-of select="@id"/>
|
|
10453
|
+
<xsl:value-of select="concat($prefix, @id)"/>
|
|
10348
10454
|
</xsl:when>
|
|
10349
10455
|
<xsl:otherwise>
|
|
10350
|
-
<xsl:value-of select="generate-id()"/>
|
|
10456
|
+
<xsl:value-of select="concat($prefix, generate-id())"/>
|
|
10351
10457
|
</xsl:otherwise>
|
|
10352
10458
|
</xsl:choose>
|
|
10353
10459
|
</xsl:attribute>
|
|
@@ -1143,7 +1143,7 @@
|
|
|
1143
1143
|
<xsl:template name="insertHeaderFooter">
|
|
1144
1144
|
<xsl:param name="color" select="$color_blue"/>
|
|
1145
1145
|
<fo:static-content flow-name="footer" role="artifact">
|
|
1146
|
-
<fo:block-container font-size="8pt"
|
|
1146
|
+
<fo:block-container font-size="8pt" color="{$color}" padding-top="6mm">
|
|
1147
1147
|
<fo:table table-layout="fixed" width="100%">
|
|
1148
1148
|
<fo:table-column column-width="90%"/>
|
|
1149
1149
|
<fo:table-column column-width="10%"/>
|
|
@@ -1883,6 +1883,15 @@
|
|
|
1883
1883
|
|
|
1884
1884
|
</xsl:attribute-set>
|
|
1885
1885
|
|
|
1886
|
+
<xsl:attribute-set name="pre-style">
|
|
1887
|
+
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
1888
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
|
1889
|
+
|
|
1890
|
+
<xsl:attribute name="font-family">Fira Code, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
|
1891
|
+
<xsl:attribute name="line-height">113%</xsl:attribute>
|
|
1892
|
+
|
|
1893
|
+
</xsl:attribute-set>
|
|
1894
|
+
|
|
1886
1895
|
<xsl:attribute-set name="permission-style">
|
|
1887
1896
|
|
|
1888
1897
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
@@ -2026,6 +2035,11 @@
|
|
|
2026
2035
|
</xsl:variable>
|
|
2027
2036
|
<xsl:variable name="table-border" select="normalize-space($table-border_)"/>
|
|
2028
2037
|
|
|
2038
|
+
<xsl:variable name="table-cell-border_">
|
|
2039
|
+
|
|
2040
|
+
</xsl:variable>
|
|
2041
|
+
<xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
|
|
2042
|
+
|
|
2029
2043
|
<xsl:attribute-set name="table-container-style">
|
|
2030
2044
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2031
2045
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
@@ -2037,8 +2051,6 @@
|
|
|
2037
2051
|
<xsl:attribute-set name="table-style">
|
|
2038
2052
|
<xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
|
|
2039
2053
|
<xsl:attribute name="table-layout">fixed</xsl:attribute>
|
|
2040
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
2041
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
2042
2054
|
|
|
2043
2055
|
</xsl:attribute-set><!-- table-style -->
|
|
2044
2056
|
|
|
@@ -3208,6 +3220,12 @@
|
|
|
3208
3220
|
<xsl:variable name="table_attributes">
|
|
3209
3221
|
|
|
3210
3222
|
<xsl:element name="table_attributes" use-attribute-sets="table-style">
|
|
3223
|
+
|
|
3224
|
+
<xsl:if test="$margin-side != 0">
|
|
3225
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
3226
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
3227
|
+
</xsl:if>
|
|
3228
|
+
|
|
3211
3229
|
<xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
|
|
3212
3230
|
|
|
3213
3231
|
</xsl:element>
|
|
@@ -3961,6 +3979,10 @@
|
|
|
3961
3979
|
<xsl:template match="*[local-name()='tr']">
|
|
3962
3980
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
|
3963
3981
|
|
|
3982
|
+
<xsl:if test="*[local-name() = 'th']">
|
|
3983
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
3984
|
+
</xsl:if>
|
|
3985
|
+
|
|
3964
3986
|
<xsl:variable name="number"><xsl:number/></xsl:variable>
|
|
3965
3987
|
<xsl:attribute name="background-color">
|
|
3966
3988
|
<xsl:choose>
|
|
@@ -5953,6 +5975,9 @@
|
|
|
5953
5975
|
<xsl:value-of select="substring($str, 2)"/>
|
|
5954
5976
|
</xsl:template>
|
|
5955
5977
|
|
|
5978
|
+
<!-- ======================================= -->
|
|
5979
|
+
<!-- math -->
|
|
5980
|
+
<!-- ======================================= -->
|
|
5956
5981
|
<xsl:template match="mathml:math">
|
|
5957
5982
|
<xsl:variable name="isAdded" select="@added"/>
|
|
5958
5983
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
|
@@ -6003,14 +6028,57 @@
|
|
|
6003
6028
|
<xsl:value-of select="$comment_text"/>
|
|
6004
6029
|
</xsl:template>
|
|
6005
6030
|
|
|
6031
|
+
<xsl:template match="*[local-name() = 'asciimath']">
|
|
6032
|
+
<xsl:param name="process" select="'false'"/>
|
|
6033
|
+
<xsl:if test="$process = 'true'">
|
|
6034
|
+
<xsl:apply-templates/>
|
|
6035
|
+
</xsl:if>
|
|
6036
|
+
</xsl:template>
|
|
6037
|
+
|
|
6038
|
+
<xsl:template match="*[local-name() = 'latexmath']"/>
|
|
6039
|
+
|
|
6040
|
+
<xsl:template name="getMathml_asciimath_text">
|
|
6041
|
+
<xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
|
|
6042
|
+
<xsl:variable name="latexmath">
|
|
6043
|
+
|
|
6044
|
+
</xsl:variable>
|
|
6045
|
+
<xsl:variable name="asciimath_text_following">
|
|
6046
|
+
<xsl:choose>
|
|
6047
|
+
<xsl:when test="normalize-space($latexmath) != ''">
|
|
6048
|
+
<xsl:value-of select="$latexmath"/>
|
|
6049
|
+
</xsl:when>
|
|
6050
|
+
<xsl:when test="normalize-space($asciimath) != ''">
|
|
6051
|
+
<xsl:value-of select="$asciimath"/>
|
|
6052
|
+
</xsl:when>
|
|
6053
|
+
<xsl:otherwise>
|
|
6054
|
+
<xsl:value-of select="following-sibling::node()[1][self::comment()]"/>
|
|
6055
|
+
</xsl:otherwise>
|
|
6056
|
+
</xsl:choose>
|
|
6057
|
+
</xsl:variable>
|
|
6058
|
+
<xsl:variable name="asciimath_text_">
|
|
6059
|
+
<xsl:choose>
|
|
6060
|
+
<xsl:when test="normalize-space($asciimath_text_following) != ''">
|
|
6061
|
+
<xsl:value-of select="$asciimath_text_following"/>
|
|
6062
|
+
</xsl:when>
|
|
6063
|
+
<xsl:otherwise>
|
|
6064
|
+
<xsl:value-of select="normalize-space(translate(.,' ',' '))"/>
|
|
6065
|
+
</xsl:otherwise>
|
|
6066
|
+
</xsl:choose>
|
|
6067
|
+
</xsl:variable>
|
|
6068
|
+
<xsl:variable name="asciimath_text_2" select="java:org.metanorma.fop.Util.unescape($asciimath_text_)"/>
|
|
6069
|
+
<xsl:variable name="asciimath_text" select="java:trim(java:java.lang.String.new($asciimath_text_2))"/>
|
|
6070
|
+
<xsl:value-of select="$asciimath_text"/>
|
|
6071
|
+
</xsl:template>
|
|
6072
|
+
|
|
6006
6073
|
<xsl:template name="mathml_instream_object">
|
|
6007
|
-
<xsl:param name="
|
|
6074
|
+
<xsl:param name="asciimath_text"/>
|
|
6008
6075
|
<xsl:param name="mathml_content"/>
|
|
6009
6076
|
|
|
6010
|
-
<xsl:variable name="
|
|
6077
|
+
<xsl:variable name="asciimath_text_">
|
|
6011
6078
|
<xsl:choose>
|
|
6012
|
-
<xsl:when test="normalize-space($
|
|
6013
|
-
<xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise>
|
|
6079
|
+
<xsl:when test="normalize-space($asciimath_text) != ''"><xsl:value-of select="$asciimath_text"/></xsl:when>
|
|
6080
|
+
<!-- <xsl:otherwise><xsl:call-template name="getMathml_comment_text"/></xsl:otherwise> -->
|
|
6081
|
+
<xsl:otherwise><xsl:call-template name="getMathml_asciimath_text"/></xsl:otherwise>
|
|
6014
6082
|
</xsl:choose>
|
|
6015
6083
|
</xsl:variable>
|
|
6016
6084
|
|
|
@@ -6027,10 +6095,10 @@
|
|
|
6027
6095
|
</xsl:attribute>
|
|
6028
6096
|
|
|
6029
6097
|
<!-- <xsl:if test="$add_math_as_text = 'true'"> -->
|
|
6030
|
-
<xsl:if test="normalize-space($
|
|
6098
|
+
<xsl:if test="normalize-space($asciimath_text_) != ''">
|
|
6031
6099
|
<!-- put Mathin Alternate Text -->
|
|
6032
6100
|
<xsl:attribute name="fox:alt-text">
|
|
6033
|
-
<xsl:value-of select="$
|
|
6101
|
+
<xsl:value-of select="$asciimath_text_"/>
|
|
6034
6102
|
</xsl:attribute>
|
|
6035
6103
|
</xsl:if>
|
|
6036
6104
|
<!-- </xsl:if> -->
|
|
@@ -6103,6 +6171,29 @@
|
|
|
6103
6171
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
|
6104
6172
|
</xsl:template>
|
|
6105
6173
|
|
|
6174
|
+
<!-- Examples:
|
|
6175
|
+
<stem type="AsciiMath">x = 1</stem>
|
|
6176
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
|
6177
|
+
<stem type="AsciiMath"><asciimath>x = 1</asciimath><latexmath>x = 1</latexmath></stem>
|
|
6178
|
+
-->
|
|
6179
|
+
<xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
|
|
6180
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
|
6181
|
+
|
|
6182
|
+
<xsl:choose>
|
|
6183
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
6184
|
+
<xsl:otherwise>
|
|
6185
|
+
<xsl:apply-templates>
|
|
6186
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
|
6187
|
+
</xsl:apply-templates>
|
|
6188
|
+
</xsl:otherwise>
|
|
6189
|
+
</xsl:choose>
|
|
6190
|
+
|
|
6191
|
+
</fo:inline>
|
|
6192
|
+
</xsl:template>
|
|
6193
|
+
<!-- ======================================= -->
|
|
6194
|
+
<!-- END: math -->
|
|
6195
|
+
<!-- ======================================= -->
|
|
6196
|
+
|
|
6106
6197
|
<xsl:template match="*[local-name()='localityStack']"/>
|
|
6107
6198
|
|
|
6108
6199
|
<xsl:template match="*[local-name()='link']" name="link">
|
|
@@ -7467,9 +7558,9 @@
|
|
|
7467
7558
|
<xsl:apply-templates mode="contents_item"/>
|
|
7468
7559
|
</xsl:template>
|
|
7469
7560
|
|
|
7470
|
-
<!--
|
|
7471
|
-
<!-- sourcecode
|
|
7472
|
-
<!--
|
|
7561
|
+
<!-- =============== -->
|
|
7562
|
+
<!-- sourcecode -->
|
|
7563
|
+
<!-- =============== -->
|
|
7473
7564
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
|
7474
7565
|
|
|
7475
7566
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
|
@@ -7783,8 +7874,22 @@
|
|
|
7783
7874
|
</fo:block>
|
|
7784
7875
|
</xsl:if>
|
|
7785
7876
|
</xsl:template>
|
|
7786
|
-
<!--
|
|
7787
|
-
<!--
|
|
7877
|
+
<!-- =============== -->
|
|
7878
|
+
<!-- END sourcecode -->
|
|
7879
|
+
<!-- =============== -->
|
|
7880
|
+
|
|
7881
|
+
<!-- =============== -->
|
|
7882
|
+
<!-- pre -->
|
|
7883
|
+
<!-- =============== -->
|
|
7884
|
+
<xsl:template match="*[local-name()='pre']" name="pre">
|
|
7885
|
+
<fo:block xsl:use-attribute-sets="pre-style">
|
|
7886
|
+
<xsl:copy-of select="@id"/>
|
|
7887
|
+
<xsl:apply-templates/>
|
|
7888
|
+
</fo:block>
|
|
7889
|
+
</xsl:template>
|
|
7890
|
+
<!-- =============== -->
|
|
7891
|
+
<!-- pre -->
|
|
7892
|
+
<!-- =============== -->
|
|
7788
7893
|
|
|
7789
7894
|
<!-- ========== -->
|
|
7790
7895
|
<!-- permission -->
|
|
@@ -10341,13 +10446,14 @@
|
|
|
10341
10446
|
</xsl:template>
|
|
10342
10447
|
|
|
10343
10448
|
<xsl:template name="setId">
|
|
10449
|
+
<xsl:param name="prefix"/>
|
|
10344
10450
|
<xsl:attribute name="id">
|
|
10345
10451
|
<xsl:choose>
|
|
10346
10452
|
<xsl:when test="@id">
|
|
10347
|
-
<xsl:value-of select="@id"/>
|
|
10453
|
+
<xsl:value-of select="concat($prefix, @id)"/>
|
|
10348
10454
|
</xsl:when>
|
|
10349
10455
|
<xsl:otherwise>
|
|
10350
|
-
<xsl:value-of select="generate-id()"/>
|
|
10456
|
+
<xsl:value-of select="concat($prefix, generate-id())"/>
|
|
10351
10457
|
</xsl:otherwise>
|
|
10352
10458
|
</xsl:choose>
|
|
10353
10459
|
</xsl:attribute>
|