metanorma-cc 1.7.11 → 1.7.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1a6ac48185b38e14f7918b96cd5a3e2380c791e5550a9fe15c742603226e95bd
4
- data.tar.gz: '07259b1161b45eb3597833e8af35528f96fb7cef886ac6f44f5ed9f795165743'
3
+ metadata.gz: 34a69b49794bfd82ed53dc500231363b0920d187639a8a537668c893b3efd5c4
4
+ data.tar.gz: 3f0f2d66bec679783a7d1209520b30cd174908e36f66778fb45a6484ac0b1633
5
5
  SHA512:
6
- metadata.gz: 5be76dd1739b18c9e7b08d1a47a9ef73b5fe94c6f42228bb64db24abe9faa96f8e324217fbbb5a67fb0c04930e9d0026ef4c667e29c20d516f0535ed2c20e30f
7
- data.tar.gz: 9f7775c02f07d64d9a51f7425210ce947e795341a15c2ee8975532640ca92a9e421da63969f9dfd3f7441260f6b24b0dfd4cd01d5817c443cb5556c61f1b96d5
6
+ metadata.gz: d32c8758ffad083ddf6ac753f5210978d8d1d08c6e0fef240871ac78575a11c8b95434f5572f2e9d4dd348a106344b89d7f27c66b383b234a6e7889ba553fe77
7
+ data.tar.gz: cb5a314defae0bf1c935e615a92a282daf7ab960c3ba007785c06457f3b647a4cc04d5dc4a4dd31d5b5ab25b3c9ebd82fbbaf4ec19f942231320001b949237c1
@@ -1036,6 +1036,7 @@
1036
1036
  <ref name="svgmap"/>
1037
1037
  <ref name="inputform"/>
1038
1038
  <ref name="toc"/>
1039
+ <ref name="passthrough"/>
1039
1040
  </choice>
1040
1041
  </define>
1041
1042
  <define name="toc">
@@ -1043,6 +1044,14 @@
1043
1044
  <ref name="ul"/>
1044
1045
  </element>
1045
1046
  </define>
1047
+ <define name="passthrough">
1048
+ <element name="passthrough">
1049
+ <optional>
1050
+ <attribute name="formats"/>
1051
+ </optional>
1052
+ <text/>
1053
+ </element>
1054
+ </define>
1046
1055
  <define name="inputform">
1047
1056
  <element name="form">
1048
1057
  <attribute name="id">
@@ -1368,13 +1368,20 @@
1368
1368
 
1369
1369
  </xsl:attribute-set><xsl:attribute-set name="list-style">
1370
1370
 
1371
- </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
1371
+ </xsl:attribute-set><xsl:attribute-set name="toc-style">
1372
+ <xsl:attribute name="line-height">135%</xsl:attribute>
1373
+ </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
1372
1374
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
1373
1375
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
1374
1376
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
1375
1377
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
1376
1378
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
1377
- </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1379
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
1380
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
1381
+ <xsl:sort select="@displayorder" data-type="number"/>
1382
+ <xsl:apply-templates select="." mode="contents"/>
1383
+ </xsl:for-each>
1384
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
1378
1385
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
1379
1386
 
1380
1387
  <!-- Normative references -->
@@ -1387,13 +1394,33 @@
1387
1394
  <!-- Bibliography -->
1388
1395
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
1389
1396
 
1390
- </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1397
+ </xsl:template><xsl:template name="processMainSectionsDefault_Contents">
1398
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1399
+ <xsl:sort select="@displayorder" data-type="number"/>
1400
+ <xsl:apply-templates select="." mode="contents"/>
1401
+ </xsl:for-each>
1402
+
1403
+ <xsl:for-each select="/*/*[local-name()='annex']">
1404
+ <xsl:sort select="@displayorder" data-type="number"/>
1405
+ <xsl:apply-templates select="." mode="contents"/>
1406
+ </xsl:for-each>
1407
+
1408
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
1409
+ <xsl:sort select="@displayorder" data-type="number"/>
1410
+ <xsl:apply-templates select="." mode="contents"/>
1411
+ </xsl:for-each>
1412
+ </xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
1391
1413
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
1392
1414
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
1393
1415
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
1394
1416
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
1395
1417
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
1396
- </xsl:template><xsl:template name="processMainSectionsDefault">
1418
+ </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1419
+ <xsl:for-each select="/*/*[local-name()='preface']/*">
1420
+ <xsl:sort select="@displayorder" data-type="number"/>
1421
+ <xsl:apply-templates select="."/>
1422
+ </xsl:for-each>
1423
+ </xsl:template><xsl:template name="OLD_processMainSectionsDefault">
1397
1424
  <xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
