metanorma-itu 2.6.6 → 2.6.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:itu="https://www.metanorma.org/ns/standoc" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
1
+ <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:itu="https://www.metanorma.org/ns/standoc" xmlns:mn="https://www.metanorma.org/ns/xslt" xmlns:mathml="http://www.w3.org/1998/Math/MathML" xmlns:xalan="http://xml.apache.org/xalan" xmlns:fox="http://xmlgraphics.apache.org/fop/extensions" xmlns:redirect="http://xml.apache.org/xalan/redirect" xmlns:java="http://xml.apache.org/xalan/java" exclude-result-prefixes="java redirect" extension-element-prefixes="redirect" version="1.0">
2
2
 
3
3
  <xsl:output method="xml" encoding="UTF-8" indent="no"/>
4
4
 
@@ -32,8 +32,8 @@
32
32
  </xsl:variable>
33
33
 
34
34
  <xsl:for-each select="xalan:nodeset($current_document)">
35
- <doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
36
- <contents>
35
+ <mn:doc num="{$num}" firstpage_id="firstpage_id_{$num}" title-part="{$docnumber}" bundle="{$bundle}"> <!-- 'bundle' means several different documents (not language versions) in one xml -->
36
+ <mn:contents>
37
37
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
38
38
 
39
39
  <xsl:apply-templates select="//itu:table" mode="contents"/>
@@ -43,15 +43,14 @@
43
43
  <xsl:call-template name="processTablesFigures_Contents">
44
44
  <xsl:with-param name="always" select="$doctype = 'technical-report' or $doctype = 'technical-paper'"/>
45
45
  </xsl:call-template>
46
- </contents>
47
- </doc>
46
+ </mn:contents>
47
+ </mn:doc>
48
48
  </xsl:for-each>
49
49
  </xsl:for-each>
50
50
  </xsl:variable>
51
51
  <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
52
52
 
53
53
  <xsl:template match="/">
54
- <xsl:call-template name="namespaceCheck"/>
55
54
  <fo:root xml:lang="{$lang}">
56
55
  <xsl:variable name="root-style">
57
56
  <root-style xsl:use-attribute-sets="root-style">
@@ -495,267 +494,271 @@
495
494
  <fo:block id="firstpage_id_{$num}"> </fo:block>
496
495
  </fo:block-container>
497
496
 
498
- <fo:block-container font-size="22pt" font-weight="bold" color="{$color_cover_title}">
497
+ <fo:block-container margin-right="15.7mm">
499
498
 
500
- <xsl:call-template name="setWritingMode"/>
499
+ <fo:block-container font-size="22pt" font-weight="bold" color="{$color_cover_title}" margin-right="0mm">
501
500
 
502
- <xsl:choose>
501
+ <xsl:call-template name="setWritingMode"/>
503
502
 
504
- <xsl:when test="$doctype = 'service-publication'"> <!-- Flagship -->
505
- <fo:block margin-top="11.5mm" font-size="34pt">
506
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
507
- </fo:block>
508
- <fo:block margin-top="2mm" font-size="26pt">
509
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
510
- </fo:block>
511
- <!-- https://github.com/metanorma/metanorma-itu/issues/474#issuecomment-1966298384 -->
512
- <xsl:variable name="title_slogan" select="normalize-space(/itu:metanorma/itu:bibdata/itu:title[@type = 'slogan'])"/>
513
- <xsl:if test="$title_slogan != ''">
514
- <fo:block margin-top="2mm" font-family="Adelle Devanagari" font-size="26pt">
515
- <xsl:choose>
516
- <xsl:when test="$lang = 'ar'"><xsl:attribute name="font-family">Traditional Arabic</xsl:attribute></xsl:when>
517
- <xsl:when test="$lang = 'zh'"><xsl:attribute name="font-family">STKaiti</xsl:attribute></xsl:when>
518
- <!-- <xsl:otherwise><xsl:attribute name="font-style">italic</xsl:attribute></xsl:otherwise> -->
519
- </xsl:choose>
520
- <xsl:value-of select="$title_slogan"/>
503
+ <xsl:choose>
504
+
505
+ <xsl:when test="$doctype = 'service-publication'"> <!-- Flagship -->
506
+ <fo:block margin-top="11.5mm" font-size="34pt">
507
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
521
508
  </fo:block>
522
- </xsl:if>
523
- <xsl:variable name="year_published" select="substring($date_published,1,4)"/>
524
- <xsl:if test="$year_published != ''">
525
- <!-- Examples:
526
- 2020 edition
527
- Édition 2020
528
- Edición 2020
529
- طبعة 2020
530
- 2020 年版
531
- Издание 2020 года -->
532
- <fo:block margin-top="3mm" font-size="22pt">
533
- <xsl:choose>
534
- <xsl:when test="$lang = 'en' or $lang = 'ar' or $lang = 'zh'">
535
- <xsl:value-of select="concat($year_published, ' ', $i18n_edition)"/>
536
- </xsl:when>
537
- <xsl:otherwise>
538
- <xsl:value-of select="concat($i18n_edition_Capitalized, ' ', $year_published)"/>
539
- <xsl:if test="$lang = 'ru'"> года</xsl:if>
540
- </xsl:otherwise>
541
- </xsl:choose>
509
+ <fo:block margin-top="2mm" font-size="26pt">
510
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:title[@type = 'subtitle' and @language = $lang]"/>
542
511
  </fo:block>
543
- </xsl:if>
544
- </xsl:when> <!-- $doctype = 'service-publication' -->
545
-
546
- <xsl:otherwise>
547
- <fo:block margin-top="11.5mm">
548
- <xsl:choose>
549
- <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
550
- <!-- Example: ITU-T Technical Paper -->
551
- <xsl:value-of select="$docidentifier_ITU_left_part"/>
552
- <xsl:text> </xsl:text>
553
- <xsl:value-of select="$doctypeTitle"/>
554
- </xsl:when>
555
- <xsl:when test="$doctype = 'implementers-guide'">
556
- <xsl:value-of select="$docidentifier_ITU_left_part"/>
557
- <xsl:text> </xsl:text>
558
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
559
- <xsl:text> </xsl:text>
560
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
561
- </xsl:when>
562
- <xsl:when test="$doctype = 'resolution'">
563
- <xsl:value-of select="$doctypeTitle"/>
564
- <xsl:text> </xsl:text>
565
- <xsl:value-of select="$docidentifier_ITU_left_part"/>
566
- </xsl:when>
567
- <xsl:otherwise>
568
- <xsl:value-of select="$doctypeTitle"/>
569
- <xsl:text> </xsl:text>
570
- <xsl:value-of select="$docidentifier_ITU"/>
571
- </xsl:otherwise>
572
- </xsl:choose>
573
- </fo:block>
574
-
575
- <fo:block-container font-size="14pt" margin-top="1mm" margin-right="2mm">
576
- <xsl:if test="$bureau = 'T'">
577
- <xsl:attribute name="text-align">end</xsl:attribute>
512
+ <!-- https://github.com/metanorma/metanorma-itu/issues/474#issuecomment-1966298384 -->
513
+ <xsl:variable name="title_slogan" select="normalize-space(/itu:metanorma/itu:bibdata/itu:title[@type = 'slogan'])"/>
514
+ <xsl:if test="$title_slogan != ''">
515
+ <fo:block margin-top="2mm" font-family="Adelle Devanagari" font-size="26pt">
516
+ <xsl:choose>
517
+ <xsl:when test="$lang = 'ar'"><xsl:attribute name="font-family">Traditional Arabic</xsl:attribute></xsl:when>
518
+ <xsl:when test="$lang = 'zh'"><xsl:attribute name="font-family">STKaiti</xsl:attribute></xsl:when>
519
+ <!-- <xsl:otherwise><xsl:attribute name="font-style">italic</xsl:attribute></xsl:otherwise> -->
520
+ </xsl:choose>
521
+ <xsl:value-of select="$title_slogan"/>
522
+ </fo:block>
578
523
  </xsl:if>
579
- <fo:block-container margin-right="0mm">
580
-
581
- <xsl:variable name="additional_block">
582
- <!-- Examples:
583
- Amendment 1
584
- Supplement 37 -->
585
- <xsl:if test="$TDnumber != ''">
586
- <fo:block-container>
587
- <xsl:call-template name="setWritingMode"/>
588
- <fo:block>TD number: <xsl:value-of select="$TDnumber"/></fo:block>
589
- </fo:block-container>
590
- </xsl:if>
591
- <xsl:if test="$provisionalIdentifier != ''">
592
- <fo:block-container>
593
- <xsl:call-template name="setWritingMode"/>
594
- <fo:block>Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/>
595
- </fo:block>
596
- </fo:block-container>
597
- </xsl:if>
598
- <xsl:if test="$annexid != ''">
599
- <fo:block-container>
600
- <xsl:call-template name="setWritingMode"/>
601
- <fo:block>
602
- <xsl:value-of select="$i18n_annex"/>
603
- <xsl:text> </xsl:text>
604
- <xsl:value-of select="$annexid"/>
605
- </fo:block>
606
- </fo:block-container>
607
- </xsl:if>
608
- <xsl:if test="$isAmendment != ''">
609
- <fo:block-container>
610
- <xsl:call-template name="setWritingMode"/>
611
- <fo:block><xsl:value-of select="$isAmendment"/></fo:block>
612
- </fo:block-container>
613
- </xsl:if>
614
- <xsl:if test="$isCorrigendum != ''">
615
- <fo:block-container>
616
- <xsl:call-template name="setWritingMode"/>
617
- <fo:block><xsl:value-of select="$isCorrigendum"/></fo:block>
618
- </fo:block-container>
619
- </xsl:if>
620
-
621
- <!-- Date, example: (11/2018) -->
524
+ <xsl:variable name="year_published" select="substring($date_published,1,4)"/>
525
+ <xsl:if test="$year_published != ''">
526
+ <!-- Examples:
527
+ 2020 edition
528
+ Édition 2020
529
+ Edición 2020
530
+ طبعة 2020
531
+ 2020 年版
532
+ Издание 2020 года -->
533
+ <fo:block margin-top="3mm" font-size="22pt">
622
534
  <xsl:choose>
623
- <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:metanorma/itu:bibdata/itu:version/itu:revision-date">
624
- <xsl:call-template name="formatMeetingDate">
625
- <xsl:with-param name="date" select="/itu:metanorma/itu:bibdata/itu:version/itu:revision-date"/>
626
- <xsl:with-param name="inParenthesis">true</xsl:with-param>
627
- </xsl:call-template>
535
+ <xsl:when test="$lang = 'en' or $lang = 'ar' or $lang = 'zh'">
536
+ <xsl:value-of select="concat($year_published, ' ', $i18n_edition)"/>
628
537
  </xsl:when>
629
538
  <xsl:otherwise>
630
- <xsl:call-template name="formatDate">
631
- <xsl:with-param name="date" select="$date_published"/>
632
- </xsl:call-template>
539
+ <xsl:value-of select="concat($i18n_edition_Capitalized, ' ', $year_published)"/>
540
+ <xsl:if test="$lang = 'ru'"> года</xsl:if>
633
541
  </xsl:otherwise>
634
542
  </xsl:choose>
635
- </xsl:variable>
636
- <fo:block>
637
- <xsl:copy-of select="$additional_block"/>
638
- <xsl:if test="normalize-space($additional_block) = ''"> </xsl:if>
639
543
  </fo:block>
640
- </fo:block-container>
641
- </fo:block-container> <!-- end of additional block -->
544
+ </xsl:if>
545
+ </xsl:when> <!-- $doctype = 'service-publication' -->
642
546
 
643
- <xsl:if test="$doctype = 'resolution'">
644
- <fo:block margin-bottom="6pt">
645
- <xsl:call-template name="insertMeetingInfo"/>
547
+ <xsl:otherwise>
548
+ <fo:block margin-top="11.5mm">
549
+ <xsl:choose>
550
+ <xsl:when test="$doctype = 'technical-report' or $doctype = 'technical-paper'">
551
+ <!-- Example: ITU-T Technical Paper -->
552
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
553
+ <xsl:text> </xsl:text>
554
+ <xsl:value-of select="$doctypeTitle"/>
555
+ </xsl:when>
556
+ <xsl:when test="$doctype = 'implementers-guide'">
557
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
558
+ <xsl:text> </xsl:text>
559
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:docidentifier[@type='ITU-Recommendation']"/>
560
+ <xsl:text> </xsl:text>
561
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
562
+ </xsl:when>
563
+ <xsl:when test="$doctype = 'resolution'">
564
+ <xsl:value-of select="$doctypeTitle"/>
565
+ <xsl:text> </xsl:text>
566
+ <xsl:value-of select="$docidentifier_ITU_left_part"/>
567
+ </xsl:when>
568
+ <xsl:otherwise>
569
+ <xsl:value-of select="$doctypeTitle"/>
570
+ <xsl:text> </xsl:text>
571
+ <xsl:value-of select="$docidentifier_ITU"/>
572
+ </xsl:otherwise>
573
+ </xsl:choose>
646
574
  </fo:block>
647
- </xsl:if>
648
-
649
- <!-- Series: -->
650
- <xsl:variable name="series">
651
- <xsl:call-template name="insertSeriesTitleMain">
652
- <xsl:with-param name="i18n_series" select="$i18n_series"/>
653
- </xsl:call-template>
654
- <xsl:choose>
655
- <xsl:when test="$doctype = 'recommendation-supplement'"/>
656
- <xsl:otherwise>
657
- <xsl:if test="/itu:metanorma/itu:bibdata/itu:series">
658
- <fo:block font-weight="normal" margin-top="4mm">
659
- <xsl:call-template name="insertSeriesTitleAdditional"/>
660
- </fo:block>
661
- </xsl:if>
662
- </xsl:otherwise>
663
- </xsl:choose>
664
- </xsl:variable>
665
575
 
666
- <xsl:if test="normalize-space($series) != ''">
667
- <fo:block-container margin-right="5mm">
576
+ <fo:block-container font-size="14pt" margin-top="1mm" margin-right="2mm">
577
+ <xsl:if test="$bureau = 'T'">
578
+ <xsl:attribute name="text-align">end</xsl:attribute>
579
+ <xsl:attribute name="margin-right">-13.7mm</xsl:attribute>
580
+ </xsl:if>
668
581
  <fo:block-container margin-right="0mm">
669
- <fo:block font-size="18pt" margin-top="5mm">
670
- <xsl:copy-of select="$series"/>
671
- </fo:block>
582
+
583
+ <xsl:variable name="additional_block">
584
+ <!-- Examples:
585
+ Amendment 1
586
+ Supplement 37 -->
587
+ <xsl:if test="$TDnumber != ''">
588
+ <fo:block-container>
589
+ <xsl:call-template name="setWritingMode"/>
590
+ <fo:block>TD number: <xsl:value-of select="$TDnumber"/></fo:block>
591
+ </fo:block-container>
592
+ </xsl:if>
593
+ <xsl:if test="$provisionalIdentifier != ''">
594
+ <fo:block-container>
595
+ <xsl:call-template name="setWritingMode"/>
596
+ <fo:block>Provisional identifier: <xsl:value-of select="$provisionalIdentifier"/>
597
+ </fo:block>
598
+ </fo:block-container>
599
+ </xsl:if>
600
+ <xsl:if test="$annexid != ''">
601
+ <fo:block-container>
602
+ <xsl:call-template name="setWritingMode"/>
603
+ <fo:block>
604
+ <xsl:value-of select="$i18n_annex"/>
605
+ <xsl:text> </xsl:text>
606
+ <xsl:value-of select="$annexid"/>
607
+ </fo:block>
608
+ </fo:block-container>
609
+ </xsl:if>
610
+ <xsl:if test="$isAmendment != ''">
611
+ <fo:block-container>
612
+ <xsl:call-template name="setWritingMode"/>
613
+ <fo:block><xsl:value-of select="$isAmendment"/></fo:block>
614
+ </fo:block-container>
615
+ </xsl:if>
616
+ <xsl:if test="$isCorrigendum != ''">
617
+ <fo:block-container>
618
+ <xsl:call-template name="setWritingMode"/>
619
+ <fo:block><xsl:value-of select="$isCorrigendum"/></fo:block>
620
+ </fo:block-container>
621
+ </xsl:if>
622
+
623
+ <!-- Date, example: (11/2018) -->
624
+ <xsl:choose>
625
+ <xsl:when test="($doctype = 'technical-report' or $doctype = 'technical-paper') and /itu:metanorma/itu:bibdata/itu:version/itu:revision-date">
626
+ <xsl:call-template name="formatMeetingDate">
627
+ <xsl:with-param name="date" select="/itu:metanorma/itu:bibdata/itu:version/itu:revision-date"/>
628
+ <xsl:with-param name="inParenthesis">true</xsl:with-param>
629
+ </xsl:call-template>
630
+ </xsl:when>
631
+ <xsl:otherwise>
632
+ <xsl:call-template name="formatDate">
633
+ <xsl:with-param name="date" select="$date_published"/>
634
+ </xsl:call-template>
635
+ </xsl:otherwise>
636
+ </xsl:choose>
637
+ </xsl:variable>
672
638
  <fo:block>
673
- <fo:leader leader-pattern="rule" rule-thickness="1pt" leader-length="100%"/>
639
+ <xsl:copy-of select="$additional_block"/>
640
+ <xsl:if test="normalize-space($additional_block) = ''"> </xsl:if>
674
641
  </fo:block>
675
642
  </fo:block-container>
676
- </fo:block-container>
677
- </xsl:if>
643
+ </fo:block-container> <!-- end of additional block -->
678
644
 
679
- <fo:block role="H1">
680
- <!-- margin-top="24mm" -->
681
- <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and $docnumber != ''">
682
- <xsl:attribute name="margin-top">3mm</xsl:attribute>
683
- <xsl:value-of select="$docnumber"/>
645
+ <xsl:if test="$doctype = 'resolution'">
646
+ <fo:block margin-bottom="6pt">
647
+ <xsl:call-template name="insertMeetingInfo"/>
648
+ </fo:block>
684
649
  </xsl:if>
685
- </fo:block>
686
650
 
687
- <fo:block margin-top="3pt">
688
- <xsl:if test="$doctype = 'implementers-guide'">
689
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
690
- <xsl:text> for </xsl:text>
691
- </xsl:if>
692
- <xsl:if test="$doctype = 'resolution'">
693
- <!-- Resolution 1 -->
694
- <xsl:value-of select="$doctypeTitle"/>
695
- <xsl:text> </xsl:text>
696
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
697
- <xsl:value-of select="$en_dash_separator"/>
651
+ <!-- Series: -->
652
+ <xsl:variable name="series">
653
+ <xsl:call-template name="insertSeriesTitleMain">
654
+ <xsl:with-param name="i18n_series" select="$i18n_series"/>
655
+ </xsl:call-template>
656
+ <xsl:choose>
657
+ <xsl:when test="$doctype = 'recommendation-supplement'"/>
658
+ <xsl:otherwise>
659
+ <xsl:if test="/itu:metanorma/itu:bibdata/itu:series">
660
+ <fo:block font-weight="normal" margin-top="4mm">
661
+ <xsl:call-template name="insertSeriesTitleAdditional"/>
662
+ </fo:block>
663
+ </xsl:if>
664
+ </xsl:otherwise>
665
+ </xsl:choose>
666
+ </xsl:variable>
667
+
668
+ <xsl:if test="normalize-space($series) != ''">
669
+ <fo:block-container margin-right="5mm">
670
+ <fo:block-container margin-right="0mm">
671
+ <fo:block font-size="18pt" margin-top="5mm">
672
+ <xsl:copy-of select="$series"/>
673
+ </fo:block>
674
+ <fo:block>
675
+ <fo:leader leader-pattern="rule" rule-thickness="1pt" leader-length="100%"/>
676
+ </fo:block>
677
+ </fo:block-container>
678
+ </fo:block-container>
698
679
  </xsl:if>
699
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
700
- </fo:block>
701
680
 
702
- <!-- Example: Annex F1 - ... -->
703
- <xsl:for-each select="/itu:metanorma/itu:bibdata/itu:title[@type = 'annex' and @language = $lang]">
704
- <fo:block font-size="18pt" margin-top="3mm" role="H1">
705
- <xsl:value-of select="$i18n_annex"/>
706
- <xsl:text> </xsl:text>
707
- <xsl:value-of select="$annexid"/>
708
- <xsl:value-of select="$en_dash_separator"/>
709
- <xsl:value-of select="."/>
710
- </fo:block>
711
- </xsl:for-each>
712
-
713
- <!-- Example: Amendment 1 - ... -->
714
- <xsl:if test="$isAmendment != ''">
715
- <fo:block margin-top="3mm" role="H1">
716
- <xsl:value-of select="$isAmendment"/>
717
- <xsl:variable name="title_amendment" select="normalize-space(/itu:metanorma/itu:bibdata/itu:title[@type = 'amendment'])"/>
718
- <xsl:if test="$title_amendment != ''">
719
- <xsl:value-of select="$en_dash_separator"/>
720
- <xsl:value-of select="$title_amendment"/>
681
+ <fo:block role="H1">
682
+ <!-- margin-top="24mm" -->
683
+ <xsl:if test="($doctype = 'technical-report' or $doctype = 'technical-paper') and $docnumber != ''">
684
+ <xsl:attribute name="margin-top">3mm</xsl:attribute>
685
+ <xsl:value-of select="$docnumber"/>
721
686
  </xsl:if>
722
687
  </fo:block>
723
- </xsl:if>
724
- <!-- Example: Corrigendum 1 - ... -->
725
- <xsl:if test="$isCorrigendum != ''">
726
- <fo:block margin-top="3mm" role="H1">
727
- <xsl:value-of select="$isCorrigendum"/>
728
- <xsl:variable name="title_corrigendum" select="normalize-space(/itu:metanorma/itu:bibdata/itu:title[@type = 'corrigendum'])"/>
729
- <xsl:if test="$title_corrigendum != ''">
688
+
689
+ <fo:block margin-top="3pt">
690
+ <xsl:if test="$doctype = 'implementers-guide'">
691
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:ext/itu:doctype[@language = $lang]"/>
692
+ <xsl:text> for </xsl:text>
693
+ </xsl:if>
694
+ <xsl:if test="$doctype = 'resolution'">
695
+ <!-- Resolution 1 -->
696
+ <xsl:value-of select="$doctypeTitle"/>
697
+ <xsl:text> </xsl:text>
698
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:ext/itu:structuredidentifier/itu:docnumber"/>
730
699
  <xsl:value-of select="$en_dash_separator"/>
731
- <xsl:value-of select="$title_corrigendum"/>
732
700
  </xsl:if>
701
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:title[@type = 'main' and @language = $lang]"/>
733
702
  </fo:block>
734
- </xsl:if>
735
703
 
736
- <xsl:if test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]">
737
- <fo:block-container margin-left="1mm" margin-right="1mm" border="0.7mm solid black" margin-top="5mm">
738
- <fo:block-container margin-left="1mm" margin-right="1mm">
739
- <fo:block padding-top="3mm">
740
- <xsl:apply-templates select="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]" mode="caution"/>
741
- </fo:block>
704
+ <!-- Example: Annex F1 - ... -->
705
+ <xsl:for-each select="/itu:metanorma/itu:bibdata/itu:title[@type = 'annex' and @language = $lang]">
706
+ <fo:block font-size="18pt" margin-top="3mm" role="H1">
707
+ <xsl:value-of select="$i18n_annex"/>
708
+ <xsl:text> </xsl:text>
709
+ <xsl:value-of select="$annexid"/>
710
+ <xsl:value-of select="$en_dash_separator"/>
711
+ <xsl:value-of select="."/>
712
+ </fo:block>
713
+ </xsl:for-each>
714
+
715
+ <!-- Example: Amendment 1 - ... -->
716
+ <xsl:if test="$isAmendment != ''">
717
+ <fo:block margin-top="3mm" role="H1">
718
+ <xsl:value-of select="$isAmendment"/>
719
+ <xsl:variable name="title_amendment" select="normalize-space(/itu:metanorma/itu:bibdata/itu:title[@type = 'amendment'])"/>
720
+ <xsl:if test="$title_amendment != ''">
721
+ <xsl:value-of select="$en_dash_separator"/>
722
+ <xsl:value-of select="$title_amendment"/>
723
+ </xsl:if>
724
+ </fo:block>
725
+ </xsl:if>
726
+ <!-- Example: Corrigendum 1 - ... -->
727
+ <xsl:if test="$isCorrigendum != ''">
728
+ <fo:block margin-top="3mm" role="H1">
729
+ <xsl:value-of select="$isCorrigendum"/>
730
+ <xsl:variable name="title_corrigendum" select="normalize-space(/itu:metanorma/itu:bibdata/itu:title[@type = 'corrigendum'])"/>
731
+ <xsl:if test="$title_corrigendum != ''">
732
+ <xsl:value-of select="$en_dash_separator"/>
733
+ <xsl:value-of select="$title_corrigendum"/>
734
+ </xsl:if>
735
+ </fo:block>
736
+ </xsl:if>
737
+
738
+ <xsl:if test="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]">
739
+ <fo:block-container margin-left="1mm" margin-right="1mm" border="0.7mm solid black" margin-top="5mm">
740
+ <fo:block-container margin-left="1mm" margin-right="1mm">
741
+ <fo:block padding-top="3mm">
742
+ <xsl:apply-templates select="/itu:metanorma/itu:boilerplate/itu:legal-statement/itu:clause[starts-with(@id, 'draft-warning')]" mode="caution"/>
743
+ </fo:block>
744
+ </fo:block-container>
742
745
  </fo:block-container>
743
- </fo:block-container>
744
- </xsl:if>
746
+ </xsl:if>
745
747
 
746
- <xsl:if test="$doctype = 'recommendation-supplement'">
747
- <fo:block font-size="16pt" margin-top="3mm">
748
- <xsl:if test="/itu:metanorma/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
749
- <xsl:text>ITU-</xsl:text>
750
- <xsl:value-of select="$bureau"/>
751
- <xsl:text> </xsl:text>
752
- <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
753
- </fo:block>
754
- </xsl:if>
755
- </xsl:otherwise>
748
+ <xsl:if test="$doctype = 'recommendation-supplement'">
749
+ <fo:block font-size="16pt" margin-top="3mm">
750
+ <xsl:if test="/itu:metanorma/itu:bibdata/itu:status/itu:stage = 'draft'">Draft </xsl:if>
751
+ <xsl:text>ITU-</xsl:text>
752
+ <xsl:value-of select="$bureau"/>
753
+ <xsl:text> </xsl:text>
754
+ <xsl:value-of select="/itu:metanorma/itu:bibdata/itu:docidentifier[@type = 'ITU-Supplement']"/>
755
+ </fo:block>
756
+ </xsl:if>
757
+ </xsl:otherwise>
756
758
 
757
- </xsl:choose>
759
+ </xsl:choose>
758
760
 
761
+ </fo:block-container>
759
762
  </fo:block-container>
760
763
  </fo:flow>
761
764
  </fo:page-sequence>
@@ -1815,7 +1818,7 @@
1815
1818
  <fo:block role="TOC">
1816
1819
  <xsl:if test="count(*) = 1 and *[local-name() = 'title']"> <!-- if there isn't user ToC -->
1817
1820
 
1818
- <xsl:for-each select="$contents/doc[@num = $num]//item[@display = 'true']">
1821
+ <xsl:for-each select="$contents/mn:doc[@num = $num]//mn:item[@display = 'true']">
1819
1822
  <fo:block role="TOCI">
1820
1823
  <xsl:if test="@level = 1">
1821
1824
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
@@ -1854,8 +1857,8 @@
1854
1857
  </fo:list-item-label>
1855
1858
  <fo:list-item-body start-indent="body-start()">
