metanorma-bipm 2.2.9 → 2.2.11

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.
@@ -176,7 +176,7 @@
176
176
  <xsl:template name="generateContents">
177
177
  <contents>
178
178
 
179
- <xsl:apply-templates select="/*/bipm:preface/*[not(local-name() = 'note' or local-name() = 'admonition')][position() &gt; 1]" mode="contents"/>
179
+ <xsl:apply-templates select="/*/bipm:preface/*[not(local-name() = 'note' or local-name() = 'admonition' or (local-name() = 'clause' and @type = 'toc'))][position() &gt; 1]" mode="contents"/>
180
180
 
181
181
  <xsl:apply-templates select="/*/bipm:sections/*" mode="contents"/>
182
182
  <xsl:apply-templates select="/*/bipm:bibliography/bipm:references[@normative='true']" mode="contents"/>
@@ -535,10 +535,14 @@
535
535
  </xsl:copy>
536
536
  </xsl:template>
537
537
 
538
+ <xsl:template match="bipm:semantic__bipm-standard" mode="flatxml" priority="2"/>
539
+
538
540
  <xsl:template match="mathml:math" mode="flatxml" priority="2">
539
541
  <xsl:copy-of select="."/>
540
542
  </xsl:template>
541
543
 
544
+ <xsl:template match="bipm:preface/bipm:clause[@type = 'toc']" mode="flatxml" priority="2"/>
545
+
542
546
  <!-- enclosing starting elements annex/... in clause -->
543
547
  <xsl:template match="bipm:annex" mode="flatxml">
544
548
  <xsl:copy>
@@ -727,7 +731,7 @@
727
731
  <xsl:value-of select="concat($lang, '_footnote_', @reference, '_', $number, '_', $gen_id)"/>
728
732
  </xsl:template>
729
733
 
730
- <xsl:template match="bipm:preface/bipm:clause[position() &gt; 1]" mode="flatxml">
734
+ <xsl:template match="bipm:preface/bipm:clause[not(@type = 'toc')][position() &gt; 1]" mode="flatxml">
731
735
  <xsl:copy-of select="."/>
732
736
  </xsl:template>
733
737
 
@@ -4283,6 +4287,10 @@
4283
4287
 
4284
4288
  </xsl:attribute-set>
4285
4289
 
4290
+ <xsl:template name="refine_link-style">
4291
+
4292
+ </xsl:template> <!-- refine_link-style -->
4293
+
4286
4294
  <xsl:attribute-set name="sourcecode-container-style">
4287
4295
 
4288
4296
  </xsl:attribute-set>
@@ -4294,6 +4302,10 @@
4294
4302
 
4295
4303
  </xsl:attribute-set>
4296
4304
 
4305
+ <xsl:template name="refine_sourcecode-style">
4306
+
4307
+ </xsl:template> <!-- refine_sourcecode-style -->
4308
+
4297
4309
  <xsl:attribute-set name="pre-style">
4298
4310
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
4299
4311
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -4372,6 +4384,10 @@
4372
4384
 
4373
4385
  </xsl:attribute-set> <!-- example-style -->
4374
4386
 
4387
+ <xsl:template name="refine_example-style">
4388
+
4389
+ </xsl:template> <!-- refine_example-style -->
4390
+
4375
4391
  <xsl:attribute-set name="example-body-style">
4376
4392
 
4377
4393
  </xsl:attribute-set> <!-- example-body-style -->
@@ -4386,6 +4402,10 @@
4386
4402
 
4387
4403
  </xsl:attribute-set> <!-- example-p-style -->
4388
4404
 
4405
+ <xsl:template name="refine_example-p-style">
4406
+
4407
+ </xsl:template> <!-- refine_example-p-style -->
4408
+
4389
4409
  <xsl:attribute-set name="termexample-name-style">
4390
4410
 
4391
4411
  <xsl:attribute name="font-style">italic</xsl:attribute>
@@ -4414,12 +4434,38 @@
4414
4434
 
4415
4435
  </xsl:attribute-set> <!-- table-container-style -->
4416
4436
 
4437
+ <xsl:template name="refine_table-container-style">
4438
+ <xsl:param name="margin-side"/>
4439
+
4440
+ <xsl:if test="not(ancestor::*[local-name()='note_side'])">
4441
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4442
+ </xsl:if>
4443
+ <xsl:if test="ancestor-or-self::*[@parent-type = 'quote']">
4444
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
4445
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
4446
+ </xsl:if>
4447
+
4448
+ <!-- end table block-container attributes -->
4449
+ </xsl:template> <!-- refine_table-container-style -->
4450
+
4417
4451
  <xsl:attribute-set name="table-style">
4418
4452
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
4419
4453
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
4420
4454
 
4421
4455
  </xsl:attribute-set><!-- table-style -->
4422
4456
 
4457
+ <xsl:template name="refine_table-style">
4458
+ <xsl:param name="margin-side"/>
4459
+
4460
+ <xsl:if test="not(ancestor::*[local-name()='preface']) and not(ancestor::*[local-name()='note_side']) and not(ancestor::*[local-name() = 'annex'] and .//*[local-name() = 'xref'][@pagenumber]) and not(ancestor::*[local-name() = 'doccontrol'])">
4461
+ <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
4462
+ <xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
4463
+ </xsl:if>
4464
+
4465
+ <xsl:call-template name="setBordersTableArray"/>
4466
+
4467
+ </xsl:template> <!-- refine_table-style -->
4468
+
4423
4469
  <xsl:attribute-set name="table-name-style">
4424
4470
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4425
4471
 
@@ -4432,6 +4478,11 @@
4432
4478
 
4433
4479
  </xsl:attribute-set> <!-- table-name-style -->
4434
4480
 
4481
+ <xsl:template name="refine_table-name-style">
4482
+ <xsl:param name="continued"/>
4483
+
4484
+ </xsl:template> <!-- refine_table-name-style -->
4485
+
4435
4486
  <xsl:attribute-set name="table-row-style">
4436
4487
  <xsl:attribute name="min-height">4mm</xsl:attribute>
4437
4488
 
@@ -4442,14 +4493,30 @@
4442
4493
 
4443
4494
  </xsl:attribute-set>
4444
4495
 
4496
+ <xsl:template name="refine_table-header-row-style">
4497
+
4498
+ <xsl:call-template name="setBordersTableArray"/>
4499
+
4500
+ </xsl:template> <!-- refine_table-header-row-style -->
4501
+
4445
4502
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
4446
4503
 
4447
4504
  </xsl:attribute-set>
4448
4505
 
4506
+ <xsl:template name="refine_table-footer-row-style">
4507
+
4508
+ </xsl:template> <!-- refine_table-footer-row-style -->
4509
+
4449
4510
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
4450
4511
 
4451
4512
  </xsl:attribute-set>
4452
4513
 
4514
+ <xsl:template name="refine_table-body-row-style">
4515
+
4516
+ <xsl:call-template name="setBordersTableArray"/>
4517
+
4518
+ </xsl:template> <!-- refine_table-body-row-style -->
4519
+
4453
4520
  <xsl:attribute-set name="table-header-cell-style">
4454
4521
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4455
4522
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4464,6 +4531,29 @@
4464
4531
 
4465
4532
  </xsl:attribute-set> <!-- table-header-cell-style -->
4466
4533
 
