metanorma-bipm 1.0.7 → 1.1.4
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/.github/workflows/rake.yml +12 -11
- data/.gitignore +4 -1
- data/.hound.yml +5 -0
- data/.rubocop.yml +4 -8
- data/Gemfile +2 -2
- data/Rakefile +2 -2
- data/lib/asciidoctor/bipm/biblio.rng +1 -0
- data/lib/asciidoctor/bipm/bipm.rng +3 -0
- data/lib/asciidoctor/bipm/converter.rb +72 -33
- data/lib/asciidoctor/bipm/isodoc.rng +321 -4
- data/lib/isodoc/bipm/base_convert.rb +25 -11
- data/lib/isodoc/bipm/bipm.brochure.xsl +674 -85
- data/lib/isodoc/bipm/bipm.guide.xsl +674 -85
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +674 -85
- data/lib/isodoc/bipm/bipm.rapport.xsl +674 -85
- data/lib/isodoc/bipm/html/html_bipm_titlepage.html +2 -0
- data/lib/isodoc/bipm/html/htmlstyle.css +7 -0
- data/lib/isodoc/bipm/i18n-en.yaml +11 -0
- data/lib/isodoc/bipm/i18n-fr.yaml +8 -0
- data/lib/isodoc/bipm/index.rb +30 -19
- data/lib/isodoc/bipm/init.rb +1 -2
- data/lib/isodoc/bipm/jcgm.standard.xsl +713 -129
- data/lib/isodoc/bipm/metadata.rb +15 -7
- data/lib/isodoc/bipm/pdf_convert.rb +12 -9
- data/lib/isodoc/bipm/presentation_xml_convert.rb +149 -48
- data/lib/isodoc/bipm/xref.rb +122 -51
- data/lib/metanorma-bipm.rb +4 -4
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +5 -4
- metadata +29 -14
@@ -39,33 +39,47 @@ module IsoDoc
|
|
39
39
|
ret
|
40
40
|
end
|
41
41
|
|
42
|
-
def nonstd_bibitem(list,
|
43
|
-
list.p **attr_code(iso_bibitem_entry_attrs(
|
44
|
-
ids = bibitem_ref_code(
|
42
|
+
def nonstd_bibitem(list, bibitem, ordinal, biblio)
|
43
|
+
list.p **attr_code(iso_bibitem_entry_attrs(bibitem, biblio)) do |ref|
|
44
|
+
ids = bibitem_ref_code(bibitem)
|
45
45
|
identifiers = render_identifier(ids)
|
46
46
|
if biblio then ref_entry_code(ref, ordinal, identifiers, ids)
|
47
47
|
else
|
48
|
-
ref <<
|
48
|
+
ref << identifiers[0] || identifiers[1]
|
49
49
|
ref << " #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
50
50
|
end
|
51
51
|
ref << " " unless biblio && !identifiers[1]
|
52
|
-
reference_format(
|
52
|
+
reference_format(bibitem, ref)
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def std_bibitem_entry(list,
|
57
|
-
list.p **attr_code(iso_bibitem_entry_attrs(
|
58
|
-
identifiers = render_identifier(bibitem_ref_code(
|
56
|
+
def std_bibitem_entry(list, bibitem, ordinal, biblio)
|
57
|
+
list.p **attr_code(iso_bibitem_entry_attrs(bibitem, biblio)) do |ref|
|
58
|
+
identifiers = render_identifier(bibitem_ref_code(bibitem))
|
59
59
|
if biblio then ref_entry_code(ref, ordinal, identifiers, nil)
|
60
60
|
else
|
61
|
-
ref <<
|
61
|
+
ref << identifiers[0] || identifiers[1]
|
62
62
|
ref << " #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
63
63
|
end
|
64
|
-
date_note_process(
|
64
|
+
date_note_process(bibitem, ref)
|
65
65
|
ref << " " unless biblio && !identifiers[1]
|
66
|
-
reference_format(
|
66
|
+
reference_format(bibitem, ref)
|
67
67
|
end
|
68
68
|
end
|
69
|
+
|
70
|
+
def term_cleanup(docxml)
|
71
|
+
@jcgm ? docxml : super
|
72
|
+
end
|
73
|
+
|
74
|
+
def termref_cleanup(docxml)
|
75
|
+
docxml
|
76
|
+
.gsub(/\s*\[MODIFICATION\]\s*\[\/TERMREF\]/,
|
77
|
+
l10n(", #{@i18n.modified} [/TERMREF]"))
|
78
|
+
.gsub(%r{\s*\[/TERMREF\]\s*</p>\s*<p>\s*\[TERMREF\]}, "; ")
|
79
|
+
.gsub(/\[TERMREF\]\s*/, l10n("[#{@i18n.source} "))
|
80
|
+
.gsub(%r{\s*\[/TERMREF\]\s*}, l10n("]"))
|
81
|
+
.gsub(/\s*\[MODIFICATION\]/, l10n(", #{@i18n.modified} — "))
|
82
|
+
end
|
69
83
|
end
|
70
84
|
end
|
71
85
|
end
|
@@ -4,6 +4,7 @@
|
|
4
4
|
|
5
5
|
<xsl:param name="svg_images"/>
|
6
6
|
<xsl:variable name="images" select="document($svg_images)"/>
|
7
|
+
<xsl:param name="basepath"/>
|
7
8
|
|
8
9
|
<xsl:param name="initial_page_number"/>
|
9
10
|
<xsl:param name="doc_split_by_language"/>
|
@@ -1111,8 +1112,11 @@
|
|
1111
1112
|
|
1112
1113
|
<xsl:variable name="title-toc">
|
1113
1114
|
<fo:inline>
|
1114
|
-
<xsl:call-template name="getTitle">
|
1115
|
+
<!-- <xsl:call-template name="getTitle">
|
1115
1116
|
<xsl:with-param name="name" select="'title-toc'"/>
|
1117
|
+
</xsl:call-template> -->
|
1118
|
+
<xsl:call-template name="getLocalizedString">
|
1119
|
+
<xsl:with-param name="key">table_of_contents</xsl:with-param>
|
1116
1120
|
</xsl:call-template>
|
1117
1121
|
</fo:inline>
|
1118
1122
|
</xsl:variable>
|
@@ -2405,8 +2409,17 @@
|
|
2405
2409
|
|
2406
2410
|
</xsl:template>
|
2407
2411
|
|
2412
|
+
<!-- <xsl:variable name="zero-width-space" select="'​'"/> -->
|
2408
2413
|
<xsl:template match="*" mode="header">
|
2409
2414
|
<xsl:apply-templates mode="header"/>
|
2415
|
+
<!-- <xsl:choose>
|
2416
|
+
<xsl:when test="contains(preceding-sibling::node()[1], $zero-width-space)"> -->
|
2417
|
+
<!-- stop further processing -->
|
2418
|
+
<!-- </xsl:when>
|
2419
|
+
<xsl:otherwise>
|
2420
|
+
<xsl:apply-templates mode="header"/>
|
2421
|
+
</xsl:otherwise>
|
2422
|
+
</xsl:choose> -->
|
2410
2423
|
</xsl:template>
|
2411
2424
|
|
2412
2425
|
<xsl:template match="*[local-name() = 'stem']" mode="header">
|
@@ -2417,6 +2430,11 @@
|
|
2417
2430
|
<xsl:text> </xsl:text>
|
2418
2431
|
</xsl:template>
|
2419
2432
|
|
2433
|
+
<!-- zero-width space - separator for full/short titles. Short titles using in headers -->
|
2434
|
+
<!-- <xsl:template match="text()[contains(., $zero-width-space)]" mode="header">
|
2435
|
+
<xsl:value-of select="substring-before(., $zero-width-space)"/>
|
2436
|
+
</xsl:template> -->
|
2437
|
+
|
2420
2438
|
<!-- ====== -->
|
2421
2439
|
<!-- ====== -->
|
2422
2440
|
|
@@ -2899,11 +2917,13 @@
|
|
2899
2917
|
<xsl:choose>
|
2900
2918
|
<xsl:when test="$num = 1">
|
2901
2919
|
<fo:inline xsl:use-attribute-sets="note-p-style">
|
2920
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
2902
2921
|
<xsl:apply-templates/>
|
2903
2922
|
</fo:inline>
|
2904
2923
|
</xsl:when>
|
2905
2924
|
<xsl:otherwise>
|
2906
2925
|
<fo:block xsl:use-attribute-sets="note-p-style">
|
2926
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
2907
2927
|
<xsl:apply-templates/>
|
2908
2928
|
</fo:block>
|
2909
2929
|
</xsl:otherwise>
|
@@ -2967,6 +2987,7 @@
|
|
2967
2987
|
<xsl:attribute name="text-align">
|
2968
2988
|
<xsl:choose>
|
2969
2989
|
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
2990
|
+
<xsl:when test="ancestor::*[local-name() = 'note_side']">left</xsl:when>
|
2970
2991
|
<xsl:when test="../@align"><xsl:value-of select="../@align"/></xsl:when>
|
2971
2992
|
<xsl:otherwise>justify</xsl:otherwise>
|
2972
2993
|
</xsl:choose>
|
@@ -3476,6 +3497,12 @@
|
|
3476
3497
|
<xsl:attribute name="separators"/>
|
3477
3498
|
</xsl:if>
|
3478
3499
|
<mathml:mspace width="-0.15em"/> <!-- decrease space between opening brackets and inside text-->
|
3500
|
+
|
3501
|
+
<!-- if there is previous or next mfenced with superscript, then increase height of Parentheses -->
|
3502
|
+
<xsl:if test="following-sibling::mathml:mfenced[.//mathml:msup] or preceding-sibling::mathml:mfenced[.//mathml:msup] or ancestor::*[following-sibling::mathml:mfenced[.//mathml:msup] or preceding-sibling::mathml:mfenced[.//mathml:msup]]">
|
3503
|
+
<mathml:mspace height="1.15em"/> <!-- increase height of parentheses -->
|
3504
|
+
</xsl:if>
|
3505
|
+
|
3479
3506
|
<xsl:apply-templates mode="mathml"/>
|
3480
3507
|
<mathml:mspace width="-0.1em"/> <!-- decrease space between inside text and closing brackets -->
|
3481
3508
|
</xsl:copy>
|
@@ -3500,12 +3527,41 @@
|
|
3500
3527
|
</xsl:template> -->
|
3501
3528
|
|
3502
3529
|
<!-- Decrease height of / and | -->
|
3530
|
+
<!-- Decrease space before and after / -->
|
3503
3531
|
<xsl:template match="mathml:mo[normalize-space(text()) = '/' or normalize-space(text()) = '|']" mode="mathml">
|
3504
3532
|
<xsl:copy>
|
3505
3533
|
<xsl:apply-templates select="@*" mode="mathml"/>
|
3506
|
-
|
3507
|
-
|
3534
|
+
<xsl:if test="not(@stretchy) and not(preceding-sibling::*[1][local-name() = 'mfrac'] and following-sibling::*[1][local-name() = 'mfrac'])">
|
3535
|
+
<xsl:attribute name="stretchy">false</xsl:attribute>
|
3536
|
+
</xsl:if>
|
3537
|
+
<xsl:if test="normalize-space(text()) = '/'">
|
3538
|
+
<xsl:if test="not(@lspace)">
|
3539
|
+
<xsl:attribute name="lspace">0em</xsl:attribute>
|
3540
|
+
<xsl:if test="preceding-sibling::*[1][local-name() = 'msub']">
|
3541
|
+
<xsl:attribute name="lspace">0.1em</xsl:attribute>
|
3542
|
+
</xsl:if>
|
3508
3543
|
</xsl:if>
|
3544
|
+
<xsl:if test="not(@rspace)">
|
3545
|
+
<xsl:attribute name="rspace">0em</xsl:attribute>
|
3546
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'mfenced']">
|
3547
|
+
<xsl:attribute name="rspace">-0.1em</xsl:attribute>
|
3548
|
+
</xsl:if>
|
3549
|
+
</xsl:if>
|
3550
|
+
</xsl:if>
|
3551
|
+
<xsl:apply-templates mode="mathml"/>
|
3552
|
+
</xsl:copy>
|
3553
|
+
</xsl:template>
|
3554
|
+
|
3555
|
+
<!-- Increase space before and after multiplication sign -->
|
3556
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '×']" mode="mathml"> <!-- multiplication sign -->
|
3557
|
+
<xsl:copy>
|
3558
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
3559
|
+
<xsl:if test="not(@lspace)">
|
3560
|
+
<xsl:attribute name="lspace">0.5em</xsl:attribute>
|
3561
|
+
</xsl:if>
|
3562
|
+
<xsl:if test="not(@rspace)">
|
3563
|
+
<xsl:attribute name="rspace">0.5em</xsl:attribute>
|
3564
|
+
</xsl:if>
|
3509
3565
|
<xsl:apply-templates mode="mathml"/>
|
3510
3566
|
</xsl:copy>
|
3511
3567
|
</xsl:template>
|
@@ -3524,6 +3580,29 @@
|
|
3524
3580
|
</xsl:copy>
|
3525
3581
|
</xsl:template>
|
3526
3582
|
|
3583
|
+
<!-- decrease space before and after sign 'minus' -->
|
3584
|
+
<xsl:template match="mathml:mo[normalize-space(text()) = '−']" mode="mathml"> <!-- minus sign -->
|
3585
|
+
<xsl:copy>
|
3586
|
+
<xsl:apply-templates select="@*" mode="mathml"/>
|
3587
|
+
<xsl:choose>
|
3588
|
+
<xsl:when test="not(preceding-sibling::*)"><!-- example: -0.234 -->
|
3589
|
+
<xsl:if test="not(@rspace)">
|
3590
|
+
<xsl:attribute name="rspace">0em</xsl:attribute>
|
3591
|
+
</xsl:if>
|
3592
|
+
</xsl:when>
|
3593
|
+
<xsl:otherwise>
|
3594
|
+
<xsl:if test="not(@lspace)">
|
3595
|
+
<xsl:attribute name="lspace">0.2em</xsl:attribute>
|
3596
|
+
</xsl:if>
|
3597
|
+
<xsl:if test="not(@rspace)">
|
3598
|
+
<xsl:attribute name="rspace">0.2em</xsl:attribute>
|
3599
|
+
</xsl:if>
|
3600
|
+
</xsl:otherwise>
|
3601
|
+
</xsl:choose>
|
3602
|
+
<xsl:apply-templates mode="mathml"/>
|
3603
|
+
</xsl:copy>
|
3604
|
+
</xsl:template>
|
3605
|
+
|
3527
3606
|
<xsl:template match="mathml:mi[string-length(normalize-space()) > 1]" mode="mathml" priority="2">
|
3528
3607
|
<xsl:if test="preceding-sibling::* and preceding-sibling::*[1][not(local-name() = 'mfenced' or local-name() = 'mo')]">
|
3529
3608
|
<mathml:mspace width="0.3em"/>
|
@@ -3534,6 +3613,10 @@
|
|
3534
3613
|
</xsl:if>
|
3535
3614
|
</xsl:template>
|
3536
3615
|
|
3616
|
+
<xsl:template match="mathml:mn/text()" mode="mathml">
|
3617
|
+
<xsl:value-of select="translate(., ' ', ' ')"/>
|
3618
|
+
</xsl:template>
|
3619
|
+
|
3537
3620
|
<xsl:template name="insertHeaderFooter">
|
3538
3621
|
<xsl:param name="header-title"/>
|
3539
3622
|
<xsl:param name="orientation"/>
|
@@ -4313,6 +4396,9 @@
|
|
4313
4396
|
<title-continued lang="en">(continued)</title-continued>
|
4314
4397
|
<title-continued lang="fr">(continué)</title-continued>
|
4315
4398
|
|
4399
|
+
</xsl:variable><xsl:variable name="bibdata">
|
4400
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
4401
|
+
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
4316
4402
|
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
|
4317
4403
|
<xsl:param name="name"/>
|
4318
4404
|
<xsl:param name="lang"/>
|
@@ -4341,13 +4427,16 @@
|
|
4341
4427
|
<xsl:attribute name="font-family">Times New Roman, STIX Two Math, Source Han Sans</xsl:attribute>
|
4342
4428
|
<xsl:attribute name="font-size">10.5pt</xsl:attribute>
|
4343
4429
|
|
4430
|
+
|
4344
4431
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
4345
4432
|
|
4433
|
+
|
4346
4434
|
<xsl:attribute name="color">blue</xsl:attribute>
|
4347
4435
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4348
4436
|
|
4349
4437
|
|
4350
4438
|
|
4439
|
+
|
4351
4440
|
</xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
|
4352
4441
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
4353
4442
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -4389,7 +4478,7 @@
|
|
4389
4478
|
|
4390
4479
|
|
4391
4480
|
|
4392
|
-
|
4481
|
+
|
4393
4482
|
</xsl:attribute-set><xsl:attribute-set name="example-style">
|
4394
4483
|
|
4395
4484
|
|
@@ -4405,6 +4494,7 @@
|
|
4405
4494
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
4406
4495
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4407
4496
|
|
4497
|
+
|
4408
4498
|
</xsl:attribute-set><xsl:attribute-set name="example-body-style">
|
4409
4499
|
|
4410
4500
|
|
@@ -4421,9 +4511,7 @@
|
|
4421
4511
|
|
4422
4512
|
|
4423
4513
|
|
4424
|
-
|
4425
|
-
|
4426
|
-
|
4514
|
+
|
4427
4515
|
|
4428
4516
|
|
4429
4517
|
|
@@ -4450,8 +4538,10 @@
|
|
4450
4538
|
|
4451
4539
|
|
4452
4540
|
|
4541
|
+
|
4453
4542
|
</xsl:attribute-set><xsl:attribute-set name="table-name-style">
|
4454
4543
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
4544
|
+
|
4455
4545
|
|
4456
4546
|
|
4457
4547
|
|
@@ -4471,6 +4561,9 @@
|
|
4471
4561
|
<xsl:attribute name="text-indent">-25mm</xsl:attribute>
|
4472
4562
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
4473
4563
|
|
4564
|
+
|
4565
|
+
</xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
|
4566
|
+
|
4474
4567
|
</xsl:attribute-set><xsl:attribute-set name="appendix-style">
|
4475
4568
|
|
4476
4569
|
|
@@ -4483,15 +4576,19 @@
|
|
4483
4576
|
|
4484
4577
|
|
4485
4578
|
|
4579
|
+
|
4580
|
+
|
4486
4581
|
</xsl:attribute-set><xsl:attribute-set name="eref-style">
|
4487
4582
|
|
4488
4583
|
|
4489
4584
|
|
4490
4585
|
|
4586
|
+
|
4491
4587
|
</xsl:attribute-set><xsl:attribute-set name="note-style">
|
4492
4588
|
|
4493
4589
|
|
4494
4590
|
|
4591
|
+
|
4495
4592
|
|
4496
4593
|
|
4497
4594
|
|
@@ -4505,6 +4602,7 @@
|
|
4505
4602
|
|
4506
4603
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
4507
4604
|
|
4605
|
+
|
4508
4606
|
</xsl:attribute-set><xsl:variable name="note-body-indent">10mm</xsl:variable><xsl:variable name="note-body-indent-table">5mm</xsl:variable><xsl:attribute-set name="note-name-style">
|
4509
4607
|
|
4510
4608
|
|
@@ -4518,6 +4616,7 @@
|
|
4518
4616
|
|
4519
4617
|
|
4520
4618
|
|
4619
|
+
|
4521
4620
|
</xsl:attribute-set><xsl:attribute-set name="note-p-style">
|
4522
4621
|
|
4523
4622
|
|
@@ -4540,11 +4639,15 @@
|
|
4540
4639
|
|
4541
4640
|
|
4542
4641
|
|
4642
|
+
|
4643
|
+
|
4543
4644
|
</xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
|
4645
|
+
|
4544
4646
|
|
4545
4647
|
|
4546
4648
|
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
4547
4649
|
|
4650
|
+
|
4548
4651
|
</xsl:attribute-set><xsl:attribute-set name="quote-style">
|
4549
4652
|
|
4550
4653
|
|
@@ -4563,14 +4666,18 @@
|
|
4563
4666
|
|
4564
4667
|
|
4565
4668
|
|
4669
|
+
|
4670
|
+
|
4566
4671
|
</xsl:attribute-set><xsl:attribute-set name="origin-style">
|
4567
4672
|
|
4568
4673
|
|
4569
4674
|
|
4675
|
+
|
4570
4676
|
</xsl:attribute-set><xsl:attribute-set name="term-style">
|
4571
4677
|
|
4572
4678
|
</xsl:attribute-set><xsl:attribute-set name="figure-name-style">
|
4573
4679
|
|
4680
|
+
|
4574
4681
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
4575
4682
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
4576
4683
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -4590,6 +4697,7 @@
|
|
4590
4697
|
|
4591
4698
|
|
4592
4699
|
|
4700
|
+
|
4593
4701
|
|
4594
4702
|
|
4595
4703
|
|
@@ -4603,10 +4711,12 @@
|
|
4603
4711
|
|
4604
4712
|
|
4605
4713
|
|
4714
|
+
|
4606
4715
|
</xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
|
4607
4716
|
|
4608
4717
|
</xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
|
4609
4718
|
|
4719
|
+
|
4610
4720
|
<xsl:attribute name="width">100%</xsl:attribute>
|
4611
4721
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
4612
4722
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
@@ -4630,13 +4740,36 @@
|
|
4630
4740
|
|
4631
4741
|
</xsl:attribute-set><xsl:attribute-set name="admitted-style">
|
4632
4742
|
|
4633
|
-
|
4743
|
+
|
4744
|
+
|
4634
4745
|
</xsl:attribute-set><xsl:attribute-set name="deprecates-style">
|
4635
4746
|
|
4747
|
+
|
4636
4748
|
</xsl:attribute-set><xsl:attribute-set name="definition-style">
|
4637
4749
|
|
4638
4750
|
|
4639
|
-
|
4751
|
+
|
4752
|
+
</xsl:attribute-set><xsl:variable name="color-added-text">
|
4753
|
+
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
4754
|
+
</xsl:variable><xsl:attribute-set name="add-style">
|
4755
|
+
<xsl:attribute name="color">red</xsl:attribute>
|
4756
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
4757
|
+
<!-- <xsl:attribute name="color">black</xsl:attribute>
|
4758
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
4759
|
+
<xsl:attribute name="padding-top">1mm</xsl:attribute>
|
4760
|
+
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
4761
|
+
</xsl:attribute-set><xsl:variable name="color-deleted-text">
|
4762
|
+
<xsl:text>red</xsl:text>
|
4763
|
+
</xsl:variable><xsl:attribute-set name="del-style">
|
4764
|
+
<xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
4765
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
4766
|
+
</xsl:attribute-set><xsl:attribute-set name="mathml-style">
|
4767
|
+
<xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
|
4768
|
+
|
4769
|
+
|
4770
|
+
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
4771
|
+
|
4772
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
|
4640
4773
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
4641
4774
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
4642
4775
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
@@ -4681,18 +4814,19 @@
|
|
4681
4814
|
<xsl:call-template name="add-zero-spaces-java"/>
|
4682
4815
|
</xsl:template><xsl:template match="*[local-name()='table']" name="table">
|
4683
4816
|
|
4817
|
+
<xsl:variable name="table-preamble">
|
4818
|
+
|
4819
|
+
|
4820
|
+
</xsl:variable>
|
4821
|
+
|
4684
4822
|
<xsl:variable name="table">
|
4685
4823
|
|
4686
4824
|
<xsl:variable name="simple-table">
|
4687
|
-
<xsl:call-template name="getSimpleTable"/>
|
4825
|
+
<xsl:call-template name="getSimpleTable"/>
|
4688
4826
|
</xsl:variable>
|
4689
4827
|
|
4690
|
-
|
4691
|
-
|
4692
|
-
|
4693
|
-
|
4694
4828
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
4695
|
-
<fo:block> </fo:block>
|
4829
|
+
<fo:block> </fo:block>
|
4696
4830
|
</xsl:if> -->
|
4697
4831
|
|
4698
4832
|
<!-- $namespace = 'iso' or -->
|
@@ -4705,7 +4839,7 @@
|
|
4705
4839
|
|
4706
4840
|
|
4707
4841
|
|
4708
|
-
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)
|
4842
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
|
4709
4843
|
|
4710
4844
|
<!-- <xsl:variable name="cols-count">
|
4711
4845
|
<xsl:choose>
|
@@ -4724,8 +4858,6 @@
|
|
4724
4858
|
<!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
|
4725
4859
|
<!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
|
4726
4860
|
|
4727
|
-
|
4728
|
-
|
4729
4861
|
<xsl:variable name="colwidths">
|
4730
4862
|
<xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
|
4731
4863
|
<xsl:call-template name="calculate-column-widths">
|
@@ -4753,9 +4885,11 @@
|
|
4753
4885
|
</xsl:choose>
|
4754
4886
|
</xsl:variable>
|
4755
4887
|
|
4888
|
+
|
4756
4889
|
<fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
|
4757
4890
|
|
4758
4891
|
|
4892
|
+
|
4759
4893
|
|
4760
4894
|
|
4761
4895
|
|
@@ -4767,6 +4901,8 @@
|
|
4767
4901
|
|
4768
4902
|
|
4769
4903
|
|
4904
|
+
|
4905
|
+
|
4770
4906
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
4771
4907
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
4772
4908
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
@@ -4801,6 +4937,8 @@
|
|
4801
4937
|
|
4802
4938
|
|
4803
4939
|
|
4940
|
+
|
4941
|
+
|
4804
4942
|
|
4805
4943
|
|
4806
4944
|
|
@@ -4813,6 +4951,8 @@
|
|
4813
4951
|
</xsl:if>
|
4814
4952
|
<attribute name="margin-left">0mm</attribute>
|
4815
4953
|
<attribute name="margin-right">0mm</attribute>
|
4954
|
+
<!-- <attribute name="keep-together.within-column">1</attribute> --> <!-- integer value instead 'always'! -->
|
4955
|
+
|
4816
4956
|
|
4817
4957
|
</xsl:variable>
|
4818
4958
|
|
@@ -4897,7 +5037,8 @@
|
|
4897
5037
|
</fo:block-container>
|
4898
5038
|
</xsl:variable>
|
4899
5039
|
|
4900
|
-
|
5040
|
+
<xsl:variable name="isAdded" select="@added"/>
|
5041
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
4901
5042
|
|
4902
5043
|
<xsl:choose>
|
4903
5044
|
<xsl:when test="@width">
|
@@ -4906,16 +5047,47 @@
|
|
4906
5047
|
|
4907
5048
|
|
4908
5049
|
|
4909
|
-
<xsl:
|
5050
|
+
<xsl:choose>
|
5051
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
5052
|
+
<xsl:copy-of select="$table-preamble"/>
|
5053
|
+
<fo:block>
|
5054
|
+
<xsl:call-template name="setTrackChangesStyles">
|
5055
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5056
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5057
|
+
</xsl:call-template>
|
5058
|
+
<xsl:copy-of select="$table"/>
|
5059
|
+
</fo:block>
|
5060
|
+
</xsl:when>
|
5061
|
+
<xsl:otherwise>
|
5062
|
+
<xsl:copy-of select="$table-preamble"/>
|
5063
|
+
<xsl:copy-of select="$table"/>
|
5064
|
+
</xsl:otherwise>
|
5065
|
+
</xsl:choose>
|
4910
5066
|
|
4911
5067
|
|
4912
5068
|
</xsl:when>
|
4913
5069
|
<xsl:otherwise>
|
4914
|
-
<xsl:
|
5070
|
+
<xsl:choose>
|
5071
|
+
<xsl:when test="$isAdded = 'true' or $isDeleted = 'true'">
|
5072
|
+
<xsl:copy-of select="$table-preamble"/>
|
5073
|
+
<fo:block>
|
5074
|
+
<xsl:call-template name="setTrackChangesStyles">
|
5075
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5076
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5077
|
+
</xsl:call-template>
|
5078
|
+
<xsl:copy-of select="$table"/>
|
5079
|
+
</fo:block>
|
5080
|
+
</xsl:when>
|
5081
|
+
<xsl:otherwise>
|
5082
|
+
<xsl:copy-of select="$table-preamble"/>
|
5083
|
+
<xsl:copy-of select="$table"/>
|
5084
|
+
</xsl:otherwise>
|
5085
|
+
</xsl:choose>
|
4915
5086
|
</xsl:otherwise>
|
4916
5087
|
</xsl:choose>
|
4917
5088
|
|
4918
5089
|
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
|
5090
|
+
<xsl:param name="continued"/>
|
4919
5091
|
<xsl:if test="normalize-space() != ''">
|
4920
5092
|
<fo:block xsl:use-attribute-sets="table-name-style">
|
4921
5093
|
|
@@ -4927,7 +5099,20 @@
|
|
4927
5099
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
4928
5100
|
</xsl:if>
|
4929
5101
|
|
4930
|
-
|
5102
|
+
|
5103
|
+
|
5104
|
+
|
5105
|
+
<xsl:choose>
|
5106
|
+
<xsl:when test="$continued = 'true'">
|
5107
|
+
<!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
|
5108
|
+
|
5109
|
+
</xsl:when>
|
5110
|
+
<xsl:otherwise>
|
5111
|
+
<xsl:apply-templates/>
|
5112
|
+
</xsl:otherwise>
|
5113
|
+
</xsl:choose>
|
5114
|
+
|
5115
|
+
|
4931
5116
|
</fo:block>
|
4932
5117
|
</xsl:if>
|
4933
5118
|
</xsl:template><xsl:template name="calculate-columns-numbers">
|
@@ -4979,7 +5164,7 @@
|
|
4979
5164
|
</xsl:for-each>
|
4980
5165
|
</xsl:when>
|
4981
5166
|
<xsl:otherwise>
|
4982
|
-
<xsl:for-each select="xalan:nodeset($table)
|
5167
|
+
<xsl:for-each select="xalan:nodeset($table)/*/tr">
|
4983
5168
|
<xsl:variable name="td_text">
|
4984
5169
|
<xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
|
4985
5170
|
|
@@ -5064,21 +5249,22 @@
|
|
5064
5249
|
<!-- font-weight="bold" -->
|
5065
5250
|
<fo:table-header>
|
5066
5251
|
|
5252
|
+
|
5067
5253
|
<xsl:apply-templates/>
|
5068
5254
|
</fo:table-header>
|
5069
5255
|
</xsl:template><xsl:template name="table-header-title">
|
5070
|
-
<xsl:param name="cols-count"/>
|
5256
|
+
<xsl:param name="cols-count"/>
|
5071
5257
|
<!-- row for title -->
|
5072
5258
|
<fo:table-row>
|
5073
5259
|
<fo:table-cell number-columns-spanned="{$cols-count}" border-left="1.5pt solid white" border-right="1.5pt solid white" border-top="1.5pt solid white" border-bottom="1.5pt solid black">
|
5074
|
-
|
5260
|
+
|
5261
|
+
<xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
|
5262
|
+
<xsl:with-param name="continued">true</xsl:with-param>
|
5263
|
+
</xsl:apply-templates>
|
5075
5264
|
<xsl:for-each select="ancestor::*[local-name()='table'][1]">
|
5076
5265
|
<xsl:call-template name="fn_name_display"/>
|
5077
|
-
</xsl:for-each>
|
5078
|
-
|
5079
|
-
<xsl:text> </xsl:text>
|
5080
|
-
<fo:retrieve-table-marker retrieve-class-name="table_continued"/>
|
5081
|
-
</fo:block>
|
5266
|
+
</xsl:for-each>
|
5267
|
+
|
5082
5268
|
</fo:table-cell>
|
5083
5269
|
</fo:table-row>
|
5084
5270
|
</xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
|
@@ -5224,7 +5410,6 @@
|
|
5224
5410
|
|
5225
5411
|
|
5226
5412
|
|
5227
|
-
|
5228
5413
|
<xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) > 1">
|
5229
5414
|
<fo:block font-weight="bold">
|
5230
5415
|
<xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
|
@@ -5236,6 +5421,7 @@
|
|
5236
5421
|
</xsl:if>
|
5237
5422
|
|
5238
5423
|
|
5424
|
+
|
5239
5425
|
<!-- except gb -->
|
5240
5426
|
|
5241
5427
|
<xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
|
@@ -5313,6 +5499,7 @@
|
|
5313
5499
|
|
5314
5500
|
|
5315
5501
|
|
5502
|
+
|
5316
5503
|
</xsl:if>
|
5317
5504
|
<xsl:if test="$parent-name = 'tfoot'">
|
5318
5505
|
|
@@ -5329,6 +5516,10 @@
|
|
5329
5516
|
<xsl:attribute name="min-height">5mm</xsl:attribute>
|
5330
5517
|
</xsl:if>
|
5331
5518
|
|
5519
|
+
|
5520
|
+
|
5521
|
+
|
5522
|
+
|
5332
5523
|
<!-- <xsl:if test="$namespace = 'bipm'">
|
5333
5524
|
<xsl:attribute name="height">8mm</xsl:attribute>
|
5334
5525
|
</xsl:if> -->
|
@@ -5340,7 +5531,8 @@
|
|
5340
5531
|
<xsl:attribute name="text-align">
|
5341
5532
|
<xsl:choose>
|
5342
5533
|
<xsl:when test="@align">
|
5343
|
-
<xsl:
|
5534
|
+
<xsl:call-template name="setAlignment"/>
|
5535
|
+
<!-- <xsl:value-of select="@align"/> -->
|
5344
5536
|
</xsl:when>
|
5345
5537
|
<xsl:otherwise>center</xsl:otherwise>
|
5346
5538
|
</xsl:choose>
|
@@ -5356,6 +5548,7 @@
|
|
5356
5548
|
|
5357
5549
|
|
5358
5550
|
|
5551
|
+
|
5359
5552
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
5360
5553
|
<xsl:attribute name="border">solid black 0pt</xsl:attribute>
|
5361
5554
|
<!-- <xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute> -->
|
@@ -5378,6 +5571,10 @@
|
|
5378
5571
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
5379
5572
|
</xsl:if>
|
5380
5573
|
|
5574
|
+
|
5575
|
+
<xsl:if test="$lang = 'ar'">
|
5576
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5577
|
+
</xsl:if>
|
5381
5578
|
<xsl:if test="@colspan">
|
5382
5579
|
<xsl:attribute name="number-columns-spanned">
|
5383
5580
|
<xsl:value-of select="@colspan"/>
|
@@ -5409,11 +5606,16 @@
|
|
5409
5606
|
<xsl:attribute name="text-align">
|
5410
5607
|
<xsl:choose>
|
5411
5608
|
<xsl:when test="@align">
|
5412
|
-
<xsl:
|
5609
|
+
<xsl:call-template name="setAlignment"/>
|
5610
|
+
<!-- <xsl:value-of select="@align"/> -->
|
5413
5611
|
</xsl:when>
|
5414
5612
|
<xsl:otherwise>left</xsl:otherwise>
|
5415
5613
|
</xsl:choose>
|
5416
5614
|
</xsl:attribute>
|
5615
|
+
<xsl:if test="$lang = 'ar'">
|
5616
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5617
|
+
</xsl:if>
|
5618
|
+
|
5417
5619
|
|
5418
5620
|
|
5419
5621
|
|
@@ -5437,6 +5639,12 @@
|
|
5437
5639
|
<xsl:attribute name="display-align">before</xsl:attribute>
|
5438
5640
|
</xsl:if>
|
5439
5641
|
|
5642
|
+
|
5643
|
+
|
5644
|
+
|
5645
|
+
<xsl:if test=".//*[local-name() = 'table']">
|
5646
|
+
<xsl:attribute name="padding-right">1mm</xsl:attribute>
|
5647
|
+
</xsl:if>
|
5440
5648
|
<xsl:if test="@colspan">
|
5441
5649
|
<xsl:attribute name="number-columns-spanned">
|
5442
5650
|
<xsl:value-of select="@colspan"/>
|
@@ -5453,6 +5661,11 @@
|
|
5453
5661
|
<xsl:if test="not(.//bipm:image)">
|
5454
5662
|
<xsl:attribute name="line-stacking-strategy">font-height</xsl:attribute>
|
5455
5663
|
</xsl:if>
|
5664
|
+
<!-- hanging indent for left column -->
|
5665
|
+
<xsl:if test="not(preceding-sibling::*[local-name() = 'td'])">
|
5666
|
+
<xsl:attribute name="text-indent">-3mm</xsl:attribute>
|
5667
|
+
<xsl:attribute name="start-indent">3mm</xsl:attribute>
|
5668
|
+
</xsl:if>
|
5456
5669
|
|
5457
5670
|
<xsl:apply-templates/>
|
5458
5671
|
</fo:block>
|
@@ -5595,13 +5808,13 @@
|
|
5595
5808
|
</xsl:choose>
|
5596
5809
|
</xsl:variable>
|
5597
5810
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
5598
|
-
<xsl:element name="{$ns}:table">
|
5811
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
5599
5812
|
<xsl:for-each select="*[local-name() = 'dl'][1]">
|
5600
5813
|
<tbody>
|
5601
5814
|
<xsl:apply-templates mode="dl"/>
|
5602
5815
|
</tbody>
|
5603
5816
|
</xsl:for-each>
|
5604
|
-
</xsl:element>
|
5817
|
+
<!-- </xsl:element> -->
|
5605
5818
|
</xsl:variable>
|
5606
5819
|
|
5607
5820
|
<xsl:call-template name="calculate-column-widths">
|
@@ -5684,6 +5897,7 @@
|
|
5684
5897
|
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
5685
5898
|
<xsl:attribute name="font-style">italic</xsl:attribute>
|
5686
5899
|
|
5900
|
+
|
5687
5901
|
<fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5688
5902
|
|
5689
5903
|
|
@@ -5700,6 +5914,8 @@
|
|
5700
5914
|
<xsl:apply-templates/>
|
5701
5915
|
</fo:inline>
|
5702
5916
|
</xsl:template><xsl:template match="*[local-name()='dl']">
|
5917
|
+
<xsl:variable name="isAdded" select="@added"/>
|
5918
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
5703
5919
|
<fo:block-container>
|
5704
5920
|
|
5705
5921
|
|
@@ -5719,6 +5935,12 @@
|
|
5719
5935
|
</xsl:attribute>
|
5720
5936
|
|
5721
5937
|
</xsl:if>
|
5938
|
+
|
5939
|
+
<xsl:call-template name="setTrackChangesStyles">
|
5940
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
5941
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
5942
|
+
</xsl:call-template>
|
5943
|
+
|
5722
5944
|
<fo:block-container>
|
5723
5945
|
|
5724
5946
|
|
@@ -5775,6 +5997,7 @@
|
|
5775
5997
|
|
5776
5998
|
|
5777
5999
|
|
6000
|
+
|
5778
6001
|
<xsl:variable name="title-key">
|
5779
6002
|
|
5780
6003
|
|
@@ -5827,11 +6050,11 @@
|
|
5827
6050
|
</xsl:choose>
|
5828
6051
|
</xsl:variable>
|
5829
6052
|
<!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
|
5830
|
-
<xsl:element name="{$ns}:table">
|
6053
|
+
<!-- <xsl:element name="{$ns}:table"> -->
|
5831
6054
|
<tbody>
|
5832
6055
|
<xsl:apply-templates mode="dl"/>
|
5833
6056
|
</tbody>
|
5834
|
-
</xsl:element>
|
6057
|
+
<!-- </xsl:element> -->
|
5835
6058
|
</xsl:variable>
|
5836
6059
|
<!-- html-table<xsl:copy-of select="$html-table"/> -->
|
5837
6060
|
<xsl:variable name="colwidths">
|
@@ -5985,6 +6208,7 @@
|
|
5985
6208
|
|
5986
6209
|
<fo:table-row>
|
5987
6210
|
|
6211
|
+
|
5988
6212
|
<fo:table-cell>
|
5989
6213
|
|
5990
6214
|
<fo:block margin-top="6pt">
|
@@ -6003,6 +6227,7 @@
|
|
6003
6227
|
<xsl:attribute name="margin-top">0pt</xsl:attribute>
|
6004
6228
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
6005
6229
|
|
6230
|
+
|
6006
6231
|
<xsl:apply-templates/>
|
6007
6232
|
<!-- <xsl:if test="$namespace = 'gb'">
|
6008
6233
|
<xsl:if test="ancestor::*[local-name()='formula']">
|
@@ -6059,6 +6284,8 @@
|
|
6059
6284
|
|
6060
6285
|
<xsl:apply-templates/>
|
6061
6286
|
</fo:inline>
|
6287
|
+
</xsl:template><xsl:template match="*[local-name()='padding']">
|
6288
|
+
<fo:inline padding-right="{@value}"> </fo:inline>
|
6062
6289
|
</xsl:template><xsl:template match="*[local-name()='sup']">
|
6063
6290
|
<fo:inline font-size="80%" vertical-align="super">
|
6064
6291
|
<xsl:apply-templates/>
|
@@ -6084,6 +6311,7 @@
|
|
6084
6311
|
|
6085
6312
|
|
6086
6313
|
|
6314
|
+
|
6087
6315
|
|
6088
6316
|
</xsl:variable>
|
6089
6317
|
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
@@ -6101,8 +6329,74 @@
|
|
6101
6329
|
<fo:inline text-decoration="underline">
|
6102
6330
|
<xsl:apply-templates/>
|
6103
6331
|
</fo:inline>
|
6332
|
+
</xsl:template><xsl:template match="*[local-name()='add']">
|
6333
|
+
<xsl:choose>
|
6334
|
+
<xsl:when test="@amendment">
|
6335
|
+
<fo:inline>
|
6336
|
+
<xsl:call-template name="insertTag">
|
6337
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
6338
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
6339
|
+
</xsl:call-template>
|
6340
|
+
<xsl:apply-templates/>
|
6341
|
+
<xsl:call-template name="insertTag">
|
6342
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
6343
|
+
<xsl:with-param name="kind">A</xsl:with-param>
|
6344
|
+
<xsl:with-param name="value"><xsl:value-of select="@amendment"/></xsl:with-param>
|
6345
|
+
</xsl:call-template>
|
6346
|
+
</fo:inline>
|
6347
|
+
</xsl:when>
|
6348
|
+
<xsl:when test="@corrigenda">
|
6349
|
+
<fo:inline>
|
6350
|
+
<xsl:call-template name="insertTag">
|
6351
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
6352
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
6353
|
+
</xsl:call-template>
|
6354
|
+
<xsl:apply-templates/>
|
6355
|
+
<xsl:call-template name="insertTag">
|
6356
|
+
<xsl:with-param name="type">closing</xsl:with-param>
|
6357
|
+
<xsl:with-param name="kind">C</xsl:with-param>
|
6358
|
+
<xsl:with-param name="value"><xsl:value-of select="@corrigenda"/></xsl:with-param>
|
6359
|
+
</xsl:call-template>
|
6360
|
+
</fo:inline>
|
6361
|
+
</xsl:when>
|
6362
|
+
<xsl:otherwise>
|
6363
|
+
<fo:inline xsl:use-attribute-sets="add-style">
|
6364
|
+
<xsl:apply-templates/>
|
6365
|
+
</fo:inline>
|
6366
|
+
</xsl:otherwise>
|
6367
|
+
</xsl:choose>
|
6368
|
+
|
6369
|
+
</xsl:template><xsl:template name="insertTag">
|
6370
|
+
<xsl:param name="type"/>
|
6371
|
+
<xsl:param name="kind"/>
|
6372
|
+
<xsl:param name="value"/>
|
6373
|
+
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
6374
|
+
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
6375
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
|
6376
|
+
<!-- <xsl:attribute name="width">7mm</xsl:attribute>
|
6377
|
+
<xsl:attribute name="content-height">100%</xsl:attribute> -->
|
6378
|
+
<xsl:attribute name="height">5mm</xsl:attribute>
|
6379
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
6380
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6381
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6382
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
6383
|
+
<g>
|
6384
|
+
<xsl:if test="$type = 'closing'">
|
6385
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
6386
|
+
</xsl:if>
|
6387
|
+
<polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
|
6388
|
+
<line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
|
6389
|
+
</g>
|
6390
|
+
<text font-family="Arial" x="15" y="57" font-size="40pt">
|
6391
|
+
<xsl:if test="$type = 'closing'">
|
6392
|
+
<xsl:attribute name="x">25</xsl:attribute>
|
6393
|
+
</xsl:if>
|
6394
|
+
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
6395
|
+
</text>
|
6396
|
+
</svg>
|
6397
|
+
</fo:instream-foreign-object>
|
6104
6398
|
</xsl:template><xsl:template match="*[local-name()='del']">
|
6105
|
-
<fo:inline
|
6399
|
+
<fo:inline xsl:use-attribute-sets="del-style">
|
6106
6400
|
<xsl:apply-templates/>
|
6107
6401
|
</fo:inline>
|
6108
6402
|
</xsl:template><xsl:template match="*[local-name()='hi']">
|
@@ -6399,11 +6693,15 @@
|
|
6399
6693
|
</xsl:apply-templates>
|
6400
6694
|
</xsl:template><xsl:template name="getLang">
|
6401
6695
|
<xsl:variable name="language_current" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6696
|
+
<xsl:variable name="language_current_2" select="normalize-space(xalan:nodeset($bibdata)//*[local-name()='bibdata']//*[local-name()='language'][@current = 'true'])"/>
|
6402
6697
|
<xsl:variable name="language">
|
6403
6698
|
<xsl:choose>
|
6404
6699
|
<xsl:when test="$language_current != ''">
|
6405
6700
|
<xsl:value-of select="$language_current"/>
|
6406
6701
|
</xsl:when>
|
6702
|
+
<xsl:when test="$language_current_2 != ''">
|
6703
|
+
<xsl:value-of select="$language_current_2"/>
|
6704
|
+
</xsl:when>
|
6407
6705
|
<xsl:otherwise>
|
6408
6706
|
<xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
|
6409
6707
|
</xsl:otherwise>
|
@@ -6443,12 +6741,21 @@
|
|
6443
6741
|
<xsl:value-of select="java:toUpperCase(java:java.lang.String.new(substring($str, 1, 1)))"/>
|
6444
6742
|
<xsl:value-of select="substring($str, 2)"/>
|
6445
6743
|
</xsl:template><xsl:template match="mathml:math">
|
6446
|
-
<
|
6744
|
+
<xsl:variable name="isAdded" select="@added"/>
|
6745
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
6746
|
+
|
6747
|
+
<fo:inline xsl:use-attribute-sets="mathml-style">
|
6447
6748
|
|
6448
6749
|
<xsl:if test="ancestor::*[local-name()='table']">
|
6449
6750
|
<xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
|
6450
6751
|
</xsl:if>
|
6451
6752
|
|
6753
|
+
|
6754
|
+
<xsl:call-template name="setTrackChangesStyles">
|
6755
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
6756
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
6757
|
+
</xsl:call-template>
|
6758
|
+
|
6452
6759
|
<xsl:variable name="mathml">
|
6453
6760
|
<xsl:apply-templates select="." mode="mathml"/>
|
6454
6761
|
</xsl:variable>
|
@@ -6460,6 +6767,10 @@
|
|
6460
6767
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
6461
6768
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
6462
6769
|
</xsl:if>
|
6770
|
+
<!-- <xsl:attribute name="fox:alt-text">
|
6771
|
+
put AsciiMath/LaTeX math
|
6772
|
+
</xsl:attribute> -->
|
6773
|
+
|
6463
6774
|
|
6464
6775
|
<!-- <xsl:copy-of select="."/> -->
|
6465
6776
|
<xsl:copy-of select="xalan:nodeset($mathml)"/>
|
@@ -6478,9 +6789,27 @@
|
|
6478
6789
|
<xsl:copy>
|
6479
6790
|
<xsl:apply-templates select="@*|node()" mode="mathml"/>
|
6480
6791
|
</xsl:copy>
|
6481
|
-
<
|
6792
|
+
<xsl:choose>
|
6793
|
+
<!-- if in msub, then don't add space -->
|
6794
|
+
<xsl:when test="ancestor::mathml:mrow[parent::mathml:msub and preceding-sibling::*[1][self::mathml:mrow]]"/>
|
6795
|
+
<!-- if next char in digit, don't add space -->
|
6796
|
+
<xsl:when test="translate(substring(following-sibling::*[1]/text(),1,1),'0123456789','') = ''"/>
|
6797
|
+
<xsl:otherwise>
|
6798
|
+
<mathml:mspace width="0.5ex"/>
|
6799
|
+
</xsl:otherwise>
|
6800
|
+
</xsl:choose>
|
6482
6801
|
</xsl:template><xsl:template match="mathml:math/*[local-name()='unit']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='prefix']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='dimension']" mode="mathml"/><xsl:template match="mathml:math/*[local-name()='quantity']" mode="mathml"/><xsl:template match="*[local-name()='localityStack']"/><xsl:template match="*[local-name()='link']" name="link">
|
6483
6802
|
<xsl:variable name="target">
|
6803
|
+
<xsl:choose>
|
6804
|
+
<xsl:when test="@updatetype = 'true'">
|
6805
|
+
<xsl:value-of select="concat(normalize-space(@target), '.pdf')"/>
|
6806
|
+
</xsl:when>
|
6807
|
+
<xsl:otherwise>
|
6808
|
+
<xsl:value-of select="normalize-space(@target)"/>
|
6809
|
+
</xsl:otherwise>
|
6810
|
+
</xsl:choose>
|
6811
|
+
</xsl:variable>
|
6812
|
+
<xsl:variable name="target_text">
|
6484
6813
|
<xsl:choose>
|
6485
6814
|
<xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
|
6486
6815
|
<xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
|
@@ -6492,20 +6821,21 @@
|
|
6492
6821
|
</xsl:variable>
|
6493
6822
|
<fo:inline xsl:use-attribute-sets="link-style">
|
6494
6823
|
|
6824
|
+
|
6495
6825
|
<xsl:choose>
|
6496
|
-
<xsl:when test="$
|
6826
|
+
<xsl:when test="$target_text = ''">
|
6497
6827
|
<xsl:apply-templates/>
|
6498
6828
|
</xsl:when>
|
6499
6829
|
<xsl:otherwise>
|
6500
|
-
<fo:basic-link external-destination="{
|
6830
|
+
<fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
|
6501
6831
|
<xsl:choose>
|
6502
6832
|
<xsl:when test="normalize-space(.) = ''">
|
6503
|
-
<!-- <xsl:value-of select="$target"/> -->
|
6504
6833
|
<xsl:call-template name="add-zero-spaces-link-java">
|
6505
|
-
<xsl:with-param name="text" select="$
|
6834
|
+
<xsl:with-param name="text" select="$target_text"/>
|
6506
6835
|
</xsl:call-template>
|
6507
6836
|
</xsl:when>
|
6508
6837
|
<xsl:otherwise>
|
6838
|
+
<!-- output text from <link>text</link> -->
|
6509
6839
|
<xsl:apply-templates/>
|
6510
6840
|
</xsl:otherwise>
|
6511
6841
|
</xsl:choose>
|
@@ -6624,6 +6954,7 @@
|
|
6624
6954
|
|
6625
6955
|
|
6626
6956
|
<fo:inline xsl:use-attribute-sets="note-name-style">
|
6957
|
+
|
6627
6958
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
6628
6959
|
</fo:inline>
|
6629
6960
|
<xsl:apply-templates/>
|
@@ -6649,7 +6980,9 @@
|
|
6649
6980
|
</xsl:choose>
|
6650
6981
|
</xsl:template><xsl:template match="*[local-name() = 'termnote']">
|
6651
6982
|
<fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
|
6983
|
+
|
6652
6984
|
<fo:inline xsl:use-attribute-sets="termnote-name-style">
|
6985
|
+
|
6653
6986
|
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
6654
6987
|
</fo:inline>
|
6655
6988
|
<xsl:apply-templates/>
|
@@ -6715,20 +7048,31 @@
|
|
6715
7048
|
</fo:inline>
|
6716
7049
|
</xsl:if>
|
6717
7050
|
</xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
|
7051
|
+
<xsl:variable name="isAdded" select="@added"/>
|
7052
|
+
<xsl:variable name="isDeleted" select="@deleted"/>
|
6718
7053
|
<fo:block-container id="{@id}">
|
6719
7054
|
|
6720
7055
|
<xsl:if test="*[local-name() = 'name']">
|
6721
7056
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
6722
7057
|
</xsl:if>
|
6723
7058
|
|
7059
|
+
<xsl:call-template name="setTrackChangesStyles">
|
7060
|
+
<xsl:with-param name="isAdded" select="$isAdded"/>
|
7061
|
+
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
7062
|
+
</xsl:call-template>
|
7063
|
+
|
6724
7064
|
<fo:block>
|
7065
|
+
|
6725
7066
|
<xsl:apply-templates/>
|
6726
7067
|
</fo:block>
|
6727
7068
|
<xsl:call-template name="fn_display_figure"/>
|
6728
7069
|
<xsl:for-each select="*[local-name() = 'note']">
|
6729
7070
|
<xsl:call-template name="note"/>
|
6730
7071
|
</xsl:for-each>
|
6731
|
-
|
7072
|
+
|
7073
|
+
|
7074
|
+
<xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
|
7075
|
+
|
6732
7076
|
</fo:block-container>
|
6733
7077
|
</xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
|
6734
7078
|
<fo:block id="{@id}">
|
@@ -6740,37 +7084,122 @@
|
|
6740
7084
|
<xsl:apply-templates/>
|
6741
7085
|
</fo:block>
|
6742
7086
|
</xsl:template><xsl:template match="*[local-name() = 'image']">
|
6743
|
-
<
|
6744
|
-
|
6745
|
-
|
6746
|
-
<xsl:
|
6747
|
-
<
|
6748
|
-
<xsl:
|
6749
|
-
<xsl:
|
6750
|
-
</xsl:
|
6751
|
-
<
|
6752
|
-
|
6753
|
-
|
6754
|
-
|
6755
|
-
|
6756
|
-
|
6757
|
-
|
6758
|
-
|
7087
|
+
<xsl:variable name="isAdded" select="../@added"/>
|
7088
|
+
<xsl:variable name="isDeleted" select="../@deleted"/>
|
7089
|
+
<xsl:choose>
|
7090
|
+
<xsl:when test="ancestor::*[local-name() = 'title']">
|
7091
|
+
<fo:inline padding-left="1mm" padding-right="1mm">
|
7092
|
+
<xsl:variable name="src">
|
7093
|
+
<xsl:call-template name="image_src"/>
|
7094
|
+
</xsl:variable>
|
7095
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/>
|
7096
|
+
</fo:inline>
|
7097
|
+
</xsl:when>
|
7098
|
+
<xsl:otherwise>
|
7099
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
7100
|
+
|
7101
|
+
<xsl:variable name="src">
|
7102
|
+
<xsl:call-template name="image_src"/>
|
7103
|
+
</xsl:variable>
|
7104
|
+
|
7105
|
+
<xsl:choose>
|
7106
|
+
<xsl:when test="$isDeleted = 'true'">
|
7107
|
+
<!-- enclose in svg -->
|
7108
|
+
<fo:instream-foreign-object fox:alt-text="Image {@alt}">
|
7109
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7110
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7111
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7112
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7113
|
+
|
7114
|
+
|
7115
|
+
<xsl:apply-templates select="." mode="cross_image"/>
|
7116
|
+
|
7117
|
+
</fo:instream-foreign-object>
|
7118
|
+
</xsl:when>
|
7119
|
+
<xsl:otherwise>
|
7120
|
+
<fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style"/>
|
7121
|
+
</xsl:otherwise>
|
7122
|
+
</xsl:choose>
|
7123
|
+
|
7124
|
+
</fo:block>
|
7125
|
+
</xsl:otherwise>
|
7126
|
+
</xsl:choose>
|
7127
|
+
</xsl:template><xsl:template name="image_src">
|
7128
|
+
<xsl:choose>
|
7129
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
7130
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
7131
|
+
</xsl:when>
|
7132
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7133
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
7134
|
+
</xsl:when>
|
7135
|
+
<xsl:otherwise>
|
7136
|
+
<xsl:value-of select="@src"/>
|
7137
|
+
</xsl:otherwise>
|
7138
|
+
</xsl:choose>
|
7139
|
+
</xsl:template><xsl:template match="*[local-name() = 'image']" mode="cross_image">
|
7140
|
+
<xsl:choose>
|
7141
|
+
<xsl:when test="@mimetype = 'image/svg+xml' and $images/images/image[@id = current()/@id]">
|
7142
|
+
<xsl:variable name="src">
|
7143
|
+
<xsl:value-of select="$images/images/image[@id = current()/@id]/@src"/>
|
7144
|
+
</xsl:variable>
|
7145
|
+
<xsl:variable name="width" select="document($src)/@width"/>
|
7146
|
+
<xsl:variable name="height" select="document($src)/@height"/>
|
7147
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
7148
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
7149
|
+
</svg>
|
7150
|
+
</xsl:when>
|
7151
|
+
<xsl:when test="not(starts-with(@src, 'data:'))">
|
7152
|
+
<xsl:variable name="src">
|
7153
|
+
<xsl:value-of select="concat('url(file:',$basepath, @src, ')')"/>
|
7154
|
+
</xsl:variable>
|
7155
|
+
<xsl:variable name="file" select="java:java.io.File.new(@src)"/>
|
7156
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($file)"/>
|
7157
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
7158
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
7159
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
7160
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{$src}" style="overflow:visible;"/>
|
7161
|
+
</svg>
|
7162
|
+
</xsl:when>
|
7163
|
+
<xsl:otherwise>
|
7164
|
+
<xsl:variable name="base64String" select="substring-after(@src, 'base64,')"/>
|
7165
|
+
<xsl:variable name="decoder" select="java:java.util.Base64.getDecoder()"/>
|
7166
|
+
<xsl:variable name="fileContent" select="java:decode($decoder, $base64String)"/>
|
7167
|
+
<xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
|
7168
|
+
<xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
|
7169
|
+
<xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
|
7170
|
+
<!-- width=<xsl:value-of select="$width"/> -->
|
7171
|
+
<xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
|
7172
|
+
<!-- height=<xsl:value-of select="$height"/> -->
|
7173
|
+
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" style="enable-background:new 0 0 595.28 841.89;" height="{$height}" width="{$width}" viewBox="0 0 {$width} {$height}" y="0px" x="0px" id="Layer_1" version="1.1">
|
7174
|
+
<image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
|
7175
|
+
<xsl:call-template name="svg_cross">
|
7176
|
+
<xsl:with-param name="width" select="$width"/>
|
7177
|
+
<xsl:with-param name="height" select="$height"/>
|
7178
|
+
</xsl:call-template>
|
7179
|
+
</svg>
|
7180
|
+
</xsl:otherwise>
|
7181
|
+
</xsl:choose>
|
7182
|
+
|
7183
|
+
</xsl:template><xsl:template name="svg_cross">
|
7184
|
+
<xsl:param name="width"/>
|
7185
|
+
<xsl:param name="height"/>
|
7186
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="0" x2="{$width}" y2="{$height}" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
7187
|
+
<line xmlns="http://www.w3.org/2000/svg" x1="0" y1="{$height}" x2="{$width}" y2="0" style="stroke: rgb(255, 0, 0); stroke-width:4px; "/>
|
6759
7188
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
6760
7189
|
<xsl:apply-templates mode="contents"/>
|
6761
7190
|
<xsl:text> </xsl:text>
|
6762
7191
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
6763
7192
|
<xsl:apply-templates mode="bookmarks"/>
|
6764
7193
|
<xsl:text> </xsl:text>
|
6765
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="contents" priority="2">
|
7194
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="contents" priority="2">
|
6766
7195
|
<xsl:value-of select="."/>
|
6767
|
-
</xsl:template><xsl:template match="*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
7196
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure' or local-name() = 'table' or local-name() = 'permission' or local-name() = 'recommendation' or local-name() = 'requirement']/*[local-name() = 'name']/text()" mode="bookmarks" priority="2">
|
6768
7197
|
<xsl:value-of select="."/>
|
6769
7198
|
</xsl:template><xsl:template match="node()" mode="contents">
|
6770
7199
|
<xsl:apply-templates mode="contents"/>
|
6771
7200
|
</xsl:template><xsl:template match="node()" mode="bookmarks">
|
6772
7201
|
<xsl:apply-templates mode="bookmarks"/>
|
6773
|
-
</xsl:template><xsl:template match="*[local-name() = 'stem']" mode="contents">
|
7202
|
+
</xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
|
6774
7203
|
<xsl:apply-templates select="."/>
|
6775
7204
|
</xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
|
6776
7205
|
<xsl:apply-templates mode="bookmarks"/>
|
@@ -6932,6 +7361,7 @@
|
|
6932
7361
|
<xsl:if test="normalize-space() != ''">
|
6933
7362
|
<fo:block xsl:use-attribute-sets="figure-name-style">
|
6934
7363
|
|
7364
|
+
|
6935
7365
|
<xsl:apply-templates/>
|
6936
7366
|
</fo:block>
|
6937
7367
|
</xsl:if>
|
@@ -6983,6 +7413,8 @@
|
|
6983
7413
|
</fo:list-item-body>
|
6984
7414
|
</fo:list-item>
|
6985
7415
|
</fo:list-block>
|
7416
|
+
</xsl:template><xsl:template name="extractSection">
|
7417
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
6986
7418
|
</xsl:template><xsl:template name="extractTitle">
|
6987
7419
|
<xsl:choose>
|
6988
7420
|
<xsl:when test="*[local-name() = 'tab']">
|
@@ -7009,6 +7441,8 @@
|
|
7009
7441
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
|
7010
7442
|
|
7011
7443
|
<fo:block-container margin-left="0mm">
|
7444
|
+
<xsl:copy-of select="@id"/>
|
7445
|
+
|
7012
7446
|
<xsl:if test="parent::*[local-name() = 'note']">
|
7013
7447
|
<xsl:attribute name="margin-left">
|
7014
7448
|
<xsl:choose>
|
@@ -7019,7 +7453,9 @@
|
|
7019
7453
|
|
7020
7454
|
</xsl:if>
|
7021
7455
|
<fo:block-container margin-left="0mm">
|
7022
|
-
|
7456
|
+
|
7457
|
+
|
7458
|
+
|
7023
7459
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
7024
7460
|
<xsl:variable name="_font-size">
|
7025
7461
|
|
@@ -7030,6 +7466,7 @@
|
|
7030
7466
|
|
7031
7467
|
|
7032
7468
|
|
7469
|
+
|
7033
7470
|
|
7034
7471
|
|
7035
7472
|
|
@@ -7047,10 +7484,14 @@
|
|
7047
7484
|
</xsl:choose>
|
7048
7485
|
</xsl:attribute>
|
7049
7486
|
</xsl:if>
|
7050
|
-
|
7051
|
-
|
7487
|
+
|
7488
|
+
<xsl:apply-templates/>
|
7489
|
+
</fo:block>
|
7490
|
+
|
7491
|
+
|
7052
7492
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
7053
7493
|
|
7494
|
+
|
7054
7495
|
</fo:block-container>
|
7055
7496
|
</fo:block-container>
|
7056
7497
|
</xsl:template><xsl:template match="*[local-name()='sourcecode']/text()" priority="2">
|
@@ -7285,6 +7726,7 @@
|
|
7285
7726
|
</xsl:template><xsl:template match="*[local-name() = 'example']">
|
7286
7727
|
<fo:block id="{@id}" xsl:use-attribute-sets="example-style">
|
7287
7728
|
|
7729
|
+
|
7288
7730
|
<xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
|
7289
7731
|
|
7290
7732
|
<xsl:variable name="element">
|
@@ -7312,6 +7754,7 @@
|
|
7312
7754
|
<xsl:variable name="element">
|
7313
7755
|
block
|
7314
7756
|
|
7757
|
+
<xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
|
7315
7758
|
</xsl:variable>
|
7316
7759
|
<xsl:choose>
|
7317
7760
|
<xsl:when test="ancestor::*[local-name() = 'appendix']">
|
@@ -7319,7 +7762,7 @@
|
|
7319
7762
|
<xsl:apply-templates/>
|
7320
7763
|
</fo:inline>
|
7321
7764
|
</xsl:when>
|
7322
|
-
<xsl:when test="normalize-space($element)
|
7765
|
+
<xsl:when test="contains(normalize-space($element), 'block')">
|
7323
7766
|
<fo:block xsl:use-attribute-sets="example-name-style">
|
7324
7767
|
<xsl:apply-templates/>
|
7325
7768
|
</fo:block>
|
@@ -7351,7 +7794,7 @@
|
|
7351
7794
|
</fo:inline>
|
7352
7795
|
</xsl:otherwise>
|
7353
7796
|
</xsl:choose>
|
7354
|
-
</xsl:template><xsl:template match="*[local-name() = 'termsource']">
|
7797
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
|
7355
7798
|
<fo:block xsl:use-attribute-sets="termsource-style">
|
7356
7799
|
<!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
|
7357
7800
|
<xsl:variable name="termsource_text">
|
@@ -7360,13 +7803,15 @@
|
|
7360
7803
|
|
7361
7804
|
<xsl:choose>
|
7362
7805
|
<xsl:when test="starts-with(normalize-space($termsource_text), '[')">
|
7363
|
-
<xsl:apply-templates/>
|
7806
|
+
<!-- <xsl:apply-templates /> -->
|
7807
|
+
<xsl:copy-of select="$termsource_text"/>
|
7364
7808
|
</xsl:when>
|
7365
7809
|
<xsl:otherwise>
|
7366
7810
|
|
7367
7811
|
<xsl:text>[</xsl:text>
|
7368
7812
|
|
7369
|
-
<xsl:apply-templates/>
|
7813
|
+
<!-- <xsl:apply-templates /> -->
|
7814
|
+
<xsl:copy-of select="$termsource_text"/>
|
7370
7815
|
|
7371
7816
|
<xsl:text>]</xsl:text>
|
7372
7817
|
|
@@ -7377,20 +7822,27 @@
|
|
7377
7822
|
<xsl:if test="normalize-space() != ''">
|
7378
7823
|
<xsl:value-of select="."/>
|
7379
7824
|
</xsl:if>
|
7380
|
-
</xsl:template><xsl:
|
7825
|
+
</xsl:template><xsl:variable name="localized.source">
|
7826
|
+
<xsl:call-template name="getLocalizedString">
|
7827
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
7828
|
+
</xsl:call-template>
|
7829
|
+
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
7381
7830
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
7831
|
+
<xsl:if test="normalize-space(@citeas) = ''">
|
7832
|
+
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
7833
|
+
</xsl:if>
|
7382
7834
|
|
7383
7835
|
<fo:inline>
|
7384
7836
|
|
7385
7837
|
|
7386
7838
|
|
7387
7839
|
|
7388
|
-
|
7389
|
-
|
7390
|
-
</xsl:
|
7840
|
+
|
7841
|
+
<xsl:value-of select="$localized.source"/>
|
7842
|
+
<xsl:text> </xsl:text>
|
7843
|
+
|
7391
7844
|
|
7392
7845
|
|
7393
|
-
<xsl:text>: </xsl:text>
|
7394
7846
|
</fo:inline>
|
7395
7847
|
|
7396
7848
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
@@ -7511,6 +7963,7 @@
|
|
7511
7963
|
|
7512
7964
|
|
7513
7965
|
|
7966
|
+
|
7514
7967
|
<xsl:choose>
|
7515
7968
|
<xsl:when test="ancestor::bipm:annex">2</xsl:when>
|
7516
7969
|
<xsl:otherwise>8</xsl:otherwise>
|
@@ -7541,7 +7994,8 @@
|
|
7541
7994
|
</fo:inline>
|
7542
7995
|
</xsl:when>
|
7543
7996
|
<xsl:otherwise>
|
7544
|
-
<
|
7997
|
+
<xsl:variable name="direction"><xsl:if test="$lang = 'ar'"><xsl:value-of select="$RLM"/></xsl:if></xsl:variable>
|
7998
|
+
<fo:inline padding-right="{$padding-right}mm"><xsl:value-of select="$direction"/></fo:inline>
|
7545
7999
|
</xsl:otherwise>
|
7546
8000
|
</xsl:choose>
|
7547
8001
|
|
@@ -7595,7 +8049,6 @@
|
|
7595
8049
|
|
7596
8050
|
|
7597
8051
|
|
7598
|
-
|
7599
8052
|
<xsl:apply-templates/>
|
7600
8053
|
</fo:block>
|
7601
8054
|
|
@@ -7614,6 +8067,7 @@
|
|
7614
8067
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7615
8068
|
|
7616
8069
|
|
8070
|
+
|
7617
8071
|
<xsl:apply-templates/>
|
7618
8072
|
</fo:block>
|
7619
8073
|
</xsl:template><xsl:template match="*[local-name() = 'definitions']">
|
@@ -7640,7 +8094,7 @@
|
|
7640
8094
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
7641
8095
|
</xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
7642
8096
|
<xsl:choose>
|
7643
|
-
<xsl:when test="parent::*[local-name() = 'note']">
|
8097
|
+
<xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
|
7644
8098
|
<fo:block-container>
|
7645
8099
|
<xsl:attribute name="margin-left">
|
7646
8100
|
<xsl:choose>
|
@@ -7652,6 +8106,7 @@
|
|
7652
8106
|
|
7653
8107
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7654
8108
|
|
8109
|
+
|
7655
8110
|
<fo:block-container margin-left="0mm">
|
7656
8111
|
<fo:block>
|
7657
8112
|
<xsl:apply-templates select="." mode="ul_ol"/>
|
@@ -7881,21 +8336,25 @@
|
|
7881
8336
|
|
7882
8337
|
|
7883
8338
|
|
8339
|
+
|
8340
|
+
|
8341
|
+
|
8342
|
+
|
7884
8343
|
</xsl:template><xsl:template name="processBibitemDocId">
|
7885
8344
|
<xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
|
7886
8345
|
<xsl:choose>
|
7887
8346
|
<xsl:when test="normalize-space($_doc_ident) != ''">
|
7888
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
8347
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]/@type"/>
|
7889
8348
|
<xsl:if test="$type != '' and not(contains($_doc_ident, $type))">
|
7890
8349
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
7891
|
-
</xsl:if>
|
8350
|
+
</xsl:if> -->
|
7892
8351
|
<xsl:value-of select="$_doc_ident"/>
|
7893
8352
|
</xsl:when>
|
7894
8353
|
<xsl:otherwise>
|
7895
|
-
<xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
8354
|
+
<!-- <xsl:variable name="type" select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]/@type"/>
|
7896
8355
|
<xsl:if test="$type != ''">
|
7897
8356
|
<xsl:value-of select="$type"/><xsl:text> </xsl:text>
|
7898
|
-
</xsl:if>
|
8357
|
+
</xsl:if> -->
|
7899
8358
|
<xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
|
7900
8359
|
</xsl:otherwise>
|
7901
8360
|
</xsl:choose>
|
@@ -7937,6 +8396,70 @@
|
|
7937
8396
|
<xsl:value-of select="substring(.,1,1)"/>
|
7938
8397
|
</xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
|
7939
8398
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
8399
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']">
|
8400
|
+
<fo:block>
|
8401
|
+
<xsl:apply-templates/>
|
8402
|
+
</fo:block>
|
8403
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'label']">
|
8404
|
+
<fo:inline><xsl:apply-templates/></fo:inline>
|
8405
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'text' or @type = 'date' or @type = 'file' or @type = 'password']">
|
8406
|
+
<fo:inline>
|
8407
|
+
<xsl:call-template name="text_input"/>
|
8408
|
+
</fo:inline>
|
8409
|
+
</xsl:template><xsl:template name="text_input">
|
8410
|
+
<xsl:variable name="count">
|
8411
|
+
<xsl:choose>
|
8412
|
+
<xsl:when test="normalize-space(@maxlength) != ''"><xsl:value-of select="@maxlength"/></xsl:when>
|
8413
|
+
<xsl:when test="normalize-space(@size) != ''"><xsl:value-of select="@size"/></xsl:when>
|
8414
|
+
<xsl:otherwise>10</xsl:otherwise>
|
8415
|
+
</xsl:choose>
|
8416
|
+
</xsl:variable>
|
8417
|
+
<xsl:call-template name="repeat">
|
8418
|
+
<xsl:with-param name="char" select="'_'"/>
|
8419
|
+
<xsl:with-param name="count" select="$count"/>
|
8420
|
+
</xsl:call-template>
|
8421
|
+
<xsl:text> </xsl:text>
|
8422
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'button']">
|
8423
|
+
<xsl:variable name="caption">
|
8424
|
+
<xsl:choose>
|
8425
|
+
<xsl:when test="normalize-space(@value) != ''"><xsl:value-of select="@value"/></xsl:when>
|
8426
|
+
<xsl:otherwise>BUTTON</xsl:otherwise>
|
8427
|
+
</xsl:choose>
|
8428
|
+
</xsl:variable>
|
8429
|
+
<fo:inline>[<xsl:value-of select="$caption"/>]</fo:inline>
|
8430
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'checkbox']">
|
8431
|
+
<fo:inline padding-right="1mm">
|
8432
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
8433
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
8434
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
8435
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
8436
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8437
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
8438
|
+
<polyline points="0,0 80,0 80,80 0,80 0,0" stroke="black" stroke-width="5" fill="white"/>
|
8439
|
+
</svg>
|
8440
|
+
</fo:instream-foreign-object>
|
8441
|
+
</fo:inline>
|
8442
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'input'][@type = 'radio']">
|
8443
|
+
<fo:inline padding-right="1mm">
|
8444
|
+
<fo:instream-foreign-object fox:alt-text="Box" baseline-shift="-10%">
|
8445
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
8446
|
+
<xsl:attribute name="content-width">100%</xsl:attribute>
|
8447
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
8448
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
8449
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80">
|
8450
|
+
<circle cx="40" cy="40" r="30" stroke="black" stroke-width="5" fill="white"/>
|
8451
|
+
<circle cx="40" cy="40" r="15" stroke="black" stroke-width="5" fill="white"/>
|
8452
|
+
</svg>
|
8453
|
+
</fo:instream-foreign-object>
|
8454
|
+
</fo:inline>
|
8455
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'select']">
|
8456
|
+
<fo:inline>
|
8457
|
+
<xsl:call-template name="text_input"/>
|
8458
|
+
</fo:inline>
|
8459
|
+
</xsl:template><xsl:template match="*[local-name() = 'form']//*[local-name() = 'textarea']">
|
8460
|
+
<fo:block-container border="1pt solid black" width="50%">
|
8461
|
+
<fo:block> </fo:block>
|
8462
|
+
</fo:block-container>
|
7940
8463
|
</xsl:template><xsl:template name="convertDate">
|
7941
8464
|
<xsl:param name="date"/>
|
7942
8465
|
<xsl:param name="format" select="'short'"/>
|
@@ -8144,6 +8667,9 @@
|
|
8144
8667
|
<xsl:when test="parent::*[local-name() = 'preface']">
|
8145
8668
|
<xsl:value-of select="$level_total - 1"/>
|
8146
8669
|
</xsl:when>
|
8670
|
+
<xsl:when test="ancestor::*[local-name() = 'preface'] and not(ancestor::*[local-name() = 'foreword']) and not(ancestor::*[local-name() = 'introduction'])"> <!-- for preface/clause -->
|
8671
|
+
<xsl:value-of select="$level_total - 1"/>
|
8672
|
+
</xsl:when>
|
8147
8673
|
<xsl:when test="ancestor::*[local-name() = 'preface']">
|
8148
8674
|
<xsl:value-of select="$level_total - 2"/>
|
8149
8675
|
</xsl:when>
|
@@ -8208,6 +8734,7 @@
|
|
8208
8734
|
|
8209
8735
|
|
8210
8736
|
|
8737
|
+
|
8211
8738
|
|
8212
8739
|
|
8213
8740
|
|
@@ -8268,17 +8795,79 @@
|
|
8268
8795
|
</xsl:call-template>
|
8269
8796
|
</xsl:if>
|
8270
8797
|
</xsl:template><xsl:template name="getLocalizedString">
|
8271
|
-
<xsl:param name="key"/>
|
8798
|
+
<xsl:param name="key"/>
|
8272
8799
|
|
8273
8800
|
<xsl:variable name="curr_lang">
|
8274
8801
|
<xsl:call-template name="getLang"/>
|
8275
8802
|
</xsl:variable>
|
8276
8803
|
|
8804
|
+
<xsl:variable name="data_value" select="normalize-space(xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang])"/>
|
8805
|
+
|
8277
8806
|
<xsl:choose>
|
8807
|
+
<xsl:when test="$data_value != ''">
|
8808
|
+
<xsl:value-of select="$data_value"/>
|
8809
|
+
</xsl:when>
|
8278
8810
|
<xsl:when test="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]">
|
8279
8811
|
<xsl:value-of select="/*/*[local-name() = 'localized-strings']/*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
8280
8812
|
</xsl:when>
|
8281
|
-
<xsl:otherwise
|
8813
|
+
<xsl:otherwise>
|
8814
|
+
<xsl:variable name="key_">
|
8815
|
+
<xsl:call-template name="capitalize">
|
8816
|
+
<xsl:with-param name="str" select="translate($key, '_', ' ')"/>
|
8817
|
+
</xsl:call-template>
|
8818
|
+
</xsl:variable>
|
8819
|
+
<xsl:value-of select="$key_"/>
|
8820
|
+
</xsl:otherwise>
|
8282
8821
|
</xsl:choose>
|
8283
8822
|
|
8823
|
+
</xsl:template><xsl:template name="setTrackChangesStyles">
|
8824
|
+
<xsl:param name="isAdded"/>
|
8825
|
+
<xsl:param name="isDeleted"/>
|
8826
|
+
<xsl:choose>
|
8827
|
+
<xsl:when test="local-name() = 'math'">
|
8828
|
+
<xsl:if test="$isAdded = 'true'">
|
8829
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
|
8830
|
+
</xsl:if>
|
8831
|
+
<xsl:if test="$isDeleted = 'true'">
|
8832
|
+
<xsl:attribute name="background-color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
|
8833
|
+
</xsl:if>
|
8834
|
+
</xsl:when>
|
8835
|
+
<xsl:otherwise>
|
8836
|
+
<xsl:if test="$isAdded = 'true'">
|
8837
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-added"/></xsl:attribute>
|
8838
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
8839
|
+
</xsl:if>
|
8840
|
+
<xsl:if test="$isDeleted = 'true'">
|
8841
|
+
<xsl:attribute name="border"><xsl:value-of select="$border-block-deleted"/></xsl:attribute>
|
8842
|
+
<xsl:if test="local-name() = 'table'">
|
8843
|
+
<xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
|
8844
|
+
</xsl:if>
|
8845
|
+
<!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
|
8846
|
+
<xsl:attribute name="padding">2mm</xsl:attribute>
|
8847
|
+
</xsl:if>
|
8848
|
+
</xsl:otherwise>
|
8849
|
+
</xsl:choose>
|
8850
|
+
</xsl:template><xsl:variable name="LRM" select="''"/><xsl:variable name="RLM" select="''"/><xsl:template name="setWritingMode">
|
8851
|
+
<xsl:if test="$lang = 'ar'">
|
8852
|
+
<xsl:attribute name="writing-mode">rl-tb</xsl:attribute>
|
8853
|
+
</xsl:if>
|
8854
|
+
</xsl:template><xsl:template name="setAlignment">
|
8855
|
+
<xsl:param name="align" select="normalize-space(@align)"/>
|
8856
|
+
<xsl:choose>
|
8857
|
+
<xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
|
8858
|
+
<xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
|
8859
|
+
<xsl:when test="$align != ''">
|
8860
|
+
<xsl:value-of select="$align"/>
|
8861
|
+
</xsl:when>
|
8862
|
+
</xsl:choose>
|
8863
|
+
</xsl:template><xsl:template name="setTextAlignment">
|
8864
|
+
<xsl:param name="default">left</xsl:param>
|
8865
|
+
<xsl:attribute name="text-align">
|
8866
|
+
<xsl:choose>
|
8867
|
+
<xsl:when test="@align"><xsl:value-of select="@align"/></xsl:when>
|
8868
|
+
<xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
|
8869
|
+
<xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
|
8870
|
+
<xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
|
8871
|
+
</xsl:choose>
|
8872
|
+
</xsl:attribute>
|
8284
8873
|
</xsl:template></xsl:stylesheet>
|