metanorma-ogc 2.7.10 → 2.8.0

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.
@@ -838,7 +838,7 @@
838
838
 
839
839
  <xsl:template name="insertListOf_Title">
840
840
  <xsl:param name="title"/>
841
- <fo:block-container margin-left="-18mm" keep-with-next="always" margin-bottom="10pt" space-before="36pt" role="SKIP">
841
+ <fo:block-container xsl:use-attribute-sets="toc-listof-title-style">
842
842
  <fo:block-container margin-left="0mm" role="H2">
843
843
  <xsl:call-template name="insertSectionTitle">
844
844
  <xsl:with-param name="title" select="$title"/>
@@ -848,7 +848,7 @@
848
848
  </xsl:template>
849
849
 
850
850
  <xsl:template name="insertListOf_Item">
851
- <fo:block text-align-last="justify" margin-top="2pt" role="TOCI">
851
+ <fo:block xsl:use-attribute-sets="toc-listof-item-style">
852
852
  <fo:basic-link internal-destination="{@id}">
853
853
  <xsl:call-template name="setAltText">
854
854
  <xsl:with-param name="value" select="@alt-text"/>
@@ -856,14 +856,14 @@
856
856
  <!-- <xsl:copy-of select="node()"/> -->
857
857
  <xsl:apply-templates select="." mode="contents"/>
858
858
  <fo:inline keep-together.within-line="always">
859
- <fo:leader leader-pattern="dots"/>
859
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
860
860
  <fo:page-number-citation ref-id="{@id}"/>
861
861
  </fo:inline>
862
862
  </fo:basic-link>
863
863
  </fo:block>
864
864
  </xsl:template>
865
865
 
866
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="4">
866
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
867
867
  <fo:block color="{$color_text_title}">
868
868
 
869
869
  <xsl:apply-templates/>
@@ -874,16 +874,9 @@
874
874
  <fo:block role="TOC">
875
875
  <xsl:for-each select="$contents//mnx:item[@display = 'true' and normalize-space(@id) != '']">
876
876
 
877
- <fo:block role="TOCI">
878
- <xsl:if test="@level = 1">
879
- <xsl:attribute name="margin-top">14pt</xsl:attribute>
880
- </xsl:if>
881
- <xsl:if test="@level = 1 or @parent = 'annex'">
882
- <xsl:attribute name="font-size">12pt</xsl:attribute>
883
- </xsl:if>
884
- <xsl:if test="@level &gt;= 2"> <!-- and not(@parent = 'annex') -->
885
- <xsl:attribute name="font-size">10pt</xsl:attribute>
886
- </xsl:if>
877
+ <fo:block xsl:use-attribute-sets="toc-item-style">
878
+
879
+ <xsl:call-template name="refine_toc-item-style"/>
887
880
 
888
881
  <xsl:choose>
889
882
  <xsl:when test="@level = 1">
@@ -909,7 +902,7 @@
909
902
  <xsl:value-of select="java:toUpperCase(java:java.lang.String.new($sectionTitle))"/>
910
903
  <xsl:text> </xsl:text>
911
904
  <fo:inline keep-together.within-line="always">
912
- <fo:leader leader-pattern="dots"/>
905
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
913
906
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
914
907
  </fo:inline>
915
908
  </fo:basic-link>
@@ -935,7 +928,7 @@
935
928
  <xsl:apply-templates select="mnx:title"/>
936
929
  <xsl:text> </xsl:text>
937
930
  <fo:inline keep-together.within-line="always">
938
- <fo:leader leader-pattern="dots"/>
931
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
939
932
  <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
940
933
  </fo:inline>
941
934
  </fo:basic-link>
@@ -987,7 +980,7 @@
987
980
  <xsl:copy-of select="title/node()"/>
988
981
  <xsl:text> </xsl:text>
989
982
  <fo:inline keep-together.within-line="always">
990
- <fo:leader leader-pattern="dots"/>
983
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
991
984
  <fo:page-number-citation ref-id="{@id}"/>
