metanorma-bipm 1.2.4 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -962,8 +962,11 @@
962
962
  <xsl:template name="setListItemLabel">
963
963
  <xsl:attribute name="label">
964
964
  <xsl:choose>
965
- <xsl:when test="local-name(..) = 'ul' and ../ancestor::bipm:ul">−</xsl:when> <!-- &#x2212; - minus sign. &#x2014; - dash -->
966
- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> <!-- &#x2014; dash -->
965
+ <xsl:when test="local-name(..) = 'ul'">
966
+ <xsl:call-template name="setULLabel"/>
967
+ </xsl:when>
968
+ <!-- <xsl:when test="local-name(..) = 'ul' and ../ancestor::bipm:ul">&#x2212;</xsl:when> --> <!-- &#x2212; - minus sign. &#x2014; - dash -->
969
+ <!-- <xsl:when test="local-name(..) = 'ul'">•</xsl:when> --> <!-- &#x2014; dash -->
967
970
  <xsl:otherwise> <!-- for ordered lists -->
968
971
  <xsl:variable name="start_value">
969
972
  <xsl:choose>
@@ -1255,9 +1258,6 @@
1255
1258
 
1256
1259
  <xsl:variable name="title-toc">
1257
1260
  <fo:inline>
1258
- <!-- <xsl:call-template name="getTitle">
1259
- <xsl:with-param name="name" select="'title-toc'"/>
1260
- </xsl:call-template> -->
1261
1261
  <xsl:call-template name="getLocalizedString">
1262
1262
  <xsl:with-param name="key">table_of_contents</xsl:with-param>
1263
1263
  </xsl:call-template>
@@ -1429,7 +1429,12 @@
1429
1429
  <xsl:if test="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']">
1430
1430
  <fo:block role="H2">
1431
1431
  <xsl:if test="$part_num != ''">
1432
- <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang=$curr_lang]),'#',$part_num)"/>
1432
+ <xsl:call-template name="getLocalizedString">
1433
+ <xsl:with-param name="key">Part.sg</xsl:with-param>
1434
+ <xsl:with-param name="lang" select="$curr_lang"/>
1435
+ </xsl:call-template>
1436
+ <xsl:text> </xsl:text>
1437
+ <xsl:value-of select="$part_num"/>
1433
1438
  </xsl:if>
1434
1439
  <xsl:text>: </xsl:text>
1435
1440
  <xsl:apply-templates select="/bipm:bipm-standard/bipm:bibdata/bipm:title[@language = $curr_lang and @type = 'part']" mode="title"/>
@@ -1754,9 +1759,13 @@
1754
1759
  <xsl:if test="$part_num != ''">
1755
1760
  <fo:block font-size="{$space-factor * 30.4}pt"> </fo:block>
1756
1761
  <!-- Part -->
1757
- <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part_num)"/></fo:block>
1762
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-normal}">
1763
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='fr']),'#',$part_num)"/>
1764
+ </fo:block>
1758
1765
  <!-- Partie -->
1759
- <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}"><xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part_num)"/></fo:block>
1766
+ <fo:block font-size="{$font-size-number-factor * 17}pt" font-weight="{$weight-bold}">
1767
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($titles/title-part[@lang='en']),'#',$part_num)"/>
1768
+ </fo:block>
1760
1769
  </xsl:if>
1761
1770
 
1762
1771
  <fo:block font-size="{$font-size-factor * 30.4}pt">
@@ -2167,9 +2176,6 @@
2167
2176
  <!-- ============================= -->
2168
2177
  <!-- CONTENTS -->
2169
2178
  <!-- ============================= -->
2170
- <xsl:template match="node()" mode="contents">
2171
- <xsl:apply-templates mode="contents"/>
2172
- </xsl:template>
2173
2179
 
2174
2180
  <!-- element with title -->
2175
2181
  <xsl:template match="*[bipm:title]" mode="contents">
@@ -2418,7 +2424,7 @@
2418
2424
  <!-- ====== -->
2419
2425
 
2420
2426
 
2421
- <xsl:template match="bipm:title" name="clause_title">
2427
+ <xsl:template match="bipm:title" name="title">
2422
2428
 
2423
2429
  <xsl:variable name="level">
2424
2430
  <xsl:call-template name="getLevel"/>
@@ -3290,8 +3296,8 @@
3290
3296
  <fo:list-item-label><fo:block/></fo:list-item-label>
3291
3297
  <fo:list-item-body>
3292
3298
  <fo:block>
3293
- <xsl:apply-templates select="bipm:name" mode="presentation"/>
3294
- <xsl:apply-templates/>
3299
+ <xsl:apply-templates select="bipm:name"/>
3300
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3295
3301
  </fo:block>
3296
3302
  </fo:list-item-body>
3297
3303
  </fo:list-item>
@@ -3313,7 +3319,7 @@
3313
3319
  </fo:table-cell>
3314
3320
  <fo:table-cell display-align="center">
3315
3321
  <fo:block text-align="right">
3316
- <xsl:apply-templates select="../bipm:name" mode="presentation"/>
3322
+ <xsl:apply-templates select="../bipm:name" mode="formula_number"/>
3317
3323
  </fo:block>
3318
3324
  </fo:table-cell>
3319
3325
  </fo:table-row>
@@ -3337,11 +3343,13 @@
3337
3343
  <fo:table-body>
3338
3344
  <fo:table-row>
3339
3345
  <fo:table-cell>
3340
- <fo:block><xsl:apply-templates select="*[local-name()='name']" mode="presentation"/></fo:block>
3346
+ <fo:block>
3347
+ <xsl:apply-templates select="*[local-name()='name']"/>
3348
+ </fo:block>
3341
3349
  </fo:table-cell>
3342
3350
  <fo:table-cell>
3343
3351
  <fo:block>
3344
- <xsl:apply-templates/>
3352
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
3345
3353
  </fo:block>
3346
3354
  </fo:table-cell>
3347
3355
  </fo:table-row>
@@ -3359,103 +3367,16 @@
3359
3367
  </xsl:variable>
3360
3368
  <fo:inline role="H{$level}" font-weight="bold">
3361
3369
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
3362
- <xsl:apply-templates select="ancestor::bipm:term[1]/bipm:name" mode="presentation"/>
3370
+ <xsl:apply-templates select="ancestor::bipm:term[1]/bipm:name"/>
3363
3371
  </fo:inline>
3364
3372
  </xsl:if>
3365
3373
  <xsl:apply-templates/>
3366
3374
  </fo:block>
3367
3375
  </xsl:template>
3368
3376
 
3369
- <xsl:template match="bipm:bibitem">
3370
- <fo:block id="{@id}" margin-bottom="12pt" start-indent="25mm" text-indent="-25mm" line-height="115%">
3371
- <xsl:if test=".//bipm:fn">
3372
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3373
- </xsl:if>
3374
- <xsl:call-template name="processBibitem"/>
3375
- <!-- <xsl:apply-templates /> -->
3376
- </fo:block>
3377
- </xsl:template>
3378
-
3379
- <xsl:template match="bipm:bibitem/bipm:note" priority="2">
3380
- <fo:footnote>
3381
- <xsl:variable name="number">
3382
- <xsl:choose>
3383
- <xsl:when test="ancestor::bipm:references[preceding-sibling::bipm:references]">
3384
- <xsl:number level="any" count="bipm:references[preceding-sibling::bipm:references]//bipm:bibitem/bipm:note"/>
3385
- </xsl:when>
3386
- <xsl:otherwise>
3387
- <xsl:number level="any" count="bipm:bibitem/bipm:note"/>
3388
- </xsl:otherwise>
3389
- </xsl:choose>
3390
- </xsl:variable>
3391
- <fo:inline font-size="65%" keep-with-previous.within-line="always" vertical-align="super"> <!-- 60% baseline-shift="35%" -->
3392
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
3393
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
3394
- </fo:basic-link>
3395
- </fo:inline>
3396
- <fo:footnote-body>
3397
- <fo:block font-size="10pt" margin-bottom="12pt" start-indent="0pt">
3398
- <fo:inline id="{generate-id()}" keep-with-next.within-line="always" font-size="60%" vertical-align="super"><!-- baseline-shift="30%" padding-right="9mm" alignment-baseline="hanging" -->
3399
- <xsl:value-of select="$number"/><!-- <xsl:text>)</xsl:text> -->
3400
- </fo:inline>
3401
- <xsl:apply-templates/>
3402
- </fo:block>
3403
- </fo:footnote-body>
3404
- </fo:footnote>
3405
- </xsl:template>
3406
-
3407
- <xsl:template match="bipm:references[not(@normative='true')]">
3408
- <fo:block break-after="page"/>
3409
- <fo:block id="{@id}" line-height="120%">
3410
- <xsl:apply-templates/>
3411
- </fo:block>
3412
- </xsl:template>
3413
-
3414
- <xsl:template match="bipm:annex//bipm:references">
3415
- <fo:block id="{@id}">
3416
- <xsl:apply-templates/>
3417
- </fo:block>
3418
- </xsl:template>
3419
-
3420
- <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
3421
- <xsl:template match="bipm:references[not(@normative='true')]/bipm:bibitem">
3422
- <fo:list-block id="{@id}" margin-bottom="12pt" provisional-distance-between-starts="13mm">
3423
- <fo:list-item>
3424
- <fo:list-item-label end-indent="label-end()">
3425
- <fo:block>
3426
- <fo:inline>
3427
- <!-- <xsl:number format="1."/> -->
3428
- <xsl:choose>
3429
- <xsl:when test="bipm:docidentifier[@type='metanorma']">
3430
- <xsl:value-of select="bipm:docidentifier[@type='metanorma']"/>
3431
- </xsl:when>
3432
- <xsl:otherwise>
3433
- <xsl:number format="[1]"/>
3434
- </xsl:otherwise>
3435
- </xsl:choose>
3436
- </fo:inline>
3437
- </fo:block>
3438
- </fo:list-item-label>
3439
- <fo:list-item-body start-indent="body-start()">
3440
- <fo:block>
3441
- <xsl:call-template name="processBibitem"/>
3442
- <!-- <xsl:apply-templates /> -->
3443
- </fo:block>
3444
- </fo:list-item-body>
3445
- </fo:list-item>
3446
- </fo:list-block>
3447
- </xsl:template>
3448
-
3449
3377
 
3450
- <xsl:template match="bipm:references[not(@normative='true')]/bipm:bibitem" mode="contents"/>
3451
3378
 
3452
- <xsl:template match="bipm:bibitem/bipm:title">
3453
- <fo:inline font-style="italic">
3454
- <xsl:apply-templates/>
3455
- </fo:inline>
3456
- </xsl:template>
3457
-
3458
- <xsl:template match="bipm:references/bipm:bibitem/bipm:docidentifier[@type='metanorma' and ../bipm:formattedref]"/>
3379
+ <xsl:template match="bipm:references/bipm:bibitem/bipm:docidentifier[(@type='metanorma' or @type='metanorma-ordinal') and ../bipm:formattedref]"/>
3459
3380
 
3460
3381
 
3461
3382
  <xsl:template match="bipm:pagebreak">
@@ -3464,20 +3385,7 @@
3464
3385
  <fo:block break-after="page"/> -->
3465
3386
  </xsl:template>
3466
3387
 
3467
- <xsl:template match="bipm:admonition">
3468
- <fo:block-container border="0.5pt solid rgb(79, 129, 189)" color="rgb(79, 129, 189)" margin-left="16mm" margin-right="16mm" margin-bottom="12pt">
3469
- <fo:block-container margin-left="0mm" margin-right="0mm" padding="2mm" padding-top="3mm">
3470
- <fo:block font-size="11pt" margin-bottom="6pt" font-weight="bold" font-style="italic" text-align="center">
3471
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(@type))"/>
3472
- </fo:block>
3473
- <fo:block font-style="italic">
3474
- <xsl:apply-templates/>
3475
- </fo:block>
3476
- </fo:block-container>
3477
- </fo:block-container>
3478
- </xsl:template>
3479
-
3480
-
3388
+
3481
3389
  <xsl:template match="bipm:xref" priority="2">
3482
3390
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">
3483
3391
 
@@ -3538,7 +3446,7 @@
3538
3446
  </fo:basic-link>
3539
3447
  </xsl:template>
3540
3448
 
3541
- <xsl:template match="bipm:note[not(ancestor::bipm:preface)]/bipm:name" priority="2" mode="presentation">
3449
+ <xsl:template match="bipm:note[not(ancestor::bipm:preface)]/bipm:name" priority="2">
3542
3450
  <xsl:choose>
3543
3451
  <xsl:when test="not(../preceding-sibling::bipm:note) and not((../following-sibling::bipm:note))">
3544
3452
  <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language[@current = 'true']"/>
@@ -4649,55 +4557,32 @@
4649
4557
 
4650
4558
 
4651
4559
 
4652
- <xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="titles_">
4653
-
4654
- <title-annex lang="en">Annex </title-annex>
4655
- <title-annex lang="fr">Annexe </title-annex>
4656
-
4657
- <title-annex lang="zh">Annex </title-annex>
4658
-
4659
-
4560
+ <xsl:variable name="titles_">
4660
4561
 
4661
4562
  <title-edition lang="en">
4662
4563
 
4663
- <xsl:text>Edition </xsl:text>
4664
-
4665
-
4564
+ <xsl:text>Edition </xsl:text>
4565
+
4666
4566
  </title-edition>
4667
4567
 
4668
4568
  <title-edition lang="fr">
4669
-
4670
- <xsl:text>Édition </xsl:text>
4671
-
4569
+ <xsl:text>Édition </xsl:text>
4672
4570
  </title-edition>
4673
4571
 
4674
-
4572
+ <!-- These titles of Table of contents renders different than determined in localized-strings -->
4675
4573
  <title-toc lang="en">
4676
4574
 
4677
- <xsl:text>Contents</xsl:text>
4678
-
4679
4575
 
4680
4576
 
4681
4577
  </title-toc>
4682
4578
  <title-toc lang="fr">
4579
+ <xsl:text>Sommaire</xsl:text>
4580
+ </title-toc>
4581
+ <title-toc lang="zh">
4683
4582
 
4684
-
4685
- <xsl:text>Table des matières</xsl:text>
4686
-
4687
- </title-toc>
4688
-
4689
- <title-toc lang="zh">Contents</title-toc>
4690
-
4691
-
4692
-
4693
- <title-page lang="en">Page</title-page>
4694
- <title-page lang="fr">Page</title-page>
4695
-
4696
- <title-key lang="en">Key</title-key>
4697
- <title-key lang="fr">Légende</title-key>
4698
-
4699
- <title-where lang="en">where</title-where>
4700
- <title-where lang="fr">où</title-where>
4583
+ <xsl:text>Contents</xsl:text>
4584
+
4585
+ </title-toc>
4701
4586
 
4702
4587
  <title-descriptors lang="en">Descriptors</title-descriptors>
4703
4588
 
@@ -4717,36 +4602,9 @@
4717
4602
  </title-part>
4718
4603
  <title-part lang="zh">第 # 部分:</title-part>
4719
4604
 
4720
- <title-subpart lang="en">
4721
-
4722
- <xsl:text>Sub-part #</xsl:text>
4723
-
4724
- </title-subpart>
4725
- <title-subpart lang="fr">
4726
-
4727
- <xsl:text>Partie de sub #</xsl:text>
4728
-
4729
- </title-subpart>
4730
-
4731
- <title-modified lang="en">modified</title-modified>
4732
- <title-modified lang="fr">modifiée</title-modified>
4733
-
4734
- <title-modified lang="zh">modified</title-modified>
4735
-
4605
+ <title-subpart lang="en">Sub-part #</title-subpart>
4606
+ <title-subpart lang="fr">Partie de sub #</title-subpart>
4736
4607
 
4737
-
4738
- <title-source lang="en">
4739
-
4740
- <xsl:text>SOURCE</xsl:text>
4741
-
4742
-
4743
- </title-source>
4744
-
4745
- <title-keywords lang="en">Keywords</title-keywords>
4746
-
4747
- <title-deprecated lang="en">DEPRECATED</title-deprecated>
4748
- <title-deprecated lang="fr">DEPRECATED</title-deprecated>
4749
-
4750
4608
  <title-list-tables lang="en">List of Tables</title-list-tables>
4751
4609
 
4752
4610
  <title-list-figures lang="en">List of Figures</title-list-figures>
@@ -4755,41 +4613,12 @@
4755
4613
 
4756
4614
  <title-list-recommendations lang="en">List of Recommendations</title-list-recommendations>
4757
4615
 
4758
- <title-acknowledgements lang="en">Acknowledgements</title-acknowledgements>
4759
-
4760
- <title-abstract lang="en">Abstract</title-abstract>
4761
-
4762
4616
  <title-summary lang="en">Summary</title-summary>
4763
4617
 
4764
- <title-in lang="en">in </title-in>
4765
-
4766
- <title-partly-supercedes lang="en">Partly Supercedes </title-partly-supercedes>
4767
- <title-partly-supercedes lang="zh">部分代替 </title-partly-supercedes>
4768
-
4769
- <title-completion-date lang="en">Completion date for this manuscript</title-completion-date>
4770
- <title-completion-date lang="zh">本稿完成日期</title-completion-date>
4771
-
4772
- <title-issuance-date lang="en">Issuance Date: #</title-issuance-date>
4773
- <title-issuance-date lang="zh"># 发布</title-issuance-date>
4774
-
4775
- <title-implementation-date lang="en">Implementation Date: #</title-implementation-date>
4776
- <title-implementation-date lang="zh"># 实施</title-implementation-date>
4777
-
4778
- <title-obligation-normative lang="en">normative</title-obligation-normative>
4779
- <title-obligation-normative lang="zh">规范性附录</title-obligation-normative>
4780
-
4781
- <title-caution lang="en">CAUTION</title-caution>
4782
- <title-caution lang="zh">注意</title-caution>
4783
-
4784
- <title-warning lang="en">WARNING</title-warning>
4785
- <title-warning lang="zh">警告</title-warning>
4786
-
4787
- <title-amendment lang="en">AMENDMENT</title-amendment>
4788
-
4789
4618
  <title-continued lang="en">(continued)</title-continued>
4790
4619
  <title-continued lang="fr">(continué)</title-continued>
4791
4620
 
4792
- </xsl:variable><xsl:variable name="bibdata">
4621
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
4793
4622
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
4794
4623
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
4795
4624
  </xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:template name="getTitle">
@@ -4821,6 +4650,20 @@
4821
4650
  <xsl:attribute name="font-size">10.5pt</xsl:attribute>
4822
4651
 
4823
4652
 
4653
+
4654
+
4655
+
4656
+
4657
+
4658
+
4659
+
4660
+
4661
+
4662
+
4663
+
4664
+
4665
+
4666
+
4824
4667
  </xsl:attribute-set><xsl:attribute-set name="link-style">
4825
4668
 
4826
4669
 
@@ -4830,6 +4673,9 @@
4830
4673
 
4831
4674
 
4832
4675
 
4676
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-container-style">
4677
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4678
+
4833
4679
  </xsl:attribute-set><xsl:attribute-set name="sourcecode-style">
4834
4680
  <xsl:attribute name="white-space">pre</xsl:attribute>
4835
4681
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
@@ -4839,10 +4685,17 @@
4839
4685
 
4840
4686
 
4841
4687
 
4688
+
4689
+
4690
+
4691
+
4692
+
4842
4693
 
4843
4694
 
4844
4695
 
4845
4696
 
4697
+
4698
+
4846
4699
  </xsl:attribute-set><xsl:attribute-set name="permission-style">
4847
4700
 
4848
4701
  </xsl:attribute-set><xsl:attribute-set name="permission-name-style">
@@ -4890,6 +4743,7 @@
4890
4743
 
4891
4744
 
4892
4745
 
4746
+
4893
4747
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
4894
4748
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4895
4749
 
@@ -4898,7 +4752,9 @@
4898
4752
 
4899
4753
 
4900
4754
 
4755
+
4901
4756
  </xsl:attribute-set><xsl:attribute-set name="example-name-style">
4757
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
4902
4758
 
4903
4759
 
4904
4760
 
@@ -4933,6 +4789,7 @@
4933
4789
 
4934
4790
 
4935
4791
 
4792
+
4936
4793
  </xsl:attribute-set><xsl:attribute-set name="termexample-name-style">
4937
4794
 
4938
4795
 
@@ -4941,58 +4798,50 @@
4941
4798
 
4942
4799
  </xsl:attribute-set><xsl:variable name="table-border_">
4943
4800
 
4944
- </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-name-style">
4945
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
4946
-
4947
-
4801
+ </xsl:variable><xsl:variable name="table-border" select="normalize-space($table-border_)"/><xsl:attribute-set name="table-container-style">
4802
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4803
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
4948
4804
 
4949
4805
 
4806
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
4807
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4950
4808
 
4951
-
4952
4809
 
4953
4810
 
4954
4811
 
4955
-
4956
4812
 
4957
4813
 
4958
4814
 
