metanorma-itu 2.1.12 → 2.1.13
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/itu/html/html_itu_titlepage.html +1 -1
- data/lib/isodoc/itu/html/htmlstyle.css +6 -0
- data/lib/isodoc/itu/html_convert.rb +1 -1
- data/lib/isodoc/itu/i18n-ar.yaml +6 -0
- data/lib/isodoc/itu/i18n-de.yaml +6 -0
- data/lib/isodoc/itu/i18n-en.yaml +6 -0
- data/lib/isodoc/itu/i18n-es.yaml +13 -0
- data/lib/isodoc/itu/i18n-fr.yaml +6 -0
- data/lib/isodoc/itu/i18n-ru.yaml +6 -0
- data/lib/isodoc/itu/i18n-zh-Hans.yaml +2 -0
- data/lib/isodoc/itu/init.rb +1 -1
- data/lib/isodoc/itu/itu.implementers-guide.xsl +187 -53
- data/lib/isodoc/itu/itu.in-force.xsl +187 -53
- data/lib/isodoc/itu/itu.recommendation-annex.xsl +187 -53
- data/lib/isodoc/itu/itu.recommendation-supplement.xsl +187 -53
- data/lib/isodoc/itu/itu.recommendation.xsl +187 -53
- data/lib/isodoc/itu/itu.resolution.xsl +187 -53
- data/lib/isodoc/itu/itu.service-publication.xsl +187 -53
- data/lib/isodoc/itu/itu.technical-paper.xsl +187 -53
- data/lib/isodoc/itu/itu.technical-report.xsl +187 -53
- data/lib/isodoc/itu/pdf_convert.rb +1 -1
- data/lib/isodoc/itu/presentation_bibdata.rb +87 -0
- data/lib/isodoc/itu/presentation_xml_convert.rb +79 -106
- data/lib/isodoc/itu/word_convert.rb +1 -1
- data/lib/isodoc/itu/xref.rb +5 -5
- data/lib/metanorma/itu/converter.rb +2 -2
- data/lib/metanorma/itu/isodoc.rng +1 -1
- data/lib/metanorma/itu/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c4affe5d05133fb88eabd946907e5c60c0c117dcf7f4a462db96c53ce88cd740
|
|
4
|
+
data.tar.gz: f2dc781764d916f9a3d1983d22001e1f50264ccc544743ff5f7311501fe22ec9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 499fd4a8889c4329fbdabb25cb40a6dc3817209b55618402945625ef1ed11b490256991ff963856cae8ef2056c2afd14dc8342bbc57ed3cc023cff51290f7b4f
|
|
7
|
+
data.tar.gz: b8d8746048959d239089b805aa90d9bb207dcfee66ab1232d99c09418a913434ceb1336addb7264155cc7d3befeddc593b252b9409c259f24d70d64ab668ec9a
|
|
@@ -698,6 +698,12 @@ nav #toc {
|
|
|
698
698
|
padding-left: 30px; }
|
|
699
699
|
#toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
|
|
700
700
|
padding-left: 50px; }
|
|
701
|
+
#toc .h4, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h4 {
|
|
702
|
+
padding-left: 70px; }
|
|
703
|
+
#toc .h5, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h5 {
|
|
704
|
+
padding-left: 90px; }
|
|
705
|
+
#toc .h6, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h6 {
|
|
706
|
+
padding-left: 110px; }
|
|
701
707
|
#toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
|
|
702
708
|
background: #da1d52;
|
|
703
709
|
box-shadow: inset -5px 0px 10px -5px #da1d52 !important; }
|
data/lib/isodoc/itu/i18n-ar.yaml
CHANGED
|
@@ -59,6 +59,8 @@ br_full: مكتب الاتصالات الراديوية
|
|
|
59
59
|
bdt_full: مكتب تنمية الاتصالات
|
|
60
60
|
prepub: نسخة منشورة مسبقا
|
|
61
61
|
draft_new: مشروع % جديدة
|
|
62
|
+
email: البريد الإلكتروني
|
|
63
|
+
editor_full: محرر
|
|
62
64
|
doctype_dict:
|
|
63
65
|
resolution: قرار
|
|
64
66
|
recommendation: توصية
|
|
@@ -86,3 +88,7 @@ doctype_abbrev:
|
|
|
86
88
|
technical-report: TR
|
|
87
89
|
joint-itu-iso-iec: ITU/ISO/IEC
|
|
88
90
|
service-publication:
|
|
91
|
+
inflection:
|
|
92
|
+
محرر:
|
|
93
|
+
sg: محرر
|
|
94
|
+
pl: المحررين
|
data/lib/isodoc/itu/i18n-de.yaml
CHANGED
|
@@ -59,6 +59,8 @@ br_full: Büro für Funkkommunikation<br/>der ITU
|
|
|
59
59
|
bdt_full: Büro für Entwicklungen<br/>in der Telekommunikation<br/>der ITU
|
|
60
60
|
prepub: Vorveröffentlichte Version
|
|
61
61
|
draft_new: Entwurf neuen %
|
|
62
|
+
email: E-mail
|
|
63
|
+
editor_full: Redakteur
|
|
62
64
|
doctype_dict:
|
|
63
65
|
resolution: Auflösung
|
|
64
66
|
recommendation: Empfehlung
|
|
@@ -86,3 +88,7 @@ doctype_abbrev:
|
|
|
86
88
|
technical-report: TR
|
|
87
89
|
joint-itu-iso-iec: ITU/ISO/IEC
|
|
88
90
|
service-publication:
|
|
91
|
+
inflection:
|
|
92
|
+
Redakteur:
|
|
93
|
+
sg: Redakteur
|
|
94
|
+
pl: Redakteure
|
data/lib/isodoc/itu/i18n-en.yaml
CHANGED
|
@@ -60,6 +60,8 @@ br_full: Radiocommunication Bureau<br/>of ITU
|
|
|
60
60
|
bdt_full: Telecommunication<br/>Development Bureau<br/>of ITU
|
|
61
61
|
prepub: Prepublished version
|
|
62
62
|
draft_new: Draft new %
|
|
63
|
+
email: E-mail
|
|
64
|
+
editor_full: editor
|
|
63
65
|
doctype_dict:
|
|
64
66
|
resolution: Resolution
|
|
65
67
|
recommendation: Recommendation
|
|
@@ -87,3 +89,7 @@ doctype_abbrev:
|
|
|
87
89
|
technical-report: TR
|
|
88
90
|
joint-itu-iso-iec: ITU/ISO/IEC
|
|
89
91
|
service-publication:
|
|
92
|
+
inflection:
|
|
93
|
+
editor:
|
|
94
|
+
sg: editor
|
|
95
|
+
pl: editors
|
data/lib/isodoc/itu/i18n-es.yaml
CHANGED
|
@@ -60,6 +60,8 @@ br_full: Oficina de Radiocomunicaciones<br/>de la UIT
|
|
|
60
60
|
bdt_full: <br/>Oficina de Desarrollo<br/>de las Telecomunicaciones de la UIT
|
|
61
61
|
prepub: Versión prepublicada
|
|
62
62
|
draft_new: Borrador de nueva %
|
|
63
|
+
email: E-mail
|
|
64
|
+
editor_full: editor
|
|
63
65
|
doctype_dict:
|
|
64
66
|
resolution: Resolución
|
|
65
67
|
recommendation: Recomendación
|
|
@@ -87,3 +89,14 @@ doctype_abbrev:
|
|
|
87
89
|
technical-report: TR
|
|
88
90
|
joint-itu-iso-iec: UIT/ISO/IEC
|
|
89
91
|
service-publication:
|
|
92
|
+
inflection:
|
|
93
|
+
editor:
|
|
94
|
+
masc:
|
|
95
|
+
sg: editor
|
|
96
|
+
pl: editores
|
|
97
|
+
fem:
|
|
98
|
+
sg: editora
|
|
99
|
+
pl: editoras
|
|
100
|
+
nb:
|
|
101
|
+
sg: editor@
|
|
102
|
+
pl: editor@s
|
data/lib/isodoc/itu/i18n-fr.yaml
CHANGED
|
@@ -60,6 +60,8 @@ br_full: Bureau des radiocommunications<br/>de l’UIT
|
|
|
60
60
|
bdt_full: Bureau de développement<br/>des télécommunications<br/>de l’UIT
|
|
61
61
|
prepub: Version pré-publiée
|
|
62
62
|
draft_new: Projet de nouvelle %
|
|
63
|
+
editor_full: éditeur
|
|
64
|
+
email: E-mail
|
|
63
65
|
doctype_dict:
|
|
64
66
|
resolution: Résolution
|
|
65
67
|
recommendation: Recommandation
|
|
@@ -87,3 +89,7 @@ doctype_abbrev:
|
|
|
87
89
|
technical-report: TR
|
|
88
90
|
joint-itu-iso-iec: ITU/ISO/IEC
|
|
89
91
|
service-publication:
|
|
92
|
+
inflection:
|
|
93
|
+
éditeur:
|
|
94
|
+
sg: éditeur
|
|
95
|
+
pl: éditeurs
|
data/lib/isodoc/itu/i18n-ru.yaml
CHANGED
|
@@ -60,6 +60,8 @@ br_full: Бюро радиосвязи<br/>МСЭ
|
|
|
60
60
|
bdt_full: Бюро развития электросвязи<br/>МСЭ
|
|
61
61
|
prepub: Предварительно опубликованная версия
|
|
62
62
|
draft_new: Проект новой %
|
|
63
|
+
email: Эл. почта
|
|
64
|
+
editor_full: редактор
|
|
63
65
|
doctype_dict:
|
|
64
66
|
resolution: Резолюция
|
|
65
67
|
recommendation: Рекомендация
|
|
@@ -87,3 +89,7 @@ doctype_abbrev:
|
|
|
87
89
|
technical-report: ТО
|
|
88
90
|
joint-itu-iso-iec: ITU/ISO/IEC
|
|
89
91
|
service-publication:
|
|
92
|
+
inflection:
|
|
93
|
+
редактор:
|
|
94
|
+
sg: редактор
|
|
95
|
+
pl: редакторы
|
data/lib/isodoc/itu/init.rb
CHANGED
|
@@ -12,7 +12,7 @@ module IsoDoc
|
|
|
12
12
|
|
|
13
13
|
def xref_init(lang, script, _klass, i18n, options)
|
|
14
14
|
html = HtmlConvert.new(language: lang, script: script)
|
|
15
|
-
options = options.merge(
|
|
15
|
+
options = options.merge(hierarchicalassets: @hierarchical_assets)
|
|
16
16
|
@xrefs = Xref.new(lang, script, html, i18n, options)
|
|
17
17
|
end
|
|
18
18
|
|
|
@@ -2049,6 +2049,8 @@
|
|
|
2049
2049
|
</xsl:if>
|
|
2050
2050
|
</xsl:template>
|
|
2051
2051
|
|
|
2052
|
+
<xsl:strip-space elements="itu:xref"/>
|
|
2053
|
+
|
|
2052
2054
|
<!-- external parameters -->
|
|
2053
2055
|
|
|
2054
2056
|
<xsl:param name="svg_images"/> <!-- svg images array -->
|
|
@@ -3426,17 +3428,22 @@
|
|
|
3426
3428
|
</xsl:for-each>
|
|
3427
3429
|
</xsl:template>
|
|
3428
3430
|
|
|
3431
|
+
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
|
3429
3432
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
|
3430
3433
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
|
3431
3434
|
<xsl:template match="text()" name="text">
|
|
3432
3435
|
|
|
3433
|
-
<xsl:
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3436
|
+
<xsl:choose>
|
|
3437
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
|
|
3438
|
+
<xsl:otherwise>
|
|
3439
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
|
|
3440
|
+
<xsl:call-template name="replace_fo_inline_tags">
|
|
3441
|
+
<xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
|
|
3442
|
+
<xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
|
|
3443
|
+
<xsl:with-param name="text" select="$text"/>
|
|
3444
|
+
</xsl:call-template>
|
|
3445
|
+
</xsl:otherwise>
|
|
3446
|
+
</xsl:choose>
|
|
3440
3447
|
|
|
3441
3448
|
</xsl:template>
|
|
3442
3449
|
|
|
@@ -3822,7 +3829,7 @@
|
|
|
3822
3829
|
|
|
3823
3830
|
<!-- centered table when table name is centered (see table-name-style) -->
|
|
3824
3831
|
|
|
3825
|
-
<fo:table table-layout="fixed" width="100%">
|
|
3832
|
+
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
|
3826
3833
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
3827
3834
|
<fo:table-column column-width="{@width}"/>
|
|
3828
3835
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
|
@@ -4498,7 +4505,7 @@
|
|
|
4498
4505
|
<xsl:template match="*[local-name()='tr']">
|
|
4499
4506
|
<fo:table-row xsl:use-attribute-sets="table-body-row-style">
|
|
4500
4507
|
|
|
4501
|
-
<xsl:if test="*[local-name() = 'th']">
|
|
4508
|
+
<xsl:if test="count(*) = count(*[local-name() = 'th'])"> <!-- row contains 'th' only -->
|
|
4502
4509
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
4503
4510
|
</xsl:if>
|
|
4504
4511
|
|
|
@@ -5506,7 +5513,8 @@
|
|
|
5506
5513
|
<xsl:copy-of select="node()"/>
|
|
5507
5514
|
</td>
|
|
5508
5515
|
<td>
|
|
5509
|
-
<xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
|
|
5516
|
+
<!-- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/> -->
|
|
5517
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]" mode="dl_if"/>
|
|
5510
5518
|
<!-- get paragraphs from nested 'dl' -->
|
|
5511
5519
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
|
|
5512
5520
|
</td>
|
|
@@ -5514,6 +5522,53 @@
|
|
|
5514
5522
|
</xsl:template>
|
|
5515
5523
|
<xsl:template match="*[local-name()='dd']" mode="dl_if"/>
|
|
5516
5524
|
|
|
5525
|
+
<xsl:template match="*" mode="dl_if">
|
|
5526
|
+
<xsl:copy-of select="."/>
|
|
5527
|
+
</xsl:template>
|
|
5528
|
+
|
|
5529
|
+
<xsl:template match="*[local-name() = 'p']" mode="dl_if">
|
|
5530
|
+
<xsl:param name="indent"/>
|
|
5531
|
+
<p>
|
|
5532
|
+
<xsl:copy-of select="@*"/>
|
|
5533
|
+
<xsl:value-of select="$indent"/>
|
|
5534
|
+
<xsl:copy-of select="node()"/>
|
|
5535
|
+
</p>
|
|
5536
|
+
|
|
5537
|
+
</xsl:template>
|
|
5538
|
+
|
|
5539
|
+
<xsl:template match="*[local-name() = 'ul' or local-name() = 'ol']" mode="dl_if">
|
|
5540
|
+
<xsl:variable name="list_rendered_">
|
|
5541
|
+
<xsl:apply-templates select="."/>
|
|
5542
|
+
</xsl:variable>
|
|
5543
|
+
<xsl:variable name="list_rendered" select="xalan:nodeset($list_rendered_)"/>
|
|
5544
|
+
|
|
5545
|
+
<xsl:variable name="indent">
|
|
5546
|
+
<xsl:for-each select="($list_rendered//fo:block[not(.//fo:block)])[1]">
|
|
5547
|
+
<xsl:apply-templates select="ancestor::*[@provisional-distance-between-starts]/@provisional-distance-between-starts" mode="dl_if"/>
|
|
5548
|
+
</xsl:for-each>
|
|
5549
|
+
</xsl:variable>
|
|
5550
|
+
|
|
5551
|
+
<xsl:apply-templates mode="dl_if">
|
|
5552
|
+
<xsl:with-param name="indent" select="$indent"/>
|
|
5553
|
+
</xsl:apply-templates>
|
|
5554
|
+
</xsl:template>
|
|
5555
|
+
|
|
5556
|
+
<xsl:template match="*[local-name() = 'li']" mode="dl_if">
|
|
5557
|
+
<xsl:param name="indent"/>
|
|
5558
|
+
<xsl:apply-templates mode="dl_if">
|
|
5559
|
+
<xsl:with-param name="indent" select="$indent"/>
|
|
5560
|
+
</xsl:apply-templates>
|
|
5561
|
+
</xsl:template>
|
|
5562
|
+
|
|
5563
|
+
<xsl:template match="@provisional-distance-between-starts" mode="dl_if">
|
|
5564
|
+
<xsl:variable name="value" select="round(substring-before(.,'mm'))"/>
|
|
5565
|
+
<!-- emulate left indent for list item -->
|
|
5566
|
+
<xsl:call-template name="repeat">
|
|
5567
|
+
<xsl:with-param name="char" select="'x'"/>
|
|
5568
|
+
<xsl:with-param name="count" select="$value"/>
|
|
5569
|
+
</xsl:call-template>
|
|
5570
|
+
</xsl:template>
|
|
5571
|
+
|
|
5517
5572
|
<xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
|
|
5518
5573
|
<xsl:for-each select="*[local-name() = 'dt']">
|
|
5519
5574
|
<p>
|
|
@@ -5907,6 +5962,7 @@
|
|
|
5907
5962
|
</word>
|
|
5908
5963
|
<xsl:call-template name="tokenize_with_tags">
|
|
5909
5964
|
<xsl:with-param name="text" select="substring-after($text, $separator)"/>
|
|
5965
|
+
<xsl:with-param name="tags" select="$tags"/>
|
|
5910
5966
|
</xsl:call-template>
|
|
5911
5967
|
</xsl:otherwise>
|
|
5912
5968
|
</xsl:choose>
|
|
@@ -5946,8 +6002,18 @@
|
|
|
5946
6002
|
|
|
5947
6003
|
<xsl:template name="add-zero-spaces-java">
|
|
5948
6004
|
<xsl:param name="text" select="."/>
|
|
5949
|
-
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space
|
|
5950
|
-
<xsl:
|
|
6005
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space, arrow right -->
|
|
6006
|
+
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|:|=|_|—| |→)','$1')"/>
|
|
6007
|
+
<!-- add zero-width space (#x200B) after characters: 'great than' -->
|
|
6008
|
+
<xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1), '(\u003e)(?!\u003e)', '$1')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
|
|
6009
|
+
<!-- add zero-width space (#x200B) before characters: 'less than' -->
|
|
6010
|
+
<xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(?<!\u003c)(\u003c)', '$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
|
|
6011
|
+
<!-- add zero-width space (#x200B) before character: { -->
|
|
6012
|
+
<xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?<!\W)(\{)', '$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
|
|
6013
|
+
<!-- add zero-width space (#x200B) after character: , -->
|
|
6014
|
+
<xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(\,)(?!\d)', '$1')"/> <!-- negative lookahead: ',' not followed by digit -->
|
|
6015
|
+
|
|
6016
|
+
<xsl:value-of select="$text5"/>
|
|
5951
6017
|
</xsl:template>
|
|
5952
6018
|
|
|
5953
6019
|
<xsl:template name="add-zero-spaces-link-java">
|
|
@@ -6093,7 +6159,7 @@
|
|
|
6093
6159
|
</xsl:copy>
|
|
6094
6160
|
</xsl:template>
|
|
6095
6161
|
|
|
6096
|
-
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p'])]" mode="table-without-br">
|
|
6162
|
+
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
|
|
6097
6163
|
<xsl:copy>
|
|
6098
6164
|
<xsl:copy-of select="@*"/>
|
|
6099
6165
|
<p>
|
|
@@ -6141,6 +6207,28 @@
|
|
|
6141
6207
|
</xsl:for-each>
|
|
6142
6208
|
</xsl:template>
|
|
6143
6209
|
|
|
6210
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']" mode="table-without-br">
|
|
6211
|
+
<xsl:apply-templates mode="table-without-br"/>
|
|
6212
|
+
</xsl:template>
|
|
6213
|
+
|
|
6214
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']/*[local-name() = 'sourcecode']/text()[contains(., ' ') or contains(., ' ')]" mode="table-without-br">
|
|
6215
|
+
|
|
6216
|
+
<xsl:variable name="sep">###SOURCECODE_NEWLINE###</xsl:variable>
|
|
6217
|
+
<xsl:variable name="sourcecode_text" select="java:replaceAll(java:java.lang.String.new(.),'( | | )', $sep)"/>
|
|
6218
|
+
<xsl:variable name="items">
|
|
6219
|
+
<xsl:call-template name="split">
|
|
6220
|
+
<xsl:with-param name="pText" select="$sourcecode_text"/>
|
|
6221
|
+
<xsl:with-param name="sep" select="$sep"/>
|
|
6222
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
|
6223
|
+
</xsl:call-template>
|
|
6224
|
+
</xsl:variable>
|
|
6225
|
+
<xsl:for-each select="xalan:nodeset($items)/*">
|
|
6226
|
+
<p>
|
|
6227
|
+
<sourcecode><xsl:copy-of select="node()"/></sourcecode>
|
|
6228
|
+
</p>
|
|
6229
|
+
</xsl:for-each>
|
|
6230
|
+
</xsl:template>
|
|
6231
|
+
|
|
6144
6232
|
<!-- remove redundant white spaces -->
|
|
6145
6233
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'sourcecode'])]" mode="table-without-br">
|
|
6146
6234
|
<xsl:variable name="text" select="translate(.,'	 ','')"/>
|
|
@@ -6451,6 +6539,7 @@
|
|
|
6451
6539
|
<xsl:if test="ancestor::*[local-name() = 'sub']"><tag>sub</tag></xsl:if>
|
|
6452
6540
|
<xsl:if test="ancestor::*[local-name() = 'sup']"><tag>sup</tag></xsl:if>
|
|
6453
6541
|
<xsl:if test="ancestor::*[local-name() = 'tt']"><tag>tt</tag></xsl:if>
|
|
6542
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']"><tag>sourcecode</tag></xsl:if>
|
|
6454
6543
|
<xsl:if test="ancestor::*[local-name() = 'keep-together_within-line']"><tag>keep-together_within-line</tag></xsl:if>
|
|
6455
6544
|
</tags>
|
|
6456
6545
|
</xsl:template>
|
|
@@ -6934,6 +7023,12 @@
|
|
|
6934
7023
|
|
|
6935
7024
|
<fo:block-container margin-left="0mm">
|
|
6936
7025
|
|
|
7026
|
+
<!-- <xsl:if test="$namespace = 'iho'">
|
|
7027
|
+
<xsl:if test="ancestor::iho:td">
|
|
7028
|
+
<xsl:attribute name="font-size">12pt</xsl:attribute>
|
|
7029
|
+
</xsl:if>
|
|
7030
|
+
</xsl:if> -->
|
|
7031
|
+
|
|
6937
7032
|
<fo:block>
|
|
6938
7033
|
|
|
6939
7034
|
<xsl:if test="ancestor::itu:figure">
|
|
@@ -8081,38 +8176,16 @@
|
|
|
8081
8176
|
<!-- =============== -->
|
|
8082
8177
|
<xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
|
8083
8178
|
|
|
8084
|
-
<
|
|
8179
|
+
<xsl:variable name="sourcecode_attributes">
|
|
8180
|
+
<xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
|
|
8181
|
+
<xsl:variable name="_font-size">
|
|
8085
8182
|
|
|
8086
|
-
|
|
8087
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
8088
|
-
</xsl:if>
|
|
8089
|
-
|
|
8090
|
-
<xsl:if test="ancestor::*[local-name() = 'example']">
|
|
8091
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
8092
|
-
</xsl:if>
|
|
8183
|
+
<!-- 9 -->
|
|
8093
8184
|
|
|
8094
|
-
|
|
8095
|
-
|
|
8096
|
-
|
|
8097
|
-
|
|
8098
|
-
<xsl:choose>
|
|
8099
|
-
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
8100
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
8101
|
-
</xsl:choose>
|
|
8102
|
-
</xsl:attribute>
|
|
8103
|
-
|
|
8104
|
-
</xsl:if>
|
|
8105
|
-
<fo:block-container margin-left="0mm">
|
|
8106
|
-
|
|
8107
|
-
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
8108
|
-
<xsl:variable name="_font-size">
|
|
8109
|
-
|
|
8110
|
-
<!-- 9 -->
|
|
8111
|
-
|
|
8112
|
-
<!-- <xsl:if test="$namespace = 'ieee'">
|
|
8113
|
-
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
|
8114
|
-
</xsl:if> -->
|
|
8115
|
-
10
|
|
8185
|
+
<!-- <xsl:if test="$namespace = 'ieee'">
|
|
8186
|
+
<xsl:if test="$current_template = 'standard'">8</xsl:if>
|
|
8187
|
+
</xsl:if> -->
|
|
8188
|
+
10
|
|
8116
8189
|
|
|
8117
8190
|
|
|
8118
8191
|
</xsl:variable>
|
|
@@ -8128,14 +8201,60 @@
|
|
|
8128
8201
|
</xsl:choose>
|
|
8129
8202
|
</xsl:attribute>
|
|
8130
8203
|
</xsl:if>
|
|
8204
|
+
</xsl:element>
|
|
8205
|
+
</xsl:variable>
|
|
8131
8206
|
|
|
8207
|
+
<xsl:choose>
|
|
8208
|
+
<xsl:when test="$isGenerateTableIF = 'true' and (ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])">
|
|
8209
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
|
8210
|
+
<xsl:attribute name="{local-name()}">
|
|
8211
|
+
<xsl:value-of select="."/>
|
|
8212
|
+
</xsl:attribute>
|
|
8213
|
+
</xsl:for-each>
|
|
8132
8214
|
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
|
8133
|
-
</
|
|
8215
|
+
</xsl:when>
|
|
8134
8216
|
|
|
8135
|
-
|
|
8217
|
+
<xsl:otherwise>
|
|
8218
|
+
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
|
|
8136
8219
|
|
|
8137
|
-
|
|
8138
|
-
|
|
8220
|
+
<xsl:if test="not(ancestor::*[local-name() = 'li']) or ancestor::*[local-name() = 'example']">
|
|
8221
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
|
8222
|
+
</xsl:if>
|
|
8223
|
+
|
|
8224
|
+
<xsl:if test="ancestor::*[local-name() = 'example']">
|
|
8225
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
|
8226
|
+
</xsl:if>
|
|
8227
|
+
|
|
8228
|
+
<xsl:copy-of select="@id"/>
|
|
8229
|
+
|
|
8230
|
+
<xsl:if test="parent::*[local-name() = 'note']">
|
|
8231
|
+
<xsl:attribute name="margin-left">
|
|
8232
|
+
<xsl:choose>
|
|
8233
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'])"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
|
8234
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
|
8235
|
+
</xsl:choose>
|
|
8236
|
+
</xsl:attribute>
|
|
8237
|
+
|
|
8238
|
+
</xsl:if>
|
|
8239
|
+
<fo:block-container margin-left="0mm">
|
|
8240
|
+
|
|
8241
|
+
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
|
8242
|
+
|
|
8243
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@*">
|
|
8244
|
+
<xsl:attribute name="{local-name()}">
|
|
8245
|
+
<xsl:value-of select="."/>
|
|
8246
|
+
</xsl:attribute>
|
|
8247
|
+
</xsl:for-each>
|
|
8248
|
+
|
|
8249
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
|
8250
|
+
</fo:block>
|
|
8251
|
+
|
|
8252
|
+
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
|
|
8253
|
+
|
|
8254
|
+
</fo:block-container>
|
|
8255
|
+
</fo:block-container>
|
|
8256
|
+
</xsl:otherwise>
|
|
8257
|
+
</xsl:choose>
|
|
8139
8258
|
</xsl:template>
|
|
8140
8259
|
|
|
8141
8260
|
<xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
|
@@ -10396,7 +10515,9 @@
|
|
|
10396
10515
|
<!-- ===================================== -->
|
|
10397
10516
|
<!-- Update xml -->
|
|
10398
10517
|
<!-- ===================================== -->
|
|
10518
|
+
<!-- =========================================================================== -->
|
|
10399
10519
|
<!-- STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
|
10520
|
+
<!-- =========================================================================== -->
|
|
10400
10521
|
<xsl:template match="@*|node()" mode="update_xml_step1">
|
|
10401
10522
|
<xsl:copy>
|
|
10402
10523
|
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
|
|
@@ -10488,10 +10609,15 @@
|
|
|
10488
10609
|
<xsl:template match="*[local-name() = 'span']" mode="update_xml_step1">
|
|
10489
10610
|
<xsl:apply-templates mode="update_xml_step1"/>
|
|
10490
10611
|
</xsl:template>
|
|
10491
|
-
|
|
10612
|
+
<!-- =========================================================================== -->
|
|
10492
10613
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
|
10614
|
+
<!-- =========================================================================== -->
|
|
10493
10615
|
|
|
10616
|
+
<!-- =========================================================================== -->
|
|
10494
10617
|
<!-- XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
|
10618
|
+
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
|
10619
|
+
<!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
|
|
10620
|
+
<!-- =========================================================================== -->
|
|
10495
10621
|
<!-- Example: <keep-together_within-line>ISO 10303-51</keep-together_within-line> -->
|
|
10496
10622
|
<xsl:template match="@*|node()" mode="update_xml_enclose_keep-together_within-line">
|
|
10497
10623
|
<xsl:copy>
|
|
@@ -10507,10 +10633,15 @@
|
|
|
10507
10633
|
<xsl:template match="text()[not(ancestor::*[local-name() = 'bibdata'] or ancestor::*[local-name() = 'link'][not(contains(.,' '))] or ancestor::*[local-name() = 'sourcecode'] or ancestor::*[local-name() = 'math'] or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
10508
10634
|
|
|
10509
10635
|
<!-- enclose standard's number into tag 'keep-together_within-line' -->
|
|
10510
|
-
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
|
10511
10636
|
<xsl:variable name="tag_keep-together_within-line_open">###<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
|
10512
10637
|
<xsl:variable name="tag_keep-together_within-line_close">###/<xsl:value-of select="$element_name_keep-together_within-line"/>###</xsl:variable>
|
|
10513
|
-
<xsl:variable name="
|
|
10638
|
+
<xsl:variable name="text__" select="java:replaceAll(java:java.lang.String.new(.), $regex_standard_reference, concat($tag_keep-together_within-line_open,'$1',$tag_keep-together_within-line_close))"/>
|
|
10639
|
+
<xsl:variable name="text_">
|
|
10640
|
+
<xsl:choose>
|
|
10641
|
+
<xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when> <!-- no need enclose standard's number into tag 'keep-together_within-line' in table cells -->
|
|
10642
|
+
<xsl:otherwise><xsl:value-of select="$text__"/></xsl:otherwise>
|
|
10643
|
+
</xsl:choose>
|
|
10644
|
+
</xsl:variable>
|
|
10514
10645
|
<xsl:variable name="text"><text><xsl:call-template name="replace_text_tags">
|
|
10515
10646
|
<xsl:with-param name="tag_open" select="$tag_keep-together_within-line_open"/>
|
|
10516
10647
|
<xsl:with-param name="tag_close" select="$tag_keep-together_within-line_close"/>
|
|
@@ -10526,7 +10657,11 @@
|
|
|
10526
10657
|
</xsl:variable>
|
|
10527
10658
|
|
|
10528
10659
|
<!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
|
|
10529
|
-
|
|
10660
|
+
<!-- \S matches any non-whitespace character (equivalent to [^\r\n\t\f\v ]) -->
|
|
10661
|
+
<!-- <xsl:variable name="regex_solidus_units">((\b((\S{1,3}\/\S+)|(\S+\/\S{1,3}))\b)|(\/\S{1,3})\b)</xsl:variable> -->
|
|
10662
|
+
<!-- add < and > to \S -->
|
|
10663
|
+
<xsl:variable name="regex_S">[^\r\n\t\f\v \<>]</xsl:variable>
|
|
10664
|
+
<xsl:variable name="regex_solidus_units">((\b((<xsl:value-of select="$regex_S"/>{1,3}\/<xsl:value-of select="$regex_S"/>+)|(<xsl:value-of select="$regex_S"/>+\/<xsl:value-of select="$regex_S"/>{1,3}))\b)|(\/<xsl:value-of select="$regex_S"/>{1,3})\b)</xsl:variable>
|
|
10530
10665
|
<xsl:variable name="text3">
|
|
10531
10666
|
<text><xsl:for-each select="xalan:nodeset($text2)/text/node()">
|
|
10532
10667
|
<xsl:choose>
|
|
@@ -10590,9 +10725,8 @@
|
|
|
10590
10725
|
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
|
10591
10726
|
</xsl:choose>
|
|
10592
10727
|
</xsl:template>
|
|
10593
|
-
|
|
10594
10728
|
<!-- ===================================== -->
|
|
10595
|
-
<!--
|
|
10729
|
+
<!-- END XML UPDATE STEP: enclose standard's name into tag 'keep-together_within-line' -->
|
|
10596
10730
|
<!-- ===================================== -->
|
|
10597
10731
|
|
|
10598
10732
|
<!-- for correct rendering combining chars -->
|