992
985
  </fo:inline>
993
986
  </fo:basic-link>
@@ -1005,22 +998,17 @@
1005
998
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
1006
999
  <xsl:variable name="title-toc">
1007
1000
  <xsl:apply-templates/>
1008
- <!-- <xsl:call-template name="getTitle">
1009
- <xsl:with-param name="name" select="'title-toc'"/>
1010
- </xsl:call-template> -->
1011
1001
  </xsl:variable>
1012
1002
 
1013
- <fo:block-container margin-left="-18mm">
1003
+ <fo:block-container margin-left="-18mm" margin-bottom="40pt">
1014
1004
  <fo:block-container margin-left="0mm">
1015
- <fo:block margin-bottom="40pt">
1016
- <fo:block font-size="33pt" margin-bottom="4pt" role="H1">
1017
- <xsl:call-template name="addLetterSpacing">
1018
- <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
1019
- <xsl:with-param name="letter-spacing" select="1.1"/>
1020
- </xsl:call-template>
1021
- </fo:block>
1022
- <xsl:call-template name="insertBigHorizontalLine"/>
1005
+ <fo:block xsl:use-attribute-sets="toc-title-style">
1006
+ <xsl:call-template name="addLetterSpacing">
1007
+ <xsl:with-param name="text" select="java:toUpperCase(java:java.lang.String.new($title-toc))"/>
1008
+ <xsl:with-param name="letter-spacing" select="1.1"/>
1009
+ </xsl:call-template>
1023
1010
  </fo:block>
1011
+ <xsl:call-template name="insertBigHorizontalLine"/>
1024
1012
  </fo:block-container>
1025
1013
  </fo:block-container>
1026
1014
  </xsl:template>
@@ -7065,6 +7053,16 @@
7065
7053
  </xsl:variable>
7066
7054
  <xsl:variable name="quot">"</xsl:variable>
7067
7055
  <xsl:variable name="styles_">
7056
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
7057
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
7058
+ <style name="border-top">none</style>
7059
+ <style name="border-right">none</style>
7060
+ <style name="border-left">none</style>
7061
+ <style name="border-bottom">none</style>
7062
+ <style name="color">inherit</style>
7063
+ <style name="background-color">transparent</style>
7064
+ </xsl:if>
7065
+
7068
7066
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
7069
7067
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
7070
7068
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
@@ -9089,7 +9087,10 @@
9089
9087
 
9090
9088
  <xsl:call-template name="setNamedDestination"/>
9091
9089
 
9092
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
9090
+ <fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
9091
+ <xsl:if test="not(parent::mn:references)">
9092
+ <xsl:copy-of select="@id"/>
9093
+ </xsl:if>
9093
9094
 
9094
9095
  <xsl:call-template name="setBlockSpanAll"/>
9095
9096
 
@@ -11789,8 +11790,8 @@
11789
11790
  </xsl:template> <!-- bibitem -->
11790
11791
 
11791
11792
  <!-- Bibliography (non-normative references) -->
11792
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
11793
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11793
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
11794
+ <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 --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
11794
11795
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
11795
11796
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
11796
11797
  <xsl:call-template name="setNamedDestination"/>
@@ -11842,7 +11843,7 @@
11842
11843
  </fo:list-item>
11843
11844
  </xsl:otherwise>
11844
11845
  </xsl:choose>
11845
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
11846
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
11846
11847
  <xsl:with-param name="skip">false</xsl:with-param>
11847
11848
  </xsl:apply-templates>
11848
11849
  </xsl:template>
@@ -11859,8 +11860,26 @@
11859
11860
  </xsl:apply-templates>
11860
11861
  <xsl:apply-templates select="mn:formattedref"/>
11861
11862
  <!-- end bibitem processing -->
11863
+
11864
+ <xsl:call-template name="processBibliographyNote"/>
11862
11865
  </xsl:template> <!-- processBibitem (bibitem) -->
11863
11866
 