4959
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4960
- <xsl:attribute name="text-align">left</xsl:attribute>
4961
- <xsl:attribute name="margin-top">24pt</xsl:attribute>
4962
- <xsl:attribute name="margin-left">25mm</xsl:attribute>
4963
- <xsl:attribute name="text-indent">-25mm</xsl:attribute>
4964
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4965
4815
 
4966
4816
 
4967
- </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
4968
4817
 
4969
- </xsl:attribute-set><xsl:attribute-set name="appendix-style">
4970
4818
 
4971
4819
 
4972
4820
 
4973
- </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
4974
4821
 
4975
4822
 
4976
4823
 
4977
- </xsl:attribute-set><xsl:attribute-set name="xref-style">
4978
4824
 
4825
+
4979
4826
 
4980
4827
 
4828
+ </xsl:attribute-set><xsl:attribute-set name="table-style">
4829
+ <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
4830
+ <xsl:attribute name="table-layout">fixed</xsl:attribute>
4831
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4832
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
4981
4833
 
4982
4834
 
4983
- </xsl:attribute-set><xsl:attribute-set name="eref-style">
4984
4835
 
4985
4836
 
4986
4837
 
4987
4838
 
4988
4839
 
4989
4840
 
4990
- </xsl:attribute-set><xsl:attribute-set name="note-style">
4991
4841
 
4992
4842
 
4993
4843
 
4994
4844
 
4995
-
4996
4845
 
4997
4846
 
4998
4847
 
@@ -5003,47 +4852,68 @@
5003
4852
 
5004
4853
 
5005
4854
 
5006
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4855
+ </xsl:attribute-set><xsl:attribute-set name="table-name-style">
4856
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
4857
+
5007
4858
 
5008
4859
 
5009
- </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">
5010
4860
 
5011
4861
 
4862
+
5012
4863
 
5013
4864
 
5014
4865
 
4866
+
5015
4867
 
5016
4868
 
5017
4869
 
4870
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4871
+ <xsl:attribute name="text-align">left</xsl:attribute>
4872
+ <xsl:attribute name="margin-top">24pt</xsl:attribute>
4873
+ <xsl:attribute name="margin-left">25mm</xsl:attribute>
4874
+ <xsl:attribute name="text-indent">-25mm</xsl:attribute>
4875
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5018
4876
 
5019
4877
 
4878
+ </xsl:attribute-set><xsl:attribute-set name="table-row-style">
4879
+ <xsl:attribute name="min-height">4mm</xsl:attribute>
5020
4880
 
5021
4881
 
5022
4882
 
5023
- </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
5024
4883
 
5025
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4884
+ </xsl:attribute-set><xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
4885
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5026
4886
 
5027
4887
 
5028
4888
 
5029
4889
 
5030
- </xsl:attribute-set><xsl:attribute-set name="note-p-style">
5031
4890
 
5032
4891
 
5033
4892
 
5034
4893
 
5035
4894
 
4895
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
5036
4896
 
5037
4897
 
5038
4898
 
4899
+ </xsl:attribute-set><xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
4900
+
4901
+ </xsl:attribute-set><xsl:attribute-set name="table-header-cell-style">
4902
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4903
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
4904
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
4905
+ <xsl:attribute name="display-align">center</xsl:attribute>
5039
4906
 
4907
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
4908
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
4909
+ <xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
4910
+ <xsl:attribute name="height">8mm</xsl:attribute>
4911
+ <xsl:attribute name="padding-top">2mm</xsl:attribute>
5040
4912
 
5041
4913
 
5042
4914
 
5043
4915
 
5044
- <xsl:attribute name="text-align">justify</xsl:attribute>
5045
4916
 
5046
- </xsl:attribute-set><xsl:attribute-set name="termnote-style">
5047
4917
 
5048
4918
 
5049
4919
 
@@ -5051,15 +4921,15 @@
5051
4921
 
5052
4922
 
5053
4923
 
5054
- </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
5055
4924
 
5056
-
4925
+ </xsl:attribute-set><xsl:attribute-set name="table-cell-style">
4926
+ <xsl:attribute name="display-align">center</xsl:attribute>
4927
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
4928
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
5057
4929
 
5058
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
5059
4930
 
4931
+ <xsl:attribute name="border">solid 0pt white</xsl:attribute>
5060
4932
 
5061
- </xsl:attribute-set><xsl:attribute-set name="quote-style">
5062
- <xsl:attribute name="role">BlockQuote</xsl:attribute>
5063
4933
 
5064
4934
 
5065
4935
 
@@ -5067,35 +4937,34 @@
5067
4937
 
5068
4938
 
5069
4939
 
5070
- </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
5071
4940
 
5072
-
5073
-
5074
- </xsl:attribute-set><xsl:attribute-set name="termsource-style">
5075
4941
 
5076
4942
 
5077
4943
 
4944
+ </xsl:attribute-set><xsl:attribute-set name="table-footer-cell-style">
4945
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
4946
+ <xsl:attribute name="padding-left">1mm</xsl:attribute>
4947
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
4948
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
5078
4949
 
5079
4950
 
4951
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
5080
4952
 
5081
4953
 
5082
- </xsl:attribute-set><xsl:attribute-set name="origin-style">
5083
4954
 
5084
4955
 
5085
4956
 
5086
4957
 
5087
- </xsl:attribute-set><xsl:attribute-set name="term-style">
4958
+
5088
4959
 
5089
- </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
5090
4960
 
5091
4961
 
5092
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5093
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5094
- <xsl:attribute name="text-align">left</xsl:attribute>
5095
- <xsl:attribute name="margin-left">19mm</xsl:attribute>
5096
- <xsl:attribute name="text-indent">-19mm</xsl:attribute>
4962
+ </xsl:attribute-set><xsl:attribute-set name="table-note-style">
4963
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4964
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5097
4965
 
5098
-
4966
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4967
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
5099
4968
 
5100
4969
 
5101
4970
 
@@ -5104,95 +4973,443 @@
5104
4973
 
5105
4974
 
5106
4975
 
4976
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-style">
4977
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5107
4978
 
4979
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
4980
+ <xsl:attribute name="text-indent">-6.5mm</xsl:attribute>
4981
+ <xsl:attribute name="margin-left">6.5mm</xsl:attribute>
4982
+ <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
5108
4983
 
5109
4984
 
5110
4985
 
5111
-
5112
4986
 
5113
4987
 
5114
4988
 
5115
-
5116
- </xsl:attribute-set><xsl:attribute-set name="formula-style">
4989
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-number-style">
4990
+ <xsl:attribute name="font-size">80%</xsl:attribute>
4991
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
5117
4992
 
5118
- </xsl:attribute-set><xsl:attribute-set name="image-style">
5119
- <xsl:attribute name="text-align">center</xsl:attribute>
5120
4993
 
5121
4994
 
4995
+ <xsl:attribute name="font-style">italic</xsl:attribute>
4996
+ <xsl:attribute name="padding-right">2.5mm</xsl:attribute>
5122
4997
 
5123
4998
 
5124
4999
 
5125
5000
 
5126
- </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
5127
5001
 
5128
- </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
5129
5002
 
5130
5003
 
5131
- <xsl:attribute name="width">100%</xsl:attribute>
5132
- <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
5133
- <xsl:attribute name="scaling">uniform</xsl:attribute>
5134
5004
 
5135
5005
 
5136
5006
 
5137
-
5138
-
5139
- </xsl:attribute-set><xsl:attribute-set name="tt-style">
5007
+ </xsl:attribute-set><xsl:attribute-set name="fn-container-body-style">
5008
+ <xsl:attribute name="text-indent">0</xsl:attribute>
5009
+ <xsl:attribute name="start-indent">0</xsl:attribute>
5140
5010
 
5141
5011
 
5012
+ </xsl:attribute-set><xsl:attribute-set name="table-fn-body-style">
5142
5013
 
5143
- </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
5144
- <xsl:attribute name="font-size">11pt</xsl:attribute>
5145
- <xsl:attribute name="font-weight">bold</xsl:attribute>
5146
- <xsl:attribute name="text-align">center</xsl:attribute>
5014
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-number-style">
5015
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5016
+ <xsl:attribute name="padding-right">5mm</xsl:attribute>
5017
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5018
+
5019
+ </xsl:attribute-set><xsl:attribute-set name="figure-fn-body-style">
5020
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5147
5021
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5148
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5149
5022
 
5150
- </xsl:attribute-set><xsl:attribute-set name="domain-style">
5151
-
5152
- </xsl:attribute-set><xsl:attribute-set name="admitted-style">
5023
+ </xsl:attribute-set><xsl:attribute-set name="dt-row-style">
5153
5024
 
5154
5025
 
5026
+ </xsl:attribute-set><xsl:attribute-set name="dt-style">
5027
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
5155
5028
 
5156
- </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
5157
5029
 
5030
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
5031
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5158
5032
 
5159
- </xsl:attribute-set><xsl:attribute-set name="definition-style">
5160
5033
 
5161
5034
 
5162
5035
 
5163
- </xsl:attribute-set><xsl:variable name="color-added-text">
5164
- <xsl:text>rgb(0, 255, 0)</xsl:text>
5165
- </xsl:variable><xsl:attribute-set name="add-style">
5166
- <xsl:attribute name="color">red</xsl:attribute>
5167
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
5168
- <!-- <xsl:attribute name="color">black</xsl:attribute>
5169
- <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
5170
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
5171
- <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
5172
- </xsl:attribute-set><xsl:variable name="color-deleted-text">
5173
- <xsl:text>red</xsl:text>
5174
- </xsl:variable><xsl:attribute-set name="del-style">
5175
- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
5176
- <xsl:attribute name="text-decoration">line-through</xsl:attribute>
5177
- </xsl:attribute-set><xsl:attribute-set name="mathml-style">
5036
+
5037
+
5038
+
5039
+
5040
+
5041
+ </xsl:attribute-set><xsl:attribute-set name="appendix-style">
5042
+
5043
+
5044
+
5045
+ </xsl:attribute-set><xsl:attribute-set name="appendix-example-style">
5046
+
5047
+
5048
+
5049
+ </xsl:attribute-set><xsl:attribute-set name="xref-style">
5050
+
5051
+
5052
+
5053
+
5054
+
5055
+ </xsl:attribute-set><xsl:attribute-set name="eref-style">
5056
+
5057
+
5058
+
5059
+
5060
+
5061
+
5062
+ </xsl:attribute-set><xsl:attribute-set name="note-style">
5063
+
5064
+
5065
+
5066
+
5067
+
5068
+
5069
+
5070
+
5071
+
5072
+
5073
+
5074
+
5075
+
5076
+
5077
+
5078
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5079
+
5080
+
5081
+ </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">
5082
+
5083
+
5084
+
5085
+
5086
+
5087
+
5088
+
5089
+
5090
+
5091
+
5092
+
5093
+
5094
+
5095
+ </xsl:attribute-set><xsl:attribute-set name="table-note-name-style">
5096
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
5097
+
5098
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5099
+
5100
+
5101
+
5102
+
5103
+ </xsl:attribute-set><xsl:attribute-set name="note-p-style">
5104
+
5105
+
5106
+
5107
+
5108
+
5109
+
5110
+
5111
+
5112
+
5113
+
5114
+
5115
+
5116
+
5117
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5118
+
5119
+ </xsl:attribute-set><xsl:attribute-set name="termnote-style">
5120
+
5121
+
5122
+
5123
+
5124
+
5125
+
5126
+
5127
+ </xsl:attribute-set><xsl:attribute-set name="termnote-name-style">
5128
+
5129
+
5130
+
5131
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
5132
+
5133
+
5134
+ </xsl:attribute-set><xsl:attribute-set name="quote-style">
5135
+ <xsl:attribute name="role">BlockQuote</xsl:attribute>
5136
+
5137
+
5138
+
5139
+
5140
+
5141
+
5142
+
5143
+ </xsl:attribute-set><xsl:attribute-set name="quote-source-style">
5144
+
5145
+
5146
+
5147
+ </xsl:attribute-set><xsl:attribute-set name="termsource-style">
5148
+
5149
+
5150
+
5151
+
5152
+
5153
+
5154
+
5155
+ </xsl:attribute-set><xsl:attribute-set name="termsource-text-style">
5156
+
5157
+
5158
+ </xsl:attribute-set><xsl:attribute-set name="origin-style">
5159
+
5160
+
5161
+
5162
+
5163
+ </xsl:attribute-set><xsl:attribute-set name="term-style">
5164
+
5165
+ </xsl:attribute-set><xsl:attribute-set name="figure-style">
5166
+
5167
+ </xsl:attribute-set><xsl:attribute-set name="figure-name-style">
5168
+
5169
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5170
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5171
+ <xsl:attribute name="text-align">left</xsl:attribute>
5172
+ <xsl:attribute name="margin-left">19mm</xsl:attribute>
5173
+ <xsl:attribute name="text-indent">-19mm</xsl:attribute>
5174
+
5175
+
5176
+
5177
+
5178
+
5179
+
5180
+
5181
+
5182
+
5183
+
5184
+
5185
+
5186
+
5187
+
5188
+
5189
+
5190
+
5191
+
5192
+
5193
+
5194
+ </xsl:attribute-set><xsl:attribute-set name="formula-style">
5195
+
5196
+ </xsl:attribute-set><xsl:attribute-set name="image-style">
5197
+ <xsl:attribute name="text-align">center</xsl:attribute>
5198
+
5199
+
5200
+
5201
+
5202
+
5203
+
5204
+ </xsl:attribute-set><xsl:attribute-set name="figure-pseudocode-p-style">
5205
+
5206
+ </xsl:attribute-set><xsl:attribute-set name="image-graphic-style">
5207
+
5208
+
5209
+ <xsl:attribute name="width">100%</xsl:attribute>
5210
+ <xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
5211
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
5212
+
5213
+
5214
+
5215
+
5216
+
5217
+ </xsl:attribute-set><xsl:attribute-set name="tt-style">
5218
+
5219
+
5220
+
5221
+ </xsl:attribute-set><xsl:attribute-set name="sourcecode-name-style">
5222
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
5223
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5224
+ <xsl:attribute name="text-align">center</xsl:attribute>
5225
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5226
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
5227
+
5228
+ </xsl:attribute-set><xsl:attribute-set name="domain-style">
5229
+
5230
+ </xsl:attribute-set><xsl:attribute-set name="admitted-style">
5231
+
5232
+
5233
+
5234
+ </xsl:attribute-set><xsl:attribute-set name="deprecates-style">
5235
+
5236
+
5237
+ </xsl:attribute-set><xsl:attribute-set name="definition-style">
5238
+
5239
+
5240
+
5241
+ </xsl:attribute-set><xsl:variable name="color-added-text">
5242
+ <xsl:text>rgb(0, 255, 0)</xsl:text>
5243
+ </xsl:variable><xsl:attribute-set name="add-style">
5244
+ <xsl:attribute name="color">red</xsl:attribute>
5245
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
5246
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
5247
+ <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
5248
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
5249
+ <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
5250
+ </xsl:attribute-set><xsl:variable name="color-deleted-text">
5251
+ <xsl:text>red</xsl:text>
5252
+ </xsl:variable><xsl:attribute-set name="del-style">
5253
+ <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute>
5254
+ <xsl:attribute name="text-decoration">line-through</xsl:attribute>
5255
+ </xsl:attribute-set><xsl:attribute-set name="mathml-style">
5178
5256
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
5179
5257
 
5180
5258
 
5181
- </xsl:attribute-set><xsl:attribute-set name="list-style">
5259
+ </xsl:attribute-set><xsl:attribute-set name="list-style">
5260
+
5261
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
5262
+ <xsl:attribute name="line-height">135%</xsl:attribute>
5263
+ </xsl:attribute-set><xsl:attribute-set name="fn-reference-style">
5264
+ <xsl:attribute name="font-size">80%</xsl:attribute>
5265
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5266
+
5267
+ <xsl:attribute name="font-size">70%</xsl:attribute>
5268
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5269
+ <xsl:attribute name="font-style">italic</xsl:attribute>
5270
+
5271
+
5272
+
5273
+
5274
+
5275
+
5276
+
5277
+
5278
+ </xsl:attribute-set><xsl:attribute-set name="fn-style">
5279
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5280
+ </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
5281
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5282
+
5283
+ <xsl:attribute name="font-size">65%</xsl:attribute>
5284
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5285
+
5286
+
5287
+
5288
+
5289
+
5290
+
5291
+
5292
+
5293
+
5294
+
5295
+
5296
+
5297
+
5298
+
5299
+
5300
+
5301
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
5302
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
5303
+ <xsl:attribute name="font-style">normal</xsl:attribute>
5304
+ <xsl:attribute name="text-indent">0</xsl:attribute>
5305
+ <xsl:attribute name="start-indent">0</xsl:attribute>
5306
+
5307
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
5308
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5309
+ <xsl:attribute name="line-height">124%</xsl:attribute>
5310
+ <xsl:attribute name="text-align">justify</xsl:attribute>
5311
+
5312
+
5313
+
5314
+
5315
+
5316
+
5317
+
5318
+
5319
+
5320
+
5321
+
5322
+
5323
+
5324
+
5325
+
5326
+
5327
+
5328
+
5329
+ </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
5330
+ <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
5331
+
5332
+ <xsl:attribute name="font-size">60%</xsl:attribute>
5333
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5334
+ <xsl:attribute name="padding-right">1mm</xsl:attribute>
5335
+
5336
+
5337
+
5338
+
5339
+
5340
+
5341
+
5342
+
5343
+
5344
+
5345
+
5346
+
5347
+
5348
+
5349
+
5350
+
5351
+
5352
+ </xsl:attribute-set><xsl:attribute-set name="admonition-style">
5353
+
5354
+
5355
+
5356
+ <xsl:attribute name="border">0.25pt solid black</xsl:attribute>
5357
+ <xsl:attribute name="margin-left">16mm</xsl:attribute>
5358
+ <xsl:attribute name="margin-right">16mm</xsl:attribute>
5359
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5360
+
5361
+
5362
+
5363
+
5364
+
5365
+
5366
+
5367
+
5368
+
5369
+
5370
+
5371
+
5372
+ </xsl:attribute-set><xsl:attribute-set name="admonition-container-style">
5373
+
5374
+
5375
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
5376
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
5377
+ <xsl:attribute name="padding">2mm</xsl:attribute>
5378
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
5379
+
5380
+
5381
+
5382
+
5383
+
5384
+
5385
+
5386
+
5387
+
5388
+ </xsl:attribute-set><xsl:attribute-set name="admonition-name-style">
5389
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
5390
+
5391
+
5392
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
5393
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
5394
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
5395
+ <xsl:attribute name="font-style">italic</xsl:attribute>
5396
+ <xsl:attribute name="text-align">center</xsl:attribute>
5397
+
5398
+
5399
+
5400
+
5401
+
5402
+
5403
+
5404
+
5182
5405
 
5183
- </xsl:attribute-set><xsl:attribute-set name="toc-style">
5184
- <xsl:attribute name="line-height">135%</xsl:attribute>
5185
- </xsl:attribute-set><xsl:attribute-set name="fn-style">
5186
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5187
- </xsl:attribute-set><xsl:attribute-set name="fn-num-style">
5188
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5189
5406
 
5190
- <xsl:attribute name="font-size">65%</xsl:attribute>
5191
- <xsl:attribute name="vertical-align">super</xsl:attribute>
5192
5407
 
5193
5408
 
5409
+ </xsl:attribute-set><xsl:attribute-set name="admonition-p-style">
5194
5410
 
5195
5411
 
5412
+ <xsl:attribute name="font-style">italic</xsl:attribute>
5196
5413
 
5197
5414
 
5198
5415
 
@@ -5203,19 +5420,16 @@
5203
5420
 
5204
5421
 
5205
5422
 
5423
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-style">
5424
+
5425
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5426
+ <xsl:attribute name="start-indent">25mm</xsl:attribute>
5427
+ <xsl:attribute name="text-indent">-25mm</xsl:attribute>
5428
+ <xsl:attribute name="line-height">115%</xsl:attribute>
5206
5429
 
5207
5430
 
5208
- </xsl:attribute-set><xsl:attribute-set name="fn-body-style">
5209
- <xsl:attribute name="font-weight">normal</xsl:attribute>
5210
- <xsl:attribute name="font-style">normal</xsl:attribute>
5211
- <xsl:attribute name="text-indent">0</xsl:attribute>
5212
- <xsl:attribute name="start-indent">0</xsl:attribute>
5213
5431
 
5214
5432
 
5215
- <xsl:attribute name="font-size">9pt</xsl:attribute>
5216
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5217
- <xsl:attribute name="line-height">124%</xsl:attribute>
5218
- <xsl:attribute name="text-align">justify</xsl:attribute>
5219
5433
 
5220
5434
 
5221
5435
 
@@ -5230,15 +5444,75 @@
5230
5444
 
5231
5445
 
5232
5446
 
5447
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-style">
5448
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
5449
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5233
5450
 
5451
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
5234
5452
 
5235
5453
 