4534
+ <xsl:template name="refine_table-header-cell-style">
4535
+
4536
+ <xsl:if test="(ancestor::*[local-name() = 'annex'] and ancestor::*[local-name() = 'table']//*[local-name() = 'xref'][@pagenumber]) or ancestor::*[local-name() = 'doccontrol']"><!-- for Annex ToC -->
4537
+ <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
4538
+ <xsl:attribute name="border-bottom">solid black 0pt</xsl:attribute>
4539
+ </xsl:if>
4540
+ <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
4541
+ <xsl:call-template name="setTextAlignment">
4542
+ <xsl:with-param name="default">left</xsl:with-param>
4543
+ </xsl:call-template>
4544
+ <xsl:attribute name="display-align">before</xsl:attribute>
4545
+ </xsl:if>
4546
+
4547
+ <xsl:call-template name="setBordersTableArray"/>
4548
+
4549
+ <xsl:if test="$lang = 'ar'">
4550
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4551
+ </xsl:if>
4552
+
4553
+ <xsl:call-template name="setTableCellAttributes"/>
4554
+
4555
+ </xsl:template> <!-- refine_table-header-cell-style -->
4556
+
4467
4557
  <xsl:attribute-set name="table-cell-style">
4468
4558
  <xsl:attribute name="display-align">center</xsl:attribute>
4469
4559
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4473,6 +4563,29 @@
4473
4563
 
4474
4564
  </xsl:attribute-set> <!-- table-cell-style -->
4475
4565
 
4566
+ <xsl:template name="refine_table-cell-style">
4567
+
4568
+ <xsl:if test="$lang = 'ar'">
4569
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4570
+ </xsl:if>
4571
+
4572
+ <xsl:variable name="rownum"><xsl:number count="*[local-name()='tr']"/></xsl:variable>
4573
+ <xsl:if test="$rownum = 1">
4574
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
4575
+ </xsl:if>
4576
+ <xsl:if test="not(ancestor::*[local-name()='tr']/following-sibling::*[local-name()='tr'])"> <!-- last row -->
4577
+ <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
4578
+ </xsl:if>
4579
+ <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
4580
+ <xsl:attribute name="display-align">before</xsl:attribute>
4581
+ </xsl:if>
4582
+
4583
+ <!-- bsi -->
4584
+
4585
+ <xsl:call-template name="setBordersTableArray"/>
4586
+
4587
+ </xsl:template> <!-- refine_table-cell-style -->
4588
+
4476
4589
  <xsl:attribute-set name="table-footer-cell-style">
4477
4590
  <xsl:attribute name="border">solid black 1pt</xsl:attribute>
4478
4591
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
@@ -4483,6 +4596,10 @@
4483
4596
 
4484
4597
  </xsl:attribute-set> <!-- table-footer-cell-style -->
4485
4598
 
4599
+ <xsl:template name="refine_table-footer-cell-style">
4600
+
4601
+ </xsl:template> <!-- refine_table-footer-cell-style -->
4602
+
4486
4603
  <xsl:attribute-set name="table-note-style">
4487
4604
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4488
4605
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -4492,6 +4609,15 @@
4492
4609
 
4493
4610
  </xsl:attribute-set><!-- table-note-style -->
4494
4611
 
4612
+ <xsl:template name="refine_table-note-style">
4613
+
4614
+ <xsl:if test="ancestor::bipm:preface">
4615
+ <xsl:attribute name="margin-top">18pt</xsl:attribute>
4616
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4617
+ </xsl:if>
4618
+
4619
+ </xsl:template> <!-- refine_table-note-style -->
4620
+
4495
4621
  <xsl:attribute-set name="table-fn-style">
4496
4622
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4497
4623
 
@@ -4553,6 +4679,10 @@
4553
4679
 
4554
4680
  </xsl:attribute-set>
4555
4681
 
4682
+ <xsl:template name="refine_dt-cell-style">
4683
+
4684
+ </xsl:template> <!-- refine_dt-cell-style -->
4685
+
4556
4686
  <xsl:attribute-set name="dt-block-style">
4557
4687
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
4558
4688
 
@@ -4560,6 +4690,10 @@
4560
4690
 
4561
4691
  </xsl:attribute-set>
4562
4692
 
4693
+ <xsl:template name="refine_dt-block-style">
4694
+
4695
+ </xsl:template> <!-- refine_dt-block-style -->
4696
+
4563
4697
  <xsl:attribute-set name="dl-name-style">
4564
4698
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4565
4699
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
@@ -4573,6 +4707,10 @@
4573
4707
 
4574
4708
  </xsl:attribute-set>
4575
4709
 
4710
+ <xsl:template name="refine_dd-cell-style">
4711
+
4712
+ </xsl:template> <!-- refine_dd-cell-style -->
4713
+
4576
4714
  <!-- ========================== -->
4577
4715
  <!-- END Definition's list styles -->
4578
4716
  <!-- ========================== -->
@@ -4586,7 +4724,6 @@
4586
4724
  </xsl:attribute-set>
4587
4725
 
4588
4726
  <xsl:attribute-set name="xref-style">
4589
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
4590
4727
 
4591
4728
  </xsl:attribute-set>
4592
4729
 
@@ -4594,6 +4731,12 @@
4594
4731
 
4595
4732
  </xsl:attribute-set>
4596
4733
 
4734
+ <xsl:template name="refine_eref-style">
4735
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
4736
+ <xsl:variable name="text" select="normalize-space()"/>
4737
+
4738
+ </xsl:template> <!-- refine_eref-style -->
4739
+
4597
4740
  <xsl:attribute-set name="note-style">
4598
4741
 
4599
4742
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
@@ -4601,6 +4744,15 @@
4601
4744
 
4602
4745
  </xsl:attribute-set>
4603
4746
 
4747
+ <xsl:template name="refine_note-style">
4748
+
4749
+ <xsl:if test="parent::*[local-name() = 'li']">
4750
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
4751
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
4752
+ </xsl:if>
4753
+
4754
+ </xsl:template>
4755
+
4604
4756
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
4605
4757
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
4606
4758
 
@@ -4608,6 +4760,10 @@
4608
4760
 
4609
4761
  </xsl:attribute-set>
4610
4762
 
4763
+ <xsl:template name="refine_note-name-style">
4764
+
4765
+ </xsl:template> <!-- refine_note-name-style -->
4766
+
4611
4767
  <xsl:attribute-set name="table-note-name-style">
4612
4768
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
4613
4769
 
@@ -4615,6 +4771,14 @@
4615
4771
 
4616
4772
  </xsl:attribute-set>
4617
4773
 
4774
+ <xsl:template name="refine_table-note-name-style">
4775
+
4776
+ <xsl:if test="ancestor::bipm:preface">
4777
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4778
+ </xsl:if>
4779
+
4780
+ </xsl:template> <!-- refine_table-note-name-style -->
4781
+
4618
4782
  <xsl:attribute-set name="note-p-style">
4619
4783
 
4620
4784
  <xsl:attribute name="text-align">justify</xsl:attribute>
@@ -4628,12 +4792,20 @@
4628
4792
 
4629
4793
  </xsl:attribute-set>
4630
4794
 
4795
+ <xsl:template name="refine_termnote-style">
4796
+
4797
+ </xsl:template> <!-- refine_termnote-style -->
4798
+
4631
4799
  <xsl:attribute-set name="termnote-name-style">
4632
4800
 
4633
4801
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
4634
4802
 
4635
4803
  </xsl:attribute-set>
4636
4804
 
4805
+ <xsl:template name="refine_termnote-name-style">
4806
+
4807
+ </xsl:template>
4808
+
4637
4809
  <xsl:attribute-set name="termnote-p-style">
4638
4810
 
4639
4811
  <xsl:attribute name="text-align">justify</xsl:attribute>
@@ -4646,6 +4818,10 @@
4646
4818
 
4647
4819
  </xsl:attribute-set>
4648
4820
 
4821
+ <xsl:template name="refine_quote-style">
4822
+
4823
+ </xsl:template>
4824
+
4649
4825
  <xsl:attribute-set name="quote-source-style">
4650
4826
  <xsl:attribute name="text-align">right</xsl:attribute>
4651
4827
 
