metanorma-un 0.10.7 → 0.10.8
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/un/base_convert.rb +5 -0
- data/lib/isodoc/un/html/html_unece_intro.html +0 -1
- data/lib/isodoc/un/html/word_unece_intro.html +0 -5
- data/lib/isodoc/un/html_convert.rb +9 -16
- data/lib/isodoc/un/presentation_xml_convert.rb +5 -0
- data/lib/isodoc/un/un.plenary-attachment.xsl +229 -81
- data/lib/isodoc/un/un.plenary.xsl +229 -81
- data/lib/isodoc/un/un.recommendation.xsl +228 -80
- data/lib/isodoc/un/word_convert.rb +18 -26
- data/lib/metanorma/un/isodoc.rng +12 -7
- data/lib/metanorma/un/un.rng +3 -8
- data/lib/metanorma/un/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7c45854aea4c72619dbb87420deb144e2074c879cc7ade99cf19f2c55d3194f
|
4
|
+
data.tar.gz: c20d5555a7ed1cd05878113402842e95281f881807904bd6cdd7fc8642e5f21a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4dd0dd4b0b94377c146c5994899dba8da5ea5dd1dd9247d10567c601320b38535917f63ab9cfecdaba3d3170bb568125297d36ee3714fc2f1d032150639b65b3
|
7
|
+
data.tar.gz: e232807d3106fff96e09a44bb5ed661637ccfbe180d86ee18dfa07e45fbf1d1252a27b1a50a489740389ce257d6b1642fccc49cea13756c77ff086268427854e
|
@@ -68,12 +68,7 @@ module IsoDoc
|
|
68
68
|
def make_body3(body, docxml)
|
69
69
|
body.div class: "main-section" do |div3|
|
70
70
|
boilerplate docxml, div3
|
71
|
-
|
72
|
-
abstract docxml, div3
|
73
|
-
foreword docxml, div3
|
74
|
-
introduction docxml, div3
|
75
|
-
preface docxml, div3
|
76
|
-
acknowledgements docxml, div3
|
71
|
+
front docxml, div3
|
77
72
|
middle docxml, div3
|
78
73
|
footnotes div3
|
79
74
|
comments div3
|
@@ -87,24 +82,22 @@ module IsoDoc
|
|
87
82
|
bibliography isoxml, out
|
88
83
|
end
|
89
84
|
|
90
|
-
def introduction(
|
91
|
-
f = isoxml.at(ns("//introduction")) || return
|
85
|
+
def introduction(clause, out)
|
92
86
|
page_break(out)
|
93
|
-
out.div class: "Section3", id:
|
94
|
-
clause_name(
|
95
|
-
|
87
|
+
out.div class: "Section3", id: clause["id"] do |div|
|
88
|
+
clause_name(clause, clause.at(ns("./title")), div, { class: "IntroTitle" })
|
89
|
+
clause.elements.each do |e|
|
96
90
|
parse(e, div) unless e.name == "title"
|
97
91
|
end
|
98
92
|
end
|
99
93
|
end
|
100
94
|
|
101
|
-
def foreword(
|
102
|
-
f = isoxml.at(ns("//foreword")) || return
|
95
|
+
def foreword(clause, out)
|
103
96
|
page_break(out)
|
104
|
-
out.div **attr_code(id:
|
105
|
-
clause_name(
|
97
|
+
out.div **attr_code(id: clause["id"]) do |s|
|
98
|
+
clause_name(clause, clause.at(ns("./title")) || @i18n.foreword, s,
|
106
99
|
class: "ForewordTitle")
|
107
|
-
|
100
|
+
clause.elements.each { |e| parse(e, s) unless e.name == "title" }
|
108
101
|
end
|
109
102
|
end
|
110
103
|
|
@@ -1442,6 +1442,7 @@
|
|
1442
1442
|
</xsl:attribute-set>
|
1443
1443
|
|
1444
1444
|
<xsl:attribute-set name="xref-style">
|
1445
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
1445
1446
|
|
1446
1447
|
</xsl:attribute-set>
|
1447
1448
|
|
@@ -3425,9 +3426,13 @@
|
|
3425
3426
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
3426
3427
|
</xsl:if>
|
3427
3428
|
|
3428
|
-
<
|
3429
|
-
<xsl:
|
3430
|
-
|
3429
|
+
<xsl:call-template name="insert_basic_link">
|
3430
|
+
<xsl:with-param name="element">
|
3431
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
3432
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
3433
|
+
</fo:basic-link>
|
3434
|
+
</xsl:with-param>
|
3435
|
+
</xsl:call-template>
|
3431
3436
|
</fo:inline>
|
3432
3437
|
</xsl:variable>
|
3433
3438
|
|
@@ -3760,8 +3765,10 @@
|
|
3760
3765
|
<xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
|
3761
3766
|
<xsl:text> </xsl:text>
|
3762
3767
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
3763
|
-
<xsl:text
|
3764
|
-
|
3768
|
+
<xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
|
3769
|
+
<xsl:text> </xsl:text>
|
3770
|
+
</xsl:if>
|
3771
|
+
<xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
|
3765
3772
|
</fo:block>
|
3766
3773
|
|
3767
3774
|
</xsl:when> <!-- END: only one component -->
|
@@ -4248,8 +4255,18 @@
|
|
4248
4255
|
</xsl:if>
|
4249
4256
|
</xsl:template>
|
4250
4257
|
|
4251
|
-
<xsl:template match="*[local-name()='dd']/*
|
4252
|
-
<
|
4258
|
+
<xsl:template match="*[local-name()='dd']/*" mode="inline">
|
4259
|
+
<xsl:variable name="is_inline_element_after_where">
|
4260
|
+
<xsl:if test="(local-name() = 'p') and not(preceding-sibling::node()[normalize-space() != ''])">true</xsl:if>
|
4261
|
+
</xsl:variable>
|
4262
|
+
<xsl:choose>
|
4263
|
+
<xsl:when test="$is_inline_element_after_where = 'true'">
|
4264
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
4265
|
+
</xsl:when>
|
4266
|
+
<xsl:otherwise>
|
4267
|
+
<xsl:apply-templates select="."/>
|
4268
|
+
</xsl:otherwise>
|
4269
|
+
</xsl:choose>
|
4253
4270
|
</xsl:template>
|
4254
4271
|
|
4255
4272
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
@@ -5677,6 +5694,79 @@
|
|
5677
5694
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
5678
5695
|
</xsl:template>
|
5679
5696
|
|
5697
|
+
<!-- special case for:
|
5698
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
5699
|
+
<mstyle displaystyle="true">
|
5700
|
+
<msup>
|
5701
|
+
<mi color="#00000000">C</mi>
|
5702
|
+
<mtext>R</mtext>
|
5703
|
+
</msup>
|
5704
|
+
<msubsup>
|
5705
|
+
<mtext>C</mtext>
|
5706
|
+
<mi>n</mi>
|
5707
|
+
<mi>k</mi>
|
5708
|
+
</msubsup>
|
5709
|
+
</mstyle>
|
5710
|
+
</math>
|
5711
|
+
-->
|
5712
|
+
<xsl:template match="mathml:msup/mathml:mi[. = '' or . = ''][not(preceding-sibling::*)][following-sibling::mathml:mtext]" mode="mathml">
|
5713
|
+
<xsl:copy>
|
5714
|
+
<xsl:copy-of select="@*"/>
|
5715
|
+
<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"/>
|
5716
|
+
<xsl:if test="string-length($next_mtext) != ''">
|
5717
|
+
<xsl:attribute name="color">#00000000</xsl:attribute>
|
5718
|
+
</xsl:if>
|
5719
|
+
<xsl:apply-templates/>
|
5720
|
+
<xsl:value-of select="$next_mtext"/>
|
5721
|
+
</xsl:copy>
|
5722
|
+
</xsl:template>
|
5723
|
+
|
5724
|
+
<!-- special case for:
|
5725
|
+
<msup>
|
5726
|
+
<mtext/>
|
5727
|
+
<mn>1</mn>
|
5728
|
+
</msup>
|
5729
|
+
convert to (add mspace after mtext and enclose them into mrow):
|
5730
|
+
<msup>
|
5731
|
+
<mrow>
|
5732
|
+
<mtext/>
|
5733
|
+
<mspace height="1.47ex"/>
|
5734
|
+
</mrow>
|
5735
|
+
<mn>1</mn>
|
5736
|
+
</msup>
|
5737
|
+
-->
|
5738
|
+
<xsl:template match="mathml:msup/mathml:mtext[not(preceding-sibling::*)]" mode="mathml">
|
5739
|
+
<mathml:mrow>
|
5740
|
+
<xsl:copy-of select="."/>
|
5741
|
+
<mathml:mspace height="1.47ex"/>
|
5742
|
+
</mathml:mrow>
|
5743
|
+
</xsl:template>
|
5744
|
+
|
5745
|
+
<!-- add space around vertical line -->
|
5746
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
|
5747
|
+
<xsl:copy>
|
5748
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
5749
|
+
<xsl:if test="not(@lspace)">
|
5750
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
5751
|
+
</xsl:if>
|
5752
|
+
<xsl:if test="not(@rspace)">
|
5753
|
+
<xsl:attribute name="rspace">0.4em</xsl:attribute>
|
5754
|
+
</xsl:if>
|
5755
|
+
<xsl:apply-templates mode="mathml"/>
|
5756
|
+
</xsl:copy>
|
5757
|
+
</xsl:template>
|
5758
|
+
|
5759
|
+
<!-- decrease fontsize for 'Circled Times' char -->
|
5760
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '⊗']" mode="mathml">
|
5761
|
+
<xsl:copy>
|
5762
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
5763
|
+
<xsl:if test="not(@fontsize)">
|
5764
|
+
<xsl:attribute name="fontsize">55%</xsl:attribute>
|
5765
|
+
</xsl:if>
|
5766
|
+
<xsl:apply-templates mode="mathml"/>
|
5767
|
+
</xsl:copy>
|
5768
|
+
</xsl:template>
|
5769
|
+
|
5680
5770
|
<!-- Examples:
|
5681
5771
|
<stem type="AsciiMath">x = 1</stem>
|
5682
5772
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
@@ -5734,19 +5824,23 @@
|
|
5734
5824
|
<xsl:apply-templates/>
|
5735
5825
|
</xsl:when>
|
5736
5826
|
<xsl:otherwise>
|
5737
|
-
<
|
5738
|
-
<xsl:
|
5739
|
-
<
|
5740
|
-
<xsl:
|
5741
|
-
<xsl:
|
5742
|
-
|
5743
|
-
|
5744
|
-
|
5745
|
-
|
5746
|
-
|
5747
|
-
|
5748
|
-
|
5749
|
-
|
5827
|
+
<xsl:call-template name="insert_basic_link">
|
5828
|
+
<xsl:with-param name="element">
|
5829
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
5830
|
+
<xsl:choose>
|
5831
|
+
<xsl:when test="normalize-space(.) = ''">
|
5832
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
5833
|
+
<xsl:with-param name="text" select="$target_text"/>
|
5834
|
+
</xsl:call-template>
|
5835
|
+
</xsl:when>
|
5836
|
+
<xsl:otherwise>
|
5837
|
+
<!-- output text from <link>text</link> -->
|
5838
|
+
<xsl:apply-templates/>
|
5839
|
+
</xsl:otherwise>
|
5840
|
+
</xsl:choose>
|
5841
|
+
</fo:basic-link>
|
5842
|
+
</xsl:with-param>
|
5843
|
+
</xsl:call-template>
|
5750
5844
|
</xsl:otherwise>
|
5751
5845
|
</xsl:choose>
|
5752
5846
|
</fo:inline>
|
@@ -5809,12 +5903,16 @@
|
|
5809
5903
|
</xsl:template>
|
5810
5904
|
|
5811
5905
|
<xsl:template match="*[local-name() = 'xref']">
|
5812
|
-
<
|
5813
|
-
<xsl:
|
5814
|
-
<
|
5815
|
-
|
5816
|
-
|
5817
|
-
|
5906
|
+
<xsl:call-template name="insert_basic_link">
|
5907
|
+
<xsl:with-param name="element">
|
5908
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
5909
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
5910
|
+
<xsl:call-template name="append_add-style"/>
|
5911
|
+
</xsl:if>
|
5912
|
+
<xsl:apply-templates/>
|
5913
|
+
</fo:basic-link>
|
5914
|
+
</xsl:with-param>
|
5915
|
+
</xsl:call-template>
|
5818
5916
|
</xsl:template>
|
5819
5917
|
|
5820
5918
|
<!-- ====== -->
|
@@ -6213,7 +6311,7 @@
|
|
6213
6311
|
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
6214
6312
|
</xsl:when>
|
6215
6313
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
6216
|
-
<xsl:value-of select="concat('url(file
|
6314
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
6217
6315
|
</xsl:when>
|
6218
6316
|
<xsl:otherwise>
|
6219
6317
|
<xsl:value-of select="@src"/>
|
@@ -6235,7 +6333,7 @@
|
|
6235
6333
|
</xsl:when>
|
6236
6334
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
6237
6335
|
<xsl:variable name="src">
|
6238
|
-
<xsl:value-of select="concat('url(file
|
6336
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
6239
6337
|
</xsl:variable>
|
6240
6338
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
6241
6339
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
@@ -6621,15 +6719,19 @@
|
|
6621
6719
|
<xsl:param name="dest"/>
|
6622
6720
|
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
6623
6721
|
<fo:block font-size="1pt">
|
6624
|
-
<
|
6625
|
-
<
|
6626
|
-
<fo:
|
6627
|
-
|
6628
|
-
<
|
6629
|
-
|
6630
|
-
|
6631
|
-
|
6632
|
-
|
6722
|
+
<xsl:call-template name="insert_basic_link">
|
6723
|
+
<xsl:with-param name="element">
|
6724
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
6725
|
+
<fo:inline-container inline-progression-dimension="100%">
|
6726
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
6727
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
6728
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
6729
|
+
</xsl:if> -->
|
6730
|
+
<fo:block> </fo:block></fo:block-container>
|
6731
|
+
</fo:inline-container>
|
6732
|
+
</fo:basic-link>
|
6733
|
+
</xsl:with-param>
|
6734
|
+
</xsl:call-template>
|
6633
6735
|
</fo:block>
|
6634
6736
|
</fo:block-container>
|
6635
6737
|
</xsl:template>
|
@@ -8178,14 +8280,18 @@
|
|
8178
8280
|
</xsl:template>
|
8179
8281
|
|
8180
8282
|
<xsl:template match="*[local-name() = 'origin']">
|
8181
|
-
<
|
8182
|
-
<xsl:
|
8183
|
-
<
|
8184
|
-
|
8185
|
-
|
8186
|
-
|
8187
|
-
|
8188
|
-
|
8283
|
+
<xsl:call-template name="insert_basic_link">
|
8284
|
+
<xsl:with-param name="element">
|
8285
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8286
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
8287
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
8288
|
+
</xsl:if>
|
8289
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
8290
|
+
<xsl:apply-templates/>
|
8291
|
+
</fo:inline>
|
8292
|
+
</fo:basic-link>
|
8293
|
+
</xsl:with-param>
|
8294
|
+
</xsl:call-template>
|
8189
8295
|
</xsl:template>
|
8190
8296
|
|
8191
8297
|
<!-- not using, see https://github.com/glossarist/iev-document/issues/23 -->
|
@@ -8259,9 +8365,13 @@
|
|
8259
8365
|
<xsl:if test="../*[local-name() = 'author']">
|
8260
8366
|
<xsl:text>, </xsl:text>
|
8261
8367
|
</xsl:if>
|
8262
|
-
<
|
8263
|
-
<xsl:
|
8264
|
-
|
8368
|
+
<xsl:call-template name="insert_basic_link">
|
8369
|
+
<xsl:with-param name="element">
|
8370
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
8371
|
+
<xsl:apply-templates/>
|
8372
|
+
</fo:basic-link>
|
8373
|
+
</xsl:with-param>
|
8374
|
+
</xsl:call-template>
|
8265
8375
|
</xsl:template>
|
8266
8376
|
|
8267
8377
|
<xsl:template match="*[local-name() = 'author']">
|
@@ -8310,27 +8420,31 @@
|
|
8310
8420
|
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
8311
8421
|
<xsl:variable name="text" select="normalize-space()"/>
|
8312
8422
|
|
8313
|
-
<
|
8314
|
-
<xsl:
|
8315
|
-
<
|
8316
|
-
|
8317
|
-
|
8423
|
+
<xsl:call-template name="insert_basic_link">
|
8424
|
+
<xsl:with-param name="element">
|
8425
|
+
<fo:basic-link fox:alt-text="{@citeas}">
|
8426
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
8427
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
8428
|
+
</xsl:if>
|
8429
|
+
<xsl:if test="@type = 'inline'">
|
8318
8430
|
|
8319
|
-
|
8431
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
8320
8432
|
|
8321
|
-
|
8433
|
+
</xsl:if>
|
8322
8434
|
|
8323
|
-
|
8324
|
-
|
8325
|
-
|
8326
|
-
|
8327
|
-
|
8328
|
-
|
8329
|
-
|
8330
|
-
|
8435
|
+
<xsl:choose>
|
8436
|
+
<xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
|
8437
|
+
<xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
|
8438
|
+
</xsl:when>
|
8439
|
+
<xsl:otherwise>
|
8440
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
8441
|
+
</xsl:otherwise>
|
8442
|
+
</xsl:choose>
|
8331
8443
|
|
8332
|
-
|
8333
|
-
|
8444
|
+
<xsl:apply-templates/>
|
8445
|
+
</fo:basic-link>
|
8446
|
+
</xsl:with-param>
|
8447
|
+
</xsl:call-template>
|
8334
8448
|
|
8335
8449
|
</fo:inline>
|
8336
8450
|
</xsl:when>
|
@@ -8575,7 +8689,10 @@
|
|
8575
8689
|
<xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
|
8576
8690
|
|
8577
8691
|
<xsl:template name="setULLabel">
|
8578
|
-
<xsl:variable name="
|
8692
|
+
<xsl:variable name="list_level__">
|
8693
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
8694
|
+
</xsl:variable>
|
8695
|
+
<xsl:variable name="list_level_" select="number($list_level__)"/>
|
8579
8696
|
<xsl:variable name="list_level">
|
8580
8697
|
<xsl:choose>
|
8581
8698
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
@@ -8708,9 +8825,11 @@
|
|
8708
8825
|
</fo:block-container>
|
8709
8826
|
</xsl:when>
|
8710
8827
|
<xsl:otherwise>
|
8711
|
-
|
8712
|
-
|
8713
|
-
|
8828
|
+
|
8829
|
+
<fo:block>
|
8830
|
+
<xsl:apply-templates select="." mode="list"/>
|
8831
|
+
</fo:block>
|
8832
|
+
|
8714
8833
|
</xsl:otherwise>
|
8715
8834
|
</xsl:choose>
|
8716
8835
|
</xsl:template>
|
@@ -9377,24 +9496,32 @@
|
|
9377
9496
|
<xsl:for-each select="*[local-name() = 'tab']">
|
9378
9497
|
<xsl:variable name="current_id" select="generate-id()"/>
|
9379
9498
|
<fo:table-cell>
|
9380
|
-
<fo:block>
|
9381
|
-
<
|
9382
|
-
<xsl:
|
9383
|
-
<
|
9384
|
-
<xsl:
|
9385
|
-
|
9386
|
-
|
9387
|
-
|
9388
|
-
|
9499
|
+
<fo:block line-height-shift-adjustment="disregard-shifts">
|
9500
|
+
<xsl:call-template name="insert_basic_link">
|
9501
|
+
<xsl:with-param name="element">
|
9502
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
9503
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
9504
|
+
<xsl:choose>
|
9505
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
9506
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
9507
|
+
</xsl:choose>
|
9508
|
+
</xsl:for-each>
|
9509
|
+
</fo:basic-link>
|
9510
|
+
</xsl:with-param>
|
9511
|
+
</xsl:call-template>
|
9389
9512
|
</fo:block>
|
9390
9513
|
</fo:table-cell>
|
9391
9514
|
</xsl:for-each>
|
9392
9515
|
<!-- last column - for page numbers -->
|
9393
9516
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
9394
9517
|
<fo:block>
|
9395
|
-
<
|
9396
|
-
<
|
9397
|
-
|
9518
|
+
<xsl:call-template name="insert_basic_link">
|
9519
|
+
<xsl:with-param name="element">
|
9520
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
9521
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
9522
|
+
</fo:basic-link>
|
9523
|
+
</xsl:with-param>
|
9524
|
+
</xsl:call-template>
|
9398
9525
|
</fo:block>
|
9399
9526
|
</fo:table-cell>
|
9400
9527
|
</xsl:template>
|
@@ -9436,6 +9563,27 @@
|
|
9436
9563
|
<!-- End Table of Contents (ToC) processing -->
|
9437
9564
|
<!-- =================== -->
|
9438
9565
|
|
9566
|
+
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
9567
|
+
<xsl:template name="insert_basic_link">
|
9568
|
+
<xsl:param name="element"/>
|
9569
|
+
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
9570
|
+
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
9571
|
+
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
9572
|
+
<xsl:choose>
|
9573
|
+
<xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
|
9574
|
+
<xsl:copy-of select="$element_node"/>
|
9575
|
+
</xsl:when>
|
9576
|
+
<xsl:otherwise>
|
9577
|
+
<fo:inline>
|
9578
|
+
<xsl:for-each select="$element_node/fo:basic-link/@*[local-name() != 'external-destination' and local-name() != 'internal-destination' and local-name() != 'alt-text']">
|
9579
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
9580
|
+
</xsl:for-each>
|
9581
|
+
<xsl:copy-of select="$element_node/fo:basic-link/node()"/>
|
9582
|
+
</fo:inline>
|
9583
|
+
</xsl:otherwise>
|
9584
|
+
</xsl:choose>
|
9585
|
+
</xsl:template>
|
9586
|
+
|
9439
9587
|
<xsl:template match="*[local-name() = 'variant-title']"/> <!-- [@type = 'sub'] -->
|
9440
9588
|
<xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
9441
9589
|
<fo:inline padding-right="5mm"> </fo:inline>
|