5236
- </xsl:attribute-set><xsl:attribute-set name="fn-body-num-style">
5454
+
5455
+
5456
+
5457
+
5458
+
5459
+
5460
+
5461
+
5462
+
5463
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-style">
5464
+
5465
+
5466
+
5467
+
5468
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-style">
5469
+ <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
5470
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5471
+
5472
+ <xsl:attribute name="provisional-distance-between-starts">13mm</xsl:attribute>
5473
+
5474
+
5475
+
5476
+
5477
+
5478
+
5479
+
5480
+
5481
+
5482
+
5483
+
5484
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-normative-list-body-style">
5485
+
5486
+
5487
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
5488
+
5489
+
5490
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
5491
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
5492
+ <xsl:attribute name="font-size">65%</xsl:attribute>
5493
+
5494
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
5495
+
5496
+
5497
+
5498
+
5499
+
5500
+
5501
+
5502
+
5503
+
5504
+
5505
+
5506
+
5507
+
5508
+
5509
+
5510
+
5511
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-number-style">
5237
5512
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
5238
5513
 
5239
5514
  <xsl:attribute name="font-size">60%</xsl:attribute>
5240
5515
  <xsl:attribute name="vertical-align">super</xsl:attribute>
5241
- <xsl:attribute name="padding-right">1mm</xsl:attribute>
5242
5516
 
5243
5517
 
5244
5518
 
@@ -5255,31 +5529,32 @@
5255
5529
 
5256
5530
 
5257
5531
 
5532
+ </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-body-style">
5533
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
5534
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5535
+ <xsl:attribute name="start-indent">0pt</xsl:attribute>
5536
+
5537
+
5538
+
5539
+
5540
+
5541
+
5542
+
5543
+
5544
+
5545
+
5546
+
5547
+ </xsl:attribute-set><xsl:attribute-set name="references-non-normative-style">
5548
+
5549
+ <xsl:attribute name="line-height">120%</xsl:attribute>
5550
+
5258
5551
 
5259
- </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="OLD_processPrefaceSectionsDefault_Contents">
5260
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
5261
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
5262
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
5263
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
5264
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
5265
- </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
5552
+
5553
+ </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:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
5266
5554
  <xsl:for-each select="/*/*[local-name()='preface']/*">
5267
5555
  <xsl:sort select="@displayorder" data-type="number"/>
5268
5556
  <xsl:apply-templates select="." mode="contents"/>
5269
5557
  </xsl:for-each>
5270
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
5271
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
5272
-
5273
- <!-- Normative references -->
5274
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]" mode="contents"/>
5275
- <!-- Terms and definitions -->
5276
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]" mode="contents"/>
5277
- <!-- Another main sections -->
5278
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]" mode="contents"/>
5279
- <xsl:apply-templates select="/*/*[local-name()='annex']" mode="contents"/>
5280
- <!-- Bibliography -->
5281
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
5282
-
5283
5558
  </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
5284
5559
 
5285
5560
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
@@ -5296,29 +5571,11 @@
5296
5571
  <xsl:sort select="@displayorder" data-type="number"/>
5297
5572
  <xsl:apply-templates select="." mode="contents"/>
5298
5573
  </xsl:for-each>
5299
- </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
5300
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
5301
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
5302
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
5303
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
5304
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
5305
5574
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
5306
5575
  <xsl:for-each select="/*/*[local-name()='preface']/*">
5307
5576
  <xsl:sort select="@displayorder" data-type="number"/>
5308
5577
  <xsl:apply-templates select="."/>
5309
5578
  </xsl:for-each>
5310
- </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
5311
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
5312
-
5313
- <!-- Normative references -->
5314
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']"/>
5315
- <!-- Terms and definitions -->
5316
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='terms'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='terms']] | /*/*[local-name()='sections']/*[local-name()='definitions'] | /*/*[local-name()='sections']/*[local-name()='clause'][.//*[local-name()='definitions']]"/>
5317
- <!-- Another main sections -->
5318
- <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name() != 'terms' and local-name() != 'definitions' and not(@type='scope') and not(local-name() = 'clause' and .//*[local-name()='terms']) and not(local-name() = 'clause' and .//*[local-name()='definitions'])]"/>
5319
- <xsl:apply-templates select="/*/*[local-name()='annex']"/>
5320
- <!-- Bibliography -->
5321
- <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
5322
5579
  </xsl:template><xsl:template name="processMainSectionsDefault">
5323
5580
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
5324
5581
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -5355,43 +5612,19 @@
5355
5612
  <xsl:call-template name="getSimpleTable"/>
5356
5613
  </xsl:variable>
5357
5614
 
5358
- <!-- <xsl:if test="$namespace = 'bipm'">
5359
- <fo:block>&#xA0;</fo:block>
5360
- </xsl:if> -->
5361
-
5362
5615
 
5363
5616
  <!-- Display table's name before table as standalone block -->
5364
5617
  <!-- $namespace = 'iso' or -->
5365
5618
 
5366
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
5367
-
5368
-
5369
-
5370
-
5619
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
5620
+
5371
5621
 
5372
- <xsl:call-template name="fn_name_display"/>
5373
5622
 
5623
+ <xsl:call-template name="table_name_fn_display"/>
5374
5624
 
5375
5625
 
5376
5626
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
5377
5627
 
5378
- <!-- <xsl:variable name="cols-count">
5379
- <xsl:choose>
5380
- <xsl:when test="*[local-name()='thead']">
5381
- <xsl:call-template name="calculate-columns-numbers">
5382
- <xsl:with-param name="table-row" select="*[local-name()='thead']/*[local-name()='tr'][1]"/>
5383
- </xsl:call-template>
5384
- </xsl:when>
5385
- <xsl:otherwise>
5386
- <xsl:call-template name="calculate-columns-numbers">
5387
- <xsl:with-param name="table-row" select="*[local-name()='tbody']/*[local-name()='tr'][1]"/>
5388
- </xsl:call-template>
5389
- </xsl:otherwise>
5390
- </xsl:choose>
5391
- </xsl:variable> -->
5392
- <!-- cols-count=<xsl:copy-of select="$cols-count"/> -->
5393
- <!-- cols-count2=<xsl:copy-of select="$cols-count2"/> -->
5394
-
5395
5628
  <xsl:variable name="colwidths">
5396
5629
  <xsl:if test="not(*[local-name()='colgroup']/*[local-name()='col'])">
5397
5630
  <xsl:call-template name="calculate-column-widths">
@@ -5402,17 +5635,8 @@
5402
5635
  </xsl:variable>
5403
5636
  <!-- colwidths=<xsl:copy-of select="$colwidths"/> -->
5404
5637
 
5405
- <!-- <xsl:variable name="colwidths2">
5406
- <xsl:call-template name="calculate-column-widths">
5407
- <xsl:with-param name="cols-count" select="$cols-count"/>
5408
- </xsl:call-template>
5409
- </xsl:variable> -->
5410
-
5411
- <!-- cols-count=<xsl:copy-of select="$cols-count"/>
5412
- colwidthsNew=<xsl:copy-of select="$colwidths"/>
5413
- colwidthsOld=<xsl:copy-of select="$colwidths2"/>z -->
5414
5638
 
5415
- <xsl:variable name="margin-left">
5639
+ <xsl:variable name="margin-side">
5416
5640
  <xsl:choose>
5417
5641
  <xsl:when test="sum(xalan:nodeset($colwidths)//column) &gt; 75">15</xsl:when>
5418
5642
  <xsl:otherwise>0</xsl:otherwise>
@@ -5420,88 +5644,79 @@
5420
5644
  </xsl:variable>
5421
5645
 
5422
5646
 
5423
- <fo:block-container margin-left="-{$margin-left}mm" margin-right="-{$margin-left}mm">
5424
-
5425
-
5426
-
5427
-
5428
-
5429
-
5430
-
5431
-
5432
-
5433
-
5434
-
5435
-
5436
-
5437
-
5647
+ <fo:block-container xsl:use-attribute-sets="table-container-style">
5648
+
5438
5649
 
5650
+
5439
5651
 
5440
- <xsl:attribute name="space-after">12pt</xsl:attribute>
5441
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
5442
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
5443
5652
  <xsl:if test="not(ancestor::*[local-name()='note_side'])">
5444
5653
  <xsl:attribute name="font-size">10pt</xsl:attribute>
5445
5654
  </xsl:if>
5446
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
5447
5655
  <xsl:if test="@parent-type = 'quote'">
5448
5656
  <xsl:attribute name="font-family">Arial</xsl:attribute>
5449
5657
  <xsl:attribute name="font-size">9pt</xsl:attribute>
5450
5658
  </xsl:if>
5451
5659
 
5660
+
5661
+
5662
+
5663
+
5664
+
5665
+
5666
+
5667
+
5668
+
5452
5669
 
5453
5670
 
5454
5671
 
5672
+ <!-- end table block-container attributes -->
5455
5673
 
5456
5674
  <!-- display table's name before table for PAS inside block-container (2-columnn layout) -->
5457
5675
 
5458
5676
 
5677
+ <xsl:variable name="table_width_default">100%</xsl:variable>
5459
5678
  <xsl:variable name="table_width">
5460
5679
  <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
5461
5680
 
5462
-
5463
-
5464
- <xsl:choose>
5465
- <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
5466
- <xsl:otherwise>100%</xsl:otherwise>
5467
- </xsl:choose>
5468
-
5681
+ <xsl:choose>
5682
+ <xsl:when test="@width"><xsl:value-of select="@width"/></xsl:when>
5683
+ <xsl:otherwise><xsl:value-of select="$table_width_default"/></xsl:otherwise>
5684
+ </xsl:choose>
5685
+
5469
5686
  </xsl:variable>
5470
5687
 
5688
+
5471
5689
  <xsl:variable name="table_attributes">
5472
- <attribute name="table-layout">fixed</attribute>
5473
- <attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></attribute>
5474
- <attribute name="margin-left"><xsl:value-of select="$margin-left"/>mm</attribute>
5475
- <attribute name="margin-right"><xsl:value-of select="$margin-left"/>mm</attribute>
5476
-
5477
-
5478
-
5479
-
5480
-
5481
-
5482
-
5483
-
5484
-
5485
-
5486
-
5487
-
5488
-
5489
- <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'])">
5490
- <attribute name="border-top">0.5pt solid black</attribute>
5491
- <attribute name="border-bottom">0.5pt solid black</attribute>
5492
- </xsl:if>
5493
- <attribute name="margin-left">0mm</attribute>
5494
- <attribute name="margin-right">0mm</attribute>
5495
- <!-- <attribute name="keep-together.within-column">1</attribute> --> <!-- integer value instead 'always'! -->
5496
-
5497
-
5690
+
5691
+ <xsl:element name="table_attributes" use-attribute-sets="table-style">
5692
+ <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
5693
+
5694
+
5695
+
5696
+
5697
+ <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'])">
5698
+ <xsl:attribute name="border-top">0.5pt solid black</xsl:attribute>
5699
+ <xsl:attribute name="border-bottom">0.5pt solid black</xsl:attribute>
5700
+ </xsl:if>
5701
+
5702
+
5703
+
5704
+
5705
+
5706
+
5707
+
5708
+
5709
+
5710
+
5711
+
5712
+ </xsl:element>
5498
5713
  </xsl:variable>
5499
5714
 
5500
5715
 
5501
- <fo:table id="{@id}" table-omit-footer-at-break="true">
5716
+ <fo:table id="{@id}">
5502
5717
 
5503
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
5504
- <xsl:attribute name="{@name}">
5718
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
5719
+ <xsl:attribute name="{local-name()}">
5505
5720
  <xsl:value-of select="."/>
5506
5721
  </xsl:attribute>
5507
5722
  </xsl:for-each>
@@ -5512,7 +5727,6 @@
5512
5727
  </xsl:if>
5513
5728
 
5514
5729
 
5515
-
5516
5730
  <xsl:choose>
5517
5731
  <xsl:when test="*[local-name()='colgroup']/*[local-name()='col']">
5518
5732
  <xsl:for-each select="*[local-name()='colgroup']/*[local-name()='col']">
@@ -5538,7 +5752,7 @@
5538
5752
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
5539
5753
  </xsl:when>
5540
5754
  <xsl:otherwise>
5541
- <xsl:apply-templates/>
5755
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
5542
5756
  </xsl:otherwise>
5543
5757
  </xsl:choose>
5544
5758
 
@@ -5553,25 +5767,6 @@
5553
5767
  </xsl:call-template>
5554
5768
  </xsl:for-each>
5555
5769
 
5556
- <!-- insert footer as table -->
5557
- <!-- <fo:table>
5558
- <xsl:for-each select="xalan::nodeset($table_attributes)/attribute">
5559
- <xsl:attribute name="{@name}">
5560
- <xsl:value-of select="."/>
5561
- </xsl:attribute>
5562
- </xsl:for-each>
5563
-
5564
- <xsl:for-each select="xalan:nodeset($colwidths)//column">
5565
- <xsl:choose>
5566
- <xsl:when test=". = 1 or . = 0">
5567
- <fo:table-column column-width="proportional-column-width(2)"/>
5568
- </xsl:when>
5569
- <xsl:otherwise>
5570
- <fo:table-column column-width="proportional-column-width({.})"/>
5571
- </xsl:otherwise>
5572
- </xsl:choose>
5573
- </xsl:for-each>
5574
- </fo:table>-->
5575
5770
 
5576
5771
 
5577
5772
 
@@ -5629,11 +5824,11 @@
5629
5824
  </xsl:otherwise>
5630
5825
  </xsl:choose>
5631
5826
 
5632
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']"/><xsl:template match="*[local-name()='table']/*[local-name() = 'name']" mode="presentation">
5827
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
5633
5828
  <xsl:param name="continued"/>
5634
5829
  <xsl:if test="normalize-space() != ''">
5635
5830
  <fo:block xsl:use-attribute-sets="table-name-style">
5636
-
5831
+
5637
5832
 
5638
5833
  <xsl:if test="not(*[local-name()='tab'])"> <!-- table without number -->
5639
5834
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
@@ -5647,7 +5842,6 @@
5647
5842
 
5648
5843
  <xsl:choose>
5649
5844
  <xsl:when test="$continued = 'true'">
5650
- <!-- <xsl:if test="$namespace = 'bsi'"></xsl:if> -->
5651
5845
 
5652
5846
  </xsl:when>
5653
5847
  <xsl:otherwise>
@@ -5710,13 +5904,6 @@
5710
5904
  <xsl:for-each select="xalan:nodeset($table)/*/tr">
5711
5905
  <xsl:variable name="td_text">
5712
5906
  <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
5713
-
5714
- <!-- <xsl:if test="$namespace = 'bipm'">
5715
- <xsl:for-each select="*[local-name()='td'][$curr-col]//*[local-name()='math']">
5716
- <word><xsl:value-of select="normalize-space(.)"/></word>
5717
- </xsl:for-each>
5718
- </xsl:if> -->
5719
-
5720
5907
  </xsl:variable>
5721
5908
  <xsl:variable name="words">
5722
5909
  <xsl:variable name="string_with_added_zerospaces">
@@ -5753,7 +5940,6 @@
5753
5940
  </xsl:otherwise>
5754
5941
  </xsl:choose>
5755
5942
  </xsl:variable>
5756
-
5757
5943
 
5758
5944
  <column>
5759
5945
  <xsl:for-each select="xalan:nodeset($widths)//width">
@@ -5789,7 +5975,6 @@
5789
5975
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
5790
5976
  </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
5791
5977
  <xsl:param name="cols-count"/>
5792
- <!-- font-weight="bold" -->
5793
5978
  <fo:table-header>
5794
5979
 
5795
5980
 
@@ -5801,13 +5986,12 @@
5801
5986
  <fo:table-row>
5802
5987
  <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">
5803
5988
 
5804
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']" mode="presentation">
5989
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
5805
5990
  <xsl:with-param name="continued">true</xsl:with-param>
5806
5991
  </xsl:apply-templates>
5807
5992
 
5808
5993
 
5809
5994
 
5810
-
5811
5995
  </fo:table-cell>
5812
5996
  </fo:table-row>
5813
5997
  </xsl:template><xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -5823,66 +6007,6 @@
5823
6007
  <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
5824
6008
  </fo:table-footer>
5825
6009
  </xsl:if>
5826
- </xsl:template><xsl:template name="insertTableFooter2">
5827
- <xsl:param name="cols-count"/>
5828
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
5829
- <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
5830
-
5831
- <fo:table-footer>
5832
-
5833
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
5834
-
5835
- <!-- if there are note(s) or fn(s) then create footer row -->
5836
- <xsl:if test="$isNoteOrFnExist = 'true'">
5837
-
5838
-
5839
-
5840
- <fo:table-row>
5841
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
5842
-
5843
-
5844
-
5845
- <!-- fn will be processed inside 'note' processing -->
5846
-
5847
-
5848
-
5849
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
5850
-
5851
-
5852
-
5853
-
5854
- <!-- except gb -->
5855
-
5856
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
5857
-
5858
-
5859
- <!-- show Note under table in preface (ex. abstract) sections -->
5860
- <!-- empty, because notes show at page side in main sections -->
5861
- <!-- <xsl:if test="$namespace = 'bipm'">
5862
- <xsl:choose>
5863
- <xsl:when test="ancestor::*[local-name()='preface']">
5864
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
5865
- </xsl:when>
5866
- <xsl:otherwise>
5867
- <fo:block/>
5868
- </xsl:otherwise>
5869
- </xsl:choose>
5870
- </xsl:if> -->
5871
-
5872
-
5873
- <!-- horizontal row separator -->
5874
-
5875
-
5876
- <!-- fn processing -->
5877
- <xsl:call-template name="fn_display"/>
5878
-
5879
- </fo:table-cell>
5880
- </fo:table-row>
5881
-
5882
- </xsl:if>
5883
- </fo:table-footer>
5884
-
5885
- </xsl:if>
5886
6010
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
5887
6011
  <xsl:param name="table_attributes"/>
5888
6012
  <xsl:param name="colwidths"/>
@@ -5908,17 +6032,18 @@
5908
6032
  </xsl:variable>
5909
6033
 
5910
6034
  <fo:table keep-with-previous="always">
5911
- <xsl:for-each select="xalan:nodeset($table_attributes)/attribute">
6035
+ <xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
6036
+ <xsl:variable name="name" select="local-name()"/>
5912
6037
  <xsl:choose>
5913
- <xsl:when test="@name = 'border-top'">
5914
- <xsl:attribute name="{@name}">0pt solid black</xsl:attribute>
6038
+ <xsl:when test="$name = 'border-top'">
6039
+ <xsl:attribute name="{$name}">0pt solid black</xsl:attribute>
5915
6040
  </xsl:when>
5916
- <xsl:when test="@name = 'border'">
5917
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6041
+ <xsl:when test="$name = 'border'">
6042
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
5918
6043
  <xsl:attribute name="border-top">0pt solid black</xsl:attribute>
5919
6044
  </xsl:when>
5920
6045
  <xsl:otherwise>
5921
- <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
6046
+ <xsl:attribute name="{$name}"><xsl:value-of select="."/></xsl:attribute>
5922
6047
  </xsl:otherwise>
5923
6048
  </xsl:choose>
5924
6049
  </xsl:for-each>
@@ -5947,19 +6072,16 @@
5947
6072
 
5948
6073
  <fo:table-body>
5949
6074
  <fo:table-row>
5950
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
6075
+ <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
5951
6076
 
5952
6077
 
6078
+
5953
6079
 
5954
6080
 
5955
6081
  <!-- fn will be processed inside 'note' processing -->
5956
6082
 
5957
6083
 
5958
6084
 
5959
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
5960
-
5961
-
5962
-
5963
6085
  <xsl:if test="count(ancestor::bipm:table//*[local-name()='note']) &gt; 1">
5964
6086
  <fo:block font-weight="bold">
5965
6087
  <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
@@ -5973,35 +6095,20 @@
5973
6095
 
5974
6096
 
5975
6097
 
5976
-
5977
6098
  <!-- for BSI (not PAS) display Notes before footnotes -->
5978
6099
 
5979
6100
 
5980
- <!-- except gb -->
5981
-
5982
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
5983
-
6101
+ <!-- except gb and bsi -->
5984
6102
 
5985
- <!-- <xsl:if test="$namespace = 'bipm'">
5986
- <xsl:choose>
5987
- <xsl:when test="ancestor::*[local-name()='preface']">
5988
- show Note under table in preface (ex. abstract) sections
5989
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
5990
- </xsl:when>
5991
- <xsl:otherwise>
5992
- empty, because notes show at page side in main sections
5993
- <fo:block/>
5994
- </xsl:otherwise>
5995
- </xsl:choose>
5996
- </xsl:if> -->
6103
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
6104
+
5997
6105
 
5998
6106
 
5999
6107
  <!-- horizontal row separator -->
6000
6108
 
6001
6109
 
6002
6110
  <!-- fn processing -->
6003
- <xsl:call-template name="fn_display"/>
6004
-
6111
+ <xsl:call-template name="table_fn_display"/>
6005
6112
 
6006
6113
  <!-- for PAS display Notes after footnotes -->