11867
+ <xsl:template name="processBibliographyNote">
11868
+ <xsl:if test="self::mn:note">
11869
+ <xsl:variable name="note_node">
11870
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
11871
+ <xsl:copy> <!-- skip @id -->
11872
+ <xsl:copy-of select="node()"/>
11873
+ </xsl:copy>
11874
+ </xsl:element>
11875
+ </xsl:variable>
11876
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
11877
+ <xsl:call-template name="note"/>
11878
+ </xsl:for-each> -->
11879
+ <xsl:call-template name="note"/>
11880
+ </xsl:if>
11881
+ </xsl:template>
11882
+
11864
11883
  <xsl:template match="mn:title" mode="title">
11865
11884
  <fo:inline><xsl:apply-templates/></fo:inline>
11866
11885
  </xsl:template>
@@ -12406,6 +12425,68 @@
12406
12425
  <!-- End Form's elements processing -->
12407
12426
  <!-- =================== -->
12408
12427
 
12428
+ <xsl:attribute-set name="toc-style">
12429
+ </xsl:attribute-set>
12430
+
12431
+ <xsl:template name="refine_toc-style">
12432
+ </xsl:template>
12433
+
12434
+ <xsl:attribute-set name="toc-title-style">
12435
+ <xsl:attribute name="font-size">33pt</xsl:attribute>
12436
+ <xsl:attribute name="margin-bottom">4pt</xsl:attribute>
12437
+ <xsl:attribute name="role">H1</xsl:attribute>
12438
+ </xsl:attribute-set>
12439
+
12440
+ <xsl:attribute-set name="toc-title-page-style">
12441
+ </xsl:attribute-set> <!-- toc-title-page-style -->
12442
+
12443
+ <xsl:attribute-set name="toc-item-block-style">
12444
+ </xsl:attribute-set>
12445
+
12446
+ <xsl:template name="refine_toc-item-block-style">
12447
+ </xsl:template>
12448
+
12449
+ <xsl:attribute-set name="toc-item-style">
12450
+ <xsl:attribute name="role">TOCI</xsl:attribute>
12451
+ </xsl:attribute-set> <!-- END: toc-item-style -->
12452
+
12453
+ <xsl:template name="refine_toc-item-style">
12454
+ <xsl:if test="@level = 1">
12455
+ <xsl:attribute name="margin-top">14pt</xsl:attribute>
12456
+ </xsl:if>
12457
+ <xsl:if test="@level = 1 or @parent = 'annex'">
12458
+ <xsl:attribute name="font-size">12pt</xsl:attribute>
12459
+ </xsl:if>
12460
+ <xsl:if test="@level &gt;= 2"> <!-- and not(@parent = 'annex') -->
12461
+ <xsl:attribute name="font-size">10pt</xsl:attribute>
12462
+ </xsl:if>
12463
+ </xsl:template> <!-- END: refine_toc-item-style -->
12464
+
12465
+ <xsl:attribute-set name="toc-leader-style">
12466
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
12467
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
12468
+
12469
+ <xsl:attribute-set name="toc-pagenumber-style">
12470
+ </xsl:attribute-set>
12471
+
12472
+ <!-- List of Figures, Tables -->
12473
+ <xsl:attribute-set name="toc-listof-title-style">
12474
+ <xsl:attribute name="margin-left">-18mm</xsl:attribute>
12475
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
12476
+ <xsl:attribute name="margin-bottom">10pt</xsl:attribute>
12477
+ <xsl:attribute name="space-before">36pt</xsl:attribute>
12478
+ <xsl:attribute name="role">SKIP</xsl:attribute>
12479
+ </xsl:attribute-set>
12480
+
12481
+ <xsl:attribute-set name="toc-listof-item-block-style">
12482
+ </xsl:attribute-set>
12483
+
12484
+ <xsl:attribute-set name="toc-listof-item-style">
12485
+ <xsl:attribute name="role">TOCI</xsl:attribute>
12486
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
12487
+ <xsl:attribute name="margin-top">2pt</xsl:attribute>
12488
+ </xsl:attribute-set>
12489
+
12409
12490
  <xsl:template name="processPrefaceSectionsDefault_Contents">