@@ -4655,6 +4831,10 @@
4655
4831
 
4656
4832
  </xsl:attribute-set>
4657
4833
 
4834
+ <xsl:template name="refine_termsource-style">
4835
+
4836
+ </xsl:template> <!-- refine_termsource-style -->
4837
+
4658
4838
  <xsl:attribute-set name="termsource-text-style">
4659
4839
 
4660
4840
  </xsl:attribute-set>
@@ -4691,6 +4871,10 @@
4691
4871
 
4692
4872
  </xsl:attribute-set>
4693
4873
 
4874
+ <xsl:template name="refine_figure-name-style">
4875
+
4876
+ </xsl:template> <!-- refine_figure-name-style -->
4877
+
4694
4878
  <xsl:attribute-set name="figure-source-style">
4695
4879
 
4696
4880
  </xsl:attribute-set>
@@ -4709,6 +4893,10 @@
4709
4893
 
4710
4894
  </xsl:attribute-set> <!-- formula-stem-block-style -->
4711
4895
 
4896
+ <xsl:template name="refine_formula-stem-block-style">
4897
+
4898
+ </xsl:template> <!-- refine_formula-stem-block-style -->
4899
+
4712
4900
  <xsl:attribute-set name="formula-stem-number-style">
4713
4901
  <xsl:attribute name="text-align">right</xsl:attribute>
4714
4902
 
@@ -4720,6 +4908,10 @@
4720
4908
 
4721
4909
  </xsl:attribute-set>
4722
4910
 
4911
+ <xsl:template name="refine_image-style">
4912
+
4913
+ </xsl:template>
4914
+
4723
4915
  <xsl:attribute-set name="figure-pseudocode-p-style">
4724
4916
 
4725
4917
  </xsl:attribute-set>
@@ -4806,10 +4998,22 @@
4806
4998
 
4807
4999
  </xsl:attribute-set>
4808
5000
 
5001
+ <xsl:template name="refine_mathml-style">
5002
+
5003
+ <xsl:if test="ancestor::*[local-name()='table']">
5004
+ <xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
5005
+ </xsl:if>
5006
+
5007
+ </xsl:template>
5008
+
4809
5009
  <xsl:attribute-set name="list-style">
4810
5010
 
4811
5011
  </xsl:attribute-set> <!-- list-style -->
4812
5012
 
5013
+ <xsl:template name="refine_list-style">
5014
+
5015
+ </xsl:template> <!-- refine_list-style -->
5016
+
4813
5017
  <xsl:attribute-set name="list-name-style">
4814
5018
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4815
5019
 
@@ -4821,14 +5025,26 @@
4821
5025
 
4822
5026
  </xsl:attribute-set>
4823
5027
 
5028
+ <xsl:template name="refine_list-item-style">
5029
+
5030
+ </xsl:template> <!-- refine_list-item-style -->
5031
+
4824
5032
  <xsl:attribute-set name="list-item-label-style">
4825
5033
 
4826
5034
  </xsl:attribute-set>
4827
5035
 
5036
+ <xsl:template name="refine_list-item-label-style">
5037
+
5038
+ </xsl:template> <!-- refine_list-item-label-style -->
5039
+
4828
5040
  <xsl:attribute-set name="list-item-body-style">
4829
5041
 
4830
5042
  </xsl:attribute-set>
4831
5043
 
5044
+ <xsl:template name="refine_list-item-body-style">
5045
+
5046
+ </xsl:template> <!-- refine_list-item-body-style -->
5047
+
4832
5048
  <xsl:attribute-set name="toc-style">
4833
5049
  <xsl:attribute name="line-height">135%</xsl:attribute>
4834
5050
  </xsl:attribute-set>
@@ -4843,6 +5059,10 @@
4843
5059
 
4844
5060
  </xsl:attribute-set>
4845
5061
 
5062
+ <xsl:template name="refine_fn-reference-style">
5063
+
5064
+ </xsl:template> <!-- refine_fn-reference-style -->
5065
+
4846
5066
  <xsl:attribute-set name="fn-style">
4847
5067
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4848
5068
  </xsl:attribute-set>
@@ -4868,6 +5088,10 @@
4868
5088
 
4869
5089
  </xsl:attribute-set>
4870
5090
 
5091
+ <xsl:template name="refine_fn-body-style">
5092
+
5093
+ </xsl:template> <!-- refine_fn-body-style -->
5094
+
4871
5095
  <xsl:attribute-set name="fn-body-num-style">
4872
5096
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4873
5097
 
@@ -4877,6 +5101,10 @@
4877
5101
 
4878
5102
  </xsl:attribute-set> <!-- fn-body-num-style -->
4879
5103
 
5104
+ <xsl:template name="refine_fn-body-num-style">
5105
+
5106
+ </xsl:template> <!-- refine_fn-body-num-style -->
5107
+
4880
5108
  <!-- admonition -->
4881
5109
  <xsl:attribute-set name="admonition-style">
4882
5110
 
@@ -5548,15 +5776,9 @@
5548
5776
 
5549
5777
  <fo:block-container xsl:use-attribute-sets="table-container-style">
5550
5778
 
5551
- <xsl:if test="not(ancestor::*[local-name()='note_side'])">
5552
- <xsl:attribute name="font-size">10pt</xsl:attribute>
5553
- </xsl:if>
5554
- <xsl:if test="@parent-type = 'quote'">
5555
- <xsl:attribute name="font-family">Arial</xsl:attribute>
5556
- <xsl:attribute name="font-size">9pt</xsl:attribute>
5557
- </xsl:if>
5558
-
5559
- <!-- end table block-container attributes -->
5779
+ <xsl:call-template name="refine_table-container-style">
5780
+ <xsl:with-param name="margin-side" select="$margin-side"/>
5781
+ </xsl:call-template>
5560
5782
 
5561
5783
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
5562
5784
 
@@ -5583,12 +5805,9 @@
5583
5805
 
5584
5806
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
5585
5807
 
5586
- <xsl:if test="not(ancestor::*[local-name()='preface']) and not(ancestor::*[local-name()='note_side']) and not(ancestor::*[local-name() = 'annex'] and .//*[local-name() = 'xref'][@pagenumber]) and not(ancestor::*[local-name() = 'doccontrol'])">
5587
- <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
5588
- <xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
5589
- </xsl:if>
5590
-
5591
- <xsl:call-template name="setBordersTableArray"/>
5808
+ <xsl:call-template name="refine_table-style">
5809
+ <xsl:with-param name="margin-side" select="$margin-side"/>
5810
+ </xsl:call-template>
5592
5811
 
5593
5812
  </xsl:element>
5594
5813
  </xsl:variable>
@@ -5610,7 +5829,7 @@
5610
5829
  </xsl:attribute>
5611
5830
  </xsl:for-each>
5612
5831
 
5613
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
5832
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
5614
5833
  <xsl:if test="$isNoteOrFnExist = 'true'">
5615
5834
  <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
5616
5835
  </xsl:if>
@@ -5654,7 +5873,7 @@
5654
5873
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5655
5874
  </xsl:when>
5656
5875
  <xsl:otherwise>
5657
- <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5876
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'example') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'p') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
5658
5877
  </xsl:otherwise>
5659
5878
  </xsl:choose>
5660
5879
 
@@ -6143,6 +6362,8 @@
6143
6362
  <fo:table-row>
6144
6363
  <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">
6145
6364
 
6365
+ <xsl:call-template name="refine_table-header-title-style"/>
6366
+
6146
6367
  <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6147
6368
  <xsl:with-param name="continued">true</xsl:with-param>
6148
6369
  </xsl:apply-templates>
@@ -6155,6 +6376,10 @@
6155
6376
  </fo:table-row>
6156
6377
  </xsl:template> <!-- table-header-title -->
6157
6378
 