6007
6114
 
@@ -6043,130 +6150,102 @@
6043
6150
 
6044
6151
 
6045
6152
  <xsl:apply-templates/>
6046
- <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
6047
-
6153
+
6048
6154
  </fo:table-body>
6049
6155
 
6050
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/text()[1]" priority="2" mode="presentation_name">
6051
- <xsl:choose>
6052
- <xsl:when test="substring-after(., '—') != ''">
6053
- <xsl:text>—</xsl:text><xsl:value-of select="substring-after(., '—')"/>
6054
- </xsl:when>
6055
- <xsl:otherwise>
6056
- <xsl:value-of select="."/>
6057
- </xsl:otherwise>
6058
- </xsl:choose>
6059
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']" mode="presentation_name">
6060
- <xsl:apply-templates mode="presentation_name"/>
6061
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='name']/node()" mode="presentation_name">
6062
- <xsl:apply-templates select="."/>
6063
- </xsl:template><xsl:template match="*[local-name()='tr']">
6064
- <xsl:variable name="parent-name" select="local-name(..)"/>
6065
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
6066
- <fo:table-row min-height="4mm">
6067
- <xsl:if test="$parent-name = 'thead'">
6068
- <xsl:attribute name="font-weight">bold</xsl:attribute>
6069
-
6070
-
6071
-
6072
-
6073
-
6074
-
6075
-
6076
-
6077
- </xsl:if>
6078
- <xsl:if test="$parent-name = 'tfoot'">
6079
-
6080
-
6081
-
6082
- </xsl:if>
6083
-
6084
-
6085
-
6086
-
6087
- <xsl:if test="count(*) = 1 and local-name(*[1]) = 'th'">
6088
- <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
6089
- </xsl:if>
6090
- <xsl:if test="not(ancestor::*[local-name()='note_side'])">
6091
- <xsl:attribute name="min-height">5mm</xsl:attribute>
6092
- </xsl:if>
6093
-
6094
-
6095
-
6096
-
6097
-
6098
-
6099
-
6100
- <!-- <xsl:if test="$namespace = 'bipm'">
6101
- <xsl:attribute name="height">8mm</xsl:attribute>
6102
- </xsl:if> -->
6103
-
6104
- <xsl:apply-templates/>
6105
- </fo:table-row>
6106
- </xsl:template><xsl:template match="*[local-name()='th']">
6107
- <fo:table-cell text-align="{@align}" font-weight="bold" border="solid black 1pt" padding-left="1mm" display-align="center">
6108
- <xsl:attribute name="text-align">
6109
- <xsl:choose>
6110
- <xsl:when test="@align">
6111
- <xsl:call-template name="setAlignment"/>
6112
- <!-- <xsl:value-of select="@align"/> -->
6113
- </xsl:when>
6114
- <xsl:otherwise>center</xsl:otherwise>
6115
- </xsl:choose>
6116
- </xsl:attribute>
6117
-
6156
+ </xsl:template><xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
6157
+ <fo:table-row xsl:use-attribute-sets="table-header-row-style">
6158
+
6118
6159
 
6119
6160
 
6120
6161
 
6162
+
6121
6163
 
6122
6164
 
6165
+ <xsl:call-template name="setTableRowAttributes"/>
6123
6166
 
6167
+ <xsl:apply-templates/>
6168
+ </fo:table-row>
6169
+ </xsl:template><xsl:template match="*[local-name()='tfoot']/*[local-name()='tr']" priority="2">
6170
+ <fo:table-row xsl:use-attribute-sets="table-footer-row-style">
6124
6171
 
6172
+ <xsl:call-template name="setTableRowAttributes"/>
6173
+ <xsl:apply-templates/>
6174
+ </fo:table-row>
6175
+ </xsl:template><xsl:template match="*[local-name()='tr']">
6176
+ <fo:table-row xsl:use-attribute-sets="table-body-row-style">
6177
+
6125
6178
 
6179
+
6126
6180
 
6181
+
6182
+ <xsl:call-template name="setTableRowAttributes"/>
6183
+ <xsl:apply-templates/>
6184
+ </fo:table-row>
6185
+ </xsl:template><xsl:template name="setTableRowAttributes">
6186
+
6187
+
6188
+ <xsl:if test="count(*) = 1 and local-name(*[1]) = 'th'">
6189
+ <xsl:attribute name="keep-with-next.within-page">always</xsl:attribute>
6190
+ </xsl:if>
6191
+ <xsl:if test="not(ancestor::*[local-name()='note_side'])">
6192
+ <xsl:attribute name="min-height">5mm</xsl:attribute>
6193
+ </xsl:if>
6194
+
6195
+
6196
+
6197
+
6198
+
6199
+
6200
+
6201
+ </xsl:template><xsl:template match="*[local-name()='th']">
6202
+ <fo:table-cell xsl:use-attribute-sets="table-header-cell-style"> <!-- text-align="{@align}" -->
6203
+ <xsl:call-template name="setTextAlignment">
6204
+ <xsl:with-param name="default">center</xsl:with-param>
6205
+ </xsl:call-template>
6127
6206
 
6128
6207
 
6129
- <xsl:attribute name="font-weight">normal</xsl:attribute>
6130
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
6131
- <!-- <xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute> -->
6132
- <xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
6133
- <xsl:attribute name="height">8mm</xsl:attribute>
6134
- <xsl:attribute name="padding-top">2mm</xsl:attribute>
6135
6208
  <xsl:if test="(ancestor::*[local-name() = 'annex'] and ancestor::*[local-name() = 'table']//*[local-name() = 'xref'][@pagenumber]) or ancestor::*[local-name() = 'doccontrol']"><!-- for Annex ToC -->
6136
6209
  <xsl:attribute name="border-top">solid black 0pt</xsl:attribute>
6137
6210
  <xsl:attribute name="border-bottom">solid black 0pt</xsl:attribute>
6138
6211
  </xsl:if>
6139
6212
  <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
6140
- <xsl:attribute name="text-align">
6141
- <xsl:choose>
6142
- <xsl:when test="@align">
6143
- <xsl:value-of select="@align"/>
6144
- </xsl:when>
6145
- <xsl:otherwise>left</xsl:otherwise>
6146
- </xsl:choose>
6147
- </xsl:attribute>
6213
+ <xsl:call-template name="setTextAlignment">
6214
+ <xsl:with-param name="default">left</xsl:with-param>
6215
+ </xsl:call-template>
6148
6216
  <xsl:attribute name="display-align">before</xsl:attribute>
6149
6217
  </xsl:if>
6150
6218
 
6151
6219
 
6220
+
6221
+
6222
+
6223
+
6224
+
6225
+
6226
+
6152
6227
  <xsl:if test="$lang = 'ar'">
6153
6228
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6154
6229
  </xsl:if>
6155
- <xsl:if test="@colspan">
6156
- <xsl:attribute name="number-columns-spanned">
6157
- <xsl:value-of select="@colspan"/>
6158
- </xsl:attribute>
6159
- </xsl:if>
6160
- <xsl:if test="@rowspan">
6161
- <xsl:attribute name="number-rows-spanned">
6162
- <xsl:value-of select="@rowspan"/>
6163
- </xsl:attribute>
6164
- </xsl:if>
6165
- <xsl:call-template name="display-align"/>
6230
+
6231
+ <xsl:call-template name="setTableCellAttributes"/>
6232
+
6166
6233
  <fo:block>
6167
6234
  <xsl:apply-templates/>
6168
6235
  </fo:block>
6169
6236
  </fo:table-cell>
6237
+ </xsl:template><xsl:template name="setTableCellAttributes">
6238
+ <xsl:if test="@colspan">
6239
+ <xsl:attribute name="number-columns-spanned">
6240
+ <xsl:value-of select="@colspan"/>
6241
+ </xsl:attribute>
6242
+ </xsl:if>
6243
+ <xsl:if test="@rowspan">
6244
+ <xsl:attribute name="number-rows-spanned">
6245
+ <xsl:value-of select="@rowspan"/>
6246
+ </xsl:attribute>
6247
+ </xsl:if>
6248
+ <xsl:call-template name="display-align"/>
6170
6249
  </xsl:template><xsl:template name="display-align">
6171
6250
  <xsl:if test="@valign">
6172
6251
  <xsl:attribute name="display-align">
@@ -6179,22 +6258,29 @@
6179
6258
  </xsl:attribute>
6180
6259
  </xsl:if>
6181
6260
  </xsl:template><xsl:template match="*[local-name()='td']">
6182
- <fo:table-cell text-align="{@align}" display-align="center" border="solid black 1pt" padding-left="1mm">
6183
- <xsl:attribute name="text-align">
6184
- <xsl:choose>
6185
- <xsl:when test="@align">
6186
- <xsl:call-template name="setAlignment"/>
6187
- <!-- <xsl:value-of select="@align"/> -->
6188
- </xsl:when>
6189
- <xsl:otherwise>left</xsl:otherwise>
6190
- </xsl:choose>
6191
- </xsl:attribute>
6261
+ <fo:table-cell xsl:use-attribute-sets="table-cell-style"> <!-- text-align="{@align}" -->
6262
+ <xsl:call-template name="setTextAlignment">
6263
+ <xsl:with-param name="default">left</xsl:with-param>
6264
+ </xsl:call-template>
6265
+
6192
6266
  <xsl:if test="$lang = 'ar'">
6193
6267
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6194
6268
  </xsl:if>
6195
6269
 
6196
6270
 
6271
+ <xsl:variable name="rownum"><xsl:number count="*[local-name()='tr']"/></xsl:variable>
6272
+ <xsl:if test="$rownum = 1">
6273
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
6274
+ </xsl:if>
6275
+ <xsl:if test="not(ancestor::*[local-name()='tr']/following-sibling::*[local-name()='tr'])"> <!-- last row -->
6276
+ <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
6277
+ </xsl:if>
6278
+ <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
6279
+ <xsl:attribute name="display-align">before</xsl:attribute>
6280
+ </xsl:if>
6281
+
6197
6282
 
6283
+ <!-- bsi -->
6198
6284
 
6199
6285
 
6200
6286
 
@@ -6203,38 +6289,21 @@
6203
6289
 
6204
6290
 
6205
6291
 
6292
+
6206
6293
 
6207
6294
 
6208
- <xsl:attribute name="border">solid 0pt white</xsl:attribute>
6209
- <xsl:variable name="rownum"><xsl:number count="*[local-name()='tr']"/></xsl:variable>
6210
- <xsl:if test="$rownum = 1">
6211
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
6212
- </xsl:if>
6213
- <xsl:if test="not(ancestor::*[local-name()='tr']/following-sibling::*[local-name()='tr'])"> <!-- last row -->
6214
- <xsl:attribute name="padding-bottom">2mm</xsl:attribute>
6215
- </xsl:if>
6216
- <xsl:if test="ancestor::*[local-name() = 'doccontrol']">
6217
- <xsl:attribute name="display-align">before</xsl:attribute>
6218
- </xsl:if>
6219
6295
 
6220
6296
 
6221
6297
 
6222
6298
 
6223
- <xsl:if test=".//*[local-name() = 'table']">
6299
+ <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
6224
6300
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
6225
6301
  </xsl:if>
6226
- <xsl:if test="@colspan">
6227
- <xsl:attribute name="number-columns-spanned">
6228
- <xsl:value-of select="@colspan"/>
6229
- </xsl:attribute>
6230
- </xsl:if>
6231
- <xsl:if test="@rowspan">
6232
- <xsl:attribute name="number-rows-spanned">
6233
- <xsl:value-of select="@rowspan"/>
6234
- </xsl:attribute>
6235
- </xsl:if>
6236
- <xsl:call-template name="display-align"/>
6302
+
6303
+ <xsl:call-template name="setTableCellAttributes"/>
6304
+
6237
6305
  <fo:block>
6306
+
6238
6307
 
6239
6308
  <xsl:if test="not(.//bipm:image)">
6240
6309
  <xsl:attribute name="line-stacking-strategy">font-height</xsl:attribute>
@@ -6244,53 +6313,49 @@
6244
6313
  <xsl:attribute name="text-indent">-3mm</xsl:attribute>
6245
6314
  <xsl:attribute name="start-indent">3mm</xsl:attribute>
6246
6315
  </xsl:if>
6247
-
6316
+
6317
+
6248
6318
  <xsl:apply-templates/>
6249
6319
  </fo:block>
6250
6320
  </fo:table-cell>
6251
6321
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
6322
+
6323
+ <fo:block xsl:use-attribute-sets="table-note-style">
6324
+
6325
+
6326
+ <xsl:if test="ancestor::bipm:preface">
6327
+ <xsl:attribute name="margin-top">18pt</xsl:attribute>
6328
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6329
+ </xsl:if>
6330
+
6331
+
6332
+
6252
6333
 
6253
-
6254
- <fo:block font-size="10pt" margin-bottom="12pt">
6255
-
6334
+ <!-- Table's note name (NOTE, for example) -->
6335
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
6256
6336
 
6257
6337
 
6258
-
6259
-
6260
-
6261
- <xsl:attribute name="text-align">justify</xsl:attribute>
6262
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
6263
6338
  <xsl:if test="ancestor::bipm:preface">
6264
- <xsl:attribute name="margin-top">18pt</xsl:attribute>
6265
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
6339
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
6266
6340
  </xsl:if>
6267
6341
 
6268
6342
 
6269
6343
 
6270
- <!-- Table's note name (NOTE, for example) -->
6271
-
6272
- <fo:inline padding-right="2mm" xsl:use-attribute-sets="table-note-name-style">
6273
-
6274
-
6275
-
6276
-
6277
- <xsl:if test="ancestor::bipm:preface">
6278
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
6279
- </xsl:if>
6280
-
6281
-
6282
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
6283
-
6284
- </fo:inline>
6285
-
6286
6344
 
6287
- <xsl:if test="ancestor::bipm:preface">
6288
- <fo:block> </fo:block>
6289
- </xsl:if>
6290
6345
 
6291
6346
 
6292
- <xsl:apply-templates mode="process"/>
6293
- </fo:block>
6347
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6348
+
6349
+ </fo:inline>
6350
+
6351
+
6352
+ <xsl:if test="ancestor::bipm:preface">
6353
+ <fo:block> </fo:block>
6354
+ </xsl:if>
6355
+
6356
+
6357
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
6358
+ </fo:block>
6294
6359
 
6295
6360
  </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
6296
6361
  <xsl:apply-templates/>
@@ -6370,8 +6435,7 @@
6370
6435
  <xsl:copy-of select="$footnote_inline"/>
6371
6436
  <fo:footnote-body>
6372
6437
 
6373
- <fo:block-container text-indent="0" start-indent="0">
6374
-
6438
+ <fo:block-container xsl:use-attribute-sets="fn-container-body-style">
6375
6439
 
6376
6440
  <fo:block xsl:use-attribute-sets="fn-body-style">
6377
6441
 
@@ -6390,7 +6454,7 @@
6390
6454
  <xsl:copy-of select="$footnote_inline"/>
6391
6455
  </xsl:otherwise>
6392
6456
  </xsl:choose>
6393
- </xsl:template><xsl:template name="fn_display">
6457
+ </xsl:template><xsl:template name="table_fn_display">
6394
6458
  <xsl:variable name="references">
6395
6459
 
6396
6460
  <xsl:for-each select="..//*[local-name()='fn'][local-name(..) != 'name']">
@@ -6401,43 +6465,30 @@
6401
6465
  <xsl:for-each select="xalan:nodeset($references)//fn">
6402
6466
  <xsl:variable name="reference" select="@reference"/>
6403
6467
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
6404
- <fo:block margin-bottom="12pt">
6468
+ <fo:block xsl:use-attribute-sets="table-fn-style">
6405
6469
 
6406
6470
 
6407
6471
 
6408
-
6409
-
6410
-
6411
-
6412
- <xsl:attribute name="font-size">9pt</xsl:attribute>
6413
- <xsl:attribute name="text-indent">-6.5mm</xsl:attribute>
6414
- <xsl:attribute name="margin-left">6.5mm</xsl:attribute>
6415
- <xsl:attribute name="margin-bottom">0pt</xsl:attribute>
6416
-
6417
- <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
6472
+ <fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
6418
6473
 
6419
6474
 
6420
6475
 
6421
6476
 
6477
+ <fo:inline font-style="normal">(</fo:inline>
6422
6478
 
6423
6479
 
6480
+ <xsl:value-of select="@reference"/>
6424
6481
 
6425
6482
 
6426
- <xsl:attribute name="font-style">italic</xsl:attribute>
6427
-
6428
- <xsl:attribute name="padding-right">2.5mm</xsl:attribute>
6429
- <fo:inline font-style="normal">(</fo:inline>
6483
+ <fo:inline font-style="normal">)</fo:inline>
6430
6484
 
6431
- <xsl:value-of select="@reference"/>
6432
6485
 
6433
- <fo:inline font-style="normal">)</fo:inline>
6434
6486
 
6435
6487
 
6436
6488
 
6437
- </fo:inline>
6438
- <fo:inline>
6439
6489
 
6440
- <!-- <xsl:apply-templates /> -->
6490
+ </fo:inline>
6491
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
6441
6492
  <xsl:copy-of select="./node()"/>
6442
6493
  </fo:inline>
6443
6494
  </fo:block>
@@ -6449,15 +6500,7 @@
6449
6500
 
6450
6501
  <xsl:apply-templates/>
6451
6502
  </fn>
6452
- </xsl:template><xsl:template name="fn_name_display">
6453
- <!-- <xsl:variable name="references">
6454
- <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
6455
- <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
6456
- <xsl:apply-templates />
6457
- </fn>
6458
- </xsl:for-each>
6459
- </xsl:variable>
6460
- $references=<xsl:copy-of select="$references"/> -->
6503
+ </xsl:template><xsl:template name="table_name_fn_display">
6461
6504
  <xsl:for-each select="*[local-name()='name']//*[local-name()='fn']">
6462
6505
  <xsl:variable name="reference" select="@reference"/>
6463
6506
  <fo:block id="{@reference}_{ancestor::*[@id][1]/@id}"><xsl:value-of select="@reference"/></fo:block>
@@ -6466,9 +6509,7 @@
6466
6509
  </fo:block>
6467
6510
  </xsl:for-each>
6468
6511
  </xsl:template><xsl:template name="fn_display_figure">
6469
- <xsl:variable name="key_iso">
6470
- <!-- and (not(@class) or @class !='pseudocode') -->
6471
- </xsl:variable>
6512
+
6472
6513
  <xsl:variable name="references">
6473
6514
  <xsl:for-each select=".//*[local-name()='fn'][not(parent::*[local-name()='name'])]">
6474
6515
  <fn reference="{@reference}" id="{@reference}_{ancestor::*[@id][1]/@id}">
@@ -6476,50 +6517,52 @@
6476
6517
  </fn>
6477
6518
  </xsl:for-each>
6478
6519
  </xsl:variable>
6520
+
6521
+ <xsl:if test="xalan:nodeset($references)//fn">
6479
6522
 
6480
- <!-- current hierarchy is 'figure' element -->
6481
- <xsl:variable name="following_dl_colwidths">
6482
- <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
6483
- <xsl:variable name="html-table">
6484
- <xsl:variable name="doc_ns">
6485
- bipm
6486
- </xsl:variable>
6487
- <xsl:variable name="ns">
6488
- <xsl:choose>
6489
- <xsl:when test="normalize-space($doc_ns) != ''">
6490
- <xsl:value-of select="normalize-space($doc_ns)"/>
6491
- </xsl:when>
6492
- <xsl:otherwise>
6493
- <xsl:value-of select="substring-before(name(/*), '-')"/>
6494
- </xsl:otherwise>
6495
- </xsl:choose>
6496
- </xsl:variable>
6497
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
6498
- <!-- <xsl:element name="{$ns}:table"> -->
6523
+ <xsl:variable name="key_iso">
6524
+
6525
+ </xsl:variable>
6526
+
6527
+ <!-- current hierarchy is 'figure' element -->
6528
+ <xsl:variable name="following_dl_colwidths">
6529
+ <xsl:if test="*[local-name() = 'dl']"><!-- if there is a 'dl', then set the same columns width as for 'dl' -->
6530
+ <xsl:variable name="html-table">
6531
+ <xsl:variable name="doc_ns">
6532
+ bipm
6533
+ </xsl:variable>
6534
+ <xsl:variable name="ns">
6535
+ <xsl:choose>
6536
+ <xsl:when test="normalize-space($doc_ns) != ''">
6537
+ <xsl:value-of select="normalize-space($doc_ns)"/>
6538
+ </xsl:when>
6539
+ <xsl:otherwise>
6540
+ <xsl:value-of select="substring-before(name(/*), '-')"/>
6541
+ </xsl:otherwise>
6542
+ </xsl:choose>
6543
+ </xsl:variable>
6544
+
6499
6545
  <xsl:for-each select="*[local-name() = 'dl'][1]">
6500
6546
  <tbody>
6501
6547
  <xsl:apply-templates mode="dl"/>
6502
6548
  </tbody>
6503
6549
  </xsl:for-each>