12410
12491
  <xsl:variable name="nodes_preface_">
12411
12492
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -27,13 +27,7 @@
27
27
  <xsl:variable name="color_text_title" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'color-text-title']/mn:value"/>
28
28
  <xsl:variable name="color_table_header_row" select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata[mn:name = 'color-background-table-header']/mn:value"/>
29
29
 
30
- <xsl:attribute-set name="title-toc-style">
31
- <xsl:attribute name="font-size">26pt</xsl:attribute>
32
- <xsl:attribute name="border-bottom">2pt solid rgb(21, 43, 77)</xsl:attribute>
33
- <xsl:attribute name="keep-with-next">always</xsl:attribute>
34
- </xsl:attribute-set>
35
-
36
- <xsl:attribute-set name="title-depth1-style" use-attribute-sets="title-toc-style">
30
+ <xsl:attribute-set name="title-depth1-style" use-attribute-sets="toc-title-style">
37
31
  <xsl:attribute name="font-family">Lato</xsl:attribute>
38
32
  <xsl:attribute name="color">rgb(59, 56, 56)</xsl:attribute>
39
33
  <xsl:attribute name="margin-top">18pt</xsl:attribute>
@@ -377,7 +371,7 @@
377
371
  </xsl:call-template>
378
372
  </xsl:template> <!-- END: processPrefaceAndMainSectionsOGC_items -->
379
373
 
380
- <xsl:template match="mn:preface//mn:clause[@type = 'toc']" priority="4">
374
+ <xsl:template match="mn:preface//mn:clause[@type = 'toc']" name="toc" priority="4">
381
375
  <fo:block break-after="page"/>
382
376
  <fo:block-container line-height="1.08" font-family="Lato">
383
377
 
@@ -389,17 +383,19 @@
389
383
 
390
384
  <xsl:if test="count(*) = 1 and mn:fmt-title"> <!-- if there isn't user ToC -->
391
385
 
392
- <xsl:variable name="margin-left">3.9</xsl:variable>
393
386
  <xsl:for-each select="$contents//mnx:item[@display = 'true']">
394
- <fo:block margin-top="8pt" margin-bottom="5pt" margin-left="{(@level - 1) * $margin-left}mm" text-align-last="justify" role="TOCI">
387
+ <fo:block xsl:use-attribute-sets="toc-item-style">
388
+
389
+ <xsl:call-template name="refine_toc-item-style"/>
390
+
395
391
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mnx:title}">
396
392
  <xsl:if test="@section != ''">
397
393
  <xsl:value-of select="@section"/><xsl:text> </xsl:text>
398
394
  </xsl:if>
399
395
  <xsl:apply-templates select="mnx:title"/>
400
396
  <fo:inline keep-together.within-line="always">
401
- <fo:leader leader-pattern="dots"/>
402
- <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
397
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
398
+ <fo:inline xsl:use-attribute-sets="toc-pagenumber-style"><fo:page-number-citation ref-id="{@id}"/></fo:inline>
403
399
  </fo:inline>
404
400
  </fo:basic-link>
405
401
  </fo:block>
@@ -408,18 +404,18 @@
408
404
  <xsl:if test="//mn:figure[@id and mn:fmt-name] or //mn:table[@id and mn:fmt-name]">
409
405
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
410
406
  <fo:block font-size="11pt" margin-top="8pt"> </fo:block>
411
- <fo:block xsl:use-attribute-sets="title-toc-style">
407
+ <fo:block xsl:use-attribute-sets="toc-title-style">
412
408
  <!-- <xsl:text>Table of Figures</xsl:text> -->
413
409
  <xsl:call-template name="getLocalizedString">
414
410
  <xsl:with-param name="key">table_of_figures</xsl:with-param>
