metanorma-ribose 2.2.7 → 2.2.8
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/base_convert.rb +4 -5
- data/lib/isodoc/ribose/html/html_rsd_intro.html +0 -1
- data/lib/isodoc/ribose/html/word_rsd_intro.html +0 -3
- data/lib/isodoc/ribose/html_convert.rb +2 -8
- data/lib/isodoc/ribose/presentation_xml_convert.rb +14 -1
- data/lib/isodoc/ribose/ribose.standard.xsl +228 -80
- data/lib/isodoc/ribose/word_convert.rb +0 -15
- data/lib/metanorma/ribose/converter.rb +1 -1
- data/lib/metanorma/ribose/isodoc.rng +12 -7
- data/lib/metanorma/ribose/{rsd.rng → ribose.rng} +3 -8
- data/lib/metanorma/ribose/version.rb +1 -1
- data/metanorma.yml +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2706f601a6101717a95248803efe276a3a684d63fd21701960408911e8ab6321
|
4
|
+
data.tar.gz: 49ff403dfba6c90b09d89e60b3ffff854730ff090a40b7b88ca2685f09533733
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 602fc809e82c4f7edd47f22c8847a0c1a4dc643b2cc4fc502ec74abd065f863b90e2acef5f590cb559fc31e6520f94ee1d689560a7a109bb99c38ac2e7e64968
|
7
|
+
data.tar.gz: cfd6f6b81cd1efe3227ecb0ce799b3e4b5d010cf2f1b26aaac63e9ee09b7bc1b0007f4cbc9effa909c87571337593942a4be71d6a5220c70f388e1bd5eb5751a
|
@@ -1,13 +1,12 @@
|
|
1
1
|
module IsoDoc
|
2
2
|
module Ribose
|
3
3
|
module BaseConvert
|
4
|
-
def executivesummary(
|
5
|
-
f = docxml.at(ns("//executivesummary")) || return
|
4
|
+
def executivesummary(clause, out)
|
6
5
|
title_attr = { class: "IntroTitle" }
|
7
6
|
page_break(out)
|
8
|
-
out.div class: "Section3", id:
|
9
|
-
clause_name(
|
10
|
-
|
7
|
+
out.div class: "Section3", id: clause["id"] do |div|
|
8
|
+
clause_name(clause, clause&.at(ns("./title")), div, title_attr)
|
9
|
+
clause.elements.each do |e|
|
11
10
|
parse(e, div) unless e.name == "title"
|
12
11
|
end
|
13
12
|
end
|
@@ -14,15 +14,9 @@ module IsoDoc
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def make_body3(body, docxml)
|
17
|
-
body.div
|
17
|
+
body.div class: "main-section" do |div3|
|
18
18
|
boilerplate docxml, div3
|
19
|
-
|
20
|
-
abstract docxml, div3
|
21
|
-
foreword docxml, div3
|
22
|
-
executivesummary docxml, div3
|
23
|
-
introduction docxml, div3
|
24
|
-
preface docxml, div3
|
25
|
-
acknowledgements docxml, div3
|
19
|
+
front docxml, div3
|
26
20
|
middle docxml, div3
|
27
21
|
footnotes div3
|
28
22
|
comments div3
|
@@ -13,11 +13,24 @@ module IsoDoc
|
|
13
13
|
def termsource1(elem)
|
14
14
|
mod = elem.at(ns("./modification")) and
|
15
15
|
termsource_modification(mod)
|
16
|
-
elem.children = l10n("<strong>#{@i18n.source}:</strong> "\
|
16
|
+
elem.children = l10n("<strong>#{@i18n.source}:</strong> " \
|
17
17
|
"#{to_xml(elem.children).strip}")
|
18
18
|
elem&.next_element&.name == "termsource" and elem.next = "; "
|
19
19
|
end
|
20
20
|
|
21
|
+
def preface_rearrange(doc)
|
22
|
+
preface_move(doc.at(ns("//preface/abstract")),
|
23
|
+
%w(foreword executivesummary introduction clause acknowledgements), doc)
|
24
|
+
preface_move(doc.at(ns("//preface/foreword")),
|
25
|
+
%w(executivesummary introduction clause acknowledgements), doc)
|
26
|
+
preface_move(doc.at(ns("//preface/executivesummary")),
|
27
|
+
%w(introduction clause acknowledgements), doc)
|
28
|
+
preface_move(doc.at(ns("//preface/introduction")),
|
29
|
+
%w(clause acknowledgements), doc)
|
30
|
+
preface_move(doc.at(ns("//preface/acknowledgements")),
|
31
|
+
%w(), doc)
|
32
|
+
end
|
33
|
+
|
21
34
|
include Init
|
22
35
|
end
|
23
36
|
end
|
@@ -1936,6 +1936,7 @@
|
|
1936
1936
|
</xsl:attribute-set>
|
1937
1937
|
|
1938
1938
|
<xsl:attribute-set name="xref-style">
|
1939
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1939
1940
|
|
1940
1941
|
</xsl:attribute-set>
|
1941
1942
|
|
@@ -3970,9 +3971,13 @@
|
|
3970
3971
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
3971
3972
|
</xsl:if>
|
3972
3973
|
|
3973
|
-
<
|
3974
|
-
<xsl:
|
3975
|
-
|
3974
|
+
<xsl:call-template name="insert_basic_link">
|
3975
|
+
<xsl:with-param name="element">
|
3976
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3977
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3978
|
+
</fo:basic-link>
|
3979
|
+
</xsl:with-param>
|
3980
|
+
</xsl:call-template>
|
3976
3981
|
</fo:inline>
|
3977
3982
|
</xsl:variable>
|
3978
3983
|
|
@@ -4305,8 +4310,10 @@
|
|
4305
4310
|
<xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
|
4306
4311
|
<xsl:text> </xsl:text>
|
4307
4312
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
4308
|
-
<xsl:text
|
4309
|
-
|
4313
|
+
<xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
|
4314
|
+
<xsl:text> </xsl:text>
|
4315
|
+
</xsl:if>
|
4316
|
+
<xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
|
4310
4317
|
</fo:block>
|
4311
4318
|
|
4312
4319
|
</xsl:when> <!-- END: only one component -->
|
@@ -4796,8 +4803,18 @@
|
|
4796
4803
|
</xsl:if>
|
4797
4804
|
</xsl:template>
|
4798
4805
|
|
4799
|
-
<xsl:template match="*[local-name()='dd']/*
|
4800
|
-
<
|
4806
|
+
<xsl:template match="*[local-name()='dd']/*" mode="inline">
|
4807
|
+
<xsl:variable name="is_inline_element_after_where">
|
4808
|
+
<xsl:if test="(local-name() = 'p') and not(preceding-sibling::node()[normalize-space() != ''])">true</xsl:if>
|
4809
|
+
</xsl:variable>
|
4810
|
+
<xsl:choose>
|
4811
|
+
<xsl:when test="$is_inline_element_after_where = 'true'">
|
4812
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
4813
|
+
</xsl:when>
|
4814
|
+
<xsl:otherwise>
|
4815
|
+
<xsl:apply-templates select="."/>
|
4816
|
+
</xsl:otherwise>
|
4817
|
+
</xsl:choose>
|
4801
4818
|
</xsl:template>
|
4802
4819
|
|
4803
4820
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
@@ -6235,6 +6252,79 @@
|
|
6235
6252
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
6236
6253
|
</xsl:template>
|
6237
6254
|
|
6255
|
+
<!-- special case for:
|
6256
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
6257
|
+
<mstyle displaystyle="true">
|
6258
|
+
<msup>
|
6259
|
+
<mi color="#00000000">C</mi>
|
6260
|
+
<mtext>R</mtext>
|
6261
|
+
</msup>
|
6262
|
+
<msubsup>
|
6263
|
+
<mtext>C</mtext>
|
6264
|
+
<mi>n</mi>
|
6265
|
+
<mi>k</mi>
|
6266
|
+
</msubsup>
|
6267
|
+
</mstyle>
|
6268
|
+
</math>
|
6269
|
+
-->
|
6270
|
+
<xsl:template match="mathml:msup/mathml:mi[. = '' or . = ''][not(preceding-sibling::*)][following-sibling::mathml:mtext]" mode="mathml">
|
6271
|
+
<xsl:copy>
|
6272
|
+
<xsl:copy-of select="@*"/>
|
6273
|
+
<xsl:variable name="next_mtext" select="ancestor::mathml:msup/following-sibling::*[1][self::mathml:msubsup or self::mathml:msub or self::mathml:msup]/mathml:mtext"/>
|
6274
|
+
<xsl:if test="string-length($next_mtext) != ''">
|
6275
|
+
<xsl:attribute name="color">#00000000</xsl:attribute>
|
6276
|
+
</xsl:if>
|
6277
|
+
<xsl:apply-templates/>
|
6278
|
+
<xsl:value-of select="$next_mtext"/>
|
6279
|
+
</xsl:copy>
|
6280
|
+
</xsl:template>
|
6281
|
+
|
6282
|
+
<!-- special case for:
|
6283
|
+
<msup>
|
6284
|
+
<mtext/>
|
6285
|
+
<mn>1</mn>
|
6286
|
+
</msup>
|
6287
|
+
convert to (add mspace after mtext and enclose them into mrow):
|
6288
|
+
<msup>
|
6289
|
+
<mrow>
|
6290
|
+
<mtext/>
|
6291
|
+
<mspace height="1.47ex"/>
|
6292
|
+
</mrow>
|
6293
|
+
<mn>1</mn>
|
6294
|
+
</msup>
|
6295
|
+
-->
|
6296
|
+
<xsl:template match="mathml:msup/mathml:mtext[not(preceding-sibling::*)]" mode="mathml">
|
6297
|
+
<mathml:mrow>
|
6298
|
+
<xsl:copy-of select="."/>
|
6299
|
+
<mathml:mspace height="1.47ex"/>
|
6300
|
+
</mathml:mrow>
|
6301
|
+
</xsl:template>
|
6302
|
+
|
6303
|
+
<!-- add space around vertical line -->
|
6304
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
|
6305
|
+
<xsl:copy>
|
6306
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
6307
|
+
<xsl:if test="not(@lspace)">
|
6308
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
6309
|
+
</xsl:if>
|
6310
|
+
<xsl:if test="not(@rspace)">
|
6311
|
+
<xsl:attribute name="rspace">0.4em</xsl:attribute>
|
6312
|
+
</xsl:if>
|
6313
|
+
<xsl:apply-templates mode="mathml"/>
|
6314
|
+
</xsl:copy>
|
6315
|
+
</xsl:template>
|
6316
|
+
|
6317
|
+
<!-- decrease fontsize for 'Circled Times' char -->
|
6318
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '⊗']" mode="mathml">
|
6319
|
+
<xsl:copy>
|
6320
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
6321
|
+
<xsl:if test="not(@fontsize)">
|
6322
|
+
<xsl:attribute name="fontsize">55%</xsl:attribute>
|
6323
|
+
</xsl:if>
|
6324
|
+
<xsl:apply-templates mode="mathml"/>
|
6325
|
+
</xsl:copy>
|
6326
|
+
</xsl:template>
|
6327
|
+
|
6238
6328
|
<!-- Examples:
|
6239
6329
|
<stem type="AsciiMath">x = 1</stem>
|
6240
6330
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -6298,19 +6388,23 @@
|
|
6298
6388
|
<xsl:apply-templates/>
|
6299
6389
|
</xsl:when>
|
6300
6390
|
<xsl:otherwise>
|
6301
|
-
<
|
6302
|
-
<xsl:
|
6303
|
-
<
|
6304
|
-
<xsl:
|
6305
|
-
<xsl:
|
6306
|
-
|
6307
|
-
|
6308
|
-
|
6309
|
-
|
6310
|
-
|
6311
|
-
|
6312
|
-
|
6313
|
-
|
6391
|
+
<xsl:call-template name="insert_basic_link">
|
6392
|
+
<xsl:with-param name="element">
|
6393
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
6394
|
+
<xsl:choose>
|
6395
|
+
<xsl:when test="normalize-space(.) = ''">
|
6396
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
6397
|
+
<xsl:with-param name="text" select="$target_text"/>
|
6398
|
+
</xsl:call-template>
|
6399
|
+
</xsl:when>
|
6400
|
+
<xsl:otherwise>
|
6401
|
+
<!-- output text from <link>text</link> -->
|
6402
|
+
<xsl:apply-templates/>
|
6403
|
+
</xsl:otherwise>
|
6404
|
+
</xsl:choose>
|
6405
|
+
</fo:basic-link>
|
6406
|
+
</xsl:with-param>
|
6407
|
+
</xsl:call-template>
|
6314
6408
|
</xsl:otherwise>
|
6315
6409
|
</xsl:choose>
|
6316
6410
|
</fo:inline>
|
@@ -6373,12 +6467,16 @@
|
|
6373
6467
|
</xsl:template>
|
6374
6468
|
|
6375
6469
|
<xsl:template match="*[local-name() = 'xref']">
|
6376
|
-
<
|
6377
|
-
<xsl:
|
6378
|
-
<
|
6379
|
-
|
6380
|
-
|
6381
|
-
|
6470
|
+
<xsl:call-template name="insert_basic_link">
|
6471
|
+
<xsl:with-param name="element">
|
6472
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
6473
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
6474
|
+
<xsl:call-template name="append_add-style"/>
|
6475
|
+
</xsl:if>
|
6476
|
+
<xsl:apply-templates/>
|
6477
|
+
</fo:basic-link>
|
6478
|
+
</xsl:with-param>
|
6479
|
+
</xsl:call-template>
|
6382
6480
|
</xsl:template>
|
6383
6481
|
|
6384
6482
|
<!-- ====== -->
|
@@ -6769,7 +6867,7 @@
|
|
6769
6867
|
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
6770
6868
|
</xsl:when>
|
6771
6869
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
6772
|
-
<xsl:value-of select="concat('url(file
|
6870
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
6773
6871
|
</xsl:when>
|
6774
6872
|
<xsl:otherwise>
|
6775
6873
|
<xsl:value-of select="@src"/>
|
@@ -6791,7 +6889,7 @@
|
|
6791
6889
|
</xsl:when>
|
6792
6890
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
6793
6891
|
<xsl:variable name="src">
|
6794
|
-
<xsl:value-of select="concat('url(file
|
6892
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
6795
6893
|
</xsl:variable>
|
6796
6894
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
6797
6895
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -7177,15 +7275,19 @@
|
|
7177
7275
|
<xsl:param name="dest"/>
|
7178
7276
|
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
7179
7277
|
<fo:block font-size="1pt">
|
7180
|
-
<
|
7181
|
-
<
|
7182
|
-
<fo:
|
7183
|
-
|
7184
|
-
<
|
7185
|
-
|
7186
|
-
|
7187
|
-
|
7188
|
-
|
7278
|
+
<xsl:call-template name="insert_basic_link">
|
7279
|
+
<xsl:with-param name="element">
|
7280
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
7281
|
+
<fo:inline-container inline-progression-dimension="100%">
|
7282
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
7283
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
7284
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
7285
|
+
</xsl:if> -->
|
7286
|
+
<fo:block> </fo:block></fo:block-container>
|
7287
|
+
</fo:inline-container>
|
7288
|
+
</fo:basic-link>
|
7289
|
+
</xsl:with-param>
|
7290
|
+
</xsl:call-template>
|
7189
7291
|
</fo:block>
|
7190
7292
|
</fo:block-container>
|
7191
7293
|
</xsl:template>
|
@@ -8758,14 +8860,18 @@
|
|
8758
8860
|
</xsl:template>
|
8759
8861
|
|
8760
8862
|
<xsl:template match="*[local-name() = 'origin']">
|
8761
|
-
<
|
8762
|
-
<xsl:
|
8763
|
-
<
|
8764
|
-
|
8765
|
-
|
8766
|
-
|
8767
|
-
|
8768
|
-
|
8863
|
+
<xsl:call-template name="insert_basic_link">
|
8864
|
+
<xsl:with-param name="element">
|
8865
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8866
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
8867
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
8868
|
+
</xsl:if>
|
8869
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
8870
|
+
<xsl:apply-templates/>
|
8871
|
+
</fo:inline>
|
8872
|
+
</fo:basic-link>
|
8873
|
+
</xsl:with-param>
|
8874
|
+
</xsl:call-template>
|
8769
8875
|
</xsl:template>
|
8770
8876
|
|
8771
8877
|
<!-- not using, see https://github.com/glossarist/iev-document/issues/23 -->
|
@@ -8839,9 +8945,13 @@
|
|
8839
8945
|
<xsl:if test="../*[local-name() = 'author']">
|
8840
8946
|
<xsl:text>, </xsl:text>
|
8841
8947
|
</xsl:if>
|
8842
|
-
<
|
8843
|
-
<xsl:
|
8844
|
-
|
8948
|
+
<xsl:call-template name="insert_basic_link">
|
8949
|
+
<xsl:with-param name="element">
|
8950
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8951
|
+
<xsl:apply-templates/>
|
8952
|
+
</fo:basic-link>
|
8953
|
+
</xsl:with-param>
|
8954
|
+
</xsl:call-template>
|
8845
8955
|
</xsl:template>
|
8846
8956
|
|
8847
8957
|
<xsl:template match="*[local-name() = 'author']">
|
@@ -8890,25 +9000,29 @@
|
|
8890
9000
|
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
8891
9001
|
<xsl:variable name="text" select="normalize-space()"/>
|
8892
9002
|
|
8893
|
-
<
|
8894
|
-
<xsl:
|
8895
|
-
<
|
8896
|
-
|
8897
|
-
|
9003
|
+
<xsl:call-template name="insert_basic_link">
|
9004
|
+
<xsl:with-param name="element">
|
9005
|
+
<fo:basic-link fox:alt-text="{@citeas}">
|
9006
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
9007
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
9008
|
+
</xsl:if>
|
9009
|
+
<xsl:if test="@type = 'inline'">
|
8898
9010
|
|
8899
|
-
|
9011
|
+
</xsl:if>
|
8900
9012
|
|
8901
|
-
|
8902
|
-
|
8903
|
-
|
8904
|
-
|
8905
|
-
|
8906
|
-
|
8907
|
-
|
8908
|
-
|
9013
|
+
<xsl:choose>
|
9014
|
+
<xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
|
9015
|
+
<xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
|
9016
|
+
</xsl:when>
|
9017
|
+
<xsl:otherwise>
|
9018
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
9019
|
+
</xsl:otherwise>
|
9020
|
+
</xsl:choose>
|
8909
9021
|
|
8910
|
-
|
8911
|
-
|
9022
|
+
<xsl:apply-templates/>
|
9023
|
+
</fo:basic-link>
|
9024
|
+
</xsl:with-param>
|
9025
|
+
</xsl:call-template>
|
8912
9026
|
|
8913
9027
|
</fo:inline>
|
8914
9028
|
</xsl:when>
|
@@ -9148,7 +9262,10 @@
|
|
9148
9262
|
<xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
|
9149
9263
|
|
9150
9264
|
<xsl:template name="setULLabel">
|
9151
|
-
<xsl:variable name="
|
9265
|
+
<xsl:variable name="list_level__">
|
9266
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
9267
|
+
</xsl:variable>
|
9268
|
+
<xsl:variable name="list_level_" select="number($list_level__)"/>
|
9152
9269
|
<xsl:variable name="list_level">
|
9153
9270
|
<xsl:choose>
|
9154
9271
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
@@ -9281,9 +9398,11 @@
|
|
9281
9398
|
</fo:block-container>
|
9282
9399
|
</xsl:when>
|
9283
9400
|
<xsl:otherwise>
|
9284
|
-
|
9285
|
-
|
9286
|
-
|
9401
|
+
|
9402
|
+
<fo:block>
|
9403
|
+
<xsl:apply-templates select="." mode="list"/>
|
9404
|
+
</fo:block>
|
9405
|
+
|
9287
9406
|
</xsl:otherwise>
|
9288
9407
|
</xsl:choose>
|
9289
9408
|
</xsl:template>
|
@@ -9963,24 +10082,32 @@
|
|
9963
10082
|
<xsl:for-each select="*[local-name() = 'tab']">
|
9964
10083
|
<xsl:variable name="current_id" select="generate-id()"/>
|
9965
10084
|
<fo:table-cell>
|
9966
|
-
<fo:block>
|
9967
|
-
<
|
9968
|
-
<xsl:
|
9969
|
-
<
|
9970
|
-
<xsl:
|
9971
|
-
|
9972
|
-
|
9973
|
-
|
9974
|
-
|
10085
|
+
<fo:block line-height-shift-adjustment="disregard-shifts">
|
10086
|
+
<xsl:call-template name="insert_basic_link">
|
10087
|
+
<xsl:with-param name="element">
|
10088
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
10089
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
10090
|
+
<xsl:choose>
|
10091
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
10092
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
10093
|
+
</xsl:choose>
|
10094
|
+
</xsl:for-each>
|
10095
|
+
</fo:basic-link>
|
10096
|
+
</xsl:with-param>
|
10097
|
+
</xsl:call-template>
|
9975
10098
|
</fo:block>
|
9976
10099
|
</fo:table-cell>
|
9977
10100
|
</xsl:for-each>
|
9978
10101
|
<!-- last column - for page numbers -->
|
9979
10102
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
9980
10103
|
<fo:block>
|
9981
|
-
<
|
9982
|
-
<
|
9983
|
-
|
10104
|
+
<xsl:call-template name="insert_basic_link">
|
10105
|
+
<xsl:with-param name="element">
|
10106
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
10107
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
10108
|
+
</fo:basic-link>
|
10109
|
+
</xsl:with-param>
|
10110
|
+
</xsl:call-template>
|
9984
10111
|
</fo:block>
|
9985
10112
|
</fo:table-cell>
|
9986
10113
|
</xsl:template>
|
@@ -10022,6 +10149,27 @@
|
|
10022
10149
|
<!-- End Table of Contents (ToC) processing -->
|
10023
10150
|
<!-- =================== -->
|
10024
10151
|
|
10152
|
+
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
10153
|
+
<xsl:template name="insert_basic_link">
|
10154
|
+
<xsl:param name="element"/>
|
10155
|
+
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
10156
|
+
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
10157
|
+
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
10158
|
+
<xsl:choose>
|
10159
|
+
<xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
|
10160
|
+
<xsl:copy-of select="$element_node"/>
|
10161
|
+
</xsl:when>
|
10162
|
+
<xsl:otherwise>
|
10163
|
+
<fo:inline>
|
10164
|
+
<xsl:for-each select="$element_node/fo:basic-link/@*[local-name() != 'external-destination' and local-name() != 'internal-destination' and local-name() != 'alt-text']">
|
10165
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
10166
|
+
</xsl:for-each>
|
10167
|
+
<xsl:copy-of select="$element_node/fo:basic-link/node()"/>
|
10168
|
+
</fo:inline>
|
10169
|
+
</xsl:otherwise>
|
10170
|
+
</xsl:choose>
|
10171
|
+
</xsl:template>
|
10172
|
+
|
10025
10173
|
<xsl:template match="*[local-name() = 'variant-title']"/> <!-- [@type = 'sub'] -->
|
10026
10174
|
<xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
10027
10175
|
<fo:inline padding-right="5mm"> </fo:inline>
|
@@ -12,21 +12,6 @@ module IsoDoc
|
|
12
12
|
Metanorma::Ribose.configuration
|
13
13
|
end
|
14
14
|
|
15
|
-
def make_body2(body, docxml)
|
16
|
-
body.div **{ class: "WordSection2" } do |div2|
|
17
|
-
boilerplate docxml, div2
|
18
|
-
preface_block docxml, div2
|
19
|
-
abstract docxml, div2
|
20
|
-
foreword docxml, div2
|
21
|
-
executivesummary docxml, div2
|
22
|
-
introduction docxml, div2
|
23
|
-
preface docxml, div2
|
24
|
-
acknowledgements docxml, div2
|
25
|
-
div2.p { |p| p << " " } # placeholder
|
26
|
-
end
|
27
|
-
section_break(body)
|
28
|
-
end
|
29
|
-
|
30
15
|
include BaseConvert
|
31
16
|
include Init
|
32
17
|
end
|
@@ -8,7 +8,7 @@ module Metanorma
|
|
8
8
|
#
|
9
9
|
class Converter < Metanorma::Generic::Converter
|
10
10
|
XML_ROOT_TAG = "rsd-standard".freeze
|
11
|
-
XML_NAMESPACE = "https://www.metanorma.org/ns/
|
11
|
+
XML_NAMESPACE = "https://www.metanorma.org/ns/ribose".freeze
|
12
12
|
|
13
13
|
register_for "ribose"
|
14
14
|
|
@@ -17,6 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
+
<!-- VERSION v1.2.1 -->
|
20
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
21
22
|
<include href="reqt.rng"/>
|
22
23
|
<include href="basicdoc.rng">
|
@@ -1349,15 +1350,19 @@
|
|
1349
1350
|
</choice>
|
1350
1351
|
</element>
|
1351
1352
|
</define>
|
1353
|
+
<define name="Root-Attributes">
|
1354
|
+
<attribute name="version"/>
|
1355
|
+
<attribute name="schema-version"/>
|
1356
|
+
<attribute name="type">
|
1357
|
+
<choice>
|
1358
|
+
<value>semantic</value>
|
1359
|
+
<value>presentation</value>
|
1360
|
+
</choice>
|
1361
|
+
</attribute>
|
1362
|
+
</define>
|
1352
1363
|
<define name="standard-document">
|
1353
1364
|
<element name="standard-document">
|
1354
|
-
<
|
1355
|
-
<attribute name="type">
|
1356
|
-
<choice>
|
1357
|
-
<value>semantic</value>
|
1358
|
-
<value>presentation</value>
|
1359
|
-
</choice>
|
1360
|
-
</attribute>
|
1365
|
+
<ref name="Root-Attributes"/>
|
1361
1366
|
<ref name="bibdata"/>
|
1362
1367
|
<optional>
|
1363
1368
|
<ref name="misccontainer"/>
|
@@ -1,6 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar ns=
|
2
|
+
<grammar ns='https://www.metanorma.org/ns/ribose' xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<!--
|
4
|
+
VERSION v1.2.1
|
4
5
|
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
5
6
|
we cannot have a new default namespace: we will end up with a grammar with two different
|
6
7
|
namespaces, one for isostandard and one for csand additions. And we do not want that.
|
@@ -13,13 +14,7 @@
|
|
13
14
|
</include>
|
14
15
|
<define name="rsd-standard">
|
15
16
|
<element name="rsd-standard">
|
16
|
-
<
|
17
|
-
<attribute name="type">
|
18
|
-
<choice>
|
19
|
-
<value>semantic</value>
|
20
|
-
<value>presentation</value>
|
21
|
-
</choice>
|
22
|
-
</attribute>
|
17
|
+
<ref name="Root-Attributes"/>
|
23
18
|
<ref name="bibdata"/>
|
24
19
|
<zeroOrMore>
|
25
20
|
<ref name="termdocsource"/>
|
data/metanorma.yml
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
metanorma_name: ribose
|
2
2
|
organization_name_short: Ribose
|
3
3
|
organization_name_long: Ribose Asia Limited
|
4
|
-
document_namespace: https://www.metanorma.org/ns/
|
4
|
+
document_namespace: https://www.metanorma.org/ns/ribose
|
5
5
|
xml_root_tag: 'rsd-standard'
|
6
6
|
logo_path: lib/isodoc/ribose/html/logo.png
|
7
|
-
validate_rng_file: lib/metanorma/ribose/
|
7
|
+
validate_rng_file: lib/metanorma/ribose/ribose.rng
|
8
8
|
i18nyaml: lib/isodoc/ribose/i18n-en.yaml
|
9
9
|
htmlcoverpage: lib/isodoc/ribose/html/html_rsd_titlepage.html
|
10
10
|
htmlintropage: lib/isodoc/ribose/html/html_rsd_intro.html
|
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.2.
|
4
|
+
version: 2.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -218,7 +218,7 @@ files:
|
|
218
218
|
- lib/metanorma/ribose/processor.rb
|
219
219
|
- lib/metanorma/ribose/relaton-ribose.rng
|
220
220
|
- lib/metanorma/ribose/reqt.rng
|
221
|
-
- lib/metanorma/ribose/
|
221
|
+
- lib/metanorma/ribose/ribose.rng
|
222
222
|
- lib/metanorma/ribose/version.rb
|
223
223
|
- metanorma-ribose.gemspec
|
224
224
|
- metanorma.yml
|