6504
- <!-- </xsl:element> -->
6505
- </xsl:variable>
6506
-
6507
- <xsl:call-template name="calculate-column-widths">
6508
- <xsl:with-param name="cols-count" select="2"/>
6509
- <xsl:with-param name="table" select="$html-table"/>
6510
- </xsl:call-template>
6511
-
6512
- </xsl:if>
6513
- </xsl:variable>
6514
-
6515
-
6516
- <xsl:variable name="maxlength_dt">
6517
- <xsl:for-each select="*[local-name() = 'dl'][1]">
6518
- <xsl:call-template name="getMaxLength_dt"/>
6519
- </xsl:for-each>
6520
- </xsl:variable>
6521
-
6522
- <xsl:if test="xalan:nodeset($references)//fn">
6550
+ </xsl:variable>
6551
+
6552
+ <xsl:call-template name="calculate-column-widths">
6553
+ <xsl:with-param name="cols-count" select="2"/>
6554
+ <xsl:with-param name="table" select="$html-table"/>
6555
+ </xsl:call-template>
6556
+
6557
+ </xsl:if>
6558
+ </xsl:variable>
6559
+
6560
+ <xsl:variable name="maxlength_dt">
6561
+ <xsl:for-each select="*[local-name() = 'dl'][1]">
6562
+ <xsl:call-template name="getMaxLength_dt"/>
6563
+ </xsl:for-each>
6564
+ </xsl:variable>
6565
+
6523
6566
  <fo:block>
6524
6567
  <fo:table width="95%" table-layout="fixed">
6525
6568
  <xsl:if test="normalize-space($key_iso) = 'true'">
@@ -6546,20 +6589,18 @@
6546
6589
  <fo:table-row>
6547
6590
  <fo:table-cell>
6548
6591
  <fo:block>
6549
- <fo:inline font-size="80%" padding-right="5mm" vertical-align="super" id="{@id}">
6550
-
6592
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fn-number-style">
6551
6593
  <xsl:value-of select="@reference"/>
6552
6594
  </fo:inline>
6553
6595
  </fo:block>
6554
6596
  </fo:table-cell>
6555
6597
  <fo:table-cell>
6556
- <fo:block text-align="justify" margin-bottom="12pt">
6557
-
6598
+ <fo:block xsl:use-attribute-sets="figure-fn-body-style">
6558
6599
  <xsl:if test="normalize-space($key_iso) = 'true'">
6559
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
6600
+
6601
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
6602
+
6560
6603
  </xsl:if>
6561
-
6562
- <!-- <xsl:apply-templates /> -->
6563
6604
  <xsl:copy-of select="./node()"/>
6564
6605
  </fo:block>
6565
6606
  </fo:table-cell>
@@ -6572,20 +6613,10 @@
6572
6613
  </xsl:if>
6573
6614
 
6574
6615
  </xsl:template><xsl:template match="*[local-name()='fn']">
6575
- <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
6576
- <fo:inline font-size="80%" keep-with-previous.within-line="always">
6577
-
6578
-
6579
-
6580
-
6581
-
6582
-
6583
-
6616
+ <fo:inline xsl:use-attribute-sets="fn-reference-style">
6617
+
6584
6618
 
6585
6619
 
6586
- <xsl:attribute name="font-size">70%</xsl:attribute>
6587
- <xsl:attribute name="vertical-align">super</xsl:attribute>
6588
- <xsl:attribute name="font-style">italic</xsl:attribute>
6589
6620
 
6590
6621
 
6591
6622
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
@@ -6611,13 +6642,13 @@
6611
6642
  <xsl:variable name="isDeleted" select="@deleted"/>
6612
6643
  <fo:block-container>
6613
6644
 
6614
-
6615
- <xsl:if test="not(ancestor::*[local-name() = 'li'])">
6616
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6617
- </xsl:if>
6618
- <xsl:if test="ancestor::*[local-name() = 'li']">
6619
- <xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
6620
- </xsl:if>
6645
+ <xsl:if test="not(ancestor::*[local-name() = 'li'])">
6646
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6647
+ </xsl:if>
6648
+ <xsl:if test="ancestor::*[local-name() = 'li']">
6649
+ <xsl:attribute name="margin-left">6.5mm</xsl:attribute><!-- 8 mm -->
6650
+ </xsl:if>
6651
+
6621
6652
 
6622
6653
  <xsl:if test="parent::*[local-name() = 'note']">
6623
6654
  <xsl:attribute name="margin-left">
@@ -6634,12 +6665,9 @@
6634
6665
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
6635
6666
  </xsl:call-template>
6636
6667
 
6637
- <fo:block-container>
6638
-
6668
+ <fo:block-container margin-left="0mm">
6669
+
6639
6670
 
6640
- <!-- <xsl:if test="not(ancestor::*[local-name() = 'li'])"> -->
6641
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
6642
- <!-- </xsl:if> -->
6643
6671
 
6644
6672
  <xsl:variable name="parent" select="local-name(..)"/>
6645
6673
 
@@ -6650,23 +6678,19 @@
6650
6678
  <xsl:choose>
6651
6679
  <xsl:when test="$parent = 'formula' and count(*[local-name()='dt']) = 1"> <!-- only one component -->
6652
6680
 
6653
-
6654
- <fo:block margin-bottom="12pt" text-align="left">
6655
-
6656
- <xsl:variable name="title-where">
6681
+ <fo:block margin-bottom="12pt" text-align="left">
6657
6682
 
6658
-
6659
- <xsl:call-template name="getTitle">
6660
- <xsl:with-param name="name" select="'title-where'"/>
6683
+ <xsl:variable name="title-where">
6684
+ <xsl:call-template name="getLocalizedString">
6685
+ <xsl:with-param name="key">where</xsl:with-param>
6661
6686
  </xsl:call-template>
6662
-
6663
- </xsl:variable>
6664
- <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
6665
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
6666
- <xsl:text/>
6667
- <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
6668
- </fo:block>
6669
-
6687
+ </xsl:variable>
6688
+ <xsl:value-of select="$title-where"/><xsl:text> </xsl:text>
6689
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
6690
+ <xsl:text/>
6691
+ <xsl:apply-templates select="*[local-name()='dd']/*" mode="inline"/>
6692
+ </fo:block>
6693
+
6670
6694
  </xsl:when>
6671
6695
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
6672
6696
  <fo:block margin-bottom="12pt" text-align="left">
@@ -6675,12 +6699,9 @@
6675
6699
 
6676
6700
 
6677
6701
  <xsl:variable name="title-where">
6678
-
6679
-
6680
- <xsl:call-template name="getTitle">
6681
- <xsl:with-param name="name" select="'title-where'"/>
6682
- </xsl:call-template>
6683
-
6702
+ <xsl:call-template name="getLocalizedString">
6703
+ <xsl:with-param name="key">where</xsl:with-param>
6704
+ </xsl:call-template>
6684
6705
  </xsl:variable>
6685
6706
  <xsl:value-of select="$title-where"/>
6686
6707
  </fo:block>
@@ -6692,12 +6713,9 @@
6692
6713
 
6693
6714
 
6694
6715
  <xsl:variable name="title-key">
6695
-
6696
-
6697
- <xsl:call-template name="getTitle">
6698
- <xsl:with-param name="name" select="'title-key'"/>
6699
- </xsl:call-template>
6700
-
6716
+ <xsl:call-template name="getLocalizedString">
6717
+ <xsl:with-param name="key">key</xsl:with-param>
6718
+ </xsl:call-template>
6701
6719
  </xsl:variable>
6702
6720
  <xsl:value-of select="$title-key"/>
6703
6721
  </fo:block>
@@ -6719,9 +6737,7 @@
6719
6737
  <fo:table width="95%" table-layout="fixed">
6720
6738
 
6721
6739
  <xsl:choose>
6722
- <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
6723
- <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
6724
- </xsl:when>
6740
+ <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
6725
6741
  <xsl:when test="normalize-space($key_iso) = 'true'">
6726
6742
  <xsl:attribute name="font-size">10pt</xsl:attribute>
6727
6743
 
@@ -6742,12 +6758,9 @@
6742
6758
  </xsl:otherwise>
6743
6759
  </xsl:choose>
6744
6760
  </xsl:variable>
6745
- <!-- <xsl:variable name="ns" select="substring-before(name(/*), '-')"/> -->
6746
- <!-- <xsl:element name="{$ns}:table"> -->
6747
- <tbody>
6748
- <xsl:apply-templates mode="dl"/>
6749
- </tbody>
6750
- <!-- </xsl:element> -->
6761
+ <tbody>
6762
+ <xsl:apply-templates mode="dl"/>
6763
+ </tbody>
6751
6764
  </xsl:variable>
6752
6765
  <!-- html-table<xsl:copy-of select="$html-table"/> -->
6753
6766
  <xsl:variable name="colwidths">
@@ -6827,8 +6840,6 @@
6827
6840
  </xsl:for-each>
6828
6841
  </xsl:otherwise>
6829
6842
  </xsl:choose>
6830
- <!-- <fo:table-column column-width="15%"/>
6831
- <fo:table-column column-width="85%"/> -->
6832
6843
  </xsl:otherwise>
6833
6844
  </xsl:choose>
6834
6845
  </xsl:template><xsl:template name="getMaxLength_dt">
@@ -6843,12 +6854,6 @@
6843
6854
  </xsl:for-each>
6844
6855
  </xsl:variable>
6845
6856
  <xsl:variable name="maxLength">
6846
- <!-- <xsl:for-each select="*[local-name()='dt']">
6847
- <xsl:sort select="string-length(normalize-space(.))" data-type="number" order="descending"/>
6848
- <xsl:if test="position() = 1">
6849
- <xsl:value-of select="string-length(normalize-space(.))"/>
6850
- </xsl:if>
6851
- </xsl:for-each> -->
6852
6857
  <xsl:for-each select="xalan:nodeset($lengths)/length">
6853
6858
  <xsl:sort select="." data-type="number" order="descending"/>
6854
6859
  <xsl:if test="position() = 1">
@@ -6874,12 +6879,12 @@
6874
6879
  <xsl:if test="normalize-space($key_iso) = 'true'">
6875
6880
  <xsl:attribute name="margin-top">0</xsl:attribute>
6876
6881
  </xsl:if>
6877
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
6882
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6878
6883
  </fo:block>
6879
6884
  </fo:table-cell>
6880
6885
  <fo:table-cell>
6881
6886
  <fo:block>
6882
- <xsl:apply-templates/>
6887
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6883
6888
  </fo:block>
6884
6889
  </fo:table-cell>
6885
6890
  </fo:table-row>
@@ -6890,82 +6895,41 @@
6890
6895
  </td>
6891
6896
  <td>
6892
6897
 
6893
-
6894
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
6895
-
6898
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
6899
+
6896
6900
  </td>
6897
6901
  </tr>
6898
6902
 
6899
6903
  </xsl:template><xsl:template match="*[local-name()='dt']">
6900
6904
  <xsl:param name="key_iso"/>
6901
6905
 
6902
- <fo:table-row>
6903
-
6904
-
6906
+ <fo:table-row xsl:use-attribute-sets="dt-row-style">
6905
6907
  <fo:table-cell>
6906
6908
 
6907
- <fo:block margin-top="6pt">
6909
+ <fo:block xsl:use-attribute-sets="dt-style">
6908
6910
  <xsl:copy-of select="@id"/>
6909
6911
 
6910
-
6911
6912
  <xsl:if test="normalize-space($key_iso) = 'true'">
6912
6913
  <xsl:attribute name="margin-top">0</xsl:attribute>
6913
-
6914
6914
  </xsl:if>
6915
6915
 
6916
6916
 
6917
6917
 
6918
-
6919
-
6920
-
6921
- <xsl:attribute name="margin-top">0pt</xsl:attribute>
6922
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
6923
-
6924
-
6925
6918
  <xsl:apply-templates/>
6926
- <!-- <xsl:if test="$namespace = 'gb'">
6927
- <xsl:if test="ancestor::*[local-name()='formula']">
6928
- <xsl:text>—</xsl:text>
6929
- </xsl:if>
6930
- </xsl:if> -->
6931
6919
  </fo:block>
6932
6920
  </fo:table-cell>
6933
6921
  <fo:table-cell>
6934
6922
  <fo:block>
6935
6923
 
6936
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
6937
- <xsl:if test="local-name(*[1]) != 'stem'">
6938
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
6939
- </xsl:if>
6940
- </xsl:if> -->
6941
-
6942
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
6943
-
6924
+
6925
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
6944
6926
  </fo:block>
6945
6927
  </fo:table-cell>
6946
6928
  </fo:table-row>
6947
- <!-- <xsl:if test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
6948
- <xsl:if test="local-name(*[1]) = 'stem'">
6949
- <fo:table-row>
6950
- <fo:table-cell>
6951
- <fo:block margin-top="6pt">
6952
- <xsl:if test="normalize-space($key_iso) = 'true'">
6953
- <xsl:attribute name="margin-top">0</xsl:attribute>
6954
- </xsl:if>
6955
- <xsl:text>&#xA0;</xsl:text>
6956
- </fo:block>
6957
- </fo:table-cell>
6958
- <fo:table-cell>
6959
- <fo:block>
6960
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
6961
- </fo:block>
6962
- </fo:table-cell>
6963
- </fo:table-row>
6964
- </xsl:if>
6965
- </xsl:if> -->
6966
6929
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
6967
6930
  <xsl:apply-templates/>
6968
6931
  </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
6932
+ <xsl:apply-templates select="@language"/>
6969
6933
  <xsl:apply-templates/>
6970
6934
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
6971
6935
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
@@ -6990,6 +6954,7 @@
6990
6954
  </fo:inline>
6991
6955
  </xsl:template><xsl:template match="*[local-name()='tt']">
6992
6956
  <fo:inline xsl:use-attribute-sets="tt-style">
6957
+
6993
6958
  <xsl:variable name="_font-size">
6994
6959
 
6995
6960
 
@@ -7026,7 +6991,22 @@
7026
6991
  <xsl:apply-templates/>
7027
6992
  </fo:inline>
7028
6993
  </xsl:template><xsl:template match="*[local-name()='add']">
6994
+ <xsl:param name="skip">true</xsl:param>
7029
6995
  <xsl:choose>
6996
+ <xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start -->
6997
+ <xsl:choose>
6998
+ <xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab'])) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
6999
+ <xsl:otherwise>
7000
+ <fo:inline>
7001
+ <xsl:call-template name="insertTag">
7002
+ <xsl:with-param name="type" select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end -->
7003
+ <xsl:with-param name="kind" select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
7004
+ <xsl:with-param name="value" select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
7005
+ </xsl:call-template>
7006
+ </fo:inline>
7007
+ </xsl:otherwise>
7008
+ </xsl:choose>
7009
+ </xsl:when>
7030
7010
  <xsl:when test="@amendment">
7031
7011
  <fo:inline>
7032
7012
  <xsl:call-template name="insertTag">
@@ -7061,7 +7041,6 @@
7061
7041
  </fo:inline>
7062
7042
  </xsl:otherwise>
7063
7043
  </xsl:choose>
7064
-
7065
7044
  </xsl:template><xsl:template name="insertTag">
7066
7045
  <xsl:param name="type"/>
7067
7046
  <xsl:param name="kind"/>
@@ -7069,22 +7048,20 @@
7069
7048
  <xsl:variable name="add_width" select="string-length($value) * 20"/>
7070
7049
  <xsl:variable name="maxwidth" select="60 + $add_width"/>
7071
7050
  <fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-20%"><!-- alignment-baseline="middle" -->
7072
- <!-- <xsl:attribute name="width">7mm</xsl:attribute>
7073
- <xsl:attribute name="content-height">100%</xsl:attribute> -->
7074
7051
  <xsl:attribute name="height">5mm</xsl:attribute>
7075
7052
  <xsl:attribute name="content-width">100%</xsl:attribute>
7076
7053
  <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
7077
7054
  <xsl:attribute name="scaling">uniform</xsl:attribute>
7078
7055
  <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
7079
7056
  <g>
7080
- <xsl:if test="$type = 'closing'">
7057
+ <xsl:if test="$type = 'closing' or $type = 'end'">
7081
7058
  <xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
7082
7059
  </xsl:if>
7083
7060
  <polyline points="0,0 {$maxwidth},0 {$maxwidth + 30},40 {$maxwidth},80 0,80 " stroke="black" stroke-width="5" fill="white"/>
7084
7061
  <line x1="0" y1="0" x2="0" y2="80" stroke="black" stroke-width="20"/>
7085
7062
  </g>
7086
7063
  <text font-family="Arial" x="15" y="57" font-size="40pt">
7087
- <xsl:if test="$type = 'closing'">
7064
+ <xsl:if test="$type = 'closing' or $type = 'end'">
7088
7065
  <xsl:attribute name="x">25</xsl:attribute>
7089
7066
  </xsl:if>
7090
7067
  <xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
@@ -7288,14 +7265,6 @@
7288
7265
 
7289
7266
  <xsl:copy-of select="xalan:nodeset($simple-table-rowspan)"/>
7290
7267
 
7291
- <!-- <xsl:choose>
7292
- <xsl:when test="current()//*[local-name()='th'][@colspan] or current()//*[local-name()='td'][@colspan] ">
7293
-
7294
- </xsl:when>
7295
- <xsl:otherwise>
7296
- <xsl:copy-of select="current()"/>
7297
- </xsl:otherwise>
7298
- </xsl:choose> -->
7299
7268
  </xsl:variable>
7300
7269
  <xsl:copy-of select="$simple-table"/>
7301
7270
  </xsl:template><xsl:template match="*[local-name()='thead'] | *[local-name()='tbody']" mode="simple-table-colspan">
@@ -7414,8 +7383,6 @@
7414
7383
  <xsl:choose>
7415
7384
  <xsl:when test="contains($str2, ' ')">
7416
7385
  <xsl:variable name="substr" select="substring-before($str2, ' ')"/>
7417
- <!-- <xsl:value-of select="translate(substring($substr, 1, 1), $lower, $upper)"/>
7418
- <xsl:value-of select="substring($substr, 2)"/> -->
7419
7386
  <xsl:call-template name="capitalize">
7420
7387
  <xsl:with-param name="str" select="$substr"/>
7421
7388
  </xsl:call-template>
@@ -7425,8 +7392,6 @@
7425
7392
  </xsl:call-template>
7426
7393
  </xsl:when>
7427
7394
  <xsl:otherwise>
7428
- <!-- <xsl:value-of select="translate(substring($str2, 1, 1), $lower, $upper)"/>
7429
- <xsl:value-of select="substring($str2, 2)"/> -->
7430
7395
  <xsl:call-template name="capitalize">
7431
7396
  <xsl:with-param name="str" select="$str2"/>
7432
7397
  </xsl:call-template>
@@ -7462,6 +7427,7 @@
7462
7427
  <xsl:apply-templates select="." mode="mathml"/>
7463
7428
  </xsl:variable>
7464
7429
  <fo:instream-foreign-object fox:alt-text="Math">
7430
+
7465
7431
 
7466
7432
  <xsl:if test="local-name(../..) = 'formula'">
7467
7433
  <xsl:attribute name="width">95%</xsl:attribute>
@@ -7473,12 +7439,10 @@
7473
7439
  <xsl:if test="$add_math_as_text = 'true'">
7474
7440
  <!-- <xsl:variable name="comment_text" select="following-sibling::node()[1][self::comment()]"/> -->
7475
7441
  <xsl:variable name="comment_text" select="normalize-space(translate(.,' ⁢',' '))"/>
7476
- <!-- <xsl:variable name="comment_text" select="normalize-space(.)"/> -->
7477
7442
  <xsl:if test="normalize-space($comment_text) != ''">
7478
7443
  <!-- put Mathin Alternate Text -->
7479
7444
  <xsl:attribute name="fox:alt-text">
7480
7445
  <xsl:value-of select="java:org.metanorma.fop.Util.unescape($comment_text)"/>
7481
- <!-- <xsl:value-of select="$comment_text"/> -->
7482
7446
  </xsl:attribute>
7483
7447
  </xsl:if>
7484
7448
  </xsl:if>
@@ -7513,7 +7477,7 @@
7513
7477
  </xsl:attribute>
7514
7478
 
7515
7479
 
7516
- <!-- <xsl:copy-of select="."/> -->
7480
+
7517
7481
  <xsl:copy-of select="xalan:nodeset($mathml)"/>
7518
7482
  </fo:instream-foreign-object>
7519
7483
  </fo:inline>
@@ -7572,6 +7536,10 @@
7572
7536
 
7573
7537
 
7574
7538
 
7539
+
7540
+
7541
+
7542
+
7575
7543
  <xsl:choose>
7576
7544
  <xsl:when test="$target_text = ''">
7577
7545
  <xsl:apply-templates/>
@@ -7605,9 +7573,9 @@
7605
7573
  <fo:inline role="H{$level}"><xsl:apply-templates/></fo:inline>
7606
7574
  </xsl:template><xsl:template match="*[local-name()='appendix']//*[local-name()='example']" priority="2">