6379
+ <xsl:template name="refine_table-header-title-style">
6380
+
6381
+ </xsl:template> <!-- refine_table-header-title-style -->
6382
+
6158
6383
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
6159
6384
  <fo:table-body>
6160
6385
  <xsl:apply-templates/>
@@ -6179,7 +6404,7 @@
6179
6404
  <xsl:param name="colwidths"/>
6180
6405
  <xsl:param name="colgroup"/>
6181
6406
 
6182
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
6407
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
6183
6408
 
6184
6409
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6185
6410
 
@@ -6239,6 +6464,8 @@
6239
6464
  <fo:table-row>
6240
6465
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
6241
6466
 
6467
+ <xsl:call-template name="refine_table-footer-cell-style"/>
6468
+
6242
6469
  <xsl:call-template name="setBordersTableArray"/>
6243
6470
 
6244
6471
  <!-- fn will be processed inside 'note' processing -->
@@ -6257,8 +6484,10 @@
6257
6484
 
6258
6485
  <!-- except gb and bsi -->
6259
6486
 
6487
+ <xsl:apply-templates select="../*[local-name()='p']"/>
6260
6488
  <xsl:apply-templates select="../*[local-name()='dl']"/>
6261
6489
  <xsl:apply-templates select="../*[local-name()='note']"/>
6490
+ <xsl:apply-templates select="../*[local-name()='example']"/>
6262
6491
  <xsl:apply-templates select="../*[local-name()='source']"/>
6263
6492
 
6264
6493
  <xsl:variable name="isDisplayRowSeparator">
@@ -6267,7 +6496,7 @@
6267
6496
 
6268
6497
  <!-- horizontal row separator -->
6269
6498
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
6270
- <xsl:if test="../*[local-name()='note'] and normalize-space($table_fn_block) != ''">
6499
+ <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
6271
6500
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
6272
6501
 
6273
6502
  <xsl:call-template name="setBordersTableArray"/>
@@ -6388,7 +6617,7 @@
6388
6617
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
6389
6618
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
6390
6619
 
6391
- <xsl:call-template name="setBordersTableArray"/>
6620
+ <xsl:call-template name="refine_table-header-row-style"/>
6392
6621
 
6393
6622
  <xsl:call-template name="setTableRowAttributes"/>
6394
6623
 
@@ -6422,6 +6651,8 @@
6422
6651
  <xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
6423
6652
  <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
6424
6653
 
6654
+ <xsl:call-template name="refine_table-footer-row-style"/>
6655
+
6425
6656
  <xsl:call-template name="setTableRowAttributes"/>
6426
6657
  <xsl:apply-templates/>
6427
6658
  </fo:table-row>
@@ -6435,9 +6666,10 @@
6435
6666
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
6436
6667
  </xsl:if>
6437
6668
 
6438
- <xsl:call-template name="setBordersTableArray"/>
6669
+ <xsl:call-template name="refine_table-body-row-style"/>
6439
6670
 
6440
6671
  <xsl:call-template name="setTableRowAttributes"/>
6672
+
6441
6673
  <xsl:apply-templates/>
6442
6674
  </fo:table-row>
6443
6675
  </xsl:template>
@@ -6463,24 +6695,7 @@
6463
6695
  <xsl:with-param name="default">center</xsl:with-param>
6464
6696
  </xsl:call-template>
6465
6697
 
6466
- <xsl:if test="(ancestor::*[local-name() = 'annex'] and ancestor::*[local-name() = 'table']//*[local-name() = 'xref'][@pagenumber]) or ancestor::*[local-name() = 'doccontrol']"><!-- for Annex ToC -->
6467
- <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
6468
- <xsl:attribute name="border-bottom">solid black 0pt</xsl:attribute>
6469
- </xsl:if>
6470
- <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
6471
- <xsl:call-template name="setTextAlignment">
6472
- <xsl:with-param name="default">left</xsl:with-param>
6473
- </xsl:call-template>
6474
- <xsl:attribute name="display-align">before</xsl:attribute>
6475
- </xsl:if>
6476
-
6477
- <xsl:call-template name="setBordersTableArray"/>
6478
-
6479
- <xsl:if test="$lang = 'ar'">
6480
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6481
- </xsl:if>
6482
-
6483
- <xsl:call-template name="setTableCellAttributes"/>
6698
+ <xsl:call-template name="refine_table-header-cell-style"/>
6484
6699
 
6485
6700
  <fo:block>
6486
6701
  <xsl:apply-templates/>
@@ -6522,24 +6737,7 @@
6522
6737
  <xsl:with-param name="default">left</xsl:with-param>
6523
6738
  </xsl:call-template>
6524
6739
 
6525
- <xsl:if test="$lang = 'ar'">
6526
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
6527
- </xsl:if>
6528
-
6529
- <xsl:variable name="rownum"><xsl:number count="*[local-name()='tr']"/></xsl:variable>
6530
- <xsl:if test="$rownum = 1">
6531
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
6532
- </xsl:if>
6533
- <xsl:if test="not(ancestor::*[local-name()='tr']/following-sibling::*[local-name()='tr'])"> <!-- last row -->
6534
- <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
6535
- </xsl:if>
6536
- <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
6537
- <xsl:attribute name="display-align">before</xsl:attribute>
6538
- </xsl:if>
6539
-
6540
- <!-- bsi -->
6541
-
6542
- <xsl:call-template name="setBordersTableArray"/>
6740
+ <xsl:call-template name="refine_table-cell-style"/>
6543
6741
 
6544
6742
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
6545
6743
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
@@ -6575,21 +6773,16 @@
6575
6773
  </fo:table-cell>
6576
6774
  </xsl:template> <!-- td -->
6577
6775
 
6578
- <xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
6776
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example']" priority="2">
6579
6777
 
6580
6778
  <fo:block xsl:use-attribute-sets="table-note-style">
6581
6779
 
6582
- <xsl:if test="ancestor::bipm:preface">
6583
- <xsl:attribute name="margin-top">18pt</xsl:attribute>
6584
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6585
- </xsl:if>
6780
+ <xsl:call-template name="refine_table-note-style"/>
6586
6781
 
6587
- <!-- Table's note name (NOTE, for example) -->
6782
+ <!-- Table's note/example name (NOTE, for example) -->
6588
6783
  <fo:inline xsl:use-attribute-sets="table-note-name-style">
6589
6784
 
6590
- <xsl:if test="ancestor::bipm:preface">
6591
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
6592
- </xsl:if>
6785
+ <xsl:call-template name="refine_table-note-name-style"/>
6593
6786
 
6594
6787
  <xsl:apply-templates select="*[local-name() = 'name']"/>
6595
6788
 
@@ -6604,7 +6797,7 @@
6604
6797
 
6605
6798
  </xsl:template> <!-- table/note -->
6606
6799
 
6607
- <xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
6800
+ <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
6608
6801
  <xsl:apply-templates/>
6609
6802
  </xsl:template>
6610
6803
 
@@ -6622,6 +6815,14 @@
6622
6815
  <!-- list of footnotes to calculate actual footnotes number -->
6623
6816
  <xsl:variable name="p_fn_">
6624
6817
  <xsl:call-template name="get_fn_list"/>
6818
+ <!-- <xsl:choose>
6819
+ <xsl:when test="$namespace = 'jis'">
6820
+ <xsl:call-template name="get_fn_list_for_element"/>
6821
+ </xsl:when>
6822
+ <xsl:otherwise>
6823
+ <xsl:call-template name="get_fn_list"/>
6824
+ </xsl:otherwise>
6825
+ </xsl:choose> -->
6625
6826
  </xsl:variable>
6626
6827
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
6627
6828
 
@@ -6646,7 +6847,14 @@
6646
6847
 
6647
6848
  </xsl:variable>
