metanorma-ribose 1.8.3 → 1.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/ribose/converter.rb +3 -3
- data/lib/asciidoctor/ribose/isodoc.rng +14 -0
- data/lib/isodoc/ribose/html/scripts.html +0 -1
- data/lib/isodoc/ribose/presentation_xml_convert.rb +8 -0
- data/lib/isodoc/ribose/ribose.standard.xsl +262 -83
- data/lib/metanorma/ribose/version.rb +1 -1
- 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: c2d4f73d7ccad32355d85a39753e3ce6450eaff993b6bb26d0cda2dd4a232720
|
4
|
+
data.tar.gz: 28401b3153809534ed01936fbb47cdcf81cb7b6717caf54b795cf7c4497ae5b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11a38d3364da6e60d584926a1f8848d749d90bf27d30b15d787df734cd76abc5b180e38bb703dc514530bb984ee6ab4a9e56d9a32b00b2132e122ef5b5d4a82f
|
7
|
+
data.tar.gz: 2603c9ee2111307457b9732f48a636e70dae58f9a41cef42b3223821c86ecbb7266686363dc12c2379d91c345b1020dd73af7165ab1e78d114d633c35b84ce91
|
@@ -26,7 +26,7 @@ module Asciidoctor
|
|
26
26
|
|
27
27
|
def make_preface(xml, sect)
|
28
28
|
if xml.at("//foreword | //introduction | //acknowledgements | "\
|
29
|
-
|
29
|
+
"//clause[@preface] | //executivesummary")
|
30
30
|
preface = sect.add_previous_sibling("<preface/>").first
|
31
31
|
f = xml.at("//foreword") and preface.add_child f.remove
|
32
32
|
f = xml.at("//executivesummary") and preface.add_child f.remove
|
@@ -45,7 +45,7 @@ module Asciidoctor
|
|
45
45
|
|
46
46
|
def executivesummary_parse(attrs, xml, node)
|
47
47
|
xml.executivesummary **attr_code(attrs) do |xml_section|
|
48
|
-
xml_section.title { |t| t << node.title || "Executive Summary" }
|
48
|
+
xml_section.title { |t| t << (node.title || "Executive Summary") }
|
49
49
|
content = node.content
|
50
50
|
xml_section << content
|
51
51
|
end
|
@@ -67,7 +67,7 @@ module Asciidoctor
|
|
67
67
|
def pdf_converter(node)
|
68
68
|
return nil if node.attr("no-pdf")
|
69
69
|
|
70
|
-
IsoDoc::Ribose::PdfConvert.new(
|
70
|
+
IsoDoc::Ribose::PdfConvert.new(pdf_extract_attributes(node))
|
71
71
|
end
|
72
72
|
|
73
73
|
def doc_converter(node)
|
@@ -1796,6 +1796,20 @@
|
|
1796
1796
|
<data type="ID"/>
|
1797
1797
|
</attribute>
|
1798
1798
|
</optional>
|
1799
|
+
<optional>
|
1800
|
+
<attribute name="language"/>
|
1801
|
+
</optional>
|
1802
|
+
<optional>
|
1803
|
+
<attribute name="script"/>
|
1804
|
+
</optional>
|
1805
|
+
<optional>
|
1806
|
+
<attribute name="tag"/>
|
1807
|
+
</optional>
|
1808
|
+
<optional>
|
1809
|
+
<attribute name="multilingual-rendering">
|
1810
|
+
<ref name="MultilingualRenderingType"/>
|
1811
|
+
</attribute>
|
1812
|
+
</optional>
|
1799
1813
|
<oneOrMore>
|
1800
1814
|
<ref name="preferred"/>
|
1801
1815
|
</oneOrMore>
|
@@ -10,6 +10,14 @@ module IsoDoc
|
|
10
10
|
prefix_name(elem, "<br/><br/>", lbl, "title")
|
11
11
|
end
|
12
12
|
|
13
|
+
def termsource1(elem)
|
14
|
+
mod = elem.at(ns("./modification")) and
|
15
|
+
termsource_modification(mod)
|
16
|
+
elem.children = l10n("<strong>#{@i18n.source}:</strong> "\
|
17
|
+
"#{elem.children.to_xml.strip}")
|
18
|
+
elem&.next_element&.name == "termsource" and elem.next = "; "
|
19
|
+
end
|
20
|
+
|
13
21
|
include Init
|
14
22
|
end
|
15
23
|
end
|
@@ -7,6 +7,8 @@
|
|
7
7
|
<xsl:variable name="images" select="document($svg_images)"/>
|
8
8
|
<xsl:param name="basepath"/>
|
9
9
|
|
10
|
+
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
11
|
+
|
10
12
|
<xsl:variable name="pageWidth" select="215.9"/>
|
11
13
|
<xsl:variable name="pageHeight" select="279.4"/>
|
12
14
|
<xsl:variable name="marginLeftRight1" select="29"/>
|
@@ -435,8 +437,8 @@
|
|
435
437
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
436
438
|
<xsl:attribute name="color">black</xsl:attribute>
|
437
439
|
</xsl:if>
|
438
|
-
<xsl:if test="@level
|
439
|
-
<xsl:attribute name="margin-left"
|
440
|
+
<xsl:if test="@level >= 2">
|
441
|
+
<xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * 16.5"/>mm</xsl:attribute>
|
440
442
|
<xsl:attribute name="space-before">4pt</xsl:attribute>
|
441
443
|
<xsl:attribute name="space-after">5pt</xsl:attribute>
|
442
444
|
</xsl:if>
|
@@ -537,7 +539,7 @@
|
|
537
539
|
|
538
540
|
<xsl:variable name="display">
|
539
541
|
<xsl:choose>
|
540
|
-
<xsl:when test="$level >
|
542
|
+
<xsl:when test="$level > $toc_level">false</xsl:when>
|
541
543
|
<xsl:otherwise>true</xsl:otherwise>
|
542
544
|
</xsl:choose>
|
543
545
|
</xsl:variable>
|
@@ -843,33 +845,7 @@
|
|
843
845
|
</xsl:if>
|
844
846
|
</xsl:template>
|
845
847
|
|
846
|
-
|
847
|
-
<fn reference="1">
|
848
|
-
<p id="_8e5cf917-f75a-4a49-b0aa-1714cb6cf954">Formerly denoted as 15 % (m/m).</p>
|
849
|
-
</fn>
|
850
|
-
-->
|
851
|
-
<xsl:template match="rsd:title/rsd:fn | rsd:p/rsd:fn[not(ancestor::rsd:table)]" priority="2">
|
852
|
-
<fo:footnote keep-with-previous.within-line="always">
|
853
|
-
<xsl:variable name="number" select="@reference"/>
|
854
|
-
|
855
|
-
<fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super">
|
856
|
-
<fo:basic-link internal-destination="footnote_{@reference}" fox:alt-text="footnote {@reference}">
|
857
|
-
<xsl:value-of select="$number"/><!-- + count(//rsd:bibitem/rsd:note) -->
|
858
|
-
</fo:basic-link>
|
859
|
-
</fo:inline>
|
860
|
-
<fo:footnote-body>
|
861
|
-
<fo:block font-size="10pt" margin-bottom="12pt" font-weight="normal" text-indent="0" start-indent="0" color="rgb(168, 170, 173)" text-align="left">
|
862
|
-
<fo:inline id="footnote_{@reference}" keep-with-next.within-line="always" font-size="60%" vertical-align="super">
|
863
|
-
<xsl:value-of select="$number "/><!-- + count(//rsd:bibitem/rsd:note) -->
|
864
|
-
</fo:inline>
|
865
|
-
<xsl:for-each select="rsd:p">
|
866
|
-
<xsl:apply-templates/>
|
867
|
-
</xsl:for-each>
|
868
|
-
</fo:block>
|
869
|
-
</fo:footnote-body>
|
870
|
-
</fo:footnote>
|
871
|
-
</xsl:template>
|
872
|
-
|
848
|
+
|
873
849
|
<xsl:template match="rsd:fn/rsd:p">
|
874
850
|
<fo:block>
|
875
851
|
<xsl:apply-templates/>
|
@@ -2081,6 +2057,79 @@
|
|
2081
2057
|
|
2082
2058
|
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
2083
2059
|
<xsl:attribute name="line-height">135%</xsl:attribute>
|
2060
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-style">
|
2061
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2062
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-num-style">
|
2063
|
+
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
2064
|
+
|
2065
|
+
|
2066
|
+
|
2067
|
+
|
2068
|
+
|
2069
|
+
|
2070
|
+
|
2071
|
+
|
2072
|
+
|
2073
|
+
|
2074
|
+
|
2075
|
+
|
2076
|
+
|
2077
|
+
|
2078
|
+
<xsl:attribute name="font-size">65%</xsl:attribute>
|
2079
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2080
|
+
|
2081
|
+
|
2082
|
+
|
2083
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-style">
|
2084
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
2085
|
+
<xsl:attribute name="font-style">normal</xsl:attribute>
|
2086
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
2087
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
2088
|
+
|
2089
|
+
|
2090
|
+
|
2091
|
+
|
2092
|
+
|
2093
|
+
|
2094
|
+
|
2095
|
+
|
2096
|
+
|
2097
|
+
|
2098
|
+
|
2099
|
+
|
2100
|
+
|
2101
|
+
|
2102
|
+
|
2103
|
+
|
2104
|
+
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
2105
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
2106
|
+
<xsl:attribute name="color">rgb(168, 170, 173)</xsl:attribute>
|
2107
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
2108
|
+
|
2109
|
+
|
2110
|
+
|
2111
|
+
</xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
|
2112
|
+
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
2113
|
+
|
2114
|
+
|
2115
|
+
|
2116
|
+
|
2117
|
+
|
2118
|
+
|
2119
|
+
|
2120
|
+
|
2121
|
+
|
2122
|
+
|
2123
|
+
|
2124
|
+
|
2125
|
+
|
2126
|
+
|
2127
|
+
|
2128
|
+
<xsl:attribute name="font-size">60%</xsl:attribute>
|
2129
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
2130
|
+
|
2131
|
+
|
2132
|
+
|
2084
2133
|
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
2085
2134
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
2086
2135
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
@@ -3041,6 +3090,102 @@
|
|
3041
3090
|
|
3042
3091
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
|
3043
3092
|
<xsl:apply-templates/>
|
3093
|
+
</xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
|
3094
|
+
|
3095
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
3096
|
+
<xsl:variable name="p_fn_">
|
3097
|
+
<xsl:choose>
|
3098
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
3099
|
+
<fn gen_id="{generate-id(.)}">
|
3100
|
+
<xsl:copy-of select="@*"/>
|
3101
|
+
<xsl:copy-of select="node()"/>
|
3102
|
+
</fn>
|
3103
|
+
</xsl:when>
|
3104
|
+
<xsl:otherwise>
|
3105
|
+
<!-- itetation for:
|
3106
|
+
footnotes in bibdata/title
|
3107
|
+
footnotes in bibliography
|
3108
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
3109
|
+
-->
|
3110
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
3111
|
+
<fn gen_id="{generate-id(.)}">
|
3112
|
+
<xsl:copy-of select="@*"/>
|
3113
|
+
<xsl:copy-of select="node()"/>
|
3114
|
+
</fn>
|
3115
|
+
</xsl:for-each>
|
3116
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
3117
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3118
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
3119
|
+
<!-- copy unique fn -->
|
3120
|
+
<fn gen_id="{generate-id(.)}">
|
3121
|
+
<xsl:copy-of select="@*"/>
|
3122
|
+
<xsl:copy-of select="node()"/>
|
3123
|
+
</fn>
|
3124
|
+
</xsl:for-each>
|
3125
|
+
</xsl:for-each>
|
3126
|
+
</xsl:otherwise>
|
3127
|
+
</xsl:choose>
|
3128
|
+
</xsl:variable>
|
3129
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
3130
|
+
|
3131
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
3132
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
3133
|
+
<xsl:variable name="reference" select="@reference"/>
|
3134
|
+
<!-- fn sequence number in document -->
|
3135
|
+
<xsl:variable name="current_fn_number">
|
3136
|
+
<xsl:choose>
|
3137
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
3138
|
+
<xsl:otherwise>
|
3139
|
+
<xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1"/>
|
3140
|
+
</xsl:otherwise>
|
3141
|
+
</xsl:choose>
|
3142
|
+
</xsl:variable>
|
3143
|
+
<xsl:variable name="current_fn_number_text">
|
3144
|
+
<xsl:value-of select="$current_fn_number"/>
|
3145
|
+
|
3146
|
+
|
3147
|
+
</xsl:variable>
|
3148
|
+
|
3149
|
+
<xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
|
3150
|
+
<xsl:variable name="footnote_inline">
|
3151
|
+
<fo:inline xsl:use-attribute-sets="fn-num-style">
|
3152
|
+
|
3153
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3154
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3155
|
+
</fo:basic-link>
|
3156
|
+
</fo:inline>
|
3157
|
+
</xsl:variable>
|
3158
|
+
<!-- DEBUG: p_fn=<xsl:copy-of select="$p_fn"/>
|
3159
|
+
gen_id=<xsl:value-of select="$gen_id"/> -->
|
3160
|
+
<xsl:choose>
|
3161
|
+
<xsl:when test="normalize-space(@skip_footnote_body) = 'true'">
|
3162
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3163
|
+
</xsl:when>
|
3164
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
3165
|
+
<fo:footnote xsl:use-attribute-sets="fn-style">
|
3166
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3167
|
+
<fo:footnote-body>
|
3168
|
+
|
3169
|
+
<fo:block-container text-indent="0" start-indent="0">
|
3170
|
+
|
3171
|
+
|
3172
|
+
<fo:block xsl:use-attribute-sets="fn-body-style">
|
3173
|
+
|
3174
|
+
|
3175
|
+
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
|
3176
|
+
|
3177
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3178
|
+
</fo:inline>
|
3179
|
+
<xsl:apply-templates/>
|
3180
|
+
</fo:block>
|
3181
|
+
</fo:block-container>
|
3182
|
+
</fo:footnote-body>
|
3183
|
+
</fo:footnote>
|
3184
|
+
</xsl:when>
|
3185
|
+
<xsl:otherwise>
|
3186
|
+
<xsl:copy-of select="$footnote_inline"/>
|
3187
|
+
</xsl:otherwise>
|
3188
|
+
</xsl:choose>
|
3044
3189
|
</xsl:template><xsl:template name="fn_display">
|
3045
3190
|
<xsl:variable name="references">
|
3046
3191
|
|
@@ -3235,6 +3380,8 @@
|
|
3235
3380
|
|
3236
3381
|
</fo:basic-link>
|
3237
3382
|
</fo:inline>
|
3383
|
+
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
3384
|
+
<fo:inline><xsl:value-of select="."/></fo:inline>
|
3238
3385
|
</xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
|
3239
3386
|
<fo:inline>
|
3240
3387
|
<xsl:apply-templates/>
|
@@ -3611,8 +3758,10 @@
|
|
3611
3758
|
</xsl:template><xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
|
3612
3759
|
<fo:inline font-weight="bold">
|
3613
3760
|
|
3614
|
-
<xsl:
|
3615
|
-
|
3761
|
+
<xsl:if test="not(parent::*[local-name() = 'termsource'])">
|
3762
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
3763
|
+
<xsl:attribute name="color">black</xsl:attribute>
|
3764
|
+
</xsl:if>
|
3616
3765
|
|
3617
3766
|
<xsl:apply-templates/>
|
3618
3767
|
</fo:inline>
|
@@ -4248,22 +4397,6 @@
|
|
4248
4397
|
<xsl:if test="not(preceding-sibling::*[local-name() = 'p'])"><xsl:value-of select="$callout"/></xsl:if>
|
4249
4398
|
<xsl:apply-templates/>
|
4250
4399
|
</fo:inline>
|
4251
|
-
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
4252
|
-
<xsl:variable name="title-modified">
|
4253
|
-
|
4254
|
-
|
4255
|
-
<xsl:call-template name="getTitle">
|
4256
|
-
<xsl:with-param name="name" select="'title-modified'"/>
|
4257
|
-
</xsl:call-template>
|
4258
|
-
|
4259
|
-
</xsl:variable>
|
4260
|
-
|
4261
|
-
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
4262
|
-
<xsl:choose>
|
4263
|
-
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
4264
|
-
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
4265
|
-
</xsl:choose>
|
4266
|
-
<xsl:apply-templates/>
|
4267
4400
|
</xsl:template><xsl:template match="*[local-name() = 'xref']">
|
4268
4401
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
4269
4402
|
|
@@ -5542,59 +5675,71 @@
|
|
5542
5675
|
<xsl:variable name="termsource_text">
|
5543
5676
|
<xsl:apply-templates/>
|
5544
5677
|
</xsl:variable>
|
5545
|
-
|
5546
|
-
<xsl:choose>
|
5678
|
+
<xsl:copy-of select="$termsource_text"/>
|
5679
|
+
<!-- <xsl:choose>
|
5547
5680
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
5548
|
-
<!-- <xsl:apply-templates /> -->
|
5549
5681
|
<xsl:copy-of select="$termsource_text"/>
|
5550
5682
|
</xsl:when>
|
5551
5683
|
<xsl:otherwise>
|
5552
|
-
|
5553
|
-
|
5554
|
-
|
5684
|
+
<xsl:if test="$namespace = 'bsi'">
|
5685
|
+
<xsl:choose>
|
5686
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>{</xsl:text></xsl:when>
|
5687
|
+
<xsl:otherwise><xsl:text>[</xsl:text></xsl:otherwise>
|
5688
|
+
</xsl:choose>
|
5689
|
+
</xsl:if>
|
5690
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
5691
|
+
<xsl:text>[</xsl:text>
|
5692
|
+
</xsl:if>
|
5555
5693
|
<xsl:copy-of select="$termsource_text"/>
|
5556
|
-
|
5557
|
-
|
5694
|
+
<xsl:if test="$namespace = 'bsi'">
|
5695
|
+
<xsl:choose>
|
5696
|
+
<xsl:when test="$document_type = 'PAS' and starts-with(*[local-name() = 'origin']/@citeas, '[')"><xsl:text>}</xsl:text></xsl:when>
|
5697
|
+
<xsl:otherwise><xsl:text>]</xsl:text></xsl:otherwise>
|
5698
|
+
</xsl:choose>
|
5699
|
+
</xsl:if>
|
5700
|
+
<xsl:if test="$namespace = 'gb' or $namespace = 'iso' or $namespace = 'iec' or $namespace = 'itu' or $namespace = 'unece' or $namespace = 'unece-rec' or $namespace = 'nist-cswp' or $namespace = 'nist-sp' or $namespace = 'ogc-white-paper' or $namespace = 'csa' or $namespace = 'csd' or $namespace = 'm3d' or $namespace = 'iho' or $namespace = 'bipm' or $namespace = 'jcgm'">
|
5701
|
+
<xsl:text>]</xsl:text>
|
5702
|
+
</xsl:if>
|
5558
5703
|
</xsl:otherwise>
|
5559
|
-
</xsl:choose>
|
5704
|
+
</xsl:choose> -->
|
5560
5705
|
</fo:block>
|
5561
5706
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
5562
5707
|
<xsl:if test="normalize-space() != ''">
|
5563
5708
|
<xsl:value-of select="."/>
|
5564
5709
|
</xsl:if>
|
5565
|
-
</xsl:template><xsl:
|
5566
|
-
<
|
5567
|
-
|
5568
|
-
|
5569
|
-
|
5710
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
|
5711
|
+
<fo:inline>
|
5712
|
+
|
5713
|
+
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
5714
|
+
|
5715
|
+
|
5716
|
+
<xsl:value-of select="."/>
|
5717
|
+
</fo:inline>
|
5718
|
+
</xsl:template><xsl:template match="*[local-name() = 'origin']">
|
5570
5719
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
5571
5720
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5572
5721
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5573
5722
|
</xsl:if>
|
5574
|
-
|
5575
|
-
|
5576
|
-
<fo:inline>
|
5577
|
-
|
5578
|
-
|
5579
|
-
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
5580
|
-
<xsl:attribute name="color"><xsl:value-of select="$color_blue"/></xsl:attribute>
|
5581
|
-
|
5582
|
-
|
5583
|
-
|
5584
|
-
|
5585
|
-
<xsl:value-of select="$localized.source"/>
|
5586
|
-
<xsl:text>: </xsl:text>
|
5587
|
-
|
5588
|
-
|
5589
|
-
|
5590
|
-
|
5591
|
-
</fo:inline>
|
5592
|
-
|
5593
5723
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
5594
5724
|
<xsl:apply-templates/>
|
5595
5725
|
</fo:inline>
|
5726
|
+
</fo:basic-link>
|
5727
|
+
</xsl:template><xsl:template match="*[local-name() = 'modification']">
|
5728
|
+
<xsl:variable name="title-modified">
|
5596
5729
|
|
5597
|
-
|
5730
|
+
|
5731
|
+
<xsl:call-template name="getTitle">
|
5732
|
+
<xsl:with-param name="name" select="'title-modified'"/>
|
5733
|
+
</xsl:call-template>
|
5734
|
+
|
5735
|
+
</xsl:variable>
|
5736
|
+
|
5737
|
+
<xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
|
5738
|
+
<xsl:choose>
|
5739
|
+
<xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
|
5740
|
+
<xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
|
5741
|
+
</xsl:choose>
|
5742
|
+
<xsl:apply-templates/>
|
5598
5743
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
5599
5744
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5600
5745
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
@@ -6192,7 +6337,31 @@
|
|
6192
6337
|
<fo:block-container border="1pt solid black" width="50%">
|
6193
6338
|
<fo:block> </fo:block>
|
6194
6339
|
</fo:block-container>
|
6195
|
-
</xsl:template><xsl:
|
6340
|
+
</xsl:template><xsl:variable name="toc_level">
|
6341
|
+
<xsl:choose>
|
6342
|
+
<xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
|
6343
|
+
<xsl:otherwise><!-- default value -->
|
6344
|
+
|
6345
|
+
|
6346
|
+
|
6347
|
+
|
6348
|
+
|
6349
|
+
|
6350
|
+
|
6351
|
+
|
6352
|
+
|
6353
|
+
|
6354
|
+
|
6355
|
+
|
6356
|
+
|
6357
|
+
|
6358
|
+
|
6359
|
+
2
|
6360
|
+
|
6361
|
+
|
6362
|
+
</xsl:otherwise>
|
6363
|
+
</xsl:choose>
|
6364
|
+
</xsl:variable><xsl:template match="*[local-name() = 'toc']">
|
6196
6365
|
<xsl:param name="colwidths"/>
|
6197
6366
|
<xsl:variable name="colwidths_">
|
6198
6367
|
<xsl:choose>
|
@@ -6832,4 +7001,14 @@
|
|
6832
7001
|
</xsl:otherwise>
|
6833
7002
|
</xsl:choose>
|
6834
7003
|
</xsl:if>
|
7004
|
+
</xsl:template><xsl:template name="setAltText">
|
7005
|
+
<xsl:param name="value"/>
|
7006
|
+
<xsl:attribute name="fox:alt-text">
|
7007
|
+
<xsl:choose>
|
7008
|
+
<xsl:when test="normalize-space($value) != ''">
|
7009
|
+
<xsl:value-of select="$value"/>
|
7010
|
+
</xsl:when>
|
7011
|
+
<xsl:otherwise>_</xsl:otherwise>
|
7012
|
+
</xsl:choose>
|
7013
|
+
</xsl:attribute>
|
6835
7014
|
</xsl:template></xsl:stylesheet>
|
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: 1.8.
|
4
|
+
version: 1.8.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -245,7 +245,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.2.
|
248
|
+
rubygems_version: 3.2.32
|
249
249
|
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: metanorma-ribose lets you write Ribose standards in AsciiDoc.
|