1856
1859
  <fo:block text-align-last="justify">
1857
- <fo:basic-link internal-destination="{@id}" fox:alt-text="{title}">
1858
- <xsl:apply-templates select="title"/>
1860
+ <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:title}">
1861
+ <xsl:apply-templates select="mn:title"/>
1859
1862
  <fo:inline keep-together.within-line="always">
1860
1863
  <fo:leader leader-pattern="dots"/>
1861
1864
  <fo:page-number-citation ref-id="{@id}"/>
@@ -1871,7 +1874,7 @@
1871
1874
  <xsl:variable name="i18n_page"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">Page.sg</xsl:with-param><xsl:with-param name="bibdata_updated" select="/*/itu:bibdata"/></xsl:call-template></xsl:variable>
1872
1875
 
1873
1876
  <!-- List of Tables -->
1874
- <xsl:if test="$contents//tables/table">
1877
+ <xsl:if test="$contents//mn:tables/mn:table">
1875
1878
  <xsl:call-template name="insertListOf_Title">
1876
1879
  <xsl:with-param name="title" select="$title-list-tables"/>
1877
1880
  </xsl:call-template>
@@ -1879,14 +1882,14 @@
1879
1882
  <xsl:value-of select="$i18n_page"/>
1880
1883
  </fo:block>
1881
1884
  <fo:block-container>
1882
- <xsl:for-each select="$contents//tables/table">
1885
+ <xsl:for-each select="$contents//mn:tables/mn:table">
1883
1886
  <xsl:call-template name="insertListOf_Item"/>
1884
1887
  </xsl:for-each>
1885
1888
  </fo:block-container>
1886
1889
  </xsl:if>
1887
1890
 
1888
1891
  <!-- List of Figures -->
1889
- <xsl:if test="$contents//figures/figure">
1892
+ <xsl:if test="$contents//mn:figures/mn:figure">
1890
1893
  <xsl:call-template name="insertListOf_Title">
1891
1894
  <xsl:with-param name="title" select="$title-list-figures"/>
1892
1895
  </xsl:call-template>
@@ -1894,7 +1897,7 @@
1894
1897
  <xsl:value-of select="$i18n_page"/>
1895
1898
  </fo:block>
1896
1899
  <fo:block-container>
1897
- <xsl:for-each select="$contents//figures/figure">
1900
+ <xsl:for-each select="$contents//mn:figures/mn:figure">
1898
1901
  <xsl:call-template name="insertListOf_Item"/>
1899
1902
  </xsl:for-each>
1900
1903
  </fo:block-container>
@@ -2003,13 +2006,13 @@
2003
2006
  <xsl:call-template name="getName"/>
2004
2007
  </xsl:variable>
2005
2008
 
2006
- <item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2009
+ <mn:item level="{$level}" section="{$section}" type="{$type}" display="{$display}">
2007
2010
  <xsl:call-template name="setId"/>
2008
- <title>
2011
+ <mn:title>
2009
2012
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
2010
- </title>
2013
+ </mn:title>
2011
2014
  <xsl:apply-templates mode="contents"/>
2012
- </item>
2015
+ </mn:item>
2013
2016
 
2014
2017
  </xsl:if>
2015
2018
 
@@ -2973,7 +2976,7 @@
2973
2976
  </style>
2974
2977
  <g>
2975
2978
  <g>
2976
- <rect x="0.9" y="0.6" class="st0" width="612" height="16.5"/>
2979
+ <rect x="0" y="0.6" class="st0" width="612" height="16.5"/>
2977
2980
  </g>
2978
2981
  <xsl:choose>
2979
2982
  <xsl:when test="$lang = 'ar'">
@@ -3038,34 +3041,25 @@
3038
3041
  </xsl:if>
3039
3042
  </xsl:template>
3040
3043
 
3041
- <!-- <xsl:strip-space elements="itu:xref"/> -->
3044
+ <!-- https://www.metanorma.org/ns/standoc -->
3045
+ <xsl:variable name="namespace_full" select="namespace-uri(//*[local-name() = 'metanorma'][1])"/>
3042
3046
 
3043
- <xsl:variable name="namespace_full_">
3044
- <xsl:choose>
3045
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[local-name() = 'metanorma'][1])"/></xsl:when>
3046
- <xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/standoc -->
3047
- </xsl:choose>
3048
- </xsl:variable>
3049
- <xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
3047
+ <!-- https://www.metanorma.org/ns/xsl -->
3048
+ <xsl:variable name="namespace_mn_xsl">https://www.metanorma.org/ns/xslt</xsl:variable>
3050
3049
 
3051
- <xsl:variable name="root_element_">
3052
- <xsl:choose>
3053
- <xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[local-name() = 'metanorma'][1])"/></xsl:when>
3054
- <xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: metanorma (former iso-standard) -->
3055
- </xsl:choose>
3056
- </xsl:variable>
3057
- <xsl:variable name="root_element" select="normalize-space($root_element_)"/>
3050
+ <xsl:variable name="root_element">metanorma</xsl:variable>
3058
3051
 
3052
+ <!---examples: 2013, 2024 -->
3059
3053
  <xsl:variable name="document_scheme" select="normalize-space(//*[local-name() = 'metanorma']/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
3060
3054
 
3061
3055
  <!-- external parameters -->
3062
-
3063
3056
  <xsl:param name="svg_images"/> <!-- svg images array -->
3064
3057
  <xsl:variable name="images" select="document($svg_images)"/>
3065
3058
  <xsl:param name="basepath"/> <!-- base path for images -->
3066
3059
  <xsl:param name="inputxml_basepath"/> <!-- input xml file path -->
3067
3060
  <xsl:param name="inputxml_filename"/> <!-- input xml file name -->
3068
3061
  <xsl:param name="output_path"/> <!-- output PDF file name -->
3062
+ <xsl:param name="outputpdf_basepath"/> <!-- output PDF folder -->
3069
3063
  <xsl:param name="external_index"/><!-- path to index xml, generated on 1st pass, based on FOP Intermediate Format -->
3070
3064
  <xsl:param name="syntax-highlight">false</xsl:param> <!-- syntax highlighting feature, default - off -->
3071
3065
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
@@ -3112,20 +3106,13 @@
3112
3106
 
3113
3107
  <xsl:param name="table_if_debug">false</xsl:param> <!-- set 'true' to put debug width data before table or dl -->
3114
3108
 
3115
- <xsl:variable name="isApplyAutolayoutAlgorithm_">
3116
- true
3109
+ <!-- don't remove and rename this variable, it's using in mn2pdf tool -->
3110
+ <xsl:variable name="isApplyAutolayoutAlgorithm_">true
3117
3111
  </xsl:variable>
3118
3112
  <xsl:variable name="isApplyAutolayoutAlgorithm" select="normalize-space($isApplyAutolayoutAlgorithm_)"/>
3119
3113
 
3120
- <xsl:variable name="isGenerateTableIF_">
3121
- <xsl:choose>
3122
- <xsl:when test="$isApplyAutolayoutAlgorithm = 'true'">
3123
- <xsl:value-of select="normalize-space($table_if) = 'true'"/>
3124
- </xsl:when>
3125
- <xsl:otherwise>false</xsl:otherwise>
3126
- </xsl:choose>
3127
- </xsl:variable>
3128
- <xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/>
3114
+ <xsl:variable name="isGenerateTableIF"><xsl:value-of select="$table_if"/></xsl:variable>
3115
+ <!-- <xsl:variable name="isGenerateTableIF" select="normalize-space(normalize-space($table_if) = 'true' and 1 = 1)"/> -->
3129
3116
 
3130
3117
  <xsl:variable name="lang">
3131
3118
  <xsl:call-template name="getLang"/>
@@ -3177,8 +3164,7 @@
3177
3164
  <xsl:variable name="pageWidth_">
3178
3165
  <xsl:choose>
3179
3166
  <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
3180
- <xsl:otherwise>
3181
- 210
3167
+ <xsl:otherwise>210
3182
3168
  </xsl:otherwise>
3183
3169
  </xsl:choose>
3184
3170
  </xsl:variable>
@@ -3188,8 +3174,7 @@
3188
3174
  <xsl:variable name="pageHeight_">
3189
3175
  <xsl:choose>
3190
3176
  <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
3191
- <xsl:otherwise>
3192
- 297
3177
+ <xsl:otherwise>297
3193
3178
  </xsl:otherwise>
3194
3179
  </xsl:choose>
3195
3180
  </xsl:variable>
@@ -3198,23 +3183,19 @@
3198
3183
  <!-- Page margins in mm (just digits, without 'mm')-->
3199
3184
  <!-- marginLeftRight1 and marginLeftRight2 - is left or right margin depends on odd/even page,
3200
3185
  for example, left margin on odd page and right margin on even page -->
3201
- <xsl:variable name="marginLeftRight1_">
3202
- 20
3186
+ <xsl:variable name="marginLeftRight1_">20
3203
3187
  </xsl:variable>
3204
3188
  <xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/>
3205
3189
 
3206
- <xsl:variable name="marginLeftRight2_">
3207
- 20
3190
+ <xsl:variable name="marginLeftRight2_">20
3208
3191
  </xsl:variable>
3209
3192
  <xsl:variable name="marginLeftRight2" select="normalize-space($marginLeftRight2_)"/>
3210
3193
 
3211
- <xsl:variable name="marginTop_">
3212
- 20
3194
+ <xsl:variable name="marginTop_">20
3213
3195
  </xsl:variable>
3214
3196
  <xsl:variable name="marginTop" select="normalize-space($marginTop_)"/>
3215
3197
 
3216
- <xsl:variable name="marginBottom_">
3217
- 20
3198
+ <xsl:variable name="marginBottom_">20
3218
3199
  </xsl:variable>
3219
3200
  <xsl:variable name="marginBottom" select="normalize-space($marginBottom_)"/>
3220
3201
 
@@ -3263,13 +3244,10 @@
3263
3244
  <title-toc lang="zh">目次</title-toc>
3264
3245
 
3265
3246
  <title-part lang="en">
3266
-
3267
3247
  </title-part>
3268
3248
  <title-part lang="fr">
3269
-
3270
3249
  </title-part>
3271
3250
  <title-part lang="ru">
3272
-
3273
3251
  </title-part>
3274
3252
  <title-part lang="zh">第 # 部分:</title-part>
3275
3253
 
@@ -3323,6 +3301,7 @@
3323
3301
  <xsl:variable name="hair_space"> </xsl:variable>
3324
3302
  <xsl:variable name="en_dash">–</xsl:variable>
3325
3303
  <xsl:variable name="em_dash">—</xsl:variable>
3304
+ <xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
3326
3305
  <xsl:variable name="cr">&#13;</xsl:variable>
3327
3306
  <xsl:variable name="lf">
3328
3307
  </xsl:variable>
@@ -3364,11 +3343,9 @@
3364
3343
  <xsl:variable name="font_noto_sans_mono">Noto Sans Mono, Noto Sans Mono CJK HK, Noto Sans Mono CJK JP, Noto Sans Mono CJK KR, Noto Sans Mono CJK SC, Noto Sans Mono CJK TC</xsl:variable>
3365
3344
  <xsl:variable name="font_noto_serif">Noto Serif, Noto Serif HK, Noto Serif JP, Noto Serif KR, Noto Serif SC, Noto Serif TC</xsl:variable>
3366
3345
  <xsl:attribute-set name="root-style">
3367
-
3368
- <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
3369
- <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
3370
- <xsl:attribute name="font-size">12pt</xsl:attribute>
3371
-
3346
+ <xsl:attribute name="font-family">Times New Roman, STIX Two Math, <xsl:value-of select="$font_noto_serif"/></xsl:attribute>
3347
+ <xsl:attribute name="font-family-generic">Serif</xsl:attribute>
3348
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
3372
3349
  </xsl:attribute-set> <!-- root-style -->
3373
3350
 
3374
3351
  <xsl:template name="insertRootStyle">
@@ -3456,31 +3433,24 @@
3456
3433
 
3457
3434
  <!-- Preface sections styles -->
3458
3435
  <xsl:attribute-set name="copyright-statement-style">
3459
-
3460
3436
  </xsl:attribute-set> <!-- copyright-statement-style -->
3461
3437
 
3462
3438
  <xsl:attribute-set name="copyright-statement-title-style">
3463
-
3464
3439
  </xsl:attribute-set> <!-- copyright-statement-title-style -->
3465
3440
 
3466
3441
  <xsl:attribute-set name="copyright-statement-p-style">
3467
-
3468
3442
  </xsl:attribute-set> <!-- copyright-statement-p-style -->
3469
3443
 
3470
3444
  <xsl:attribute-set name="license-statement-style">
3471
-
3472
3445
  </xsl:attribute-set>
3473
3446
 
3474
3447
  <xsl:attribute-set name="license-statement-title-style">
3475
3448
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3476
-
3477
- <xsl:attribute name="text-align">center</xsl:attribute>
3478
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3479
-
3449
+ <xsl:attribute name="text-align">center</xsl:attribute>
3450
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3480
3451
  </xsl:attribute-set> <!-- license-statement-title-style -->
3481
3452
 
3482
3453
  <xsl:attribute-set name="license-statement-p-style">
3483
-
3484
3454
  </xsl:attribute-set> <!-- license-statement-p-style -->
3485
3455
 
3486
3456
  <xsl:attribute-set name="legal-statement-style">
@@ -3489,89 +3459,69 @@
3489
3459
 
3490
3460
  <xsl:attribute-set name="legal-statement-title-style">
3491
3461
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3492
-
3493
- <xsl:attribute name="text-align">center</xsl:attribute>
3494
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3495
-
3462
+ <xsl:attribute name="text-align">center</xsl:attribute>
3463
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3496
3464
  </xsl:attribute-set> <!-- legal-statement-title-style -->
3497
3465
 
3498
3466
  <xsl:attribute-set name="legal-statement-p-style">
3499
-
3500
3467
  </xsl:attribute-set> <!-- legal-statement-p-style -->
3501
3468
 
3502
3469
  <xsl:attribute-set name="feedback-statement-style">
3503
-
3504
3470
  </xsl:attribute-set> <!-- feedback-statement-style -->
3505
3471
 
3506
3472
  <xsl:attribute-set name="feedback-statement-title-style">
3507
3473
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3508
-
3509
3474
  </xsl:attribute-set> <!-- feedback-statement-title-style -->
3510
3475
 
3511
3476
  <xsl:attribute-set name="feedback-statement-p-style">
3512
-
3513
3477
  </xsl:attribute-set> <!-- feedback-statement-p-style -->
3514
3478
 
3515
3479
  <!-- End Preface sections styles -->
3516
3480
 
3517
3481
  <xsl:attribute-set name="link-style">
3518
-
3519
3482
  </xsl:attribute-set>
3520
3483
 
3521
3484
  <xsl:template name="refine_link-style">
3522
-
3523
3485
  </xsl:template> <!-- refine_link-style -->
3524
3486
 
3525
3487
  <xsl:attribute-set name="sourcecode-container-style">
3526
-
3527
3488
  </xsl:attribute-set>
3528
3489
 
3529
3490
  <xsl:attribute-set name="sourcecode-style">
3530
3491
  <xsl:attribute name="white-space">pre</xsl:attribute>
3531
3492
  <xsl:attribute name="wrap-option">wrap</xsl:attribute>
3532
3493
  <xsl:attribute name="role">Code</xsl:attribute>
3533
-
3534
- <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3535
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3536
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3537
-
3494
+ <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3495
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3496
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3538
3497
  </xsl:attribute-set>
3539
3498
 
3540
3499
  <xsl:template name="refine_sourcecode-style">
3541
-
3542
3500
  </xsl:template> <!-- refine_sourcecode-style -->
3543
3501
 
3544
3502
  <xsl:attribute-set name="pre-style">
3545
3503
  <xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
3546
3504
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3547
-
3548
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3549
-
3505
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3550
3506
  </xsl:attribute-set>
3551
3507
 
3552
3508
  <xsl:attribute-set name="permission-style">
3553
-
3554
3509
  </xsl:attribute-set>
3555
3510
 
3556
3511
  <xsl:attribute-set name="permission-name-style">
3557
-
3558
3512
  </xsl:attribute-set>
3559
3513
 
3560
3514
  <xsl:attribute-set name="permission-label-style">
3561
-
3562
3515
  </xsl:attribute-set>
3563
3516
 
3564
3517
  <xsl:attribute-set name="requirement-style">
3565
-
3566
3518
  </xsl:attribute-set>
3567
3519
 
3568
3520
  <xsl:attribute-set name="requirement-name-style">
3569
3521
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3570
-
3571
3522
  </xsl:attribute-set>
3572
3523
 
3573
3524
  <xsl:attribute-set name="requirement-label-style">
3574
-
3575
3525
  </xsl:attribute-set>
3576
3526
 
3577
3527
  <xsl:attribute-set name="subject-style">
@@ -3599,130 +3549,103 @@
3599
3549
  </xsl:attribute-set>
3600
3550
 
3601
3551
  <xsl:attribute-set name="recommendation-style">
3602
-
3603
3552
  </xsl:attribute-set>
3604
3553
 
3605
3554
  <xsl:attribute-set name="recommendation-name-style">
3606
-
3607
3555
  </xsl:attribute-set>
3608
3556
 
3609
3557
  <xsl:attribute-set name="recommendation-label-style">
3610
-
3611
3558
  </xsl:attribute-set>
3612
3559
 
3613
3560
  <xsl:attribute-set name="termexample-style">
3614
-
3615
3561
  </xsl:attribute-set>
3616
3562
 
3617
3563
  <xsl:template name="refine_termexample-style">
3618
-
3619
3564
  </xsl:template>
3620
3565
 
3621
3566
  <xsl:attribute-set name="example-style">
3622
-
3623
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3624
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
3625
-
3567
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3568
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
3626
3569
  </xsl:attribute-set> <!-- example-style -->
3627
3570
 
3628
3571
  <xsl:template name="refine_example-style">
3629
-
3630
3572
  </xsl:template> <!-- refine_example-style -->
3631
3573
 
3632
3574
  <xsl:attribute-set name="example-body-style">
3633
-
3634
3575
  </xsl:attribute-set> <!-- example-body-style -->
3635
3576
 
3636
3577
  <xsl:attribute-set name="example-name-style">
3637
-
3638
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
3639
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3640
-
3578
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
3579
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3641
3580
  </xsl:attribute-set> <!-- example-name-style -->
3642
3581
 
3643
3582
  <xsl:template name="refine_example-name-style">
3644
-
3645
3583
  </xsl:template>
3646
3584
 
3647
3585
  <xsl:attribute-set name="example-p-style">
3648
-
3649
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3650
- <xsl:attribute name="margin-top">12pt</xsl:attribute>
3651
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3586
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3587
+ <xsl:attribute name="margin-top">12pt</xsl:attribute>
3588
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3652
3589
 
3653
3590
  </xsl:attribute-set> <!-- example-p-style -->
3654
3591
 
3655
3592
  <xsl:template name="refine_example-p-style">
3656
-
3657
3593
  </xsl:template> <!-- refine_example-p-style -->
3658
3594
 
3659
3595
  <xsl:attribute-set name="termexample-name-style">
3660
-
3661
3596
  </xsl:attribute-set> <!-- termexample-name-style -->
3662
3597
 
3663
3598
  <xsl:template name="refine_termexample-name-style">
3664
-
3665
3599
  </xsl:template>
3666
3600
 
3667
3601
  <!-- ========================== -->
3668
3602
  <!-- Table styles -->
3669
3603
  <!-- ========================== -->
3670
3604
  <xsl:variable name="table-border_">
3671
-
3672
3605
  </xsl:variable>
3673
3606
  <xsl:variable name="table-border" select="normalize-space($table-border_)"/>
3674
3607
 
3675
3608
  <xsl:variable name="table-cell-border_">
3676
-
3677
3609
  </xsl:variable>
3678
3610
  <xsl:variable name="table-cell-border" select="normalize-space($table-cell-border_)"/>
3679
3611
 
3680
3612
  <xsl:attribute-set name="table-container-style">
3681
3613
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
3682
3614
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
3683
-
3684
- <xsl:attribute name="font-size">10pt</xsl:attribute>
3685
- <xsl:attribute name="space-after">18pt</xsl:attribute>
3686
-
3615
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
3616
+ <xsl:attribute name="space-after">18pt</xsl:attribute>
3687
3617
  </xsl:attribute-set> <!-- table-container-style -->
3688
3618
 
3689
3619
  <xsl:template name="refine_table-container-style">
3690
3620
  <xsl:param name="margin-side"/>
3691
-
3692
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3693
- <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3694
- <xsl:attribute name="font-family">Calibri</xsl:attribute>
3695
- </xsl:if>
3696
-
3621
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3622
+ <xsl:if test="$doctype = 'service-publication' and $lang != 'ar'">
3623
+ <xsl:attribute name="font-family">Calibri</xsl:attribute>
3624
+ </xsl:if>
3697
3625
  <!-- end table block-container attributes -->
3698
3626
  </xsl:template> <!-- refine_table-container-style -->
3699
3627
 
3700
3628
  <xsl:attribute-set name="table-style">
3701
3629
  <xsl:attribute name="table-omit-footer-at-break">true</xsl:attribute>
3702
3630
  <xsl:attribute name="table-layout">fixed</xsl:attribute>
3703
-
3704
3631
  </xsl:attribute-set><!-- table-style -->
3705
3632
 
3706
3633
  <xsl:template name="refine_table-style">
3707
3634
  <xsl:param name="margin-side"/>
3708
3635
 
3709
3636
  <xsl:call-template name="setBordersTableArray"/>
3710
-
3711
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3712
- <xsl:if test="$doctype = 'service-publication'">
3713
- <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3714
- </xsl:if>
3715
-
3637
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3638
+ <xsl:if test="$doctype = 'service-publication'">
3639
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3640
+ </xsl:if>
3716
3641
  </xsl:template> <!-- refine_table-style -->
3717
3642
 
3718
3643
  <xsl:attribute-set name="table-name-style">
3719
3644
  <xsl:attribute name="role">Caption</xsl:attribute>
3720
3645
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3721
-
3722
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3723
- <xsl:attribute name="text-align">center</xsl:attribute>
3724
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3725
-
3646
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3647
+ <xsl:attribute name="text-align">center</xsl:attribute>
3648
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3726
3649
  </xsl:attribute-set> <!-- table-name-style -->
3727
3650
 
3728
3651
  <xsl:template name="refine_table-name-style">
@@ -3730,36 +3653,29 @@
3730
3653
  <xsl:if test="$continued = 'true'">
3731
3654
  <xsl:attribute name="role">SKIP</xsl:attribute>
3732
3655
  </xsl:if>
3733
-
3734
3656
  </xsl:template> <!-- refine_table-name-style -->
3735
3657
 
3736
3658
  <xsl:attribute-set name="table-row-style">
3737
3659
  <xsl:attribute name="min-height">4mm</xsl:attribute>
3738
-
3739
3660
  </xsl:attribute-set>
3740
3661
 
3741
3662
  <xsl:attribute-set name="table-header-row-style" use-attribute-sets="table-row-style">
3742
3663
  <xsl:attribute name="font-weight">bold</xsl:attribute>
3743
-
3744
3664
  </xsl:attribute-set>
3745
3665
 
3746
3666
  <xsl:template name="refine_table-header-row-style">
3747
3667
 
3748
3668
  <xsl:call-template name="setBordersTableArray"/>
3749
-
3750
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3751
- <xsl:if test="$doctype = 'service-publication'">
3752
- <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
3753
- </xsl:if>
3754
-
3669
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3670
+ <xsl:if test="$doctype = 'service-publication'">
3671
+ <xsl:attribute name="border-bottom">1.1pt solid black</xsl:attribute>
3672
+ </xsl:if>
3755
3673
  </xsl:template> <!-- refine_table-header-row-style -->
3756
3674
 
3757
3675
  <xsl:attribute-set name="table-footer-row-style" use-attribute-sets="table-row-style">
3758
-
3759
3676
  </xsl:attribute-set>
3760
3677
 
3761
3678
  <xsl:template name="refine_table-footer-row-style">
3762
-
3763
3679
  </xsl:template> <!-- refine_table-footer-row-style -->
3764
3680
 
3765
3681
  <xsl:attribute-set name="table-body-row-style" use-attribute-sets="table-row-style">
@@ -3769,7 +3685,6 @@
3769
3685
  <xsl:template name="refine_table-body-row-style">
3770
3686
 
3771
3687
  <xsl:call-template name="setBordersTableArray"/>
3772
-
3773
3688
  </xsl:template> <!-- refine_table-body-row-style -->
3774
3689
 
3775
3690
  <xsl:attribute-set name="table-header-cell-style">
@@ -3777,41 +3692,36 @@
3777
3692
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
3778
3693
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3779
3694
  <xsl:attribute name="display-align">center</xsl:attribute>
3780
-
3781
3695
  </xsl:attribute-set> <!-- table-header-cell-style -->
3782
3696
 
3783
3697
  <xsl:template name="refine_table-header-cell-style">
3784
3698
 
3785
3699
  <xsl:call-template name="setBordersTableArray"/>
3786
-
3787
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3788
- <xsl:if test="ancestor::*[local-name()='preface']">
3789
- <xsl:if test="$doctype != 'service-publication'">
3790
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3791
- </xsl:if>
3792
- </xsl:if>
3793
- <xsl:if test="$doctype = 'service-publication'">
3794
- <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3795
- <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
3796
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
3700
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3701
+ <xsl:if test="ancestor::*[local-name()='preface']">
3702
+ <xsl:if test="$doctype != 'service-publication'">
3703
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3797
3704
  </xsl:if>
3705
+ </xsl:if>
3706
+ <xsl:if test="$doctype = 'service-publication'">
3707
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3708
+ <xsl:attribute name="border-bottom">1pt solid black</xsl:attribute>
3709
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
3710
+ </xsl:if>
3798
3711
 
3799
3712
  <xsl:if test="$lang = 'ar'">
3800
3713
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3801
3714
  </xsl:if>
3802
3715
 
3803
3716
  <xsl:call-template name="setTableCellAttributes"/>
3804
-
3805
3717
  </xsl:template> <!-- refine_table-header-cell-style -->
3806
3718
 
3807
3719
  <xsl:attribute-set name="table-cell-style">
3808
3720
  <xsl:attribute name="display-align">center</xsl:attribute>
3809
3721
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
3810
3722
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3811
-
3812
- <xsl:attribute name="border">solid black 1pt</xsl:attribute>
3813
- <xsl:attribute name="display-align">before</xsl:attribute>
3814
-
3723
+ <xsl:attribute name="border">solid black 1pt</xsl:attribute>
3724
+ <xsl:attribute name="display-align">before</xsl:attribute>
3815
3725
  </xsl:attribute-set> <!-- table-cell-style -->
3816
3726
 
3817
3727
  <xsl:template name="refine_table-cell-style">
@@ -3820,18 +3730,15 @@
3820
3730
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3821
3731
  </xsl:if>
3822
3732
 
3823
- <!-- bsi -->
3824
-
3825
3733
  <xsl:call-template name="setBordersTableArray"/>
3826
-
3827
- <xsl:if test="ancestor::*[local-name()='preface']">
3828
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3829
- </xsl:if>
3830
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3831
- <xsl:if test="$doctype = 'service-publication'">
3832
- <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3833
- <xsl:attribute name="padding-top">1mm</xsl:attribute>
3834
- </xsl:if>
3734
+ <xsl:if test="ancestor::*[local-name()='preface']">
3735
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3736
+ </xsl:if>
3737
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3738
+ <xsl:if test="$doctype = 'service-publication'">
3739
+ <xsl:attribute name="border">1pt solid rgb(211,211,211)</xsl:attribute>
3740
+ <xsl:attribute name="padding-top">1mm</xsl:attribute>
3741
+ </xsl:if>
3835
3742
 
3836
3743
  </xsl:template> <!-- refine_table-cell-style -->
3837
3744
 
@@ -3840,74 +3747,59 @@
3840
3747
  <xsl:attribute name="padding-left">1mm</xsl:attribute>
3841
3748
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3842
3749
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
3843
-
3844
3750
  </xsl:attribute-set> <!-- table-footer-cell-style -->
3845
3751
 
3846
3752
  <xsl:template name="refine_table-footer-cell-style">
3847
-
3848
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3849
- <xsl:if test="ancestor::*[local-name()='preface']">
3850
- <xsl:if test="$doctype != 'service-publication'">
3851
- <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3852
- </xsl:if>
3853
- </xsl:if>
3854
- <xsl:if test="$doctype = 'service-publication'">
3855
- <xsl:attribute name="border">none</xsl:attribute>
3753
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
3754
+ <xsl:if test="ancestor::*[local-name()='preface']">
3755
+ <xsl:if test="$doctype != 'service-publication'">
3756
+ <xsl:attribute name="border">solid black 0pt</xsl:attribute>
3856
3757
  </xsl:if>
3857
-
3758
+ </xsl:if>
3759
+ <xsl:if test="$doctype = 'service-publication'">
3760
+ <xsl:attribute name="border">none</xsl:attribute>
3761
+ </xsl:if>
3858
3762
  </xsl:template> <!-- refine_table-footer-cell-style -->
3859
3763
 
3860
3764
  <xsl:attribute-set name="table-note-style">
3861
3765
  <xsl:attribute name="font-size">10pt</xsl:attribute>
3862
3766
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3863
-
3864
3767
  </xsl:attribute-set><!-- table-note-style -->
3865
3768
 
3866
3769
  <xsl:template name="refine_table-note-style">
3867
-
3868
3770
  </xsl:template> <!-- refine_table-note-style -->
3869
3771
 
3870
3772
  <xsl:attribute-set name="table-fn-style">
3871
3773
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3872
-
3873
- <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3874
- <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3875
- <xsl:attribute name="text-indent">-5mm</xsl:attribute>
3876
- <xsl:attribute name="start-indent">5mm</xsl:attribute>
3877
-
3774
+ <xsl:attribute name="margin-bottom">2pt</xsl:attribute>
3775
+ <xsl:attribute name="line-height-shift-adjustment">disregard-shifts</xsl:attribute>
3776
+ <xsl:attribute name="text-indent">-5mm</xsl:attribute>
3777
+ <xsl:attribute name="start-indent">5mm</xsl:attribute>
3878
3778
  </xsl:attribute-set> <!-- table-fn-style -->
3879
3779
 
3880
3780
  <xsl:template name="refine_table-fn-style">
3881
-
3882
3781
  </xsl:template>
3883
3782
 
3884
3783
  <xsl:attribute-set name="table-fn-number-style">
3885
3784
  <!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
3886
-
3887
- <!-- <xsl:attribute name="padding-right">3mm</xsl:attribute> -->
3888
-
3785
+ <!-- <xsl:attribute name="padding-right">3mm</xsl:attribute> -->
3889
3786
  </xsl:attribute-set> <!-- table-fn-number-style -->
3890
3787
 
3891
3788
  <xsl:attribute-set name="table-fmt-fn-label-style">
3892
3789
  <xsl:attribute name="font-size">80%</xsl:attribute>
3893
-
3894
- <xsl:attribute name="vertical-align">super</xsl:attribute>
3895
- <xsl:attribute name="font-size">70%</xsl:attribute>
3896
-
3790
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
3791
+ <xsl:attribute name="font-size">70%</xsl:attribute>
3897
3792
  </xsl:attribute-set> <!-- table-fmt-fn-label-style -->
3898
3793
 
3899
3794
  <xsl:template name="refine_table-fmt-fn-label-style">
3900
-
3901
3795
  </xsl:template>
3902
3796
 
3903
3797
  <xsl:attribute-set name="fn-container-body-style">
3904
3798
  <xsl:attribute name="text-indent">0</xsl:attribute>
3905
3799
  <xsl:attribute name="start-indent">0</xsl:attribute>
3906
-
3907
3800
  </xsl:attribute-set>
3908
3801
 
3909
3802
  <xsl:attribute-set name="table-fn-body-style">
3910
-
3911
3803
  </xsl:attribute-set>
3912
3804
 
3913
3805
  <xsl:attribute-set name="figure-fn-number-style">
@@ -3917,17 +3809,14 @@
3917
3809
  <xsl:attribute-set name="figure-fmt-fn-label-style">
3918
3810
  <xsl:attribute name="font-size">80%</xsl:attribute>
3919
3811
  <xsl:attribute name="vertical-align">super</xsl:attribute>
3920
-
3921
3812
  </xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
3922
3813
 
3923
3814
  <xsl:template name="refine_figure-fmt-fn-label-style">
3924
-
3925
3815
  </xsl:template>
3926
3816
 
3927
3817
  <xsl:attribute-set name="figure-fn-body-style">
3928
3818
  <xsl:attribute name="text-align">justify</xsl:attribute>
3929
3819
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
3930
-
3931
3820
  </xsl:attribute-set>
3932
3821
  <!-- ========================== -->
3933
3822
  <!-- END Table styles -->
@@ -3938,55 +3827,42 @@
3938
3827
  <!-- ========================== -->
3939
3828
 
3940
3829
  <xsl:attribute-set name="dl-block-style">
3941
-
3942
3830
  </xsl:attribute-set>
3943
3831
 
3944
3832
  <xsl:attribute-set name="dt-row-style">
3945
-
3946
3833
  </xsl:attribute-set>
3947
3834
 
3948
3835
  <xsl:attribute-set name="dt-cell-style">
3949
-
3950
3836
  </xsl:attribute-set>
3951
3837
 
3952
3838
  <xsl:template name="refine_dt-cell-style">
3953
-
3954
- <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3955
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
3956
- </xsl:if>
3957
-
3839
+ <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3840
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
3841
+ </xsl:if>
3958
3842
  </xsl:template> <!-- refine_dt-cell-style -->
3959
3843
 
3960
3844
  <xsl:attribute-set name="dt-block-style">
3961
3845
  <xsl:attribute name="margin-top">0pt</xsl:attribute>
3962
-
3963
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
3964
-
3846
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3965
3847
  </xsl:attribute-set>
3966
3848
 
3967
3849
  <xsl:template name="refine_dt-block-style">
3968
-
3969
- <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3970
- <xsl:attribute name="text-align">right</xsl:attribute>
3971
- </xsl:if>
3972
-
3850
+ <xsl:if test="ancestor::*[1][local-name() = 'dl']/preceding-sibling::*[1][local-name() = 'formula']">
3851
+ <xsl:attribute name="text-align">right</xsl:attribute>
3852
+ </xsl:if>
3973
3853
  </xsl:template> <!-- refine_dt-block-style -->
3974
3854
 
3975
3855
  <xsl:attribute-set name="dl-name-style">
3976
3856
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3977
3857
  <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
3978
-
3979
- <xsl:attribute name="font-weight">bold</xsl:attribute>
3980
-
3858
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3981
3859
  </xsl:attribute-set> <!-- dl-name-style -->
3982
3860
 
3983
3861
  <xsl:attribute-set name="dd-cell-style">
3984
3862
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
3985
-
3986
3863
  </xsl:attribute-set>
3987
3864
 
3988
3865
  <xsl:template name="refine_dd-cell-style">
3989
-
3990
3866
  </xsl:template> <!-- refine_dd-cell-style -->
3991
3867
 
3992
3868
  <!-- ========================== -->
@@ -3994,237 +3870,177 @@
3994
3870
  <!-- ========================== -->
3995
3871
 
3996
3872
  <xsl:attribute-set name="appendix-style">
3997
-
3998
3873
  </xsl:attribute-set>
3999
3874
 
4000
3875
  <xsl:attribute-set name="appendix-example-style">
4001
-
4002
3876
  </xsl:attribute-set>
4003
3877
 
4004
3878
  <xsl:attribute-set name="xref-style">
4005
-
4006
- <xsl:attribute name="color">blue</xsl:attribute>
4007
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4008
-
3879
+ <xsl:attribute name="color">blue</xsl:attribute>
3880
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4009
3881
  </xsl:attribute-set>
4010
3882
 
4011
3883
  <xsl:attribute-set name="eref-style">
4012
-
4013
- <xsl:attribute name="color">blue</xsl:attribute>
4014
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4015
-
3884
+ <xsl:attribute name="color">blue</xsl:attribute>
3885
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4016
3886
  </xsl:attribute-set>
4017
3887
 
4018
3888
  <xsl:template name="refine_eref-style">
4019
3889
  <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
4020
3890
  <xsl:variable name="text" select="normalize-space()"/>
4021
-
4022
3891
  </xsl:template> <!-- refine_eref-style -->
4023
3892
 
4024
3893
  <xsl:attribute-set name="note-style">
4025
-
4026
- <xsl:attribute name="font-size">11pt</xsl:attribute>
4027
- <xsl:attribute name="space-before">4pt</xsl:attribute>
4028
- <xsl:attribute name="text-align">justify</xsl:attribute>
4029
-
3894
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
3895
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
3896
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4030
3897
  </xsl:attribute-set>
4031
3898
 
4032
3899
  <xsl:template name="refine_note-style">
4033
-
4034
3900
  </xsl:template>
4035
3901
 
4036
3902
  <xsl:variable name="note-body-indent">10mm</xsl:variable>
4037
3903
  <xsl:variable name="note-body-indent-table">5mm</xsl:variable>
4038
3904
 
4039
3905
  <xsl:attribute-set name="note-name-style">
4040
-
4041
3906
  </xsl:attribute-set>
4042
3907
 
4043
3908
  <xsl:template name="refine_note-name-style">
4044
-
4045
3909
  </xsl:template> <!-- refine_note-name-style -->
4046
3910
 
4047
3911
  <xsl:attribute-set name="table-note-name-style">
4048
3912
  <xsl:attribute name="padding-right">2mm</xsl:attribute>
4049
-
4050
3913
  </xsl:attribute-set>
4051
3914
 
4052
3915
  <xsl:template name="refine_table-note-name-style">
4053
-
4054
3916
  </xsl:template> <!-- refine_table-note-name-style -->
4055
3917
 
4056
3918
  <xsl:attribute-set name="note-p-style">
4057
-
4058
- <xsl:attribute name="space-before">4pt</xsl:attribute>
4059
-
3919
+ <xsl:attribute name="space-before">4pt</xsl:attribute>
4060
3920
  </xsl:attribute-set>
4061
3921
 
4062
3922
  <xsl:attribute-set name="termnote-style">
4063
-
4064
- <xsl:attribute name="margin-top">4pt</xsl:attribute>
4065
-
3923
+ <xsl:attribute name="margin-top">4pt</xsl:attribute>
4066
3924
  </xsl:attribute-set>
4067
3925
 
4068
3926
  <xsl:template name="refine_termnote-style">
4069
-
4070
3927
  </xsl:template> <!-- refine_termnote-style -->
4071
3928
 
4072
3929
  <xsl:attribute-set name="termnote-name-style">
4073
-
4074
3930
  </xsl:attribute-set>
4075
3931
 
4076
3932
  <xsl:template name="refine_termnote-name-style">
4077
-
4078
- <!-- <xsl:if test="$namespace = 'ieee'">
4079
- <xsl:attribute name="padding-right">0mm</xsl:attribute>
4080
- </xsl:if> -->
4081
-
4082
3933
  </xsl:template>
4083
3934
 
4084
3935
  <xsl:attribute-set name="termnote-p-style">
4085
-
4086
3936
  </xsl:attribute-set>
4087
3937
 
4088
3938
  <xsl:attribute-set name="quote-style">
4089
3939
  <xsl:attribute name="margin-left">12mm</xsl:attribute>
4090
3940
  <xsl:attribute name="margin-right">12mm</xsl:attribute>
4091
-
4092
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4093
-
3941
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4094
3942
  </xsl:attribute-set>
4095
3943
 
4096
3944
  <xsl:template name="refine_quote-style">
4097
-
4098
3945
  </xsl:template>
4099
3946
 
4100
3947
  <xsl:attribute-set name="quote-source-style">
4101
3948
  <xsl:attribute name="text-align">right</xsl:attribute>
4102
-
4103
3949
  </xsl:attribute-set>
4104
3950
 
4105
3951
  <xsl:attribute-set name="termsource-style">
4106
-
4107
3952
  </xsl:attribute-set>
4108
3953
 
4109
3954
  <xsl:template name="refine_termsource-style">
4110
-
4111
3955
  </xsl:template> <!-- refine_termsource-style -->
4112
3956
 
4113
3957
  <xsl:attribute-set name="termsource-text-style">
4114
-
4115
3958
  </xsl:attribute-set>
4116
3959
 
4117
3960
  <xsl:attribute-set name="origin-style">
4118
-
4119
3961
  </xsl:attribute-set>
4120
3962
 
4121
3963
  <xsl:attribute-set name="term-style">
4122
-
4123
3964
  </xsl:attribute-set>
4124
3965
 
4125
3966
  <xsl:attribute-set name="term-name-style">
4126
3967
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4127
3968
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4128
-
4129
3969
  </xsl:attribute-set>
4130
3970
 
4131
3971
  <xsl:attribute-set name="figure-block-style">
4132
3972
  <xsl:attribute name="role">SKIP</xsl:attribute>
4133
-
4134
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4135
-
3973
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4136
3974
  </xsl:attribute-set>
4137
3975
 
4138
3976
  <xsl:template name="refine_figure-block-style">
4139
-
4140
3977
  </xsl:template>
4141
3978
 
4142
3979
  <xsl:attribute-set name="figure-style">
4143
-
4144
3980
  </xsl:attribute-set>
4145
3981
 
4146
3982
  <xsl:attribute-set name="figure-name-style">
4147
3983
  <xsl:attribute name="role">Caption</xsl:attribute>
4148
-
4149
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4150
- <xsl:attribute name="text-align">center</xsl:attribute>
4151
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4152
- <xsl:attribute name="space-after">6pt</xsl:attribute>
4153
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4154
-
3984
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
3985
+ <xsl:attribute name="text-align">center</xsl:attribute>
3986
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
3987
+ <xsl:attribute name="space-after">6pt</xsl:attribute>
3988
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4155
3989
  </xsl:attribute-set>
4156
3990
 
4157
3991
  <xsl:template name="refine_figure-name-style">
4158
-
4159
3992
  </xsl:template> <!-- refine_figure-name-style -->
4160
3993
 
4161
3994
  <xsl:attribute-set name="figure-source-style">
4162
-
4163
3995
  </xsl:attribute-set>
4164
3996
 
4165
3997
  <!-- Formula's styles -->
4166
3998
  <xsl:attribute-set name="formula-style">
4167
3999
  <xsl:attribute name="margin-top">6pt</xsl:attribute>
4168
4000
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4169
-
4170
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4171
-
4001
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4172
4002
  </xsl:attribute-set> <!-- formula-style -->
4173
4003
 
4174
4004
  <xsl:attribute-set name="formula-stem-block-style">
4175
4005
  <xsl:attribute name="text-align">center</xsl:attribute>
4176
-
4177
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4178
-
4006
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4179
4007
  </xsl:attribute-set> <!-- formula-stem-block-style -->
4180
4008
 
4181
4009
  <xsl:template name="refine_formula-stem-block-style">
4182
-
4183
4010
  </xsl:template> <!-- refine_formula-stem-block-style -->
4184
4011
 
4185
4012
  <xsl:attribute-set name="formula-stem-number-style">
4186
4013
  <xsl:attribute name="text-align">right</xsl:attribute>
4187
-
4188
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
4189
-
4014
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
4190
4015
  </xsl:attribute-set> <!-- formula-stem-number-style -->
4191
4016
  <!-- End Formula's styles -->
4192
4017
 
4193
4018
  <xsl:template name="refine_formula-stem-number-style">
4194
-
4195
4019
  </xsl:template>
4196
4020
 
4197
4021
  <xsl:attribute-set name="image-style">
4198
4022
  <xsl:attribute name="role">SKIP</xsl:attribute>
4199
4023
  <xsl:attribute name="text-align">center</xsl:attribute>
4200
-
4201
4024
  </xsl:attribute-set>
4202
4025
 
4203
4026
  <xsl:template name="refine_image-style">
4204
-
4205
4027
  </xsl:template>
4206
4028
 
4207
4029
  <xsl:attribute-set name="figure-pseudocode-p-style">
4208
-
4209
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4210
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4211
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4212
-
4030
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4031
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4032
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4213
4033
  </xsl:attribute-set>
4214
4034
 
4215
4035
  <xsl:attribute-set name="image-graphic-style">
4216
4036
  <xsl:attribute name="width">100%</xsl:attribute>
4217
4037
  <xsl:attribute name="content-height">100%</xsl:attribute>
4218
4038
  <xsl:attribute name="scaling">uniform</xsl:attribute>
4219
-
4220
- <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
4221
-
4222
- <xsl:attribute name="width">75%</xsl:attribute>
4223
-
4039
+ <xsl:attribute name="content-width">scale-to-fit</xsl:attribute>
4040
+ <xsl:attribute name="width">75%</xsl:attribute>
4224
4041
  </xsl:attribute-set>
4225
4042
 
4226
4043
  <xsl:attribute-set name="tt-style">
4227
-
4228
4044
  </xsl:attribute-set>
4229
4045
 
4230
4046
  <xsl:attribute-set name="sourcecode-name-style">
@@ -4233,50 +4049,41 @@
4233
4049
  <xsl:attribute name="text-align">center</xsl:attribute>
4234
4050
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4235
4051
  <xsl:attribute name="keep-with-previous">always</xsl:attribute>
4236
-
4237
4052
  </xsl:attribute-set>
4238
4053
 
4239
4054
  <xsl:attribute-set name="preferred-block-style">
4240
-
4241
4055
  </xsl:attribute-set>
4242
4056
 
4243
4057
  <xsl:attribute-set name="preferred-term-style">
4244
4058
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4245
4059
  <xsl:attribute name="font-weight">bold</xsl:attribute>
4246
-
4247
4060
  </xsl:attribute-set>
4248
4061
 
4249
4062
  <xsl:attribute-set name="domain-style">
4250
-
4251
4063
  </xsl:attribute-set>
4252
4064
 
4253
4065
  <xsl:attribute-set name="admitted-style">
4254
-
4255
4066
  </xsl:attribute-set>
4256
4067
 
4257
4068
  <xsl:attribute-set name="deprecates-style">
4258
-
4259
4069
  </xsl:attribute-set>
4260
4070
 
4261
4071
  <xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
4262
4072
  </xsl:attribute-set>
4263
4073
 
4264
4074
  <xsl:attribute-set name="definition-style">
4265
-
4266
4075
  </xsl:attribute-set>
4267
4076
 
4268
4077
  <xsl:variable name="color-added-text">
4269
4078
  <xsl:text>rgb(0, 255, 0)</xsl:text>
4270
4079
  </xsl:variable>
4271
4080
  <xsl:attribute-set name="add-style">
4272
-
4273
- <xsl:attribute name="color">red</xsl:attribute>
4274
- <xsl:attribute name="text-decoration">underline</xsl:attribute>
4275
- <!-- <xsl:attribute name="color">black</xsl:attribute>
4081
+ <xsl:attribute name="color">red</xsl:attribute>
4082
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
4083
+ <!-- <xsl:attribute name="color">black</xsl:attribute>
4276
4084
  <xsl:attribute name="background-color"><xsl:value-of select="$color-added-text"/></xsl:attribute>
4277
4085
  <xsl:attribute name="padding-top">1mm</xsl:attribute>
4278
4086
  <xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
4279
-
4280
4087
  </xsl:attribute-set>
4281
4088
 
4282
4089
  <xsl:variable name="add-style">
@@ -4296,52 +4103,39 @@
4296
4103
 
4297
4104
  <xsl:attribute-set name="mathml-style">
4298
4105
  <xsl:attribute name="font-family">STIX Two Math</xsl:attribute>
4299
-
4300
- <xsl:attribute name="font-size">11pt</xsl:attribute>
4301
-
4106
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
4302
4107
  </xsl:attribute-set>
4303
4108
 
4304
4109
  <xsl:template name="refine_mathml-style">
4305
-
4306
4110
  </xsl:template>
4307
4111
 
4308
4112
  <xsl:attribute-set name="list-style">
4309
-
4310
4113
  </xsl:attribute-set> <!-- list-style -->
4311
4114
 
4312
4115
  <xsl:template name="refine_list-style">
4313
-
4314
4116
  </xsl:template> <!-- refine_list-style -->
4315
4117
 
4316
4118
  <xsl:attribute-set name="list-name-style">
4317
4119
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4318
-
4319
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4320
-
4120
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4321
4121
  </xsl:attribute-set> <!-- list-name-style -->
4322
4122
 
4323
4123
  <xsl:attribute-set name="list-item-style">
4324
-
4325
4124
  </xsl:attribute-set>
4326
4125
 
4327
4126
  <xsl:template name="refine_list-item-style">
4328
-
4329
4127
  </xsl:template> <!-- refine_list-item-style -->
4330
4128
 
4331
4129
  <xsl:attribute-set name="list-item-label-style">
4332
-
4333
4130
  </xsl:attribute-set>
4334
4131
 
4335
4132
  <xsl:template name="refine_list-item-label-style">
4336
-
4337
4133
  </xsl:template> <!-- refine_list-item-label-style -->
4338
4134
 
4339
4135
  <xsl:attribute-set name="list-item-body-style">
4340
-
4341
4136
  </xsl:attribute-set>
4342
4137
 
4343
4138
  <xsl:template name="refine_list-item-body-style">
4344
-
4345
4139
  </xsl:template> <!-- refine_list-item-body-style -->
4346
4140
 
4347
4141
  <xsl:attribute-set name="toc-style">
@@ -4351,14 +4145,12 @@
4351
4145
  <xsl:attribute-set name="fn-reference-style">
4352
4146
  <xsl:attribute name="font-size">80%</xsl:attribute>
4353
4147
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4354
-
4355
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4356
- <xsl:attribute name="color">blue</xsl:attribute>
4148
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4149
+ <xsl:attribute name="color">blue</xsl:attribute>
4357
4150
 
4358
4151
  </xsl:attribute-set>
4359
4152
 
4360
4153
  <xsl:template name="refine_fn-reference-style">
4361
-
4362
4154
  </xsl:template> <!-- refine_fn-reference-style -->
4363
4155
 
4364
4156
  <xsl:attribute-set name="fn-style">
@@ -4367,10 +4159,8 @@
4367
4159
 
4368
4160
  <xsl:attribute-set name="fn-num-style">
4369
4161
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4370
-
4371
- <xsl:attribute name="font-size">60%</xsl:attribute>
4372
- <xsl:attribute name="vertical-align">super</xsl:attribute>
4373
-
4162
+ <xsl:attribute name="font-size">60%</xsl:attribute>
4163
+ <xsl:attribute name="vertical-align">super</xsl:attribute>
4374
4164
  </xsl:attribute-set>
4375
4165
 
4376
4166
  <xsl:attribute-set name="fn-body-style">
@@ -4378,140 +4168,106 @@
4378
4168
  <xsl:attribute name="font-style">normal</xsl:attribute>
4379
4169
  <xsl:attribute name="text-indent">0</xsl:attribute>
4380
4170
  <xsl:attribute name="start-indent">0</xsl:attribute>
4381
-
4382
- <xsl:attribute name="font-size">11pt</xsl:attribute>
4383
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4384
- <xsl:attribute name="text-align">justify</xsl:attribute>
4385
-
4171
+ <xsl:attribute name="font-size">11pt</xsl:attribute>
4172
+ <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4173
+ <xsl:attribute name="text-align">justify</xsl:attribute>
4386
4174
  </xsl:attribute-set>
4387
4175
 
4388
4176
  <xsl:template name="refine_fn-body-style">
4389
-
4390
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
4391
- <xsl:if test="$doctype = 'service-publication'">
4392
- <xsl:attribute name="font-size">10pt</xsl:attribute>
4393
- </xsl:if>
4394
-
4177
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
4178
+ <xsl:if test="$doctype = 'service-publication'">
4179
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
4180
+ </xsl:if>
4395
4181
  </xsl:template> <!-- refine_fn-body-style -->
4396
4182
 
4397
4183
  <xsl:attribute-set name="fn-body-num-style">
4398
4184
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4399
-
4400
- <xsl:attribute name="font-size">85%</xsl:attribute>
4401
- <xsl:attribute name="padding-right">2mm</xsl:attribute>
4402
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4403
-
4185
+ <xsl:attribute name="font-size">85%</xsl:attribute>
4186
+ <xsl:attribute name="padding-right">2mm</xsl:attribute>
4187
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4404
4188
  </xsl:attribute-set> <!-- fn-body-num-style -->
4405
4189
 
4406
4190
  <xsl:template name="refine_fn-body-num-style">
4407
-
4408
4191
  </xsl:template> <!-- refine_fn-body-num-style -->
4409
4192
 
4410
4193
  <!-- admonition -->
4411
4194
  <xsl:attribute-set name="admonition-style">
4412
-
4413
- <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
4414
- <xsl:attribute name="space-before">12pt</xsl:attribute>
4415
- <xsl:attribute name="space-after">12pt</xsl:attribute>
4416
-
4195
+ <xsl:attribute name="border">0.5pt solid black</xsl:attribute>
4196
+ <xsl:attribute name="space-before">12pt</xsl:attribute>
4197
+ <xsl:attribute name="space-after">12pt</xsl:attribute>
4417
4198
  </xsl:attribute-set> <!-- admonition-style -->
4418
4199
 
4419
4200
  <xsl:attribute-set name="admonition-container-style">
4420
4201
  <xsl:attribute name="margin-left">0mm</xsl:attribute>
4421
4202
  <xsl:attribute name="margin-right">0mm</xsl:attribute>
4422
-
4423
- <xsl:attribute name="padding">2mm</xsl:attribute>
4424
- <xsl:attribute name="padding-top">3mm</xsl:attribute>
4425
-
4203
+ <xsl:attribute name="padding">2mm</xsl:attribute>
4204
+ <xsl:attribute name="padding-top">3mm</xsl:attribute>
4426
4205
  </xsl:attribute-set> <!-- admonition-container-style -->
4427
4206
 
4428
4207
  <xsl:attribute-set name="admonition-name-style">
4429
4208
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4430
-
4431
- <xsl:attribute name="text-align">center</xsl:attribute>
4432
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4433
- <xsl:attribute name="font-weight">bold</xsl:attribute>
4434
-
4209
+ <xsl:attribute name="text-align">center</xsl:attribute>
4210
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4211
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
4435
4212
  </xsl:attribute-set> <!-- admonition-name-style -->
4436
4213
 
4437
4214
  <xsl:attribute-set name="admonition-p-style">
4438
-
4439
4215
  </xsl:attribute-set> <!-- admonition-p-style -->
4440
4216
  <!-- end admonition -->
4441
4217
 
4442
4218
  <!-- bibitem in Normative References (references/@normative="true") -->
4443
4219
  <xsl:attribute-set name="bibitem-normative-style">
4444
-
4445
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4446
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
4447
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4448
-
4220
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4221
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
4222
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4449
4223
  </xsl:attribute-set> <!-- bibitem-normative-style -->
4450
4224
 
4451
4225
  <!-- bibitem in Normative References (references/@normative="true"), renders as list -->
4452
4226
  <xsl:attribute-set name="bibitem-normative-list-style">
4453
4227
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
4454
4228
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4455
-
4456
- <!-- <xsl:if test="$namespace = 'ieee'">
4457
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
4458
- <xsl:attribute name="provisional-distance-between-starts">9.5mm</xsl:attribute>
4459
- </xsl:if> -->
4460
-
4461
4229
  </xsl:attribute-set> <!-- bibitem-normative-list-style -->
4462
4230
 
4463
4231
  <xsl:attribute-set name="bibitem-non-normative-style">
4464
-
4465
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4466
-
4232
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4467
4233
  </xsl:attribute-set> <!-- bibitem-non-normative-style -->
4468
4234
 
4469
4235
  <!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
4470
4236
  <xsl:attribute-set name="bibitem-non-normative-list-style">
4471
4237
  <xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
4472
4238
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4473
-
4474
4239
  </xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
4475
4240
 
4476
4241
  <xsl:attribute-set name="bibitem-non-normative-list-item-style">
4477
4242
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4478
-
4479
4243
  </xsl:attribute-set>
4480
4244
 
4481
4245
  <!-- bibitem in bibliography section (references/@normative="false"), list body -->
4482
4246
  <xsl:attribute-set name="bibitem-normative-list-body-style">
4483
-
4484
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4485
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
4486
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4487
-
4247
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4248
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
4249
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4488
4250
  </xsl:attribute-set>
4489
4251
 
4490
4252
  <xsl:attribute-set name="bibitem-non-normative-list-body-style">
4491
-
4492
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
4493
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
4494
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4495
-
4253
+ <xsl:attribute name="margin-top">6pt</xsl:attribute>
4254
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
4255
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
4496
4256
  </xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
4497
4257
 
4498
4258
  <!-- footnote reference number for bibitem, in the text -->
4499
4259
  <xsl:attribute-set name="bibitem-note-fn-style">
4500
4260
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
4501
4261
  <xsl:attribute name="font-size">65%</xsl:attribute>
4502
-
4503
- <xsl:attribute name="font-size">8pt</xsl:attribute>
4504
- <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4505
-
4262
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
4263
+ <xsl:attribute name="baseline-shift">30%</xsl:attribute>
4506
4264
  </xsl:attribute-set> <!-- bibitem-note-fn-style -->
4507
4265
 
4508
4266
  <!-- footnote number on the page bottom -->
4509
4267
  <xsl:attribute-set name="bibitem-note-fn-number-style">
4510
4268
  <xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
4511
-
4512
- <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
4513
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
4514
-
4269
+ <xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
4270
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
4515
4271
  </xsl:attribute-set> <!-- bibitem-note-fn-number-style -->
4516
4272
 
4517
4273
  <!-- footnote body (text) on the page bottom -->
@@ -4519,13 +4275,10 @@
4519
4275
  <xsl:attribute name="font-size">10pt</xsl:attribute>
4520
4276
  <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
4521
4277
  <xsl:attribute name="start-indent">0pt</xsl:attribute>
4522
-
4523
- <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
4524
-
4278
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
4525
4279
  </xsl:attribute-set> <!-- bibitem-note-fn-body-style -->
4526
4280
 
4527
4281
  <xsl:attribute-set name="references-non-normative-style">
4528
-
4529
4282
  </xsl:attribute-set> <!-- references-non-normative-style -->
4530
4283
 
4531
4284
  <!-- Highlight.js syntax GitHub styles -->
@@ -4685,12 +4438,10 @@
4685
4438
  <!-- Index section styles -->
4686
4439
  <xsl:attribute-set name="indexsect-title-style">
4687
4440
  <xsl:attribute name="role">H1</xsl:attribute>
4688
-
4689
4441
  </xsl:attribute-set>
4690
4442
 
4691
4443
  <xsl:attribute-set name="indexsect-clause-title-style">
4692
4444
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
4693
-
4694
4445
  </xsl:attribute-set>
4695
4446
 
4696
4447
  <!-- End Index section styles -->
@@ -4767,47 +4518,47 @@
4767
4518
  </xsl:template>
4768
4519
 
4769
4520
  <xsl:template name="processTables_Contents">
4770
- <tables>
4521
+ <mn:tables>
4771
4522
  <xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
4772
4523
  <xsl:choose>
4773
4524
  <xsl:when test="*[local-name() = 'fmt-name']">
4774
4525
  <xsl:variable name="fmt_name">
4775
4526
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
4776
4527
  </xsl:variable>
4777
- <table id="{@id}" alt-text="{normalize-space($fmt_name)}">
4528
+ <mn:table id="{@id}" alt-text="{normalize-space($fmt_name)}">
4778
4529
  <xsl:copy-of select="$fmt_name"/>
4779
- </table>
4530
+ </mn:table>
4780
4531
  </xsl:when>
4781
4532
  <xsl:otherwise>
4782
- <table id="{@id}" alt-text="{*[local-name() = 'name']}">
4533
+ <mn:table id="{@id}" alt-text="{*[local-name() = 'name']}">
4783
4534
  <xsl:copy-of select="*[local-name() = 'name']"/>
4784
- </table>
4535
+ </mn:table>
4785
4536
  </xsl:otherwise>
4786
4537
  </xsl:choose>
4787
4538
  </xsl:for-each>
4788
- </tables>
4539
+ </mn:tables>
4789
4540
  </xsl:template>
4790
4541
 
4791
4542
  <xsl:template name="processFigures_Contents">
4792
- <figures>
4543
+ <mn:figures>
4793
4544
  <xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
4794
4545
  <xsl:choose>
4795
4546
  <xsl:when test="*[local-name() = 'fmt-name']">
4796
4547
  <xsl:variable name="fmt_name">
4797
4548
  <xsl:apply-templates select="*[local-name() = 'fmt-name']" mode="update_xml_step1"/>
4798
4549
  </xsl:variable>
4799
- <figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
4550
+ <mn:figure id="{@id}" alt-text="{normalize-space($fmt_name)}">
4800
4551
  <xsl:copy-of select="$fmt_name"/>
4801
- </figure>
4552
+ </mn:figure>
4802
4553
  </xsl:when>
4803
4554
  <xsl:otherwise>
4804
- <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
4555
+ <mn:figure id="{@id}" alt-text="{*[local-name() = 'name']}">
4805
4556
  <xsl:copy-of select="*[local-name() = 'name']"/>
4806
- </figure>
4557
+ </mn:figure>
4807
4558
  </xsl:otherwise>
4808
4559
  </xsl:choose>
4809
4560
  </xsl:for-each>
4810
- </figures>
4561
+ </mn:figures>
4811
4562
  </xsl:template>
4812
4563
 
4813
4564
  <xsl:template name="processPrefaceSectionsDefault">
@@ -4826,7 +4577,6 @@
4826
4577
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
4827
4578
  <xsl:sort select="@displayorder" data-type="number"/>
4828
4579
  <xsl:apply-templates select="."/>
4829
-
4830
4580
  </xsl:for-each>
4831
4581
 
4832
4582
  <xsl:for-each select="/*/*[local-name()='annex']">
