metanorma-iso 2.4.2 → 2.4.3
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/iso/html/html_iso_intro.html +0 -1
- data/lib/isodoc/iso/html/word_iso_intro-dis.html +0 -2
- data/lib/isodoc/iso/html/word_iso_intro.html +0 -2
- data/lib/isodoc/iso/iso.amendment.xsl +252 -99
- data/lib/isodoc/iso/iso.international-standard.xsl +252 -99
- data/lib/isodoc/iso/presentation_xml_convert.rb +6 -0
- data/lib/isodoc/iso/sections.rb +10 -10
- data/lib/isodoc/iso/word_cleanup.rb +3 -0
- data/lib/metanorma/iso/isodoc.rng +12 -7
- data/lib/metanorma/iso/isostandard-amd.rng +5 -8
- data/lib/metanorma/iso/isostandard.rng +5 -8
- data/lib/metanorma/iso/version.rb +1 -1
- data/metanorma-iso.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6efbdfac921fca07cbdb4d753e847a89c54f8347df0c17b6618688c40e8003d9
|
|
4
|
+
data.tar.gz: 1b7120befb99cc66e1a2e3daf5c80bdfb52758c3f79467ea869cb142462dccc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 022e4216384f835d28245833db63f4bb2c6c69a92117187d29649146aace5c86c7221c10b48c235d80a86928725fd04bc50ca8c81f3bafc88acfe8d97324697a
|
|
7
|
+
data.tar.gz: 9dd817c38bae0befa1929aeb4447850b1f030d2e9084aa6432192efdbad0bb1f8c6f8c8e820587f19faefa7da2877be91911b26957f708de651e9e95a9d6c4a7
|
|
@@ -8,7 +8,5 @@ margin-left:5.1pt;margin-right:5.1pt'>
|
|
|
8
8
|
{% if doctype == "Amendment" or doctype == "Technical Corrigendum" %}
|
|
9
9
|
{% else %}
|
|
10
10
|
|
|
11
|
-
<p class="zzContents" style='margin-top:0cm'><span lang="EN-GB">{{ labels["table_of_contents"] }}</span></p>
|
|
12
11
|
|
|
13
|
-
WORDTOC
|
|
14
12
|
{% endif %}
|
|
@@ -2094,7 +2094,7 @@
|
|
|
2094
2094
|
<xsl:template match="iso:indexsect" mode="index">
|
|
2095
2095
|
|
|
2096
2096
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
2097
|
-
<xsl:variable name="header-title">
|
|
2097
|
+
<!-- <xsl:variable name="header-title">
|
|
2098
2098
|
<xsl:choose>
|
|
2099
2099
|
<xsl:when test="./iso:title[1]/*[local-name() = 'tab']">
|
|
2100
2100
|
<xsl:apply-templates select="./iso:title[1]/*[local-name() = 'tab'][1]/following-sibling::node()" mode="header"/>
|
|
@@ -2103,13 +2103,14 @@
|
|
|
2103
2103
|
<xsl:apply-templates select="./iso:title[1]" mode="header"/>
|
|
2104
2104
|
</xsl:otherwise>
|
|
2105
2105
|
</xsl:choose>
|
|
2106
|
-
</xsl:variable>
|
|
2106
|
+
</xsl:variable> -->
|
|
2107
2107
|
<xsl:call-template name="insertHeaderFooter">
|
|
2108
|
-
<xsl:with-param name="header-title" select="$header-title"/>
|
|
2108
|
+
<!-- <xsl:with-param name="header-title" select="$header-title"/> -->
|
|
2109
|
+
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
|
2109
2110
|
</xsl:call-template>
|
|
2110
2111
|
|
|
2111
2112
|
<fo:flow flow-name="xsl-region-body">
|
|
2112
|
-
<fo:block id="{@id}" span="all">
|
|
2113
|
+
<fo:block id="{@id}" text-align="center" span="all">
|
|
2113
2114
|
<xsl:apply-templates select="iso:title"/>
|
|
2114
2115
|
</fo:block>
|
|
2115
2116
|
<fo:block role="Index">
|
|
@@ -2120,21 +2121,25 @@
|
|
|
2120
2121
|
</xsl:template>
|
|
2121
2122
|
|
|
2122
2123
|
<xsl:template match="iso:xref" priority="2">
|
|
2123
|
-
<
|
|
2124
|
-
<xsl:
|
|
2125
|
-
<
|
|
2126
|
-
<
|
|
2127
|
-
<xsl:
|
|
2128
|
-
<
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2124
|
+
<xsl:call-template name="insert_basic_link">
|
|
2125
|
+
<xsl:with-param name="element">
|
|
2126
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
2127
|
+
<xsl:choose>
|
|
2128
|
+
<xsl:when test="@pagenumber='true'">
|
|
2129
|
+
<fo:inline>
|
|
2130
|
+
<xsl:if test="@id">
|
|
2131
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
2132
|
+
</xsl:if>
|
|
2133
|
+
<fo:page-number-citation ref-id="{@target}"/>
|
|
2134
|
+
</fo:inline>
|
|
2135
|
+
</xsl:when>
|
|
2136
|
+
<xsl:otherwise>
|
|
2137
|
+
<xsl:apply-templates/>
|
|
2138
|
+
</xsl:otherwise>
|
|
2139
|
+
</xsl:choose>
|
|
2140
|
+
</fo:basic-link>
|
|
2141
|
+
</xsl:with-param>
|
|
2142
|
+
</xsl:call-template>
|
|
2138
2143
|
</xsl:template>
|
|
2139
2144
|
|
|
2140
2145
|
<!-- =================== -->
|
|
@@ -3027,6 +3032,7 @@
|
|
|
3027
3032
|
</xsl:attribute-set>
|
|
3028
3033
|
|
|
3029
3034
|
<xsl:attribute-set name="xref-style">
|
|
3035
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
3030
3036
|
|
|
3031
3037
|
<xsl:attribute name="color">blue</xsl:attribute>
|
|
3032
3038
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
@@ -5129,9 +5135,13 @@
|
|
|
5129
5135
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
|
5130
5136
|
</xsl:if>
|
|
5131
5137
|
|
|
5132
|
-
<
|
|
5133
|
-
<xsl:
|
|
5134
|
-
|
|
5138
|
+
<xsl:call-template name="insert_basic_link">
|
|
5139
|
+
<xsl:with-param name="element">
|
|
5140
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
|
5141
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
|
5142
|
+
</fo:basic-link>
|
|
5143
|
+
</xsl:with-param>
|
|
5144
|
+
</xsl:call-template>
|
|
5135
5145
|
</fo:inline>
|
|
5136
5146
|
</xsl:variable>
|
|
5137
5147
|
|
|
@@ -5473,8 +5483,10 @@
|
|
|
5473
5483
|
<xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
|
|
5474
5484
|
<xsl:text> </xsl:text>
|
|
5475
5485
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
|
5476
|
-
<xsl:text
|
|
5477
|
-
|
|
5486
|
+
<xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
|
|
5487
|
+
<xsl:text> </xsl:text>
|
|
5488
|
+
</xsl:if>
|
|
5489
|
+
<xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
|
|
5478
5490
|
</fo:block>
|
|
5479
5491
|
|
|
5480
5492
|
</xsl:when> <!-- END: only one component -->
|
|
@@ -5975,8 +5987,18 @@
|
|
|
5975
5987
|
</xsl:if>
|
|
5976
5988
|
</xsl:template>
|
|
5977
5989
|
|
|
5978
|
-
<xsl:template match="*[local-name()='dd']/*
|
|
5979
|
-
<
|
|
5990
|
+
<xsl:template match="*[local-name()='dd']/*" mode="inline">
|
|
5991
|
+
<xsl:variable name="is_inline_element_after_where">
|
|
5992
|
+
<xsl:if test="(local-name() = 'p') and not(preceding-sibling::node()[normalize-space() != ''])">true</xsl:if>
|
|
5993
|
+
</xsl:variable>
|
|
5994
|
+
<xsl:choose>
|
|
5995
|
+
<xsl:when test="$is_inline_element_after_where = 'true'">
|
|
5996
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
|
5997
|
+
</xsl:when>
|
|
5998
|
+
<xsl:otherwise>
|
|
5999
|
+
<xsl:apply-templates select="."/>
|
|
6000
|
+
</xsl:otherwise>
|
|
6001
|
+
</xsl:choose>
|
|
5980
6002
|
</xsl:template>
|
|
5981
6003
|
|
|
5982
6004
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
|
@@ -7482,6 +7504,79 @@
|
|
|
7482
7504
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
|
7483
7505
|
</xsl:template>
|
|
7484
7506
|
|
|
7507
|
+
<!-- special case for:
|
|
7508
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
7509
|
+
<mstyle displaystyle="true">
|
|
7510
|
+
<msup>
|
|
7511
|
+
<mi color="#00000000">C</mi>
|
|
7512
|
+
<mtext>R</mtext>
|
|
7513
|
+
</msup>
|
|
7514
|
+
<msubsup>
|
|
7515
|
+
<mtext>C</mtext>
|
|
7516
|
+
<mi>n</mi>
|
|
7517
|
+
<mi>k</mi>
|
|
7518
|
+
</msubsup>
|
|
7519
|
+
</mstyle>
|
|
7520
|
+
</math>
|
|
7521
|
+
-->
|
|
7522
|
+
<xsl:template match="mathml:msup/mathml:mi[. = '' or . = ''][not(preceding-sibling::*)][following-sibling::mathml:mtext]" mode="mathml">
|
|
7523
|
+
<xsl:copy>
|
|
7524
|
+
<xsl:copy-of select="@*"/>
|
|
7525
|
+
<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"/>
|
|
7526
|
+
<xsl:if test="string-length($next_mtext) != ''">
|
|
7527
|
+
<xsl:attribute name="color">#00000000</xsl:attribute>
|
|
7528
|
+
</xsl:if>
|
|
7529
|
+
<xsl:apply-templates/>
|
|
7530
|
+
<xsl:value-of select="$next_mtext"/>
|
|
7531
|
+
</xsl:copy>
|
|
7532
|
+
</xsl:template>
|
|
7533
|
+
|
|
7534
|
+
<!-- special case for:
|
|
7535
|
+
<msup>
|
|
7536
|
+
<mtext/>
|
|
7537
|
+
<mn>1</mn>
|
|
7538
|
+
</msup>
|
|
7539
|
+
convert to (add mspace after mtext and enclose them into mrow):
|
|
7540
|
+
<msup>
|
|
7541
|
+
<mrow>
|
|
7542
|
+
<mtext/>
|
|
7543
|
+
<mspace height="1.47ex"/>
|
|
7544
|
+
</mrow>
|
|
7545
|
+
<mn>1</mn>
|
|
7546
|
+
</msup>
|
|
7547
|
+
-->
|
|
7548
|
+
<xsl:template match="mathml:msup/mathml:mtext[not(preceding-sibling::*)]" mode="mathml">
|
|
7549
|
+
<mathml:mrow>
|
|
7550
|
+
<xsl:copy-of select="."/>
|
|
7551
|
+
<mathml:mspace height="1.47ex"/>
|
|
7552
|
+
</mathml:mrow>
|
|
7553
|
+
</xsl:template>
|
|
7554
|
+
|
|
7555
|
+
<!-- add space around vertical line -->
|
|
7556
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
|
|
7557
|
+
<xsl:copy>
|
|
7558
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
|
7559
|
+
<xsl:if test="not(@lspace)">
|
|
7560
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
|
7561
|
+
</xsl:if>
|
|
7562
|
+
<xsl:if test="not(@rspace)">
|
|
7563
|
+
<xsl:attribute name="rspace">0.4em</xsl:attribute>
|
|
7564
|
+
</xsl:if>
|
|
7565
|
+
<xsl:apply-templates mode="mathml"/>
|
|
7566
|
+
</xsl:copy>
|
|
7567
|
+
</xsl:template>
|
|
7568
|
+
|
|
7569
|
+
<!-- decrease fontsize for 'Circled Times' char -->
|
|
7570
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '⊗']" mode="mathml">
|
|
7571
|
+
<xsl:copy>
|
|
7572
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
|
7573
|
+
<xsl:if test="not(@fontsize)">
|
|
7574
|
+
<xsl:attribute name="fontsize">55%</xsl:attribute>
|
|
7575
|
+
</xsl:if>
|
|
7576
|
+
<xsl:apply-templates mode="mathml"/>
|
|
7577
|
+
</xsl:copy>
|
|
7578
|
+
</xsl:template>
|
|
7579
|
+
|
|
7485
7580
|
<!-- Examples:
|
|
7486
7581
|
<stem type="AsciiMath">x = 1</stem>
|
|
7487
7582
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
|
@@ -7539,19 +7634,23 @@
|
|
|
7539
7634
|
<xsl:apply-templates/>
|
|
7540
7635
|
</xsl:when>
|
|
7541
7636
|
<xsl:otherwise>
|
|
7542
|
-
<
|
|
7543
|
-
<xsl:
|
|
7544
|
-
<
|
|
7545
|
-
<xsl:
|
|
7546
|
-
<xsl:
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7637
|
+
<xsl:call-template name="insert_basic_link">
|
|
7638
|
+
<xsl:with-param name="element">
|
|
7639
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
|
7640
|
+
<xsl:choose>
|
|
7641
|
+
<xsl:when test="normalize-space(.) = ''">
|
|
7642
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
|
7643
|
+
<xsl:with-param name="text" select="$target_text"/>
|
|
7644
|
+
</xsl:call-template>
|
|
7645
|
+
</xsl:when>
|
|
7646
|
+
<xsl:otherwise>
|
|
7647
|
+
<!-- output text from <link>text</link> -->
|
|
7648
|
+
<xsl:apply-templates/>
|
|
7649
|
+
</xsl:otherwise>
|
|
7650
|
+
</xsl:choose>
|
|
7651
|
+
</fo:basic-link>
|
|
7652
|
+
</xsl:with-param>
|
|
7653
|
+
</xsl:call-template>
|
|
7555
7654
|
</xsl:otherwise>
|
|
7556
7655
|
</xsl:choose>
|
|
7557
7656
|
</fo:inline>
|
|
@@ -7614,12 +7713,16 @@
|
|
|
7614
7713
|
</xsl:template>
|
|
7615
7714
|
|
|
7616
7715
|
<xsl:template match="*[local-name() = 'xref']">
|
|
7617
|
-
<
|
|
7618
|
-
<xsl:
|
|
7619
|
-
<
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7716
|
+
<xsl:call-template name="insert_basic_link">
|
|
7717
|
+
<xsl:with-param name="element">
|
|
7718
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
7719
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
|
7720
|
+
<xsl:call-template name="append_add-style"/>
|
|
7721
|
+
</xsl:if>
|
|
7722
|
+
<xsl:apply-templates/>
|
|
7723
|
+
</fo:basic-link>
|
|
7724
|
+
</xsl:with-param>
|
|
7725
|
+
</xsl:call-template>
|
|
7623
7726
|
</xsl:template>
|
|
7624
7727
|
|
|
7625
7728
|
<!-- ====== -->
|
|
@@ -8012,7 +8115,7 @@
|
|
|
8012
8115
|
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
|
8013
8116
|
</xsl:when>
|
|
8014
8117
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8015
|
-
<xsl:value-of select="concat('url(file
|
|
8118
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8016
8119
|
</xsl:when>
|
|
8017
8120
|
<xsl:otherwise>
|
|
8018
8121
|
<xsl:value-of select="@src"/>
|
|
@@ -8034,7 +8137,7 @@
|
|
|
8034
8137
|
</xsl:when>
|
|
8035
8138
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8036
8139
|
<xsl:variable name="src">
|
|
8037
|
-
<xsl:value-of select="concat('url(file
|
|
8140
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8038
8141
|
</xsl:variable>
|
|
8039
8142
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
|
8040
8143
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
@@ -8420,15 +8523,19 @@
|
|
|
8420
8523
|
<xsl:param name="dest"/>
|
|
8421
8524
|
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
|
8422
8525
|
<fo:block font-size="1pt">
|
|
8423
|
-
<
|
|
8424
|
-
<
|
|
8425
|
-
<fo:
|
|
8426
|
-
|
|
8427
|
-
<
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8526
|
+
<xsl:call-template name="insert_basic_link">
|
|
8527
|
+
<xsl:with-param name="element">
|
|
8528
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
|
8529
|
+
<fo:inline-container inline-progression-dimension="100%">
|
|
8530
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
|
8531
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
|
8532
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
|
8533
|
+
</xsl:if> -->
|
|
8534
|
+
<fo:block> </fo:block></fo:block-container>
|
|
8535
|
+
</fo:inline-container>
|
|
8536
|
+
</fo:basic-link>
|
|
8537
|
+
</xsl:with-param>
|
|
8538
|
+
</xsl:call-template>
|
|
8432
8539
|
</fo:block>
|
|
8433
8540
|
</fo:block-container>
|
|
8434
8541
|
</xsl:template>
|
|
@@ -9979,14 +10086,18 @@
|
|
|
9979
10086
|
</xsl:template>
|
|
9980
10087
|
|
|
9981
10088
|
<xsl:template match="*[local-name() = 'origin']">
|
|
9982
|
-
<
|
|
9983
|
-
<xsl:
|
|
9984
|
-
<
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
10089
|
+
<xsl:call-template name="insert_basic_link">
|
|
10090
|
+
<xsl:with-param name="element">
|
|
10091
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
10092
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
|
10093
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
10094
|
+
</xsl:if>
|
|
10095
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
10096
|
+
<xsl:apply-templates/>
|
|
10097
|
+
</fo:inline>
|
|
10098
|
+
</fo:basic-link>
|
|
10099
|
+
</xsl:with-param>
|
|
10100
|
+
</xsl:call-template>
|
|
9990
10101
|
</xsl:template>
|
|
9991
10102
|
|
|
9992
10103
|
<!-- not using, see https://github.com/glossarist/iev-document/issues/23 -->
|
|
@@ -10065,9 +10176,13 @@
|
|
|
10065
10176
|
<xsl:if test="../*[local-name() = 'author']">
|
|
10066
10177
|
<xsl:text>, </xsl:text>
|
|
10067
10178
|
</xsl:if>
|
|
10068
|
-
<
|
|
10069
|
-
<xsl:
|
|
10070
|
-
|
|
10179
|
+
<xsl:call-template name="insert_basic_link">
|
|
10180
|
+
<xsl:with-param name="element">
|
|
10181
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
10182
|
+
<xsl:apply-templates/>
|
|
10183
|
+
</fo:basic-link>
|
|
10184
|
+
</xsl:with-param>
|
|
10185
|
+
</xsl:call-template>
|
|
10071
10186
|
</xsl:template>
|
|
10072
10187
|
|
|
10073
10188
|
<xsl:template match="*[local-name() = 'author']">
|
|
@@ -10116,25 +10231,29 @@
|
|
|
10116
10231
|
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
|
10117
10232
|
<xsl:variable name="text" select="normalize-space()"/>
|
|
10118
10233
|
|
|
10119
|
-
<
|
|
10120
|
-
<xsl:
|
|
10121
|
-
<
|
|
10122
|
-
|
|
10123
|
-
|
|
10234
|
+
<xsl:call-template name="insert_basic_link">
|
|
10235
|
+
<xsl:with-param name="element">
|
|
10236
|
+
<fo:basic-link fox:alt-text="{@citeas}">
|
|
10237
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
|
10238
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
|
10239
|
+
</xsl:if>
|
|
10240
|
+
<xsl:if test="@type = 'inline'">
|
|
10124
10241
|
|
|
10125
|
-
|
|
10242
|
+
</xsl:if>
|
|
10126
10243
|
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10244
|
+
<xsl:choose>
|
|
10245
|
+
<xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
|
|
10246
|
+
<xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
|
|
10247
|
+
</xsl:when>
|
|
10248
|
+
<xsl:otherwise>
|
|
10249
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
10250
|
+
</xsl:otherwise>
|
|
10251
|
+
</xsl:choose>
|
|
10135
10252
|
|
|
10136
|
-
|
|
10137
|
-
|
|
10253
|
+
<xsl:apply-templates/>
|
|
10254
|
+
</fo:basic-link>
|
|
10255
|
+
</xsl:with-param>
|
|
10256
|
+
</xsl:call-template>
|
|
10138
10257
|
|
|
10139
10258
|
</fo:inline>
|
|
10140
10259
|
</xsl:when>
|
|
@@ -10374,7 +10493,10 @@
|
|
|
10374
10493
|
<xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
|
|
10375
10494
|
|
|
10376
10495
|
<xsl:template name="setULLabel">
|
|
10377
|
-
<xsl:variable name="
|
|
10496
|
+
<xsl:variable name="list_level__">
|
|
10497
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
|
10498
|
+
</xsl:variable>
|
|
10499
|
+
<xsl:variable name="list_level_" select="number($list_level__)"/>
|
|
10378
10500
|
<xsl:variable name="list_level">
|
|
10379
10501
|
<xsl:choose>
|
|
10380
10502
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
|
@@ -10507,9 +10629,11 @@
|
|
|
10507
10629
|
</fo:block-container>
|
|
10508
10630
|
</xsl:when>
|
|
10509
10631
|
<xsl:otherwise>
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10632
|
+
|
|
10633
|
+
<fo:block>
|
|
10634
|
+
<xsl:apply-templates select="." mode="list"/>
|
|
10635
|
+
</fo:block>
|
|
10636
|
+
|
|
10513
10637
|
</xsl:otherwise>
|
|
10514
10638
|
</xsl:choose>
|
|
10515
10639
|
</xsl:template>
|
|
@@ -11197,24 +11321,32 @@
|
|
|
11197
11321
|
<xsl:for-each select="*[local-name() = 'tab']">
|
|
11198
11322
|
<xsl:variable name="current_id" select="generate-id()"/>
|
|
11199
11323
|
<fo:table-cell>
|
|
11200
|
-
<fo:block>
|
|
11201
|
-
<
|
|
11202
|
-
<xsl:
|
|
11203
|
-
<
|
|
11204
|
-
<xsl:
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11324
|
+
<fo:block line-height-shift-adjustment="disregard-shifts">
|
|
11325
|
+
<xsl:call-template name="insert_basic_link">
|
|
11326
|
+
<xsl:with-param name="element">
|
|
11327
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
11328
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
11329
|
+
<xsl:choose>
|
|
11330
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
11331
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
|
11332
|
+
</xsl:choose>
|
|
11333
|
+
</xsl:for-each>
|
|
11334
|
+
</fo:basic-link>
|
|
11335
|
+
</xsl:with-param>
|
|
11336
|
+
</xsl:call-template>
|
|
11209
11337
|
</fo:block>
|
|
11210
11338
|
</fo:table-cell>
|
|
11211
11339
|
</xsl:for-each>
|
|
11212
11340
|
<!-- last column - for page numbers -->
|
|
11213
11341
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
|
11214
11342
|
<fo:block>
|
|
11215
|
-
<
|
|
11216
|
-
<
|
|
11217
|
-
|
|
11343
|
+
<xsl:call-template name="insert_basic_link">
|
|
11344
|
+
<xsl:with-param name="element">
|
|
11345
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
11346
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
|
11347
|
+
</fo:basic-link>
|
|
11348
|
+
</xsl:with-param>
|
|
11349
|
+
</xsl:call-template>
|
|
11218
11350
|
</fo:block>
|
|
11219
11351
|
</fo:table-cell>
|
|
11220
11352
|
</xsl:template>
|
|
@@ -11256,6 +11388,27 @@
|
|
|
11256
11388
|
<!-- End Table of Contents (ToC) processing -->
|
|
11257
11389
|
<!-- =================== -->
|
|
11258
11390
|
|
|
11391
|
+
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
11392
|
+
<xsl:template name="insert_basic_link">
|
|
11393
|
+
<xsl:param name="element"/>
|
|
11394
|
+
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
11395
|
+
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
11396
|
+
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
11397
|
+
<xsl:choose>
|
|
11398
|
+
<xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
|
|
11399
|
+
<xsl:copy-of select="$element_node"/>
|
|
11400
|
+
</xsl:when>
|
|
11401
|
+
<xsl:otherwise>
|
|
11402
|
+
<fo:inline>
|
|
11403
|
+
<xsl:for-each select="$element_node/fo:basic-link/@*[local-name() != 'external-destination' and local-name() != 'internal-destination' and local-name() != 'alt-text']">
|
|
11404
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
|
11405
|
+
</xsl:for-each>
|
|
11406
|
+
<xsl:copy-of select="$element_node/fo:basic-link/node()"/>
|
|
11407
|
+
</fo:inline>
|
|
11408
|
+
</xsl:otherwise>
|
|
11409
|
+
</xsl:choose>
|
|
11410
|
+
</xsl:template>
|
|
11411
|
+
|
|
11259
11412
|
<xsl:template match="*[local-name() = 'variant-title']"/> <!-- [@type = 'sub'] -->
|
|
11260
11413
|
<xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
|
11261
11414
|
<fo:inline padding-right="5mm"> </fo:inline>
|
|
@@ -2094,7 +2094,7 @@
|
|
|
2094
2094
|
<xsl:template match="iso:indexsect" mode="index">
|
|
2095
2095
|
|
|
2096
2096
|
<fo:page-sequence master-reference="index" force-page-count="no-force">
|
|
2097
|
-
<xsl:variable name="header-title">
|
|
2097
|
+
<!-- <xsl:variable name="header-title">
|
|
2098
2098
|
<xsl:choose>
|
|
2099
2099
|
<xsl:when test="./iso:title[1]/*[local-name() = 'tab']">
|
|
2100
2100
|
<xsl:apply-templates select="./iso:title[1]/*[local-name() = 'tab'][1]/following-sibling::node()" mode="header"/>
|
|
@@ -2103,13 +2103,14 @@
|
|
|
2103
2103
|
<xsl:apply-templates select="./iso:title[1]" mode="header"/>
|
|
2104
2104
|
</xsl:otherwise>
|
|
2105
2105
|
</xsl:choose>
|
|
2106
|
-
</xsl:variable>
|
|
2106
|
+
</xsl:variable> -->
|
|
2107
2107
|
<xsl:call-template name="insertHeaderFooter">
|
|
2108
|
-
<xsl:with-param name="header-title" select="$header-title"/>
|
|
2108
|
+
<!-- <xsl:with-param name="header-title" select="$header-title"/> -->
|
|
2109
|
+
<xsl:with-param name="font-weight">normal</xsl:with-param>
|
|
2109
2110
|
</xsl:call-template>
|
|
2110
2111
|
|
|
2111
2112
|
<fo:flow flow-name="xsl-region-body">
|
|
2112
|
-
<fo:block id="{@id}" span="all">
|
|
2113
|
+
<fo:block id="{@id}" text-align="center" span="all">
|
|
2113
2114
|
<xsl:apply-templates select="iso:title"/>
|
|
2114
2115
|
</fo:block>
|
|
2115
2116
|
<fo:block role="Index">
|
|
@@ -2120,21 +2121,25 @@
|
|
|
2120
2121
|
</xsl:template>
|
|
2121
2122
|
|
|
2122
2123
|
<xsl:template match="iso:xref" priority="2">
|
|
2123
|
-
<
|
|
2124
|
-
<xsl:
|
|
2125
|
-
<
|
|
2126
|
-
<
|
|
2127
|
-
<xsl:
|
|
2128
|
-
<
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
|
|
2137
|
-
|
|
2124
|
+
<xsl:call-template name="insert_basic_link">
|
|
2125
|
+
<xsl:with-param name="element">
|
|
2126
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
2127
|
+
<xsl:choose>
|
|
2128
|
+
<xsl:when test="@pagenumber='true'">
|
|
2129
|
+
<fo:inline>
|
|
2130
|
+
<xsl:if test="@id">
|
|
2131
|
+
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
|
|
2132
|
+
</xsl:if>
|
|
2133
|
+
<fo:page-number-citation ref-id="{@target}"/>
|
|
2134
|
+
</fo:inline>
|
|
2135
|
+
</xsl:when>
|
|
2136
|
+
<xsl:otherwise>
|
|
2137
|
+
<xsl:apply-templates/>
|
|
2138
|
+
</xsl:otherwise>
|
|
2139
|
+
</xsl:choose>
|
|
2140
|
+
</fo:basic-link>
|
|
2141
|
+
</xsl:with-param>
|
|
2142
|
+
</xsl:call-template>
|
|
2138
2143
|
</xsl:template>
|
|
2139
2144
|
|
|
2140
2145
|
<!-- =================== -->
|
|
@@ -3027,6 +3032,7 @@
|
|
|
3027
3032
|
</xsl:attribute-set>
|
|
3028
3033
|
|
|
3029
3034
|
<xsl:attribute-set name="xref-style">
|
|
3035
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
|
3030
3036
|
|
|
3031
3037
|
<xsl:attribute name="color">blue</xsl:attribute>
|
|
3032
3038
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
|
@@ -5129,9 +5135,13 @@
|
|
|
5129
5135
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
|
5130
5136
|
</xsl:if>
|
|
5131
5137
|
|
|
5132
|
-
<
|
|
5133
|
-
<xsl:
|
|
5134
|
-
|
|
5138
|
+
<xsl:call-template name="insert_basic_link">
|
|
5139
|
+
<xsl:with-param name="element">
|
|
5140
|
+
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
|
|
5141
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
|
5142
|
+
</fo:basic-link>
|
|
5143
|
+
</xsl:with-param>
|
|
5144
|
+
</xsl:call-template>
|
|
5135
5145
|
</fo:inline>
|
|
5136
5146
|
</xsl:variable>
|
|
5137
5147
|
|
|
@@ -5473,8 +5483,10 @@
|
|
|
5473
5483
|
<xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
|
|
5474
5484
|
<xsl:text> </xsl:text>
|
|
5475
5485
|
<xsl:apply-templates select="*[local-name()='dt']/*"/>
|
|
5476
|
-
<xsl:text
|
|
5477
|
-
|
|
5486
|
+
<xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
|
|
5487
|
+
<xsl:text> </xsl:text>
|
|
5488
|
+
</xsl:if>
|
|
5489
|
+
<xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
|
|
5478
5490
|
</fo:block>
|
|
5479
5491
|
|
|
5480
5492
|
</xsl:when> <!-- END: only one component -->
|
|
@@ -5975,8 +5987,18 @@
|
|
|
5975
5987
|
</xsl:if>
|
|
5976
5988
|
</xsl:template>
|
|
5977
5989
|
|
|
5978
|
-
<xsl:template match="*[local-name()='dd']/*
|
|
5979
|
-
<
|
|
5990
|
+
<xsl:template match="*[local-name()='dd']/*" mode="inline">
|
|
5991
|
+
<xsl:variable name="is_inline_element_after_where">
|
|
5992
|
+
<xsl:if test="(local-name() = 'p') and not(preceding-sibling::node()[normalize-space() != ''])">true</xsl:if>
|
|
5993
|
+
</xsl:variable>
|
|
5994
|
+
<xsl:choose>
|
|
5995
|
+
<xsl:when test="$is_inline_element_after_where = 'true'">
|
|
5996
|
+
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
|
5997
|
+
</xsl:when>
|
|
5998
|
+
<xsl:otherwise>
|
|
5999
|
+
<xsl:apply-templates select="."/>
|
|
6000
|
+
</xsl:otherwise>
|
|
6001
|
+
</xsl:choose>
|
|
5980
6002
|
</xsl:template>
|
|
5981
6003
|
|
|
5982
6004
|
<!-- virtual html table for dl/[dt and dd] for IF (Intermediate Format) -->
|
|
@@ -7482,6 +7504,79 @@
|
|
|
7482
7504
|
<xsl:value-of select="."/><xsl:value-of select="$zero_width_space"/>
|
|
7483
7505
|
</xsl:template>
|
|
7484
7506
|
|
|
7507
|
+
<!-- special case for:
|
|
7508
|
+
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
|
7509
|
+
<mstyle displaystyle="true">
|
|
7510
|
+
<msup>
|
|
7511
|
+
<mi color="#00000000">C</mi>
|
|
7512
|
+
<mtext>R</mtext>
|
|
7513
|
+
</msup>
|
|
7514
|
+
<msubsup>
|
|
7515
|
+
<mtext>C</mtext>
|
|
7516
|
+
<mi>n</mi>
|
|
7517
|
+
<mi>k</mi>
|
|
7518
|
+
</msubsup>
|
|
7519
|
+
</mstyle>
|
|
7520
|
+
</math>
|
|
7521
|
+
-->
|
|
7522
|
+
<xsl:template match="mathml:msup/mathml:mi[. = '' or . = ''][not(preceding-sibling::*)][following-sibling::mathml:mtext]" mode="mathml">
|
|
7523
|
+
<xsl:copy>
|
|
7524
|
+
<xsl:copy-of select="@*"/>
|
|
7525
|
+
<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"/>
|
|
7526
|
+
<xsl:if test="string-length($next_mtext) != ''">
|
|
7527
|
+
<xsl:attribute name="color">#00000000</xsl:attribute>
|
|
7528
|
+
</xsl:if>
|
|
7529
|
+
<xsl:apply-templates/>
|
|
7530
|
+
<xsl:value-of select="$next_mtext"/>
|
|
7531
|
+
</xsl:copy>
|
|
7532
|
+
</xsl:template>
|
|
7533
|
+
|
|
7534
|
+
<!-- special case for:
|
|
7535
|
+
<msup>
|
|
7536
|
+
<mtext/>
|
|
7537
|
+
<mn>1</mn>
|
|
7538
|
+
</msup>
|
|
7539
|
+
convert to (add mspace after mtext and enclose them into mrow):
|
|
7540
|
+
<msup>
|
|
7541
|
+
<mrow>
|
|
7542
|
+
<mtext/>
|
|
7543
|
+
<mspace height="1.47ex"/>
|
|
7544
|
+
</mrow>
|
|
7545
|
+
<mn>1</mn>
|
|
7546
|
+
</msup>
|
|
7547
|
+
-->
|
|
7548
|
+
<xsl:template match="mathml:msup/mathml:mtext[not(preceding-sibling::*)]" mode="mathml">
|
|
7549
|
+
<mathml:mrow>
|
|
7550
|
+
<xsl:copy-of select="."/>
|
|
7551
|
+
<mathml:mspace height="1.47ex"/>
|
|
7552
|
+
</mathml:mrow>
|
|
7553
|
+
</xsl:template>
|
|
7554
|
+
|
|
7555
|
+
<!-- add space around vertical line -->
|
|
7556
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '|']" mode="mathml">
|
|
7557
|
+
<xsl:copy>
|
|
7558
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
|
7559
|
+
<xsl:if test="not(@lspace)">
|
|
7560
|
+
<xsl:attribute name="lspace">0.4em</xsl:attribute>
|
|
7561
|
+
</xsl:if>
|
|
7562
|
+
<xsl:if test="not(@rspace)">
|
|
7563
|
+
<xsl:attribute name="rspace">0.4em</xsl:attribute>
|
|
7564
|
+
</xsl:if>
|
|
7565
|
+
<xsl:apply-templates mode="mathml"/>
|
|
7566
|
+
</xsl:copy>
|
|
7567
|
+
</xsl:template>
|
|
7568
|
+
|
|
7569
|
+
<!-- decrease fontsize for 'Circled Times' char -->
|
|
7570
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '⊗']" mode="mathml">
|
|
7571
|
+
<xsl:copy>
|
|
7572
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
|
7573
|
+
<xsl:if test="not(@fontsize)">
|
|
7574
|
+
<xsl:attribute name="fontsize">55%</xsl:attribute>
|
|
7575
|
+
</xsl:if>
|
|
7576
|
+
<xsl:apply-templates mode="mathml"/>
|
|
7577
|
+
</xsl:copy>
|
|
7578
|
+
</xsl:template>
|
|
7579
|
+
|
|
7485
7580
|
<!-- Examples:
|
|
7486
7581
|
<stem type="AsciiMath">x = 1</stem>
|
|
7487
7582
|
<stem type="AsciiMath"><asciimath>x = 1</asciimath></stem>
|
|
@@ -7539,19 +7634,23 @@
|
|
|
7539
7634
|
<xsl:apply-templates/>
|
|
7540
7635
|
</xsl:when>
|
|
7541
7636
|
<xsl:otherwise>
|
|
7542
|
-
<
|
|
7543
|
-
<xsl:
|
|
7544
|
-
<
|
|
7545
|
-
<xsl:
|
|
7546
|
-
<xsl:
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7637
|
+
<xsl:call-template name="insert_basic_link">
|
|
7638
|
+
<xsl:with-param name="element">
|
|
7639
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
|
7640
|
+
<xsl:choose>
|
|
7641
|
+
<xsl:when test="normalize-space(.) = ''">
|
|
7642
|
+
<xsl:call-template name="add-zero-spaces-link-java">
|
|
7643
|
+
<xsl:with-param name="text" select="$target_text"/>
|
|
7644
|
+
</xsl:call-template>
|
|
7645
|
+
</xsl:when>
|
|
7646
|
+
<xsl:otherwise>
|
|
7647
|
+
<!-- output text from <link>text</link> -->
|
|
7648
|
+
<xsl:apply-templates/>
|
|
7649
|
+
</xsl:otherwise>
|
|
7650
|
+
</xsl:choose>
|
|
7651
|
+
</fo:basic-link>
|
|
7652
|
+
</xsl:with-param>
|
|
7653
|
+
</xsl:call-template>
|
|
7555
7654
|
</xsl:otherwise>
|
|
7556
7655
|
</xsl:choose>
|
|
7557
7656
|
</fo:inline>
|
|
@@ -7614,12 +7713,16 @@
|
|
|
7614
7713
|
</xsl:template>
|
|
7615
7714
|
|
|
7616
7715
|
<xsl:template match="*[local-name() = 'xref']">
|
|
7617
|
-
<
|
|
7618
|
-
<xsl:
|
|
7619
|
-
<
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7716
|
+
<xsl:call-template name="insert_basic_link">
|
|
7717
|
+
<xsl:with-param name="element">
|
|
7718
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
|
|
7719
|
+
<xsl:if test="parent::*[local-name() = 'add']">
|
|
7720
|
+
<xsl:call-template name="append_add-style"/>
|
|
7721
|
+
</xsl:if>
|
|
7722
|
+
<xsl:apply-templates/>
|
|
7723
|
+
</fo:basic-link>
|
|
7724
|
+
</xsl:with-param>
|
|
7725
|
+
</xsl:call-template>
|
|
7623
7726
|
</xsl:template>
|
|
7624
7727
|
|
|
7625
7728
|
<!-- ====== -->
|
|
@@ -8012,7 +8115,7 @@
|
|
|
8012
8115
|
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
|
8013
8116
|
</xsl:when>
|
|
8014
8117
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8015
|
-
<xsl:value-of select="concat('url(file
|
|
8118
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8016
8119
|
</xsl:when>
|
|
8017
8120
|
<xsl:otherwise>
|
|
8018
8121
|
<xsl:value-of select="@src"/>
|
|
@@ -8034,7 +8137,7 @@
|
|
|
8034
8137
|
</xsl:when>
|
|
8035
8138
|
<xsl:when test="not(starts-with(@src, 'data:'))">
|
|
8036
8139
|
<xsl:variable name="src">
|
|
8037
|
-
<xsl:value-of select="concat('url(file
|
|
8140
|
+
<xsl:value-of select="concat('url(file:///',$basepath, @src, ')')"/>
|
|
8038
8141
|
</xsl:variable>
|
|
8039
8142
|
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
|
8040
8143
|
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
|
@@ -8420,15 +8523,19 @@
|
|
|
8420
8523
|
<xsl:param name="dest"/>
|
|
8421
8524
|
<fo:block-container position="absolute" left="{$left}px" top="{$top}px" width="{$width}px" height="{$height}px">
|
|
8422
8525
|
<fo:block font-size="1pt">
|
|
8423
|
-
<
|
|
8424
|
-
<
|
|
8425
|
-
<fo:
|
|
8426
|
-
|
|
8427
|
-
<
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8526
|
+
<xsl:call-template name="insert_basic_link">
|
|
8527
|
+
<xsl:with-param name="element">
|
|
8528
|
+
<fo:basic-link internal-destination="{$dest}" fox:alt-text="svg link">
|
|
8529
|
+
<fo:inline-container inline-progression-dimension="100%">
|
|
8530
|
+
<fo:block-container height="{$height - 1}px" width="100%">
|
|
8531
|
+
<!-- DEBUG <xsl:if test="local-name()='polygon'">
|
|
8532
|
+
<xsl:attribute name="background-color">magenta</xsl:attribute>
|
|
8533
|
+
</xsl:if> -->
|
|
8534
|
+
<fo:block> </fo:block></fo:block-container>
|
|
8535
|
+
</fo:inline-container>
|
|
8536
|
+
</fo:basic-link>
|
|
8537
|
+
</xsl:with-param>
|
|
8538
|
+
</xsl:call-template>
|
|
8432
8539
|
</fo:block>
|
|
8433
8540
|
</fo:block-container>
|
|
8434
8541
|
</xsl:template>
|
|
@@ -9979,14 +10086,18 @@
|
|
|
9979
10086
|
</xsl:template>
|
|
9980
10087
|
|
|
9981
10088
|
<xsl:template match="*[local-name() = 'origin']">
|
|
9982
|
-
<
|
|
9983
|
-
<xsl:
|
|
9984
|
-
<
|
|
9985
|
-
|
|
9986
|
-
|
|
9987
|
-
|
|
9988
|
-
|
|
9989
|
-
|
|
10089
|
+
<xsl:call-template name="insert_basic_link">
|
|
10090
|
+
<xsl:with-param name="element">
|
|
10091
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
10092
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
|
10093
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
10094
|
+
</xsl:if>
|
|
10095
|
+
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
10096
|
+
<xsl:apply-templates/>
|
|
10097
|
+
</fo:inline>
|
|
10098
|
+
</fo:basic-link>
|
|
10099
|
+
</xsl:with-param>
|
|
10100
|
+
</xsl:call-template>
|
|
9990
10101
|
</xsl:template>
|
|
9991
10102
|
|
|
9992
10103
|
<!-- not using, see https://github.com/glossarist/iev-document/issues/23 -->
|
|
@@ -10065,9 +10176,13 @@
|
|
|
10065
10176
|
<xsl:if test="../*[local-name() = 'author']">
|
|
10066
10177
|
<xsl:text>, </xsl:text>
|
|
10067
10178
|
</xsl:if>
|
|
10068
|
-
<
|
|
10069
|
-
<xsl:
|
|
10070
|
-
|
|
10179
|
+
<xsl:call-template name="insert_basic_link">
|
|
10180
|
+
<xsl:with-param name="element">
|
|
10181
|
+
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
10182
|
+
<xsl:apply-templates/>
|
|
10183
|
+
</fo:basic-link>
|
|
10184
|
+
</xsl:with-param>
|
|
10185
|
+
</xsl:call-template>
|
|
10071
10186
|
</xsl:template>
|
|
10072
10187
|
|
|
10073
10188
|
<xsl:template match="*[local-name() = 'author']">
|
|
@@ -10116,25 +10231,29 @@
|
|
|
10116
10231
|
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
|
10117
10232
|
<xsl:variable name="text" select="normalize-space()"/>
|
|
10118
10233
|
|
|
10119
|
-
<
|
|
10120
|
-
<xsl:
|
|
10121
|
-
<
|
|
10122
|
-
|
|
10123
|
-
|
|
10234
|
+
<xsl:call-template name="insert_basic_link">
|
|
10235
|
+
<xsl:with-param name="element">
|
|
10236
|
+
<fo:basic-link fox:alt-text="{@citeas}">
|
|
10237
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
|
10238
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
|
10239
|
+
</xsl:if>
|
|
10240
|
+
<xsl:if test="@type = 'inline'">
|
|
10124
10241
|
|
|
10125
|
-
|
|
10242
|
+
</xsl:if>
|
|
10126
10243
|
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10244
|
+
<xsl:choose>
|
|
10245
|
+
<xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
|
|
10246
|
+
<xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
|
|
10247
|
+
</xsl:when>
|
|
10248
|
+
<xsl:otherwise>
|
|
10249
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
10250
|
+
</xsl:otherwise>
|
|
10251
|
+
</xsl:choose>
|
|
10135
10252
|
|
|
10136
|
-
|
|
10137
|
-
|
|
10253
|
+
<xsl:apply-templates/>
|
|
10254
|
+
</fo:basic-link>
|
|
10255
|
+
</xsl:with-param>
|
|
10256
|
+
</xsl:call-template>
|
|
10138
10257
|
|
|
10139
10258
|
</fo:inline>
|
|
10140
10259
|
</xsl:when>
|
|
@@ -10374,7 +10493,10 @@
|
|
|
10374
10493
|
<xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
|
|
10375
10494
|
|
|
10376
10495
|
<xsl:template name="setULLabel">
|
|
10377
|
-
<xsl:variable name="
|
|
10496
|
+
<xsl:variable name="list_level__">
|
|
10497
|
+
<xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
|
|
10498
|
+
</xsl:variable>
|
|
10499
|
+
<xsl:variable name="list_level_" select="number($list_level__)"/>
|
|
10378
10500
|
<xsl:variable name="list_level">
|
|
10379
10501
|
<xsl:choose>
|
|
10380
10502
|
<xsl:when test="$list_level_ <= 3"><xsl:value-of select="$list_level_"/></xsl:when>
|
|
@@ -10507,9 +10629,11 @@
|
|
|
10507
10629
|
</fo:block-container>
|
|
10508
10630
|
</xsl:when>
|
|
10509
10631
|
<xsl:otherwise>
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10632
|
+
|
|
10633
|
+
<fo:block>
|
|
10634
|
+
<xsl:apply-templates select="." mode="list"/>
|
|
10635
|
+
</fo:block>
|
|
10636
|
+
|
|
10513
10637
|
</xsl:otherwise>
|
|
10514
10638
|
</xsl:choose>
|
|
10515
10639
|
</xsl:template>
|
|
@@ -11197,24 +11321,32 @@
|
|
|
11197
11321
|
<xsl:for-each select="*[local-name() = 'tab']">
|
|
11198
11322
|
<xsl:variable name="current_id" select="generate-id()"/>
|
|
11199
11323
|
<fo:table-cell>
|
|
11200
|
-
<fo:block>
|
|
11201
|
-
<
|
|
11202
|
-
<xsl:
|
|
11203
|
-
<
|
|
11204
|
-
<xsl:
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11324
|
+
<fo:block line-height-shift-adjustment="disregard-shifts">
|
|
11325
|
+
<xsl:call-template name="insert_basic_link">
|
|
11326
|
+
<xsl:with-param name="element">
|
|
11327
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
11328
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
11329
|
+
<xsl:choose>
|
|
11330
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
11331
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
|
11332
|
+
</xsl:choose>
|
|
11333
|
+
</xsl:for-each>
|
|
11334
|
+
</fo:basic-link>
|
|
11335
|
+
</xsl:with-param>
|
|
11336
|
+
</xsl:call-template>
|
|
11209
11337
|
</fo:block>
|
|
11210
11338
|
</fo:table-cell>
|
|
11211
11339
|
</xsl:for-each>
|
|
11212
11340
|
<!-- last column - for page numbers -->
|
|
11213
11341
|
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
|
11214
11342
|
<fo:block>
|
|
11215
|
-
<
|
|
11216
|
-
<
|
|
11217
|
-
|
|
11343
|
+
<xsl:call-template name="insert_basic_link">
|
|
11344
|
+
<xsl:with-param name="element">
|
|
11345
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
11346
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
|
11347
|
+
</fo:basic-link>
|
|
11348
|
+
</xsl:with-param>
|
|
11349
|
+
</xsl:call-template>
|
|
11218
11350
|
</fo:block>
|
|
11219
11351
|
</fo:table-cell>
|
|
11220
11352
|
</xsl:template>
|
|
@@ -11256,6 +11388,27 @@
|
|
|
11256
11388
|
<!-- End Table of Contents (ToC) processing -->
|
|
11257
11389
|
<!-- =================== -->
|
|
11258
11390
|
|
|
11391
|
+
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
|
11392
|
+
<xsl:template name="insert_basic_link">
|
|
11393
|
+
<xsl:param name="element"/>
|
|
11394
|
+
<xsl:variable name="element_node" select="xalan:nodeset($element)"/>
|
|
11395
|
+
<xsl:variable name="external-destination" select="normalize-space(count($element_node/fo:basic-link/@external-destination[. != '']) = 1)"/>
|
|
11396
|
+
<xsl:variable name="internal-destination" select="normalize-space(count($element_node/fo:basic-link/@internal-destination[. != '']) = 1)"/>
|
|
11397
|
+
<xsl:choose>
|
|
11398
|
+
<xsl:when test="$external-destination = 'true' or $internal-destination = 'true'">
|
|
11399
|
+
<xsl:copy-of select="$element_node"/>
|
|
11400
|
+
</xsl:when>
|
|
11401
|
+
<xsl:otherwise>
|
|
11402
|
+
<fo:inline>
|
|
11403
|
+
<xsl:for-each select="$element_node/fo:basic-link/@*[local-name() != 'external-destination' and local-name() != 'internal-destination' and local-name() != 'alt-text']">
|
|
11404
|
+
<xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
|
|
11405
|
+
</xsl:for-each>
|
|
11406
|
+
<xsl:copy-of select="$element_node/fo:basic-link/node()"/>
|
|
11407
|
+
</fo:inline>
|
|
11408
|
+
</xsl:otherwise>
|
|
11409
|
+
</xsl:choose>
|
|
11410
|
+
</xsl:template>
|
|
11411
|
+
|
|
11259
11412
|
<xsl:template match="*[local-name() = 'variant-title']"/> <!-- [@type = 'sub'] -->
|
|
11260
11413
|
<xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
|
11261
11414
|
<fo:inline padding-right="5mm"> </fo:inline>
|
|
@@ -237,6 +237,12 @@ module IsoDoc
|
|
|
237
237
|
dlist.remove
|
|
238
238
|
end
|
|
239
239
|
|
|
240
|
+
def toc_title(docxml)
|
|
241
|
+
doctype = docxml.at(ns("//bibdata/ext/doctype"))&.text
|
|
242
|
+
%w(amendment technical-corrigendum).include?(doctype) and return
|
|
243
|
+
super
|
|
244
|
+
end
|
|
245
|
+
|
|
240
246
|
include Init
|
|
241
247
|
end
|
|
242
248
|
end
|
data/lib/isodoc/iso/sections.rb
CHANGED
|
@@ -35,26 +35,26 @@ module IsoDoc
|
|
|
35
35
|
amd(isoxml) and @suppressheadingnumbers = true
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
=begin
|
|
39
|
+
def introduction(clause, out)
|
|
40
40
|
title_attr = { class: "IntroTitle" }
|
|
41
41
|
page_break(out)
|
|
42
|
-
out.div class: "Section3", id:
|
|
43
|
-
clause_name(
|
|
44
|
-
|
|
42
|
+
out.div class: "Section3", id: clause["id"] do |div|
|
|
43
|
+
clause_name(clause, clause.at(ns("./title")), div, title_attr)
|
|
44
|
+
clause.elements.each do |e|
|
|
45
45
|
parse(e, div) unless e.name == "title"
|
|
46
46
|
end
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
|
+
=end
|
|
49
50
|
|
|
50
|
-
def foreword(
|
|
51
|
-
f = isoxml.at(ns("//foreword")) or return
|
|
51
|
+
def foreword(clause, out)
|
|
52
52
|
@foreword = true
|
|
53
53
|
page_break(out)
|
|
54
|
-
out.div **attr_code(id:
|
|
55
|
-
clause_name(nil,
|
|
54
|
+
out.div **attr_code(id: clause["id"]) do |s|
|
|
55
|
+
clause_name(nil, clause.at(ns("./title")) || @i18n.foreword, s,
|
|
56
56
|
{ class: "ForewordTitle" })
|
|
57
|
-
|
|
57
|
+
clause.elements.each { |e| parse(e, s) unless e.name == "title" }
|
|
58
58
|
end
|
|
59
59
|
@foreword = false
|
|
60
60
|
end
|
|
@@ -142,6 +142,9 @@ module IsoDoc
|
|
|
142
142
|
# supply missing annex title
|
|
143
143
|
def make_WordToC(docxml, level)
|
|
144
144
|
toc = ""
|
|
145
|
+
if source = docxml.at("//div[@class = 'TOC']")
|
|
146
|
+
toc = to_xml(source.children)
|
|
147
|
+
end
|
|
145
148
|
xpath = (1..level).each.map { |i| "//h#{i}" }.join (" | ")
|
|
146
149
|
docxml.xpath(xpath).each do |h|
|
|
147
150
|
x = ""
|
|
@@ -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,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar ns="https://www.metanorma.org/ns/iso" xmlns="http://relaxng.org/ns/structure/1.0">
|
|
3
|
-
<!--
|
|
3
|
+
<!--
|
|
4
|
+
VERSION v1.2.1
|
|
5
|
+
default namespace isostandard = "https://www.metanorma.com/ns/iso"
|
|
6
|
+
-->
|
|
4
7
|
<include href="relaton-iso.rng"/>
|
|
5
8
|
<include href="isostandard.rng">
|
|
6
9
|
<start>
|
|
@@ -32,13 +35,7 @@
|
|
|
32
35
|
</define>
|
|
33
36
|
<define name="iso-standard">
|
|
34
37
|
<element name="iso-standard">
|
|
35
|
-
<
|
|
36
|
-
<attribute name="type">
|
|
37
|
-
<choice>
|
|
38
|
-
<value>semantic</value>
|
|
39
|
-
<value>presentation</value>
|
|
40
|
-
</choice>
|
|
41
|
-
</attribute>
|
|
38
|
+
<ref name="Root-Attributes"/>
|
|
42
39
|
<ref name="bibdata"/>
|
|
43
40
|
<optional>
|
|
44
41
|
<ref name="misccontainer"/>
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
|
3
|
-
<!--
|
|
3
|
+
<!--
|
|
4
|
+
VERSION v1.2.1
|
|
5
|
+
default namespace isostandard = "https://www.metanorma.com/ns/iso"
|
|
6
|
+
-->
|
|
4
7
|
<include href="isodoc.rng">
|
|
5
8
|
<start>
|
|
6
9
|
<ref name="iso-standard"/>
|
|
@@ -240,13 +243,7 @@
|
|
|
240
243
|
-->
|
|
241
244
|
<define name="iso-standard">
|
|
242
245
|
<element name="iso-standard">
|
|
243
|
-
<
|
|
244
|
-
<attribute name="type">
|
|
245
|
-
<choice>
|
|
246
|
-
<value>semantic</value>
|
|
247
|
-
<value>presentation</value>
|
|
248
|
-
</choice>
|
|
249
|
-
</attribute>
|
|
246
|
+
<ref name="Root-Attributes"/>
|
|
250
247
|
<ref name="bibdata"/>
|
|
251
248
|
<zeroOrMore>
|
|
252
249
|
<ref name="termdocsource"/>
|
data/metanorma-iso.gemspec
CHANGED
|
@@ -32,7 +32,7 @@ Gem::Specification.new do |spec|
|
|
|
32
32
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
|
33
33
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
|
34
34
|
|
|
35
|
-
spec.add_dependency "metanorma-standoc", "~> 2.4.
|
|
35
|
+
spec.add_dependency "metanorma-standoc", "~> 2.4.3"
|
|
36
36
|
spec.add_dependency "mnconvert", "~> 1.14"
|
|
37
37
|
spec.add_dependency "pubid-iso", "~> 0.5.0"
|
|
38
38
|
spec.add_dependency "ruby-jing"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-iso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.4.
|
|
4
|
+
version: 2.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
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-standoc
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.4.
|
|
19
|
+
version: 2.4.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.4.
|
|
26
|
+
version: 2.4.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: mnconvert
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|