7607
7575
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
7608
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
7576
+ <xsl:apply-templates select="*[local-name()='name']"/>
7609
7577
  </fo:block>
7610
- <xsl:apply-templates/>
7578
+ <xsl:apply-templates select="node()[not(local-name()='name')]"/>
7611
7579
  </xsl:template><xsl:template match="*[local-name() = 'callout']">
7612
7580
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link>
7613
7581
  </xsl:template><xsl:template match="*[local-name() = 'annotation']">
@@ -7629,7 +7597,6 @@
7629
7597
  </fo:inline>
7630
7598
  </xsl:template><xsl:template match="*[local-name() = 'xref']">
7631
7599
  <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
7632
-
7633
7600
  <xsl:apply-templates/>
7634
7601
  </fo:basic-link>
7635
7602
  </xsl:template><xsl:template match="*[local-name() = 'formula']" name="formula">
@@ -7657,61 +7624,76 @@
7657
7624
  <fo:inline>
7658
7625
  <xsl:apply-templates/>
7659
7626
  </fo:inline>
7660
- </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="presentation">
7627
+ </xsl:template><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'formula']/*[local-name() = 'name']" mode="formula_number"> <!-- show by demand -->
7661
7628
  <xsl:if test="normalize-space() != ''">
7662
7629
  <xsl:text>(</xsl:text><xsl:apply-templates/><xsl:text>)</xsl:text>
7663
7630
  </xsl:if>
7664
7631
  </xsl:template><xsl:template match="*[local-name() = 'note']" name="note">
7665
7632
 
7666
7633
  <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
7667
-
7668
-
7669
-
7670
-
7634
+
7671
7635
 
7672
7636
  <xsl:if test="parent::*[local-name() = 'li']">
7673
7637
  <xsl:attribute name="margin-top">4pt</xsl:attribute>
7674
7638
  <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
7675
7639
  </xsl:if>
7676
7640
 
7641
+
7642
+
7643
+
7644
+
7645
+
7646
+
7647
+
7648
+
7649
+
7677
7650
  <fo:block-container margin-left="0mm">
7651
+
7678
7652
 
7679
7653
 
7680
7654
 
7655
+
7681
7656
 
7682
-
7683
-
7684
-
7685
-
7686
- <fo:block>
7687
-
7688
-
7689
-
7690
-
7691
- <xsl:if test="@parent-type = 'quote'">
7692
- <xsl:attribute name="font-family">Arial</xsl:attribute>
7693
- <xsl:attribute name="font-size">9pt</xsl:attribute>
7694
- <xsl:attribute name="line-height">130%</xsl:attribute>
7695
- <xsl:attribute name="text-align">justify</xsl:attribute>
7696
- </xsl:if>
7697
-
7698
-
7657
+ <fo:block>
7658
+
7659
+
7660
+ <xsl:if test="@parent-type = 'quote'">
7661
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
7662
+ <xsl:attribute name="font-size">9pt</xsl:attribute>
7663
+ <xsl:attribute name="line-height">130%</xsl:attribute>
7664
+ <xsl:attribute name="text-align">justify</xsl:attribute>
7665
+ </xsl:if>
7666
+
7699
7667
 
7700
- <fo:inline xsl:use-attribute-sets="note-name-style">
7701
7668
 
7702
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
7703
- </fo:inline>
7704
- <xsl:apply-templates/>
7705
- </fo:block>
7706
-
7707
-
7669
+
7670
+
7671
+
7672
+ <fo:inline xsl:use-attribute-sets="note-name-style">
7673
+
7674
+
7675
+
7676
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
7677
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7678
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
7679
+ <xsl:with-param name="skip">false</xsl:with-param>
7680
+ </xsl:apply-templates>
7681
+ </xsl:if>
7682
+
7683
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7684
+
7685
+ </fo:inline>
7686
+
7687
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7688
+ </fo:block>
7689
+
7708
7690
  </fo:block-container>
7709
7691
  </fo:block-container>
7710
7692
 
7711
7693
  </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
7712
7694
  <xsl:variable name="num"><xsl:number/></xsl:variable>
7713
7695
  <xsl:choose>
7714
- <xsl:when test="$num = 1">
7696
+ <xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
7715
7697
  <fo:inline xsl:use-attribute-sets="note-p-style">
7716
7698
  <xsl:apply-templates/>
7717
7699
  </fo:inline>
@@ -7726,12 +7708,16 @@
7726
7708
  <fo:block id="{@id}" xsl:use-attribute-sets="termnote-style">
7727
7709
 
7728
7710
  <fo:inline xsl:use-attribute-sets="termnote-name-style">
7711
+
7712
+
7713
+
7714
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7729
7715
 
7730
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
7731
7716
  </fo:inline>
7732
- <xsl:apply-templates/>
7717
+
7718
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7733
7719
  </fo:block>
7734
- </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name'] | *[local-name() = 'termnote']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']" mode="presentation">
7720
+ </xsl:template><xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']">
7735
7721
  <xsl:param name="sfx"/>
7736
7722
  <xsl:variable name="suffix">
7737
7723
  <xsl:choose>
@@ -7750,7 +7736,7 @@
7750
7736
  <xsl:apply-templates/>
7751
7737
  <xsl:value-of select="$suffix"/>
7752
7738
  </xsl:if>
7753
- </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']" mode="presentation">
7739
+ </xsl:template><xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']">
7754
7740
  <xsl:param name="sfx"/>
7755
7741
  <xsl:variable name="suffix">
7756
7742
  <xsl:choose>
@@ -7777,25 +7763,23 @@
7777
7763
  <xsl:apply-templates/>
7778
7764
  </fo:block>
7779
7765
  </xsl:template><xsl:template match="*[local-name() = 'term']">
7780
- <!-- <xsl:message>'term' <xsl:number/> processing, name=<xsl:value-of select="iso:name"/>, preferred=<xsl:value-of select="iso:preferred"/>...</xsl:message> -->
7781
7766
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
7782
7767
 
7783
7768
 
7769
+
7770
+
7784
7771
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
7785
7772
 
7786
7773
  </xsl:if>
7787
- <xsl:apply-templates/>
7774
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7788
7775
  </fo:block>
7789
- </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']" mode="presentation">
7776
+ </xsl:template><xsl:template match="*[local-name() = 'term']/*[local-name() = 'name']">
7790
7777
  <xsl:if test="normalize-space() != ''">
7791
7778
  <xsl:variable name="level">
7792
7779
  <xsl:call-template name="getLevelTermName"/>
7793
7780
  </xsl:variable>
7794
7781
  <fo:inline role="H{$level}">
7795
7782
  <xsl:apply-templates/>
7796
- <!-- <xsl:if test="$namespace = 'gb' or $namespace = 'ogc'">
7797
- <xsl:text>.</xsl:text>
7798
- </xsl:if> -->
7799
7783
  </fo:inline>
7800
7784
  </xsl:if>
7801
7785
  </xsl:template><xsl:template match="*[local-name() = 'figure']" name="figure">
@@ -7812,9 +7796,10 @@
7812
7796
  <xsl:with-param name="isDeleted" select="$isDeleted"/>
7813
7797
  </xsl:call-template>
7814
7798
 
7815
- <fo:block>
7816
-
7817
- <xsl:apply-templates/>
7799
+
7800
+
7801
+ <fo:block xsl:use-attribute-sets="figure-style">
7802
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7818
7803
  </fo:block>
7819
7804
  <xsl:call-template name="fn_display_figure"/>
7820
7805
  <xsl:for-each select="*[local-name() = 'note']">
@@ -7822,14 +7807,15 @@
7822
7807
  </xsl:for-each>
7823
7808
 
7824
7809
 
7825
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
7810
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
7811
+
7826
7812
 
7827
7813
  </fo:block-container>
7828
7814
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']">
7829
7815
  <fo:block id="{@id}">
7830
- <xsl:apply-templates/>
7816
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
7831
7817
  </fo:block>
7832
- <xsl:apply-templates select="*[local-name() = 'name']" mode="presentation"/>
7818
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
7833
7819
  </xsl:template><xsl:template match="*[local-name() = 'figure'][@class = 'pseudocode']//*[local-name() = 'p']">
7834
7820
  <fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
7835
7821
  <xsl:apply-templates/>
@@ -7936,9 +7922,7 @@
7936
7922
  <xsl:variable name="bis" select="java:java.io.ByteArrayInputStream.new($fileContent)"/>
7937
7923
  <xsl:variable name="bufferedImage" select="java:javax.imageio.ImageIO.read($bis)"/>
7938
7924
  <xsl:variable name="width" select="java:getWidth($bufferedImage)"/>
7939
- <!-- width=<xsl:value-of select="$width"/> -->
7940
7925
  <xsl:variable name="height" select="java:getHeight($bufferedImage)"/>
7941
- <!-- height=<xsl:value-of select="$height"/> -->
7942
7926
  <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">
7943
7927
  <image xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="{@src}" height="{$height}" width="{$width}" style="overflow:visible;"/>
7944
7928
  <xsl:call-template name="svg_cross">
@@ -8208,7 +8192,7 @@
8208
8192
  </fo:basic-link>
8209
8193
  </fo:block>
8210
8194
  </fo:block-container>
8211
- </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
8195
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><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">
8212
8196
  <xsl:apply-templates mode="contents"/>
8213
8197
  <xsl:text> </xsl:text>
8214
8198
  </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'] | *[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="bookmarks">
@@ -8220,11 +8204,58 @@
8220
8204
  <xsl:value-of select="."/>
8221
8205
  </xsl:template><xsl:template match="node()" mode="contents">
8222
8206
  <xsl:apply-templates mode="contents"/>
8207
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
8208
+ <xsl:variable name="level">
8209
+ <xsl:call-template name="getLevel">
8210
+ <xsl:with-param name="depth" select="@depth"/>
8211
+ </xsl:call-template>
8212
+ </xsl:variable>
8213
+
8214
+ <xsl:variable name="section">
8215
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
8216
+ </xsl:variable>
8217
+
8218
+ <xsl:variable name="type">floating-title</xsl:variable>
8219
+
8220
+ <xsl:variable name="display">
8221
+ <xsl:choose>
8222
+ <xsl:when test="normalize-space(@id) = ''">false</xsl:when>
8223
+ <xsl:when test="$level &lt;= $toc_level">true</xsl:when>
8224
+ <xsl:otherwise>false</xsl:otherwise>
8225
+ </xsl:choose>
8226
+ </xsl:variable>
8227
+
8228
+ <xsl:variable name="skip">false</xsl:variable>
8229
+
8230
+ <xsl:if test="$skip = 'false'">
8231
+
8232
+ <xsl:variable name="title">
8233
+ <xsl:choose>
8234
+ <xsl:when test="*[local-name() = 'tab']">
8235
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
8236
+ </xsl:when>
8237
+ <xsl:otherwise>
8238
+ <xsl:copy-of select="node()"/>
8239
+ </xsl:otherwise>
8240
+ </xsl:choose>
8241
+ </xsl:variable>
8242
+
8243
+ <xsl:variable name="root">
8244
+ <xsl:if test="ancestor-or-self::*[local-name() = 'preface']">preface</xsl:if>
8245
+ <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
8246
+ </xsl:variable>
8247
+
8248
+ <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
8249
+ <title>
8250
+ <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
8251
+ </title>
8252
+ </item>
8253
+ </xsl:if>
8223
8254
  </xsl:template><xsl:template match="node()" mode="bookmarks">
8224
8255
  <xsl:apply-templates mode="bookmarks"/>
8225
8256
  </xsl:template><xsl:template match="*[local-name() = 'title' or local-name() = 'name']//*[local-name() = 'stem']" mode="contents">
8226
8257
  <xsl:apply-templates select="."/>
8227
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
8258
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/><xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/><xsl:template match="*[local-name() = 'stem']" mode="bookmarks">
8228
8259
  <xsl:apply-templates mode="bookmarks"/>
8229
8260
  </xsl:template><xsl:template name="addBookmarks">
8230
8261
  <xsl:param name="contents"/>
@@ -8314,8 +8345,6 @@
8314
8345
 
8315
8346
 
8316
8347
 
8317
-
8318
-
8319
8348
  </fo:bookmark-tree>
8320
8349
  </xsl:if>
8321
8350
  </xsl:template><xsl:template name="insertFigureBookmarks">
@@ -8400,7 +8429,7 @@
8400
8429
  <xsl:apply-templates mode="bookmark"/>
8401
8430
  </xsl:otherwise>
8402
8431
  </xsl:choose>
8403
- </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']" mode="presentation">
8432
+ </xsl:template><xsl:template match="title" mode="bookmark"/><xsl:template match="text()" mode="bookmark"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'image']/*[local-name() = 'name']">
8404
8433
  <xsl:if test="normalize-space() != ''">
8405
8434
  <fo:block xsl:use-attribute-sets="figure-name-style">
8406
8435
 
@@ -8409,16 +8438,13 @@
8409
8438
  </fo:block>
8410
8439
  </xsl:if>
8411
8440
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/><xsl:template match="*[local-name() = 'title']" mode="contents_item">
8412
- <xsl:apply-templates mode="contents_item"/>
8441
+ <xsl:param name="mode">bookmarks</xsl:param>
8442
+ <xsl:apply-templates mode="contents_item">
8443
+ <xsl:with-param name="mode" select="$mode"/>
8444
+ </xsl:apply-templates>
8413
8445
  <!-- <xsl:text> </xsl:text> -->
8414
8446
  </xsl:template><xsl:template name="getSection">
8415
8447
  <xsl:value-of select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
8416
- <!--
8417
- <xsl:for-each select="*[local-name() = 'title']/*[local-name() = 'tab'][1]/preceding-sibling::node()">
8418
- <xsl:value-of select="."/>
8419
- </xsl:for-each>
8420
- -->
8421
-
8422
8448
  </xsl:template><xsl:template name="getName">
8423
8449
  <xsl:choose>
8424
8450
  <xsl:when test="*[local-name() = 'title']/*[local-name() = 'tab']">
@@ -8482,9 +8508,26 @@
8482
8508
  <xsl:copy-of select="."/>
8483
8509
  </xsl:template><xsl:template match="*[local-name() = 'br']" mode="contents_item">
8484
8510
  <xsl:text> </xsl:text>
8511
+ </xsl:template><xsl:template match="*[local-name() = 'name']" mode="contents_item">
8512
+ <xsl:param name="mode">bookmarks</xsl:param>
8513
+ <xsl:apply-templates mode="contents_item">
8514
+ <xsl:with-param name="mode" select="$mode"/>
8515
+ </xsl:apply-templates>
8516
+ </xsl:template><xsl:template match="*[local-name() = 'add']" mode="contents_item">
8517
+ <xsl:param name="mode">bookmarks</xsl:param>
8518
+ <xsl:choose>
8519
+ <xsl:when test="starts-with(text(), $ace_tag)">
8520
+ <xsl:if test="$mode = 'contents'">
8521
+ <xsl:copy>
8522
+ <xsl:apply-templates mode="contents_item"/>
8523
+ </xsl:copy>
8524
+ </xsl:if>
8525
+ </xsl:when>
8526
+ <xsl:otherwise><xsl:apply-templates mode="contents_item"/></xsl:otherwise>
8527
+ </xsl:choose>
8485
8528
  </xsl:template><xsl:template match="*[local-name()='sourcecode']" name="sourcecode">
8486
8529
 
8487
- <fo:block-container margin-left="0mm">
8530
+ <fo:block-container xsl:use-attribute-sets="sourcecode-container-style">
8488
8531
  <xsl:copy-of select="@id"/>
8489
8532
 
8490
8533
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -8521,6 +8564,7 @@
8521
8564
 
8522
8565
 
8523
8566
  </xsl:variable>
8567
+
8524
8568
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
8525
8569
  <xsl:if test="$font-size != ''">
8526
8570
  <xsl:attribute name="font-size">
@@ -8537,11 +8581,11 @@
8537
8581
 
8538
8582
 
8539
8583
 
8540
- <xsl:apply-templates/>
8584
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8541
8585
  </fo:block>
8542
8586
 
8543
8587
 
8544
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8588
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
8545
8589
 
8546
8590
 
8547
8591
 
@@ -8555,7 +8599,7 @@
8555
8599
  <xsl:call-template name="add-zero-spaces-java">
8556
8600
  <xsl:with-param name="text" select="$text"/>
8557
8601
  </xsl:call-template>
8558
- </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']" mode="presentation">
8602
+ </xsl:template><xsl:template match="*[local-name() = 'sourcecode']/*[local-name() = 'name']">
8559
8603
  <xsl:if test="normalize-space() != ''">
8560
8604
  <fo:block xsl:use-attribute-sets="sourcecode-name-style">
8561
8605
  <xsl:apply-templates/>
@@ -8563,10 +8607,10 @@
8563
8607
  </xsl:if>
8564
8608
  </xsl:template><xsl:template match="*[local-name() = 'permission']">
8565
8609
  <fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
8566
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8567
- <xsl:apply-templates/>
8610
+ <xsl:apply-templates select="*[local-name()='name']"/>
8611
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8568
8612
  </fo:block>
8569
- </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']" mode="presentation">
8613
+ </xsl:template><xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
8570
8614
  <xsl:if test="normalize-space() != ''">
8571
8615
  <fo:block xsl:use-attribute-sets="permission-name-style">
8572
8616
  <xsl:apply-templates/>
@@ -8579,13 +8623,13 @@
8579
8623
  </fo:block>
8580
8624
  </xsl:template><xsl:template match="*[local-name() = 'requirement']">
8581
8625
  <fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
8582
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8583
- <xsl:apply-templates select="*[local-name()='label']" mode="presentation"/>
8584
- <xsl:apply-templates select="@obligation" mode="presentation"/>
8585
- <xsl:apply-templates select="*[local-name()='subject']" mode="presentation"/>
8586
- <xsl:apply-templates/>
8626
+ <xsl:apply-templates select="*[local-name()='name']"/>
8627
+ <xsl:apply-templates select="*[local-name()='label']"/>
8628
+ <xsl:apply-templates select="@obligation"/>
8629
+ <xsl:apply-templates select="*[local-name()='subject']"/>
8630
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'label') and not(local-name() = 'subject')]"/>
8587
8631
  </fo:block>
8588
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']" mode="presentation">
8632
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
8589
8633
  <xsl:if test="normalize-space() != ''">
8590
8634
  <fo:block xsl:use-attribute-sets="requirement-name-style">
8591
8635
 
@@ -8593,20 +8637,24 @@
8593
8637
 
8594
8638
  </fo:block>
8595
8639
  </xsl:if>
8596
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']" mode="presentation">
8640
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'label']">
8597
8641
  <fo:block xsl:use-attribute-sets="requirement-label-style">
8598
8642
  <xsl:apply-templates/>
8599
8643
  </fo:block>
8600
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation" mode="presentation">
8644
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/@obligation">
8601
8645
  <fo:block>
8602
8646
  <fo:inline padding-right="3mm">Obligation</fo:inline><xsl:value-of select="."/>
8603
8647
  </fo:block>
8648
+ </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2">
8649
+ <fo:block xsl:use-attribute-sets="subject-style">
8650
+ <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
8651
+ </fo:block>
8604
8652
  </xsl:template><xsl:template match="*[local-name() = 'recommendation']">
8605
8653
  <fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
8606
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8607
- <xsl:apply-templates/>
8654
+ <xsl:apply-templates select="*[local-name()='name']"/>
8655
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8608
8656
  </fo:block>
8609
- </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']" mode="presentation">
8657
+ </xsl:template><xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
8610
8658
  <xsl:if test="normalize-space() != ''">
8611
8659
  <fo:block xsl:use-attribute-sets="recommendation-name-style">
8612
8660
  <xsl:apply-templates/>
@@ -8617,10 +8665,6 @@
8617
8665
  <fo:block xsl:use-attribute-sets="recommendation-label-style">
8618
8666
  <xsl:apply-templates/>
8619
8667
  </fo:block>
8620
- </xsl:template><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" priority="2"/><xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'subject']" mode="presentation">
8621
- <fo:block xsl:use-attribute-sets="subject-style">
8622
- <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
8623
- </fo:block>
8624
8668
  </xsl:template><xsl:template match="*[local-name() = 'subject']">
8625
8669
  <fo:block xsl:use-attribute-sets="subject-style">
8626
8670
  <xsl:text>Target Type </xsl:text><xsl:apply-templates/>
@@ -8664,8 +8708,6 @@
8664
8708
  </xsl:variable>
8665
8709
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)//tr[1]/td)"/>
8666
8710
  <xsl:if test="$cols-count = 2 and not(ancestor::*[local-name()='table'])">
8667
- <!-- <fo:table-column column-width="35mm"/>
8668
- <fo:table-column column-width="115mm"/> -->
8669
8711
  <fo:table-column column-width="30%"/>
8670
8712
  <fo:table-column column-width="70%"/>
8671
8713
  </xsl:if>
@@ -8675,7 +8717,7 @@
8675
8717
  <xsl:if test=".//*[local-name() = 'fn']">
8676
8718
  <xsl:for-each select="*[local-name() = 'tbody']">
8677
8719
  <fo:block font-size="90%" border-bottom="1pt solid black">
8678
- <xsl:call-template name="fn_display"/>
8720
+ <xsl:call-template name="table_fn_display"/>
8679
8721
  </fo:block>
8680
8722
  </xsl:for-each>
8681
8723
  </xsl:if>
@@ -8692,7 +8734,6 @@
8692
8734
  </xsl:template><xsl:template match="*[local-name()='tr']" mode="requirement">
8693
8735
  <fo:table-row height="7mm" border-bottom="0.5pt solid grey">
8694
8736
  <xsl:if test="parent::*[local-name()='thead']"> <!-- and not(ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']) -->
8695
- <!-- <xsl:attribute name="border">1pt solid black</xsl:attribute> -->
8696
8737
  <xsl:attribute name="background-color">rgb(33, 55, 92)</xsl:attribute>
8697
8738
  </xsl:if>
8698
8739
  <xsl:if test="starts-with(*[local-name()='td'][1], 'Requirement ')">
@@ -8705,34 +8746,11 @@
8705
8746
  </fo:table-row>
8706
8747
  </xsl:template><xsl:template match="*[local-name()='th']" mode="requirement">
8707
8748
  <fo:table-cell text-align="{@align}" display-align="center" padding="1mm" padding-left="2mm"> <!-- border="0.5pt solid black" -->
8708
- <xsl:attribute name="text-align">
8709
- <xsl:choose>
8710
- <xsl:when test="@align">
8711
- <xsl:value-of select="@align"/>
8712
- </xsl:when>
8713
- <xsl:otherwise>left</xsl:otherwise>
8714
- </xsl:choose>
8715
- </xsl:attribute>
8716
- <xsl:if test="@colspan">
8717
- <xsl:attribute name="number-columns-spanned">
8718
- <xsl:value-of select="@colspan"/>
8719
- </xsl:attribute>
8720
- </xsl:if>
8721
- <xsl:if test="@rowspan">
8722
- <xsl:attribute name="number-rows-spanned">
8723
- <xsl:value-of select="@rowspan"/>
8724
- </xsl:attribute>
8725
- </xsl:if>
8726
- <xsl:call-template name="display-align"/>
8749
+ <xsl:call-template name="setTextAlignment">
8750
+ <xsl:with-param name="default">left</xsl:with-param>
8751
+ </xsl:call-template>
8727
8752
 
8728
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
8729
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
8730
- <xsl:attribute name="background-color">rgb(165, 165, 165)</xsl:attribute>
8731
- </xsl:if>
8732
- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommendtest'">
8733
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
8734
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
8735
- </xsl:if> -->
8753
+ <xsl:call-template name="setTableCellAttributes"/>
8736
8754
 
8737
8755
  <fo:block>
8738
8756
  <xsl:apply-templates/>
@@ -8744,37 +8762,15 @@
8744
8762
  <xsl:attribute name="padding">0mm</xsl:attribute>
8745
8763
  <xsl:attribute name="padding-left">0mm</xsl:attribute>
8746
8764
  </xsl:if>
8747
- <xsl:attribute name="text-align">
8748
- <xsl:choose>
8749
- <xsl:when test="@align">
8750
- <xsl:value-of select="@align"/>
8751
- </xsl:when>
8752
- <xsl:otherwise>left</xsl:otherwise>
8753
- </xsl:choose>
8754
- </xsl:attribute>
8765
+ <xsl:call-template name="setTextAlignment">
8766
+ <xsl:with-param name="default">left</xsl:with-param>
8767
+ </xsl:call-template>
8768
+
8755
8769
  <xsl:if test="following-sibling::*[local-name()='td'] and not(preceding-sibling::*[local-name()='td'])">
8756
8770
  <xsl:attribute name="font-weight">bold</xsl:attribute>
8757
8771
  </xsl:if>
8758
- <xsl:if test="@colspan">
8759
- <xsl:attribute name="number-columns-spanned">
8760
- <xsl:value-of select="@colspan"/>
8761
- </xsl:attribute>
8762
- </xsl:if>
8763
- <xsl:if test="@rowspan">
8764
- <xsl:attribute name="number-rows-spanned">
8765
- <xsl:value-of select="@rowspan"/>
8766
- </xsl:attribute>
8767
- </xsl:if>
8768
- <xsl:call-template name="display-align"/>
8769
8772
 
8770
- <!-- <xsl:if test="ancestor::*[local-name()='table']/@type = 'recommend'">
8771
- <xsl:attribute name="padding-left">0.5mm</xsl:attribute>
8772
- <xsl:attribute name="padding-top">0.5mm</xsl:attribute>
8773
- <xsl:if test="parent::*[local-name()='tr']/preceding-sibling::*[local-name()='tr'] and not(*[local-name()='table'])">
8774
- <xsl:attribute name="background-color">rgb(201, 201, 201)</xsl:attribute>
8775
- </xsl:if>
8776
- </xsl:if> -->
8777
- <!-- 2nd line and below -->
8773
+ <xsl:call-template name="setTableCellAttributes"/>
8778
8774
 
8779
8775
  <fo:block>
8780
8776
  <xsl:apply-templates/>
@@ -8786,15 +8782,15 @@
8786
8782
  <xsl:apply-templates/>
8787
8783
  </fo:block>
8788
8784
  </xsl:template><xsl:template match="*[local-name() = 'p2'][ancestor::*[local-name() = 'table'][@class = 'recommendation' or @class='requirement' or @class='permission']]">
8789
- <fo:block> <!-- margin-bottom="10pt" -->
8785
+ <fo:block>
8790
8786
  <xsl:apply-templates/>
8791
8787
  </fo:block>
8792
8788
  </xsl:template><xsl:template match="*[local-name() = 'termexample']">
8793
8789
  <fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
8794
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8795
- <xsl:apply-templates/>
8790
+ <xsl:apply-templates select="*[local-name()='name']"/>
8791
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
8796
8792
  </fo:block>
8797
- </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']" mode="presentation">
8793
+ </xsl:template><xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'name']">
8798
8794
  <xsl:if test="normalize-space() != ''">
8799
8795
  <fo:inline xsl:use-attribute-sets="termexample-name-style">
8800
8796
  <xsl:apply-templates/>
@@ -8818,42 +8814,46 @@
8818
8814
  <fo:block id="{@id}" xsl:use-attribute-sets="example-style">
8819
8815
 
8820
8816
 
8821
- <xsl:apply-templates select="*[local-name()='name']" mode="presentation"/>
8822
-
8823
- <xsl:variable name="element">
8824
- block
8825
-
8826
- <xsl:if test=".//*[local-name() = 'table']">block</xsl:if>
8817
+ <xsl:variable name="fo_element">
8818
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl']">block</xsl:if>
8819
+ block
8827
8820
  </xsl:variable>
8828
8821
 
8822
+ <!-- display 'EXAMPLE' -->
8823
+ <xsl:apply-templates select="*[local-name()='name']">
8824
+ <xsl:with-param name="fo_element" select="$fo_element"/>
8825
+ </xsl:apply-templates>
8826
+
8829
8827
  <xsl:choose>
8830
- <xsl:when test="contains(normalize-space($element), 'block')">
8831
- <fo:block xsl:use-attribute-sets="example-body-style">
8832
- <xsl:apply-templates/>
8833
- </fo:block>
8828
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
8829
+ <fo:block-container xsl:use-attribute-sets="example-body-style">
8830
+ <fo:block-container margin-left="0mm" margin-right="0mm">
8831
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
8832
+ <xsl:with-param name="fo_element" select="$fo_element"/>
8833
+ </xsl:apply-templates>
8834
+ </fo:block-container>
8835
+ </fo:block-container>
8834
8836
  </xsl:when>
8835
8837
  <xsl:otherwise>
8836
8838
  <fo:inline>
8837
- <xsl:apply-templates/>
8839
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
8840
+ <xsl:with-param name="fo_element" select="$fo_element"/>
8841
+ </xsl:apply-templates>
8838
8842
  </fo:inline>
8839
8843
  </xsl:otherwise>
8840
8844
  </xsl:choose>
8841
8845
 
8842
- </fo:block>
8843
- </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']" mode="presentation">
8844
-
8845
- <xsl:variable name="element">
8846
- block
8847
-
8848
- <xsl:if test="following-sibling::*[1][local-name() = 'table']">block</xsl:if>
8849
- </xsl:variable>
8846
+ </fo:block>
8847
+ </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'name']">
8848
+ <xsl:param name="fo_element">block</xsl:param>
8849
+
8850
8850
  <xsl:choose>
8851
8851
  <xsl:when test="ancestor::*[local-name() = 'appendix']">
8852
8852
  <fo:inline>
8853
8853
  <xsl:apply-templates/>
8854
8854
  </fo:inline>
8855
8855
  </xsl:when>
8856
- <xsl:when test="contains(normalize-space($element), 'block')">
8856
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
8857
8857
  <fo:block xsl:use-attribute-sets="example-name-style">
8858
8858
  <xsl:apply-templates/>
8859
8859
  </fo:block>
@@ -8866,14 +8866,15 @@
8866
8866
  </xsl:choose>
8867
8867
 
8868
8868
  </xsl:template><xsl:template match="*[local-name() = 'example']/*[local-name() = 'p']">
8869
+ <xsl:param name="fo_element">block</xsl:param>
8870
+
8869
8871
  <xsl:variable name="num"><xsl:number/></xsl:variable>
8870
8872
  <xsl:variable name="element">
8871
- block
8872
-
8873
8873
 
8874
+ <xsl:value-of select="$fo_element"/>
8874
8875
  </xsl:variable>
8875
8876
  <xsl:choose>
8876
- <xsl:when test="normalize-space($element) = 'block'">
8877
+ <xsl:when test="starts-with(normalize-space($element), 'block')">
8877
8878
  <fo:block xsl:use-attribute-sets="example-p-style">
8878
8879
 
8879
8880
  <xsl:apply-templates/>
@@ -8888,6 +8889,8 @@
8888
8889
  </xsl:template><xsl:template match="*[local-name() = 'termsource']" name="termsource">
8889
8890
  <fo:block xsl:use-attribute-sets="termsource-style">
8890
8891
 
8892
+
8893
+
8891
8894
  <!-- Example: [SOURCE: ISO 5127:2017, 3.1.6.02] -->
8892
8895
  <xsl:variable name="termsource_text">
8893
8896
  <xsl:apply-templates/>
@@ -8925,9 +8928,7 @@
8925
8928
  <xsl:value-of select="."/>
8926
8929
  </xsl:if>
8927
8930
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/*[local-name() = 'strong'][1][following-sibling::*[1][local-name() = 'origin']]/text()">
8928
- <fo:inline>
8929
-
8930
-
8931
+ <fo:inline xsl:use-attribute-sets="termsource-text-style">
8931
8932
  <xsl:value-of select="."/>
8932
8933
  </fo:inline>
8933
8934
  </xsl:template><xsl:template match="*[local-name() = 'origin']">
@@ -8941,12 +8942,9 @@
8941
8942
  </fo:basic-link>
8942
8943
  </xsl:template><xsl:template match="*[local-name() = 'modification']">
8943
8944
  <xsl:variable name="title-modified">
8944
-
8945
-
8946
- <xsl:call-template name="getTitle">
8947
- <xsl:with-param name="name" select="'title-modified'"/>
8948
- </xsl:call-template>
8949
-
8945
+ <xsl:call-template name="getLocalizedString">
8946
+ <xsl:with-param name="key">modified</xsl:with-param>
8947
+ </xsl:call-template>
8950
8948
  </xsl:variable>
8951
8949
 
8952
8950
  <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
@@ -8973,7 +8971,6 @@
8973
8971
  <fo:block-container margin-left="0mm">
8974
8972
 
8975
8973
  <fo:block xsl:use-attribute-sets="quote-style">
8976
- <!-- <xsl:apply-templates select=".//*[local-name() = 'p']"/> -->
8977
8974
 
8978
8975
  <xsl:apply-templates select="./node()[not(local-name() = 'author') and not(local-name() = 'source')]"/> <!-- process all nested nodes, except author and source -->
8979
8976
  </fo:block>
@@ -9016,15 +9013,13 @@
9016
9013
  </xsl:variable>
9017
9014
 
9018
9015
  <xsl:choose>
9019
- <xsl:when test="normalize-space($bibitemid) != ''">
9016
+ <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
9020
9017
  <fo:inline xsl:use-attribute-sets="eref-style">
9021
9018
  <xsl:if test="@type = 'footnote'">
9022
-
9023
- <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9024
- <xsl:attribute name="font-size">80%</xsl:attribute>
9025
- <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
9026
- <xsl:attribute name="vertical-align">super</xsl:attribute>
9027
-
9019
+ <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9020
+ <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
9021
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
9022
+ <xsl:attribute name="font-size">80%</xsl:attribute>
9028
9023
 
9029
9024
  </xsl:if>
9030
9025
 
@@ -9050,7 +9045,6 @@
9050
9045
  </xsl:if>
9051
9046
 
9052
9047
 
9053
-
9054
9048
  </xsl:if>
9055
9049
 
9056
9050
 
@@ -9108,8 +9102,6 @@
9108
9102
  </xsl:choose>
9109
9103
  </xsl:variable>
9110
9104
 
9111
- <!-- <xsl:variable name="language" select="//*[local-name()='bibdata']//*[local-name()='language']"/> -->
9112
-
9113
9105
  <xsl:choose>
9114
9106
  <xsl:when test="$lang = 'zh'">
9115
9107
  <fo:inline><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -9144,12 +9136,9 @@
9144
9136
  </fo:block>
9145
9137
  </xsl:template><xsl:template match="*[local-name() = 'deprecates']">
9146
9138
  <xsl:variable name="title-deprecated">
9147
-
9148
- <xsl:call-template name="getLocalizedString">
9149
- <xsl:with-param name="key">deprecated</xsl:with-param>
9150
- </xsl:call-template>
9151
-
9152
-
9139
+ <xsl:call-template name="getLocalizedString">
9140
+ <xsl:with-param name="key">deprecated</xsl:with-param>
9141
+ </xsl:call-template>
9153
9142
  </xsl:variable>
9154
9143
  <fo:block xsl:use-attribute-sets="deprecates-style">
9155
9144
  <xsl:value-of select="$title-deprecated"/>: <xsl:apply-templates/>
@@ -9158,6 +9147,8 @@
9158
9147
  <xsl:if test="*[local-name() = 'strong']">
9159
9148
  <xsl:attribute name="font-weight">normal</xsl:attribute>
9160
9149
  </xsl:if>
9150
+ </xsl:template><xsl:template match="*[local-name() = 'preferred']/text()[contains(., ';')] | *[local-name() = 'preferred']/*[local-name() = 'strong']/text()[contains(., ';')]">
9151
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.), ';', $linebreak)"/>
9161
9152
  </xsl:template><xsl:template match="*[local-name() = 'definition']">
9162
9153
  <fo:block xsl:use-attribute-sets="definition-style">
9163
9154
  <xsl:apply-templates/>
@@ -9166,7 +9157,6 @@
9166
9157
  <xsl:apply-templates/>
9167
9158
  </xsl:template><xsl:template match="*[local-name() = 'definition'][preceding-sibling::*[local-name() = 'domain']]/*[local-name() = 'p'][1]">
9168
9159
  <fo:inline> <xsl:apply-templates/></fo:inline>
9169
- <!-- <fo:block>&#xA0;</fo:block> -->
9170
9160
  <fo:block/>
9171
9161
  </xsl:template><xsl:template match="/*/*[local-name() = 'sections']/*" priority="2">
9172
9162
 
@@ -9204,11 +9194,6 @@
9204
9194
  <xsl:apply-templates/>
9205
9195
  </fo:block>
9206
9196
  </xsl:template><xsl:template match="*[local-name() = 'definitions']">
9207
- <fo:block id="{@id}">
9208
- <xsl:apply-templates/>
9209
- </fo:block>
9210
- </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="/*/*[local-name() = 'bibliography']/*[local-name() = 'references'][@normative='true']">
9211
-
9212
9197
  <fo:block id="{@id}">
9213
9198
  <xsl:apply-templates/>
9214
9199
  </fo:block>
@@ -9225,6 +9210,53 @@
9225
9210
  </xsl:template><xsl:template match="*[local-name() = 'name']/text()">
9226
9211
  <!-- 0xA0 to space replacement -->
9227
9212
  <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
9213
+ </xsl:template><xsl:variable name="ul_labels_">
9214
+
9215
+ <label level="1" font-size="15pt">•</label>
9216
+ <label level="2">−</label><!-- &#x2212; - minus sign. &#x2014; - en dash -->
9217
+ <label level="3" font-size="75%">o</label> <!-- white circle -->
9218
+
9219
+
9220
+
9221
+
9222
+
9223
+
9224
+
9225
+
9226
+
9227
+
9228
+
9229
+
9230
+
9231
+
9232
+
9233
+
9234
+
9235
+ </xsl:variable><xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/><xsl:template name="setULLabel">
9236
+ <xsl:variable name="list_level_" select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
9237
+ <xsl:variable name="list_level">
9238
+ <xsl:choose>
9239
+ <xsl:when test="$list_level_ &lt;= 3"><xsl:value-of select="$list_level_"/></xsl:when>
9240
+ <xsl:otherwise><xsl:value-of select="$list_level_ mod 3"/></xsl:otherwise>
9241
+ </xsl:choose>
9242
+ </xsl:variable>
9243
+ <xsl:choose>
9244
+ <xsl:when test="$ul_labels/label[not(@level)]"> <!-- one label for all levels -->
9245
+ <xsl:apply-templates select="$ul_labels/label[not(@level)]" mode="ul_labels"/>
9246
+ </xsl:when>
9247
+ <xsl:when test="$list_level mod 3 = 0">
9248
+ <xsl:apply-templates select="$ul_labels/label[@level = 3]" mode="ul_labels"/>
9249
+ </xsl:when>
9250
+ <xsl:when test="$list_level mod 2 = 0">
9251
+ <xsl:apply-templates select="$ul_labels/label[@level = 2]" mode="ul_labels"/>
9252
+ </xsl:when>
9253
+ <xsl:otherwise>
9254
+ <xsl:apply-templates select="$ul_labels/label[@level = 1]" mode="ul_labels"/>
9255
+ </xsl:otherwise>
9256
+ </xsl:choose>
9257
+ </xsl:template><xsl:template match="label" mode="ul_labels">
9258
+ <xsl:copy-of select="@*[not(local-name() = 'level')]"/>
9259
+ <xsl:value-of select="."/>
9228
9260
  </xsl:template><xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
9229
9261
  <xsl:choose>
9230
9262
  <xsl:when test="parent::*[local-name() = 'note'] or parent::*[local-name() = 'termnote']">
@@ -9433,49 +9465,110 @@
9433
9465
  <fo:table-cell border="1pt solid black" padding-left="1mm" padding-top="0.5mm">
9434
9466
  <fo:block><xsl:apply-templates/></fo:block>
9435
9467
  </fo:table-cell>
9436
- </xsl:template><xsl:template name="processBibitem">
9468
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3"/><xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/><xsl:template match="*[local-name() = 'references'][@normative='true']" priority="2">
9437
9469
 
9438
9470
 
9439
- <!-- start BIPM bibtem processing -->
9440
- <xsl:choose>
9441
- <xsl:when test="*[local-name() = 'formattedref']">
9442
- <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
9443
- </xsl:when>
9444
- <xsl:otherwise>
9445
- <xsl:variable name="docidentifier" select="*[local-name() = 'docidentifier'][not(@type = 'URN' or @type = 'metanorma' or @type = 'BIPM' or @type = 'ISBN' or @type = 'ISSN')]"/>
9446
-
9447
- <xsl:value-of select="$docidentifier"/>
9448
- <xsl:if test="$docidentifier != '' and *[local-name() = 'title']">, </xsl:if>
9449
-
9450
- <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
9451
-
9452
- <xsl:choose>
9453
- <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = $curr_lang]">
9454
- <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = $curr_lang]"/>
9455
- </xsl:when>
9456
- <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
9457
- <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
9458
- </xsl:when>
9459
- <xsl:otherwise>
9460
- <xsl:apply-templates select="*[local-name() = 'title']"/>
9461
- </xsl:otherwise>
9462
- </xsl:choose>
9463
-
9464
- </xsl:otherwise>
9465
- </xsl:choose>
9466
- <!-- end BIPM bibitem processing-->
9471
+
9472
+ <fo:block id="{@id}">
9473
+ <xsl:apply-templates/>
9474
+ </fo:block>
9475
+ </xsl:template><xsl:template match="*[local-name() = 'references']">
9476
+ <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
9477
+
9478
+ <fo:block break-after="page"/>
9479
+
9480
+ </xsl:if>
9481
+
9482
+ <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
9483
+ <xsl:if test="$namespace = 'csa' or $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'iso' or $namespace = 'itu'">
9484
+ <fo:block break-after="page"/>
9485
+ </xsl:if>
9486
+ </xsl:if> -->
9487
+
9488
+ <fo:block id="{@id}" xsl:use-attribute-sets="references-non-normative-style">
9489
+ <xsl:apply-templates/>
9490
+ </fo:block>
9467
9491
 
9468
9492
 
9469
-
9470
9493
 
9471
9494
 
9472
-
9495
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']">
9496
+ <xsl:call-template name="bibitem"/>
9497
+ </xsl:template><xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
9473
9498
 
9499
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
9500
+ <xsl:call-template name="processBibitem"/>
9501
+ </fo:block>
9502
+
9503
+
9504
+ </xsl:template><xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" priority="2">
9505
+
9506
+
9507
+ <fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-style">
9508
+ <fo:list-item>
9509
+ <fo:list-item-label end-indent="label-end()">
9510
+ <fo:block>
9511
+ <fo:inline>
9512
+ <xsl:value-of select="bipm:docidentifier[@type='metanorma-ordinal']"/>
9513
+ <xsl:if test="not(bipm:docidentifier[@type='metanorma-ordinal'])">
9514
+ <xsl:choose>
9515
+ <xsl:when test="bipm:docidentifier[@type='metanorma']">
9516
+ <xsl:value-of select="bipm:docidentifier[@type='metanorma']"/>
9517
+ </xsl:when>
9518
+ <xsl:otherwise>
9519
+ <xsl:number format="[1]"/>
9520
+ </xsl:otherwise>
9521
+ </xsl:choose>
9522
+ </xsl:if>
9523
+ </fo:inline>
9524
+ </fo:block>
9525
+ </fo:list-item-label>
9526
+ <fo:list-item-body start-indent="body-start()">
9527
+ <fo:block>
9528
+ <xsl:call-template name="processBibitem"/>
9529
+ </fo:block>
9530
+ </fo:list-item-body>
9531
+ </fo:list-item>
9532
+ </fo:list-block>
9533
+
9474
9534
 
9535
+ </xsl:template><xsl:template name="processBibitem">
9475
9536
 
9476
9537
 
9538
+ <!-- start BIPM bibitem processing -->
9539
+ <xsl:if test=".//bipm:fn">
9540
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
9541
+ </xsl:if>
9542
+ <xsl:choose>
9543
+ <xsl:when test="*[local-name() = 'formattedref']">
9544
+ <xsl:apply-templates select="*[local-name() = 'formattedref']"/>
9545
+ </xsl:when>
9546
+ <xsl:otherwise>
9547
+ <xsl:variable name="docidentifier" select="*[local-name() = 'docidentifier'][not(@type = 'URN' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'BIPM' or @type = 'ISBN' or @type = 'ISSN')]"/>
9548
+
9549
+ <xsl:value-of select="$docidentifier"/>
9550
+ <xsl:if test="$docidentifier != '' and *[local-name() = 'title']">, </xsl:if>
9551
+
9552
+ <xsl:variable name="curr_lang" select="ancestor::bipm:bipm-standard/bipm:bibdata/bipm:language"/>
9553
+
9554
+ <xsl:choose>
9555
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = $curr_lang]">
9556
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = $curr_lang]"/>
9557
+ </xsl:when>
9558
+ <xsl:when test="*[local-name() = 'title'][@type = 'main' and @language = 'en']">
9559
+ <xsl:apply-templates select="*[local-name() = 'title'][@type = 'main' and @language = 'en']"/>
9560
+ </xsl:when>
9561
+ <xsl:otherwise>
9562
+ <xsl:apply-templates select="*[local-name() = 'title']"/>
9563
+ </xsl:otherwise>
9564
+ </xsl:choose>
9565
+
9566
+ </xsl:otherwise>
9567
+ </xsl:choose>
9568
+ <!-- end BIPM bibitem processing-->
9569
+
9477
9570
  </xsl:template><xsl:template name="processBibitemDocId">
9478
- <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')]"/>
9571
+ <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
9479
9572
  <xsl:choose>
9480
9573
  <xsl:when test="normalize-space($_doc_ident) != ''">
9481
9574
  <!-- <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"/>
@@ -9489,7 +9582,7 @@
9489
9582
  <xsl:if test="$type != ''">
9490
9583
  <xsl:value-of select="$type"/><xsl:text> </xsl:text>
9491
9584
  </xsl:if> -->
9492
- <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma')]"/>
9585
+ <xsl:value-of select="*[local-name() = 'docidentifier'][not(@type = 'metanorma') and not(@type = 'metanorma-ordinal')]"/>
9493
9586
  </xsl:otherwise>
9494
9587
  </xsl:choose>
9495
9588
  </xsl:template><xsl:template name="processPersonalAuthor">
@@ -9530,6 +9623,55 @@
9530
9623
  <xsl:value-of select="substring(.,1,1)"/>
9531
9624
  </xsl:template><xsl:template match="*[local-name() = 'title']" mode="title">
9532
9625
  <fo:inline><xsl:apply-templates/></fo:inline>
9626
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'title']" priority="2">
9627
+ <!-- <fo:inline><xsl:apply-templates /></fo:inline> -->
9628
+ <fo:inline font-style="italic"> <!-- BIPM BSI CSD CSA GB IEC IHO ISO ITU JCGM -->
9629
+ <xsl:apply-templates/>
9630
+ </fo:inline>
9631
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
9632
+ <fo:footnote>
9633
+ <xsl:variable name="number">
9634
+
9635
+ <xsl:choose>
9636
+ <xsl:when test="ancestor::*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]">
9637
+ <xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
9638
+ </xsl:when>
9639
+ <xsl:otherwise>
9640
+ <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
9641
+ </xsl:otherwise>
9642
+ </xsl:choose>
9643
+
9644
+ </xsl:variable>
9645
+ <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
9646
+ <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
9647
+ <xsl:value-of select="$number"/>
9648
+
9649
+ </fo:basic-link>
9650
+ </fo:inline>
9651
+ <fo:footnote-body>
9652
+ <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
9653
+ <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
9654
+ <xsl:value-of select="$number"/>
9655
+
9656
+ </fo:inline>
9657
+ <xsl:apply-templates/>
9658
+ </fo:block>
9659
+ </fo:footnote-body>
9660
+ </fo:footnote>
9661
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'edition']"> <!-- for iho -->
9662
+ <xsl:text> edition </xsl:text>
9663
+ <xsl:value-of select="."/>
9664
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'uri']"> <!-- for iho -->
9665
+ <xsl:text> (</xsl:text>
9666
+ <fo:inline xsl:use-attribute-sets="link-style">
9667
+ <fo:basic-link external-destination="." fox:alt-text=".">
9668
+ <xsl:value-of select="."/>
9669
+ </fo:basic-link>
9670
+ </fo:inline>
9671
+ <xsl:text>)</xsl:text>
9672
+ </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'docidentifier']"/><xsl:template match="*[local-name() = 'formattedref']">
9673
+
9674
+ <xsl:apply-templates/>
9533
9675
  </xsl:template><xsl:template match="*[local-name() = 'form']">
9534
9676
  <fo:block>
9535
9677
  <xsl:apply-templates/>
@@ -9595,27 +9737,14 @@
9595
9737
  <fo:block> </fo:block>
9596
9738
  </fo:block-container>
9597
9739
  </xsl:template><xsl:variable name="toc_level">
9740
+ <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
9741
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
9742
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
9598
9743
  <xsl:choose>
9599
- <xsl:when test="1 = 2"/> <!-- to do https://github.com/metanorma/mn-native-pdf/issues/337: if there is value in xml -->
9744
+ <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
9745
+ <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
9600
9746
  <xsl:otherwise><!-- default value -->
9601
9747
  3
9602
-
9603
-
9604
-
9605
-
9606
-
9607
-
9608
-
9609
-
9610
-
9611
-
9612
-
9613
-
9614
-
9615
-
9616
-
9617
-
9618
-
9619
9748
  </xsl:otherwise>
9620
9749
  </xsl:choose>
9621
9750
  </xsl:variable><xsl:template match="*[local-name() = 'toc']">
@@ -9698,7 +9827,7 @@
9698
9827
  </td>
9699
9828
  </xsl:for-each>
9700
9829
  <td>333</td> <!-- page number, just for fill -->
9701
- </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
9830
+ </xsl:template><xsl:template match="*[local-name() = 'variant-title']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
9702
9831
  <fo:inline padding-right="5mm"> </fo:inline>
9703
9832
  <fo:inline><xsl:apply-templates/></fo:inline>
9704
9833
  </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
@@ -9709,6 +9838,66 @@
9709
9838
  </svg>
9710
9839
  </fo:instream-foreign-object>
9711
9840
  </fo:inline>
9841
+ </xsl:template><xsl:template match="@language">
9842
+ <xsl:copy-of select="."/>
9843
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
9844
+ <xsl:call-template name="title"/>
9845
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']">
9846
+
9847
+
9848
+
9849
+
9850
+
9851
+ <!-- text in the box -->
9852
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
9853
+
9854
+
9855
+
9856
+
9857
+
9858
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style">
9859
+
9860
+
9861
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
9862
+ <xsl:call-template name="displayAdmonitionName"/>
9863
+ </fo:block>
9864
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
9865
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9866
+ </fo:block>
9867
+
9868
+ </fo:block-container>
9869
+
9870
+ </fo:block-container>
9871
+
9872
+ </xsl:template><xsl:template name="displayAdmonitionName">
9873
+
9874
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9875
+ <xsl:if test="not(*[local-name() = 'name'])">
9876
+ <xsl:apply-templates select="@type"/>
9877
+ </xsl:if>
9878
+
9879
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
9880
+ <xsl:apply-templates/>
9881
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
9882
+ <xsl:variable name="admonition_type_">
9883
+ <xsl:call-template name="getLocalizedString">
9884
+ <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
9885
+ </xsl:call-template>
9886
+ </xsl:variable>
9887
+ <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
9888
+ <xsl:value-of select="$admonition_type"/>
9889
+ <xsl:if test="$admonition_type = ''">
9890
+ <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
9891
+ </xsl:if>
9892
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
9893
+
9894
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
9895
+
9896
+
9897
+
9898
+ <xsl:apply-templates/>
9899
+ </fo:block>
9900
+
9712
9901
  </xsl:template><xsl:template name="convertDate">
9713
9902
  <xsl:param name="date"/>
9714
9903
  <xsl:param name="format" select="'short'"/>
@@ -9717,78 +9906,39 @@
9717
9906
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
9718
9907
  <xsl:variable name="monthStr">
9719
9908
  <xsl:choose>
9720
- <xsl:when test="$month = '01'">January</xsl:when>
9721
- <xsl:when test="$month = '02'">February</xsl:when>
9722
- <xsl:when test="$month = '03'">March</xsl:when>
9723
- <xsl:when test="$month = '04'">April</xsl:when>
9724
- <xsl:when test="$month = '05'">May</xsl:when>
9725
- <xsl:when test="$month = '06'">June</xsl:when>
9726
- <xsl:when test="$month = '07'">July</xsl:when>
9727
- <xsl:when test="$month = '08'">August</xsl:when>
9728
- <xsl:when test="$month = '09'">September</xsl:when>
9729
- <xsl:when test="$month = '10'">October</xsl:when>
9730
- <xsl:when test="$month = '11'">November</xsl:when>
9731
- <xsl:when test="$month = '12'">December</xsl:when>
9909
+ <xsl:when test="$month = '01'">january</xsl:when>
9910
+ <xsl:when test="$month = '02'">february</xsl:when>
9911
+ <xsl:when test="$month = '03'">march</xsl:when>
9912
+ <xsl:when test="$month = '04'">april</xsl:when>
9913
+ <xsl:when test="$month = '05'">may</xsl:when>
9914
+ <xsl:when test="$month = '06'">june</xsl:when>
9915
+ <xsl:when test="$month = '07'">july</xsl:when>
9916
+ <xsl:when test="$month = '08'">august</xsl:when>
9917
+ <xsl:when test="$month = '09'">september</xsl:when>
9918
+ <xsl:when test="$month = '10'">october</xsl:when>
9919
+ <xsl:when test="$month = '11'">november</xsl:when>
9920
+ <xsl:when test="$month = '12'">december</xsl:when>
9732
9921
  </xsl:choose>
9733
9922
  </xsl:variable>
9734
- <xsl:variable name="result">
9735
- <xsl:choose>
9736
- <xsl:when test="$format = 'ddMMyyyy'">
9737
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
9738
- <xsl:text> </xsl:text>
9739
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
9740
- </xsl:when>
9741
- <xsl:when test="$format = 'ddMM'">
9742
- <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
9743
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
9744
- </xsl:when>
9745
- <xsl:when test="$format = 'short' or $day = ''">
9746
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
9747
- </xsl:when>
9748
- <xsl:otherwise>
9749
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
9750
- </xsl:otherwise>
9751
- </xsl:choose>
9752
- </xsl:variable>
9753
- <xsl:value-of select="$result"/>
9754
- </xsl:template><xsl:template name="convertDateLocalized">
9755
- <xsl:param name="date"/>
9756
- <xsl:param name="format" select="'short'"/>
9757
- <xsl:variable name="year" select="substring($date, 1, 4)"/>
9758
- <xsl:variable name="month" select="substring($date, 6, 2)"/>
9759
- <xsl:variable name="day" select="substring($date, 9, 2)"/>
9760
- <xsl:variable name="monthStr">
9761
- <xsl:choose>
9762
- <xsl:when test="$month = '01'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_january</xsl:with-param></xsl:call-template></xsl:when>
9763
- <xsl:when test="$month = '02'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_february</xsl:with-param></xsl:call-template></xsl:when>
9764
- <xsl:when test="$month = '03'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_march</xsl:with-param></xsl:call-template></xsl:when>
9765
- <xsl:when test="$month = '04'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_april</xsl:with-param></xsl:call-template></xsl:when>
9766
- <xsl:when test="$month = '05'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_may</xsl:with-param></xsl:call-template></xsl:when>
9767
- <xsl:when test="$month = '06'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_june</xsl:with-param></xsl:call-template></xsl:when>
9768
- <xsl:when test="$month = '07'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_july</xsl:with-param></xsl:call-template></xsl:when>
9769
- <xsl:when test="$month = '08'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_august</xsl:with-param></xsl:call-template></xsl:when>
9770
- <xsl:when test="$month = '09'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_september</xsl:with-param></xsl:call-template></xsl:when>
9771
- <xsl:when test="$month = '10'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_october</xsl:with-param></xsl:call-template></xsl:when>
9772
- <xsl:when test="$month = '11'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_november</xsl:with-param></xsl:call-template></xsl:when>
9773
- <xsl:when test="$month = '12'"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_december</xsl:with-param></xsl:call-template></xsl:when>
9774
- </xsl:choose>
9923
+ <xsl:variable name="monthStr_localized">
9924
+ <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
9775
9925
  </xsl:variable>
9776
9926
  <xsl:variable name="result">
9777
9927
  <xsl:choose>
9778
9928
  <xsl:when test="$format = 'ddMMyyyy'">
9779
9929
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
9780
9930
  <xsl:text> </xsl:text>
9781
- <xsl:value-of select="normalize-space(concat($monthStr, ' ' , $year))"/>
9931
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
9782
9932
  </xsl:when>
9783
9933
  <xsl:when test="$format = 'ddMM'">
9784
9934
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
9785
- <xsl:text> </xsl:text><xsl:value-of select="$monthStr"/>
9935
+ <xsl:text> </xsl:text><xsl:value-of select="$monthStr_localized"/>
9786
9936
  </xsl:when>
9787
9937
  <xsl:when test="$format = 'short' or $day = ''">
9788
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $year))"/>
9938
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
9789
9939
  </xsl:when>
9790
9940
  <xsl:otherwise>
9791
- <xsl:value-of select="normalize-space(concat($monthStr, ' ', $day, ', ' , $year))"/>
9941
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
9792
9942
  </xsl:otherwise>
9793
9943
  </xsl:choose>
9794
9944
  </xsl:variable>
@@ -9841,13 +9991,8 @@
9841
9991
  <xsl:variable name="title">
9842
9992
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
9843
9993
 
9844
-
9845
- <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
9846
-
9847
-
9848
-
9849
-
9850
-
9994
+ <xsl:value-of select="*[local-name() = 'title'][@language = $lang and @type = 'main']"/>
9995
+
9851
9996
  </xsl:for-each>
9852
9997
  </xsl:variable>
9853
9998
  <xsl:choose>
@@ -9862,21 +10007,18 @@
9862
10007
  <dc:creator>
9863
10008
  <xsl:for-each select="(//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']">
9864
10009
 
9865
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
9866
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
9867
- <xsl:if test="position() != last()">; </xsl:if>
9868
- </xsl:for-each>
9869
-
9870
-
9871
-
10010
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
10011
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
10012
+ <xsl:if test="position() != last()">; </xsl:if>
10013
+ </xsl:for-each>
10014
+
9872
10015
  </xsl:for-each>
9873
10016
  </dc:creator>
9874
10017
  <dc:description>
9875
10018
  <xsl:variable name="abstract">
9876
10019
 
9877
- <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
9878
-
9879
-
10020
+ <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()"/>
10021
+
9880
10022
  </xsl:variable>
9881
10023
  <xsl:value-of select="normalize-space($abstract)"/>
9882
10024
  </dc:description>
@@ -9896,7 +10038,6 @@
9896
10038
  <xsl:value-of select="../@id"/>
9897
10039
  </xsl:when>
9898
10040
  <xsl:otherwise>
9899
- <!-- <xsl:value-of select="concat(local-name(..), '_', text())"/> -->
9900
10041
  <xsl:value-of select="concat(generate-id(..), '_', text())"/>
9901
10042
  </xsl:otherwise>
9902
10043
  </xsl:choose>
@@ -9922,9 +10063,6 @@
9922
10063
  <xsl:when test="ancestor::*[local-name() = 'preface']">
9923
10064
  <xsl:value-of select="$level_total - 2"/>
9924
10065
  </xsl:when>
9925
- <!-- <xsl:when test="parent::*[local-name() = 'sections']">
9926
- <xsl:value-of select="$level_total - 1"/>
9927
- </xsl:when> -->
9928
10066
  <xsl:when test="ancestor::*[local-name() = 'sections']">
9929
10067
  <xsl:value-of select="$level_total - 1"/>
9930
10068
  </xsl:when>
@@ -10066,9 +10204,15 @@
10066
10204
  </xsl:template><xsl:template name="getLocalizedString">
10067
10205
  <xsl:param name="key"/>
10068
10206
  <xsl:param name="formatted">false</xsl:param>
10207
+ <xsl:param name="lang"/>
10069
10208
 
10070
10209
  <xsl:variable name="curr_lang">
10071
- <xsl:call-template name="getLang"/>
10210
+ <xsl:choose>
10211
+ <xsl:when test="$lang != ''"><xsl:value-of select="$lang"/></xsl:when>
10212
+ <xsl:otherwise>
10213
+ <xsl:call-template name="getLang"/>
10214
+ </xsl:otherwise>
10215
+ </xsl:choose>
10072
10216
  </xsl:variable>
10073
10217
 
10074
10218
  <xsl:variable name="data_value">
@@ -10108,7 +10252,6 @@
10108
10252
  <xsl:value-of select="$key_"/>
10109
10253
  </xsl:otherwise>
10110
10254
  </xsl:choose>
10111
-
10112
10255
  </xsl:template><xsl:template name="setTrackChangesStyles">
10113
10256
  <xsl:param name="isAdded"/>
10114
10257
  <xsl:param name="isDeleted"/>
@@ -10131,7 +10274,6 @@
10131
10274
  <xsl:if test="local-name() = 'table'">
10132
10275
  <xsl:attribute name="background-color">rgb(255, 185, 185)</xsl:attribute>
10133
10276
  </xsl:if>
10134
- <!-- <xsl:attribute name="color"><xsl:value-of select="$color-deleted-text"/></xsl:attribute> -->
10135
10277
  <xsl:attribute name="padding">2mm</xsl:attribute>
10136
10278
  </xsl:if>
10137
10279
  </xsl:otherwise>
@@ -10151,15 +10293,18 @@
10151
10293
  </xsl:choose>
10152
10294
  </xsl:template><xsl:template name="setTextAlignment">
10153
10295
  <xsl:param name="default">left</xsl:param>
10296
+ <xsl:variable name="align" select="normalize-space(@align)"/>
10154
10297
  <xsl:attribute name="text-align">
10155
10298
  <xsl:choose>
10156
- <xsl:when test="@align and not(@align = 'indent')"><xsl:value-of select="@align"/></xsl:when>
10299
+ <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
10300
+ <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
10301
+ <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
10157
10302
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
10158
10303
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
10159
10304
  <xsl:otherwise><xsl:value-of select="$default"/></xsl:otherwise>
10160
10305
  </xsl:choose>
10161
10306
  </xsl:attribute>
10162
- <xsl:if test="@align = 'indent'">
10307
+ <xsl:if test="$align = 'indent'">
10163
10308
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
10164
10309
  </xsl:if>
10165
10310
  </xsl:template><xsl:template name="number-to-words">