415
411
  </xsl:call-template>
416
412
  </fo:block>
417
413
  <xsl:for-each select="//mn:figure[@id and mn:fmt-name] | //mn:table[@id and mn:fmt-name]">
418
- <fo:block margin-top="8pt" margin-bottom="5pt" text-align-last="justify" role="TOCI">
414
+ <fo:block xsl:use-attribute-sets="toc-listof-item-style">
419
415
  <fo:basic-link internal-destination="{@id}" fox:alt-text="{mn:fmt-name}">
420
416
  <xsl:apply-templates select="mn:fmt-name" mode="contents"/>
421
417
  <fo:inline keep-together.within-line="always">
422
- <fo:leader leader-pattern="dots"/>
418
+ <fo:leader xsl:use-attribute-sets="toc-leader-style"/>
423
419
  <fo:page-number-citation ref-id="{@id}"/>
424
420
  </fo:inline>
425
421
  </fo:basic-link>
@@ -432,7 +428,7 @@
432
428
  </xsl:template>
433
429
 
434
430
  <xsl:template match="mn:preface//mn:clause[@type = 'toc']/mn:fmt-title" priority="3">
435
- <fo:block xsl:use-attribute-sets="title-toc-style" role="H1">
431
+ <fo:block xsl:use-attribute-sets="toc-title-style" role="H1">
436
432
  <!-- <xsl:call-template name="getTitle">
437
433
  <xsl:with-param name="name" select="'title-toc'"/>
438
434
  </xsl:call-template> -->
@@ -5869,6 +5865,16 @@
5869
5865
  </xsl:variable>
5870
5866
  <xsl:variable name="quot">"</xsl:variable>
5871
5867
  <xsl:variable name="styles_">
5868
+ <!-- PDF: Borderless tables https://github.com/metanorma/metanorma-jis/issues/344 -->
5869
+ <xsl:if test="@plain = 'true' or ancestor::mn:table/@plain = 'true'">
5870
+ <style name="border-top">none</style>
5871
+ <style name="border-right">none</style>
5872
+ <style name="border-left">none</style>
5873
+ <style name="border-bottom">none</style>
5874
+ <style name="color">inherit</style>
5875
+ <style name="background-color">transparent</style>
5876
+ </xsl:if>
5877
+
5872
5878
  <xsl:for-each select="xalan:nodeset($styles__)/mnx:item">
5873
5879
  <xsl:variable name="key" select="normalize-space(substring-before(., ':'))"/>
5874
5880
  <xsl:variable name="value" select="normalize-space(substring-after(translate(.,$quot,''), ':'))"/>
@@ -7874,7 +7880,10 @@
7874
7880
 
7875
7881
  <xsl:call-template name="setNamedDestination"/>
7876
7882
 
7877
- <fo:block-container id="{@id}" xsl:use-attribute-sets="note-style" role="SKIP">
7883
+ <fo:block-container xsl:use-attribute-sets="note-style" role="SKIP">
7884
+ <xsl:if test="not(parent::mn:references)">
7885
+ <xsl:copy-of select="@id"/>
7886
+ </xsl:if>
7878
7887
 
7879
7888
  <xsl:call-template name="setBlockSpanAll"/>
7880
7889
 
@@ -10567,8 +10576,8 @@
10567
10576
  </xsl:template> <!-- bibitem -->
10568
10577
 
10569
10578
  <!-- Bibliography (non-normative references) -->
10570
- <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem" name="bibitem_non_normative" priority="2">
10571
- <xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][self::mn:bibitem] and 1 = 1)"/> <!-- current bibiitem is non-first --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10579
+ <xsl:template match="mn:references[not(@normative='true')]/mn:bibitem | mn:references[not(@normative='true')]/mn:note" name="bibitem_non_normative" priority="2">
10580
+ <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 --> <!-- $namespace = 'csd' or $namespace = 'gb' or $namespace = 'iec' or $namespace = 'ieee' or $namespace = 'iso' or $namespace = 'jcgm' or $namespace = 'm3d' or
10572
10581
  $namespace = 'mpfd' or $namespace = 'ogc' or $namespace = 'ogc-white-paper' -->