1398
1425
 
1399
1426
  <!-- Normative references -->
@@ -1405,6 +1432,22 @@
1405
1432
  <xsl:apply-templates select="/*/*[local-name()='annex']"/>
1406
1433
  <!-- Bibliography -->
1407
1434
  <xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
1435
+ </xsl:template><xsl:template name="processMainSectionsDefault">
1436
+ <xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
1437
+ <xsl:sort select="@displayorder" data-type="number"/>
1438
+ <xsl:apply-templates select="."/>
1439
+
1440
+ </xsl:for-each>
1441
+
1442
+ <xsl:for-each select="/*/*[local-name()='annex']">
1443
+ <xsl:sort select="@displayorder" data-type="number"/>
1444
+ <xsl:apply-templates select="."/>
1445
+ </xsl:for-each>
1446
+
1447
+ <xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
1448
+ <xsl:sort select="@displayorder" data-type="number"/>
1449
+ <xsl:apply-templates select="."/>
1450
+ </xsl:for-each>
1408
1451
  </xsl:template><xsl:template match="text()">
1409
1452
  <xsl:value-of select="."/>
1410
1453
  </xsl:template><xsl:template match="*[local-name()='br']">
@@ -3901,6 +3944,13 @@
3901
3944
  </xsl:attribute>
3902
3945
  <xsl:apply-templates mode="svg_update"/>
3903
3946
  </xsl:copy>
3947
+ </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
3948
+ <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
3949
+ <xsl:for-each select="*[local-name() = 'svg']">
3950
+ <xsl:call-template name="image_svg">
3951
+ <xsl:with-param name="name" select="$name"/>
3952
+ </xsl:call-template>
3953
+ </xsl:for-each>
3904
3954
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
3905
3955
  <xsl:variable name="svg_content" select="document(@src)"/>
3906
3956
  <xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
@@ -4005,7 +4055,7 @@
4005
4055
  </fo:basic-link>
4006
4056
  </fo:block>
4007
4057
  </fo:block-container>
4008
- </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4058
+ </xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
4009
4059
  <xsl:apply-templates mode="contents"/>
4010
4060
  <xsl:text> </xsl:text>
4011
4061
  </xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
@@ -4685,14 +4735,15 @@
4685
4735
  </xsl:if>
4686
4736
  </xsl:template><xsl:variable name="localized.source">
4687
4737
  <xsl:call-template name="getLocalizedString">
4688
- <xsl:with-param name="key">source</xsl:with-param>
4689
- </xsl:call-template>
4738
+ <xsl:with-param name="key">source</xsl:with-param>
4739
+ </xsl:call-template>
4690
4740
  </xsl:variable><xsl:template match="*[local-name() = 'origin']">
4691
4741
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
4692
4742
  <xsl:if test="normalize-space(@citeas) = ''">
4693
4743
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
4694
4744
  </xsl:if>
4695
4745
 
4746
+
4696
4747
  <fo:inline>
4697
4748
 
4698
4749
 
@@ -4700,6 +4751,7 @@
4700
4751
 
4701
4752
 
4702
4753
 
4754
+
4703
4755
  <xsl:call-template name="getTitle">
4704
4756
  <xsl:with-param name="name" select="'title-source'"/>
4705
4757
  </xsl:call-template>
@@ -4711,6 +4763,7 @@
4711
4763
  <fo:inline xsl:use-attribute-sets="origin-style">
4712
4764
  <xsl:apply-templates/>
4713
4765
  </fo:inline>
4766
+
4714
4767
  </fo:basic-link>
4715
4768
  </xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
4716
4769
  <fo:inline><xsl:apply-templates/></fo:inline>
@@ -4777,6 +4830,9 @@
4777
4830
 
4778
4831
  </xsl:if>
4779
4832
 
4833
+ <xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
4834
+ <xsl:variable name="text" select="normalize-space()"/>
4835
+
4780
4836
 
4781
4837
 
4782
4838
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
@@ -4792,7 +4848,9 @@
4792
4848
 
4793
4849
 
4794
4850
  </xsl:if>
4795
-
4851
+
4852
+
4853
+
4796
4854
  <xsl:apply-templates/>
4797
4855
  </fo:basic-link>
4798
4856
 
@@ -5300,9 +5358,97 @@
5300
5358
  <fo:block-container border="1pt solid black" width="50%">
5301
5359
  <fo:block> </fo:block>
