metanorma-iso 3.1.3 → 3.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/isodoc/iso/html/style-human.css +39 -45
- data/lib/isodoc/iso/html/style-iso.css +40 -46
- data/lib/isodoc/iso/iso.amendment.xsl +632 -170
- data/lib/isodoc/iso/iso.international-standard.xsl +632 -170
- data/lib/isodoc/iso/presentation_section.rb +39 -4
- data/lib/isodoc/iso/word_cleanup.rb +17 -2
- data/lib/metanorma/iso/front.rb +10 -49
- data/lib/metanorma/iso/front_contributor.rb +3 -5
- data/lib/metanorma/iso/isodoc.rng +44 -19
- data/lib/metanorma/iso/validate.rb +18 -126
- data/lib/metanorma/iso/validate_numeric.rb +128 -0
- data/lib/metanorma/iso/validate_style.rb +0 -77
- data/lib/metanorma/iso/validate_xref.rb +130 -0
- data/lib/metanorma/iso/version.rb +1 -1
- metadata +4 -3
- data/lib/metanorma/iso/validate_image.rb +0 -97
@@ -6104,6 +6104,7 @@
|
|
6104
6104
|
<xsl:variable name="en_dash">–</xsl:variable>
|
6105
6105
|
<xsl:variable name="em_dash">—</xsl:variable>
|
6106
6106
|
<xsl:variable name="nonbreak_space_em_dash_space"> — </xsl:variable>
|
6107
|
+
<xsl:variable name="nonbreak_space_em_dash"> —</xsl:variable>
|
6107
6108
|
<xsl:variable name="cr"> </xsl:variable>
|
6108
6109
|
<xsl:variable name="lf">
|
6109
6110
|
</xsl:variable>
|
@@ -6670,6 +6671,7 @@
|
|
6670
6671
|
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]" mode="update_xml_step1"/>
|
6671
6672
|
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]" mode="update_xml_step1"/>
|
6672
6673
|
<xsl:template match="mn:section-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
6674
|
+
<xsl:template match="mn:floating-title[following-sibling::*[1][self::mn:p][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
6673
6675
|
<!-- <xsl:template match="mn:preferred[following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
6674
6676
|
<xsl:template match="mn:preferred" mode="update_xml_step1"/>
|
6675
6677
|
<!-- <xsl:template match="mn:admitted[following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
@@ -6684,10 +6686,10 @@
|
|
6684
6686
|
|
6685
6687
|
<xsl:template match="mn:term[@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
6686
6688
|
|
6687
|
-
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title]]" mode="update_xml_step1">
|
6689
|
+
<xsl:template match="mn:p[@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]]" mode="update_xml_step1">
|
6688
6690
|
<xsl:copy>
|
6689
6691
|
<xsl:apply-templates select="@*" mode="update_xml_step1"/>
|
6690
|
-
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title]/@depth"/>
|
6692
|
+
<xsl:copy-of select="preceding-sibling::*[1][self::mn:section-title or self::mn:floating-title]/@depth"/>
|
6691
6693
|
<xsl:apply-templates select="node()" mode="update_xml_step1"/>
|
6692
6694
|
</xsl:copy>
|
6693
6695
|
</xsl:template>
|
@@ -7658,11 +7660,17 @@
|
|
7658
7660
|
<xsl:attribute-set name="license-statement-style">
|
7659
7661
|
</xsl:attribute-set> <!-- license-statement-style -->
|
7660
7662
|
|
7663
|
+
<xsl:template name="refine_license-statement-style">
|
7664
|
+
</xsl:template>
|
7665
|
+
|
7661
7666
|
<xsl:attribute-set name="license-statement-title-style">
|
7662
7667
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7663
7668
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
7664
7669
|
</xsl:attribute-set> <!-- license-statement-title-style -->
|
7665
7670
|
|
7671
|
+
<xsl:template name="refine_license-statement-title-style">
|
7672
|
+
</xsl:template>
|
7673
|
+
|
7666
7674
|
<xsl:attribute-set name="license-statement-p-style">
|
7667
7675
|
<xsl:attribute name="margin-left">1.5mm</xsl:attribute>
|
7668
7676
|
<xsl:attribute name="margin-right">1.5mm</xsl:attribute>
|
@@ -7675,23 +7683,47 @@
|
|
7675
7683
|
<xsl:attribute-set name="legal-statement-style">
|
7676
7684
|
</xsl:attribute-set> <!-- legal-statement-style -->
|
7677
7685
|
|
7686
|
+
<xsl:template name="refine_legal-statement-style">
|
7687
|
+
</xsl:template>
|
7688
|
+
|
7678
7689
|
<xsl:attribute-set name="legal-statement-title-style">
|
7679
7690
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7680
7691
|
</xsl:attribute-set> <!-- legal-statement-title-style -->
|
7681
7692
|
|
7693
|
+
<xsl:template name="refine_legal-statement-title-style">
|
7694
|
+
</xsl:template>
|
7695
|
+
|
7682
7696
|
<xsl:attribute-set name="legal-statement-p-style">
|
7683
7697
|
</xsl:attribute-set> <!-- legal-statement-p-style -->
|
7684
7698
|
|
7699
|
+
<xsl:template name="refine_legal-statement-p-style">
|
7700
|
+
<xsl:if test="@align">
|
7701
|
+
<xsl:attribute name="text-align">
|
7702
|
+
<xsl:value-of select="@align"/>
|
7703
|
+
</xsl:attribute>
|
7704
|
+
</xsl:if>
|
7705
|
+
</xsl:template>
|
7706
|
+
|
7685
7707
|
<xsl:attribute-set name="feedback-statement-style">
|
7686
7708
|
</xsl:attribute-set> <!-- feedback-statement-style -->
|
7687
7709
|
|
7710
|
+
<xsl:template name="refine_feedback-statement-style">
|
7711
|
+
</xsl:template>
|
7712
|
+
|
7688
7713
|
<xsl:attribute-set name="feedback-statement-title-style">
|
7689
7714
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
7690
7715
|
</xsl:attribute-set> <!-- feedback-statement-title-style -->
|
7691
7716
|
|
7717
|
+
<xsl:template name="refine_feedback-statement-title-style">
|
7718
|
+
|
7719
|
+
</xsl:template>
|
7720
|
+
|
7692
7721
|
<xsl:attribute-set name="feedback-statement-p-style">
|
7693
7722
|
</xsl:attribute-set> <!-- feedback-statement-p-style -->
|
7694
7723
|
|
7724
|
+
<xsl:template name="refine_feedback-statement-p-style">
|
7725
|
+
</xsl:template>
|
7726
|
+
|
7695
7727
|
<!-- End boilerplate sections styles -->
|
7696
7728
|
|
7697
7729
|
<!-- ================================= -->
|
@@ -7717,6 +7749,7 @@
|
|
7717
7749
|
|
7718
7750
|
<xsl:template match="mn:license-statement">
|
7719
7751
|
<fo:block xsl:use-attribute-sets="license-statement-style">
|
7752
|
+
<xsl:call-template name="refine_license-statement-style"/>
|
7720
7753
|
<xsl:apply-templates/>
|
7721
7754
|
</fo:block>
|
7722
7755
|
</xsl:template> <!-- license-statement -->
|
@@ -7726,6 +7759,7 @@
|
|
7726
7759
|
<xsl:call-template name="getLevel"/>
|
7727
7760
|
</xsl:variable>
|
7728
7761
|
<fo:block role="H{$level}" xsl:use-attribute-sets="license-statement-title-style">
|
7762
|
+
<xsl:call-template name="refine_license-statement-title-style"/>
|
7729
7763
|
<xsl:apply-templates/>
|
7730
7764
|
</fo:block>
|
7731
7765
|
|
@@ -7746,6 +7780,7 @@
|
|
7746
7780
|
<xsl:template match="mn:legal-statement">
|
7747
7781
|
<xsl:param name="isLegacy">false</xsl:param>
|
7748
7782
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
7783
|
+
<xsl:call-template name="refine_legal-statement-style"/>
|
7749
7784
|
<xsl:apply-templates/>
|
7750
7785
|
</fo:block>
|
7751
7786
|
</xsl:template> <!-- legal-statement -->
|
@@ -7919,6 +7954,27 @@
|
|
7919
7954
|
<xsl:attribute-set name="sourcecode-container-style">
|
7920
7955
|
</xsl:attribute-set>
|
7921
7956
|
|
7957
|
+
<xsl:template name="refine_sourcecode-container-style">
|
7958
|
+
<xsl:if test="not(ancestor::mn:li) or ancestor::mn:example">
|
7959
|
+
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
7960
|
+
</xsl:if>
|
7961
|
+
|
7962
|
+
<xsl:if test="ancestor::mn:example">
|
7963
|
+
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
7964
|
+
</xsl:if>
|
7965
|
+
|
7966
|
+
<xsl:copy-of select="@id"/>
|
7967
|
+
|
7968
|
+
<xsl:if test="parent::mn:note">
|
7969
|
+
<xsl:attribute name="margin-left">
|
7970
|
+
<xsl:choose>
|
7971
|
+
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
7972
|
+
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
7973
|
+
</xsl:choose>
|
7974
|
+
</xsl:attribute>
|
7975
|
+
</xsl:if>
|
7976
|
+
</xsl:template>
|
7977
|
+
|
7922
7978
|
<xsl:attribute-set name="sourcecode-style">
|
7923
7979
|
<xsl:attribute name="white-space">pre</xsl:attribute>
|
7924
7980
|
<xsl:attribute name="wrap-option">wrap</xsl:attribute>
|
@@ -7930,6 +7986,12 @@
|
|
7930
7986
|
<xsl:template name="refine_sourcecode-style">
|
7931
7987
|
</xsl:template> <!-- refine_sourcecode-style -->
|
7932
7988
|
|
7989
|
+
<xsl:attribute-set name="sourcecode-number-style">
|
7990
|
+
</xsl:attribute-set>
|
7991
|
+
|
7992
|
+
<xsl:template name="refine_sourcecode-number-style">
|
7993
|
+
</xsl:template>
|
7994
|
+
|
7933
7995
|
<xsl:attribute-set name="sourcecode-name-style">
|
7934
7996
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
7935
7997
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -7938,6 +8000,9 @@
|
|
7938
8000
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
7939
8001
|
</xsl:attribute-set> <!-- sourcecode-name-style -->
|
7940
8002
|
|
8003
|
+
<xsl:template name="refine_sourcecode-name-style">
|
8004
|
+
</xsl:template>
|
8005
|
+
|
7941
8006
|
<xsl:template name="add-zero-spaces-equal">
|
7942
8007
|
<xsl:param name="text" select="."/>
|
7943
8008
|
<xsl:variable name="zero-space-after-equals">==========</xsl:variable>
|
@@ -8025,24 +8090,8 @@
|
|
8025
8090
|
<xsl:otherwise>
|
8026
8091
|
<fo:block-container xsl:use-attribute-sets="sourcecode-container-style" role="SKIP">
|
8027
8092
|
|
8028
|
-
<xsl:
|
8029
|
-
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
8030
|
-
</xsl:if>
|
8031
|
-
|
8032
|
-
<xsl:if test="ancestor::mn:example">
|
8033
|
-
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
8034
|
-
</xsl:if>
|
8093
|
+
<xsl:call-template name="refine_sourcecode-container-style"/>
|
8035
8094
|
|
8036
|
-
<xsl:copy-of select="@id"/>
|
8037
|
-
|
8038
|
-
<xsl:if test="parent::mn:note">
|
8039
|
-
<xsl:attribute name="margin-left">
|
8040
|
-
<xsl:choose>
|
8041
|
-
<xsl:when test="not(ancestor::mn:table)"><xsl:value-of select="$note-body-indent"/></xsl:when>
|
8042
|
-
<xsl:otherwise><xsl:value-of select="$note-body-indent-table"/></xsl:otherwise>
|
8043
|
-
</xsl:choose>
|
8044
|
-
</xsl:attribute>
|
8045
|
-
</xsl:if>
|
8046
8095
|
<fo:block-container margin-left="0mm" role="SKIP">
|
8047
8096
|
|
8048
8097
|
<fo:block xsl:use-attribute-sets="sourcecode-style">
|
@@ -8369,6 +8418,7 @@
|
|
8369
8418
|
<xsl:template match="mn:sourcecode/mn:fmt-name">
|
8370
8419
|
<xsl:if test="normalize-space() != ''">
|
8371
8420
|
<fo:block xsl:use-attribute-sets="sourcecode-name-style">
|
8421
|
+
<xsl:call-template name="refine_sourcecode-name-style"/>
|
8372
8422
|
<xsl:apply-templates/>
|
8373
8423
|
</fo:block>
|
8374
8424
|
</xsl:if>
|
@@ -8416,12 +8466,31 @@
|
|
8416
8466
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
8417
8467
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
8418
8468
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
8419
|
-
</xsl:attribute-set>
|
8469
|
+
</xsl:attribute-set> <!-- pre-style -->
|
8470
|
+
|
8471
|
+
<xsl:template name="refine_pre-style">
|
8472
|
+
</xsl:template>
|
8420
8473
|
|
8421
8474
|
<xsl:attribute-set name="tt-style">
|
8422
8475
|
<xsl:attribute name="font-family">Courier New, <xsl:value-of select="$font_noto_sans_mono"/></xsl:attribute>
|
8423
8476
|
</xsl:attribute-set>
|
8424
8477
|
|
8478
|
+
<xsl:template name="refine_tt-style">
|
8479
|
+
<xsl:variable name="_font-size">9 <!-- inherit -->
|
8480
|
+
</xsl:variable>
|
8481
|
+
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
8482
|
+
<xsl:if test="$font-size != ''">
|
8483
|
+
<xsl:attribute name="font-size">
|
8484
|
+
<xsl:choose>
|
8485
|
+
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
8486
|
+
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
8487
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
8488
|
+
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
8489
|
+
</xsl:choose>
|
8490
|
+
</xsl:attribute>
|
8491
|
+
</xsl:if>
|
8492
|
+
</xsl:template>
|
8493
|
+
|
8425
8494
|
<xsl:variable name="color-added-text">
|
8426
8495
|
<xsl:text>rgb(0, 255, 0)</xsl:text>
|
8427
8496
|
</xsl:variable>
|
@@ -8434,9 +8503,14 @@
|
|
8434
8503
|
<xsl:attribute name="padding-bottom">0.5mm</xsl:attribute> -->
|
8435
8504
|
</xsl:attribute-set>
|
8436
8505
|
|
8506
|
+
<xsl:template name="refine_add-style">
|
8507
|
+
</xsl:template>
|
8508
|
+
|
8437
8509
|
<xsl:variable name="add-style">
|
8438
|
-
|
8439
|
-
|
8510
|
+
<add-style xsl:use-attribute-sets="add-style">
|
8511
|
+
<xsl:call-template name="refine_add-style"/>
|
8512
|
+
</add-style>
|
8513
|
+
</xsl:variable>
|
8440
8514
|
<xsl:template name="append_add-style">
|
8441
8515
|
<xsl:copy-of select="xalan:nodeset($add-style)/add-style/@*"/>
|
8442
8516
|
</xsl:template>
|
@@ -8449,27 +8523,83 @@
|
|
8449
8523
|
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
8450
8524
|
</xsl:attribute-set>
|
8451
8525
|
|
8452
|
-
<xsl:template
|
8453
|
-
<xsl:value-of select="$linebreak"/>
|
8526
|
+
<xsl:template name="refine_del-style">
|
8454
8527
|
</xsl:template>
|
8455
8528
|
|
8456
|
-
|
8457
|
-
<
|
8458
|
-
|
8459
|
-
<xsl:apply-templates/>
|
8460
|
-
</fo:inline>
|
8461
|
-
</xsl:template>
|
8529
|
+
<xsl:attribute-set name="strong-style">
|
8530
|
+
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
8531
|
+
</xsl:attribute-set>
|
8462
8532
|
|
8463
|
-
<xsl:template name="
|
8533
|
+
<xsl:template name="refine_strong_style">
|
8534
|
+
<xsl:if test="ancestor::*[local-name() = 'item']">
|
8535
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8536
|
+
</xsl:if>
|
8537
|
+
<xsl:if test="ancestor::*['preferred']">
|
8538
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8539
|
+
</xsl:if>
|
8540
|
+
</xsl:template> <!-- refine_strong_style -->
|
8541
|
+
|
8542
|
+
<xsl:attribute-set name="em-style">
|
8543
|
+
<xsl:attribute name="font-style">italic</xsl:attribute>
|
8544
|
+
</xsl:attribute-set>
|
8545
|
+
|
8546
|
+
<xsl:template name="refine_em_style">
|
8464
8547
|
<xsl:if test="ancestor::*[local-name() = 'item']">
|
8465
8548
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8466
8549
|
</xsl:if>
|
8550
|
+
</xsl:template> <!-- refine_em_style -->
|
8551
|
+
|
8552
|
+
<xsl:attribute-set name="sup-style">
|
8553
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
8554
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
8555
|
+
</xsl:attribute-set>
|
8556
|
+
|
8557
|
+
<xsl:template name="refine_sup-style">
|
8558
|
+
</xsl:template>
|
8559
|
+
|
8560
|
+
<xsl:attribute-set name="sub-style">
|
8561
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
8562
|
+
<xsl:attribute name="vertical-align">sub</xsl:attribute>
|
8563
|
+
</xsl:attribute-set>
|
8564
|
+
|
8565
|
+
<xsl:template name="refine_sub-style">
|
8566
|
+
</xsl:template>
|
8567
|
+
|
8568
|
+
<xsl:attribute-set name="underline-style">
|
8569
|
+
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
8570
|
+
</xsl:attribute-set>
|
8571
|
+
|
8572
|
+
<xsl:template name="refine_underline-style">
|
8573
|
+
</xsl:template>
|
8574
|
+
|
8575
|
+
<xsl:attribute-set name="hi-style">
|
8576
|
+
<xsl:attribute name="background-color">yellow</xsl:attribute>
|
8577
|
+
</xsl:attribute-set>
|
8578
|
+
|
8579
|
+
<xsl:template name="refine_hi-style">
|
8580
|
+
</xsl:template>
|
8581
|
+
|
8582
|
+
<xsl:attribute-set name="strike-style">
|
8583
|
+
<xsl:attribute name="text-decoration">line-through</xsl:attribute>
|
8584
|
+
</xsl:attribute-set>
|
8585
|
+
|
8586
|
+
<xsl:template name="refine_strike-style">
|
8587
|
+
</xsl:template>
|
8588
|
+
|
8589
|
+
<xsl:template match="mn:br">
|
8590
|
+
<xsl:value-of select="$linebreak"/>
|
8591
|
+
</xsl:template>
|
8592
|
+
|
8593
|
+
<xsl:template match="mn:em">
|
8594
|
+
<fo:inline xsl:use-attribute-sets="em-style">
|
8595
|
+
<xsl:call-template name="refine_em_style"/>
|
8596
|
+
<xsl:apply-templates/>
|
8597
|
+
</fo:inline>
|
8467
8598
|
</xsl:template>
|
8468
8599
|
|
8469
8600
|
<xsl:template match="mn:strong | *[local-name()='b']">
|
8470
8601
|
<xsl:param name="split_keep-within-line"/>
|
8471
|
-
<fo:inline
|
8472
|
-
|
8602
|
+
<fo:inline xsl:use-attribute-sets="strong-style">
|
8473
8603
|
<xsl:call-template name="refine_strong_style"/>
|
8474
8604
|
|
8475
8605
|
<xsl:apply-templates>
|
@@ -8478,47 +8608,27 @@
|
|
8478
8608
|
</fo:inline>
|
8479
8609
|
</xsl:template>
|
8480
8610
|
|
8481
|
-
<xsl:template name="refine_strong_style">
|
8482
|
-
<xsl:if test="ancestor::*[local-name() = 'item']">
|
8483
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8484
|
-
</xsl:if>
|
8485
|
-
<xsl:if test="ancestor::*['preferred']">
|
8486
|
-
<xsl:attribute name="role">SKIP</xsl:attribute>
|
8487
|
-
</xsl:if>
|
8488
|
-
</xsl:template>
|
8489
|
-
|
8490
8611
|
<xsl:template match="*[local-name()='padding']">
|
8491
8612
|
<fo:inline padding-right="{@value}"> </fo:inline>
|
8492
8613
|
</xsl:template>
|
8493
8614
|
|
8494
8615
|
<xsl:template match="mn:sup">
|
8495
|
-
<fo:inline
|
8616
|
+
<fo:inline xsl:use-attribute-sets="sup-style">
|
8617
|
+
<xsl:call-template name="refine_sup-style"/>
|
8496
8618
|
<xsl:apply-templates/>
|
8497
8619
|
</fo:inline>
|
8498
8620
|
</xsl:template>
|
8499
8621
|
|
8500
8622
|
<xsl:template match="mn:sub">
|
8501
|
-
<fo:inline
|
8623
|
+
<fo:inline xsl:use-attribute-sets="sub-style">
|
8624
|
+
<xsl:call-template name="refine_sub-style"/>
|
8502
8625
|
<xsl:apply-templates/>
|
8503
8626
|
</fo:inline>
|
8504
8627
|
</xsl:template>
|
8505
8628
|
|
8506
8629
|
<xsl:template match="mn:tt">
|
8507
8630
|
<fo:inline xsl:use-attribute-sets="tt-style">
|
8508
|
-
|
8509
|
-
<xsl:variable name="_font-size">9 <!-- inherit -->
|
8510
|
-
</xsl:variable>
|
8511
|
-
<xsl:variable name="font-size" select="normalize-space($_font-size)"/>
|
8512
|
-
<xsl:if test="$font-size != ''">
|
8513
|
-
<xsl:attribute name="font-size">
|
8514
|
-
<xsl:choose>
|
8515
|
-
<xsl:when test="$font-size = 'inherit'"><xsl:value-of select="$font-size"/></xsl:when>
|
8516
|
-
<xsl:when test="contains($font-size, '%')"><xsl:value-of select="$font-size"/></xsl:when>
|
8517
|
-
<xsl:when test="ancestor::mn:note or ancestor::mn:example"><xsl:value-of select="$font-size * 0.91"/>pt</xsl:when>
|
8518
|
-
<xsl:otherwise><xsl:value-of select="$font-size"/>pt</xsl:otherwise>
|
8519
|
-
</xsl:choose>
|
8520
|
-
</xsl:attribute>
|
8521
|
-
</xsl:if>
|
8631
|
+
<xsl:call-template name="refine_tt-style"/>
|
8522
8632
|
<xsl:apply-templates/>
|
8523
8633
|
</fo:inline>
|
8524
8634
|
</xsl:template> <!-- tt -->
|
@@ -8537,7 +8647,8 @@
|
|
8537
8647
|
</xsl:template>
|
8538
8648
|
|
8539
8649
|
<xsl:template match="mn:underline">
|
8540
|
-
<fo:inline
|
8650
|
+
<fo:inline xsl:use-attribute-sets="underline-style">
|
8651
|
+
<xsl:call-template name="refine_underline-style"/>
|
8541
8652
|
<xsl:apply-templates/>
|
8542
8653
|
</fo:inline>
|
8543
8654
|
</xsl:template>
|
@@ -8695,6 +8806,7 @@
|
|
8695
8806
|
|
8696
8807
|
<xsl:template match="mn:del">
|
8697
8808
|
<fo:inline xsl:use-attribute-sets="del-style">
|
8809
|
+
<xsl:call-template name="refine_del-style"/>
|
8698
8810
|
<xsl:apply-templates/>
|
8699
8811
|
</fo:inline>
|
8700
8812
|
</xsl:template>
|
@@ -8704,7 +8816,8 @@
|
|
8704
8816
|
|
8705
8817
|
<!-- highlight text -->
|
8706
8818
|
<xsl:template match="mn:hi | mn:span[@class = 'fmt-hi']" priority="3">
|
8707
|
-
<fo:inline
|
8819
|
+
<fo:inline xsl:use-attribute-sets="hi-style">
|
8820
|
+
<xsl:call-template name="refine_hi-style"/>
|
8708
8821
|
<xsl:apply-templates/>
|
8709
8822
|
</fo:inline>
|
8710
8823
|
</xsl:template>
|
@@ -8796,7 +8909,8 @@
|
|
8796
8909
|
</xsl:template>
|
8797
8910
|
|
8798
8911
|
<xsl:template match="mn:strike">
|
8799
|
-
<fo:inline
|
8912
|
+
<fo:inline xsl:use-attribute-sets="strike-style">
|
8913
|
+
<xsl:call-template name="refine_strike-style"/>
|
8800
8914
|
<xsl:apply-templates/>
|
8801
8915
|
</fo:inline>
|
8802
8916
|
</xsl:template>
|
@@ -8876,6 +8990,7 @@
|
|
8876
8990
|
|
8877
8991
|
<xsl:template match="mn:pre" name="pre">
|
8878
8992
|
<fo:block xsl:use-attribute-sets="pre-style">
|
8993
|
+
<xsl:call-template name="refine_pre-style"/>
|
8879
8994
|
<xsl:copy-of select="@id"/>
|
8880
8995
|
<xsl:choose>
|
8881
8996
|
|
@@ -8906,17 +9021,29 @@
|
|
8906
9021
|
<xsl:attribute-set name="permission-style">
|
8907
9022
|
</xsl:attribute-set>
|
8908
9023
|
|
9024
|
+
<xsl:template name="refine_permission-style">
|
9025
|
+
</xsl:template>
|
9026
|
+
|
8909
9027
|
<xsl:attribute-set name="permission-name-style">
|
8910
9028
|
</xsl:attribute-set>
|
8911
9029
|
|
9030
|
+
<xsl:template name="refine_permission-name-style">
|
9031
|
+
</xsl:template>
|
9032
|
+
|
8912
9033
|
<xsl:attribute-set name="permission-label-style">
|
8913
9034
|
</xsl:attribute-set>
|
8914
9035
|
|
9036
|
+
<xsl:template name="refine_permission-label-style">
|
9037
|
+
</xsl:template>
|
9038
|
+
|
8915
9039
|
<xsl:attribute-set name="requirement-style">
|
8916
9040
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
8917
9041
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
8918
9042
|
</xsl:attribute-set>
|
8919
9043
|
|
9044
|
+
<xsl:template name="refine_requirement-style">
|
9045
|
+
</xsl:template>
|
9046
|
+
|
8920
9047
|
<xsl:attribute-set name="requirement-name-style">
|
8921
9048
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
8922
9049
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -8924,9 +9051,15 @@
|
|
8924
9051
|
<xsl:attribute name="margin-bottom">4pt</xsl:attribute>
|
8925
9052
|
</xsl:attribute-set>
|
8926
9053
|
|
9054
|
+
<xsl:template name="refine_requirement-name-style">
|
9055
|
+
</xsl:template>
|
9056
|
+
|
8927
9057
|
<xsl:attribute-set name="requirement-label-style">
|
8928
9058
|
</xsl:attribute-set>
|
8929
9059
|
|
9060
|
+
<xsl:template name="refine_requirement-label-style">
|
9061
|
+
</xsl:template>
|
9062
|
+
|
8930
9063
|
<xsl:attribute-set name="subject-style">
|
8931
9064
|
</xsl:attribute-set>
|
8932
9065
|
|
@@ -8954,18 +9087,28 @@
|
|
8954
9087
|
<xsl:attribute-set name="recommendation-style">
|
8955
9088
|
</xsl:attribute-set>
|
8956
9089
|
|
9090
|
+
<xsl:template name="refine_recommendation-style">
|
9091
|
+
</xsl:template>
|
9092
|
+
|
8957
9093
|
<xsl:attribute-set name="recommendation-name-style">
|
8958
9094
|
</xsl:attribute-set>
|
8959
9095
|
|
9096
|
+
<xsl:template name="refine_recommendation-name-style">
|
9097
|
+
</xsl:template>
|
9098
|
+
|
8960
9099
|
<xsl:attribute-set name="recommendation-label-style">
|
8961
9100
|
</xsl:attribute-set>
|
8962
9101
|
|
9102
|
+
<xsl:template name="refine_recommendation-label-style">
|
9103
|
+
</xsl:template>
|
9104
|
+
|
8963
9105
|
<!-- ========== -->
|
8964
9106
|
<!-- permission -->
|
8965
9107
|
<!-- ========== -->
|
8966
9108
|
<xsl:template match="mn:permission">
|
8967
9109
|
<xsl:call-template name="setNamedDestination"/>
|
8968
9110
|
<fo:block id="{@id}" xsl:use-attribute-sets="permission-style">
|
9111
|
+
<xsl:call-template name="refine_permission-style"/>
|
8969
9112
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8970
9113
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
8971
9114
|
</fo:block>
|
@@ -8974,6 +9117,7 @@
|
|
8974
9117
|
<xsl:template match="mn:permission/mn:fmt-name">
|
8975
9118
|
<xsl:if test="normalize-space() != ''">
|
8976
9119
|
<fo:block xsl:use-attribute-sets="permission-name-style">
|
9120
|
+
<xsl:call-template name="refine_permission-name-style"/>
|
8977
9121
|
<xsl:apply-templates/>
|
8978
9122
|
</fo:block>
|
8979
9123
|
</xsl:if>
|
@@ -8981,6 +9125,7 @@
|
|
8981
9125
|
|
8982
9126
|
<xsl:template match="mn:permission/mn:label">
|
8983
9127
|
<fo:block xsl:use-attribute-sets="permission-label-style">
|
9128
|
+
<xsl:call-template name="refine_permission-label-style"/>
|
8984
9129
|
<xsl:apply-templates/>
|
8985
9130
|
</fo:block>
|
8986
9131
|
</xsl:template>
|
@@ -8993,6 +9138,7 @@
|
|
8993
9138
|
<xsl:template match="mn:requirement">
|
8994
9139
|
<xsl:call-template name="setNamedDestination"/>
|
8995
9140
|
<fo:block id="{@id}" xsl:use-attribute-sets="requirement-style">
|
9141
|
+
<xsl:call-template name="refine_requirement-style"/>
|
8996
9142
|
<xsl:apply-templates select="mn:fmt-name"/>
|
8997
9143
|
<xsl:apply-templates select="mn:label"/>
|
8998
9144
|
<xsl:apply-templates select="@obligation"/>
|
@@ -9005,6 +9151,7 @@
|
|
9005
9151
|
<xsl:if test="normalize-space() != ''">
|
9006
9152
|
|
9007
9153
|
<fo:block xsl:use-attribute-sets="requirement-name-style">
|
9154
|
+
<xsl:call-template name="refine_requirement-name-style"/>
|
9008
9155
|
<xsl:apply-templates/>
|
9009
9156
|
<xsl:text>:</xsl:text>
|
9010
9157
|
</fo:block>
|
@@ -9013,6 +9160,7 @@
|
|
9013
9160
|
|
9014
9161
|
<xsl:template match="mn:requirement/mn:label">
|
9015
9162
|
<fo:block xsl:use-attribute-sets="requirement-label-style">
|
9163
|
+
<xsl:call-template name="refine_requirement-label-style"/>
|
9016
9164
|
<xsl:apply-templates/>
|
9017
9165
|
</fo:block>
|
9018
9166
|
</xsl:template>
|
@@ -9038,6 +9186,7 @@
|
|
9038
9186
|
<xsl:template match="mn:recommendation">
|
9039
9187
|
<xsl:call-template name="setNamedDestination"/>
|
9040
9188
|
<fo:block id="{@id}" xsl:use-attribute-sets="recommendation-style">
|
9189
|
+
<xsl:call-template name="refine_recommendation-style"/>
|
9041
9190
|
<xsl:apply-templates select="mn:fmt-name"/>
|
9042
9191
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9043
9192
|
</fo:block>
|
@@ -9047,6 +9196,7 @@
|
|
9047
9196
|
<xsl:if test="normalize-space() != ''">
|
9048
9197
|
|
9049
9198
|
<fo:block xsl:use-attribute-sets="recommendation-name-style">
|
9199
|
+
<xsl:call-template name="refine_recommendation-name-style"/>
|
9050
9200
|
<xsl:apply-templates/>
|
9051
9201
|
</fo:block>
|
9052
9202
|
</xsl:if>
|
@@ -9054,6 +9204,7 @@
|
|
9054
9204
|
|
9055
9205
|
<xsl:template match="mn:recommendation/mn:label">
|
9056
9206
|
<fo:block xsl:use-attribute-sets="recommendation-label-style">
|
9207
|
+
<xsl:call-template name="refine_recommendation-label-style"/>
|
9057
9208
|
<xsl:apply-templates/>
|
9058
9209
|
</fo:block>
|
9059
9210
|
</xsl:template>
|
@@ -9235,36 +9386,75 @@
|
|
9235
9386
|
<xsl:attribute name="margin-bottom">10pt</xsl:attribute>
|
9236
9387
|
</xsl:attribute-set> <!-- term-style -->
|
9237
9388
|
|
9389
|
+
<xsl:template name="refine_term-style">
|
9390
|
+
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
9391
|
+
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
9392
|
+
</xsl:if>
|
9393
|
+
</xsl:template>
|
9394
|
+
|
9238
9395
|
<xsl:attribute-set name="term-name-style">
|
9239
9396
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9240
9397
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9241
9398
|
</xsl:attribute-set> <!-- term-name-style -->
|
9242
9399
|
|
9243
|
-
|
9400
|
+
<xsl:template name="refine_term-name-style">
|
9401
|
+
</xsl:template>
|
9402
|
+
|
9403
|
+
<xsl:attribute-set name="preferred-style">
|
9404
|
+
</xsl:attribute-set> <!-- preferred-style -->
|
9405
|
+
|
9406
|
+
<xsl:template name="refine_preferred-style">
|
9407
|
+
</xsl:template>
|
9408
|
+
|
9409
|
+
<xsl:attribute-set name="preferred-block-style">
|
9244
9410
|
<xsl:attribute name="line-height">1.1</xsl:attribute>
|
9245
9411
|
</xsl:attribute-set> <!-- preferred-block-style -->
|
9246
9412
|
|
9413
|
+
<xsl:template name="refine_preferred-block-style">
|
9414
|
+
</xsl:template>
|
9415
|
+
|
9247
9416
|
<xsl:attribute-set name="preferred-term-style">
|
9248
9417
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9249
9418
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
9250
9419
|
</xsl:attribute-set> <!-- preferred-term-style -->
|
9251
9420
|
|
9421
|
+
<xsl:template name="refine_preferred-term-style">
|
9422
|
+
<xsl:if test="mn:strong">
|
9423
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9424
|
+
</xsl:if>
|
9425
|
+
</xsl:template>
|
9426
|
+
|
9252
9427
|
<xsl:attribute-set name="domain-style">
|
9253
9428
|
</xsl:attribute-set> <!-- domain-style -->
|
9254
9429
|
|
9430
|
+
<xsl:template name="refine_domain-style">
|
9431
|
+
</xsl:template>
|
9432
|
+
|
9255
9433
|
<xsl:attribute-set name="admitted-style">
|
9256
9434
|
</xsl:attribute-set> <!-- admitted-style -->
|
9257
9435
|
|
9436
|
+
<xsl:template name="refine_admitted-style">
|
9437
|
+
</xsl:template>
|
9438
|
+
|
9258
9439
|
<xsl:attribute-set name="deprecates-style">
|
9259
9440
|
</xsl:attribute-set> <!-- deprecates-style -->
|
9260
9441
|
|
9442
|
+
<xsl:template name="refine_deprecates-style">
|
9443
|
+
</xsl:template>
|
9444
|
+
|
9261
9445
|
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
9262
9446
|
</xsl:attribute-set>
|
9263
9447
|
|
9448
|
+
<xsl:template name="refine_related-block-style">
|
9449
|
+
</xsl:template>
|
9450
|
+
|
9264
9451
|
<xsl:attribute-set name="definition-style">
|
9265
9452
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
9266
9453
|
</xsl:attribute-set> <!-- definition-style -->
|
9267
9454
|
|
9455
|
+
<xsl:template name="refine_definition-style">
|
9456
|
+
</xsl:template>
|
9457
|
+
|
9268
9458
|
<xsl:attribute-set name="termsource-style">
|
9269
9459
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
9270
9460
|
</xsl:attribute-set> <!-- termsource-style -->
|
@@ -9275,9 +9465,15 @@
|
|
9275
9465
|
<xsl:attribute-set name="termsource-text-style">
|
9276
9466
|
</xsl:attribute-set> <!-- termsource-text-style -->
|
9277
9467
|
|
9468
|
+
<xsl:template name="refine_termsource-text-style">
|
9469
|
+
</xsl:template>
|
9470
|
+
|
9278
9471
|
<xsl:attribute-set name="origin-style">
|
9279
9472
|
</xsl:attribute-set> <!-- origin-style -->
|
9280
9473
|
|
9474
|
+
<xsl:template name="refine_origin-style">
|
9475
|
+
</xsl:template>
|
9476
|
+
|
9281
9477
|
<!-- ====== -->
|
9282
9478
|
<!-- term -->
|
9283
9479
|
<!-- ====== -->
|
@@ -9293,10 +9489,8 @@
|
|
9293
9489
|
<xsl:template match="mn:term">
|
9294
9490
|
<xsl:call-template name="setNamedDestination"/>
|
9295
9491
|
<fo:block id="{@id}" xsl:use-attribute-sets="term-style">
|
9492
|
+
<xsl:call-template name="refine_term-style"/>
|
9296
9493
|
|
9297
|
-
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:term)">
|
9298
|
-
<xsl:attribute name="space-before">12pt</xsl:attribute>
|
9299
|
-
</xsl:if>
|
9300
9494
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
9301
9495
|
</fo:block>
|
9302
9496
|
</xsl:template>
|
@@ -9372,6 +9566,7 @@
|
|
9372
9566
|
<!-- text SOURCE: -->
|
9373
9567
|
<xsl:template match="mn:fmt-termsource/mn:strong[1][following-sibling::*[1][self::mn:fmt-origin]]/text()">
|
9374
9568
|
<fo:inline xsl:use-attribute-sets="termsource-text-style">
|
9569
|
+
<xsl:call-template name="refine_termsource-text-style"/>
|
9375
9570
|
<xsl:value-of select="."/>
|
9376
9571
|
</fo:inline>
|
9377
9572
|
</xsl:template>
|
@@ -9384,6 +9579,7 @@
|
|
9384
9579
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
9385
9580
|
</xsl:if>
|
9386
9581
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
9582
|
+
<xsl:call-template name="refine_origin-style"/>
|
9387
9583
|
<xsl:apply-templates/>
|
9388
9584
|
</fo:inline>
|
9389
9585
|
</fo:basic-link>
|
@@ -9433,9 +9629,12 @@
|
|
9433
9629
|
</xsl:variable>
|
9434
9630
|
<fo:block font-size="{normalize-space($font-size)}" role="H{$levelTerm}" xsl:use-attribute-sets="preferred-block-style">
|
9435
9631
|
|
9632
|
+
<xsl:call-template name="refine_preferred-block-style"/>
|
9633
|
+
|
9436
9634
|
<xsl:if test="parent::mn:term and not(preceding-sibling::mn:fmt-preferred)"> <!-- if first preffered in term, then display term's name -->
|
9437
9635
|
|
9438
9636
|
<fo:block xsl:use-attribute-sets="term-name-style" role="SKIP">
|
9637
|
+
<xsl:call-template name="refine_term-name-style"/>
|
9439
9638
|
|
9440
9639
|
<xsl:for-each select="ancestor::mn:term[1]/mn:fmt-name"><!-- change context -->
|
9441
9640
|
<xsl:call-template name="setIDforNamedDestination"/>
|
@@ -9446,7 +9645,7 @@
|
|
9446
9645
|
</xsl:if>
|
9447
9646
|
|
9448
9647
|
<fo:block xsl:use-attribute-sets="preferred-term-style" role="SKIP">
|
9449
|
-
<xsl:call-template name="
|
9648
|
+
<xsl:call-template name="refine_preferred-term-style"/>
|
9450
9649
|
|
9451
9650
|
<xsl:apply-templates/>
|
9452
9651
|
</fo:block>
|
@@ -9467,22 +9666,18 @@
|
|
9467
9666
|
|
9468
9667
|
<xsl:template match="mn:fmt-admitted">
|
9469
9668
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
9669
|
+
<xsl:call-template name="refine_admitted-style"/>
|
9470
9670
|
<xsl:apply-templates/>
|
9471
9671
|
</fo:block>
|
9472
9672
|
</xsl:template>
|
9473
9673
|
|
9474
9674
|
<xsl:template match="mn:fmt-deprecates">
|
9475
9675
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
9676
|
+
<xsl:call-template name="refine_deprecates-style"/>
|
9476
9677
|
<xsl:apply-templates/>
|
9477
9678
|
</fo:block>
|
9478
9679
|
</xsl:template>
|
9479
9680
|
|
9480
|
-
<xsl:template name="setStyle_preferred">
|
9481
|
-
<xsl:if test="mn:strong">
|
9482
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
9483
|
-
</xsl:if>
|
9484
|
-
</xsl:template>
|
9485
|
-
|
9486
9681
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
9487
9682
|
<!-- in metanorma xml preferred terms delimited by semicolons -->
|
9488
9683
|
<xsl:template match="mn:fmt-preferred/text()[contains(., ';')] | mn:fmt-preferred/mn:strong/text()[contains(., ';')]">
|
@@ -9492,6 +9687,7 @@
|
|
9492
9687
|
|
9493
9688
|
<xsl:template match="mn:fmt-related">
|
9494
9689
|
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
9690
|
+
<xsl:call-template name="refine_related-block-style"/>
|
9495
9691
|
<xsl:apply-templates/>
|
9496
9692
|
</fo:block>
|
9497
9693
|
</xsl:template>
|
@@ -9506,6 +9702,7 @@
|
|
9506
9702
|
<!-- ========== -->
|
9507
9703
|
<xsl:template match="mn:fmt-definition">
|
9508
9704
|
<fo:block xsl:use-attribute-sets="definition-style" role="SKIP">
|
9705
|
+
<xsl:call-template name="refine_definition-style"/>
|
9509
9706
|
<xsl:apply-templates/>
|
9510
9707
|
</fo:block>
|
9511
9708
|
</xsl:template>
|
@@ -9568,6 +9765,9 @@
|
|
9568
9765
|
<xsl:attribute name="margin-right">7mm</xsl:attribute>
|
9569
9766
|
</xsl:attribute-set> <!-- example-body-style -->
|
9570
9767
|
|
9768
|
+
<xsl:template name="refine_example-body-style">
|
9769
|
+
</xsl:template>
|
9770
|
+
|
9571
9771
|
<xsl:attribute-set name="example-name-style">
|
9572
9772
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
9573
9773
|
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
@@ -9622,6 +9822,8 @@
|
|
9622
9822
|
<xsl:when test="contains($element, 'block')">
|
9623
9823
|
<fo:block xsl:use-attribute-sets="example-p-style">
|
9624
9824
|
|
9825
|
+
<xsl:call-template name="refine_example-p-style"/>
|
9826
|
+
|
9625
9827
|
<xsl:apply-templates/>
|
9626
9828
|
</fo:block>
|
9627
9829
|
</xsl:when>
|
@@ -9678,6 +9880,7 @@
|
|
9678
9880
|
</fo:block>
|
9679
9881
|
|
9680
9882
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
9883
|
+
<xsl:call-template name="refine_example-body-style"/>
|
9681
9884
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9682
9885
|
<xsl:variable name="example_body">
|
9683
9886
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]">
|
@@ -9740,6 +9943,7 @@
|
|
9740
9943
|
<xsl:if test="*[not(self::mn:fmt-name)][position() > 1]">
|
9741
9944
|
<!-- display further elements in blocks -->
|
9742
9945
|
<fo:block-container xsl:use-attribute-sets="example-body-style" role="SKIP">
|
9946
|
+
<xsl:call-template name="refine_example-body-style"/>
|
9743
9947
|
<fo:block-container margin-left="0mm" margin-right="0mm" role="SKIP">
|
9744
9948
|
<xsl:apply-templates select="*[not(self::mn:fmt-name)][position() > 1]">
|
9745
9949
|
<xsl:with-param name="fo_element" select="'block'"/>
|
@@ -9896,6 +10100,12 @@
|
|
9896
10100
|
<xsl:call-template name="setBordersTableArray"/>
|
9897
10101
|
</xsl:template> <!-- refine_table-style -->
|
9898
10102
|
|
10103
|
+
<xsl:attribute-set name="table-number-style">
|
10104
|
+
</xsl:attribute-set>
|
10105
|
+
|
10106
|
+
<xsl:template name="refine_table-number-style">
|
10107
|
+
</xsl:template>
|
10108
|
+
|
9899
10109
|
<xsl:attribute-set name="table-name-style">
|
9900
10110
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
9901
10111
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
@@ -10078,6 +10288,9 @@
|
|
10078
10288
|
<!-- <xsl:attribute name="padding-right">5mm</xsl:attribute> -->
|
10079
10289
|
</xsl:attribute-set> <!-- table-fn-number-style -->
|
10080
10290
|
|
10291
|
+
<xsl:template name="refine_table-fn-number-style">
|
10292
|
+
</xsl:template>
|
10293
|
+
|
10081
10294
|
<xsl:attribute-set name="table-fmt-fn-label-style">
|
10082
10295
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
10083
10296
|
<xsl:attribute name="alignment-baseline">hanging</xsl:attribute>
|
@@ -10090,30 +10303,12 @@
|
|
10090
10303
|
</xsl:if>
|
10091
10304
|
</xsl:template>
|
10092
10305
|
|
10093
|
-
<xsl:attribute-set name="fn-container-body-style">
|
10094
|
-
<xsl:attribute name="text-indent">0</xsl:attribute>
|
10095
|
-
<xsl:attribute name="start-indent">0</xsl:attribute>
|
10096
|
-
</xsl:attribute-set>
|
10097
|
-
|
10098
10306
|
<xsl:attribute-set name="table-fn-body-style">
|
10099
10307
|
</xsl:attribute-set>
|
10100
10308
|
|
10101
|
-
<xsl:
|
10102
|
-
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
10103
|
-
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
10104
|
-
|
10105
|
-
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
10106
|
-
<xsl:attribute name="font-size">80%</xsl:attribute>
|
10107
|
-
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
10108
|
-
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
10109
|
-
|
10110
|
-
<xsl:template name="refine_figure-fmt-fn-label-style">
|
10309
|
+
<xsl:template name="refine_table-fn-body-style">
|
10111
10310
|
</xsl:template>
|
10112
10311
|
|
10113
|
-
<xsl:attribute-set name="figure-fn-body-style">
|
10114
|
-
<xsl:attribute name="text-align">justify</xsl:attribute>
|
10115
|
-
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
10116
|
-
</xsl:attribute-set>
|
10117
10312
|
<!-- ========================== -->
|
10118
10313
|
<!-- END Table styles -->
|
10119
10314
|
<!-- ========================== -->
|
@@ -10449,7 +10644,7 @@
|
|
10449
10644
|
|
10450
10645
|
</fo:block>
|
10451
10646
|
|
10452
|
-
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
10647
|
+
<!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'pas' or $namespace = 'iec' or $namespace = 'iso'"> -->
|
10453
10648
|
<xsl:if test="$continued = 'true'">
|
10454
10649
|
|
10455
10650
|
<!-- to prevent the error 'THead element may contain only TR elements' -->
|
@@ -11459,6 +11654,7 @@
|
|
11459
11654
|
</xsl:apply-templates>
|
11460
11655
|
|
11461
11656
|
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
11657
|
+
<xsl:call-template name="refine_table-fn-body-style"/>
|
11462
11658
|
<!-- <xsl:copy-of select="./node()"/> -->
|
11463
11659
|
<xsl:apply-templates/>
|
11464
11660
|
</fo:inline>
|
@@ -11477,6 +11673,7 @@
|
|
11477
11673
|
<xsl:param name="process">false</xsl:param>
|
11478
11674
|
<xsl:if test="$process = 'true'">
|
11479
11675
|
<fo:inline xsl:use-attribute-sets="table-fn-number-style" role="SKIP">
|
11676
|
+
<xsl:call-template name="refine_table-fn-number-style"/>
|
11480
11677
|
|
11481
11678
|
<!-- tab is padding-right -->
|
11482
11679
|
<xsl:apply-templates select=".//mn:tab">
|
@@ -12348,9 +12545,18 @@
|
|
12348
12545
|
<xsl:attribute-set name="dl-block-style">
|
12349
12546
|
</xsl:attribute-set>
|
12350
12547
|
|
12548
|
+
<xsl:template name="refine_dl-block-style">
|
12549
|
+
<xsl:if test="@key = 'true' and ancestor::mn:figure">
|
12550
|
+
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
12551
|
+
</xsl:if>
|
12552
|
+
</xsl:template>
|
12553
|
+
|
12351
12554
|
<xsl:attribute-set name="dt-row-style">
|
12352
12555
|
</xsl:attribute-set>
|
12353
12556
|
|
12557
|
+
<xsl:template name="refine_dt-row-style">
|
12558
|
+
</xsl:template>
|
12559
|
+
|
12354
12560
|
<xsl:attribute-set name="dt-cell-style">
|
12355
12561
|
</xsl:attribute-set>
|
12356
12562
|
|
@@ -12374,6 +12580,9 @@
|
|
12374
12580
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
12375
12581
|
</xsl:attribute-set> <!-- dl-name-style -->
|
12376
12582
|
|
12583
|
+
<xsl:template name="refine_dl-name-style">
|
12584
|
+
</xsl:template>
|
12585
|
+
|
12377
12586
|
<xsl:attribute-set name="dd-cell-style">
|
12378
12587
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
12379
12588
|
</xsl:attribute-set>
|
@@ -12412,9 +12621,7 @@
|
|
12412
12621
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
12413
12622
|
<fo:block-container xsl:use-attribute-sets="dl-block-style" role="SKIP">
|
12414
12623
|
|
12415
|
-
<xsl:
|
12416
|
-
<xsl:attribute name="keep-together.within-column">always</xsl:attribute>
|
12417
|
-
</xsl:if>
|
12624
|
+
<xsl:call-template name="refine_dl-block-style"/>
|
12418
12625
|
|
12419
12626
|
<xsl:call-template name="setBlockSpanAll"/>
|
12420
12627
|
<xsl:if test="not(ancestor::mn:quote)">
|
@@ -12720,6 +12927,8 @@
|
|
12720
12927
|
<xsl:if test="$process = 'true'">
|
12721
12928
|
<fo:block xsl:use-attribute-sets="dl-name-style">
|
12722
12929
|
|
12930
|
+
<xsl:call-template name="refine_dl-name-style"/>
|
12931
|
+
|
12723
12932
|
<xsl:apply-templates/>
|
12724
12933
|
</fo:block>
|
12725
12934
|
</xsl:if>
|
@@ -12908,6 +13117,8 @@
|
|
12908
13117
|
<xsl:param name="split_keep-within-line"/>
|
12909
13118
|
|
12910
13119
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
13120
|
+
<xsl:call-template name="refine_dt-row-style"/>
|
13121
|
+
|
12911
13122
|
<xsl:call-template name="insert_dt_cell">
|
12912
13123
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
12913
13124
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -13121,18 +13332,25 @@
|
|
13121
13332
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13122
13333
|
</xsl:attribute-set>
|
13123
13334
|
|
13335
|
+
<xsl:template name="refine_appendix-style">
|
13336
|
+
</xsl:template>
|
13337
|
+
|
13124
13338
|
<xsl:attribute-set name="appendix-example-style">
|
13125
13339
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
13126
13340
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
13127
13341
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
13128
13342
|
</xsl:attribute-set>
|
13129
13343
|
|
13344
|
+
<xsl:template name="refine_appendix-example-style">
|
13345
|
+
</xsl:template>
|
13346
|
+
|
13130
13347
|
<!-- ======================== -->
|
13131
13348
|
<!-- Appendix processing -->
|
13132
13349
|
<!-- ======================== -->
|
13133
13350
|
<xsl:template match="mn:appendix">
|
13134
13351
|
<xsl:call-template name="setNamedDestination"/>
|
13135
13352
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
13353
|
+
<xsl:call-template name="refine_appendix-style"/>
|
13136
13354
|
<xsl:apply-templates select="mn:fmt-title"/>
|
13137
13355
|
</fo:block>
|
13138
13356
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title)]"/>
|
@@ -13151,6 +13369,7 @@
|
|
13151
13369
|
<xsl:template match="mn:appendix//mn:example" priority="2">
|
13152
13370
|
<xsl:call-template name="setNamedDestination"/>
|
13153
13371
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-example-style">
|
13372
|
+
<xsl:call-template name="refine_appendix-example-style"/>
|
13154
13373
|
<xsl:apply-templates select="mn:fmt-name"/>
|
13155
13374
|
</fo:block>
|
13156
13375
|
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
@@ -13159,7 +13378,16 @@
|
|
13159
13378
|
<xsl:attribute-set name="xref-style">
|
13160
13379
|
<xsl:attribute name="color">blue</xsl:attribute>
|
13161
13380
|
<xsl:attribute name="text-decoration">underline</xsl:attribute>
|
13162
|
-
</xsl:attribute-set>
|
13381
|
+
</xsl:attribute-set> <!-- xref-style -->
|
13382
|
+
|
13383
|
+
<xsl:template name="refine_xref-style">
|
13384
|
+
<xsl:if test="string-length(normalize-space()) < 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[self::mn:table or self::mn:dl])">
|
13385
|
+
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
13386
|
+
</xsl:if>
|
13387
|
+
<xsl:if test="parent::mn:add">
|
13388
|
+
<xsl:call-template name="append_add-style"/>
|
13389
|
+
</xsl:if>
|
13390
|
+
</xsl:template> <!-- refine_xref-style -->
|
13163
13391
|
|
13164
13392
|
<xsl:template match="mn:fmt-xref">
|
13165
13393
|
<xsl:call-template name="insert_basic_link">
|
@@ -13168,12 +13396,8 @@
|
|
13168
13396
|
<xsl:call-template name="getAltText"/>
|
13169
13397
|
</xsl:variable>
|
13170
13398
|
<fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
|
13171
|
-
<xsl:
|
13172
|
-
|
13173
|
-
</xsl:if>
|
13174
|
-
<xsl:if test="parent::mn:add">
|
13175
|
-
<xsl:call-template name="append_add-style"/>
|
13176
|
-
</xsl:if>
|
13399
|
+
<xsl:call-template name="refine_xref-style"/>
|
13400
|
+
|
13177
13401
|
<xsl:apply-templates/>
|
13178
13402
|
</fo:basic-link>
|
13179
13403
|
</xsl:with-param>
|
@@ -13286,7 +13510,7 @@
|
|
13286
13510
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
13287
13511
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13288
13512
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
13289
|
-
</xsl:attribute-set>
|
13513
|
+
</xsl:attribute-set> <!-- note-style -->
|
13290
13514
|
|
13291
13515
|
<xsl:template name="refine_note-style">
|
13292
13516
|
<xsl:if test="$layoutVersion = '1951'">
|
@@ -13311,14 +13535,20 @@
|
|
13311
13535
|
<xsl:if test="$doctype = 'amendment' and parent::mn:quote">
|
13312
13536
|
<xsl:attribute name="font-size">inherit</xsl:attribute>
|
13313
13537
|
</xsl:if>
|
13314
|
-
|
13538
|
+
<xsl:if test="ancestor::mn:bibliography">
|
13539
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
13540
|
+
<xsl:if test="following-sibling::*[1][self::mn:bibitem or self::mn:note]">
|
13541
|
+
<xsl:attribute name="margin-bottom">2pt</xsl:attribute>
|
13542
|
+
</xsl:if>
|
13543
|
+
</xsl:if>
|
13544
|
+
</xsl:template> <!-- refine_note-style -->
|
13315
13545
|
|
13316
13546
|
<xsl:variable name="note-body-indent">10mm</xsl:variable>
|
13317
13547
|
<xsl:variable name="note-body-indent-table">5mm</xsl:variable>
|
13318
13548
|
|
13319
13549
|
<xsl:attribute-set name="note-name-style">
|
13320
13550
|
<xsl:attribute name="padding-right">6mm</xsl:attribute>
|
13321
|
-
</xsl:attribute-set>
|
13551
|
+
</xsl:attribute-set> <!-- note-name-style -->
|
13322
13552
|
|
13323
13553
|
<xsl:template name="refine_note-name-style">
|
13324
13554
|
<xsl:variable name="note_name" select="mn:fmt-name"/>
|
@@ -13351,14 +13581,20 @@
|
|
13351
13581
|
<xsl:attribute-set name="note-p-style">
|
13352
13582
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
13353
13583
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
13354
|
-
</xsl:attribute-set>
|
13584
|
+
</xsl:attribute-set> <!-- note-p-style -->
|
13585
|
+
|
13586
|
+
<xsl:template name="refine_note-p-style">
|
13587
|
+
<xsl:if test="ancestor::mn:bibliography">
|
13588
|
+
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
13589
|
+
</xsl:if>
|
13590
|
+
</xsl:template>
|
13355
13591
|
|
13356
13592
|
<xsl:attribute-set name="termnote-style">
|
13357
13593
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
13358
13594
|
<xsl:attribute name="margin-top">8pt</xsl:attribute>
|
13359
13595
|
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
13360
13596
|
<xsl:attribute name="text-align">justify</xsl:attribute>
|
13361
|
-
</xsl:attribute-set>
|
13597
|
+
</xsl:attribute-set> <!-- termnote-style -->
|
13362
13598
|
|
13363
13599
|
<xsl:template name="refine_termnote-style">
|
13364
13600
|
<xsl:if test="$layoutVersion = '1972' or $layoutVersion = '1979' or $layoutVersion = '1987' or $layoutVersion = '1989'">
|
@@ -13370,7 +13606,7 @@
|
|
13370
13606
|
</xsl:template> <!-- refine_termnote-style -->
|
13371
13607
|
|
13372
13608
|
<xsl:attribute-set name="termnote-name-style">
|
13373
|
-
</xsl:attribute-set>
|
13609
|
+
</xsl:attribute-set> <!-- termnote-name-style -->
|
13374
13610
|
|
13375
13611
|
<xsl:template name="refine_termnote-name-style">
|
13376
13612
|
</xsl:template>
|
@@ -13378,6 +13614,9 @@
|
|
13378
13614
|
<xsl:attribute-set name="termnote-p-style">
|
13379
13615
|
</xsl:attribute-set>
|
13380
13616
|
|
13617
|
+
<xsl:template name="refine_termnote-p-style">
|
13618
|
+
</xsl:template>
|
13619
|
+
|
13381
13620
|
<!-- ====== -->
|
13382
13621
|
<!-- note -->
|
13383
13622
|
<!-- termnote -->
|
@@ -13460,11 +13699,13 @@
|
|
13460
13699
|
<xsl:choose>
|
13461
13700
|
<xsl:when test="$num = 1"> <!-- display first NOTE's paragraph in the same line with label NOTE -->
|
13462
13701
|
<fo:inline xsl:use-attribute-sets="note-p-style" role="SKIP">
|
13702
|
+
<xsl:call-template name="refine_note-p-style"/>
|
13463
13703
|
<xsl:apply-templates/>
|
13464
13704
|
</fo:inline>
|
13465
13705
|
</xsl:when>
|
13466
13706
|
<xsl:otherwise>
|
13467
13707
|
<fo:block xsl:use-attribute-sets="note-p-style" role="SKIP">
|
13708
|
+
<xsl:call-template name="refine_note-p-style"/>
|
13468
13709
|
<xsl:apply-templates/>
|
13469
13710
|
</fo:block>
|
13470
13711
|
</xsl:otherwise>
|
@@ -13559,11 +13800,13 @@
|
|
13559
13800
|
<xsl:choose>
|
13560
13801
|
<xsl:when test="$num = 1"> <!-- first paragraph renders in the same line as titlenote name -->
|
13561
13802
|
<fo:inline xsl:use-attribute-sets="termnote-p-style">
|
13803
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
13562
13804
|
<xsl:apply-templates/>
|
13563
13805
|
</fo:inline>
|
13564
13806
|
</xsl:when>
|
13565
13807
|
<xsl:otherwise>
|
13566
13808
|
<fo:block xsl:use-attribute-sets="termnote-p-style">
|
13809
|
+
<xsl:call-template name="refine_termnote-p-style"/>
|
13567
13810
|
<xsl:apply-templates/>
|
13568
13811
|
</fo:block>
|
13569
13812
|
</xsl:otherwise>
|
@@ -13577,7 +13820,7 @@
|
|
13577
13820
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
13578
13821
|
<xsl:attribute name="margin-right">12mm</xsl:attribute>
|
13579
13822
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
13580
|
-
</xsl:attribute-set>
|
13823
|
+
</xsl:attribute-set> <!-- quote-style -->
|
13581
13824
|
|
13582
13825
|
<xsl:template name="refine_quote-style">
|
13583
13826
|
<xsl:if test="$doctype = 'amendment' and (mn:note or mn:termnote)">
|
@@ -13590,6 +13833,9 @@
|
|
13590
13833
|
<xsl:attribute name="text-align">right</xsl:attribute>
|
13591
13834
|
</xsl:attribute-set>
|
13592
13835
|
|
13836
|
+
<xsl:template name="refine_quote-source-style">
|
13837
|
+
</xsl:template>
|
13838
|
+
|
13593
13839
|
<!-- ====== -->
|
13594
13840
|
<!-- quote -->
|
13595
13841
|
<!-- source -->
|
@@ -13618,6 +13864,7 @@
|
|
13618
13864
|
</fo:block-container>
|
13619
13865
|
<xsl:if test="mn:author or mn:fmt-source or mn:attribution">
|
13620
13866
|
<fo:block xsl:use-attribute-sets="quote-source-style">
|
13867
|
+
<xsl:call-template name="refine_quote-source-style"/>
|
13621
13868
|
<!-- — ISO, ISO 7301:2011, Clause 1 -->
|
13622
13869
|
<xsl:apply-templates select="mn:author"/>
|
13623
13870
|
<xsl:apply-templates select="mn:fmt-source"/>
|
@@ -13690,6 +13937,15 @@
|
|
13690
13937
|
<xsl:attribute-set name="figure-style">
|
13691
13938
|
</xsl:attribute-set>
|
13692
13939
|
|
13940
|
+
<xsl:template name="refine_figure-style">
|
13941
|
+
</xsl:template>
|
13942
|
+
|
13943
|
+
<xsl:attribute-set name="figure-number-style">
|
13944
|
+
</xsl:attribute-set>
|
13945
|
+
|
13946
|
+
<xsl:template name="refine_figure-number-style">
|
13947
|
+
</xsl:template>
|
13948
|
+
|
13693
13949
|
<xsl:attribute-set name="figure-name-style">
|
13694
13950
|
<xsl:attribute name="role">Caption</xsl:attribute>
|
13695
13951
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
@@ -13697,7 +13953,7 @@
|
|
13697
13953
|
<xsl:attribute name="margin-top">12pt</xsl:attribute>
|
13698
13954
|
<xsl:attribute name="space-after">12pt</xsl:attribute>
|
13699
13955
|
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
|
13700
|
-
</xsl:attribute-set>
|
13956
|
+
</xsl:attribute-set> <!-- figure-name-style -->
|
13701
13957
|
|
13702
13958
|
<xsl:template name="refine_figure-name-style">
|
13703
13959
|
</xsl:template> <!-- refine_figure-name-style -->
|
@@ -13705,7 +13961,7 @@
|
|
13705
13961
|
<xsl:attribute-set name="image-style">
|
13706
13962
|
<xsl:attribute name="role">SKIP</xsl:attribute>
|
13707
13963
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
13708
|
-
</xsl:attribute-set>
|
13964
|
+
</xsl:attribute-set> <!-- image-style -->
|
13709
13965
|
|
13710
13966
|
<xsl:template name="refine_image-style">
|
13711
13967
|
</xsl:template>
|
@@ -13715,14 +13971,51 @@
|
|
13715
13971
|
<xsl:attribute name="content-height">100%</xsl:attribute>
|
13716
13972
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
13717
13973
|
<xsl:attribute name="content-height">scale-to-fit</xsl:attribute>
|
13718
|
-
</xsl:attribute-set>
|
13974
|
+
</xsl:attribute-set> <!-- image-graphic-style -->
|
13975
|
+
|
13976
|
+
<xsl:template name="refine_image-graphic-style">
|
13977
|
+
</xsl:template>
|
13719
13978
|
|
13720
13979
|
<xsl:attribute-set name="figure-source-style">
|
13721
13980
|
</xsl:attribute-set>
|
13722
13981
|
|
13982
|
+
<xsl:template name="refine_figure-source-style">
|
13983
|
+
</xsl:template>
|
13984
|
+
|
13723
13985
|
<xsl:attribute-set name="figure-pseudocode-p-style">
|
13724
13986
|
</xsl:attribute-set>
|
13725
13987
|
|
13988
|
+
<xsl:template name="refine_figure-pseudocode-p-style">
|
13989
|
+
</xsl:template>
|
13990
|
+
|
13991
|
+
<xsl:attribute-set name="figure-fn-number-style">
|
13992
|
+
<xsl:attribute name="padding-right">5mm</xsl:attribute>
|
13993
|
+
</xsl:attribute-set> <!-- figure-fn-number-style -->
|
13994
|
+
|
13995
|
+
<xsl:template name="refine_figure-fn-number-style">
|
13996
|
+
</xsl:template>
|
13997
|
+
|
13998
|
+
<xsl:attribute-set name="figure-fmt-fn-label-style">
|
13999
|
+
<xsl:attribute name="font-size">80%</xsl:attribute>
|
14000
|
+
<xsl:attribute name="vertical-align">super</xsl:attribute>
|
14001
|
+
</xsl:attribute-set> <!-- figure-fmt-fn-label-style -->
|
14002
|
+
|
14003
|
+
<xsl:template name="refine_figure-fmt-fn-label-style">
|
14004
|
+
</xsl:template>
|
14005
|
+
|
14006
|
+
<xsl:attribute-set name="figure-fn-body-style">
|
14007
|
+
<xsl:attribute name="text-align">justify</xsl:attribute>
|
14008
|
+
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
14009
|
+
</xsl:attribute-set>
|
14010
|
+
|
14011
|
+
<xsl:template name="refine_figure-fn-body-style">
|
14012
|
+
<xsl:variable name="key_iso">true
|
14013
|
+
</xsl:variable>
|
14014
|
+
<xsl:if test="normalize-space($key_iso) = 'true'">
|
14015
|
+
<xsl:attribute name="margin-bottom">0</xsl:attribute>
|
14016
|
+
</xsl:if>
|
14017
|
+
</xsl:template>
|
14018
|
+
|
13726
14019
|
<!-- ============================ -->
|
13727
14020
|
<!-- figure's footnotes rendering -->
|
13728
14021
|
<!-- ============================ -->
|
@@ -13835,9 +14128,8 @@
|
|
13835
14128
|
</fo:table-cell>
|
13836
14129
|
<fo:table-cell>
|
13837
14130
|
<fo:block xsl:use-attribute-sets="figure-fn-body-style">
|
13838
|
-
<xsl:
|
13839
|
-
|
13840
|
-
</xsl:if>
|
14131
|
+
<xsl:call-template name="refine_figure-fn-body-style"/>
|
14132
|
+
|
13841
14133
|
<!-- <xsl:copy-of select="./node()"/> -->
|
13842
14134
|
<xsl:apply-templates/>
|
13843
14135
|
</fo:block>
|
@@ -13855,6 +14147,7 @@
|
|
13855
14147
|
<xsl:param name="process">false</xsl:param>
|
13856
14148
|
<xsl:if test="$process = 'true'">
|
13857
14149
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style" role="SKIP">
|
14150
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
13858
14151
|
<xsl:attribute name="padding-right">0mm</xsl:attribute>
|
13859
14152
|
|
13860
14153
|
<!-- tab is padding-right -->
|
@@ -13892,6 +14185,7 @@
|
|
13892
14185
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
13893
14186
|
</xsl:if>
|
13894
14187
|
<fo:inline xsl:use-attribute-sets="figure-fn-number-style figure-fmt-fn-label-style"> <!-- id="{@id}" -->
|
14188
|
+
<xsl:call-template name="refine_figure-fn-number-style"/>
|
13895
14189
|
<!-- <xsl:value-of select="@reference"/> -->
|
13896
14190
|
<xsl:apply-templates/>
|
13897
14191
|
</fo:inline>
|
@@ -13939,6 +14233,8 @@
|
|
13939
14233
|
|
13940
14234
|
<fo:block xsl:use-attribute-sets="figure-style" role="SKIP">
|
13941
14235
|
|
14236
|
+
<xsl:call-template name="refine_figure-style"/>
|
14237
|
+
|
13942
14238
|
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
13943
14239
|
<xsl:call-template name="setIDforNamedDestination"/>
|
13944
14240
|
</xsl:for-each>
|
@@ -13982,6 +14278,7 @@
|
|
13982
14278
|
|
13983
14279
|
<xsl:template match="mn:figure[@class = 'pseudocode']//mn:p">
|
13984
14280
|
<fo:block xsl:use-attribute-sets="figure-pseudocode-p-style">
|
14281
|
+
<xsl:call-template name="refine_figure-pseudocode-p-style"/>
|
13985
14282
|
<xsl:apply-templates/>
|
13986
14283
|
</fo:block>
|
13987
14284
|
</xsl:template>
|
@@ -14111,6 +14408,8 @@
|
|
14111
14408
|
</xsl:variable>
|
14112
14409
|
<xsl:copy-of select="xalan:nodeset($image-graphic-style_attributes)/attributes/@*"/>
|
14113
14410
|
|
14411
|
+
<xsl:call-template name="refine_image-graphic-style"/>
|
14412
|
+
|
14114
14413
|
<xsl:if test="not(@mimetype = 'image/svg+xml') and not(ancestor::mn:table)">
|
14115
14414
|
<xsl:variable name="scale">
|
14116
14415
|
<xsl:call-template name="getImageScale">
|
@@ -14810,6 +15109,9 @@
|
|
14810
15109
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
14811
15110
|
</xsl:attribute-set> <!-- formula-style -->
|
14812
15111
|
|
15112
|
+
<xsl:template name="refine_formula-style">
|
15113
|
+
</xsl:template>
|
15114
|
+
|
14813
15115
|
<xsl:attribute-set name="formula-stem-block-style">
|
14814
15116
|
<xsl:attribute name="text-align">center</xsl:attribute>
|
14815
15117
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
@@ -14881,6 +15183,8 @@
|
|
14881
15183
|
<xsl:template match="mn:formula[mn:fmt-name]/mn:fmt-stem">
|
14882
15184
|
<fo:block xsl:use-attribute-sets="formula-style">
|
14883
15185
|
|
15186
|
+
<xsl:call-template name="refine_formula-style"/>
|
15187
|
+
|
14884
15188
|
<fo:table table-layout="fixed" width="100%">
|
14885
15189
|
<fo:table-column column-width="95%"/>
|
14886
15190
|
<fo:table-column column-width="5%"/>
|
@@ -15311,6 +15615,9 @@
|
|
15311
15615
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
15312
15616
|
</xsl:attribute-set> <!-- list-name-style -->
|
15313
15617
|
|
15618
|
+
<xsl:template name="refine_list-name-style">
|
15619
|
+
</xsl:template>
|
15620
|
+
|
15314
15621
|
<xsl:attribute-set name="list-item-style">
|
15315
15622
|
</xsl:attribute-set>
|
15316
15623
|
|
@@ -15651,6 +15958,7 @@
|
|
15651
15958
|
<xsl:param name="process">false</xsl:param>
|
15652
15959
|
<xsl:if test="$process = 'true'">
|
15653
15960
|
<fo:block xsl:use-attribute-sets="list-name-style">
|
15961
|
+
<xsl:call-template name="refine_list-name-style"/>
|
15654
15962
|
<xsl:apply-templates/>
|
15655
15963
|
</fo:block>
|
15656
15964
|
</xsl:if>
|
@@ -15711,29 +16019,50 @@
|
|
15711
16019
|
<!-- END Lists processing -->
|
15712
16020
|
<!-- ===================================== -->
|
15713
16021
|
|
16022
|
+
<xsl:attribute-set name="footnote-separator-leader-style">
|
16023
|
+
</xsl:attribute-set>
|
16024
|
+
|
16025
|
+
<xsl:template name="refine_footnote-separator-leader-style">
|
16026
|
+
</xsl:template>
|
16027
|
+
|
16028
|
+
<xsl:attribute-set name="fn-container-body-style">
|
16029
|
+
<xsl:attribute name="text-indent">0</xsl:attribute>
|
16030
|
+
<xsl:attribute name="start-indent">0</xsl:attribute>
|
16031
|
+
</xsl:attribute-set>
|
16032
|
+
|
16033
|
+
<xsl:template name="refine_fn-container-body-style">
|
16034
|
+
</xsl:template>
|
16035
|
+
|
15714
16036
|
<xsl:attribute-set name="fn-reference-style">
|
15715
16037
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
15716
16038
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15717
|
-
|
15718
|
-
</xsl:attribute-set>
|
16039
|
+
</xsl:attribute-set> <!-- fn-reference-style -->
|
15719
16040
|
|
15720
16041
|
<xsl:template name="refine_fn-reference-style">
|
15721
16042
|
<xsl:if test="ancestor::*[local-name()='table']">
|
15722
16043
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
15723
16044
|
<xsl:attribute name="baseline-shift">15%</xsl:attribute>
|
15724
16045
|
</xsl:if>
|
16046
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
16047
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
15725
16048
|
</xsl:template> <!-- refine_fn-reference-style -->
|
15726
16049
|
|
15727
16050
|
<xsl:attribute-set name="fn-style">
|
15728
16051
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15729
16052
|
</xsl:attribute-set>
|
15730
16053
|
|
16054
|
+
<xsl:template name="refine_fn-style">
|
16055
|
+
</xsl:template>
|
16056
|
+
|
15731
16057
|
<xsl:attribute-set name="fn-num-style">
|
15732
16058
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
15733
16059
|
<xsl:attribute name="font-size">80%</xsl:attribute>
|
15734
16060
|
<!--<xsl:attribute name="vertical-align">super</xsl:attribute> -->
|
15735
16061
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
15736
|
-
</xsl:attribute-set>
|
16062
|
+
</xsl:attribute-set> <!-- fn-num-style -->
|
16063
|
+
|
16064
|
+
<xsl:template name="refine_fn-num-style">
|
16065
|
+
</xsl:template>
|
15737
16066
|
|
15738
16067
|
<xsl:attribute-set name="fn-body-style">
|
15739
16068
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -15742,7 +16071,7 @@
|
|
15742
16071
|
<xsl:attribute name="start-indent">0</xsl:attribute>
|
15743
16072
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
15744
16073
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
15745
|
-
</xsl:attribute-set>
|
16074
|
+
</xsl:attribute-set> <!-- fn-body-style" -->
|
15746
16075
|
|
15747
16076
|
<xsl:template name="refine_fn-body-style">
|
15748
16077
|
<xsl:if test="$layoutVersion = '1951'">
|
@@ -15826,10 +16155,12 @@
|
|
15826
16155
|
<xsl:choose>
|
15827
16156
|
<xsl:when test="ancestor::mn:bibitem">
|
15828
16157
|
<fn_styles xsl:use-attribute-sets="bibitem-note-fn-style">
|
16158
|
+
<xsl:call-template name="refine_bibitem-note-fn-style"/>
|
15829
16159
|
</fn_styles>
|
15830
16160
|
</xsl:when>
|
15831
16161
|
<xsl:otherwise>
|
15832
16162
|
<fn_styles xsl:use-attribute-sets="fn-num-style">
|
16163
|
+
<xsl:call-template name="refine_fn-num-style"/>
|
15833
16164
|
</fn_styles>
|
15834
16165
|
</xsl:otherwise>
|
15835
16166
|
</xsl:choose>
|
@@ -15839,13 +16170,16 @@
|
|
15839
16170
|
<xsl:copy-of select="."/>
|
15840
16171
|
</xsl:for-each>
|
15841
16172
|
|
15842
|
-
|
16173
|
+
<!-- https://github.com/metanorma/metanorma-ieee/issues/595 -->
|
16174
|
+
<!-- <xsl:if test="following-sibling::node()[normalize-space() != ''][1][self::mn:fn]">
|
15843
16175
|
<xsl:attribute name="padding-right">0.5mm</xsl:attribute>
|
15844
|
-
</xsl:if>
|
16176
|
+
</xsl:if> -->
|
15845
16177
|
<xsl:if test="$layoutVersion = '2024'">
|
15846
16178
|
<xsl:attribute name="font-size">70%</xsl:attribute>
|
15847
16179
|
</xsl:if>
|
15848
16180
|
|
16181
|
+
<xsl:if test="preceding-sibling::node()[normalize-space() != ''][1][self::mn:fn]">,</xsl:if>
|
16182
|
+
|
15849
16183
|
<xsl:call-template name="insert_basic_link">
|
15850
16184
|
<xsl:with-param name="element">
|
15851
16185
|
<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 -->
|
@@ -15867,10 +16201,12 @@
|
|
15867
16201
|
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
15868
16202
|
|
15869
16203
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
16204
|
+
<xsl:call-template name="refine_fn-style"/>
|
15870
16205
|
<xsl:copy-of select="$footnote_inline"/>
|
15871
16206
|
<fo:footnote-body role="Note">
|
15872
16207
|
|
15873
16208
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
16209
|
+
<xsl:call-template name="refine_fn-container-body-style"/>
|
15874
16210
|
|
15875
16211
|
<xsl:variable name="fn_block">
|
15876
16212
|
<xsl:call-template name="refine_fn-body-style"/>
|
@@ -15969,17 +16305,30 @@
|
|
15969
16305
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
15970
16306
|
</xsl:attribute-set> <!-- admonition-style -->
|
15971
16307
|
|
16308
|
+
<xsl:template name="refine_admonition-style">
|
16309
|
+
</xsl:template>
|
16310
|
+
|
15972
16311
|
<xsl:attribute-set name="admonition-container-style">
|
15973
16312
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
15974
16313
|
<xsl:attribute name="margin-right">0mm</xsl:attribute>
|
15975
16314
|
</xsl:attribute-set> <!-- admonition-container-style -->
|
15976
16315
|
|
16316
|
+
<xsl:template name="refine_admonition-container-style">
|
16317
|
+
</xsl:template>
|
16318
|
+
|
15977
16319
|
<xsl:attribute-set name="admonition-name-style">
|
15978
16320
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
15979
16321
|
</xsl:attribute-set> <!-- admonition-name-style -->
|
15980
16322
|
|
16323
|
+
<xsl:template name="refine_admonition-name-style">
|
16324
|
+
</xsl:template>
|
16325
|
+
|
15981
16326
|
<xsl:attribute-set name="admonition-p-style">
|
15982
16327
|
</xsl:attribute-set> <!-- admonition-p-style -->
|
16328
|
+
|
16329
|
+
<xsl:template name="refine_admonition-p-style">
|
16330
|
+
</xsl:template>
|
16331
|
+
|
15983
16332
|
<!-- end admonition -->
|
15984
16333
|
|
15985
16334
|
<!-- ================ -->
|
@@ -15988,6 +16337,8 @@
|
|
15988
16337
|
<xsl:template match="mn:admonition">
|
15989
16338
|
<fo:block xsl:use-attribute-sets="admonition-style">
|
15990
16339
|
|
16340
|
+
<xsl:call-template name="refine_admonition-style"/>
|
16341
|
+
|
15991
16342
|
<xsl:call-template name="setBlockSpanAll"/>
|
15992
16343
|
|
15993
16344
|
<xsl:if test="@type = 'editorial'">
|
@@ -16064,11 +16415,24 @@
|
|
16064
16415
|
<!-- END Admonition -->
|
16065
16416
|
<!-- ================ -->
|
16066
16417
|
|
16418
|
+
<xsl:attribute-set name="references-non-normative-title-style">
|
16419
|
+
</xsl:attribute-set>
|
16420
|
+
|
16421
|
+
<xsl:template name="refine_references-non-normative-title-style">
|
16422
|
+
|
16423
|
+
</xsl:template>
|
16424
|
+
|
16067
16425
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
16068
16426
|
<xsl:attribute-set name="bibitem-normative-style">
|
16069
16427
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
16070
16428
|
</xsl:attribute-set> <!-- bibitem-normative-style -->
|
16071
16429
|
|
16430
|
+
<xsl:template name="refine_bibitem-normative-style">
|
16431
|
+
<xsl:if test="$layoutVersion = '2024'">
|
16432
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
16433
|
+
</xsl:if>
|
16434
|
+
</xsl:template>
|
16435
|
+
|
16072
16436
|
<!-- bibitem in Normative References (references/@normative="true"), renders as list -->
|
16073
16437
|
<xsl:attribute-set name="bibitem-normative-list-style">
|
16074
16438
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -16076,9 +16440,15 @@
|
|
16076
16440
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
16077
16441
|
</xsl:attribute-set> <!-- bibitem-normative-list-style -->
|
16078
16442
|
|
16443
|
+
<xsl:template name="refine_bibitem-normative-list-style">
|
16444
|
+
</xsl:template>
|
16445
|
+
|
16079
16446
|
<xsl:attribute-set name="bibitem-non-normative-style">
|
16080
16447
|
</xsl:attribute-set> <!-- bibitem-non-normative-style -->
|
16081
16448
|
|
16449
|
+
<xsl:template name="refine_bibitem-non-normative-style">
|
16450
|
+
</xsl:template>
|
16451
|
+
|
16082
16452
|
<!-- bibitem in bibliography section (references/@normative="false"), renders as list -->
|
16083
16453
|
<xsl:attribute-set name="bibitem-non-normative-list-style">
|
16084
16454
|
<xsl:attribute name="provisional-distance-between-starts">12mm</xsl:attribute>
|
@@ -16086,18 +16456,33 @@
|
|
16086
16456
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
16087
16457
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-style -->
|
16088
16458
|
|
16459
|
+
<xsl:template name="refine_bibitem-non-normative-list-style">
|
16460
|
+
</xsl:template>
|
16461
|
+
|
16089
16462
|
<xsl:attribute-set name="bibitem-non-normative-list-item-style">
|
16090
16463
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
16091
16464
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
16092
16465
|
</xsl:attribute-set>
|
16093
16466
|
|
16467
|
+
<xsl:template name="refine_bibitem-non-normative-list-item-style">
|
16468
|
+
<xsl:if test="$layoutVersion = '2024'">
|
16469
|
+
<xsl:attribute name="margin-bottom">8pt</xsl:attribute>
|
16470
|
+
</xsl:if>
|
16471
|
+
</xsl:template>
|
16472
|
+
|
16094
16473
|
<!-- bibitem in bibliography section (references/@normative="false"), list body -->
|
16095
16474
|
<xsl:attribute-set name="bibitem-normative-list-body-style">
|
16096
16475
|
</xsl:attribute-set>
|
16097
16476
|
|
16477
|
+
<xsl:template name="refine_bibitem-normative-list-body-style">
|
16478
|
+
</xsl:template>
|
16479
|
+
|
16098
16480
|
<xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
16099
16481
|
</xsl:attribute-set> <!-- bibitem-non-normative-list-body-style -->
|
16100
16482
|
|
16483
|
+
<xsl:template name="refine_bibitem-non-normative-list-body-style">
|
16484
|
+
</xsl:template>
|
16485
|
+
|
16101
16486
|
<!-- footnote reference number for bibitem, in the text -->
|
16102
16487
|
<xsl:attribute-set name="bibitem-note-fn-style">
|
16103
16488
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
@@ -16106,6 +16491,9 @@
|
|
16106
16491
|
<xsl:attribute name="baseline-shift">30%</xsl:attribute>
|
16107
16492
|
</xsl:attribute-set> <!-- bibitem-note-fn-style -->
|
16108
16493
|
|
16494
|
+
<xsl:template name="refine_bibitem-note-fn-style">
|
16495
|
+
</xsl:template>
|
16496
|
+
|
16109
16497
|
<!-- footnote number on the page bottom -->
|
16110
16498
|
<xsl:attribute-set name="bibitem-note-fn-number-style">
|
16111
16499
|
<xsl:attribute name="keep-with-next.within-line">always</xsl:attribute>
|
@@ -16124,6 +16512,9 @@
|
|
16124
16512
|
<xsl:attribute-set name="references-non-normative-style">
|
16125
16513
|
</xsl:attribute-set> <!-- references-non-normative-style -->
|
16126
16514
|
|
16515
|
+
<xsl:template name="refine_references-non-normative-style">
|
16516
|
+
</xsl:template>
|
16517
|
+
|
16127
16518
|
<!-- ======================= -->
|
16128
16519
|
<!-- Bibliography rendering -->
|
16129
16520
|
<!-- ======================= -->
|
@@ -16170,6 +16561,7 @@
|
|
16170
16561
|
<xsl:apply-templates select="mn:fmt-title[@columns = 1]"/>
|
16171
16562
|
|
16172
16563
|
<fo:block xsl:use-attribute-sets="references-non-normative-style">
|
16564
|
+
<xsl:call-template name="refine_references-non-normative-style"/>
|
16173
16565
|
<xsl:apply-templates select="node()[not(self::mn:fmt-title and @columns = 1)]"/>
|
16174
16566
|
</fo:block>
|
16175
16567
|
</xsl:template> <!-- references -->
|
@@ -16183,9 +16575,8 @@
|
|
16183
16575
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
16184
16576
|
<xsl:call-template name="setNamedDestination"/>
|
16185
16577
|
<fo:block id="{@id}" xsl:use-attribute-sets="bibitem-normative-style">
|
16186
|
-
|
16187
|
-
|
16188
|
-
</xsl:if>
|
16578
|
+
<xsl:call-template name="refine_bibitem-normative-style"/>
|
16579
|
+
|
16189
16580
|
<xsl:call-template name="processBibitem"/>
|
16190
16581
|
</fo:block>
|
16191
16582
|
|
@@ -16197,13 +16588,14 @@
|
|
16197
16588
|
</xsl:variable>
|
16198
16589
|
<xsl:if test="normalize-space($list_items) != ''">
|
16199
16590
|
<fo:list-block xsl:use-attribute-sets="bibitem-non-normative-list-style">
|
16591
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-style"/>
|
16200
16592
|
<xsl:copy-of select="$list_items"/>
|
16201
16593
|
</fo:list-block>
|
16202
16594
|
</xsl:if>
|
16203
16595
|
</xsl:template>
|
16204
16596
|
|
16205
16597
|
<!-- Bibliography (non-normative references) -->
|
16206
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem
|
16598
|
+
<xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
|
16207
16599
|
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[not(self::mn:note)][1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
16208
16600
|
<xsl:choose>
|
16209
16601
|
<xsl:when test="$skip = 'true'"><!-- skip bibitem --></xsl:when>
|
@@ -16214,15 +16606,17 @@
|
|
16214
16606
|
|
16215
16607
|
</xsl:template> <!-- references[not(@normative='true')]/bibitem -->
|
16216
16608
|
|
16609
|
+
<!-- bibitem's notes will be processing in 'processBibitemFollowingNotes' -->
|
16610
|
+
<xsl:template match="mn:references/mn:note" priority="2"/> <!-- [not(@normative='true')] -->
|
16611
|
+
|
16217
16612
|
<xsl:template name="insertListItem_Bibitem">
|
16218
16613
|
<xsl:choose>
|
16219
16614
|
<xsl:when test="@hidden = 'true'"><!-- skip --></xsl:when>
|
16220
16615
|
<xsl:otherwise>
|
16221
16616
|
<xsl:call-template name="setNamedDestination"/>
|
16222
16617
|
<fo:list-item id="{@id}" xsl:use-attribute-sets="bibitem-non-normative-list-item-style">
|
16223
|
-
<xsl:
|
16224
|
-
|
16225
|
-
</xsl:if>
|
16618
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-item-style"/>
|
16619
|
+
|
16226
16620
|
<fo:list-item-label end-indent="label-end()">
|
16227
16621
|
<fo:block role="SKIP">
|
16228
16622
|
<fo:inline role="SKIP">
|
@@ -16233,16 +16627,18 @@
|
|
16233
16627
|
</fo:block>
|
16234
16628
|
</fo:list-item-label>
|
16235
16629
|
<fo:list-item-body start-indent="body-start()">
|
16236
|
-
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style" role="SKIP"
|
16630
|
+
<fo:block xsl:use-attribute-sets="bibitem-non-normative-list-body-style"> <!-- role="SKIP" -->
|
16631
|
+
<xsl:call-template name="refine_bibitem-non-normative-list-body-style"/>
|
16237
16632
|
<xsl:call-template name="processBibitem">
|
16238
16633
|
<xsl:with-param name="biblio_tag_part">last</xsl:with-param>
|
16239
16634
|
</xsl:call-template>
|
16240
16635
|
</fo:block>
|
16636
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
16241
16637
|
</fo:list-item-body>
|
16242
16638
|
</fo:list-item>
|
16243
16639
|
</xsl:otherwise>
|
16244
16640
|
</xsl:choose>
|
16245
|
-
<xsl:apply-templates select="following-sibling::*[
|
16641
|
+
<xsl:apply-templates select="following-sibling::*[self::mn:bibitem][1]">
|
16246
16642
|
<xsl:with-param name="skip">false</xsl:with-param>
|
16247
16643
|
</xsl:apply-templates>
|
16248
16644
|
</xsl:template>
|
@@ -16258,25 +16654,19 @@
|
|
16258
16654
|
<xsl:with-param name="biblio_tag_part" select="$biblio_tag_part"/>
|
16259
16655
|
</xsl:apply-templates>
|
16260
16656
|
<xsl:apply-templates select="mn:formattedref"/>
|
16261
|
-
|
16657
|
+
<xsl:if test="ancestor::mn:references[@normative = 'true']">
|
16658
|
+
<xsl:call-template name="processBibitemFollowingNotes"/>
|
16659
|
+
</xsl:if>
|
16262
16660
|
|
16263
|
-
|
16661
|
+
<!-- end bibitem processing -->
|
16264
16662
|
</xsl:template> <!-- processBibitem (bibitem) -->
|
16265
16663
|
|
16266
|
-
<xsl:template name="
|
16267
|
-
|
16268
|
-
|
16269
|
-
|
16270
|
-
<xsl:copy> <!-- skip @id -->
|
16271
|
-
<xsl:copy-of select="node()"/>
|
16272
|
-
</xsl:copy>
|
16273
|
-
</xsl:element>
|
16274
|
-
</xsl:variable>
|
16275
|
-
<!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
|
16276
|
-
<xsl:call-template name="note"/>
|
16277
|
-
</xsl:for-each> -->
|
16664
|
+
<xsl:template name="processBibitemFollowingNotes">
|
16665
|
+
<!-- current context is bibitem element -->
|
16666
|
+
<xsl:variable name="bibitem_id" select="@id"/>
|
16667
|
+
<xsl:for-each select="following-sibling::mn:note[preceding-sibling::mn:bibitem[1][@id = $bibitem_id] and preceding-sibling::*[1][self::mn:note or self::mn:bibitem]]">
|
16278
16668
|
<xsl:call-template name="note"/>
|
16279
|
-
</xsl:
|
16669
|
+
</xsl:for-each>
|
16280
16670
|
</xsl:template>
|
16281
16671
|
|
16282
16672
|
<xsl:template match="mn:title" mode="title">
|
@@ -16479,14 +16869,20 @@
|
|
16479
16869
|
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
16480
16870
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
16481
16871
|
<xsl:attribute name="margin-bottom">84pt</xsl:attribute>
|
16482
|
-
</xsl:attribute-set>
|
16872
|
+
</xsl:attribute-set> <!-- indexsect-title-style -->
|
16873
|
+
|
16874
|
+
<xsl:template name="refine_indexsect-title-style">
|
16875
|
+
</xsl:template>
|
16483
16876
|
|
16484
16877
|
<xsl:attribute-set name="indexsect-clause-title-style">
|
16485
16878
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
16486
16879
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
16487
16880
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
16488
16881
|
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
16489
|
-
</xsl:attribute-set>
|
16882
|
+
</xsl:attribute-set> <!-- indexsect-clause-title-style -->
|
16883
|
+
|
16884
|
+
<xsl:template name="refine_indexsect-clause-title-style">
|
16885
|
+
</xsl:template>
|
16490
16886
|
<!-- End Index section styles -->
|
16491
16887
|
|
16492
16888
|
<!-- =================== -->
|
@@ -16680,6 +17076,7 @@
|
|
16680
17076
|
|
16681
17077
|
<xsl:template match="mn:indexsect/mn:fmt-title | mn:indexsect/mn:title" priority="4">
|
16682
17078
|
<fo:block xsl:use-attribute-sets="indexsect-title-style">
|
17079
|
+
<xsl:call-template name="refine_indexsect-title-style"/>
|
16683
17080
|
<!-- Index -->
|
16684
17081
|
<xsl:apply-templates/>
|
16685
17082
|
</fo:block>
|
@@ -16688,6 +17085,7 @@
|
|
16688
17085
|
<xsl:template match="mn:indexsect/mn:clause/mn:fmt-title | mn:indexsect/mn:clause/mn:title" priority="4">
|
16689
17086
|
<!-- Letter A, B, C, ... -->
|
16690
17087
|
<fo:block xsl:use-attribute-sets="indexsect-clause-title-style">
|
17088
|
+
<xsl:call-template name="refine_indexsect-clause-title-style"/>
|
16691
17089
|
<xsl:apply-templates/>
|
16692
17090
|
</fo:block>
|
16693
17091
|
</xsl:template>
|
@@ -16915,9 +17313,15 @@
|
|
16915
17313
|
<xsl:attribute name="leader-pattern">dots</xsl:attribute>
|
16916
17314
|
</xsl:attribute-set> <!-- END: toc-leader-style -->
|
16917
17315
|
|
17316
|
+
<xsl:template name="refine_toc-leader-style">
|
17317
|
+
</xsl:template>
|
17318
|
+
|
16918
17319
|
<xsl:attribute-set name="toc-pagenumber-style">
|
16919
17320
|
</xsl:attribute-set>
|
16920
17321
|
|
17322
|
+
<xsl:template name="refine_toc-pagenumber-style">
|
17323
|
+
</xsl:template>
|
17324
|
+
|
16921
17325
|
<!-- List of Figures, Tables -->
|
16922
17326
|
<xsl:attribute-set name="toc-listof-title-style">
|
16923
17327
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
@@ -16931,6 +17335,9 @@
|
|
16931
17335
|
<xsl:attribute-set name="toc-listof-item-block-style">
|
16932
17336
|
</xsl:attribute-set>
|
16933
17337
|
|
17338
|
+
<xsl:template name="refine_toc-listof-item-block-style">
|
17339
|
+
</xsl:template>
|
17340
|
+
|
16934
17341
|
<xsl:attribute-set name="toc-listof-item-style">
|
16935
17342
|
<xsl:attribute name="role">TOCI</xsl:attribute>
|
16936
17343
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
@@ -16938,6 +17345,9 @@
|
|
16938
17345
|
<xsl:attribute name="margin-left">12mm</xsl:attribute>
|
16939
17346
|
</xsl:attribute-set>
|
16940
17347
|
|
17348
|
+
<xsl:template name="refine_toc-listof-item-style">
|
17349
|
+
</xsl:template>
|
17350
|
+
|
16941
17351
|
<xsl:template name="processPrefaceSectionsDefault_Contents">
|
16942
17352
|
<xsl:variable name="nodes_preface_">
|
16943
17353
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
|
@@ -18051,23 +18461,55 @@
|
|
18051
18461
|
<!-- Ruby text (CJK languages) rendering -->
|
18052
18462
|
<!-- ===================================== -->
|
18053
18463
|
<!-- ===================================== -->
|
18464
|
+
|
18465
|
+
<xsl:attribute-set name="ruby-style">
|
18466
|
+
<xsl:attribute name="text-indent">0mm</xsl:attribute>
|
18467
|
+
<xsl:attribute name="last-line-end-indent">0mm</xsl:attribute>
|
18468
|
+
</xsl:attribute-set>
|
18469
|
+
|
18470
|
+
<xsl:template name="refine_ruby-style">
|
18471
|
+
<xsl:if test="not(ancestor::mn:ruby)">
|
18472
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
18473
|
+
</xsl:if>
|
18474
|
+
<xsl:variable name="rt_text" select="mn:rt"/>
|
18475
|
+
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
18476
|
+
<!-- Example: width="2em" -->
|
18477
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
18478
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
18479
|
+
<xsl:variable name="text_width">
|
18480
|
+
<xsl:choose>
|
18481
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
18482
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
18483
|
+
</xsl:choose>
|
18484
|
+
</xsl:variable>
|
18485
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
18486
|
+
</xsl:template> <!-- refine_ruby-style -->
|
18487
|
+
|
18488
|
+
<xsl:attribute-set name="rb-style">
|
18489
|
+
<xsl:attribute name="line-height">1em</xsl:attribute>
|
18490
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
18491
|
+
</xsl:attribute-set>
|
18492
|
+
|
18493
|
+
<xsl:template name="refine_rb-style">
|
18494
|
+
</xsl:template>
|
18495
|
+
|
18496
|
+
<xsl:attribute-set name="rt-style">
|
18497
|
+
<xsl:attribute name="font-size">0.5em</xsl:attribute>
|
18498
|
+
<xsl:attribute name="text-align">center</xsl:attribute>
|
18499
|
+
<xsl:attribute name="line-height">1.2em</xsl:attribute>
|
18500
|
+
<xsl:attribute name="space-before">-1.4em</xsl:attribute>
|
18501
|
+
<xsl:attribute name="space-before.conditionality">retain</xsl:attribute>
|
18502
|
+
</xsl:attribute-set>
|
18503
|
+
|
18504
|
+
<xsl:template name="refine_rt-style">
|
18505
|
+
<xsl:if test="ancestor::mn:ruby[last()]//mn:ruby or ancestor::mn:rb">
|
18506
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
18507
|
+
</xsl:if>
|
18508
|
+
</xsl:template>
|
18509
|
+
|
18054
18510
|
<xsl:template match="mn:ruby">
|
18055
|
-
<fo:inline-container
|
18056
|
-
<xsl:
|
18057
|
-
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
18058
|
-
</xsl:if>
|
18059
|
-
<xsl:variable name="rt_text" select="mn:rt"/>
|
18060
|
-
<xsl:variable name="rb_text" select=".//mn:rb[not(mn:ruby)]"/>
|
18061
|
-
<!-- Example: width="2em" -->
|
18062
|
-
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
18063
|
-
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
18064
|
-
<xsl:variable name="text_width">
|
18065
|
-
<xsl:choose>
|
18066
|
-
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
18067
|
-
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
18068
|
-
</xsl:choose>
|
18069
|
-
</xsl:variable>
|
18070
|
-
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
18511
|
+
<fo:inline-container xsl:use-attribute-sets="ruby-style">
|
18512
|
+
<xsl:call-template name="refine_ruby-style"/>
|
18071
18513
|
|
18072
18514
|
<xsl:choose>
|
18073
18515
|
<xsl:when test="ancestor::mn:ruby">
|
@@ -18085,17 +18527,14 @@
|
|
18085
18527
|
</xsl:template>
|
18086
18528
|
|
18087
18529
|
<xsl:template match="mn:rb">
|
18088
|
-
<fo:block
|
18530
|
+
<fo:block xsl:use-attribute-sets="rb-style"><xsl:call-template name="refine_rb-style"/><xsl:apply-templates/></fo:block>
|
18089
18531
|
</xsl:template>
|
18090
18532
|
|
18091
18533
|
<xsl:template match="mn:rt">
|
18092
|
-
<fo:block
|
18093
|
-
<xsl:
|
18094
|
-
<xsl:attribute name="space-before">0em</xsl:attribute>
|
18095
|
-
</xsl:if>
|
18534
|
+
<fo:block xsl:use-attribute-sets="rt-style"> <!-- -->
|
18535
|
+
<xsl:call-template name="refine_rt-style"/>
|
18096
18536
|
<xsl:apply-templates/>
|
18097
18537
|
</fo:block>
|
18098
|
-
|
18099
18538
|
</xsl:template>
|
18100
18539
|
|
18101
18540
|
<!-- ===================================== -->
|
@@ -18104,6 +18543,18 @@
|
|
18104
18543
|
<!-- ===================================== -->
|
18105
18544
|
<!-- ===================================== -->
|
18106
18545
|
|
18546
|
+
<xsl:attribute-set name="annex-title-style">
|
18547
|
+
</xsl:attribute-set>
|
18548
|
+
|
18549
|
+
<xsl:template name="refine_annex-title-style">
|
18550
|
+
</xsl:template>
|
18551
|
+
|
18552
|
+
<xsl:attribute-set name="p-zzSTDTitle1-style">
|
18553
|
+
</xsl:attribute-set>
|
18554
|
+
|
18555
|
+
<xsl:template name="refine_p-zzSTDTitle1-style">
|
18556
|
+
</xsl:template>
|
18557
|
+
|
18107
18558
|
<xsl:template name="processPrefaceSectionsDefault">
|
18108
18559
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
18109
18560
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -18431,10 +18882,17 @@
|
|
18431
18882
|
</xsl:choose>
|
18432
18883
|
</xsl:template>
|
18433
18884
|
|
18885
|
+
<xsl:attribute-set name="clause-style">
|
18886
|
+
|
18887
|
+
</xsl:attribute-set>
|
18888
|
+
|
18889
|
+
<xsl:template name="refine_clause-style">
|
18890
|
+
</xsl:template>
|
18891
|
+
|
18434
18892
|
<!-- main sections -->
|
18435
18893
|
<xsl:template match="/*/mn:sections/*" name="sections_node" priority="2">
|
18436
18894
|
<xsl:call-template name="setNamedDestination"/>
|
18437
|
-
<fo:block>
|
18895
|
+
<fo:block role="Sect">
|
18438
18896
|
<xsl:call-template name="setId"/>
|
18439
18897
|
|
18440
18898
|
<xsl:call-template name="sections_element_style"/>
|
@@ -18574,6 +19032,10 @@
|
|
18574
19032
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
18575
19033
|
</xsl:template>
|
18576
19034
|
|
19035
|
+
<!-- for case when update_xml_step1 (common.updatexml.xsl) doesn't apply when $table_if = 'true' -->
|
19036
|
+
<xsl:template match="mn:title[following-sibling::*[1][self::mn:fmt-title]]"/>
|
19037
|
+
<xsl:template match="mn:name[following-sibling::*[1][self::mn:fmt-name]]"/>
|
19038
|
+
|
18577
19039
|
<!-- insert fo:basic-link, if external-destination or internal-destination is non-empty, otherwise insert fo:inline -->
|
18578
19040
|
<xsl:template name="insert_basic_link">
|
18579
19041
|
<xsl:param name="element"/>
|