metanorma-csd 1.3.20 → 1.3.21

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: 881f43014e3a443f15676ec0b13eebdc423dfdbbc05593f49c8f655293036fd7
4
- data.tar.gz: 1a91dc808a3a96f6693131d068bb98191ef1b4f14a88f0e6975e9c9cc1e18acd
3
+ metadata.gz: 936806335598e863daa7c4b622b555e4744bca614b48232a5ce13dde6b8d8e70
4
+ data.tar.gz: d1dcb4c6bb4c8418558adb3eace94dd0e31ed0d427123e7151f404713f2a300d
5
5
  SHA512:
6
- metadata.gz: f811ae3cc09e60957bd2d838036d2e11ed5edfa0cc6d6c35ece2443133e0d1015fc5a52fb4c31d4876c3eacf783858dc477b47460e6f3464ddbc76be952eeb9a
7
- data.tar.gz: a72826aa9226cd914614e3636b9f2296d09c63cde81d520d4867df5de3cba7a2f691d72953c55b8339cbf1c2e42cfc911ae33d2d9d18431a85245c6cc0f91478
6
+ metadata.gz: f3ea3886c1dd17ef7faba19e3ee66f20ad9c04adbbd44613df9db0b627f43ea11e30324014c38020b881a2ac6abc75eb714113f4fb9e3c7a7c08991f4e87711d
7
+ data.tar.gz: 27e9695f03ebb993ecdfc8b557ca606e609a3edab210d66cc55b120c0ef425f623cfb5ad4e96f66f6933dc2cc140a4cf3a9d162aade1b1f4863cfcf1fab20515
@@ -129,6 +129,9 @@
129
129
  </choice>
130
130
  </attribute>
131
131
  </optional>
132
+ <attribute name="normative">
133
+ <data type="boolean"/>
134
+ </attribute>
132
135
  <optional>
133
136
  <ref name="section-title"/>
134
137
  </optional>
@@ -303,11 +306,11 @@
303
306
  <ref name="paragraph"/>
304
307
  </element>
305
308
  </define>
306
- <define name="TextElement" combine="choice">
307
- <ref name="concept"/>
308
- </define>
309
309
  </include>
310
310
  <!-- end overrides -->
311
+ <define name="TextElement" combine="choice">
312
+ <ref name="concept"/>
313
+ </define>
311
314
  <define name="concept">
312
315
  <element name="concept">
313
316
  <optional>
@@ -7,6 +7,8 @@
7
7
 
8
8
 
9
9
 
10
+ <xsl:variable name="debug">false</xsl:variable>
11
+
10
12
  <xsl:variable name="copyright">
11
13
  <xsl:text>© The Calendaring and Scheduling Consortium, Inc. </xsl:text>
12
14
  <xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:copyright/csd:from"/>
@@ -231,36 +233,31 @@
231
233
  </fo:static-content>
232
234
  <xsl:call-template name="insertHeaderFooter"/>
233
235
  <fo:flow flow-name="xsl-region-body">
234
- <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
235
- DEBUG
236
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
237
- <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
236
+
237
+ <xsl:if test="$debug = 'true'">
238
+ <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
239
+ DEBUG
240
+ contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
241
+ <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
242
+ </xsl:if>
238
243
 
239
244
  <fo:block margin-bottom="15pt"> </fo:block>
240
245
  <fo:block margin-bottom="14pt">
241
246
  <xsl:text>© </xsl:text>
242
247
  <xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:copyright/csd:from"/>
243
- <xsl:text> The Calendaring and Scheduling Consortium, Inc.</xsl:text>
248
+ <xsl:text> </xsl:text>
249
+ <fo:inline>
250
+ <xsl:apply-templates select="/csd:csd-standard/csd:boilerplate/csd:feedback-statement/csd:clause/csd:p[@id = 'boilerplate-name']"/>
251
+ </fo:inline>
244
252
  </fo:block>
245
253
  <fo:block margin-bottom="12pt">
246
- <xsl:text>All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized otherwise in any form or by any means, electronic or mechanical, including photocopying, or posting on the internet or an intranet, without prior written permission. Permission can be requested from the address below. </xsl:text>
254
+ <xsl:apply-templates select="/csd:csd-standard/csd:boilerplate/csd:legal-statement"/>
247
255
  </fo:block>
248
256
  <fo:block margin-bottom="12pt">
249
- <xsl:text>The Calendaring and Scheduling Consortium, Inc.</xsl:text>
257
+ <xsl:apply-templates select="/csd:csd-standard/csd:boilerplate/csd:feedback-statement/csd:clause/csd:p[@id = 'boilerplate-name']"/>
250
258
  </fo:block>
251
259
  <fo:block>
252
- <xsl:text>4390 Chaffin Lane</xsl:text>
253
- <xsl:value-of select="$linebreak"/>
254
- <xsl:text>McKinleyville</xsl:text>
255
- <xsl:value-of select="$linebreak"/>
256
- <xsl:text>California 95519</xsl:text>
257
- <xsl:value-of select="$linebreak"/>
258
- <xsl:text>United States of America</xsl:text>
259
- <xsl:value-of select="$linebreak"/>
260
- <xsl:value-of select="$linebreak"/>
261
- <fo:basic-link external-destination="copyright@calconnect.org" color="blue" text-decoration="underline" fox:alt-text="copyright@calconnect.org">copyright@calconnect.org</fo:basic-link>
262
- <xsl:value-of select="$linebreak"/>
263
- <fo:basic-link external-destination="www.calconnect.org" color="blue" text-decoration="underline" fox:alt-text="www.calconnect.org">www.calconnect.org</fo:basic-link>
260
+ <xsl:apply-templates select="/csd:csd-standard/csd:boilerplate/csd:feedback-statement/csd:clause/csd:p[@id = 'boilerplate-address']"/>
264
261
  </fo:block>
265
262
 
266
263
  <fo:block break-after="page"/>
@@ -692,41 +689,10 @@
692
689
  </xsl:choose>
693
690
  </xsl:if>
694
691
  <xsl:apply-templates/>
695
- </xsl:element>
696
-
697
-
698
- <xsl:choose>
699
- <xsl:when test="$parent-name = 'annex2'">
700
- <fo:block id="{$id}" font-size="16pt" font-weight="bold" text-align="center" margin-bottom="12pt" keep-with-next="always">
701
- <xsl:value-of select="$section"/>
702
- <xsl:if test=" ../@obligation">
703
- <xsl:value-of select="$linebreak"/>
704
- <fo:inline font-weight="normal">(<xsl:value-of select="../@obligation"/>)</fo:inline>
705
- </xsl:if>
706
- <fo:block margin-top="18pt" margin-bottom="48pt"><xsl:apply-templates/></fo:block>
707
- </fo:block>
708
- </xsl:when>
709
- <xsl:when test="$parent-name = 'references2' and $references_num_current != 1"> <!-- Bibliography -->
710
- <fo:block id="{$id}" font-size="16pt" font-weight="bold" color="{$color}" text-align="center" margin-top="6pt" margin-bottom="36pt" keep-with-next="always">
711
- <xsl:apply-templates/>
712
- </fo:block>
713
- </xsl:when>
714
-
715
- <xsl:otherwise>
716
-
717
-
718
- <!-- <xsl:if test="$element-name = 'fo:inline' and not(following-sibling::csd:p)">
719
- <fo:block >
720
- <xsl:value-of select="$linebreak"/>
721
- </fo:block>
722
- </xsl:if> -->
723
- </xsl:otherwise>
724
- </xsl:choose>
725
-
692
+ </xsl:element>
726
693
  </xsl:template>
727
694
 
728
695
 
729
-
730
696
  <xsl:template match="csd:p">
731
697
  <xsl:param name="inline" select="'false'"/>
732
698
  <xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
@@ -735,6 +701,7 @@
735
701
  <xsl:when test="$inline = 'true'">fo:inline</xsl:when>
736
702
  <xsl:when test="../@inline-header = 'true' and $previous-element = 'title'">fo:inline</xsl:when> <!-- first paragraph after inline title -->
737
703
  <xsl:when test="local-name(..) = 'admonition'">fo:inline</xsl:when>
704
+ <xsl:when test="@id = 'boilerplate-name'">fo:inline</xsl:when>
738
705
  <xsl:otherwise>fo:block</xsl:otherwise>
739
706
  </xsl:choose>
740
707
  </xsl:variable>
@@ -972,22 +939,7 @@
972
939
  </fo:list-item-body>
973
940
  </fo:list-item>
974
941
  </xsl:template>
975
-
976
- <xsl:template match="csd:link">
977
- <fo:inline>
978
- <fo:basic-link external-destination="{@target}" color="blue" text-decoration="underline" fox:alt-text="{@target}">
979
- <xsl:choose>
980
- <xsl:when test="normalize-space(.) = ''">
981
- <xsl:value-of select="@target"/>
982
- </xsl:when>
983
- <xsl:otherwise>
984
- <xsl:apply-templates/>
985
- </xsl:otherwise>
986
- </xsl:choose>
987
- </fo:basic-link>
988
- </fo:inline>
989
- </xsl:template>
990
-
942
+
991
943
  <xsl:template match="csd:preferred">
992
944
  <xsl:param name="sectionNum"/>
993
945
  <xsl:variable name="section">
@@ -1047,9 +999,9 @@
1047
999
  <fo:basic-link internal-destination="{csd:origin/@bibitemid}" fox:alt-text="{csd:origin/@citeas}">
1048
1000
  <xsl:text>[SOURCE: </xsl:text>
1049
1001
  <xsl:value-of select="csd:origin/@citeas"/>
1050
- <xsl:if test="csd:origin/csd:locality/csd:referenceFrom">
1051
- <xsl:text>, </xsl:text><xsl:value-of select="csd:origin/csd:locality/csd:referenceFrom"/>
1052
- </xsl:if>
1002
+
1003
+ <xsl:apply-templates select="csd:origin/csd:localityStack"/>
1004
+
1053
1005
  </fo:basic-link>
1054
1006
  <xsl:apply-templates select="csd:modification"/>
1055
1007
  <xsl:text>]</xsl:text>
@@ -1170,10 +1122,7 @@
1170
1122
  <xsl:template match="csd:source">
1171
1123
  <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
1172
1124
  <xsl:value-of select="@citeas" disable-output-escaping="yes"/>
1173
- <xsl:if test="csd:locality">
1174
- <xsl:text>, </xsl:text>
1175
- <xsl:apply-templates select="csd:locality"/>
1176
- </xsl:if>
1125
+ <xsl:apply-templates select="csd:localityStack"/>
1177
1126
  </fo:basic-link>
1178
1127
  </xsl:template>
1179
1128
 
@@ -1322,15 +1271,7 @@
1322
1271
  </xsl:when>
1323
1272
  <xsl:otherwise/>
1324
1273
  </xsl:choose>
1325
- <xsl:if test="csd:locality">
1326
- <xsl:text>, </xsl:text>
1327
- <!-- <xsl:choose>
1328
- <xsl:when test="csd:locality/@type = 'section'">Section </xsl:when>
1329
- <xsl:when test="csd:locality/@type = 'clause'">Clause </xsl:when>
1330
- <xsl:otherwise></xsl:otherwise>
1331
- </xsl:choose> -->
1332
- <xsl:apply-templates select="csd:locality"/>
1333
- </xsl:if>
1274
+ <xsl:apply-templates select="csd:localityStack"/>
1334
1275
  </fo:basic-link>
1335
1276
  </xsl:template>
1336
1277
 
@@ -1566,11 +1507,17 @@
1566
1507
  <xsl:value-of select="$section"/>
1567
1508
  </xsl:template>
1568
1509
 
1569
- <xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'&#8232;'"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
1510
+ <xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="lower">abcdefghijklmnopqrstuvwxyz</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="upper">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="en_chars" select="concat($lower,$upper,',.`1234567890-=~!@#$%^*()_+[]{}\|?/')"/><xsl:variable xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="linebreak" select="'&#8232;'"/><xsl:attribute-set xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="link-style">
1511
+
1512
+ <xsl:attribute name="color">blue</xsl:attribute>
1513
+ <xsl:attribute name="text-decoration">underline</xsl:attribute>
1514
+
1515
+
1516
+ </xsl:attribute-set><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()">
1570
1517
  <xsl:value-of select="."/>
1571
1518
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='br']">
1572
1519
  <xsl:value-of select="$linebreak"/>
1573
- </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text()" priority="1">
1520
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
1574
1521
  <xsl:call-template name="add-zero-spaces"/>
1575
1522
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']">
1576
1523
 
@@ -1586,7 +1533,9 @@
1586
1533
 
1587
1534
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
1588
1535
 
1589
-
1536
+ <!-- <xsl:if test="$namespace = 'iso'">
1537
+ <fo:block space-before="6pt">&#xA0;</fo:block>
1538
+ </xsl:if> -->
1590
1539
 
1591
1540
  <xsl:choose>
1592
1541
  <xsl:when test="@unnumbered = 'true'"/>
@@ -1600,6 +1549,8 @@
1600
1549
 
1601
1550
 
1602
1551
 
1552
+
1553
+
1603
1554
  <xsl:text>Table </xsl:text>
1604
1555
  <xsl:choose>
1605
1556
  <xsl:when test="ancestor::*[local-name()='executivesummary']"> <!-- NIST -->
@@ -1612,6 +1563,8 @@
1612
1563
 
1613
1564
 
1614
1565
 
1566
+
1567
+
1615
1568
  <xsl:number format="A-1" level="multiple" count="*[local-name()='annex'] | *[local-name()='table'][not(@unnumbered) or @unnumbered != 'true'] "/>
1616
1569
 
1617
1570
  </xsl:when>
@@ -1667,11 +1620,11 @@
1667
1620
  </xsl:call-template>
1668
1621
  </xsl:variable>
1669
1622
 
1670
- <xsl:variable name="colwidths2">
1623
+ <!-- <xsl:variable name="colwidths2">
1671
1624
  <xsl:call-template name="calculate-column-widths">
1672
1625
  <xsl:with-param name="cols-count" select="$cols-count"/>
1673
1626
  </xsl:call-template>
1674
- </xsl:variable>
1627
+ </xsl:variable> -->
1675
1628
 
1676
1629
  <!-- cols-count=<xsl:copy-of select="$cols-count"/>
1677
1630
  colwidthsNew=<xsl:copy-of select="$colwidths"/>
@@ -1691,7 +1644,9 @@
1691
1644
 
1692
1645
 
1693
1646
 
1694
- <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm">
1647
+
1648
+ <fo:table id="{@id}" table-layout="fixed" width="100%" margin-left="{$margin-left}mm" margin-right="{$margin-left}mm" table-omit-footer-at-break="true">
1649
+
1695
1650
 
1696
1651
 
1697
1652
 
@@ -1715,6 +1670,9 @@
1715
1670
  </xsl:for-each>
1716
1671
  <xsl:apply-templates/>
1717
1672
  </fo:table>
1673
+
1674
+
1675
+
1718
1676
  </fo:block-container>
1719
1677
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table']/*[local-name()='name']" mode="process">
1720
1678
  <xsl:apply-templates/>
@@ -1768,9 +1726,13 @@
1768
1726
  </xsl:when>
1769
1727
  <xsl:otherwise>
1770
1728
  <xsl:for-each select="xalan:nodeset($table)//tr">
1729
+ <xsl:variable name="td_text">
1730
+ <xsl:apply-templates select="td[$curr-col]" mode="td_text"/>
1731
+ </xsl:variable>
1771
1732
  <xsl:variable name="words">
1772
1733
  <xsl:call-template name="tokenize">
1773
- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/>
1734
+ <!-- <xsl:with-param name="text" select="translate(td[$curr-col],'- —:', ' ')"/> -->
1735
+ <xsl:with-param name="text" select="translate(normalize-space($td_text),'- —:', ' ')"/>
1774
1736
  </xsl:call-template>
1775
1737
  </xsl:variable>
1776
1738
  <xsl:variable name="max_length">
@@ -1811,58 +1773,82 @@
1811
1773
  <xsl:with-param name="table" select="$table"/>
1812
1774
  </xsl:call-template>
1813
1775
  </xsl:if>
1776
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="text()" mode="td_text">
1777
+ <xsl:variable name="zero-space">​</xsl:variable>
1778
+ <xsl:value-of select="translate(., $zero-space, ' ')"/><xsl:text> </xsl:text>
1814
1779
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='table2']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='thead']" mode="process">
1815
- <!-- <fo:table-header font-weight="bold">
1816
- <xsl:apply-templates />
1817
- </fo:table-header> -->
1818
- <xsl:apply-templates/>
1780
+ <!-- font-weight="bold" -->
1781
+ <fo:table-header>
1782
+ <xsl:apply-templates/>
1783
+ </fo:table-header>
1819
1784
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tfoot']" mode="process">
1820
1785
  <xsl:apply-templates/>
1786
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" name="insertTableFooter">
1787
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
1788
+ <xsl:if test="../*[local-name()='tfoot'] or $isNoteOrFnExist = 'true'">
1789
+
1790
+ <fo:table-footer>
1791
+
1792
+ <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1793
+
1794
+ <!-- if there are note(s) or fn(s) then create footer row -->
1795
+ <xsl:if test="$isNoteOrFnExist = 'true'">
1796
+
1797
+ <xsl:variable name="cols-count">
1798
+ <xsl:choose>
1799
+ <xsl:when test="../*[local-name()='thead']">
1800
+ <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
1801
+ <xsl:call-template name="calculate-columns-numbers">
1802
+ <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
1803
+ </xsl:call-template>
1804
+ </xsl:when>
1805
+ <xsl:otherwise>
1806
+ <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
1807
+ <xsl:call-template name="calculate-columns-numbers">
1808
+ <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
1809
+ </xsl:call-template>
1810
+ </xsl:otherwise>
1811
+ </xsl:choose>
1812
+ </xsl:variable>
1813
+
1814
+ <fo:table-row>
1815
+ <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1816
+
1817
+
1818
+
1819
+ <!-- fn will be processed inside 'note' processing -->
1820
+
1821
+
1822
+ <!-- except gb -->
1823
+
1824
+ <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1825
+
1826
+
1827
+ <!-- horizontal row separator -->
1828
+
1829
+
1830
+ <!-- fn processing -->
1831
+ <xsl:call-template name="fn_display"/>
1832
+
1833
+ </fo:table-cell>
1834
+ </fo:table-row>
1835
+
1836
+ </xsl:if>
1837
+ </fo:table-footer>
1838
+
1839
+ </xsl:if>
1821
1840
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tbody']">
1822
- <xsl:variable name="cols-count">
1823
- <xsl:choose>
1824
- <xsl:when test="../*[local-name()='thead']">
1825
- <!-- <xsl:value-of select="count(../*[local-name()='thead']/*[local-name()='tr']/*[local-name()='th'])"/> -->
1826
- <xsl:call-template name="calculate-columns-numbers">
1827
- <xsl:with-param name="table-row" select="../*[local-name()='thead']/*[local-name()='tr'][1]"/>
1828
- </xsl:call-template>
1829
- </xsl:when>
1830
- <xsl:otherwise>
1831
- <!-- <xsl:value-of select="count(./*[local-name()='tr'][1]/*[local-name()='td'])"/> -->
1832
- <xsl:call-template name="calculate-columns-numbers">
1833
- <xsl:with-param name="table-row" select="./*[local-name()='tr'][1]"/>
1834
- </xsl:call-template>
1835
- </xsl:otherwise>
1836
- </xsl:choose>
1837
- </xsl:variable>
1838
-
1841
+
1842
+ <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
1843
+
1844
+ <xsl:call-template name="insertTableFooter"/>
1845
+
1839
1846
  <fo:table-body>
1840
- <xsl:apply-templates select="../*[local-name()='thead']" mode="process"/>
1841
1847
  <xsl:apply-templates/>
1842
- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/>
1843
- <!-- if there are note(s) or fn(s) then create footer row -->
1844
- <xsl:if test="../*[local-name()='note'] or ..//*[local-name()='fn'][local-name(..) != 'name']">
1845
- <fo:table-row>
1846
- <fo:table-cell border="solid black 1pt" padding-left="1mm" padding-right="1mm" padding-top="1mm" number-columns-spanned="{$cols-count}">
1847
-
1848
-
1849
-
1850
- <!-- fn will be processed inside 'note' processing -->
1851
-
1852
-
1853
- <xsl:apply-templates select="../*[local-name()='note']" mode="process"/>
1854
-
1855
- <!-- horizontal row separator -->
1856
-
1857
-
1858
- <!-- fn processing -->
1859
- <xsl:call-template name="fn_display"/>
1860
-
1861
- </fo:table-cell>
1862
- </fo:table-row>
1863
-
1864
- </xsl:if>
1848
+ <!-- <xsl:apply-templates select="../*[local-name()='tfoot']" mode="process"/> -->
1849
+
1865
1850
  </fo:table-body>
1851
+
1866
1852
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='tr']">
1867
1853
  <xsl:variable name="parent-name" select="local-name(..)"/>
1868
1854
  <!-- <xsl:variable name="namespace" select="substring-before(name(/*), '-')"/> -->
@@ -1880,6 +1866,7 @@
1880
1866
 
1881
1867
  </xsl:if>
1882
1868
 
1869
+
1883
1870
  <xsl:apply-templates/>
1884
1871
  </fo:table-row>
1885
1872
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='th']">
@@ -1914,6 +1901,8 @@
1914
1901
 
1915
1902
 
1916
1903
 
1904
+
1905
+
1917
1906
  <xsl:if test="@colspan">
1918
1907
  <xsl:attribute name="number-columns-spanned">
1919
1908
  <xsl:value-of select="@colspan"/>
@@ -1946,10 +1935,13 @@
1946
1935
  <fo:block font-size="10pt" margin-bottom="12pt">
1947
1936
 
1948
1937
 
1938
+
1949
1939
  <fo:inline padding-right="2mm">
1940
+
1950
1941
  <xsl:text>NOTE </xsl:text>
1951
1942
 
1952
1943
 
1944
+
1953
1945
  <xsl:number format="1 "/>
1954
1946
 
1955
1947
  </fo:inline>
@@ -1974,6 +1966,7 @@
1974
1966
  <fo:block margin-bottom="12pt">
1975
1967
 
1976
1968
 
1969
+
1977
1970
  <fo:inline font-size="80%" padding-right="5mm" id="{@id}">
1978
1971
 
1979
1972
  <xsl:attribute name="vertical-align">super</xsl:attribute>
@@ -1982,6 +1975,7 @@
1982
1975
 
1983
1976
 
1984
1977
 
1978
+
1985
1979
  <xsl:value-of select="@reference"/>
1986
1980
 
1987
1981
  </fo:inline>
@@ -2065,6 +2059,7 @@
2065
2059
 
2066
2060
 
2067
2061
 
2062
+
2068
2063
  <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
2069
2064
 
2070
2065
  <xsl:value-of select="@reference"/>
@@ -2086,7 +2081,7 @@
2086
2081
 
2087
2082
 
2088
2083
  <fo:block margin-bottom="12pt" text-align="left">
2089
-
2084
+
2090
2085
  <xsl:text>where </xsl:text>
2091
2086
  <xsl:apply-templates select="*[local-name()='dt']/*"/>
2092
2087
  <xsl:text/>
@@ -2099,6 +2094,7 @@
2099
2094
 
2100
2095
 
2101
2096
 
2097
+
2102
2098
  <xsl:text>where</xsl:text>
2103
2099
  </fo:block>
2104
2100
  </xsl:when>
@@ -2106,6 +2102,7 @@
2106
2102
  <fo:block font-weight="bold" text-align="left" margin-bottom="12pt">
2107
2103
 
2108
2104
 
2105
+
2109
2106
  <xsl:text>Key</xsl:text>
2110
2107
  </fo:block>
2111
2108
  </xsl:when>
@@ -2117,9 +2114,9 @@
2117
2114
 
2118
2115
 
2119
2116
 
2120
-
2121
2117
  <fo:block>
2122
2118
 
2119
+
2123
2120
  <!-- create virtual html table for dl/[dt and dd] -->
2124
2121
  <xsl:variable name="html-table">
2125
2122
  <xsl:variable name="ns" select="substring-before(name(/*), '-')"/>
@@ -2139,6 +2136,7 @@
2139
2136
  <!-- colwidths=<xsl:value-of select="$colwidths"/> -->
2140
2137
 
2141
2138
  <fo:table width="95%" table-layout="fixed">
2139
+
2142
2140
  <xsl:choose>
2143
2141
  <xsl:when test="normalize-space($key_iso) = 'true' and $parent = 'formula'">
2144
2142
  <!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
@@ -2238,6 +2236,7 @@
2238
2236
  <fo:table-cell>
2239
2237
  <fo:block margin-top="6pt">
2240
2238
 
2239
+
2241
2240
  <xsl:if test="normalize-space($key_iso) = 'true'">
2242
2241
  <xsl:attribute name="margin-top">0</xsl:attribute>
2243
2242
 
@@ -2247,6 +2246,7 @@
2247
2246
  <xsl:attribute name="margin-left">7mm</xsl:attribute>
2248
2247
 
2249
2248
  <xsl:apply-templates/>
2249
+
2250
2250
  </fo:block>
2251
2251
  </fo:table-cell>
2252
2252
  <fo:table-cell>
@@ -2265,7 +2265,7 @@
2265
2265
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']"/><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']" mode="process">
2266
2266
  <xsl:apply-templates/>
2267
2267
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
2268
- <fo:inline><xsl:apply-templates/></fo:inline>
2268
+ <fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
2269
2269
  </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='em']">
2270
2270
  <fo:inline font-style="italic">
2271
2271
  <xsl:apply-templates/>
@@ -2380,6 +2380,7 @@
2380
2380
  <xsl:variable name="zero-space-after-dot">.</xsl:variable>
2381
2381
  <xsl:variable name="zero-space-after-colon">:</xsl:variable>
2382
2382
  <xsl:variable name="zero-space-after-equal">=</xsl:variable>
2383
+ <xsl:variable name="zero-space-after-underscore">_</xsl:variable>
2383
2384
  <xsl:variable name="zero-space">​</xsl:variable>
2384
2385
  <xsl:choose>
2385
2386
  <xsl:when test="contains($text, $zero-space-after-chars)">
@@ -2414,6 +2415,14 @@
2414
2415
  <xsl:with-param name="text" select="substring-after($text, $zero-space-after-equal)"/>
2415
2416
  </xsl:call-template>
2416
2417
  </xsl:when>
2418
+ <xsl:when test="contains($text, $zero-space-after-underscore)">
2419
+ <xsl:value-of select="substring-before($text, $zero-space-after-underscore)"/>
2420
+ <xsl:value-of select="$zero-space-after-underscore"/>
2421
+ <xsl:value-of select="$zero-space"/>
2422
+ <xsl:call-template name="add-zero-spaces">
2423
+ <xsl:with-param name="text" select="substring-after($text, $zero-space-after-underscore)"/>
2424
+ </xsl:call-template>
2425
+ </xsl:when>
2417
2426
  <xsl:otherwise>
2418
2427
  <xsl:value-of select="$text"/>
2419
2428
  </xsl:otherwise>
@@ -2590,4 +2599,40 @@
2590
2599
  <xsl:copy-of select="."/>
2591
2600
  </fo:instream-foreign-object>
2592
2601
  </fo:inline>
2602
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='localityStack']">
2603
+ <xsl:for-each select="*[local-name()='locality']">
2604
+ <xsl:if test="position() =1"><xsl:text>, </xsl:text></xsl:if>
2605
+ <xsl:apply-templates select="."/>
2606
+ <xsl:if test="position() != last()"><xsl:text>; </xsl:text></xsl:if>
2607
+ </xsl:for-each>
2608
+ </xsl:template><xsl:template xmlns:iso="https://www.metanorma.org/ns/iso" xmlns:iec="https://www.metanorma.org/ns/iec" xmlns:itu="https://www.metanorma.org/ns/itu" xmlns:nist="https://www.metanorma.org/ns/nist" xmlns:un="https://www.metanorma.org/ns/un" xmlns:ogc="https://www.metanorma.org/ns/ogc" match="*[local-name()='link']" name="link">
2609
+ <xsl:variable name="target">
2610
+ <xsl:choose>
2611
+ <xsl:when test="starts-with(normalize-space(@target), 'mailto:')">
2612
+ <xsl:value-of select="normalize-space(substring-after(@target, 'mailto:'))"/>
2613
+ </xsl:when>
2614
+ <xsl:otherwise>
2615
+ <xsl:value-of select="normalize-space(@target)"/>
2616
+ </xsl:otherwise>
2617
+ </xsl:choose>
2618
+ </xsl:variable>
2619
+ <fo:inline xsl:use-attribute-sets="link-style">
2620
+ <xsl:choose>
2621
+ <xsl:when test="$target = ''">
2622
+ <xsl:apply-templates/>
2623
+ </xsl:when>
2624
+ <xsl:otherwise>
2625
+ <fo:basic-link external-destination="{@target}" fox:alt-text="{@target}">
2626
+ <xsl:choose>
2627
+ <xsl:when test="normalize-space(.) = ''">
2628
+ <xsl:value-of select="$target"/>
2629
+ </xsl:when>
2630
+ <xsl:otherwise>
2631
+ <xsl:apply-templates/>
2632
+ </xsl:otherwise>
2633
+ </xsl:choose>
2634
+ </fo:basic-link>
2635
+ </xsl:otherwise>
2636
+ </xsl:choose>
2637
+ </fo:inline>
2593
2638
  </xsl:template></xsl:stylesheet>
@@ -13,9 +13,9 @@ module IsoDoc
13
13
 
14
14
  def default_fonts(options)
15
15
  {
16
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Overpass",sans-serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Overpass",sans-serif'),
18
- monospacefont: '"Space Mono",monospace'
16
+ bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Source Sans Pro",sans-serif'),
17
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Source Sans Pro",sans-serif'),
18
+ monospacefont: '"Source Code Pro",monospace'
19
19
  }
20
20
  end
21
21
 
@@ -30,8 +30,8 @@ module IsoDoc
30
30
 
31
31
  def googlefonts()
32
32
  <<~HEAD.freeze
33
- <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i|Space+Mono:400,700" rel="stylesheet">
34
- <link href="https://fonts.googleapis.com/css?family=Overpass:300,300i,600,900" rel="stylesheet">
33
+ <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap" rel="stylesheet">
34
+ <link href="https://fonts.googleapis.com/css2?family=Source+Code+Pro:ital,wght@0,400;0,700;1,400;1,700&display=swap" rel="stylesheet">
35
35
  HEAD
36
36
  end
37
37
 
@@ -13,9 +13,9 @@ module IsoDoc
13
13
 
14
14
  def default_fonts(options)
15
15
  {
16
- bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Arial",sans-serif'),
17
- headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Arial",sans-serif'),
18
- monospacefont: '"Courier New",monospace'
16
+ bodyfont: (options[:script] == "Hans" ? '"SimSun",serif' : '"Source Sans Pro","Arial",sans-serif'),
17
+ headerfont: (options[:script] == "Hans" ? '"SimHei",sans-serif' : '"Source Sans Pro","Arial",sans-serif'),
18
+ monospacefont: '"Source Code Pro","Courier New",monospace'
19
19
  }
20
20
  end
21
21
 
@@ -2,7 +2,7 @@ require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
4
  module Csd
5
- def self.pdf_fonts
5
+ def self.fonts_used
6
6
  %w(SourceSansPro SourceSerifPro SourceCodePro HanSans)
7
7
  end
8
8
 
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Csd
3
- VERSION = "1.3.20"
3
+ VERSION = "1.3.21"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-csd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.20
4
+ version: 1.3.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-01 00:00:00.000000000 Z
11
+ date: 2020-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-standoc