@@ -4933,7 +4683,6 @@
4933
4683
  <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
4934
4684
  <xsl:sort select="@displayorder" data-type="number"/>
4935
4685
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak"/>
4936
-
4937
4686
  </xsl:for-each>
4938
4687
  </xsl:element>
4939
4688
  </xsl:element>
@@ -5067,7 +4816,6 @@
5067
4816
  <xsl:apply-templates select="." mode="update_xml_step_move_pagebreak">
5068
4817
  <xsl:with-param name="page_sequence_at_top">true</xsl:with-param>
5069
4818
  </xsl:apply-templates>
5070
-
5071
4819
  </xsl:for-each>
5072
4820
  </xsl:element>
5073
4821
 
@@ -5107,19 +4855,17 @@
5107
4855
  <xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
5108
4856
  <xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
5109
4857
  <xsl:template match="text()" name="text">
5110
-
5111
- <xsl:choose>
5112
- <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
5113
- <xsl:otherwise>
5114
- <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
5115
- <xsl:call-template name="replace_fo_inline_tags">
5116
- <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
5117
- <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
5118
- <xsl:with-param name="text" select="$text"/>
5119
- </xsl:call-template>
5120
- </xsl:otherwise>
5121
- </xsl:choose>
5122
-
4858
+ <xsl:choose>
4859
+ <xsl:when test="ancestor::*[local-name() = 'table']"><xsl:value-of select="."/></xsl:when>
4860
+ <xsl:otherwise>
4861
+ <xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_fo_inline_keep-together_within-line_open,'$1',$tag_fo_inline_keep-together_within-line_close))"/>
4862
+ <xsl:call-template name="replace_fo_inline_tags">
4863
+ <xsl:with-param name="tag_open" select="$tag_fo_inline_keep-together_within-line_open"/>
4864
+ <xsl:with-param name="tag_close" select="$tag_fo_inline_keep-together_within-line_close"/>
4865
+ <xsl:with-param name="text" select="$text"/>
4866
+ </xsl:call-template>
4867
+ </xsl:otherwise>
4868
+ </xsl:choose>
5123
4869
  </xsl:template>