6648
6849
 
6649
- <xsl:variable name="ref_id" select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
6850
+ <xsl:variable name="ref_id">
6851
+ <xsl:choose>
6852
+ <xsl:when test="normalize-space(@ref_id) != ''"><xsl:value-of select="@ref_id"/></xsl:when>
6853
+ <xsl:otherwise>
6854
+ <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
6855
+ </xsl:otherwise>
6856
+ </xsl:choose>
6857
+ </xsl:variable>
6650
6858
  <xsl:variable name="footnote_inline">
6651
6859
  <fo:inline>
6652
6860
 
@@ -6672,7 +6880,7 @@
6672
6880
  <xsl:call-template name="insert_basic_link">
6673
6881
  <xsl:with-param name="element">
6674
6882
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}">
6675
- <xsl:value-of select="$current_fn_number_text"/>
6883
+ <xsl:copy-of select="$current_fn_number_text"/>
6676
6884
  </fo:basic-link>
6677
6885
  </xsl:with-param>
6678
6886
  </xsl:call-template>
@@ -6692,8 +6900,12 @@
6692
6900
 
6693
6901
  <fo:block xsl:use-attribute-sets="fn-body-style">
6694
6902
 
6903
+ <xsl:call-template name="refine_fn-body-style"/>
6904
+
6695
6905
  <fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style">
6696
6906
 
6907
+ <xsl:call-template name="refine_fn-body-num-style"/>
6908
+
6697
6909
  <xsl:value-of select="$current_fn_number_text"/>
6698
6910
  </fo:inline>
6699
6911
  <xsl:apply-templates/>
@@ -6745,6 +6957,28 @@
6745
6957
  </xsl:choose>
6746
6958
  </xsl:template>
6747
6959
 
6960
+ <xsl:template name="get_fn_list_for_element">
6961
+ <xsl:choose>
6962
+ <xsl:when test="@current_fn_number"> <!-- footnote reference number calculated already -->
6963
+ <fn gen_id="{generate-id(.)}">
6964
+ <xsl:copy-of select="@*"/>
6965
+ <xsl:copy-of select="node()"/>
6966
+ </fn>
6967
+ </xsl:when>
6968
+ <xsl:otherwise>
6969
+ <xsl:for-each select="ancestor::*[local-name() = 'ul' or local-name() = 'ol'][1]">
6970
+ <xsl:variable name="element_id" select="@id"/>
6971
+ <xsl:for-each select=".//*[local-name() = 'fn'][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
6972
+ <!-- copy unique fn -->
6973
+ <fn gen_id="{generate-id(.)}">
6974
+ <xsl:copy-of select="@*"/>
6975
+ <xsl:copy-of select="node()"/>
6976
+ </fn>
6977
+ </xsl:for-each>
6978
+ </xsl:for-each>
6979
+ </xsl:otherwise>
6980
+ </xsl:choose>
6981
+ </xsl:template>
6748
6982
  <!-- ============================ -->
6749
6983
  <!-- table's footnotes rendering -->
6750
6984
  <!-- ============================ -->
@@ -6923,6 +7157,8 @@
6923
7157
  <xsl:template match="*[local-name()='fn']">
6924
7158
  <fo:inline xsl:use-attribute-sets="fn-reference-style">
6925
7159
 
7160
+ <xsl:call-template name="refine_fn-reference-style"/>
7161
+
6926
7162
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
6927
7163
 