10573
10582
  <!-- Example: [1] ISO 9:1995, Information and documentation – Transliteration of Cyrillic characters into Latin characters – Slavic and non-Slavic languages -->
10574
10583
  <xsl:call-template name="setNamedDestination"/>
@@ -10620,7 +10629,7 @@
10620
10629
  </fo:list-item>
10621
10630
  </xsl:otherwise>
10622
10631
  </xsl:choose>
10623
- <xsl:apply-templates select="following-sibling::*[1][self::mn:bibitem]">
10632
+ <xsl:apply-templates select="following-sibling::*[1]"> <!-- [self::mn:bibitem] -->
10624
10633
  <xsl:with-param name="skip">false</xsl:with-param>
10625
10634
  </xsl:apply-templates>
10626
10635
  </xsl:template>
@@ -10637,8 +10646,26 @@
10637
10646
  </xsl:apply-templates>
10638
10647
  <xsl:apply-templates select="mn:formattedref"/>
10639
10648
  <!-- end bibitem processing -->
10649
+
10650
+ <xsl:call-template name="processBibliographyNote"/>
10640
10651
  </xsl:template> <!-- processBibitem (bibitem) -->
10641
10652
 
10653
+ <xsl:template name="processBibliographyNote">
10654
+ <xsl:if test="self::mn:note">
10655
+ <xsl:variable name="note_node">
10656
+ <xsl:element name="{local-name(..)}" namespace="{$namespace_full}"> <!-- save parent context node for determining styles -->
10657
+ <xsl:copy> <!-- skip @id -->
10658
+ <xsl:copy-of select="node()"/>
10659
+ </xsl:copy>
10660
+ </xsl:element>
10661
+ </xsl:variable>
10662
+ <!-- <xsl:for-each select="xalan:nodeset($note_node)//mn:note">
10663
+ <xsl:call-template name="note"/>
10664
+ </xsl:for-each> -->
10665
+ <xsl:call-template name="note"/>
10666
+ </xsl:if>
10667
+ </xsl:template>
10668
+
10642
10669
  <xsl:template match="mn:title" mode="title">
10643
10670
  <fo:inline><xsl:apply-templates/></fo:inline>
10644
10671
  </xsl:template>
@@ -11184,6 +11211,61 @@
11184
11211
  <!-- End Form's elements processing -->
11185
11212
  <!-- =================== -->
11186
11213
 
