metanorma-iec 2.0.1 → 2.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5617a52839fd8bbf4b1206b15758ad40837e347086f4cc3b4464b3234569316c
4
- data.tar.gz: 79eed9d40be90fff9c0b6e67dd23b8f284b2451445a852237044e1fac05830b3
3
+ metadata.gz: 6a9a7ccb87048ef451ffd636b6ba29c7cdf56d383ba7814427e9bb51c77126b0
4
+ data.tar.gz: 62935cdbf5fd3d9f6df5705b11e944c7f64e28b7dba5af5fadb6732c19010d59
5
5
  SHA512:
6
- metadata.gz: e51f50f3b61bceec62e3d5704ce71b025e1a3d6e24f8412b637a974618eaa488805c0def7524774b14b82fbaafa3324940d0c833027db169a59b9668c8259b98
7
- data.tar.gz: 228d4604e588b363afdf2099db6a6fe466e3e98c8d61438dc1da5e66ed4765630a7339d6255d5a6d21203178a1ea92c278186f8c46e6037a8f1988408c729c3f
6
+ metadata.gz: dd7849f9f6465ef7ee12f968029261003f074c843b6de479419e40d3478ac8a9600266dd53faf973cc7f9e7a7918cd7b0446284ee35b05f1c3812063d4b56228
7
+ data.tar.gz: a66f218acf2e29364adc6709feb6a104ca91062a39569579823a3deda80eeccd1100fc8c1f59e329a7f44e0317b3171d0c1e71da516b37ce2f3a56fb9190b695
@@ -426,56 +426,57 @@ p.TermNum {
426
426
  #toggle {
427
427
  display: none; } }
428
428
 
429
- #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
429
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
430
430
  font-family: {{bodyfont}};
431
431
  font-weight: 400; }
432
- #toc ul, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
432
+ #toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
433
433
  margin: 0;
434
434
  padding: 0;
435
435
  list-style: none; }
436
- #toc ul li a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
436
+ #toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
437
437
  padding: 5px 10px; }
438
- #toc ul a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
438
+ #toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
439
439
  color: black;
440
440
  text-decoration: none;
441
441
  display: block; }
442
- #toc ul a:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
442
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
443
443
  box-shadow: none;
444
444
  color: black; }
445
- #toc .h2, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
445
+ #toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
446
446
  padding-left: 30px; }
447
- #toc .h3, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
447
+ #toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
448
448
  padding-left: 50px; }
449
- #toc .toc-active, #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
449
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
450
450
  background: black;
451
451
  box-shadow: inset -5px 0px 10px -5px black !important; }
452
- #toc .toc-active a, #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
452
+ #toc .toc-active a, #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
453
453
  color: black; }
454
454
  @media print {
455
- #toc .toc-active, #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
455
+ #toc .toc-active, #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
456
456
  background: white;
457
457
  box-shadow: none !important; }
458
- #toc .toc-active a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
458
+ #toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
459
459
  color: black; }
460
- #toc li:hover a, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
460
+ #toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
461
461
  color: black; } }
462
462
  @media screen and (max-width: 768px) {
463
- #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
463
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
464
464
  padding: 0 1.5em;
465
465
  overflow: visible; } }
466
466
  #toc .toc-active,
467
- #toc li:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active,
468
- #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
467
+ #toc li:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active,
468
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover {
469
469
  box-shadow: 0px 1px 0px 0px black !important;
470
470
  color: black;
471
471
  background: none; }
472
- #toc ul a:hover, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
472
+ #toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
473
473
  box-shadow: none;
474
474
  color: black; }
475
475
 
476
- #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
476
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
477
477
  margin-top: 0;
478
- margin-bottom: 0; }
478
+ margin-bottom: 0;
479
+ font-size: 100%; }
479
480
 