6928
7164
  <fo:inline font-style="normal"> (</fo:inline>
@@ -7027,6 +7263,8 @@
7027
7263
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
7028
7264
  <fo:block margin-bottom="12pt" text-align="left">
7029
7265
 
7266
+ <xsl:call-template name="refine_dl_formula_where_style"/>
7267
+
7030
7268
  <!-- <xsl:variable name="title-where">
7031
7269
  <xsl:call-template name="getLocalizedString">
7032
7270
  <xsl:with-param name="key">where</xsl:with-param>
@@ -7040,6 +7278,8 @@
7040
7278
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
7041
7279
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
7042
7280
 
7281
+ <xsl:call-template name="refine_figure_key_style"/>
7282
+
7043
7283
  <xsl:variable name="title-key">
7044
7284
  <xsl:call-template name="getLocalizedString">
7045
7285
  <xsl:with-param name="key">key</xsl:with-param>
@@ -7054,12 +7294,16 @@
7054
7294
  <xsl:if test="$onlyOneComponent = 'false'">
7055
7295
  <fo:block>
7056
7296
 
7297
+ <xsl:call-template name="refine_multicomponent_style"/>
7298
+
7057
7299
  <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
7058
7300
  <xsl:attribute name="margin-top">0</xsl:attribute>
7059
7301
  </xsl:if>
7060
7302
 
7061
7303
  <fo:block>
7062
7304
 
7305
+ <xsl:call-template name="refine_multicomponent_block_style"/>
7306
+
7063
7307
  <xsl:apply-templates select="*[local-name() = 'name']">
7064
7308
  <xsl:with-param name="process">true</xsl:with-param>
7065
7309
  </xsl:apply-templates>
@@ -7217,6 +7461,24 @@
7217
7461
 
7218
7462
  </xsl:template> <!-- END: dl -->
7219
7463
 
7464
+ <xsl:template name="refine_dl_formula_where_style">
7465
+
7466
+ </xsl:template> <!-- refine_dl_formula_where_style -->
7467
+
7468
+ <xsl:template name="refine_figure_key_style">
7469
+
7470
+ </xsl:template> <!-- refine_figure_key_style -->
7471
+
7472
+ <xsl:template name="refine_multicomponent_style">
7473
+ <xsl:variable name="parent" select="local-name(..)"/>
7474
+
7475
+ </xsl:template> <!-- refine_multicomponent_style -->
7476
+
7477
+ <xsl:template name="refine_multicomponent_block_style">
7478
+ <xsl:variable name="parent" select="local-name(..)"/>
7479
+
7480
+ </xsl:template> <!-- refine_multicomponent_block_style -->
7481
+
7220
7482
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
7221
7483
  <xsl:template match="*[local-name() = 'formula']/*[local-name() = 'p' and @keep-with-next = 'true' and following-sibling::*[1][local-name() = 'dl']]"/>
7222
7484
 
@@ -7436,6 +7698,8 @@
7436
7698
 
7437
7699
  </xsl:if>
7438
7700
 
7701
+ <xsl:call-template name="refine_dt-cell-style"/>
7702
+
7439
7703
  <fo:block xsl:use-attribute-sets="dt-block-style">
7440
7704
  <xsl:copy-of select="@id"/>
7441
7705
 
@@ -7443,6 +7707,8 @@
7443
7707
  <xsl:attribute name="margin-top">0</xsl:attribute>
7444
7708
  </xsl:if>
7445
7709
 
7710
+ <xsl:call-template name="refine_dt-block-style"/>
7711
+
7446
7712
  <xsl:apply-templates>
7447
7713
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
7448
7714
  </xsl:apply-templates>
@@ -7462,6 +7728,8 @@
7462
7728
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7463
7729
  </xsl:if>
7464
7730
 
7731
+ <xsl:call-template name="refine_dd-cell-style"/>
7732
+
7465
7733
  <fo:block>
7466
7734
 
7467
7735
  <xsl:if test="$isGenerateTableIF = 'true'">
@@ -7604,20 +7872,31 @@
7604
7872
  <!-- ========================= -->
7605
7873
  <xsl:template match="*[local-name()='em']">
7606
7874
  <fo:inline font-style="italic">
7875
+ <xsl:call-template name="refine_italic_style"/>
7607
7876
  <xsl:apply-templates/>
7608
7877
  </fo:inline>
7609
7878
  </xsl:template>
7610
7879
 
7880
+ <xsl:template name="refine_italic_style">
7881
+
7882
+ </xsl:template>
7883
+
7611
7884
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
7612
7885
  <xsl:param name="split_keep-within-line"/>
7613
7886
  <fo:inline font-weight="bold">
7614
7887
 
7888
+ <xsl:call-template name="refine_strong_style"/>
7889
+
7615
7890
  <xsl:apply-templates>
7616
7891
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
7617
7892
  </xsl:apply-templates>
7618
7893
  </fo:inline>
7619
7894
  </xsl:template>
7620
7895
 
7896
+ <xsl:template name="refine_strong_style">
7897
+
7898
+ </xsl:template>
7899
+
7621
7900
  <xsl:template match="*[local-name()='padding']">
7622
7901
  <fo:inline padding-right="{@value}"> </fo:inline>
7623
7902
  </xsl:template>
@@ -8084,7 +8363,10 @@
8084
8363
  </xsl:choose>
8085
8364
  </xsl:variable>
8086
8365
 
8087
- <xsl:value-of select="$text9"/>
8366
+ <!-- replace sequence #x200B and space TO space -->
8367
+ <xsl:variable name="text10" select="java:replaceAll(java:java.lang.String.new($text9), '\u200b ', ' ')"/>
8368
+
8369
+ <xsl:value-of select="$text10"/>
8088
8370
  </xsl:template>
8089
8371
 
8090
8372
  <xsl:template name="add-zero-spaces-link-java">
@@ -8759,9 +9041,10 @@
8759
9041
 
8760
9042
  <fo:inline xsl:use-attribute-sets="mathml-style">
8761
9043
 
8762
- <xsl:if test="ancestor::*[local-name()='table']">
8763
- <xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
8764
- </xsl:if>
9044
+ <!-- DEBUG -->
9045
+ <!-- <xsl:copy-of select="ancestor::*[local-name() = 'stem']/@font-family"/> -->
9046
+
9047
+ <xsl:call-template name="refine_mathml-style"/>
8765
9048
 
8766
9049
  <xsl:if test="$isGenerateTableIF = 'true' and ancestor::*[local-name() = 'td' or local-name() = 'th' or local-name() = 'dl'] and not(following-sibling::node()[not(self::comment())][normalize-space() != ''])"> <!-- math in table cell, and math is last element -->
8767
9050
  <!-- <xsl:attribute name="padding-right">1mm</xsl:attribute> -->
@@ -8892,12 +9175,7 @@
8892
9175
 
8893
9176
  <fo:instream-foreign-object fox:alt-text="Math">
8894
9177
 
8895
- <xsl:if test="local-name(../..) = 'formula'">
8896
- <xsl:attribute name="width">95%</xsl:attribute>
8897
- <xsl:attribute name="content-height">100%</xsl:attribute>
8898
- <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
8899
- <xsl:attribute name="scaling">uniform</xsl:attribute>
8900
- </xsl:if>
9178
+ <xsl:call-template name="refine_mathml_insteam_object_style"/>
8901
9179
 
8902
9180
  <!-- put MathML in Actual Text -->
8903
9181
  <!-- DEBUG: mathml_content=<xsl:value-of select="$mathml_content"/> -->
@@ -8919,6 +9197,17 @@
8919
9197
  </fo:instream-foreign-object>
8920
9198
  </xsl:template>
8921
9199
 
9200
+ <xsl:template name="refine_mathml_insteam_object_style">
9201
+
9202
+ <xsl:if test="local-name(../..) = 'formula'">
9203
+ <xsl:attribute name="width">95%</xsl:attribute>
9204
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9205
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9206
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9207
+ </xsl:if>
9208
+
9209
+ </xsl:template> <!-- refine_mathml_insteam_object_style -->
9210
+
8922
9211
  <xsl:template match="mathml:*" mode="mathml_actual_text">
8923
9212
  <!-- <xsl:text>a+b</xsl:text> -->
8924
9213
  <xsl:text>&lt;</xsl:text>
@@ -9063,9 +9352,7 @@
9063
9352
  <xsl:template match="*[local-name() = 'stem'][@type = 'AsciiMath'][count(*) = 0]/text() | *[local-name() = 'stem'][@type = 'AsciiMath'][*[local-name() = 'asciimath']]" priority="3">
9064
9353
  <fo:inline xsl:use-attribute-sets="mathml-style">
9065
9354
 
9066
- <xsl:if test="ancestor::*[local-name()='table']">
9067
- <xsl:attribute name="font-size">95%</xsl:attribute> <!-- base font in table is 10pt -->
9068
- </xsl:if>
9355
+ <xsl:call-template name="refine_mathml-style"/>
9069
9356
 
9070
9357
  <xsl:choose>
9071
9358
  <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
@@ -9111,6 +9398,8 @@
9111
9398
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9112
9399
  </xsl:if>
9113
9400
 
9401
+ <xsl:call-template name="refine_link-style"/>
9402
+
9114
9403
  <xsl:choose>
9115
9404
  <xsl:when test="$target_text = ''">
9116
9405
  <xsl:apply-templates/>
@@ -9198,6 +9487,9 @@
9198
9487
  <xsl:call-template name="insert_basic_link">
9199
9488
  <xsl:with-param name="element">
9200
9489
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
9490
+ <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
9491
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9492
+ </xsl:if>
9201
9493
  <xsl:if test="parent::*[local-name() = 'add']">
9202
9494
  <xsl:call-template name="append_add-style"/>
9203
9495
  </xsl:if>
@@ -9259,6 +9551,8 @@
9259
9551
  <fo:table-cell display-align="center">
9260
9552
  <fo:block xsl:use-attribute-sets="formula-stem-block-style">
9261
9553
 
9554
+ <xsl:call-template name="refine_formula-stem-block-style"/>
9555
+
9262
9556
  <xsl:apply-templates/>
9263
9557
  </fo:block>
9264
9558
  </fo:table-cell>
@@ -9300,24 +9594,18 @@
9300
9594
 
9301
9595
  <xsl:call-template name="setBlockSpanAll"/>
9302
9596
 
9303
- <xsl:if test="parent::*[local-name() = 'li']">
9304
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
9305
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
9306
- </xsl:if>
9597
+ <xsl:call-template name="refine_note-style"/>
9307
9598
 
9308
9599
  <fo:block-container margin-left="0mm" margin-right="0mm">
9309
9600
 
9310
9601
  <fo:block>
9311
9602
 
9312
- <xsl:if test="@parent-type = 'quote'">
9313
- <xsl:attribute name="font-family">Arial</xsl:attribute>
9314
- <xsl:attribute name="font-size">9pt</xsl:attribute>
9315
- <xsl:attribute name="line-height">130%</xsl:attribute>
9316
- <xsl:attribute name="text-align">justify</xsl:attribute>
9317
- </xsl:if>
9603
+ <xsl:call-template name="refine_note_block_style"/>
9318
9604
 
9319
9605
  <fo:inline xsl:use-attribute-sets="note-name-style">
9320
9606
 
9607
+ <xsl:call-template name="refine_note-name-style"/>
9608
+
9321
9609
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9322
9610
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9323
9611
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -9343,6 +9631,17 @@
9343
9631
 
9344
9632
  </xsl:template>
9345
9633
 
9634
+ <xsl:template name="refine_note_block_style">
9635
+
9636
+ <xsl:if test="@parent-type = 'quote'">
9637
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
9638
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
9639
+ <xsl:attribute name="line-height">130%</xsl:attribute>
9640
+ <xsl:attribute name="text-align">justify</xsl:attribute>
9641
+ </xsl:if>
9642
+
9643
+ </xsl:template>
9644
+
9346
9645
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
9347
9646
  <xsl:variable name="num"><xsl:number/></xsl:variable>
9348
9647
  <xsl:choose>
@@ -9364,12 +9663,16 @@
9364
9663
 
9365
9664
  <xsl:call-template name="setBlockSpanAll"/>
9366
9665
 
9666
+ <xsl:call-template name="refine_termnote-style"/>
9667
+
9367
9668
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
9368
9669
 
9369
9670
  <xsl:if test="not(*[local-name() = 'name']/following-sibling::node()[1][self::text()][normalize-space()=''])">
9370
9671
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
9371
9672
  </xsl:if>
9372
9673
 
9674
+ <xsl:call-template name="refine_termnote-name-style"/>
9675
+
9373
9676
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9374
9677
  <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9375
9678
  <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
@@ -9557,6 +9860,8 @@
9557
9860
  <xsl:otherwise>
9558
9861
  <fo:block xsl:use-attribute-sets="image-style">
9559
9862
 
9863
+ <xsl:call-template name="refine_image-style"/>
9864
+
9560
9865
  <xsl:variable name="src">
9561
9866
  <xsl:call-template name="image_src"/>
9562
9867
  </xsl:variable>
@@ -10420,6 +10725,8 @@
10420
10725
  <xsl:if test="normalize-space() != ''">
10421
10726
  <fo:block xsl:use-attribute-sets="figure-name-style">
10422
10727
 
10728
+ <xsl:call-template name="refine_figure-name-style"/>
10729
+
10423
10730
  <xsl:apply-templates/>
10424
10731
  </fo:block>
10425
10732
  </xsl:if>
@@ -10683,6 +10990,8 @@
10683
10990
  </xsl:attribute>
10684
10991
  </xsl:for-each>
10685
10992
 
10993
+ <xsl:call-template name="refine_sourcecode-style"/>
10994
+
10686
10995
  <!-- remove margin between rows in the table with sourcecode line numbers -->
10687
10996
  <xsl:if test="ancestor::*[local-name() = 'sourcecode'][@linenums = 'true'] and ancestor::*[local-name() = 'tr'][1]/following-sibling::*[local-name() = 'tr']">
10688
10997
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -11387,6 +11696,8 @@
11387
11696
 
11388
11697
  <xsl:call-template name="setBlockSpanAll"/>
11389
11698
 
11699
+ <xsl:call-template name="refine_example-style"/>
11700
+
11390
11701
  <xsl:variable name="fo_element">
11391
11702
  <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
11392
11703
  block
@@ -11497,6 +11808,12 @@
11497
11808
 
11498
11809
  </xsl:template>
11499
11810
 
11811
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name']">
11812
+ <fo:inline xsl:use-attribute-sets="example-name-style">
11813
+ <xsl:apply-templates/>
11814
+ </fo:inline>
11815
+ </xsl:template>
11816
+
11500
11817
  <xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
11501
11818
  <xsl:param name="fo_element">block</xsl:param>
11502
11819
 
@@ -11514,6 +11831,8 @@
11514
11831
  </xsl:if>
11515
11832
  <fo:block xsl:use-attribute-sets="example-p-style">
11516
11833
 
11834
+ <xsl:call-template name="refine_example-p-style"/>
11835
+
11517
11836
  <xsl:apply-templates/>
11518
11837
  </fo:block>
11519
11838
  </fo:block-container>
@@ -11530,6 +11849,7 @@
11530
11849
  </xsl:otherwise>
11531
11850
  </xsl:choose>
11532
11851
  </xsl:template> <!-- example/p -->
11852
+
11533
11853
  <!-- ====== -->
11534
11854
  <!-- ====== -->
11535
11855
 
@@ -11541,6 +11861,8 @@
11541
11861
  <xsl:template match="*[local-name() = 'termsource']" name="termsource">
11542
11862
  <fo:block xsl:use-attribute-sets="termsource-style">
11543
11863
 
11864
+ <xsl:call-template name="refine_termsource-style"/>
11865
+
11544
11866
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
11545
11867
  <xsl:variable name="termsource_text">
11546
11868
  <xsl:apply-templates/>
@@ -11656,6 +11978,8 @@
11656
11978
  <fo:block-container margin-left="0mm">
11657
11979
  <fo:block-container xsl:use-attribute-sets="quote-style">
11658
11980
 
11981
+ <xsl:call-template name="refine_quote-style"/>
11982
+
11659
11983
  <fo:block-container margin-left="0mm" margin-right="0mm">
11660
11984
  <fo:block role="BlockQuote">
11661
11985
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
@@ -11730,8 +12054,7 @@
11730
12054
 
11731
12055
  </xsl:if>
11732
12056
 
11733
- <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
11734
- <xsl:variable name="text" select="normalize-space()"/>
12057
+ <xsl:call-template name="refine_eref-style"/>
11735
12058
 
11736
12059
  <xsl:call-template name="insert_basic_link">
11737
12060
  <xsl:with-param name="element">
@@ -11741,14 +12064,7 @@
11741
12064
  </xsl:if>
11742
12065
  <xsl:if test="@type = 'inline'">
11743
12066
 
11744
- <xsl:attribute name="color">blue</xsl:attribute>
11745
- <xsl:if test="not(parent::*[local-name() = 'title'])">
11746
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
11747
- </xsl:if>
11748
- <xsl:if test="parent::*[local-name() = 'title']">
11749
- <xsl:attribute name="color">inherit</xsl:attribute>
11750
- <xsl:attribute name="font-weight">normal</xsl:attribute>
11751
- </xsl:if>
12067
+ <xsl:call-template name="refine_basic_link_style"/>
11752
12068
 
11753
12069
  </xsl:if>
11754
12070
 
@@ -11782,6 +12098,20 @@
11782
12098
  </xsl:otherwise>
11783
12099
  </xsl:choose>
11784
12100
  </xsl:template>
12101
+
12102
+ <xsl:template name="refine_basic_link_style">
12103
+
12104
+ <xsl:attribute name="color">blue</xsl:attribute>
12105
+ <xsl:if test="not(parent::*[local-name() = 'title'])">
12106
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
12107
+ </xsl:if>
12108
+ <xsl:if test="parent::*[local-name() = 'title']">
12109
+ <xsl:attribute name="color">inherit</xsl:attribute>
12110
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
12111
+ </xsl:if>
12112
+
12113
+ </xsl:template> <!-- refine_basic_link_style -->
12114
+
11785
12115
  <!-- ====== -->
11786
12116
  <!-- END eref -->
11787
12117
  <!-- ====== -->
@@ -11924,11 +12254,17 @@
11924
12254
  <fo:block>
11925
12255
  <xsl:call-template name="setId"/>
11926
12256
 
12257
+ <xsl:call-template name="sections_element_style"/>
12258
+
11927
12259
  <xsl:apply-templates/>
11928
12260
  </fo:block>
11929
12261
 
11930
12262
  </xsl:template>
11931
12263
 
12264
+ <xsl:template name="sections_element_style">
12265
+
12266
+ </xsl:template> <!-- sections_element_style -->
12267
+
11932
12268
  <xsl:template match="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*" priority="2"> <!-- /*/*[local-name() = 'preface']/* -->
11933
12269
  <fo:block break-after="page"/>
11934
12270
  <fo:block>
@@ -11943,12 +12279,18 @@
11943
12279
 
11944
12280
  <xsl:call-template name="setBlockSpanAll"/>
11945
12281
 
11946
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
12282
+ <xsl:call-template name="refine_clause_style"/>
11947
12283
 
11948
12284
  <xsl:apply-templates/>
11949
12285
  </fo:block>
11950
12286
  </xsl:template>
11951
12287
 
12288
+ <xsl:template name="refine_clause_style">
12289
+
12290
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
12291
+
12292
+ </xsl:template> <!-- refine_clause_style -->
12293
+
11952
12294
  <xsl:template match="*[local-name() = 'definitions']">
11953
12295
  <fo:block id="{@id}">
11954
12296
  <xsl:apply-templates/>
@@ -11961,10 +12303,16 @@
11961
12303
 
11962
12304
  <xsl:call-template name="setBlockSpanAll"/>
11963
12305
 
12306
+ <xsl:call-template name="refine_annex_style"/>
12307
+
11964
12308
  </fo:block>
11965
12309
  <xsl:apply-templates/>
11966
12310
  </xsl:template>
11967
12311
 
12312
+ <xsl:template name="refine_annex_style">
12313
+
12314
+ </xsl:template>
12315
+
11968
12316
  <xsl:template match="*[local-name() = 'review']"> <!-- 'review' will be processed in mn2pdf/review.xsl -->
11969
12317
  <!-- comment 2019-11-29 -->
11970
12318
  <!-- <fo:block font-weight="bold">Review:</fo:block>
@@ -12043,6 +12391,9 @@
12043
12391
  <xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
12044
12392
  </xsl:choose>
12045
12393
  </xsl:when>
12394
+ <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
12395
+ <xsl:value-of select="@label"/>
12396
+ </xsl:when>
12046
12397
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
12047
12398
 
12048
12399
  <!-- Example: for BSI <?list-start 2?> -->
@@ -12100,10 +12451,10 @@
12100
12451
  <xsl:when test="$type = 'arabic'">
12101
12452
  1.
12102
12453
  </xsl:when>
12103
- <xsl:when test="$type = 'alphabet'">
12454
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
12104
12455
  a)
12105
12456
  </xsl:when>
12106
- <xsl:when test="$type = 'alphabet_upper'">
12457
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
12107
12458
  A.
12108
12459
  </xsl:when>
12109
12460
  <xsl:when test="$type = 'roman'">
@@ -12131,7 +12482,7 @@
12131
12482
  </xsl:choose>
12132
12483
  </xsl:attribute>
12133
12484
 
12134
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
12485
+ <xsl:call-template name="refine_list_container_style"/>
12135
12486
 
12136
12487
  <fo:block-container margin-left="0mm">
12137
12488
  <fo:block>
@@ -12150,6 +12501,12 @@
12150
12501
  </xsl:choose>
12151
12502
  </xsl:template>
12152
12503
 
12504
+ <xsl:template name="refine_list_container_style">
12505
+
12506
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
12507
+
12508
+ </xsl:template> <!-- refine_list_container_style -->
12509
+
12153
12510
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
12154
12511
 
12155
12512
  <xsl:apply-templates select="*[local-name() = 'name']">
@@ -12160,7 +12517,7 @@
12160
12517
 
12161
12518
  <xsl:variable name="provisional_distance_between_starts_">
12162
12519
  <attributes xsl:use-attribute-sets="list-style">
12163
-
12520
+ <xsl:call-template name="refine_list-style_provisional-distance-between-starts"/>
12164
12521
  </attributes>
12165
12522
  </xsl:variable>
12166
12523
  <xsl:variable name="provisional_distance_between_starts" select="normalize-space(xalan:nodeset($provisional_distance_between_starts_)/attributes/@provisional-distance-between-starts)"/>
@@ -12196,6 +12553,8 @@
12196
12553
  <addon><xsl:value-of select="$addon"/></addon> -->
12197
12554
  </xsl:if>
12198
12555
 
12556
+ <xsl:call-template name="refine_list-style"/>
12557
+
12199
12558
  <xsl:if test="*[local-name() = 'name']">
12200
12559
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
12201
12560
  </xsl:if>
@@ -12208,6 +12567,10 @@
12208
12567
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
12209
12568
  </xsl:template>
12210
12569
 
12570
+ <xsl:template name="refine_list-style_provisional-distance-between-starts">
12571
+
12572
+ </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
12573
+
12211
12574
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
12212
12575
  <xsl:param name="process">false</xsl:param>
12213
12576
  <xsl:if test="$process = 'true'">
@@ -12221,20 +12584,27 @@
12221
12584
  <fo:list-item xsl:use-attribute-sets="list-item-style">
12222
12585
  <xsl:copy-of select="@id"/>
12223
12586
 
12587
+ <xsl:call-template name="refine_list-item-style"/>
12588
+
12224
12589
  <fo:list-item-label end-indent="label-end()">
12225
12590
  <fo:block xsl:use-attribute-sets="list-item-label-style">
12226
12591
 
12592
+ <xsl:call-template name="refine_list-item-label-style"/>
12593
+
12227
12594
  <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
12228
12595
  <xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
12229
12596
  <xsl:call-template name="append_add-style"/>
12230
12597
  </xsl:if>
12231
12598
 
12232
12599
  <xsl:call-template name="getListItemFormat"/>
12600
+
12233
12601
  </fo:block>
12234
12602
  </fo:list-item-label>
12235
12603
  <fo:list-item-body start-indent="body-start()" xsl:use-attribute-sets="list-item-body-style">
12236
12604
  <fo:block>
12237
12605
 
12606
+ <xsl:call-template name="refine_list-item-body-style"/>
12607
+
12238
12608
  <xsl:apply-templates/>
12239
12609
 
12240
12610
  <!-- <xsl:apply-templates select="node()[not(local-name() = 'note')]" />
@@ -12552,6 +12922,7 @@
12552
12922
 
12553
12923
  <fo:block id="{@id}">
12554
12924
  <xsl:apply-templates/>
12925
+
12555
12926
  </fo:block>
12556
12927
  </xsl:template>
12557
12928
 
@@ -12571,6 +12942,7 @@
12571
12942
 
12572
12943
  <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
12573
12944
  <xsl:apply-templates/>
12945
+
12574
12946
  </fo:block>
12575
12947
 
12576
12948
  </xsl:template> <!-- references -->
@@ -13147,6 +13519,9 @@
13147
13519
  </xsl:copy>
13148
13520
  </xsl:template>
13149
13521
 
13522
+ <!-- prevent empty thead processing in XSL-FO, remove it -->
13523
+ <xsl:template match="*[local-name() = 'table']/*[local-name() = 'thead'][count(*) = 0]" mode="update_xml_step1"/>
13524
+
13150
13525
  <xsl:template name="add_id">
13151
13526
  <xsl:if test="not(@id)">
13152
13527
  <!-- add @id - first element with @id plus '_element_name' -->
@@ -13431,6 +13806,14 @@
13431
13806
  <xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" mode="linear_xml" name="linear_xml_fn">
13432
13807
  <xsl:variable name="p_fn_">
13433
13808
  <xsl:call-template name="get_fn_list"/>
13809
+ <!-- <xsl:choose>
13810
+ <xsl:when test="$namespace = 'jis'">
13811
+ <xsl:call-template name="get_fn_list_for_element"/>
13812
+ </xsl:when>
13813
+ <xsl:otherwise>
13814
+ <xsl:call-template name="get_fn_list"/>
13815
+ </xsl:otherwise>
13816
+ </xsl:choose> -->
13434
13817
  </xsl:variable>
13435
13818
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
13436
13819
  <xsl:variable name="gen_id" select="generate-id(.)"/>
@@ -13445,8 +13828,14 @@
13445
13828
  <xsl:attribute name="current_fn_number">
13446
13829
  <xsl:value-of select="$current_fn_number"/>
13447
13830
  </xsl:attribute>
13831
+ <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13448
13832
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
13449
- <xsl:value-of select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
13833
+
13834
+ <xsl:value-of select="$skip_footnote_body_"/>
13835
+
13836
+ </xsl:attribute>
13837
+ <xsl:attribute name="ref_id">
13838
+ <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
13450
13839
  </xsl:attribute>
13451
13840
  <xsl:apply-templates select="node()" mode="linear_xml"/>
13452
13841
  </xsl:copy>