5124
4870
 
5125
4871
  <xsl:template name="replace_fo_inline_tags">
@@ -5173,7 +4919,7 @@
5173
4919
  <xsl:with-param name="keep_sep">true</xsl:with-param>
5174
4920
  </xsl:call-template>
5175
4921
  </xsl:variable>
5176
- <xsl:for-each select="xalan:nodeset($items)/item">
4922
+ <xsl:for-each select="xalan:nodeset($items)/mn:item">
5177
4923
  <xsl:choose>
5178
4924
  <xsl:when test=". = $sep">
5179
4925
  <xsl:value-of select="$sep"/><xsl:value-of select="$zero_width_space"/>
@@ -5202,17 +4948,13 @@
5202
4948
  </xsl:template> <!-- copyright-statement -->
5203
4949
 
5204
4950
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
5205
-
5206
- <!-- process in the template 'title' -->
5207
- <xsl:call-template name="title"/>
5208
-
4951
+ <!-- process in the template 'title' -->
4952
+ <xsl:call-template name="title"/>
5209
4953
  </xsl:template> <!-- copyright-statement//title -->
5210
4954
 
5211
4955
  <xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
5212
-
5213
- <!-- process in the template 'paragraph' -->
5214
- <xsl:call-template name="paragraph"/>
5215
-
4956
+ <!-- process in the template 'paragraph' -->
4957
+ <xsl:call-template name="paragraph"/>
5216
4958
  </xsl:template> <!-- copyright-statement//p -->
5217
4959
 
5218
4960
  <xsl:template match="*[local-name()='license-statement']">
@@ -5222,51 +4964,44 @@
5222
4964
  </xsl:template> <!-- license-statement -->
5223
4965
 
5224
4966
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
5225
-
5226
- <xsl:variable name="level">
5227
- <xsl:call-template name="getLevel"/>
5228
- </xsl:variable>
5229
- <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
5230
- <xsl:apply-templates/>
5231
- </fo:block>
4967
+ <xsl:variable name="level">
4968
+ <xsl:call-template name="getLevel"/>
4969
+ </xsl:variable>
4970
+ <fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
4971
+ <xsl:apply-templates/>
4972
+ </fo:block>
5232
4973
 
5233
4974
  </xsl:template> <!-- license-statement/title -->
5234
4975
 
5235
4976
  <xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
5236
-
5237
- <!-- process in the template 'paragraph' -->
5238
- <xsl:call-template name="paragraph"/>
5239
-
4977
+ <!-- process in the template 'paragraph' -->
4978
+ <xsl:call-template name="paragraph"/>
5240
4979
  </xsl:template> <!-- license-statement/p -->
5241
4980
 
5242
4981
  <xsl:template match="*[local-name()='legal-statement']">
5243
4982
  <xsl:param name="isLegacy">false</xsl:param>
5244
4983
  <fo:block xsl:use-attribute-sets="legal-statement-style">
5245
-
5246
4984
  <xsl:apply-templates/>
5247
4985
  </fo:block>
5248
4986
  </xsl:template> <!-- legal-statement -->
5249
4987
 
5250
4988
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
5251
-
5252
- <!-- ogc-white-paper rsd -->
5253
- <xsl:variable name="level">
5254
- <xsl:call-template name="getLevel"/>
5255
- </xsl:variable>
5256
- <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
5257
- <xsl:apply-templates/>
5258
- </fo:block>
4989
+ <!-- ogc-white-paper rsd -->
4990
+ <xsl:variable name="level">
4991
+ <xsl:call-template name="getLevel"/>
4992
+ </xsl:variable>
4993
+ <fo:block role="H{$level}" xsl:use-attribute-sets="legal-statement-title-style">
4994
+ <xsl:apply-templates/>
4995
+ </fo:block>
5259
4996
 
5260
4997
  </xsl:template> <!-- legal-statement/title -->
5261
4998
 
5262
4999
  <xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
5263
5000
  <xsl:param name="margin"/>
5264
-
5265
- <!-- process in the template 'paragraph' -->
5266
- <xsl:call-template name="paragraph">
5267
- <xsl:with-param name="margin" select="$margin"/>
5268
- </xsl:call-template>
5269
-
5001
+ <!-- process in the template 'paragraph' -->
5002
+ <xsl:call-template name="paragraph">
5003
+ <xsl:with-param name="margin" select="$margin"/>
5004
+ </xsl:call-template>
5270
5005
  </xsl:template> <!-- legal-statement/p -->
5271
5006
 
5272
5007
  <xsl:template match="*[local-name()='feedback-statement']">
@@ -5276,20 +5011,16 @@
5276
5011
  </xsl:template> <!-- feedback-statement -->
5277
5012
 
5278
5013
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
5279
-
5280
- <!-- process in the template 'title' -->
5281
- <xsl:call-template name="title"/>
5282
-
5014
+ <!-- process in the template 'title' -->
5015
+ <xsl:call-template name="title"/>
5283
5016
  </xsl:template>
5284
5017
 
5285
5018
  <xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
5286
5019
  <xsl:param name="margin"/>
5287
-
5288
- <!-- process in the template 'paragraph' -->
5289
- <xsl:call-template name="paragraph">
5290
- <xsl:with-param name="margin" select="$margin"/>
5291
- </xsl:call-template>
5292
-
5020
+ <!-- process in the template 'paragraph' -->
5021
+ <xsl:call-template name="paragraph">
5022
+ <xsl:with-param name="margin" select="$margin"/>
5023
+ </xsl:call-template>
5293
5024
  </xsl:template>
5294
5025
 
5295
5026
  <!-- ================================= -->
@@ -5342,12 +5073,10 @@
5342
5073
  <xsl:template match="*[local-name()='table']" name="table">
5343
5074
 
5344
5075
  <xsl:variable name="table-preamble">
5345
-
5346
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5347
- <xsl:if test="$doctype != 'service-publication'">
5348
- <fo:block space-before="18pt"> </fo:block>
5349
- </xsl:if>
5350
-
5076
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5077
+ <xsl:if test="$doctype != 'service-publication'">
5078
+ <fo:block space-before="18pt"> </fo:block>
5079
+ </xsl:if>
5351
5080
  </xsl:variable>
5352
5081
 
5353
5082
  <xsl:variable name="table">
@@ -5365,10 +5094,8 @@
5365
5094
 
5366
5095
  <!-- Display table's name before table as standalone block -->
5367
5096
  <!-- $namespace = 'iso' or -->
5368
-
5369
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
5370
-
5371
- <xsl:call-template name="table_name_fn_display"/>
5097
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- table's title rendered before table -->
5098
+ <xsl:call-template name="table_name_fn_display"/>
5372
5099
 
5373
5100
  <xsl:variable name="cols-count" select="count(xalan:nodeset($simple-table)/*/tr[1]/td)"/>
5374
5101
 
@@ -5421,8 +5148,7 @@
5421
5148
 
5422
5149
  <xsl:variable name="table_width_default">100%</xsl:variable>
5423
5150
  <xsl:variable name="table_width">
5424
- <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) -->
5425
- <xsl:value-of select="$table_width_default"/>
5151
+ <!-- for centered table always 100% (@width will be set for middle/second cell of outer table) --><xsl:value-of select="$table_width_default"/>
5426
5152
  </xsl:variable>
5427
5153
 
5428
5154
  <xsl:variable name="table_attributes">
@@ -5565,27 +5291,25 @@
5565
5291
  <xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
5566
5292
 
5567
5293
  <!-- centered table when table name is centered (see table-name-style) -->
5568
-
5569
- <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
5570
-
5571
- <fo:table-column column-width="proportional-column-width(1)"/>
5572
- <fo:table-column column-width="{@width}"/>
5573
- <fo:table-column column-width="proportional-column-width(1)"/>
5574
- <fo:table-body role="SKIP">
5575
- <fo:table-row role="SKIP">
5576
- <fo:table-cell column-number="2" role="SKIP">
5577
- <xsl:copy-of select="$table-preamble"/>
5578
- <fo:block role="SKIP">
5579
- <xsl:call-template name="setTrackChangesStyles">
5580
- <xsl:with-param name="isAdded" select="$isAdded"/>
5581
- <xsl:with-param name="isDeleted" select="$isDeleted"/>
5582
- </xsl:call-template>
5583
- <xsl:copy-of select="$table"/>
5584
- </fo:block>
5585
- </fo:table-cell>
5586
- </fo:table-row>
5587
- </fo:table-body>
5588
- </fo:table>
5294
+ <fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
5295
+ <fo:table-column column-width="proportional-column-width(1)"/>
5296
+ <fo:table-column column-width="{@width}"/>
5297
+ <fo:table-column column-width="proportional-column-width(1)"/>
5298
+ <fo:table-body role="SKIP">
5299
+ <fo:table-row role="SKIP">
5300
+ <fo:table-cell column-number="2" role="SKIP">
5301
+ <xsl:copy-of select="$table-preamble"/>
5302
+ <fo:block role="SKIP">
5303
+ <xsl:call-template name="setTrackChangesStyles">
5304
+ <xsl:with-param name="isAdded" select="$isAdded"/>
5305
+ <xsl:with-param name="isDeleted" select="$isDeleted"/>
5306
+ </xsl:call-template>
5307
+ <xsl:copy-of select="$table"/>
5308
+ </fo:block>
5309
+ </fo:table-cell>
5310
+ </fo:table-row>
5311
+ </fo:table-body>
5312
+ </fo:table>
5589
5313
 
5590
5314
  </xsl:when>
5591
5315
  <xsl:otherwise>
@@ -5611,7 +5335,6 @@
5611
5335
  </xsl:template>
5612
5336
 
5613
5337
  <xsl:template name="setBordersTableArray">
5614
-
5615
5338
  </xsl:template>
5616
5339
 
5617
5340
  <!-- table/name-->
@@ -5620,51 +5343,50 @@
5620
5343
  <xsl:param name="cols-count"/>
5621
5344
  <xsl:if test="normalize-space() != ''">
5622
5345
 
5623
- <fo:block xsl:use-attribute-sets="table-name-style">
5624
-
5625
- <xsl:call-template name="refine_table-name-style">
5626
- <xsl:with-param name="continued" select="$continued"/>
5627
- </xsl:call-template>
5346
+ <fo:block xsl:use-attribute-sets="table-name-style">
5628
5347
 
5629
- <xsl:choose>
5630
- <xsl:when test="$continued = 'true'">
5348
+ <xsl:call-template name="refine_table-name-style">
5349
+ <xsl:with-param name="continued" select="$continued"/>
5350
+ </xsl:call-template>
5631
5351
 
5632
- </xsl:when>
5633
- <xsl:otherwise>
5634
- <xsl:apply-templates/>
5635
- </xsl:otherwise>
5636
- </xsl:choose>
5352
+ <xsl:choose>
5353
+ <xsl:when test="$continued = 'true'">
5354
+ </xsl:when>
5355
+ <xsl:otherwise>
5356
+ <xsl:apply-templates/>
5357
+ </xsl:otherwise>
5358
+ </xsl:choose>
5637
5359
 
5638
- </fo:block>
5360
+ </fo:block>
5639
5361
 
5640
- <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
5641
- <xsl:if test="$continued = 'true'">
5362
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
5363
+ <xsl:if test="$continued = 'true'">
5642
5364
 
5643
- <!-- to prevent the error 'THead element may contain only TR elements' -->
5365
+ <!-- to prevent the error 'THead element may contain only TR elements' -->
5644
5366
 
5645
- <xsl:choose>
5646
- <xsl:when test="string(number($cols-count)) != 'NaN'">
5647
- <fo:table width="100%" table-layout="fixed" role="SKIP">
5648
- <fo:table-body role="SKIP">
5649
- <fo:table-row>
5650
- <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
5651
- <fo:block text-align="right" role="SKIP">
5652
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5653
- </fo:block>
5654
- </fo:table-cell>
5655
- </fo:table-row>
5656
- </fo:table-body>
5657
- </fo:table>
5658
- </xsl:when>
5659
- <xsl:otherwise>
5660
- <fo:block text-align="right">
5661
- <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5662
- </fo:block>
5663
- </xsl:otherwise>
5664
- </xsl:choose>
5367
+ <xsl:choose>
5368
+ <xsl:when test="string(number($cols-count)) != 'NaN'">
5369
+ <fo:table width="100%" table-layout="fixed" role="SKIP">
5370
+ <fo:table-body role="SKIP">
5371
+ <fo:table-row>
5372
+ <fo:table-cell role="TH" number-columns-spanned="{$cols-count}">
5373
+ <fo:block text-align="right" role="SKIP">
5374
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5375
+ </fo:block>
5376
+ </fo:table-cell>
5377
+ </fo:table-row>
5378
+ </fo:table-body>
5379
+ </fo:table>
5380
+ </xsl:when>
5381
+ <xsl:otherwise>
5382
+ <fo:block text-align="right">
5383
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
5384
+ </fo:block>
5385
+ </xsl:otherwise>
5386
+ </xsl:choose>
5665
5387
 
5666
- </xsl:if>
5667
- <!-- </xsl:if> -->
5388
+ </xsl:if>
5389
+ <!-- </xsl:if> -->
5668
5390
 
5669
5391
  </xsl:if>
5670
5392
  </xsl:template> <!-- table/name -->
@@ -6039,7 +5761,6 @@
6039
5761
  <xsl:template match="*[local-name()='thead']">
6040
5762
  <xsl:param name="cols-count"/>
6041
5763
  <fo:table-header>
6042
-
6043
5764
  <xsl:apply-templates/>
6044
5765
  </fo:table-header>
6045
5766
  </xsl:template> <!-- thead -->
@@ -6053,21 +5774,20 @@
6053
5774
 
6054
5775
  <xsl:call-template name="refine_table-header-title-style"/>
6055
5776
 
6056
- <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
6057
- <xsl:with-param name="continued">true</xsl:with-param>
6058
- <xsl:with-param name="cols-count" select="$cols-count"/>
6059
- </xsl:apply-templates>
5777
+ <xsl:apply-templates select="ancestor::*[local-name()='table']/*[local-name()='name']">
5778
+ <xsl:with-param name="continued">true</xsl:with-param>
5779
+ <xsl:with-param name="cols-count" select="$cols-count"/>
5780
+ </xsl:apply-templates>
6060
5781
 
6061
- <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
6062
- <fo:block role="SKIP"/>
6063
- </xsl:if>
5782
+ <xsl:if test="not(ancestor::*[local-name()='table']/*[local-name()='name'])"> <!-- to prevent empty fo:table-cell in case of missing table's name -->
5783
+ <fo:block role="SKIP"/>
5784
+ </xsl:if>
6064
5785
 
6065
5786
  </fo:table-cell>
6066
5787
  </fo:table-row>
6067
5788
  </xsl:template> <!-- table-header-title -->
6068
5789
 
6069
5790
  <xsl:template name="refine_table-header-title-style">
6070
-
6071
5791
  </xsl:template> <!-- refine_table-header-title-style -->
6072
5792
 
6073
5793
  <xsl:template match="*[local-name()='thead']" mode="process_tbody">
@@ -6097,7 +5817,6 @@
6097
5817
  <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
6098
5818
 
6099
5819
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
6100
-
6101
5820
  </xsl:variable>
6102
5821
 
6103
5822
  <xsl:if test="$isNoteOrFnExist = 'true' or normalize-space($isNoteOrFnExistShowAfterTable) = 'true'">
@@ -6135,13 +5854,12 @@
6135
5854
  </xsl:otherwise>
6136
5855
  </xsl:choose>
6137
5856
  </xsl:for-each>
6138
-
6139
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6140
- <xsl:if test="$doctype = 'service-publication'">
6141
- <xsl:attribute name="border">none</xsl:attribute>
6142
- <xsl:attribute name="font-family">Arial</xsl:attribute>
6143
- <xsl:attribute name="font-size">8pt</xsl:attribute>
6144
- </xsl:if>
5857
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5858
+ <xsl:if test="$doctype = 'service-publication'">
5859
+ <xsl:attribute name="border">none</xsl:attribute>
5860
+ <xsl:attribute name="font-family">Arial</xsl:attribute>
5861
+ <xsl:attribute name="font-size">8pt</xsl:attribute>
5862
+ </xsl:if>
6145
5863
 
6146
5864
  <xsl:choose>
6147
5865
  <xsl:when test="xalan:nodeset($colgroup)//*[local-name()='col']">
@@ -6166,31 +5884,23 @@
6166
5884
  <xsl:call-template name="setBordersTableArray"/>
6167
5885
 
6168
5886
  <!-- fn will be processed inside 'note' processing -->
6169
-
6170
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6171
- <xsl:if test="$doctype = 'service-publication'">
6172
- <fo:block margin-top="7pt" margin-bottom="2pt" role="SKIP"><fo:inline>____________</fo:inline></fo:block>
6173
- </xsl:if>
6174
-
6175
- <!-- for BSI (not PAS) display Notes before footnotes -->
6176
-
6177
- <!-- except gb and bsi -->
6178
-
6179
- <xsl:apply-templates select="../*[local-name()='p']"/>
6180
- <xsl:apply-templates select="../*[local-name()='dl']"/>
6181
- <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
6182
- <xsl:apply-templates select="../*[local-name()='example']"/>
6183
- <xsl:apply-templates select="../*[local-name()='source']"/>
5887
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
5888
+ <xsl:if test="$doctype = 'service-publication'">
5889
+ <fo:block margin-top="7pt" margin-bottom="2pt" role="SKIP"><fo:inline>____________</fo:inline></fo:block>
5890
+ </xsl:if>
5891
+ <xsl:apply-templates select="../*[local-name()='p']"/>
5892
+ <xsl:apply-templates select="../*[local-name()='dl']"/>
5893
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
5894
+ <xsl:apply-templates select="../*[local-name()='example']"/>
5895
+ <xsl:apply-templates select="../*[local-name()='source']"/>
6184
5896
 
6185
5897
  <xsl:variable name="isDisplayRowSeparator">
6186
-
6187
5898
  </xsl:variable>
6188
5899
 
6189
5900
  <!-- horizontal row separator -->
6190
5901
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
6191
5902
  <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
6192
5903
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
6193
-
6194
5904
  <xsl:call-template name="setBordersTableArray"/>
6195
5905
  <fo:block font-size="1pt"> </fo:block>
6196
5906
  </fo:block-container>
@@ -6198,11 +5908,8 @@
6198
5908
  </xsl:if>
6199
5909
 
6200
5910
  <!-- fn processing -->
6201
-
6202
- <!-- <xsl:call-template name="table_fn_display" /> -->
6203
- <xsl:copy-of select="$table_fn_block"/>
6204
-
6205
- <!-- for PAS display Notes after footnotes -->
5911
+ <!-- <xsl:call-template name="table_fn_display" /> -->
5912
+ <xsl:copy-of select="$table_fn_block"/>
6206
5913
 
6207
5914
  </fo:table-cell>
6208
5915
  </fo:table-row>
@@ -6329,7 +6036,7 @@
6329
6036
  <xsl:with-param name="pText" select="$border_under_row_"/>