480
481
  @media screen and (min-width: 768px) {
481
482
  nav {
@@ -205,7 +205,7 @@ nav {
205
205
  @include sidebarNavToggle(black, #f5faff)
206
206
  }
207
207
 
208
- #toc, #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
208
+ #toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
209
209
  @include toc(black, black, black);
210
210
  @include sidebarToc();
211
211
 
@@ -224,9 +224,10 @@ nav {
224
224
  }
225
225
  }
226
226
 
227
- #toc > ul > :is(.h1, .h2, .h3, .h4, .h5, .h6) {
227
+ #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
228
228
  margin-top: 0;
229
229
  margin-bottom: 0;
230
+ font-size: 100%;
230
231
  }
231
232
 
232
233
  @media screen and (min-width: 768px) {
@@ -22,8 +22,7 @@
22
22
 
23
23
 
24
24
  <xsl:variable name="debug">false</xsl:variable>
25
- <xsl:variable name="pageWidth" select="210"/>
26
- <xsl:variable name="pageHeight" select="297"/>
25
+
27
26
  <xsl:variable name="marginLeftRight1" select="25"/>
28
27
  <xsl:variable name="marginLeftRight2" select="25"/>
29
28
  <xsl:variable name="marginTop" select="31"/>
@@ -1712,28 +1711,14 @@
1712
1711
  </xsl:if>
1713
1712
  </xsl:template>
1714
1713
 
1715
- <xsl:template match="iec:boilerplate/iec:feedback-statement">
1714
+ <xsl:template match="iec:boilerplate/iec:feedback-statement" priority="2">
1716
1715
  <fo:block margin-top="6pt" font-size="1pt" span="all">
1717
1716
  </fo:block>
1718
1717
  <xsl:apply-templates select="*[not(@id) or @id != 'boilerplate-cenelec-attention']"/>
1719
1718
  </xsl:template>
1720
1719
 
1721
- <xsl:template match="iec:feedback-statement//iec:clause/iec:title" priority="2">
1722
- <xsl:variable name="level">
1723
- <xsl:call-template name="getLevel"/>
1724
- </xsl:variable>
1725
- <fo:block font-weight="bold" keep-with-next="always" role="H{$level}"><xsl:apply-templates/></fo:block>
1726
- </xsl:template>
1727
-
1728
- <xsl:template match="iec:feedback-statement//iec:clause/iec:p" priority="2">
1729
- <fo:block margin-bottom="6pt"><xsl:apply-templates/></fo:block>
1730
- </xsl:template>
1731
-
1732
1720
  <xsl:template match="iec:feedback-statement/iec:clause[not(iec:clause)]" priority="2">
1733
1721
  <fo:block span="all" text-align="justify">
1734
- <!-- <xsl:if test="not(preceding-sibling::iec:clause)">
1735
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1736
- </xsl:if> -->
1737
1722
  <xsl:apply-templates/>
1738
1723
  </fo:block>
1739
1724
  </xsl:template>
@@ -1837,25 +1822,6 @@
1837
1822
  <!-- ============================= -->
1838
1823
  <!-- ============================= -->
1839
1824
 
1840
- <xsl:template match="iec:license-statement//iec:title">
1841
- <xsl:variable name="level">
1842
- <xsl:call-template name="getLevel"/>
1843
- </xsl:variable>
1844
- <fo:block text-align="center" font-weight="bold" role="H{$level}">
1845
- <xsl:apply-templates/>
1846
- </fo:block>
1847
- </xsl:template>
1848
-
1849
- <xsl:template match="iec:license-statement//iec:p">
1850
- <fo:block margin-left="1.5mm" margin-right="1.5mm">
1851
- <xsl:if test="following-sibling::iec:p">
1852
- <xsl:attribute name="margin-top">6pt</xsl:attribute>
1853
- <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1854
- </xsl:if>
1855
- <xsl:apply-templates/>
1856
- </fo:block>
1857
- </xsl:template>
1858
-
1859
1825
  <xsl:template match="iec:license-statement//iec:title" mode="cover-page-internal">
1860
1826
  <xsl:variable name="level">
1861
1827
  <xsl:call-template name="getLevel"/>
@@ -1895,17 +1861,12 @@
1895
1861
  <xsl:value-of select="$linebreak"/>
1896
1862
  </xsl:template>
1897
1863
 
1898
- <xsl:template match="iec:copyright-statement//iec:p">
1864
+ <xsl:template match="iec:copyright-statement//iec:p" priority="2">
1899
1865
  <fo:block>
1900
- <xsl:if test="preceding-sibling::iec:p">
1901
- <!-- <xsl:attribute name="font-size">10pt</xsl:attribute> -->
1902
- </xsl:if>
1903
1866
  <xsl:if test="following-sibling::iec:p">
1904
- <!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
1905
1867
  <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
1906
1868
  </xsl:if>
1907
1869
  <xsl:if test="not(following-sibling::iec:p)">
1908
- <!-- <xsl:attribute name="margin-left">7.1mm</xsl:attribute> -->
1909
1870
  <xsl:attribute name="margin-left">4mm</xsl:attribute>
1910
1871
  </xsl:if>
1911
1872
  <xsl:apply-templates/>
@@ -2201,7 +2162,7 @@
2201
2162
  </fo:list-item>
2202
2163
  </xsl:template>
2203
2164
 
2204
- <xsl:template match="iec:li/iec:p">
2165
+ <xsl:template match="iec:li/iec:p" priority="2">
2205
2166
  <fo:block margin-bottom="6pt">
2206
2167
  <xsl:if test="ancestor::iec:ul">
2207
2168
  <xsl:attribute name="margin-bottom">3pt</xsl:attribute>
@@ -2487,7 +2448,11 @@
2487
2448
  </xsl:copy>
2488
2449
  </xsl:template> -->
2489
2450
 
2490
- <xsl:variable name="titles_">
2451
+ <xsl:variable name="pageWidth_">
2452
+ 210
2453
+ </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
2454
+ 297
2455
+ </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
2491
2456
 
2492
2457
  <title-edition lang="en">
2493
2458
 
@@ -2594,6 +2559,57 @@
2594
2559
 
2595
2560
 
2596
2561
 
2562
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
2563
+
2564
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
2565
+
2566
+
2567
+ </xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
2568
+
2569
+
2570
+
2571
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-style">
2572
+
2573
+
2574
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
2575
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2576
+
2577
+
2578
+
2579
+
2580
+
2581
+
2582
+ </xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
2583
+
2584
+
2585
+
2586
+
2587
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
2588
+
2589
+
2590
+
2591
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
2592
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2593
+
2594
+
2595
+
2596
+
2597
+
2598
+ </xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
2599
+
2600
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
2601
+
2602
+
2603
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
2604
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
2605
+
2606
+ <xsl:attribute name="font-weight">bold</xsl:attribute>
2607
+
2608
+ </xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
2609
+
2610
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
2611
+
2612
+
2597
2613
  </xsl:attribute-set><xsl:attribute-set name="link-style">
2598
2614
 
2599
2615
 
@@ -3453,6 +3469,7 @@
3453
3469
  </xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
3454
3470
 
3455
3471
 
3472
+
3456
3473
  </xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
3457
3474
  <xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
3458
3475
  <xsl:attribute name="font-size">65%</xsl:attribute>
@@ -3564,6 +3581,69 @@
3564
3581
  <xsl:value-of select="."/>
3565
3582
  </xsl:template><xsl:template match="*[local-name()='br']">
3566
3583
  <xsl:value-of select="$linebreak"/>
3584
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']">
3585
+ <fo:block xsl:use-attribute-sets="copyright-statement-style">
3586
+ <xsl:apply-templates/>
3587
+ </fo:block>
3588
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
3589
+
3590
+ <!-- process in the template 'title' -->
3591
+ <xsl:call-template name="title"/>
3592
+
3593
+ </xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
3594
+
3595
+
3596
+ <!-- process in the template 'paragraph' -->
3597
+ <xsl:call-template name="paragraph"/>
3598
+
3599
+ </xsl:template><xsl:template match="*[local-name()='license-statement']">
3600
+ <fo:block xsl:use-attribute-sets="license-statement-style">
3601
+ <xsl:apply-templates/>
3602
+ </fo:block>
3603
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
3604
+
3605
+ <!-- process in the template 'title' -->
3606
+ <xsl:call-template name="title"/>
3607
+
3608
+ </xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
3609
+
3610
+ <!-- process in the template 'paragraph' -->
3611
+ <xsl:call-template name="paragraph"/>
3612
+
3613
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']">
3614
+ <fo:block xsl:use-attribute-sets="legal-statement-style">
3615
+ <xsl:apply-templates/>
3616
+ </fo:block>
3617
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
3618
+
3619
+ <!-- process in the template 'title' -->
3620
+ <xsl:call-template name="title"/>
3621
+
3622
+
3623
+ </xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
3624
+
3625
+ <!-- process in the template 'paragraph' -->
3626
+ <xsl:call-template name="paragraph"/>
3627
+
3628
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']">
3629
+ <fo:block xsl:use-attribute-sets="feedback-statement-style">
3630
+ <xsl:apply-templates/>
3631
+ </fo:block>
3632
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
3633
+
3634
+ <xsl:variable name="level">
3635
+ <xsl:call-template name="getLevel"/>
3636
+ </xsl:variable>
3637
+ <fo:block role="H{$level}" xsl:use-attribute-sets="feedback-statement-title-style">
3638
+ <xsl:apply-templates/>
3639
+ </fo:block>
3640
+
3641
+ </xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
3642
+
3643
+ <fo:block xsl:use-attribute-sets="feedback-statement-p-style">
3644
+ <xsl:apply-templates/>
3645
+ </fo:block>
3646
+
3567
3647
  </xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
3568
3648
  <!-- <xsl:call-template name="add-zero-spaces"/> -->
3569
3649
  <xsl:call-template name="add-zero-spaces-java"/>
@@ -3712,7 +3792,7 @@
3712
3792
  <xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
3713
3793
  </xsl:when>
3714
3794
  <xsl:otherwise>
3715
- <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
3795
+ <xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer and note that renders separaterely -->
3716
3796
  </xsl:otherwise>
3717
3797
  </xsl:choose>
3718
3798
 
@@ -3929,7 +4009,7 @@
3929
4009
 
3930
4010
  <xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
3931
4011
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
3932
- </xsl:template><xsl:template match="*[local-name()='table2']"/><xsl:template match="*[local-name()='thead']"/><xsl:template match="*[local-name()='thead']" mode="process">
4012
+ </xsl:template><xsl:template match="*[local-name()='thead']">
3933
4013
  <xsl:param name="cols-count"/>
3934
4014
  <fo:table-header>
3935
4015
 
@@ -3954,13 +4034,13 @@
3954
4034
  <fo:table-body>
3955
4035
  <xsl:apply-templates/>
3956
4036
  </fo:table-body>
3957
- </xsl:template><xsl:template match="*[local-name()='tfoot']"/><xsl:template match="*[local-name()='tfoot']" mode="process">
4037
+ </xsl:template><xsl:template match="*[local-name()='tfoot']">
3958
4038
  <xsl:apply-templates/>
3959
4039
  </xsl:template><xsl:template name="insertTableFooter">
3960
4040
  <xsl:param name="cols-count"/>
3961
4041
  <xsl:if test="../*[local-name()='tfoot']">
3962
4042
  <fo:table-footer>
3963
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
4043
+ <xsl:apply-templates select="../*[local-name()='tfoot']"/>
3964
4044
  </fo:table-footer>
3965
4045
  </xsl:if>
3966
4046
  </xsl:template><xsl:template name="insertTableFooterInSeparateTable">
@@ -4050,7 +4130,7 @@
4050
4130
 
4051
4131
  <!-- except gb and bsi -->
4052
4132
 
4053
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
4133
+ <xsl:apply-templates select="../*[local-name()='note']"/>
4054
4134
 
4055
4135
 
4056
4136
 
@@ -4094,7 +4174,7 @@
4094
4174
 
4095
4175
 
4096
4176
 
4097
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process">
4177
+ <xsl:apply-templates select="../*[local-name()='thead']">
4098
4178
  <xsl:with-param name="cols-count" select="$cols-count"/>
4099
4179
  </xsl:apply-templates>
4100
4180
 
@@ -4245,7 +4325,7 @@
4245
4325
  <xsl:apply-templates/>
4246
4326
  </fo:block>
4247
4327
  </fo:table-cell>
4248
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"/><xsl:template match="*[local-name()='table']/*[local-name()='note']" mode="process">
4328
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
4249
4329
 
4250
4330
  <fo:block xsl:use-attribute-sets="table-note-style">
4251
4331
 
@@ -4268,10 +4348,10 @@
4268
4348
 
4269
4349
 
4270
4350
 
4271
- <xsl:apply-templates select="node()[not(local-name() = 'name')]" mode="process"/>
4351
+ <xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
4272
4352
  </fo:block>
4273
4353
 
4274
- </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='name']" mode="process"/><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" mode="process">
4354
+ </xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
4275
4355
  <xsl:apply-templates/>
4276
4356
  </xsl:template><xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" priority="2" name="fn">
4277
4357
 
@@ -4821,7 +4901,9 @@
4821
4901
  </td>
4822
4902
  <td>
4823
4903
 
4824
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4904
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
4905
+ <xsl:with-param name="process">true</xsl:with-param>
4906
+ </xsl:apply-templates>
4825
4907
 
4826
4908
  </td>
4827
4909
  </tr>
@@ -4848,15 +4930,20 @@
4848
4930
  <fo:block>
4849
4931
 
4850
4932
 
4851
- <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]" mode="process"/>
4933
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
4934
+ <xsl:with-param name="process">true</xsl:with-param>
4935
+ </xsl:apply-templates>
4852
4936
  </fo:block>
4853
4937
  </fo:table-cell>
4854
4938
  </fo:table-row>
4855
4939
  </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
4856
4940
  <xsl:apply-templates/>
4857
- </xsl:template><xsl:template match="*[local-name()='dd']"/><xsl:template match="*[local-name()='dd']" mode="process">
4858
- <xsl:apply-templates select="@language"/>
4859
- <xsl:apply-templates/>
4941
+ </xsl:template><xsl:template match="*[local-name()='dd']">
4942
+ <xsl:param name="process">false</xsl:param>
4943
+ <xsl:if test="$process = 'true'">
4944
+ <xsl:apply-templates select="@language"/>
4945
+ <xsl:apply-templates/>
4946
+ </xsl:if>
4860
4947
  </xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
4861
4948
  <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
4862
4949
  </xsl:template><xsl:template match="*[local-name()='em']">
@@ -5031,7 +5118,11 @@
5031
5118
  <xsl:with-param name="text" select="substring($text,2)"/>
5032
5119
  </xsl:call-template>
5033
5120
  </xsl:if>
5034
- </xsl:template><xsl:template name="tokenize">
5121
+ </xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
5122
+ <fo:block break-after="page"/>
5123
+ <fo:block> </fo:block>
5124
+ <fo:block break-after="page"/>
5125
+ </xsl:template><xsl:template name="tokenize">
5035
5126
  <xsl:param name="text"/>
5036
5127
  <xsl:param name="separator" select="' '"/>
5037
5128
  <xsl:choose>
@@ -5467,10 +5558,10 @@
5467
5558
  </fo:inline>
5468
5559
  </xsl:template><xsl:template match="*[local-name()='appendix']">
5469
5560
  <fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
5470
- <xsl:apply-templates select="*[local-name()='title']" mode="process"/>
5561
+ <xsl:apply-templates select="*[local-name()='title']"/>
5471
5562
  </fo:block>
5472
- <xsl:apply-templates/>
5473
- </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"/><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" mode="process">
5563
+ <xsl:apply-templates select="node()[not(local-name()='title')]"/>
5564
+ </xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
5474
5565
  <xsl:variable name="level">
5475
5566
  <xsl:call-template name="getLevel"/>
5476
5567
  </xsl:variable>
@@ -6090,7 +6181,7 @@
6090
6181
  <xsl:value-of select="."/>
6091
6182
  </xsl:template><xsl:template match="node()" mode="contents">
6092
6183
  <xsl:apply-templates mode="contents"/>
6093
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
6184
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
6094
6185
  <xsl:variable name="level">
6095
6186
  <xsl:call-template name="getLevel">
6096
6187
  <xsl:with-param name="depth" select="@depth"/>
@@ -6098,10 +6189,15 @@
6098
6189
  </xsl:variable>
6099
6190
 
6100
6191
  <xsl:variable name="section">
6101
- <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
6192
+ <xsl:choose>
6193
+ <xsl:when test="@type = 'section-title'"/>
6194
+ <xsl:otherwise>
6195
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
6196
+ </xsl:otherwise>
6197
+ </xsl:choose>
6102
6198
  </xsl:variable>
6103
6199
 
6104
- <xsl:variable name="type">floating-title</xsl:variable>
6200
+ <xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
6105
6201
 
6106
6202
  <xsl:variable name="display">
6107
6203
  <xsl:choose>
@@ -6118,7 +6214,16 @@
6118
6214
  <xsl:variable name="title">
6119
6215
  <xsl:choose>
6120
6216
  <xsl:when test="*[local-name() = 'tab']">
6121
- <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
6217
+ <xsl:choose>
6218
+ <xsl:when test="@type = 'section-title'">
6219
+ <xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
6220
+ <xsl:text>: </xsl:text>
6221
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
6222
+ </xsl:when>
6223
+ <xsl:otherwise>
6224
+ <xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
6225
+ </xsl:otherwise>
6226
+ </xsl:choose>
6122
6227
  </xsl:when>
6123
6228
  <xsl:otherwise>
6124
6229
  <xsl:copy-of select="node()"/>
@@ -7697,7 +7802,7 @@
7697
7802
  </fo:inline>
7698
7803
  </xsl:template><xsl:template match="@language">
7699
7804
  <xsl:copy-of select="."/>
7700
- </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
7805
+ </xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
7701
7806
  <xsl:call-template name="title"/>
7702
7807
  </xsl:template><xsl:template match="*[local-name() = 'admonition']">
7703
7808
 
@@ -7758,27 +7863,17 @@
7758
7863
  <xsl:variable name="month" select="substring($date, 6, 2)"/>
7759
7864
  <xsl:variable name="day" select="substring($date, 9, 2)"/>
7760
7865
  <xsl:variable name="monthStr">
7761
- <xsl:choose>
7762
- <xsl:when test="$month = '01'">january</xsl:when>
7763
- <xsl:when test="$month = '02'">february</xsl:when>
7764
- <xsl:when test="$month = '03'">march</xsl:when>
7765
- <xsl:when test="$month = '04'">april</xsl:when>
7766
- <xsl:when test="$month = '05'">may</xsl:when>
7767
- <xsl:when test="$month = '06'">june</xsl:when>
7768
- <xsl:when test="$month = '07'">july</xsl:when>
7769
- <xsl:when test="$month = '08'">august</xsl:when>
7770
- <xsl:when test="$month = '09'">september</xsl:when>
7771
- <xsl:when test="$month = '10'">october</xsl:when>
7772
- <xsl:when test="$month = '11'">november</xsl:when>
7773
- <xsl:when test="$month = '12'">december</xsl:when>
7774
- </xsl:choose>
7866
+ <xsl:call-template name="getMonthByNum">
7867
+ <xsl:with-param name="num" select="$month"/>
7868
+ <xsl:with-param name="lowercase" select="'true'"/>
7869
+ </xsl:call-template>
7775
7870
  </xsl:variable>
7776
7871
  <xsl:variable name="monthStr_localized">
7777
7872
  <xsl:if test="normalize-space($monthStr) != ''"><xsl:call-template name="getLocalizedString"><xsl:with-param name="key">month_<xsl:value-of select="$monthStr"/></xsl:with-param></xsl:call-template></xsl:if>
7778
7873
  </xsl:variable>
7779
7874
  <xsl:variable name="result">
7780
7875
  <xsl:choose>
7781
- <xsl:when test="$format = 'ddMMyyyy'">
7876
+ <xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
7782
7877
  <xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
7783
7878
  <xsl:text> </xsl:text>
7784
7879
  <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
@@ -7791,11 +7886,57 @@
7791
7886
  <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
7792
7887
  </xsl:when>
7793
7888
  <xsl:otherwise>
7794
- <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
7889
+ <xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
7795
7890
  </xsl:otherwise>
7796
7891
  </xsl:choose>
7797
7892
  </xsl:variable>
7798
7893
  <xsl:value-of select="$result"/>
7894
+ </xsl:template><xsl:template name="getMonthByNum">
7895
+ <xsl:param name="num"/>
7896
+ <xsl:param name="lang">en</xsl:param>
7897
+ <xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
7898
+ <xsl:variable name="monthStr_">
7899
+ <xsl:choose>
7900
+ <xsl:when test="$lang = 'fr'">
7901
+ <xsl:choose>
7902
+ <xsl:when test="$num = '01'">Janvier</xsl:when>
7903
+ <xsl:when test="$num = '02'">Février</xsl:when>
7904
+ <xsl:when test="$num = '03'">Mars</xsl:when>
7905
+ <xsl:when test="$num = '04'">Avril</xsl:when>
7906
+ <xsl:when test="$num = '05'">Mai</xsl:when>
7907
+ <xsl:when test="$num = '06'">Juin</xsl:when>
7908
+ <xsl:when test="$num = '07'">Juillet</xsl:when>
7909
+ <xsl:when test="$num = '08'">Août</xsl:when>
7910
+ <xsl:when test="$num = '09'">Septembre</xsl:when>
7911
+ <xsl:when test="$num = '10'">Octobre</xsl:when>
7912
+ <xsl:when test="$num = '11'">Novembre</xsl:when>
7913
+ <xsl:when test="$num = '12'">Décembre</xsl:when>
7914
+ </xsl:choose>
7915
+ </xsl:when>
7916
+ <xsl:otherwise>
7917
+ <xsl:choose>
7918
+ <xsl:when test="$num = '01'">January</xsl:when>
7919
+ <xsl:when test="$num = '02'">February</xsl:when>
7920
+ <xsl:when test="$num = '03'">March</xsl:when>
7921
+ <xsl:when test="$num = '04'">April</xsl:when>
7922
+ <xsl:when test="$num = '05'">May</xsl:when>
7923
+ <xsl:when test="$num = '06'">June</xsl:when>
7924
+ <xsl:when test="$num = '07'">July</xsl:when>
7925
+ <xsl:when test="$num = '08'">August</xsl:when>
7926
+ <xsl:when test="$num = '09'">September</xsl:when>
7927
+ <xsl:when test="$num = '10'">October</xsl:when>
7928
+ <xsl:when test="$num = '11'">November</xsl:when>
7929
+ <xsl:when test="$num = '12'">December</xsl:when>
7930
+ </xsl:choose>
7931
+ </xsl:otherwise>
7932
+ </xsl:choose>
7933
+ </xsl:variable>
7934
+ <xsl:choose>
7935
+ <xsl:when test="normalize-space($lowercase) = 'true'">
7936
+ <xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
7937
+ </xsl:when>
7938
+ <xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
7939
+ </xsl:choose>
7799
7940
  </xsl:template><xsl:template name="insertKeywords">
7800
7941
  <xsl:param name="sorting" select="'true'"/>
7801
7942
  <xsl:param name="charAtEnd" select="'.'"/>
@@ -8256,6 +8397,25 @@
8256
8397
  </xsl:otherwise>
8257
8398
  </xsl:choose>
8258
8399
  </xsl:if>
8400
+ </xsl:template><xsl:template name="number-to-ordinal">
8401
+ <xsl:param name="number"/>
8402
+ <xsl:param name="curr_lang"/>
8403
+ <xsl:choose>
8404
+ <xsl:when test="$curr_lang = 'fr'">
8405
+ <xsl:choose>
8406
+ <xsl:when test="$number = '1'">re</xsl:when>
8407
+ <xsl:otherwise>e</xsl:otherwise>
8408
+ </xsl:choose>
8409
+ </xsl:when>
8410
+ <xsl:otherwise>
8411
+ <xsl:choose>
8412
+ <xsl:when test="$number = 1">st</xsl:when>
8413
+ <xsl:when test="$number = 2">nd</xsl:when>
8414
+ <xsl:when test="$number = 3">rd</xsl:when>
8415
+ <xsl:otherwise>th</xsl:otherwise>
8416
+ </xsl:choose>
8417
+ </xsl:otherwise>
8418
+ </xsl:choose>
8259
8419
  </xsl:template><xsl:template name="setAltText">
8260
8420
  <xsl:param name="value"/>
8261
8421
  <xsl:attribute name="fox:alt-text">
@@ -401,9 +401,9 @@
401
401
  <choice>
402
402
  <!-- iso191606 TODO -->
403
403
  <group>
404
- <oneOrMore>
404
+ <zeroOrMore>
405
405
  <ref name="street"/>
406
- </oneOrMore>
406
+ </zeroOrMore>
407
407
  <ref name="city"/>
408
408
  <optional>
409
409
  <ref name="state"/>
@@ -82,13 +82,6 @@ module Metanorma
82
82
  end
83
83
  end
84
84
 
85
- def norm_ref_preface(node)
86
- return super unless @is_iev
87
-
88
- node.at("./title").next =
89
- "<p>#{@i18n.norm_empty_pref}</p>"
90
- end
91
-
92
85
  def term_defs_boilerplate(div, source, term, preface, isodoc)
93
86
  return super unless @is_iev
94
87
  end
@@ -32,6 +32,43 @@
32
32
  <ref name="DocumentType"/>
33
33
  </element>
34
34
  </define>
35
+ <define name="index">
36
+ <element name="index">
37
+ <optional>
38
+ <attribute name="to">
39
+ <data type="IDREF"/>
40
+ </attribute>
41
+ </optional>
42
+ <element name="primary">
43
+ <oneOrMore>
44
+ <choice>
45
+ <ref name="PureTextElement"/>
46
+ <ref name="stem"/>
47
+ </choice>
48
+ </oneOrMore>
49
+ </element>
50
+ <optional>
51
+ <element name="secondary">
52
+ <oneOrMore>
53
+ <choice>
54
+ <ref name="PureTextElement"/>
55
+ <ref name="stem"/>
56
+ </choice>
57
+ </oneOrMore>
58
+ </element>
59
+ </optional>
60
+ <optional>
61
+ <element name="tertiary">
62
+ <oneOrMore>
63
+ <choice>
64
+ <ref name="PureTextElement"/>
65
+ <ref name="stem"/>
66
+ </choice>
67
+ </oneOrMore>
68
+ </element>
69
+ </optional>
70
+ </element>
71
+ </define>
35
72
  <define name="bibitem">
36
73
  <element name="bibitem">
37
74
  <attribute name="id">
@@ -1027,6 +1064,26 @@
1027
1064
  </zeroOrMore>
1028
1065
  </element>
1029
1066
  </define>
1067
+ <define name="sub">
1068
+ <element name="sub">
1069
+ <zeroOrMore>
1070
+ <choice>
1071
+ <ref name="PureTextElement"/>
1072
+ <ref name="stem"/>
1073
+ </choice>
1074
+ </zeroOrMore>
1075
+ </element>
1076
+ </define>
1077
+ <define name="sup">
1078
+ <element name="sup">
1079
+ <zeroOrMore>
1080
+ <choice>
1081
+ <ref name="PureTextElement"/>
1082
+ <ref name="stem"/>
1083
+ </choice>
1084
+ </zeroOrMore>
1085
+ </element>
1086
+ </define>
1030
1087
  <define name="pagebreak">
1031
1088
  <element name="pagebreak">
1032
1089
  <optional>
@@ -2216,7 +2273,18 @@
2216
2273
  <ref name="MultilingualRenderingType"/>
2217
2274
  </attribute>
2218
2275
  </optional>
2219
- <ref name="paragraph"/>
2276
+ <oneOrMore>
2277
+ <choice>
2278
+ <ref name="formula"/>
2279
+ <ref name="ul"/>
2280
+ <ref name="ol"/>
2281
+ <ref name="dl"/>
2282
+ <ref name="quote"/>
2283
+ <ref name="sourcecode"/>
2284
+ <ref name="paragraph"/>
2285
+ <ref name="figure"/>
2286
+ </choice>
2287
+ </oneOrMore>
2220
2288
  </element>
2221
2289
  </define>
2222
2290
  <define name="termsource">
@@ -1,6 +1,6 @@
1
1
  module Metanorma
2
2
  module Iec
3
- VERSION = "2.0.1".freeze
3
+ VERSION = "2.0.2".freeze
4
4
  end
5
5
  end
6
6
 
@@ -75,7 +75,13 @@ RSpec.describe Metanorma::Iec do
75
75
  <bibliography>
76
76
  <references id='_' obligation='informative' normative="true">
77
77
  <title>Normative references</title>
78
- <p id='_'>There are no normative references in this document.</p>
78
+ <p id='_'>
79
+ The following documents are referred to in the text in such a way that
80
+ some or all of their content constitutes requirements of this document.
81
+ For dated references, only the edition cited applies. For undated
82
+ references, the latest edition of the referenced document (including any
83
+ amendments) applies.
84
+ </p>
79
85
  <bibitem id='A'>
80
86
  <formattedref format='application/x-isodoc+xml'>
81
87
  <em>TITLE</em>
@@ -167,6 +173,8 @@ RSpec.describe Metanorma::Iec do
167
173
  </iec-standard>
168
174
 
169
175
  OUTPUT
176
+ expect(xmlpp(strip_guid(Asciidoctor.convert(input, *OPTIONS))))
177
+ .to be_equivalent_to xmlpp(output)
170
178
  end
171
179
 
172
180
  it "uses IEV introduction title" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iec
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-iso