11214
+ <xsl:attribute-set name="toc-style">
11215
+ </xsl:attribute-set>
11216
+
11217
+ <xsl:template name="refine_toc-style">
11218
+ </xsl:template>
11219
+
11220
+ <xsl:attribute-set name="toc-title-style">
11221
+ <xsl:attribute name="font-size">26pt</xsl:attribute>
11222
+ <xsl:attribute name="border-bottom">2pt solid rgb(21, 43, 77)</xsl:attribute>
11223
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
11224
+ </xsl:attribute-set>
11225
+
11226
+ <xsl:attribute-set name="toc-title-page-style">
11227
+ </xsl:attribute-set> <!-- toc-title-page-style -->
11228
+
11229
+ <xsl:attribute-set name="toc-item-block-style">
11230
+ </xsl:attribute-set>
11231
+
11232
+ <xsl:template name="refine_toc-item-block-style">
11233
+ </xsl:template>
11234
+
11235
+ <xsl:attribute-set name="toc-item-style">
11236
+ <xsl:attribute name="role">TOCI</xsl:attribute>
11237
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
11238
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
11239
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
11240
+ <xsl:attribute name="role">TOCI</xsl:attribute>
11241
+ </xsl:attribute-set> <!-- END: toc-item-style -->
11242
+
11243
+ <xsl:template name="refine_toc-item-style">
11244
+ <xsl:variable name="margin-left">3.9</xsl:variable>
11245
+ <xsl:attribute name="margin-left"><xsl:value-of select="(@level - 1) * $margin-left"/>mm</xsl:attribute>
11246
+ </xsl:template> <!-- END: refine_toc-item-style -->
11247
+
11248
+ <xsl:attribute-set name="toc-leader-style">
11249
+ <xsl:attribute name="leader-pattern">dots</xsl:attribute>
11250
+ </xsl:attribute-set> <!-- END: toc-leader-style -->
11251
+
11252
+ <xsl:attribute-set name="toc-pagenumber-style">
11253
+ </xsl:attribute-set>
11254
+
11255
+ <!-- List of Figures, Tables -->
11256
+ <xsl:attribute-set name="toc-listof-title-style">
11257
+ </xsl:attribute-set>
11258
+
11259
+ <xsl:attribute-set name="toc-listof-item-block-style">
11260
+ </xsl:attribute-set>
11261
+
11262
+ <xsl:attribute-set name="toc-listof-item-style">
11263
+ <xsl:attribute name="role">TOCI</xsl:attribute>
11264
+ <xsl:attribute name="margin-top">8pt</xsl:attribute>
11265
+ <xsl:attribute name="margin-bottom">5pt</xsl:attribute>
11266
+ <xsl:attribute name="text-align-last">justify</xsl:attribute>
11267
+ </xsl:attribute-set>
11268
+
11187
11269
  <xsl:template name="processPrefaceSectionsDefault_Contents">
11188
11270
  <xsl:variable name="nodes_preface_">
11189
11271
  <xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition or @type = 'toc')]">
@@ -101,8 +101,9 @@ module IsoDoc
101
101
  end
102
102
 
103
103
  def dochistory_description(item)
104
- d = item.at(ns("./amend/description")) or return ""
105
- d.children.to_xml
104
+ d = item.xpath(ns("./amend/description"))
105
+ d.empty? and return ""
106
+ d.map { |d1| semx_fmt_dup(d1).to_xml }.join("\n")
106
107
  end
107
108
 
108
109
  def dochistory_location(item)
@@ -198,14 +198,14 @@ Applicable to modify and delete</a:documentation>
198
198
  </zeroOrMore>
199
199
  </element>
200
200
  </optional>
201
- <optional>
201
+ <zeroOrMore>
202
202
  <element name="description">
203
- <a:documentation>Description of the change described in this block</a:documentation>
204
- <zeroOrMore>
203
+ <a:documentation>Description(s) of the change described in this block</a:documentation>
204
+ <oneOrMore>
205
205
  <ref name="BasicBlock"/>
206
- </zeroOrMore>
206
+ </oneOrMore>
207
207
  </element>
208
- </optional>
208
+ </zeroOrMore>
209
209
  <optional>
210
210
  <element name="newcontent">
211
211
  <a:documentation>New content to be added to the document; applicable to add and modify</a:documentation>
@@ -1,6 +1,6 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
2
  <grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
3
- <!-- VERSION v2.0.8 -->
3
+ <!-- VERSION v2.1.0 -->
4
4
 
5
5
  <!--
6
6
  ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
@@ -735,6 +735,12 @@ titlecase, or lowercase</a:documentation>
735
735
  <ref name="BlockAttributes"/>
736
736
  </define>
737
737
  <define name="TableAttributes" combine="interleave">
738
+ <optional>
739
+ <attribute name="plain">
740
+ <a:documentation>Render as a plain attribute, with no shading or borders</a:documentation>
741
+ <data type="boolean"/>
742
+ </attribute>
743
+ </optional>
738
744
  <optional>
739
745
  <attribute name="width">
740
746
  <a:documentation>Width of the table block in rendering</a:documentation>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Ogc
3
- VERSION = "2.7.10".freeze
3
+ VERSION = "2.8.0".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-ogc
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.10
4
+ version: 2.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-05 00:00:00.000000000 Z
11
+ date: 2025-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: iso-639