6330
6037
  </xsl:call-template>
6331
6038
  </xsl:variable>
6332
- <xsl:if test="xalan:nodeset($border_under_row)/item[. = normalize-space($row_num)]">
6039
+ <xsl:if test="xalan:nodeset($border_under_row)/mn:item[. = normalize-space($row_num)]">
6333
6040
  <xsl:attribute name="border-bottom"><xsl:value-of select="$table-border"/></xsl:attribute>
6334
6041
  </xsl:if>
6335
6042
  </xsl:when>
@@ -6367,11 +6074,10 @@
6367
6074
  </xsl:template>
6368
6075
 
6369
6076
  <xsl:template name="setTableRowAttributes">
6370
-
6371
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6372
- <xsl:if test="$doctype = 'service-publication'">
6373
- <xsl:attribute name="min-height">5mm</xsl:attribute>
6374
- </xsl:if>
6077
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
6078
+ <xsl:if test="$doctype = 'service-publication'">
6079
+ <xsl:attribute name="min-height">5mm</xsl:attribute>
6080
+ </xsl:if>
6375
6081
 
6376
6082
  <xsl:call-template name="setColors"/>
6377
6083
 
@@ -6451,7 +6157,7 @@
6451
6157
  </xsl:variable>
6452
6158
  <xsl:variable name="quot">"</xsl:variable>
6453
6159
  <xsl:variable name="styles_">
6454
- <xsl:for-each select="xalan:nodeset($styles__)/item">
6160
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
6455
6161
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
6456
6162
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
6457
6163
  <xsl:if test="$key = 'color' or $key = 'background-color' or $key = 'border' or $key = 'border-top' or $key = 'border-right' or $key = 'border-left' or $key = 'border-bottom' or $key = 'border-style' or $key = 'border-width' or $key = 'border-color' or $key = 'border-top-style' or $key = 'border-top-width' or $key = 'border-top-color' or $key = 'border-right-style' or $key = 'border-right-width' or $key = 'border-right-color' or $key = 'border-left-style' or $key = 'border-left-width' or $key = 'border-left-color' or $key = 'border-bottom-style' or $key = 'border-bottom-width' or $key = 'border-bottom-color'">
@@ -6501,9 +6207,7 @@
6501
6207
  <fo:block role="SKIP">
6502
6208
 
6503
6209
  <xsl:if test="$isGenerateTableIF = 'true'">
6504
-
6505
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6506
-
6210
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
6507
6211
  </xsl:if>
6508
6212
 
6509
6213
  <xsl:apply-templates/>
@@ -6518,25 +6222,23 @@
6518
6222
 
6519
6223
  <!-- table/note, table/example, table/tfoot//note, table/tfoot//example -->
6520
6224
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name() = 'example'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name() = 'example']" priority="2">
6225
+ <xsl:call-template name="setNamedDestination"/>
6226
+ <fo:block xsl:use-attribute-sets="table-note-style">
6227
+ <xsl:copy-of select="@id"/>
6521
6228
 
6522
- <xsl:call-template name="setNamedDestination"/>
6523
- <fo:block xsl:use-attribute-sets="table-note-style">
6524
- <xsl:copy-of select="@id"/>
6525
-
6526
- <xsl:call-template name="refine_table-note-style"/>
6229
+ <xsl:call-template name="refine_table-note-style"/>
6527
6230
 
6528
- <!-- Table's note/example name (NOTE, for example) -->
6529
- <fo:inline xsl:use-attribute-sets="table-note-name-style">
6231
+ <!-- Table's note/example name (NOTE, for example) -->
6232
+ <fo:inline xsl:use-attribute-sets="table-note-name-style">
6530
6233
 
6531
- <xsl:call-template name="refine_table-note-name-style"/>
6234
+ <xsl:call-template name="refine_table-note-name-style"/>
6532
6235
 
6533
- <xsl:apply-templates select="*[local-name() = 'name']"/>
6534
-
6535
- </fo:inline>
6236
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
6536
6237
 
6537
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6538
- </fo:block>
6238
+ </fo:inline>
6539
6239
 
6240
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
6241
+ </fo:block>
6540
6242
  </xsl:template> <!-- table/note -->
6541
6243
 
6542
6244
  <xsl:template match="*[local-name()='table']/*[local-name()='note' or local-name()='example']/*[local-name()='p'] | *[local-name()='table']/*[local-name()='tfoot']//*[local-name()='note' or local-name()='example']/*[local-name()='p']" priority="2">
@@ -6581,9 +6283,7 @@
6581
6283
  <xsl:variable name="current_fn_number" select="@reference"/>
6582
6284
 
6583
6285
  <xsl:variable name="current_fn_number_text">
6584
-
6585
- <xsl:value-of select="$current_fn_number"/>
6586
-
6286
+ <xsl:value-of select="$current_fn_number"/>
6587
6287
  </xsl:variable>
6588
6288
 
6589
6289
  <xsl:variable name="ref_id" select="@target"/>
@@ -6595,12 +6295,10 @@
6595
6295
  <xsl:choose>
6596
6296
  <xsl:when test="ancestor::*[local-name() = 'bibitem']">
6597
6297
  <fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
6598
-
6599
6298
  </fn_styles>
6600
6299
  </xsl:when>
6601
6300
  <xsl:otherwise>
6602
6301
  <fn_styles xsl:use-attribute-sets="fn-num-style">
6603
-
6604
6302
  </fn_styles>
6605
6303
  </xsl:otherwise>
6606
6304
  </xsl:choose>
@@ -6618,7 +6316,6 @@
6618
6316
  <xsl:with-param name="element">
6619
6317
  <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
6620
6318
  <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
6621
-
6622
6319
  <xsl:copy-of select="$current_fn_number_text"/>
6623
6320
 
6624
6321
  </fo:inline>
@@ -6656,10 +6353,9 @@
6656
6353
  <here><xsl:copy-of select="$footnotes"/></here> -->
6657
6354
  <xsl:apply-templates select="$footnotes/*[local-name() = 'fmt-fn-body'][@id = $ref_id]"/>
6658
6355
  </xsl:variable>
6659
-
6660
- <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
6661
- <xsl:copy-of select="$fn_block"/>
6662
- </fo:block>
6356
+ <fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
6357
+ <xsl:copy-of select="$fn_block"/>
6358
+ </fo:block>
6663
6359
 
6664
6360
  </fo:block-container>
6665
6361
  </fo:footnote-body>
@@ -6736,21 +6432,20 @@
6736
6432
  <xsl:variable name="reference" select="@reference"/>
6737
6433
  <xsl:if test="not(preceding-sibling::*[@reference = $reference])"> --> <!-- only unique reference puts in note-->
6738
6434
  <xsl:for-each select="..//*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body']">
6435
+ <fo:block xsl:use-attribute-sets="table-fn-style">
6436
+ <xsl:copy-of select="@id"/>
6437
+ <xsl:call-template name="refine_table-fn-style"/>
6739
6438
 
6740
- <fo:block xsl:use-attribute-sets="table-fn-style">
6741
- <xsl:copy-of select="@id"/>
6742
- <xsl:call-template name="refine_table-fn-style"/>
6743
-
6744
- <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
6745
- <xsl:with-param name="process">true</xsl:with-param>
6746
- </xsl:apply-templates>
6439
+ <xsl:apply-templates select=".//*[local-name() = 'fmt-fn-label']">
6440
+ <xsl:with-param name="process">true</xsl:with-param>
6441
+ </xsl:apply-templates>
6747
6442
 
6748
- <fo:inline xsl:use-attribute-sets="table-fn-body-style">
6749
- <!-- <xsl:copy-of select="./node()"/> -->
6750
- <xsl:apply-templates/>
6751
- </fo:inline>
6443
+ <fo:inline xsl:use-attribute-sets="table-fn-body-style">
6444
+ <!-- <xsl:copy-of select="./node()"/> -->
6445
+ <xsl:apply-templates/>
6446
+ </fo:inline>
6752
6447
 
6753
- </fo:block>
6448
+ </fo:block>
6754
6449
 
6755
6450
  <!-- </xsl:if> -->
6756
6451
  </xsl:for-each>
@@ -6803,9 +6498,7 @@
6803
6498
  <xsl:param name="process">false</xsl:param>
6804
6499
  <xsl:if test="$process = 'true'">
6805
6500
  <xsl:attribute name="padding-right">5mm</xsl:attribute>
6806
-
6807
- <xsl:attribute name="padding-right">3mm</xsl:attribute>
6808
-
6501
+ <xsl:attribute name="padding-right">3mm</xsl:attribute>
6809
6502
  </xsl:if>
6810
6503
  </xsl:template>
6811
6504
 
@@ -6889,7 +6582,6 @@
6889
6582
  <xsl:if test="xalan:nodeset($references)//*[local-name() = 'fmt-fn-body']">
6890
6583
 
6891
6584
  <xsl:variable name="key_iso">
6892
-
6893
6585
  </xsl:variable>
6894
6586
 
6895
6587
  <fo:block>
@@ -6935,7 +6627,6 @@
6935
6627
  <fo:table width="95%" table-layout="fixed">
6936
6628
  <xsl:if test="normalize-space($key_iso) = 'true'">
6937
6629
  <xsl:attribute name="font-size">10pt</xsl:attribute>
6938
-
6939
6630
  </xsl:if>
6940
6631
  <xsl:choose>
6941
6632
  <!-- if there 'dl', then set same columns width -->
@@ -6959,23 +6650,19 @@
6959
6650
  <fo:table-row>
6960
6651
  <fo:table-cell>
6961
6652
  <fo:block>
6962
-
6963
- <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
6964
- <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
6965
- <!-- <xsl:value-of select="@reference"/> -->
6966
- <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
6967
- </fo:inline>
6653
+ <fo:inline id="{@id}" xsl:use-attribute-sets="figure-fmt-fn-label-style">
6654
+ <!-- <xsl:attribute name="padding-right">0mm</xsl:attribute> -->
6655
+ <!-- <xsl:value-of select="@reference"/> -->
6656
+ <xsl:value-of select="normalize-space(.//*[local-name() = 'fmt-fn-label'])"/>
6657
+ </fo:inline>
6968
6658
 
6969
6659
  </fo:block>
6970
6660
  </fo:table-cell>
6971
6661
  <fo:table-cell>
6972
6662
  <fo:block xsl:use-attribute-sets="figure-fn-body-style">
6973
6663
  <xsl:if test="normalize-space($key_iso) = 'true'">
6974
-
6975
- <xsl:attribute name="margin-bottom">0</xsl:attribute>
6976
-
6664
+ <xsl:attribute name="margin-bottom">0</xsl:attribute>
6977
6665
  </xsl:if>
6978
-
6979
6666
  <!-- <xsl:copy-of select="./node()"/> -->
6980
6667
  <xsl:apply-templates/>
6981
6668
  </fo:block>
@@ -7025,11 +6712,9 @@
7025
6712
  <!-- figure/dl[@key = 'true']/dt/p/sup -->
7026
6713
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'dl'][@key = 'true']/*[local-name() = 'dt']/ *[local-name() = 'p'][count(node()[normalize-space() != '']) = 1]/*[local-name() = 'sup']" priority="3">
7027
6714
  <xsl:variable name="key_iso">
7028
-
7029
6715
  </xsl:variable>
7030
6716
  <xsl:if test="normalize-space($key_iso) = 'true'">
7031
6717
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7032
-
7033
6718
  </xsl:if>
7034
6719
  <fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
7035
6720
  <!-- <xsl:value-of select="@reference"/> -->
@@ -7075,8 +6760,7 @@
7075
6760
  <xsl:text>※</xsl:text>
7076
6761
  </xsl:if> -->
7077
6762
  <!-- <xsl:value-of select="@reference"/> -->
7078
-
7079
- <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
6763
+ <xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
7080
6764
 
7081
6765
  <!-- <xsl:if test="$namespace = 'bsi'">
7082
6766
  <xsl:text>)</xsl:text>
@@ -7119,40 +6803,39 @@
7119
6803
  <!-- ===================== -->
7120
6804
  <!-- Definition List -->
7121
6805
  <!-- ===================== -->
7122
-
7123
- <!-- convert table[@class = 'dl'] to dl with colgroup/col/@colwidth -->
7124
- <xsl:template match="*[local-name()='table'][@class = 'dl' and count(.//*[local-name() = 'tr'][1]/*) = 2]" priority="4">
7125
- <xsl:variable name="dl">
7126
- <xsl:element name="dl" namespace="{$namespace_full}">
7127
- <xsl:copy-of select="@*"/>
7128
- <xsl:element name="colgroup" namespace="{$namespace_full}">
7129
- <xsl:for-each select=".//*[local-name()='tr'][1]/*">
7130
- <xsl:element name="col" namespace="{$namespace_full}">
7131
- <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
7132
- </xsl:element>
7133
- </xsl:for-each>
7134
- </xsl:element>
7135
- <xsl:apply-templates mode="table_to_dl"/>
6806
+ <!-- convert table[@class = 'dl'] to dl with colgroup/col/@colwidth -->
6807
+ <xsl:template match="*[local-name()='table'][@class = 'dl' and count(.//*[local-name() = 'tr'][1]/*) = 2]" priority="4">
6808
+ <xsl:variable name="dl">
6809
+ <xsl:element name="dl" namespace="{$namespace_full}">
6810
+ <xsl:copy-of select="@*"/>
6811
+ <xsl:element name="colgroup" namespace="{$namespace_full}">
6812
+ <xsl:for-each select=".//*[local-name()='tr'][1]/*">
6813
+ <xsl:element name="col" namespace="{$namespace_full}">
6814
+ <xsl:attribute name="width"><xsl:value-of select="@width"/></xsl:attribute>
6815
+ </xsl:element>
6816
+ </xsl:for-each>
7136
6817
  </xsl:element>
7137
- </xsl:variable>
7138
- <xsl:apply-templates select="xalan:nodeset($dl)/node()"/>
7139
- </xsl:template>
7140
- <xsl:template match="@*|node()" mode="table_to_dl">
7141
- <xsl:copy>
7142
- <xsl:apply-templates select="@*|node()" mode="table_to_dl"/>
7143
- </xsl:copy>
7144
- </xsl:template>
7145
- <xsl:template match="*[local-name() = 'tbody']" mode="table_to_dl">
7146
- <xsl:apply-templates mode="table_to_dl"/>
7147
- </xsl:template>
7148
- <xsl:template match="*[local-name() = 'tr']" mode="table_to_dl">
7149
- <xsl:element name="dt" namespace="{$namespace_full}">
7150
- <xsl:apply-templates select="*[1]/node()" mode="table_to_dl"/>
6818
+ <xsl:apply-templates mode="table_to_dl"/>
7151
6819
  </xsl:element>
7152
- <xsl:element name="dd" namespace="{$namespace_full}">
7153
- <xsl:apply-templates select="*[2]/node()" mode="table_to_dl"/>
7154
- </xsl:element>
7155
- </xsl:template>
6820
+ </xsl:variable>
6821
+ <xsl:apply-templates select="xalan:nodeset($dl)/node()"/>
6822
+ </xsl:template>
6823
+ <xsl:template match="@*|node()" mode="table_to_dl">
6824
+ <xsl:copy>
6825
+ <xsl:apply-templates select="@*|node()" mode="table_to_dl"/>
6826
+ </xsl:copy>
6827
+ </xsl:template>
6828
+ <xsl:template match="*[local-name() = 'tbody']" mode="table_to_dl">
6829
+ <xsl:apply-templates mode="table_to_dl"/>
6830
+ </xsl:template>
6831
+ <xsl:template match="*[local-name() = 'tr']" mode="table_to_dl">
6832
+ <xsl:element name="dt" namespace="{$namespace_full}">
6833
+ <xsl:apply-templates select="*[1]/node()" mode="table_to_dl"/>
6834
+ </xsl:element>
6835
+ <xsl:element name="dd" namespace="{$namespace_full}">
6836
+ <xsl:apply-templates select="*[2]/node()" mode="table_to_dl"/>
6837
+ </xsl:element>
6838
+ </xsl:template>
7156
6839
 
7157
6840
  <!-- for table auto-layout algorithm -->
7158
6841
  <xsl:template match="*[local-name()='dl']" priority="2">
@@ -7182,10 +6865,9 @@
7182
6865
  </xsl:if>
7183
6866
 
7184
6867
  <xsl:call-template name="setBlockSpanAll"/>
7185
-
7186
- <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
7187
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
7188
- </xsl:if>
6868
+ <xsl:if test="not(ancestor::*[local-name() = 'quote'])">
6869
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
6870
+ </xsl:if>
7189
6871
 
7190
6872
  <xsl:if test="ancestor::*[local-name() = 'sourcecode']">
7191
6873
  <!-- set font-size as sourcecode font-size -->
@@ -7206,7 +6888,6 @@
7206
6888
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
7207
6889
  </xsl:choose>
7208
6890
  </xsl:attribute>
7209
-
7210
6891
  </xsl:if>
7211
6892
 
7212
6893
  <xsl:call-template name="setTrackChangesStyles">
@@ -7215,37 +6896,32 @@
7215
6896
  </xsl:call-template>
7216
6897
 
7217
6898
  <fo:block-container margin-left="0mm" role="SKIP">
7218
-
7219
- <xsl:attribute name="margin-right">0mm</xsl:attribute>
6899
+ <xsl:attribute name="margin-right">0mm</xsl:attribute>
7220
6900
 
7221
6901
  <xsl:variable name="parent" select="local-name(..)"/>
7222
6902
 
7223
- <xsl:variable name="key_iso">
7224
- <!-- and (not(../@class) or ../@class !='pseudocode') -->
6903
+ <xsl:variable name="key_iso"> <!-- and (not(../@class) or ../@class !='pseudocode') -->
7225
6904
  </xsl:variable>
7226
6905
 
7227
6906
  <xsl:variable name="onlyOneComponent" select="normalize-space($parent = 'formula' and count(*[local-name()='dt']) = 1)"/>
7228
6907
 
7229
6908
  <xsl:choose>
7230
6909
  <xsl:when test="$onlyOneComponent = 'true'"> <!-- only one component -->
7231
-
7232
- <fo:block margin-bottom="12pt" text-align="left">
7233
-
7234
- <!-- <xsl:variable name="title-where">
6910
+ <fo:block margin-bottom="12pt" text-align="left">
6911
+ <!-- <xsl:variable name="title-where">
7235
6912
  <xsl:call-template name="getLocalizedString">
7236
6913
  <xsl:with-param name="key">where</xsl:with-param>
7237
6914
  </xsl:call-template>
7238
6915
  </xsl:variable>
7239
6916
  <xsl:value-of select="$title-where"/> -->
7240
- <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
7241
- <xsl:text> </xsl:text>
7242
- <xsl:apply-templates select="*[local-name()='dt']/*"/>
7243
- <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
7244
- <xsl:text> </xsl:text>
7245
- </xsl:if>
7246
- <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
7247
- </fo:block>
7248
-
6917
+ <xsl:apply-templates select="preceding-sibling::*[1][local-name() = 'p' and @keep-with-next = 'true']/node()"/>
6918
+ <xsl:text> </xsl:text>
6919
+ <xsl:apply-templates select="*[local-name()='dt']/*"/>
6920
+ <xsl:if test="*[local-name()='dd']/node()[normalize-space() != ''][1][self::text()]">
6921
+ <xsl:text> </xsl:text>
6922
+ </xsl:if>
6923
+ <xsl:apply-templates select="*[local-name()='dd']/node()" mode="inline"/>
6924
+ </fo:block>
7249
6925
  </xsl:when> <!-- END: only one component -->
7250
6926
  <xsl:when test="$parent = 'formula'"> <!-- a few components -->
7251
6927
  <fo:block margin-bottom="12pt" text-align="left">
@@ -7265,19 +6941,17 @@
7265
6941
  <xsl:when test="$parent = 'figure' and (not(../@class) or ../@class !='pseudocode')"> <!-- definition list in a figure -->
7266
6942
  <!-- Presentation XML contains 'Key' caption, https://github.com/metanorma/isodoc/issues/607 -->
7267
6943
  <xsl:if test="not(preceding-sibling::*[1][local-name() = 'p' and @keep-with-next])"> <!-- for old Presentation XML -->
6944
+ <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
7268
6945
 
7269
- <fo:block font-weight="bold" text-align="left" margin-bottom="12pt" keep-with-next="always">
7270
-
7271
- <xsl:call-template name="refine_figure_key_style"/>
7272
-
7273
- <xsl:variable name="title-key">
7274
- <xsl:call-template name="getLocalizedString">
7275
- <xsl:with-param name="key">key</xsl:with-param>
7276
- </xsl:call-template>
7277
- </xsl:variable>
7278
- <xsl:value-of select="$title-key"/>
7279
- </fo:block>
6946
+ <xsl:call-template name="refine_figure_key_style"/>
7280
6947
 
6948
+ <xsl:variable name="title-key">
6949
+ <xsl:call-template name="getLocalizedString">
6950
+ <xsl:with-param name="key">key</xsl:with-param>
6951
+ </xsl:call-template>
6952
+ </xsl:variable>
6953
+ <xsl:value-of select="$title-key"/>
6954
+ </fo:block>
7281
6955
  </xsl:if>
7282
6956
  </xsl:when> <!-- END: definition list in a figure -->
7283
6957
  </xsl:choose>
@@ -7310,12 +6984,10 @@
7310
6984
  <xsl:if test="$isGenerateTableIF = 'true'">
7311
6985
  <xsl:attribute name="wrap-option">no-wrap</xsl:attribute>
7312
6986
  </xsl:if>
7313
-
7314
6987
  <xsl:choose>
7315
6988
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'"/>
7316
6989
  <xsl:when test="normalize-space($key_iso) = 'true'">
7317
6990
  <xsl:attribute name="font-size">10pt</xsl:attribute>
7318
-
7319
6991
  </xsl:when>
7320
6992
  </xsl:choose>
7321
6993
 
@@ -7420,17 +7092,15 @@
7420
7092
  <xsl:call-template name="getMaxLength_dt"/>
7421
7093
  </xsl:variable>
7422
7094
 
7423
- <xsl:variable name="isContainsKeepTogetherTag_">
7424
- false
7095
+ <xsl:variable name="isContainsKeepTogetherTag_">false
7425
7096
  </xsl:variable>
7426
7097
  <xsl:variable name="isContainsKeepTogetherTag" select="normalize-space($isContainsKeepTogetherTag_)"/>
7427
7098
  <!-- isContainsExpressReference=<xsl:value-of select="$isContainsExpressReference"/> -->
7428
-
7429
- <xsl:call-template name="setColumnWidth_dl">
7430
- <xsl:with-param name="colwidths" select="$colwidths"/>
7431
- <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
7432
- <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
7433
- </xsl:call-template>
7099
+ <xsl:call-template name="setColumnWidth_dl">
7100
+ <xsl:with-param name="colwidths" select="$colwidths"/>
7101
+ <xsl:with-param name="maxlength_dt" select="$maxlength_dt"/>
7102
+ <xsl:with-param name="isContainsKeepTogetherTag" select="$isContainsKeepTogetherTag"/>
7103
+ </xsl:call-template>
7434
7104
 
7435
7105
  <fo:table-body>
7436
7106
 
@@ -7481,27 +7151,21 @@
7481
7151
  </xsl:template>
7482
7152
 
7483
7153
  <xsl:template name="refine_dl_formula_where_style">
7484
-
7485
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
7486
-
7154
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
7487
7155
  </xsl:template> <!-- refine_dl_formula_where_style -->
7488
7156
 
7489
7157
  <xsl:template name="refine_figure_key_style">
7490
-
7491
7158
  </xsl:template> <!-- refine_figure_key_style -->
7492
7159
 
7493
7160
  <xsl:template name="refine_multicomponent_style">
7494
7161
  <xsl:variable name="parent" select="local-name(..)"/>
7495
-
7496
- <xsl:if test="$parent = 'figure' or $parent = 'formula'">
7497
- <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
7498
- </xsl:if>
7499
-
7162
+ <xsl:if test="$parent = 'figure' or $parent = 'formula'">
7163
+ <xsl:attribute name="margin-left">7.4mm</xsl:attribute>
7164
+ </xsl:if>
7500
7165
  </xsl:template> <!-- refine_multicomponent_style -->
7501
7166
 
7502
7167
  <xsl:template name="refine_multicomponent_block_style">
7503
7168
  <xsl:variable name="parent" select="local-name(..)"/>
7504
-
7505
7169
  </xsl:template> <!-- refine_multicomponent_block_style -->
7506
7170
 
7507
7171
  <!-- ignore 'p' with 'where' in formula, before 'dl' -->
@@ -7688,14 +7352,11 @@
7688
7352
  <xsl:attribute name="id">
7689
7353
  <xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
7690
7354
  </xsl:attribute>
7691
-
7692
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
7693
- <xsl:with-param name="process">true</xsl:with-param>
7694
- </xsl:apply-templates>
7695
-
7355
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
7356
+ <xsl:with-param name="process">true</xsl:with-param>
7357
+ </xsl:apply-templates>
7696
7358
  </td>
7697
7359
  </tr>
7698
-
7699
7360
  </xsl:template>
7700
7361
 
7701
7362
  <!-- Definition's term -->
@@ -7704,7 +7365,6 @@
7704
7365
  <xsl:param name="split_keep-within-line"/>
7705
7366
 
7706
7367
  <fo:table-row xsl:use-attribute-sets="dt-row-style">
7707
-
7708
7368
  <xsl:call-template name="insert_dt_cell">
7709
7369
  <xsl:with-param name="key_iso" select="$key_iso"/>
7710
7370
  <xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
@@ -7726,7 +7386,6 @@
7726
7386
  <!-- border is mandatory, to calculate real width -->
7727
7387
  <xsl:attribute name="border">0.1pt solid black</xsl:attribute>
7728
7388
  <xsl:attribute name="text-align">left</xsl:attribute>
7729
-
7730
7389
  </xsl:if>
7731
7390
 
7732
7391
  <xsl:call-template name="refine_dt-cell-style"/>
@@ -7736,9 +7395,7 @@
7736
7395
 
7737
7396
  <xsl:choose>
7738
7397
  <xsl:when test="$isGenerateTableIF = 'true'">
7739
-
7740
- <xsl:copy-of select="@id"/>
7741
-
7398
+ <xsl:copy-of select="@id"/>
7742
7399
  </xsl:when>
7743
7400
  <xsl:otherwise>
7744
7401
  <xsl:copy-of select="@id"/>
@@ -7775,12 +7432,9 @@
7775
7432
  <fo:block role="SKIP">
7776
7433
 
7777
7434
  <xsl:if test="$isGenerateTableIF = 'true'">
7778
-
7779
- <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
7780
-
7435
+ <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
7781
7436
  </xsl:if>
7782
-
7783
- <xsl:attribute name="text-align">justify</xsl:attribute>
7437
+ <xsl:attribute name="text-align">justify</xsl:attribute>
7784
7438
 
7785
7439
  <xsl:choose>
7786
7440
  <xsl:when test="$isGenerateTableIF = 'true'">
@@ -7927,11 +7581,9 @@
7927
7581
  </xsl:template>
7928
7582
 
7929
7583
  <xsl:template name="refine_italic_style">
7930
-
7931
- <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
7932
- <xsl:attribute name="font-style">normal</xsl:attribute>
7933
- </xsl:if>
7934
-
7584
+ <xsl:if test="$lang = 'ar'"> <!-- to prevent rendering `###` due the missing Arabic glyphs in the italic font (Times New Roman) -->
7585
+ <xsl:attribute name="font-style">normal</xsl:attribute>
7586
+ </xsl:if>
7935
7587
  </xsl:template>
7936
7588
 
7937
7589
  <xsl:template match="*[local-name()='strong'] | *[local-name()='b']">
@@ -7947,7 +7599,6 @@
7947
7599
  </xsl:template>
7948
7600
 
7949
7601
  <xsl:template name="refine_strong_style">
7950
-
7951
7602
  <xsl:if test="ancestor::*['preferred']">
7952
7603
  <xsl:attribute name="role">SKIP</xsl:attribute>
7953
7604
  </xsl:if>
@@ -7972,10 +7623,7 @@
7972
7623
  <xsl:template match="*[local-name()='tt']">
7973
7624
  <fo:inline xsl:use-attribute-sets="tt-style">
7974
7625
 
7975
- <xsl:variable name="_font-size">
7976
-
7977
- <!-- inherit -->
7978
-
7626
+ <xsl:variable name="_font-size"> <!-- inherit -->
7979
7627
  </xsl:variable>
7980
7628
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
7981
7629
  <xsl:if test="$font-size != ''">
@@ -8191,8 +7839,7 @@
8191
7839
  </xsl:otherwise>
8192
7840
  </xsl:choose>
8193
7841
  </xsl:variable>
8194
- <xsl:variable name="ratio_">
8195
- 0.75
7842
+ <xsl:variable name="ratio_">0.75
8196
7843
  </xsl:variable>
8197
7844
  <xsl:variable name="ratio" select="number(normalize-space($ratio_))"/>
8198
7845
  <fo:inline font-size="{$ratio * 100}%" role="SKIP">
@@ -8282,7 +7929,7 @@
8282
7929
 
8283
7930
  <xsl:variable name="quot">"</xsl:variable>
8284
7931
  <xsl:variable name="styles_">
8285
- <xsl:for-each select="xalan:nodeset($styles__)/item">
7932
+ <xsl:for-each select="xalan:nodeset($styles__)/mn:item">
8286
7933
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
8287
7934
  <xsl:variable name="value_" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
8288
7935
  <xsl:variable name="value">
@@ -8294,7 +7941,7 @@
8294
7941
  </xsl:otherwise>
8295
7942
  </xsl:choose>
8296
7943
  </xsl:variable>
8297
- <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color'">
7944
+ <xsl:if test="$key = 'font-family' or $key = 'font-size' or $key = 'color' or $key = 'baseline-shift'">
8298
7945
  <style name="{$key}"><xsl:value-of select="$value"/></style>
8299
7946
  </xsl:if>
8300
7947
  <xsl:if test="$key = 'text-indent'">
@@ -8308,7 +7955,6 @@
8308
7955
  <fo:inline>
8309
7956
  <xsl:for-each select="$styles/style">
8310
7957
  <xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
8311
-
8312
7958
  </xsl:for-each>
8313
7959
  <xsl:apply-templates/>
8314
7960
  </fo:inline>
@@ -9295,10 +8941,9 @@
9295
8941
  <xsl:variable name="mathml_content">
9296
8942
  <xsl:apply-templates select="." mode="mathml_actual_text"/>
9297
8943
  </xsl:variable>
9298
-
9299
- <xsl:call-template name="mathml_instream_object">
9300
- <xsl:with-param name="mathml_content" select="$mathml_content"/>
9301
- </xsl:call-template>
8944
+ <xsl:call-template name="mathml_instream_object">
8945
+ <xsl:with-param name="mathml_content" select="$mathml_content"/>
8946
+ </xsl:call-template>
9302
8947
 
9303
8948
  </fo:inline>
9304
8949
  </xsl:template>
@@ -9332,7 +8977,6 @@
9332
8977
  <xsl:template name="getMathml_asciimath_text">
9333
8978
  <xsl:variable name="asciimath" select="../*[local-name() = 'asciimath']"/>
9334
8979
  <xsl:variable name="latexmath">
9335
-
9336
8980
  </xsl:variable>
9337
8981
  <xsl:variable name="asciimath_text_following">
9338
8982
  <xsl:choose>
@@ -9405,7 +9049,6 @@
9405
9049
  </xsl:template>
9406
9050
 
9407
9051
  <xsl:template name="refine_mathml_insteam_object_style">
9408
-
9409
9052
  </xsl:template> <!-- refine_mathml_insteam_object_style -->
9410
9053
 
9411
9054
  <xsl:template match="mathml:*" mode="mathml_actual_text">
@@ -9803,7 +9446,6 @@
9803
9446
  <xsl:variable name="annotation-id" select="@id"/>
9804
9447
  <xsl:variable name="callout" select="//*[@target = $annotation-id]/text()"/>
9805
9448
  <fo:block id="{$annotation-id}" white-space="nowrap">
9806
-
9807
9449
  <fo:inline>
9808
9450
  <xsl:apply-templates>
9809
9451
  <xsl:with-param name="callout" select="concat('&lt;', $callout, '&gt; ')"/>
@@ -9832,7 +9474,6 @@
9832
9474
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
9833
9475
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
9834
9476
  </xsl:if>
9835
-
9836
9477
  <xsl:if test="parent::*[local-name() = 'add']">
9837
9478
  <xsl:call-template name="append_add-style"/>
9838
9479
  </xsl:if>
@@ -9843,8 +9484,7 @@
9843
9484
  </xsl:template>
9844
9485
 
9845
9486
  <!-- command between two xref points to non-standard bibitem -->
9846
- <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]">
9847
- <xsl:value-of select="."/>
9487
+ <xsl:template match="text()[. = ','][preceding-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']] and following-sibling::node()[1][local-name() = 'sup'][*[local-name() = 'xref'][@type = 'footnote']]]"><xsl:value-of select="."/>
9848
9488
  </xsl:template>
9849
9489
 
9850
9490
  <!-- ====== -->
@@ -9859,7 +9499,6 @@
9859
9499
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
9860
9500
  </xsl:choose>
9861
9501
  </xsl:attribute>
9862
-
9863
9502
  </xsl:if>
9864
9503
  <fo:block-container margin-left="0mm" role="SKIP">
9865
9504
  <xsl:call-template name="setNamedDestination"/>
@@ -9949,57 +9588,52 @@
9949
9588
 
9950
9589
  <xsl:template match="*[local-name() = 'note']" name="note">
9951
9590
 
9952
- <xsl:call-template name="setNamedDestination"/>
9953
-
9954
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9955
-
9956
- <xsl:call-template name="setBlockSpanAll"/>
9957
-
9958
- <xsl:call-template name="refine_note-style"/>
9591
+ <xsl:call-template name="setNamedDestination"/>
9959
9592
 
9960
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9593
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9961
9594
 
9962
- <fo:block>
9595
+ <xsl:call-template name="setBlockSpanAll"/>
9963
9596
 
9964
- <xsl:call-template name="refine_note_block_style"/>
9597
+ <xsl:call-template name="refine_note-style"/>
9965
9598
 
9966
- <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9599
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
9600
+ <fo:block>
9967
9601
 
9968
- <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
9602
+ <xsl:call-template name="refine_note_block_style"/>
9969
9603
 
9970
- <xsl:call-template name="refine_note-name-style"/>
9604
+ <fo:inline xsl:use-attribute-sets="note-name-style" role="SKIP">
9971
9605
 
9972
- <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9973
- <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9974
- <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9975
- <xsl:call-template name="append_add-style"/>
9976
- </xsl:if>
9606
+ <xsl:apply-templates select="*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab"/>
9977
9607
 
9978
- <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9979
- <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9980
- <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9981
- <xsl:with-param name="skip">false</xsl:with-param>
9982
- </xsl:apply-templates>
9983
- </xsl:if>
9608
+ <xsl:call-template name="refine_note-name-style"/>
9984
9609
 
9985
- <xsl:apply-templates select="*[local-name() = 'name']"/>
9610
+ <!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
9611
+ <!-- <xsl:if test="*[not(local-name()='name')][1][node()[normalize-space() != ''][1][local-name() = 'add'] and node()[normalize-space() != ''][last()][local-name() = 'add']]"> -->
9612
+ <xsl:if test="*[not(local-name()='name')][1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
9613
+ <xsl:call-template name="append_add-style"/>
9614
+ </xsl:if>
9986
9615
 
9987
- </fo:inline>
9616
+ <!-- if note contains only one element and first and last childs are `add` ace-tag, then move start ace-tag before NOTE's name-->
9617
+ <xsl:if test="count(*[not(local-name() = 'name')]) = 1 and *[not(local-name() = 'name')]/node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9618
+ <xsl:apply-templates select="*[not(local-name() = 'name')]/node()[1][local-name() = 'add'][starts-with(text(), $ace_tag)]">
9619
+ <xsl:with-param name="skip">false</xsl:with-param>
9620
+ </xsl:apply-templates>
9621
+ </xsl:if>
9988
9622
 
9989
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9990
- </fo:block>
9623
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
9991
9624
 
9992
- </fo:block-container>
9993
- </fo:block-container>
9625
+ </fo:inline>
9994
9626
 
9627
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
9628
+ </fo:block>
9629
+ </fo:block-container>
9630
+ </fo:block-container>
9995
9631
  </xsl:template>
9996
9632
 
9997
9633
  <xsl:template name="refine_note_block_style">
9998
-
9999
- <xsl:if test="ancestor::itu:figure">
10000
- <xsl:attribute name="keep-with-previous">always</xsl:attribute>
10001
- </xsl:if>
10002
-
9634
+ <xsl:if test="ancestor::itu:figure">
9635
+ <xsl:attribute name="keep-with-previous">always</xsl:attribute>
9636
+ </xsl:if>
10003
9637
  </xsl:template> <!-- refine_note_block_style -->
10004
9638
 
10005
9639
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'p']">
@@ -10052,7 +9686,6 @@
10052
9686
  <xsl:value-of select="$sfx"/>
10053
9687
  </xsl:when>
10054
9688
  <xsl:otherwise>
10055
-
10056
9689
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
10057
9690
  <!-- <xsl:if test="$namespace = 'ieee'">
10058
9691
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -10060,7 +9693,6 @@
10060
9693
  <!-- <xsl:if test="$namespace = 'iho' or $namespace = 'gb' or $namespace = 'm3d' or $namespace = 'unece-rec' or $namespace = 'unece' or $namespace = 'rsd'">
10061
9694
  <xsl:text>:</xsl:text>
10062
9695
  </xsl:if> -->
10063
-
10064
9696
  <!-- <xsl:if test="$namespace = 'itu' or $namespace = 'nist-cswp' or $namespace = 'nist-sp'">
10065
9697
  <xsl:text> – </xsl:text> en dash &#x2013;
10066
9698
  </xsl:if> -->
@@ -10081,7 +9713,6 @@
10081
9713
  <xsl:value-of select="$sfx"/>
10082
9714
  </xsl:when>
10083
9715
  <xsl:otherwise>
10084
-
10085
9716
  <!-- https://github.com/metanorma/isodoc/issues/607 -->
10086
9717
  <!-- <xsl:if test="$namespace = 'ieee'">
10087
9718
  <xsl:text>—</xsl:text> em dash &#x2014;
@@ -10137,7 +9768,6 @@
10137
9768
  <fo:block id="{@id}" xsl:use-attribute-sets="term-style">
10138
9769
 
10139
9770
  <xsl:if test="parent::*[local-name() = 'term'] and not(preceding-sibling::*[local-name() = 'term'])">
10140
-
10141
9771
  </xsl:if>
10142
9772
  <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
10143
9773
  </fo:block>
@@ -10177,8 +9807,7 @@
10177
9807
  <!-- Example: Dimensions in millimeters -->
10178
9808
  <xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
10179
9809
 
10180
- <xsl:variable name="show_figure_key_in_block_container">
10181
- true
9810
+ <xsl:variable name="show_figure_key_in_block_container">true
10182
9811
  </xsl:variable>
10183
9812
 
10184
9813
  <fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
@@ -10193,11 +9822,9 @@
10193
9822
  <xsl:if test="normalize-space($show_figure_key_in_block_container) = 'true'">
10194
9823
  <xsl:call-template name="showFigureKey"/>
10195
9824
  </xsl:if>
10196
-
10197
- <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
9825
+ <xsl:apply-templates select="*[local-name() = 'name']"/> <!-- show figure's name AFTER image -->
10198
9826
 
10199
9827
  </fo:block-container>
10200
-
10201
9828
  </xsl:template>
10202
9829
 
10203
9830
  <xsl:template name="showFigureKey">
@@ -10235,13 +9862,12 @@
10235
9862
  <!-- SOURCE: ... -->
10236
9863
  <!-- figure/source -->
10237
9864
  <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
10238
-
10239
- <xsl:call-template name="termsource"/>
10240
-
9865
+ <xsl:call-template name="termsource"/>
10241
9866
  </xsl:template>
10242
9867
 
10243
9868
  <xsl:template match="*[local-name() = 'image']">
10244
9869
  <xsl:param name="indent">0</xsl:param>
9870
+ <xsl:param name="logo_width"/>
10245
9871
  <xsl:variable name="isAdded" select="../@added"/>
10246
9872
  <xsl:variable name="isDeleted" select="../@deleted"/>
10247
9873
  <xsl:choose>
@@ -10263,9 +9889,18 @@
10263
9889
 
10264
9890
  <!-- debug scale='<xsl:value-of select="$scale"/>', indent='<xsl:value-of select="$indent"/>' -->
10265
9891
 
10266
- <!-- <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle"/> -->
10267
9892
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" vertical-align="middle">
10268
9893
 
9894
+ <xsl:if test="parent::*[local-name() = 'logo']"> <!-- publisher's logo -->
9895
+ <xsl:attribute name="width">100%</xsl:attribute>
9896
+ <xsl:if test="normalize-space($logo_width) != ''">
9897
+ <xsl:attribute name="width"><xsl:value-of select="$logo_width"/></xsl:attribute>
9898
+ </xsl:if>
9899
+ <xsl:attribute name="content-height">100%</xsl:attribute>
9900
+ <xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
9901
+ <xsl:attribute name="scaling">uniform</xsl:attribute>
9902
+ </xsl:if>
9903
+
10269
9904
  <xsl:variable name="width">
10270
9905
  <xsl:call-template name="setImageWidth"/>
10271
9906
  </xsl:variable>
@@ -10343,8 +9978,7 @@
10343
9978
  </xsl:call-template>
10344
9979
  </xsl:variable>
10345
9980
 
10346
- <xsl:variable name="scaleRatio">
10347
- 1
9981
+ <xsl:variable name="scaleRatio">1
10348
9982
  </xsl:variable>
10349
9983
 
10350
9984
  <xsl:if test="number($scale) &lt; 100">
@@ -10455,18 +10089,14 @@
10455
10089
  </xsl:variable>
10456
10090
 
10457
10091
  <xsl:variable name="image_width_effective">
10458
-
10459
- <xsl:value-of select="$width_effective - number($indent_left)"/>
10460
-
10092
+ <xsl:value-of select="$width_effective - number($indent_left)"/>
10461
10093
  </xsl:variable>
10462
10094
  <xsl:variable name="image_height_effective" select="$height_effective - number($indent_left)"/>
10463
10095
  <!-- <xsl:message>width_effective=<xsl:value-of select="$width_effective"/></xsl:message>
10464
10096
  <xsl:message>indent_left=<xsl:value-of select="$indent_left"/></xsl:message>
10465
10097
  <xsl:message>image_width_effective=<xsl:value-of select="$image_width_effective"/> for <xsl:value-of select="ancestor::ogc:p[1]/@id"/></xsl:message> -->
10466
10098
  <xsl:variable name="scale">
10467
-
10468
- <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10469
-
10099
+ <xsl:value-of select="java:org.metanorma.fop.utils.ImageUtils.getImageScale($img_src, $image_width_effective, $height_effective)"/>
10470
10100
  </xsl:variable>
10471
10101
  <xsl:value-of select="$scale"/>
10472
10102
  </xsl:template>
@@ -10487,7 +10117,8 @@
10487
10117
  </xsl:when>
10488
10118
  <xsl:when test="not(starts-with(@src, 'data:'))">
10489
10119
  <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
10490
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
10120
+ <xsl:variable name="file_protocol"><xsl:if test="not(starts-with($src_external, 'http:')) and not(starts-with($src_external, 'https:')) and not(starts-with($src_external, 'www.'))">file:///</xsl:if></xsl:variable>
10121
+ <xsl:value-of select="concat('url(', $file_protocol, $src_external, ')')"/>
10491
10122
  </xsl:when>
10492
10123
  <xsl:otherwise>
10493
10124
  <xsl:value-of select="@src"/>
@@ -10783,8 +10414,8 @@
10783
10414
  </xsl:call-template>
10784
10415
  </xsl:variable>
10785
10416
  <xsl:variable name="viewbox" select="xalan:nodeset($viewbox_)"/>
10786
- <xsl:variable name="width" select="normalize-space($viewbox//item[3])"/>
10787
- <xsl:variable name="height" select="normalize-space($viewbox//item[4])"/>
10417
+ <xsl:variable name="width" select="normalize-space($viewbox//mn:item[3])"/>
10418
+ <xsl:variable name="height" select="normalize-space($viewbox//mn:item[4])"/>
10788
10419
 
10789
10420
  <xsl:variable name="parent_image_width" select="normalize-space(ancestor::*[1][local-name() = 'image']/@width)"/>
10790
10421
  <xsl:variable name="parent_image_height" select="normalize-space(ancestor::*[1][local-name() = 'image']/@height)"/>
@@ -10856,8 +10487,8 @@
10856
10487
  </xsl:variable>
10857
10488
  <xsl:variable name="components" select="xalan:nodeset($components_)"/>
10858
10489
  <xsl:variable name="att_name" select="local-name()"/>
10859
- <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/item[1], ',', $components/item[2], ',', $components/item[3], ')')"/></xsl:attribute>
10860
- <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/item[4]"/></xsl:attribute>
10490
+ <xsl:attribute name="{$att_name}"><xsl:value-of select="concat('rgb(', $components/mn:item[1], ',', $components/mn:item[2], ',', $components/mn:item[3], ')')"/></xsl:attribute>
10491
+ <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mn:item[4]"/></xsl:attribute>
10861
10492
  </xsl:template>
10862
10493
 
10863
10494
  <!-- ============== -->
@@ -10930,13 +10561,13 @@
10930
10561
  </xsl:call-template>
10931
10562
  </xsl:variable>
10932
10563
  <xsl:variable name="x_coords">
10933
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 1]">
10564
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 1]">
10934
10565
  <xsl:sort select="." data-type="number"/>
10935
10566
  <x><xsl:value-of select="."/></x>
10936
10567
  </xsl:for-each>
10937
10568
  </xsl:variable>
10938
10569
  <xsl:variable name="y_coords">
10939
- <xsl:for-each select="xalan:nodeset($points)//item[position() mod 2 = 0]">
10570
+ <xsl:for-each select="xalan:nodeset($points)//mn:item[position() mod 2 = 0]">
10940
10571
  <xsl:sort select="." data-type="number"/>
10941
10572
  <y><xsl:value-of select="."/></y>
10942
10573
  </xsl:for-each>
@@ -11141,11 +10772,11 @@
11141
10772
  <xsl:if test="ancestor-or-self::*[local-name() = 'annex']">annex</xsl:if>
11142
10773
  </xsl:variable>
11143
10774
 
11144
- <item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
11145
- <title>
10775
+ <mn:item id="{@id}" level="{$level}" section="{$section}" type="{$type}" root="{$root}" display="{$display}">
10776
+ <mn:title>
11146
10777
  <xsl:apply-templates select="xalan:nodeset($title)" mode="contents_item"/>
11147
- </title>
11148
- </item>
10778
+ </mn:title>
10779
+ </mn:item>
11149
10780
  </xsl:if>
11150
10781
  </xsl:template>
11151
10782
 
@@ -11216,12 +10847,12 @@
11216
10847
  <xsl:param name="contents"/>
11217
10848
  <xsl:param name="contents_addon"/>
11218
10849
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
11219
- <xsl:if test="$contents_nodes//item">
10850
+ <xsl:if test="$contents_nodes//mn:item">
11220
10851
  <fo:bookmark-tree>
11221
10852
  <xsl:choose>
11222
- <xsl:when test="$contents_nodes/doc">
10853
+ <xsl:when test="$contents_nodes/mn:doc">
11223
10854
  <xsl:choose>
11224
- <xsl:when test="count($contents_nodes/doc) &gt; 1">
10855
+ <xsl:when test="count($contents_nodes/mn:doc) &gt; 1">
11225
10856
 
11226
10857
  <xsl:if test="$contents_nodes/collection">
11227
10858
  <fo:bookmark internal-destination="{$contents/collection/@firstpage_id}">
@@ -11229,8 +10860,8 @@
11229
10860
  </fo:bookmark>
11230
10861
  </xsl:if>
11231
10862
 
11232
- <xsl:for-each select="$contents_nodes/doc">
11233
- <fo:bookmark internal-destination="{contents/item[@display = 'true'][1]/@id}" starting-state="hide">
10863
+ <xsl:for-each select="$contents_nodes/mn:doc">
10864
+ <fo:bookmark internal-destination="{contents/mn:item[@display = 'true'][1]/@id}" starting-state="hide">
11234
10865
  <xsl:if test="@bundle = 'true'">
11235
10866
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
11236
10867
  </xsl:if>
@@ -11264,14 +10895,14 @@
11264
10895
  </xsl:choose>
11265
10896
  </fo:bookmark-title>
11266
10897
 
11267
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
10898
+ <xsl:apply-templates select="contents/mn:item" mode="bookmark"/>
11268
10899
 
11269
10900
  <xsl:call-template name="insertFigureBookmarks">
11270
- <xsl:with-param name="contents" select="contents"/>
10901
+ <xsl:with-param name="contents" select="mn:contents"/>
11271
10902
  </xsl:call-template>
11272
10903
 
11273
10904
  <xsl:call-template name="insertTableBookmarks">
11274
- <xsl:with-param name="contents" select="contents"/>
10905
+ <xsl:with-param name="contents" select="mn:contents"/>
11275
10906
  <xsl:with-param name="lang" select="@lang"/>
11276
10907
  </xsl:call-template>
11277
10908
 
@@ -11280,16 +10911,16 @@
11280
10911
  </xsl:for-each>
11281
10912
  </xsl:when>
11282
10913
  <xsl:otherwise>
11283
- <xsl:for-each select="$contents_nodes/doc">
10914
+ <xsl:for-each select="$contents_nodes/mn:doc">
11284
10915
 
11285
- <xsl:apply-templates select="contents/item" mode="bookmark"/>
10916
+ <xsl:apply-templates select="mn:contents/mn:item" mode="bookmark"/>
11286
10917
 
11287
10918
  <xsl:call-template name="insertFigureBookmarks">
11288
- <xsl:with-param name="contents" select="contents"/>
10919
+ <xsl:with-param name="contents" select="mn:contents"/>
11289
10920
  </xsl:call-template>
11290
10921
 
11291
10922
  <xsl:call-template name="insertTableBookmarks">
11292
- <xsl:with-param name="contents" select="contents"/>
10923
+ <xsl:with-param name="contents" select="mn:contents"/>
11293
10924
  <xsl:with-param name="lang" select="@lang"/>
11294
10925
  </xsl:call-template>
11295
10926
 
@@ -11298,14 +10929,14 @@
11298
10929
  </xsl:choose>
11299
10930
  </xsl:when>
11300
10931
  <xsl:otherwise>
11301
- <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
10932
+ <xsl:apply-templates select="$contents_nodes/mn:contents/mn:item" mode="bookmark"/>
11302
10933
 
11303
10934
  <xsl:call-template name="insertFigureBookmarks">
11304
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
10935
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
11305
10936
  </xsl:call-template>
11306
10937
 
11307
10938
  <xsl:call-template name="insertTableBookmarks">
11308
- <xsl:with-param name="contents" select="$contents_nodes/contents"/>
10939
+ <xsl:with-param name="contents" select="$contents_nodes/mn:contents"/>
11309
10940
  <xsl:with-param name="lang" select="@lang"/>
11310
10941
  </xsl:call-template>
11311
10942
 
@@ -11322,80 +10953,72 @@
11322
10953
  <xsl:template name="insertFigureBookmarks">
11323
10954
  <xsl:param name="contents"/>
11324
10955
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
11325
- <xsl:if test="$contents_nodes/figure">
11326
- <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
10956
+ <xsl:if test="$contents_nodes/mn:figure">
10957
+ <fo:bookmark internal-destination="{$contents_nodes/mn:figure[1]/@id}" starting-state="hide">
11327
10958
  <fo:bookmark-title>Figures</fo:bookmark-title>
11328
- <xsl:for-each select="$contents_nodes/figure">
10959
+ <xsl:for-each select="$contents_nodes/mn:figure">
11329
10960
  <fo:bookmark internal-destination="{@id}">
11330
10961
  <fo:bookmark-title>
11331
- <xsl:value-of select="normalize-space(title)"/>
10962
+ <xsl:value-of select="normalize-space(mn:title)"/>
11332
10963
  </fo:bookmark-title>
11333
10964
  </fo:bookmark>
11334
10965
  </xsl:for-each>
11335
10966
  </fo:bookmark>
11336
10967
  </xsl:if>
10968
+ <xsl:if test="$contents_nodes//mn:figures/mn:figure">
10969
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11337
10970
 
11338
- <xsl:if test="$contents_nodes//figures/figure">
11339
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11340
-
11341
- <xsl:variable name="bookmark-title">
11342
-
11343
- <xsl:value-of select="$title-list-figures"/>
11344
-
11345
- </xsl:variable>
11346
- <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
11347
- <xsl:for-each select="$contents_nodes//figures/figure">
11348
- <fo:bookmark internal-destination="{@id}">
11349
- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
11350
- </fo:bookmark>
11351
- </xsl:for-each>
10971
+ <xsl:variable name="bookmark-title">
10972
+ <xsl:value-of select="$title-list-figures"/>
10973
+ </xsl:variable>
10974
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
10975
+ <xsl:for-each select="$contents_nodes//mn:figures/mn:figure">
10976
+ <fo:bookmark internal-destination="{@id}">
10977
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
11352
10978
  </fo:bookmark>
11353
- </xsl:if>
11354
-
10979
+ </xsl:for-each>
10980
+ </fo:bookmark>
10981
+ </xsl:if>
11355
10982
  </xsl:template> <!-- insertFigureBookmarks -->
11356
10983
 
11357
10984
  <xsl:template name="insertTableBookmarks">
11358
10985
  <xsl:param name="contents"/>
11359
10986
  <xsl:param name="lang"/>
11360
10987
  <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
11361
- <xsl:if test="$contents_nodes/table">
11362
- <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
10988
+ <xsl:if test="$contents_nodes/mn:table">
10989
+ <fo:bookmark internal-destination="{$contents_nodes/mn:table[1]/@id}" starting-state="hide">
11363
10990
  <fo:bookmark-title>
11364
10991
  <xsl:choose>
11365
10992
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
11366
10993
  <xsl:otherwise>Tables</xsl:otherwise>
11367
10994
  </xsl:choose>
11368
10995
  </fo:bookmark-title>
11369
- <xsl:for-each select="$contents_nodes/table">
10996
+ <xsl:for-each select="$contents_nodes/mn:table">
11370
10997
  <fo:bookmark internal-destination="{@id}">
11371
10998
  <fo:bookmark-title>
11372
- <xsl:value-of select="normalize-space(title)"/>
10999
+ <xsl:value-of select="normalize-space(mn:title)"/>
11373
11000
  </fo:bookmark-title>
11374
11001
  </fo:bookmark>
11375
11002
  </xsl:for-each>
11376
11003
  </fo:bookmark>
11377
11004
  </xsl:if>
11005
+ <xsl:if test="$contents_nodes//mn:tables/mn:table">
11006
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11378
11007
 
11379
- <xsl:if test="$contents_nodes//tables/table">
11380
- <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
11381
-
11382
- <xsl:variable name="bookmark-title">
11383
-
11384
- <xsl:value-of select="$title-list-tables"/>
11385
-
11386
- </xsl:variable>
11008
+ <xsl:variable name="bookmark-title">
11009
+ <xsl:value-of select="$title-list-tables"/>
11010
+ </xsl:variable>
11387
11011
 
11388
- <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
11012
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
11389
11013
 
11390
- <xsl:for-each select="$contents_nodes//tables/table">
11391
- <fo:bookmark internal-destination="{@id}">
11392
- <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
11393
- <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
11394
- </fo:bookmark>
11395
- </xsl:for-each>
11014
+ <xsl:for-each select="$contents_nodes//mn:tables/mn:table">
11015
+ <fo:bookmark internal-destination="{@id}">
11016
+ <!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
11017
+ <fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
11396
11018
  </fo:bookmark>
11397
- </xsl:if>
11398
-
11019
+ </xsl:for-each>
11020
+ </fo:bookmark>
11021
+ </xsl:if>
11399
11022
  </xsl:template> <!-- insertTableBookmarks -->
11400
11023
  <!-- End Bookmarks -->
11401
11024
 
@@ -11425,17 +11048,15 @@
11425
11048
  <xsl:param name="title" select="''"/>
11426
11049
  <xsl:choose>
11427
11050
  <xsl:when test="$lang = 'en'">
11428
-
11429
11051
  </xsl:when>
11430
11052
  <xsl:when test="$lang = 'fr'">
11431
-
11432
11053
  </xsl:when>
11433
11054
  <xsl:when test="$lang = 'de'">Deutsche</xsl:when>
11434
11055
  <xsl:otherwise><xsl:value-of select="$lang"/> version</xsl:otherwise>
11435
11056
  </xsl:choose>
11436
11057
  </xsl:template>
11437
11058
 
11438
- <xsl:template match="item" mode="bookmark">
11059
+ <xsl:template match="mn:item" mode="bookmark">
11439
11060
  <xsl:choose>
11440
11061
  <xsl:when test="@id != ''">
11441
11062
  <fo:bookmark internal-destination="{@id}" starting-state="hide">
@@ -11445,7 +11066,7 @@
11445
11066
  <xsl:text> </xsl:text>
11446
11067
  </xsl:if>
11447
11068
  <xsl:variable name="title">
11448
- <xsl:for-each select="title/node()">
11069
+ <xsl:for-each select="mn:title/node()">
11449
11070
  <xsl:choose>
11450
11071
  <xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
11451
11072
  <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
@@ -11463,7 +11084,7 @@
11463
11084
  </xsl:choose>
11464
11085
  </xsl:template>
11465
11086
 
11466
- <xsl:template match="title" mode="bookmark"/>
11087
+ <xsl:template match="mn:title" mode="bookmark"/>
11467
11088
  <xsl:template match="text()" mode="bookmark"/>
11468
11089
 
11469
11090
  <!-- figure/name -->
@@ -11692,9 +11313,9 @@
11692
11313
  <xsl:template match="text()" mode="contents_item">
11693
11314
  <xsl:variable name="text">
11694
11315
  <!-- to split by '_' and other chars -->
11695
- <text><xsl:call-template name="add-zero-spaces-java"/></text>
11316
+ <mn:text><xsl:call-template name="add-zero-spaces-java"/></mn:text>
11696
11317
  </xsl:variable>
11697
- <xsl:for-each select="xalan:nodeset($text)/text/text()">
11318
+ <xsl:for-each select="xalan:nodeset($text)/mn:text/text()">
11698
11319
  <xsl:call-template name="keep_together_standard_number"/>
11699
11320
  </xsl:for-each>
11700
11321
  </xsl:template>
@@ -11727,16 +11348,7 @@
11727
11348
 
11728
11349
  <xsl:template name="get_sourcecode_attributes">
11729
11350
  <xsl:element name="sourcecode_attributes" use-attribute-sets="sourcecode-style">
11730
- <xsl:variable name="_font-size">
11731
-
11732
- <!-- inherit -->
11733
-
11734
- <!-- <xsl:if test="$namespace = 'ieee'">
11735
- <xsl:if test="$current_template = 'standard'">8</xsl:if>
11736
- </xsl:if> -->
11737
- 10
11738
-
11739
-
11351
+ <xsl:variable name="_font-size"><!-- inherit -->10
11740
11352
  </xsl:variable>
11741
11353
 
11742
11354
  <xsl:variable name="font-size" select="normalize-space($_font-size)"/>
@@ -11792,7 +11404,6 @@
11792
11404
  <xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
11793
11405
  </xsl:choose>
11794
11406
  </xsl:attribute>
11795
-
11796
11407
  </xsl:if>
11797
11408
  <fo:block-container margin-left="0mm" role="SKIP">
11798
11409
 
@@ -11816,8 +11427,7 @@
11816
11427
  </fo:block>
11817
11428
 
11818
11429
  <xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
11819
-
11820
- <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
11430
+ <xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
11821
11431
 
11822
11432
  </fo:block-container>
11823
11433
  </fo:block-container>
@@ -11994,25 +11604,6 @@
11994
11604
  </xsl:choose>
11995
11605
  </xsl:template>
11996
11606
 
11997
- <!-- insert 'char' between each character in the string -->
11998
- <xsl:template name="interspers">
11999
- <xsl:param name="str"/>
12000
- <xsl:param name="char" select="$zero_width_space"/>
12001
- <xsl:if test="$str != ''">
12002
- <xsl:value-of select="substring($str, 1, 1)"/>
12003
-
12004
- <xsl:variable name="next_char" select="substring($str, 2, 1)"/>
12005
- <xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
12006
- <xsl:value-of select="$char"/>
12007
- </xsl:if>
12008
-
12009
- <xsl:call-template name="interspers">
12010
- <xsl:with-param name="str" select="substring($str, 2)"/>
12011
- <xsl:with-param name="char" select="$char"/>
12012
- </xsl:call-template>
12013
- </xsl:if>
12014
- </xsl:template>
12015
-
12016
11607
  <xsl:template name="interspers-java">
12017
11608
  <xsl:param name="str"/>
12018
11609
  <xsl:param name="char" select="$zero_width_space"/>
@@ -12109,7 +11700,7 @@
12109
11700
  </xsl:variable>
12110
11701
  <xsl:variable name="classes" select="xalan:nodeset($classes_)"/>
12111
11702
 
12112
- <xsl:for-each select="$classes/item">
11703
+ <xsl:for-each select="$classes/*[local-name() = 'item']">
12113
11704
  <xsl:variable name="class_name" select="."/>
12114
11705
  <xsl:for-each select="$syntax_highlight_styles/style[@class = $class_name]/@*[not(local-name() = 'class')]">
12115
11706
  <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
@@ -12192,12 +11783,9 @@
12192
11783
 
12193
11784
  <xsl:template match="*[local-name() = 'permission']/*[local-name() = 'name']">
12194
11785
  <xsl:if test="normalize-space() != ''">
12195
-
12196
- <fo:block xsl:use-attribute-sets="permission-name-style">
12197
- <xsl:apply-templates/>
12198
-
12199
- </fo:block>
12200
-
11786
+ <fo:block xsl:use-attribute-sets="permission-name-style">
11787
+ <xsl:apply-templates/>
11788
+ </fo:block>
12201
11789
  </xsl:if>
12202
11790
  </xsl:template>
12203
11791
 
@@ -12226,12 +11814,9 @@
12226
11814
  <xsl:template match="*[local-name() = 'requirement']/*[local-name() = 'name']">
12227
11815
  <xsl:if test="normalize-space() != ''">
12228
11816
 
12229
- <fo:block xsl:use-attribute-sets="requirement-name-style">
12230
-
12231
- <xsl:apply-templates/>
12232
-
12233
- </fo:block>
12234
-
11817
+ <fo:block xsl:use-attribute-sets="requirement-name-style">
11818
+ <xsl:apply-templates/>
11819
+ </fo:block>
12235
11820
  </xsl:if>
12236
11821
  </xsl:template>
12237
11822
 
@@ -12270,11 +11855,9 @@
12270
11855
  <xsl:template match="*[local-name() = 'recommendation']/*[local-name() = 'name']">
12271
11856
  <xsl:if test="normalize-space() != ''">
12272
11857
 
12273
- <fo:block xsl:use-attribute-sets="recommendation-name-style">
12274
- <xsl:apply-templates/>
12275
-
12276
- </fo:block>
12277
-
11858
+ <fo:block xsl:use-attribute-sets="recommendation-name-style">
11859
+ <xsl:apply-templates/>
11860
+ </fo:block>
12278
11861
  </xsl:if>
12279
11862
  </xsl:template>
12280
11863
 
@@ -12400,7 +11983,6 @@
12400
11983
 
12401
11984
  <xsl:if test="parent::*[local-name()='thead'] or starts-with(*[local-name()='td' or local-name()='th'][1], 'Requirement ') or starts-with(*[local-name()='td' or local-name()='th'][1], 'Recommendation ')">
12402
11985
  <xsl:attribute name="font-weight">bold</xsl:attribute>
12403
-
12404
11986
  </xsl:if>
12405
11987
 
12406
11988
  <xsl:apply-templates mode="requirement"/>
@@ -12445,7 +12027,6 @@
12445
12027
 
12446
12028
  <xsl:template match="*[local-name() = 'p'][@class='RecommendationTitle' or @class = 'RecommendationTestTitle']" priority="2">
12447
12029
  <fo:block font-size="11pt">
12448
-
12449
12030
  <xsl:apply-templates/>
12450
12031
  </fo:block>
12451
12032
  </xsl:template>
@@ -12485,7 +12066,6 @@
12485
12066
  <xsl:template match="*[local-name() = 'termexample']/*[local-name() = 'p']">
12486
12067
  <xsl:variable name="element">inline
12487
12068
 
12488
-
12489
12069
  </xsl:variable>
12490
12070
  <xsl:choose>
12491
12071
  <xsl:when test="contains($element, 'block')">
@@ -12517,110 +12097,105 @@
12517
12097
  text line 2
12518
12098
  -->
12519
12099
  <xsl:template match="*[local-name() = 'example']" name="example">
12100
+ <xsl:call-template name="setNamedDestination"/>
12101
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
12520
12102
 
12521
- <xsl:call-template name="setNamedDestination"/>
12522
- <fo:block-container id="{@id}" xsl:use-attribute-sets="example-style" role="SKIP">
12523
-
12524
- <xsl:call-template name="setBlockSpanAll"/>
12525
-
12526
- <xsl:call-template name="refine_example-style"/>
12527
-
12528
- <xsl:variable name="fo_element">
12529
- <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>
12530
- block
12531
- </xsl:variable>
12532
-
12533
- <fo:block-container margin-left="0mm" role="SKIP">
12534
-
12535
- <xsl:choose>
12103
+ <xsl:call-template name="setBlockSpanAll"/>
12536
12104
 
12537
- <xsl:when test="contains(normalize-space($fo_element), 'block')">
12105
+ <xsl:call-template name="refine_example-style"/>
12538
12106
 
12539
- <!-- display name 'EXAMPLE' in a separate block -->
12540
- <fo:block>
12541
- <xsl:apply-templates select="*[local-name()='name']">
12542
- <xsl:with-param name="fo_element" select="$fo_element"/>
12543
- </xsl:apply-templates>
12544
- </fo:block>
12107
+ <xsl:variable name="fo_element">
12108
+ <xsl:if test=".//*[local-name() = 'table'] or .//*[local-name() = 'dl'] or *[not(local-name() = 'name')][1][local-name() = 'sourcecode']">block</xsl:if>block
12109
+ </xsl:variable>
12545
12110
 
12546
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12547
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12548
- <xsl:variable name="example_body">
12549
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12550
- <xsl:with-param name="fo_element" select="$fo_element"/>
12551
- </xsl:apply-templates>
12552
- </xsl:variable>
12553
- <xsl:choose>
12554
- <xsl:when test="xalan:nodeset($example_body)/*">
12555
- <xsl:copy-of select="$example_body"/>
12556
- </xsl:when>
12557
- <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
12558
- </xsl:choose>
12559
- </fo:block-container>
12560
- </fo:block-container>
12561
- </xsl:when> <!-- end block -->
12111
+ <fo:block-container margin-left="0mm" role="SKIP">
12562
12112
 
12563
- <xsl:when test="contains(normalize-space($fo_element), 'list')">
12113
+ <xsl:choose>
12564
12114
 
12565
- <xsl:variable name="provisional_distance_between_starts_">
12566
- 7
12567
- </xsl:variable>
12568
- <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
12569
- <xsl:variable name="indent_">
12570
- 0
12571
- </xsl:variable>
12572
- <xsl:variable name="indent" select="normalize-space($indent_)"/>
12573
-
12574
- <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
12575
- <fo:list-item>
12576
- <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
12577
- <fo:block>
12578
- <xsl:apply-templates select="*[local-name()='name']">
12579
- <xsl:with-param name="fo_element">block</xsl:with-param>
12580
- </xsl:apply-templates>
12581
- </fo:block>
12582
- </fo:list-item-label>
12583
- <fo:list-item-body start-indent="body-start()">
12584
- <fo:block>
12585
- <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12586
- <xsl:with-param name="fo_element" select="$fo_element"/>
12587
- </xsl:apply-templates>
12588
- </fo:block>
12589
- </fo:list-item-body>
12590
- </fo:list-item>
12591
- </fo:list-block>
12592
- </xsl:when> <!-- end list -->
12115
+ <xsl:when test="contains(normalize-space($fo_element), 'block')">
12593
12116
 
12594
- <xsl:otherwise> <!-- inline -->
12117
+ <!-- display name 'EXAMPLE' in a separate block -->
12118
+ <fo:block>
12119
+ <xsl:apply-templates select="*[local-name()='name']">
12120
+ <xsl:with-param name="fo_element" select="$fo_element"/>
12121
+ </xsl:apply-templates>
12122
+ </fo:block>
12595
12123
 
12596
- <!-- display 'EXAMPLE' and first element in the same line -->
12597
- <fo:block>
12598
- <xsl:apply-templates select="*[local-name()='name']">
12124
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12125
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12126
+ <xsl:variable name="example_body">
12127
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12599
12128
  <xsl:with-param name="fo_element" select="$fo_element"/>
12600
12129
  </xsl:apply-templates>
12601
- <fo:inline>
12602
- <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
12130
+ </xsl:variable>
12131
+ <xsl:choose>
12132
+ <xsl:when test="xalan:nodeset($example_body)/*">
12133
+ <xsl:copy-of select="$example_body"/>
12134
+ </xsl:when>
12135
+ <xsl:otherwise><fo:block/><!-- prevent empty block-container --></xsl:otherwise>
12136
+ </xsl:choose>
12137
+ </fo:block-container>
12138
+ </fo:block-container>
12139
+ </xsl:when> <!-- end block -->
12140
+
12141
+ <xsl:when test="contains(normalize-space($fo_element), 'list')">
12142
+
12143
+ <xsl:variable name="provisional_distance_between_starts_">7
12144
+ </xsl:variable>
12145
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
12146
+ <xsl:variable name="indent_">0
12147
+ </xsl:variable>
12148
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
12149
+
12150
+ <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
12151
+ <fo:list-item>
12152
+ <fo:list-item-label start-indent="{$indent}mm" end-indent="label-end()">
12153
+ <fo:block>
12154
+ <xsl:apply-templates select="*[local-name()='name']">
12155
+ <xsl:with-param name="fo_element">block</xsl:with-param>
12156
+ </xsl:apply-templates>
12157
+ </fo:block>
12158
+ </fo:list-item-label>
12159
+ <fo:list-item-body start-indent="body-start()">
12160
+ <fo:block>
12161
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]">
12603
12162
  <xsl:with-param name="fo_element" select="$fo_element"/>
12604
12163
  </xsl:apply-templates>
12605
- </fo:inline>
12606
- </fo:block>
12164
+ </fo:block>
12165
+ </fo:list-item-body>
12166
+ </fo:list-item>
12167
+ </fo:list-block>
12168
+ </xsl:when> <!-- end list -->
12607
12169
 
12608
- <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
12609
- <!-- display further elements in blocks -->
12610
- <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12611
- <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12612
- <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
12613
- <xsl:with-param name="fo_element" select="'block'"/>
12614
- </xsl:apply-templates>
12615
- </fo:block-container>
12616
- </fo:block-container>
12617
- </xsl:if>
12618
- </xsl:otherwise> <!-- end inline -->
12170
+ <xsl:otherwise> <!-- inline -->
12619
12171
 
12620
- </xsl:choose>
12621
- </fo:block-container>
12622
- </fo:block-container>
12172
+ <!-- display 'EXAMPLE' and first element in the same line -->
12173
+ <fo:block>
12174
+ <xsl:apply-templates select="*[local-name()='name']">
12175
+ <xsl:with-param name="fo_element" select="$fo_element"/>
12176
+ </xsl:apply-templates>
12177
+ <fo:inline>
12178
+ <xsl:apply-templates select="*[not(local-name() = 'name')][1]">
12179
+ <xsl:with-param name="fo_element" select="$fo_element"/>
12180
+ </xsl:apply-templates>
12181
+ </fo:inline>
12182
+ </fo:block>
12623
12183
 
12184
+ <xsl:if test="*[not(local-name() = 'name')][position() &gt; 1]">
12185
+ <!-- display further elements in blocks -->
12186
+ <fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
12187
+ <fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
12188
+ <xsl:apply-templates select="*[not(local-name() = 'name')][position() &gt; 1]">
12189
+ <xsl:with-param name="fo_element" select="'block'"/>
12190
+ </xsl:apply-templates>
12191
+ </fo:block-container>
12192
+ </fo:block-container>
12193
+ </xsl:if>
12194
+ </xsl:otherwise> <!-- end inline -->
12195
+
12196
+ </xsl:choose>
12197
+ </fo:block-container>
12198
+ </fo:block-container>
12624
12199
  </xsl:template>
12625
12200
 
12626
12201
  <!-- example/name -->
@@ -12635,7 +12210,6 @@
12635
12210
  </xsl:when>
12636
12211
  <xsl:when test="contains(normalize-space($fo_element), 'block')">
12637
12212
  <fo:block xsl:use-attribute-sets="example-name-style">
12638
-
12639
12213
  <xsl:apply-templates/>
12640
12214
  </fo:block>
12641
12215
  </xsl:when>
@@ -12652,7 +12226,6 @@
12652
12226
  <!-- table/example/name, table/tfoot//example/name -->
12653
12227
  <xsl:template match="*[local-name() = 'table']/*[local-name() = 'example']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'tfoot']//*[local-name() = 'example']/*[local-name() = 'name']">
12654
12228
  <fo:inline xsl:use-attribute-sets="example-name-style">
12655
-
12656
12229
  <xsl:apply-templates/>
12657
12230
  </fo:inline>
12658
12231
  </xsl:template>
@@ -12662,7 +12235,6 @@
12662
12235
 
12663
12236
  <xsl:variable name="num"><xsl:number/></xsl:variable>
12664
12237
  <xsl:variable name="element">
12665
-
12666
12238
  <xsl:value-of select="$fo_element"/>
12667
12239
  </xsl:variable>
12668
12240
  <xsl:choose>
@@ -12780,7 +12352,7 @@
12780
12352
  </xsl:call-template>
12781
12353
  </xsl:variable>
12782
12354
 
12783
- <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
12355
+ <xsl:variable name="text"><xsl:apply-templates/></xsl:variable>
12784
12356
  <xsl:choose>
12785
12357
  <xsl:when test="$lang = 'zh'"><xsl:text>、</xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text>—</xsl:text></xsl:if></xsl:when>
12786
12358
  <xsl:otherwise><xsl:text>, </xsl:text><xsl:value-of select="$title-modified"/><xsl:if test="normalize-space($text) != ''"><xsl:text> — </xsl:text></xsl:if></xsl:otherwise>
@@ -12817,7 +12389,6 @@
12817
12389
  <xsl:attribute name="margin-left">5mm</xsl:attribute>
12818
12390
  </xsl:if>
12819
12391
  </xsl:if>
12820
-
12821
12392
  <fo:block-container margin-left="0mm" role="SKIP">
12822
12393
  <fo:block-container xsl:use-attribute-sets="quote-style" role="SKIP">
12823
12394
 
@@ -12900,7 +12471,6 @@
12900
12471
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
12901
12472
  <xsl:attribute name="vertical-align">super</xsl:attribute>
12902
12473
  <xsl:attribute name="font-size">80%</xsl:attribute>
12903
-
12904
12474
  </xsl:if>
12905
12475
 
12906
12476
  <xsl:call-template name="refine_eref-style"/>
@@ -12949,7 +12519,6 @@
12949
12519
  </xsl:template>
12950
12520
 
12951
12521
  <xsl:template name="refine_basic_link_style">
12952
-
12953
12522
  </xsl:template> <!-- refine_basic_link_style -->
12954
12523
 
12955
12524
  <!-- ====== -->
@@ -12966,15 +12535,13 @@
12966
12535
  </xsl:variable>
12967
12536
 
12968
12537
  <xsl:variable name="padding">
12969
-
12970
- <xsl:choose>
12971
- <xsl:when test="$depth = 5">7</xsl:when>
12972
- <xsl:when test="$depth = 4">10</xsl:when>
12973
- <xsl:when test="$depth = 3">6</xsl:when>
12974
- <xsl:when test="$depth = 2">9</xsl:when>
12975
- <xsl:otherwise>12</xsl:otherwise>
12976
- </xsl:choose>
12977
-
12538
+ <xsl:choose>
12539
+ <xsl:when test="$depth = 5">7</xsl:when>
12540
+ <xsl:when test="$depth = 4">10</xsl:when>
12541
+ <xsl:when test="$depth = 3">6</xsl:when>
12542
+ <xsl:when test="$depth = 2">9</xsl:when>
12543
+ <xsl:otherwise>12</xsl:otherwise>
12544
+ </xsl:choose>
12978
12545
  </xsl:variable>
12979
12546
 
12980
12547
  <xsl:variable name="padding-right">
@@ -12985,7 +12552,6 @@
12985
12552
  </xsl:otherwise>
12986
12553
  </xsl:choose>
12987
12554
  </xsl:variable>
12988
-
12989
12555
  <xsl:choose>
12990
12556
  <xsl:when test="$lang = 'zh'">
12991
12557
  <fo:inline role="SKIP"><xsl:value-of select="$tab_zh"/></fo:inline>
@@ -13009,7 +12575,6 @@
13009
12575
  <xsl:template match="*[local-name() = 'termnote']/*[local-name() = 'name']/*[local-name() = 'tab']" priority="2"/>
13010
12576
 
13011
12577
  <xsl:template match="*[local-name() = 'note']/*[local-name() = 'name']/*[local-name() = 'tab']" mode="tab">
13012
-
13013
12578
  </xsl:template>
13014
12579
 
13015
12580
  <xsl:template name="insertNonBreakSpaces">
@@ -13027,8 +12592,7 @@
13027
12592
  <xsl:variable name="level">
13028
12593
  <xsl:call-template name="getLevel"/>
13029
12594
  </xsl:variable>
13030
- <xsl:variable name="font-size">
13031
- inherit
12595
+ <xsl:variable name="font-size">inherit
13032
12596
  </xsl:variable>
13033
12597
  <xsl:variable name="levelTerm">
13034
12598
  <xsl:call-template name="getLevelTermName"/>
@@ -13080,11 +12644,9 @@
13080
12644
  </xsl:template>
13081
12645
 
13082
12646
  <xsl:template name="setStyle_preferred">
13083
-
13084
- <xsl:if test="*[local-name() = 'strong']">
13085
- <xsl:attribute name="font-weight">normal</xsl:attribute>
13086
- </xsl:if>
13087
-
12647
+ <xsl:if test="*[local-name() = 'strong']">
12648
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
12649
+ </xsl:if>
13088
12650
  </xsl:template>
13089
12651
 
13090
12652
  <!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
@@ -13161,7 +12723,6 @@
13161
12723
 
13162
12724
  <!-- main sections -->
13163
12725
  <xsl:template match="/*/*[local-name() = 'sections']/*" name="sections_node" priority="2">
13164
-
13165
12726
  <xsl:call-template name="setNamedDestination"/>
13166
12727
  <fo:block>
13167
12728
  <xsl:call-template name="setId"/>
@@ -13196,20 +12757,16 @@
13196
12757
  </xsl:template>
13197
12758
 
13198
12759
  <xsl:template name="sections_element_style">
13199
-
13200
- <xsl:if test="*[1][@class='supertitle']">
13201
- <xsl:attribute name="space-before">36pt</xsl:attribute>
13202
- </xsl:if>
13203
- <xsl:if test="@inline-header='true'">
13204
- <xsl:attribute name="text-align">justify</xsl:attribute>
13205
- </xsl:if>
13206
-
12760
+ <xsl:if test="*[1][@class='supertitle']">
12761
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
12762
+ </xsl:if>
12763
+ <xsl:if test="@inline-header='true'">
12764
+ <xsl:attribute name="text-align">justify</xsl:attribute>
12765
+ </xsl:if>
13207
12766
  </xsl:template> <!-- sections_element_style -->
13208
12767
 
13209
12768
  <xsl:template match="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*" priority="2" name="preface_node"> <!-- /*/*[local-name() = 'preface']/* -->
13210
-
13211
- <fo:block break-after="page"/>
13212
-
12769
+ <fo:block break-after="page"/>
13213
12770
  <xsl:call-template name="setNamedDestination"/>
13214
12771
  <fo:block>
13215
12772
  <xsl:call-template name="setId"/>
@@ -13258,11 +12815,9 @@
13258
12815
  </xsl:template>
13259
12816
 
13260
12817
  <xsl:template name="refine_clause_style">
13261
-
13262
- <xsl:if test="@inline-header='true'">
13263
- <xsl:attribute name="text-align">justify</xsl:attribute>
13264
- </xsl:if>
13265
-
12818
+ <xsl:if test="@inline-header='true'">
12819
+ <xsl:attribute name="text-align">justify</xsl:attribute>
12820
+ </xsl:if>
13266
12821
  </xsl:template> <!-- refine_clause_style -->
13267
12822
 
13268
12823
  <xsl:template match="*[local-name() = 'definitions']">
@@ -13302,7 +12857,6 @@
13302
12857
  </xsl:template>
13303
12858
 
13304
12859
  <xsl:template name="refine_annex_style">
13305
-
13306
12860
  </xsl:template>
13307
12861
 
13308
12862
  <!-- document text (not figures, or tables) footnotes -->
@@ -13406,17 +12960,14 @@
13406
12960
  <!-- Lists processing -->
13407
12961
  <!-- ===================================== -->
13408
12962
  <xsl:variable name="ul_labels_">
13409
-
13410
- <label level="1">–</label>
13411
- <label level="2">•</label>
13412
- <label level="3" font-size="75%">o</label> <!-- white circle -->
13413
-
12963
+ <label level="1">–</label>
12964
+ <label level="2">•</label>
12965
+ <label level="3" font-size="75%">o</label> <!-- white circle -->
13414
12966
  </xsl:variable>
13415
12967
  <xsl:variable name="ul_labels" select="xalan:nodeset($ul_labels_)"/>
13416
12968
 
13417
12969
  <xsl:template name="setULLabel">
13418
- <xsl:variable name="list_level__">
13419
- <xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
12970
+ <xsl:variable name="list_level__"><xsl:value-of select="count(ancestor::*[local-name() = 'ul']) + count(ancestor::*[local-name() = 'ol'])"/>
13420
12971
  </xsl:variable>
13421
12972
  <xsl:variable name="list_level_" select="number($list_level__)"/>
13422
12973
  <xsl:variable name="list_level">
@@ -13473,28 +13024,22 @@
13473
13024
  <xsl:variable name="label">
13474
13025
 
13475
13026
  <xsl:variable name="style_prefix_">
13476
- <xsl:if test="$type = 'roman'">
13477
- <!-- Example: (i) -->
13027
+ <xsl:if test="$type = 'roman'"> <!-- Example: (i) -->
13478
13028
  </xsl:if>
13479
13029
  <xsl:if test="$type = 'alphabet'">
13480
-
13481
13030
  </xsl:if>
13482
13031
  </xsl:variable>
13483
13032
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
13484
13033
 
13485
13034
  <xsl:variable name="style_suffix_">
13486
13035
  <xsl:choose>
13487
- <xsl:when test="$type = 'arabic'">
13488
- )
13036
+ <xsl:when test="$type = 'arabic'">)
13489
13037
  </xsl:when>
13490
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
13491
- )
13038
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">)
13492
13039
  </xsl:when>
13493
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
13494
- .
13040
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">.
13495
13041
  </xsl:when>
13496
- <xsl:when test="$type = 'roman'">
13497
- )
13042
+ <xsl:when test="$type = 'roman'">)
13498
13043
  </xsl:when>
13499
13044
  <xsl:when test="$type = 'roman_upper'">.</xsl:when> <!-- Example: I. -->
13500
13045
  </xsl:choose>
@@ -13511,8 +13056,7 @@
13511
13056
  <xsl:value-of select="$style_suffix"/>
13512
13057
  </xsl:if>
13513
13058
  </xsl:variable>
13514
-
13515
- <xsl:value-of select="normalize-space($label)"/>
13059
+ <xsl:value-of select="normalize-space($label)"/>
13516
13060
 
13517
13061
  </xsl:when>
13518
13062
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -13569,17 +13113,13 @@
13569
13113
 
13570
13114
  <xsl:variable name="format">
13571
13115
  <xsl:choose>
13572
- <xsl:when test="$type = 'arabic'">
13573
- 1)
13116
+ <xsl:when test="$type = 'arabic'">1)
13574
13117
  </xsl:when>
13575
- <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">
13576
- a)
13118
+ <xsl:when test="$type = 'alphabet' or $type = 'alphabetic'">a)
13577
13119
  </xsl:when>
13578
- <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">
13579
- A.
13120
+ <xsl:when test="$type = 'alphabet_upper' or $type = 'alphabetic_upper'">A.
13580
13121
  </xsl:when>
13581
- <xsl:when test="$type = 'roman'">
13582
- i)
13122
+ <xsl:when test="$type = 'roman'">i)
13583
13123
  </xsl:when>
13584
13124
  <xsl:when test="$type = 'roman_upper'">I.</xsl:when>
13585
13125
  <xsl:otherwise>1.</xsl:otherwise> <!-- for any case, if $type has non-determined value, not using -->
@@ -13616,19 +13156,16 @@
13616
13156
  </fo:block-container>
13617
13157
  </xsl:when>
13618
13158
  <xsl:otherwise>
13619
-
13620
- <fo:block role="SKIP">
13621
- <xsl:apply-templates select="." mode="list">
13622
- <xsl:with-param name="indent" select="$indent"/>
13623
- </xsl:apply-templates>
13624
- </fo:block>
13625
-
13159
+ <fo:block role="SKIP">
13160
+ <xsl:apply-templates select="." mode="list">
13161
+ <xsl:with-param name="indent" select="$indent"/>
13162
+ </xsl:apply-templates>
13163
+ </fo:block>
13626
13164
  </xsl:otherwise>
13627
13165
  </xsl:choose>
13628
13166
  </xsl:template>
13629
13167
 
13630
13168
  <xsl:template name="refine_list_container_style">
13631
-
13632
13169
  </xsl:template> <!-- refine_list_container_style -->
13633
13170
 
13634
13171
  <xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
@@ -13692,7 +13229,6 @@
13692
13229
  </xsl:template>
13693
13230
 
13694
13231
  <xsl:template name="refine_list-style_provisional-distance-between-starts">
13695
-
13696
13232
  </xsl:template> <!-- refine_list-style_provisional-distance-between-starts -->
13697
13233
 
13698
13234
  <xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
@@ -13977,7 +13513,6 @@
13977
13513
  <xsl:template match="*[local-name() = 'indexsect']//*[local-name() = 'li']" priority="4">
13978
13514
  <xsl:variable name="level" select="count(ancestor::*[local-name() = 'ul'])"/>
13979
13515
  <fo:block start-indent="{5 * $level}mm" text-indent="-5mm">
13980
-
13981
13516
  <xsl:apply-templates/>
13982
13517
  </fo:block>
13983
13518
  </xsl:template>
@@ -14029,7 +13564,6 @@
14029
13564
  <fo:table-column column-width="15mm"/>
14030
13565
  <fo:table-body>
14031
13566
  <fo:table-row text-align="center" font-weight="bold" background-color="black" color="white">
14032
-
14033
13567
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Date</fo:block></fo:table-cell>
14034
13568
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Type</fo:block></fo:table-cell>
14035
13569
  <fo:table-cell border="1pt solid black"><fo:block role="SKIP">Change</fo:block></fo:table-cell>
@@ -14065,7 +13599,6 @@
14065
13599
  <xsl:template match="*[local-name() = 'references'][@hidden='true']" priority="3"/>
14066
13600
  <xsl:template match="*[local-name() = 'bibitem'][@hidden='true']" priority="3">
14067
13601
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/>
14068
-
14069
13602
  </xsl:template>
14070
13603
  <!-- don't display bibitem with @id starts with '_hidden', that was introduced for references integrity -->
14071
13604
  <xsl:template match="*[local-name() = 'bibitem'][starts-with(@id, 'hidden_bibitem_')]" priority="3"/>
@@ -14076,16 +13609,13 @@
14076
13609
  <xsl:call-template name="setNamedDestination"/>
14077
13610
  <fo:block id="{@id}">
14078
13611
  <xsl:apply-templates/>
14079
-
14080
13612
  </fo:block>
14081
13613
  </xsl:template>
14082
13614
 
14083
13615
  <!-- Bibliography (non-normative references) -->
14084
13616
  <xsl:template match="*[local-name() = 'references']">
14085
13617
  <xsl:if test="not(ancestor::*[local-name() = 'annex'])">
14086
-
14087
- <fo:block break-after="page"/>
14088
-
13618
+ <fo:block break-after="page"/>
14089
13619
  </xsl:if>
14090
13620
 
14091
13621
  <!-- <xsl:if test="ancestor::*[local-name() = 'annex']">
@@ -14101,9 +13631,7 @@
14101
13631
 
14102
13632
  <fo:block xsl:use-attribute-sets="references-non-normative-style">
14103
13633
  <xsl:apply-templates select="node()[not(local-name() = 'title' and @columns = 1)]"/>
14104
-
14105
13634
  </fo:block>
14106
-
14107
13635
  </xsl:template> <!-- references -->
14108
13636
 
14109
13637
  <xsl:template match="*[local-name() = 'bibitem']">
@@ -14113,32 +13641,30 @@
14113
13641
  <!-- Normative references -->
14114
13642
  <xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
14115
13643
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
14116
-
14117
- <xsl:choose>
14118
- <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
14119
- <xsl:otherwise>
14120
- <xsl:call-template name="setNamedDestination"/>
14121
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
14122
- <xsl:call-template name="processBibitem"/>
14123
- </fo:block>
14124
- </xsl:otherwise>
14125
- </xsl:choose>
13644
+ <xsl:choose>
13645
+ <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
13646
+ <xsl:otherwise>
13647
+ <xsl:call-template name="setNamedDestination"/>
13648
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
13649
+ <xsl:call-template name="processBibitem"/>
13650
+ </fo:block>
13651
+ </xsl:otherwise>
13652
+ </xsl:choose>
14126
13653
 
14127
13654
  </xsl:template> <!-- bibitem -->
14128
13655
 
14129
13656
  <!-- Bibliography (non-normative references) -->
14130
13657
  <xsl:template match="*[local-name() = 'references'][not(@normative='true')]/*[local-name() = 'bibitem']" name="bibitem_non_normative" priority="2">
14131
13658
  <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
14132
-
14133
- <xsl:choose>
14134
- <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
14135
- <xsl:otherwise>
14136
- <xsl:call-template name="setNamedDestination"/>
14137
- <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
14138
- <xsl:call-template name="processBibitem"/>
14139
- </fo:block>
14140
- </xsl:otherwise>
14141
- </xsl:choose>
13659
+ <xsl:choose>
13660
+ <xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
13661
+ <xsl:otherwise>
13662
+ <xsl:call-template name="setNamedDestination"/>
13663
+ <fo:block id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-style">
13664
+ <xsl:call-template name="processBibitem"/>
13665
+ </fo:block>
13666
+ </xsl:otherwise>
13667
+ </xsl:choose>
14142
13668
 
14143
13669
  </xsl:template> <!-- references[not(@normative='true')]/bibitem -->
14144
13670
 
@@ -14148,7 +13674,6 @@
14148
13674
  <xsl:otherwise>
14149
13675
  <xsl:call-template name="setNamedDestination"/>
14150
13676
  <fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
14151
-
14152
13677
  <fo:list-item-label end-indent="label-end()">
14153
13678
  <fo:block role="SKIP">
14154
13679
  <fo:inline role="SKIP">
@@ -14175,67 +13700,66 @@
14175
13700
 
14176
13701
  <xsl:template name="processBibitem">
14177
13702
  <xsl:param name="biblio_tag_part">both</xsl:param>
13703
+ <!-- start ITU bibitem processing -->
13704
+ <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
13705
+ <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
13706
+ <xsl:if test="$doctype = 'implementers-guide'">
13707
+ <xsl:attribute name="margin-left">0mm</xsl:attribute>
13708
+ <xsl:attribute name="text-indent">0mm</xsl:attribute>
13709
+ </xsl:if>
14178
13710
 
14179
- <!-- start ITU bibitem processing -->
14180
- <!-- Example: [ITU-T A.23] ITU-T A.23, Recommendation ITU-T A.23, Annex A (2014), Guide for ITU-T and ISO/IEC JTC 1 cooperation. -->
14181
- <xsl:variable name="doctype" select="ancestor::itu:metanorma/itu:bibdata/itu:ext/itu:doctype[not(@language) or @language = '']"/>
14182
- <xsl:if test="$doctype = 'implementers-guide'">
14183
- <xsl:attribute name="margin-left">0mm</xsl:attribute>
14184
- <xsl:attribute name="text-indent">0mm</xsl:attribute>
14185
- </xsl:if>
14186
-
14187
- <xsl:variable name="docidentifier_metanorma_ordinal" select="normalize-space(itu:docidentifier[@type = 'metanorma-ordinal'])"/>
13711
+ <xsl:variable name="docidentifier_metanorma_ordinal" select="normalize-space(itu:docidentifier[@type = 'metanorma-ordinal'])"/>
14188
13712
 
14189
- <xsl:variable name="bibitem_label">
14190
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
14191
- <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
14192
- </xsl:apply-templates>
14193
- </xsl:variable>
13713
+ <xsl:variable name="bibitem_label">
13714
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13715
+ <xsl:with-param name="biblio_tag_part">first</xsl:with-param>
13716
+ </xsl:apply-templates>
13717
+ </xsl:variable>
14194
13718
 
14195
- <xsl:variable name="bibitem_body">
14196
- <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
14197
- <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
14198
- </xsl:apply-templates>
14199
- <xsl:apply-templates select="itu:formattedref"/>
14200
- </xsl:variable>
13719
+ <xsl:variable name="bibitem_body">
13720
+ <xsl:apply-templates select="*[local-name() = 'biblio-tag']">
13721
+ <xsl:with-param name="biblio_tag_part">last</xsl:with-param>
13722
+ </xsl:apply-templates>
13723
+ <xsl:apply-templates select="itu:formattedref"/>
13724
+ </xsl:variable>
14201
13725
 
14202
- <xsl:choose>
14203
- <xsl:when test="$doctype = 'implementers-guide'">
14204
- <fo:table width="100%" table-layout="fixed">
14205
- <fo:table-column column-width="20%"/>
14206
- <fo:table-column column-width="80%"/>
14207
- <fo:table-body>
14208
- <fo:table-row>
14209
- <fo:table-cell><fo:block role="SKIP"><xsl:value-of select="$bibitem_label"/></fo:block></fo:table-cell>
14210
- <fo:table-cell><fo:block role="SKIP"><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
14211
- </fo:table-row>
14212
- </fo:table-body>
14213
- </fo:table>
14214
- </xsl:when> <!-- $doctype = 'implementers-guide' -->
14215
- <xsl:when test="$bibitem_label != $docidentifier_metanorma_ordinal">
14216
- <xsl:attribute name="margin-left">14mm</xsl:attribute>
14217
- <xsl:attribute name="text-indent">-14mm</xsl:attribute>
14218
- <xsl:copy-of select="$bibitem_label"/>
14219
- <xsl:copy-of select="$bibitem_body"/>
14220
- </xsl:when>
14221
- <xsl:otherwise>
14222
- <fo:list-block provisional-distance-between-starts="14mm">
14223
- <fo:list-item>
14224
- <fo:list-item-label end-indent="label-end()">
14225
- <fo:block>
14226
- <xsl:value-of select="$bibitem_label"/>
14227
- </fo:block>
14228
- </fo:list-item-label>
14229
- <fo:list-item-body start-indent="body-start()">
14230
- <fo:block>
14231
- <xsl:copy-of select="$bibitem_body"/>
14232
- </fo:block>
14233
- </fo:list-item-body>
14234
- </fo:list-item>
14235
- </fo:list-block>
14236
- </xsl:otherwise>
14237
- </xsl:choose>
14238
- <!-- end ITU bibitem processing -->
13726
+ <xsl:choose>
13727
+ <xsl:when test="$doctype = 'implementers-guide'">
13728
+ <fo:table width="100%" table-layout="fixed">
13729
+ <fo:table-column column-width="20%"/>
13730
+ <fo:table-column column-width="80%"/>
13731
+ <fo:table-body>
13732
+ <fo:table-row>
13733
+ <fo:table-cell><fo:block role="SKIP"><xsl:value-of select="$bibitem_label"/></fo:block></fo:table-cell>
13734
+ <fo:table-cell><fo:block role="SKIP"><xsl:copy-of select="$bibitem_body"/></fo:block></fo:table-cell>
13735
+ </fo:table-row>
13736
+ </fo:table-body>
13737
+ </fo:table>
13738
+ </xsl:when> <!-- $doctype = 'implementers-guide' -->
13739
+ <xsl:when test="$bibitem_label != $docidentifier_metanorma_ordinal">
13740
+ <xsl:attribute name="margin-left">14mm</xsl:attribute>
13741
+ <xsl:attribute name="text-indent">-14mm</xsl:attribute>
13742
+ <xsl:copy-of select="$bibitem_label"/>
13743
+ <xsl:copy-of select="$bibitem_body"/>
13744
+ </xsl:when>
13745
+ <xsl:otherwise>
13746
+ <fo:list-block provisional-distance-between-starts="14mm">
13747
+ <fo:list-item>
13748
+ <fo:list-item-label end-indent="label-end()">
13749
+ <fo:block>
13750
+ <xsl:value-of select="$bibitem_label"/>
13751
+ </fo:block>
13752
+ </fo:list-item-label>
13753
+ <fo:list-item-body start-indent="body-start()">
13754
+ <fo:block>
13755
+ <xsl:copy-of select="$bibitem_body"/>
13756
+ </fo:block>
13757
+ </fo:list-item-body>
13758
+ </fo:list-item>
13759
+ </fo:list-block>
13760
+ </xsl:otherwise>
13761
+ </xsl:choose>
13762
+ <!-- end ITU bibitem processing -->
14239
13763
 
14240
13764
  </xsl:template> <!-- processBibitem (bibitem) -->
14241
13765
 
@@ -14379,8 +13903,7 @@
14379
13903
  <xsl:choose>
14380
13904
  <xsl:when test="$pdftoclevels != ''"><xsl:value-of select="number($pdftoclevels)"/></xsl:when> <!-- if there is value in xml -->
14381
13905
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
14382
- <xsl:otherwise><!-- default value -->
14383
- 2
13906
+ <xsl:otherwise><!-- default value -->2
14384
13907
  </xsl:otherwise>
14385
13908
  </xsl:choose>
14386
13909
  </xsl:variable>
@@ -14588,27 +14111,21 @@
14588
14111
  <!-- ================ -->
14589
14112
  <!-- Admonition -->
14590
14113
  <!-- ================ -->
14591
- <xsl:template match="*[local-name() = 'admonition']">
14592
-
14593
- <!-- text in the box -->
14594
- <xsl:call-template name="setNamedDestination"/>
14595
- <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
14596
-
14597
- <xsl:call-template name="setBlockSpanAll"/>
14598
-
14599
- <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14600
-
14601
- <fo:block xsl:use-attribute-sets="admonition-name-style">
14602
- <xsl:call-template name="displayAdmonitionName"/>
14603
- </fo:block>
14604
- <fo:block xsl:use-attribute-sets="admonition-p-style">
14605
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
14606
- </fo:block>
14607
-
14608
- </fo:block-container>
14114
+ <xsl:template match="*[local-name() = 'admonition']"> <!-- text in the box -->
14115
+ <xsl:call-template name="setNamedDestination"/>
14116
+ <fo:block-container id="{@id}" xsl:use-attribute-sets="admonition-style">
14609
14117
 
14610
- </fo:block-container>
14118
+ <xsl:call-template name="setBlockSpanAll"/>
14119
+ <fo:block-container xsl:use-attribute-sets="admonition-container-style" role="SKIP">
14120
+ <fo:block xsl:use-attribute-sets="admonition-name-style">
14121
+ <xsl:call-template name="displayAdmonitionName"/>
14122
+ </fo:block>
14123
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
14124
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
14125
+ </fo:block>
14611
14126
 
14127
+ </fo:block-container>
14128
+ </fo:block-container>
14612
14129
  </xsl:template>
14613
14130
 
14614
14131
  <xsl:template name="displayAdmonitionName">
@@ -14656,12 +14173,10 @@
14656
14173
  </xsl:template> -->
14657
14174
 
14658
14175
  <xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
14176
+ <fo:block xsl:use-attribute-sets="admonition-p-style">
14659
14177
 
14660
- <fo:block xsl:use-attribute-sets="admonition-p-style">
14661
-
14662
- <xsl:apply-templates/>
14663
- </fo:block>
14664
-
14178
+ <xsl:apply-templates/>
14179
+ </fo:block>
14665
14180
  </xsl:template>
14666
14181
 
14667
14182
  <!-- ================ -->
@@ -14697,11 +14212,9 @@
14697
14212
 
14698
14213
  <!-- STEP2: add 'fn' after 'eref' and 'origin', if referenced to bibitem with 'note' = Withdrawn.' or 'Cancelled and replaced...' -->
14699
14214
  <xsl:variable name="updated_xml_step2">
14700
-
14701
- <xsl:if test="$table_if = 'false'">
14702
- <xsl:copy-of select="$updated_xml_step1"/>
14703
- </xsl:if>
14704
-
14215
+ <xsl:if test="$table_if = 'false'">
14216
+ <xsl:copy-of select="$updated_xml_step1"/>
14217
+ </xsl:if>
14705
14218
  </xsl:variable>
14706
14219
 
14707
14220
  <xsl:variable name="endTime2" select="java:getTime(java:java.util.Date.new())"/>
@@ -15176,7 +14689,6 @@
15176
14689
  </xsl:template>
15177
14690
 
15178
14691
  <xsl:template name="addNamedDestinationAttribute">
15179
-
15180
14692
  </xsl:template>
15181
14693
 
15182
14694
  <xsl:template match="*[local-name() = 'fmt-name']"/>
@@ -15671,7 +15183,6 @@
15671
15183
  <!-- enclose standard's number into tag 'keep-together_within-line' -->
15672
15184
  <xsl:if test="not(ancestor::*[local-name() = 'table'])"><regex><xsl:value-of select="$regex_standard_reference"/></regex></xsl:if>
15673
15185
  <!-- if EXPRESS reference -->
15674
-
15675
15186
  <!-- keep-together_within-line for: a/b, aaa/b, a/bbb, /b -->
15676
15187
  <regex><xsl:value-of select="$regex_solidus_units"/></regex>
15677
15188
  <!-- keep-together_within-line for: a.b, aaa.b, a.bbb, .b in table's cell ONLY -->
@@ -15725,8 +15236,7 @@
15725
15236
 
15726
15237
  <xsl:variable name="text2">
15727
15238
  <xsl:element name="text" namespace="{$namespace_full}">
15728
- <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()">
15729
- <xsl:copy-of select="."/>
15239
+ <xsl:for-each select="xalan:nodeset($text)/*[local-name() = 'text']/node()"><xsl:copy-of select="."/>
15730
15240
  </xsl:for-each>
15731
15241
  </xsl:element>
15732
15242
  </xsl:variable>
@@ -16018,9 +15528,7 @@
16018
15528
  </xsl:attribute>
16019
15529
  <xsl:variable name="skip_footnote_body_" select="not($p_fn//fn[@gen_id = $gen_id] and (1 = 1))"/>
16020
15530
  <xsl:attribute name="skip_footnote_body"> <!-- false for repeatable footnote -->
16021
-
16022
- <xsl:value-of select="$skip_footnote_body_"/>
16023
-
15531
+ <xsl:value-of select="$skip_footnote_body_"/>
16024
15532
  </xsl:attribute>
16025
15533
  <xsl:attribute name="ref_id">
16026
15534
  <xsl:value-of select="concat('footnote_', $lang, '_', $reference, '_', $current_fn_number)"/>
@@ -16109,7 +15617,6 @@
16109
15617
 
16110
15618
  <xsl:template name="printEdition">
16111
15619
  <xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
16112
-
16113
15620
  <xsl:choose>
16114
15621
  <xsl:when test="$edition_i18n != ''">
16115
15622
  <!-- Example: <edition language="fr">deuxième édition</edition> -->
@@ -16338,8 +15845,7 @@
16338
15845
  <dc:title>
16339
15846
  <xsl:variable name="title">
16340
15847
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
16341
-
16342
- <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
15848
+ <xsl:value-of select="*[local-name() = 'title'][@type='main']"/>
16343
15849
 
16344
15850
  </xsl:for-each>
16345
15851
  </xsl:variable>
@@ -16358,16 +15864,14 @@
16358
15864
  </dc:title>
16359
15865
  <xsl:variable name="dc_creator">
16360
15866
  <xsl:for-each select="(//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']">
16361
-
16362
- <rdf:Seq>
16363
- <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role']/@type='author']">
16364
- <rdf:li>
16365
- <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
16366
- </rdf:li>
16367
- <!-- <xsl:if test="position() != last()">; </xsl:if> -->
16368
- </xsl:for-each>
16369
- </rdf:Seq>
16370
-
15867
+ <rdf:Seq>
15868
+ <xsl:for-each select="*[local-name() = 'contributor'][*[local-name() = 'role'][not(*[local-name() = 'description'])]/@type='author']">
15869
+ <rdf:li>
15870
+ <xsl:value-of select="*[local-name() = 'organization']/*[local-name() = 'name']"/>
15871
+ </rdf:li>
15872
+ <!-- <xsl:if test="position() != last()">; </xsl:if> -->
15873
+ </xsl:for-each>
15874
+ </rdf:Seq>
16371
15875
  </xsl:for-each>
16372
15876
  </xsl:variable>
16373
15877
  <xsl:if test="normalize-space($dc_creator) != ''">
@@ -16378,9 +15882,7 @@
16378
15882
 
16379
15883
  <xsl:variable name="dc_description">
16380
15884
  <xsl:variable name="abstract">
16381
-
16382
- <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
16383
-
15885
+ <xsl:copy-of select="//*[local-name() = 'metanorma']/*[local-name() = 'preface']/*[local-name() = 'abstract']//text()[not(ancestor::*[local-name() = 'fmt-title']) and not(ancestor::*[local-name() = 'title']) and not(ancestor::*[local-name() = 'fmt-xref-label'])]"/>
16384
15886
  </xsl:variable>
16385
15887
  <rdf:Alt>
16386
15888
  <rdf:li xml:lang="x-default">
@@ -16445,7 +15947,9 @@
16445
15947
  <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden = 'true'][*[local-name() = 'uri'][@type = 'attachment']]">
16446
15948
  <xsl:variable name="attachment_path" select="*[local-name() = 'uri'][@type = 'attachment']"/>
16447
15949
  <xsl:variable name="attachment_name" select="java:org.metanorma.fop.Util.getFilenameFromPath($attachment_path)"/>
16448
- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
15950
+ <!-- <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/> -->
15951
+ <!-- See https://github.com/metanorma/metanorma-iso/issues/1369 -->
15952
+ <xsl:variable name="url" select="concat('url(file:///',$outputpdf_basepath, $attachment_path, ')')"/>
16449
15953
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
16450
15954
  <!-- Todo: need update -->
16451
15955
  <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
@@ -16610,7 +16114,7 @@
16610
16114
  <xsl:param name="normalize-space" select="'true'"/>
16611
16115
  <xsl:param name="keep_sep" select="'false'"/>
16612
16116
  <xsl:if test="string-length($pText) &gt;0">
16613
- <item>
16117
+ <xsl:element name="item" namespace="{$namespace_mn_xsl}">
16614
16118
  <xsl:choose>
16615
16119
  <xsl:when test="$normalize-space = 'true'">
16616
16120
  <xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
@@ -16619,8 +16123,8 @@
16619
16123
  <xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
16620
16124
  </xsl:otherwise>
16621
16125
  </xsl:choose>
16622
- </item>
16623
- <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
16126
+ </xsl:element>
16127
+ <xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><xsl:element name="item" namespace="{$namespace_mn_xsl}"><xsl:value-of select="$sep"/></xsl:element></xsl:if>
16624
16128
  <xsl:call-template name="split">
16625
16129
  <xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
16626
16130
  <xsl:with-param name="sep" select="$sep"/>
@@ -16638,30 +16142,6 @@
16638
16142
  <xsl:call-template name="getLang_fromCurrentNode"/><xsl:value-of select=".//*[local-name() = 'p'][1]/@id"/>
16639
16143
  </xsl:template>
16640
16144
 
16641
- <xsl:template name="namespaceCheck">
16642
- <xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
16643
- <xsl:variable name="XSLNS">
16644
-
16645
- <xsl:value-of select="document('')//*/namespace::itu"/>
16646
-
16647
- </xsl:variable>
16648
- <!-- <xsl:if test="$documentNS != $XSLNS">
16649
- <xsl:message>[WARNING]: Document namespace: '<xsl:value-of select="$documentNS"/>' doesn't equal to xslt namespace '<xsl:value-of select="$XSLNS"/>'</xsl:message>
16650
- </xsl:if> -->
16651
- </xsl:template> <!-- namespaceCheck -->
16652
-
16653
- <xsl:template name="getLanguage">
16654
- <xsl:param name="lang"/>
16655
- <xsl:variable name="language" select="java:toLowerCase(java:java.lang.String.new($lang))"/>
16656
- <xsl:choose>
16657
- <xsl:when test="$language = 'en'">English</xsl:when>
16658
- <xsl:when test="$language = 'fr'">French</xsl:when>
16659
- <xsl:when test="$language = 'de'">Deutsch</xsl:when>
16660
- <xsl:when test="$language = 'cn'">Chinese</xsl:when>
16661
- <xsl:otherwise><xsl:value-of select="$language"/></xsl:otherwise>
16662
- </xsl:choose>
16663
- </xsl:template>
16664
-
16665
16145
  <xsl:template name="setId">
16666
16146
  <xsl:param name="prefix"/>
16667
16147
  <xsl:attribute name="id">