5302
5360
  </fo:block-container>
5361
+ </xsl:template><xsl:template match="*[local-name() = 'toc']">
5362
+ <xsl:param name="colwidths"/>
5363
+ <xsl:variable name="colwidths_">
5364
+ <xsl:choose>
5365
+ <xsl:when test="not($colwidths)">
5366
+ <xsl:variable name="toc_table_simple">
5367
+ <tbody>
5368
+ <xsl:apply-templates mode="toc_table_width"/>
5369
+ </tbody>
5370
+ </xsl:variable>
5371
+ <xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
5372
+ <xsl:call-template name="calculate-column-widths">
5373
+ <xsl:with-param name="cols-count" select="$cols-count"/>
5374
+ <xsl:with-param name="table" select="$toc_table_simple"/>
5375
+ </xsl:call-template>
5376
+ </xsl:when>
5377
+ <xsl:otherwise>
5378
+ <xsl:copy-of select="$colwidths"/>
5379
+ </xsl:otherwise>
5380
+ </xsl:choose>
5381
+ </xsl:variable>
5382
+ <fo:block role="TOCI" space-after="16pt">
5383
+ <fo:table width="100%" table-layout="fixed">
5384
+ <xsl:for-each select="xalan:nodeset($colwidths_)/column">
5385
+ <fo:table-column column-width="proportional-column-width({.})"/>
5386
+ </xsl:for-each>
5387
+ <fo:table-body>
5388
+ <xsl:apply-templates/>
5389
+ </fo:table-body>
5390
+ </fo:table>
5391
+ </fo:block>
5392
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
5393
+ <fo:table-row min-height="5mm">
5394
+ <xsl:apply-templates/>
5395
+ </fo:table-row>
5396
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
5397
+ <xsl:apply-templates/>
5398
+ </xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
5399
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
5400
+ <xsl:variable name="target" select="@target"/>
5401
+ <xsl:for-each select="*[local-name() = 'tab']">
5402
+ <xsl:variable name="current_id" select="generate-id()"/>
5403
+ <fo:table-cell>
5404
+ <fo:block>
5405
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
5406
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
5407
+ <xsl:choose>
5408
+ <xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
5409
+ <xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
5410
+ </xsl:choose>
5411
+ </xsl:for-each>
5412
+ </fo:basic-link>
5413
+ </fo:block>
5414
+ </fo:table-cell>
5415
+ </xsl:for-each>
5416
+ <!-- last column - for page numbers -->
5417
+ <fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
5418
+ <fo:block>
5419
+ <fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
5420
+ <fo:page-number-citation ref-id="{$target}"/>
5421
+ </fo:basic-link>
5422
+ </fo:block>
5423
+ </fo:table-cell>
5424
+ </xsl:template><xsl:template match="*" mode="toc_table_width">
5425
+ <xsl:apply-templates mode="toc_table_width"/>
5426
+ </xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
5427
+ <tr>
5428
+ <xsl:apply-templates mode="toc_table_width"/>
5429
+ </tr>
5430
+ </xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
5431
+ <!-- <xref target="cgpm9th1948r6">1.6.3<tab/>&#8220;9th CGPM, 1948:<tab/>decision to establish the SI&#8221;</xref> -->
5432
+ <xsl:for-each select="*[local-name() = 'tab']">
5433
+ <xsl:variable name="current_id" select="generate-id()"/>
5434
+ <td>
5435
+ <xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
5436
+ <xsl:copy-of select="."/>
5437
+ </xsl:for-each>
5438
+ </td>
5439
+ </xsl:for-each>
5440
+ <td>333</td> <!-- page number, just for fill -->
5303
5441
  </xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
5304
5442
  <fo:inline padding-right="5mm"> </fo:inline>
5305
5443
  <fo:inline><xsl:apply-templates/></fo:inline>
5444
+ </xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
5445
+ <fo:inline padding-right="2.5mm" baseline-shift="5%">
5446
+ <fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
5447
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
5448
+ <rect x="0" y="0" width="2" height="2" fill="black"/>
5449
+ </svg>
5450
+ </fo:instream-foreign-object>
5451
+ </fo:inline>
5306
5452
  </xsl:template><xsl:template name="convertDate">
5307
5453
  <xsl:param name="date"/>
5308
5454
  <xsl:param name="format" select="'short'"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module CC
3
- VERSION = "1.7.11".freeze
3
+ VERSION = "1.7.12".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-cc
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.11
4
+ version: 1.7.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-13 00:00:00.000000000 Z
11
+ date: 2021-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic