metanorma-cc 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/cc/cc.standard.xsl +231 -93
- data/lib/isodoc/cc/html/htmlstyle.css +17 -16
- data/lib/isodoc/cc/html/htmlstyle.scss +3 -2
- data/lib/metanorma/cc/biblio.rng +2 -2
- data/lib/metanorma/cc/isodoc.rng +98 -1
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53f1af93e381db0210b7022f002cc5eb940ef7c5c5ae80dad112daf746fe1701
|
4
|
+
data.tar.gz: 28c11bc2a0aa389821dbcbb7c379bbefebe41a85f79790f9ea73181e722f3eed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f439fef05db79df3cf840a5673e58f6e8863a5720bd8a2a4533685f09abb0265867e44a5ab516443caab0f6f1607cc23b921f9f6ffbeeae9db66829124f6028e
|
7
|
+
data.tar.gz: 475ec99f5577c78a7d5ef2d41782fe4cb3443b080b5128a79a747458788d34fb32125e5b768371d2283ade446d44aeec45cd9da5971dfac2fb7c58bc131a7bdb
|
@@ -9,8 +9,6 @@
|
|
9
9
|
|
10
10
|
<xsl:key name="kfn" match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])]" use="@reference"/>
|
11
11
|
|
12
|
-
<xsl:variable name="pageWidth" select="210"/>
|
13
|
-
<xsl:variable name="pageHeight" select="297"/>
|
14
12
|
<xsl:variable name="marginLeftRight1" select="19"/>
|
15
13
|
<xsl:variable name="marginLeftRight2" select="19"/>
|
16
14
|
<xsl:variable name="marginTop" select="20.2"/>
|
@@ -366,56 +364,6 @@
|
|
366
364
|
<!-- ============================= -->
|
367
365
|
|
368
366
|
|
369
|
-
<xsl:template match="csd:license-statement//csd:title">
|
370
|
-
<xsl:variable name="level">
|
371
|
-
<xsl:call-template name="getLevel"/>
|
372
|
-
</xsl:variable>
|
373
|
-
<fo:block text-align="center" font-weight="bold" role="H{$level}">
|
374
|
-
<xsl:apply-templates/>
|
375
|
-
</fo:block>
|
376
|
-
</xsl:template>
|
377
|
-
|
378
|
-
<xsl:template match="csd:license-statement//csd:p">
|
379
|
-
<fo:block margin-left="1.5mm" margin-right="1.5mm">
|
380
|
-
<xsl:if test="following-sibling::csd:p">
|
381
|
-
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
382
|
-
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
383
|
-
</xsl:if>
|
384
|
-
<xsl:apply-templates/>
|
385
|
-
</fo:block>
|
386
|
-
</xsl:template>
|
387
|
-
|
388
|
-
<!-- <fo:block margin-bottom="12pt">© ISO 2019, Published in Switzerland.</fo:block>
|
389
|
-
<fo:block font-size="10pt" margin-bottom="12pt">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 either ISO at the address below or ISO’s member body in the country of the requester.</fo:block>
|
390
|
-
<fo:block font-size="10pt" text-indent="7.1mm">
|
391
|
-
<fo:block>ISO copyright office</fo:block>
|
392
|
-
<fo:block>Ch. de Blandonnet 8 • CP 401</fo:block>
|
393
|
-
<fo:block>CH-1214 Vernier, Geneva, Switzerland</fo:block>
|
394
|
-
<fo:block>Tel. + 41 22 749 01 11</fo:block>
|
395
|
-
<fo:block>Fax + 41 22 749 09 47</fo:block>
|
396
|
-
<fo:block>copyright@iso.org</fo:block>
|
397
|
-
<fo:block>www.iso.org</fo:block>
|
398
|
-
</fo:block> -->
|
399
|
-
|
400
|
-
<xsl:template match="csd:copyright-statement//csd:p">
|
401
|
-
<fo:block>
|
402
|
-
<xsl:if test="preceding-sibling::csd:p">
|
403
|
-
<!-- <xsl:attribute name="font-size">10pt</xsl:attribute> -->
|
404
|
-
</xsl:if>
|
405
|
-
<xsl:if test="following-sibling::csd:p">
|
406
|
-
<!-- <xsl:attribute name="margin-bottom">12pt</xsl:attribute> -->
|
407
|
-
<xsl:attribute name="margin-bottom">3pt</xsl:attribute>
|
408
|
-
</xsl:if>
|
409
|
-
<xsl:if test="not(following-sibling::csd:p)">
|
410
|
-
<!-- <xsl:attribute name="margin-left">7.1mm</xsl:attribute> -->
|
411
|
-
<xsl:attribute name="margin-left">4mm</xsl:attribute>
|
412
|
-
</xsl:if>
|
413
|
-
<xsl:apply-templates/>
|
414
|
-
</fo:block>
|
415
|
-
</xsl:template>
|
416
|
-
|
417
|
-
|
418
|
-
|
419
367
|
<xsl:template match="csd:title" name="title">
|
420
368
|
|
421
369
|
<xsl:variable name="level">
|
@@ -457,7 +405,7 @@
|
|
457
405
|
</xsl:template>
|
458
406
|
|
459
407
|
|
460
|
-
<xsl:template match="csd:p">
|
408
|
+
<xsl:template match="csd:p" name="paragraph">
|
461
409
|
<xsl:param name="inline" select="'false'"/>
|
462
410
|
<xsl:variable name="previous-element" select="local-name(preceding-sibling::*[1])"/>
|
463
411
|
<xsl:variable name="element-name">
|
@@ -665,7 +613,11 @@
|
|
665
613
|
</xsl:template>
|
666
614
|
|
667
615
|
|
668
|
-
<xsl:variable name="
|
616
|
+
<xsl:variable name="pageWidth_">
|
617
|
+
210
|
618
|
+
</xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
|
619
|
+
297
|
620
|
+
</xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="titles_">
|
669
621
|
|
670
622
|
<title-edition lang="en">
|
671
623
|
|
@@ -770,6 +722,53 @@
|
|
770
722
|
|
771
723
|
|
772
724
|
|
725
|
+
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-style">
|
726
|
+
|
727
|
+
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-title-style">
|
728
|
+
|
729
|
+
|
730
|
+
</xsl:attribute-set><xsl:attribute-set name="copyright-statement-p-style">
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
</xsl:attribute-set><xsl:attribute-set name="license-statement-style">
|
735
|
+
|
736
|
+
|
737
|
+
</xsl:attribute-set><xsl:attribute-set name="license-statement-title-style">
|
738
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
|
745
|
+
</xsl:attribute-set><xsl:attribute-set name="license-statement-p-style">
|
746
|
+
|
747
|
+
|
748
|
+
|
749
|
+
|
750
|
+
</xsl:attribute-set><xsl:attribute-set name="legal-statement-style">
|
751
|
+
|
752
|
+
|
753
|
+
|
754
|
+
</xsl:attribute-set><xsl:attribute-set name="legal-statement-title-style">
|
755
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
756
|
+
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
</xsl:attribute-set><xsl:attribute-set name="legal-statement-p-style">
|
762
|
+
|
763
|
+
</xsl:attribute-set><xsl:attribute-set name="feedback-statement-style">
|
764
|
+
|
765
|
+
|
766
|
+
</xsl:attribute-set><xsl:attribute-set name="feedback-statement-title-style">
|
767
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
768
|
+
|
769
|
+
</xsl:attribute-set><xsl:attribute-set name="feedback-statement-p-style">
|
770
|
+
|
771
|
+
|
773
772
|
</xsl:attribute-set><xsl:attribute-set name="link-style">
|
774
773
|
|
775
774
|
|
@@ -1584,6 +1583,7 @@
|
|
1584
1583
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-non-normative-list-body-style">
|
1585
1584
|
|
1586
1585
|
|
1586
|
+
|
1587
1587
|
</xsl:attribute-set><xsl:attribute-set name="bibitem-note-fn-style">
|
1588
1588
|
<xsl:attribute name="keep-with-previous.within-line">always</xsl:attribute>
|
1589
1589
|
<xsl:attribute name="font-size">65%</xsl:attribute>
|
@@ -1691,6 +1691,64 @@
|
|
1691
1691
|
<xsl:value-of select="."/>
|
1692
1692
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1693
1693
|
<xsl:value-of select="$linebreak"/>
|
1694
|
+
</xsl:template><xsl:template match="*[local-name()='copyright-statement']">
|
1695
|
+
<fo:block xsl:use-attribute-sets="copyright-statement-style">
|
1696
|
+
<xsl:apply-templates/>
|
1697
|
+
</fo:block>
|
1698
|
+
</xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='title']">
|
1699
|
+
|
1700
|
+
<!-- process in the template 'title' -->
|
1701
|
+
<xsl:call-template name="title"/>
|
1702
|
+
|
1703
|
+
</xsl:template><xsl:template match="*[local-name()='copyright-statement']//*[local-name()='p']">
|
1704
|
+
|
1705
|
+
|
1706
|
+
<!-- process in the template 'paragraph' -->
|
1707
|
+
<xsl:call-template name="paragraph"/>
|
1708
|
+
|
1709
|
+
</xsl:template><xsl:template match="*[local-name()='license-statement']">
|
1710
|
+
<fo:block xsl:use-attribute-sets="license-statement-style">
|
1711
|
+
<xsl:apply-templates/>
|
1712
|
+
</fo:block>
|
1713
|
+
</xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='title']">
|
1714
|
+
|
1715
|
+
<!-- process in the template 'title' -->
|
1716
|
+
<xsl:call-template name="title"/>
|
1717
|
+
|
1718
|
+
</xsl:template><xsl:template match="*[local-name()='license-statement']//*[local-name()='p']">
|
1719
|
+
|
1720
|
+
<!-- process in the template 'paragraph' -->
|
1721
|
+
<xsl:call-template name="paragraph"/>
|
1722
|
+
|
1723
|
+
</xsl:template><xsl:template match="*[local-name()='legal-statement']">
|
1724
|
+
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
1725
|
+
<xsl:apply-templates/>
|
1726
|
+
</fo:block>
|
1727
|
+
</xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='title']">
|
1728
|
+
|
1729
|
+
<!-- process in the template 'title' -->
|
1730
|
+
<xsl:call-template name="title"/>
|
1731
|
+
|
1732
|
+
|
1733
|
+
</xsl:template><xsl:template match="*[local-name()='legal-statement']//*[local-name()='p']">
|
1734
|
+
|
1735
|
+
<!-- process in the template 'paragraph' -->
|
1736
|
+
<xsl:call-template name="paragraph"/>
|
1737
|
+
|
1738
|
+
</xsl:template><xsl:template match="*[local-name()='feedback-statement']">
|
1739
|
+
<fo:block xsl:use-attribute-sets="feedback-statement-style">
|
1740
|
+
<xsl:apply-templates/>
|
1741
|
+
</fo:block>
|
1742
|
+
</xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='title']">
|
1743
|
+
|
1744
|
+
<!-- process in the template 'title' -->
|
1745
|
+
<xsl:call-template name="title"/>
|
1746
|
+
|
1747
|
+
</xsl:template><xsl:template match="*[local-name()='feedback-statement']//*[local-name()='p']">
|
1748
|
+
|
1749
|
+
<!-- process in the template 'paragraph' -->
|
1750
|
+
<xsl:call-template name="paragraph"/>
|
1751
|
+
|
1694
1752
|
</xsl:template><xsl:template match="*[local-name()='td']//text() | *[local-name()='th']//text() | *[local-name()='dt']//text() | *[local-name()='dd']//text()" priority="1">
|
1695
1753
|
<!-- <xsl:call-template name="add-zero-spaces"/> -->
|
1696
1754
|
<xsl:call-template name="add-zero-spaces-java"/>
|
@@ -1835,7 +1893,7 @@
|
|
1835
1893
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
1836
1894
|
</xsl:when>
|
1837
1895
|
<xsl:otherwise>
|
1838
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
1896
|
+
<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 -->
|
1839
1897
|
</xsl:otherwise>
|
1840
1898
|
</xsl:choose>
|
1841
1899
|
|
@@ -2052,7 +2110,7 @@
|
|
2052
2110
|
|
2053
2111
|
<xsl:variable name="math_text" select="normalize-space(xalan:nodeset($mathml))"/>
|
2054
2112
|
<xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
|
2055
|
-
</xsl:template><xsl:template match="*[local-name()='
|
2113
|
+
</xsl:template><xsl:template match="*[local-name()='thead']">
|
2056
2114
|
<xsl:param name="cols-count"/>
|
2057
2115
|
<fo:table-header>
|
2058
2116
|
|
@@ -2077,13 +2135,13 @@
|
|
2077
2135
|
<fo:table-body>
|
2078
2136
|
<xsl:apply-templates/>
|
2079
2137
|
</fo:table-body>
|
2080
|
-
</xsl:template><xsl:template match="*[local-name()='tfoot']"
|
2138
|
+
</xsl:template><xsl:template match="*[local-name()='tfoot']">
|
2081
2139
|
<xsl:apply-templates/>
|
2082
2140
|
</xsl:template><xsl:template name="insertTableFooter">
|
2083
2141
|
<xsl:param name="cols-count"/>
|
2084
2142
|
<xsl:if test="../*[local-name()='tfoot']">
|
2085
2143
|
<fo:table-footer>
|
2086
|
-
<xsl:apply-templates select="../*[local-name()='tfoot']"
|
2144
|
+
<xsl:apply-templates select="../*[local-name()='tfoot']"/>
|
2087
2145
|
</fo:table-footer>
|
2088
2146
|
</xsl:if>
|
2089
2147
|
</xsl:template><xsl:template name="insertTableFooterInSeparateTable">
|
@@ -2169,7 +2227,7 @@
|
|
2169
2227
|
|
2170
2228
|
<!-- except gb and bsi -->
|
2171
2229
|
|
2172
|
-
<xsl:apply-templates select="../*[local-name()='note']"
|
2230
|
+
<xsl:apply-templates select="../*[local-name()='note']"/>
|
2173
2231
|
|
2174
2232
|
|
2175
2233
|
|
@@ -2207,7 +2265,7 @@
|
|
2207
2265
|
|
2208
2266
|
|
2209
2267
|
|
2210
|
-
<xsl:apply-templates select="../*[local-name()='thead']"
|
2268
|
+
<xsl:apply-templates select="../*[local-name()='thead']">
|
2211
2269
|
<xsl:with-param name="cols-count" select="$cols-count"/>
|
2212
2270
|
</xsl:apply-templates>
|
2213
2271
|
|
@@ -2349,7 +2407,7 @@
|
|
2349
2407
|
<xsl:apply-templates/>
|
2350
2408
|
</fo:block>
|
2351
2409
|
</fo:table-cell>
|
2352
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2"
|
2410
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']" priority="2">
|
2353
2411
|
|
2354
2412
|
<fo:block xsl:use-attribute-sets="table-note-style">
|
2355
2413
|
|
@@ -2372,10 +2430,10 @@
|
|
2372
2430
|
|
2373
2431
|
|
2374
2432
|
|
2375
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"
|
2433
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
2376
2434
|
</fo:block>
|
2377
2435
|
|
2378
|
-
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='
|
2436
|
+
</xsl:template><xsl:template match="*[local-name()='table']/*[local-name()='note']/*[local-name()='p']" priority="2">
|
2379
2437
|
<xsl:apply-templates/>
|
2380
2438
|
</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">
|
2381
2439
|
|
@@ -2904,7 +2962,9 @@
|
|
2904
2962
|
</td>
|
2905
2963
|
<td>
|
2906
2964
|
|
2907
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]"
|
2965
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
2966
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
2967
|
+
</xsl:apply-templates>
|
2908
2968
|
|
2909
2969
|
</td>
|
2910
2970
|
</tr>
|
@@ -2931,15 +2991,20 @@
|
|
2931
2991
|
<fo:block>
|
2932
2992
|
|
2933
2993
|
|
2934
|
-
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]"
|
2994
|
+
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
2995
|
+
<xsl:with-param name="process">true</xsl:with-param>
|
2996
|
+
</xsl:apply-templates>
|
2935
2997
|
</fo:block>
|
2936
2998
|
</fo:table-cell>
|
2937
2999
|
</fo:table-row>
|
2938
3000
|
</xsl:template><xsl:template match="*[local-name()='dd']" mode="dl"/><xsl:template match="*[local-name()='dd']" mode="dl_process">
|
2939
3001
|
<xsl:apply-templates/>
|
2940
|
-
</xsl:template><xsl:template match="*[local-name()='dd']"
|
2941
|
-
<xsl:
|
2942
|
-
<xsl:
|
3002
|
+
</xsl:template><xsl:template match="*[local-name()='dd']">
|
3003
|
+
<xsl:param name="process">false</xsl:param>
|
3004
|
+
<xsl:if test="$process = 'true'">
|
3005
|
+
<xsl:apply-templates select="@language"/>
|
3006
|
+
<xsl:apply-templates/>
|
3007
|
+
</xsl:if>
|
2943
3008
|
</xsl:template><xsl:template match="*[local-name()='dd']/*[local-name()='p']" mode="inline">
|
2944
3009
|
<fo:inline><xsl:text> </xsl:text><xsl:apply-templates/></fo:inline>
|
2945
3010
|
</xsl:template><xsl:template match="*[local-name()='em']">
|
@@ -3114,7 +3179,11 @@
|
|
3114
3179
|
<xsl:with-param name="text" select="substring($text,2)"/>
|
3115
3180
|
</xsl:call-template>
|
3116
3181
|
</xsl:if>
|
3117
|
-
</xsl:template><xsl:template name="
|
3182
|
+
</xsl:template><xsl:template match="*[local-name() = 'pagebreak']">
|
3183
|
+
<fo:block break-after="page"/>
|
3184
|
+
<fo:block> </fo:block>
|
3185
|
+
<fo:block break-after="page"/>
|
3186
|
+
</xsl:template><xsl:template name="tokenize">
|
3118
3187
|
<xsl:param name="text"/>
|
3119
3188
|
<xsl:param name="separator" select="' '"/>
|
3120
3189
|
<xsl:choose>
|
@@ -3546,10 +3615,10 @@
|
|
3546
3615
|
</fo:inline>
|
3547
3616
|
</xsl:template><xsl:template match="*[local-name()='appendix']">
|
3548
3617
|
<fo:block id="{@id}" xsl:use-attribute-sets="appendix-style">
|
3549
|
-
<xsl:apply-templates select="*[local-name()='title']"
|
3618
|
+
<xsl:apply-templates select="*[local-name()='title']"/>
|
3550
3619
|
</fo:block>
|
3551
|
-
<xsl:apply-templates/>
|
3552
|
-
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']"
|
3620
|
+
<xsl:apply-templates select="node()[not(local-name()='title')]"/>
|
3621
|
+
</xsl:template><xsl:template match="*[local-name()='appendix']/*[local-name()='title']" priority="2">
|
3553
3622
|
<xsl:variable name="level">
|
3554
3623
|
<xsl:call-template name="getLevel"/>
|
3555
3624
|
</xsl:variable>
|
@@ -4167,7 +4236,7 @@
|
|
4167
4236
|
<xsl:value-of select="."/>
|
4168
4237
|
</xsl:template><xsl:template match="node()" mode="contents">
|
4169
4238
|
<xsl:apply-templates mode="contents"/>
|
4170
|
-
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="2" mode="contents">
|
4239
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="2" mode="contents">
|
4171
4240
|
<xsl:variable name="level">
|
4172
4241
|
<xsl:call-template name="getLevel">
|
4173
4242
|
<xsl:with-param name="depth" select="@depth"/>
|
@@ -4175,10 +4244,15 @@
|
|
4175
4244
|
</xsl:variable>
|
4176
4245
|
|
4177
4246
|
<xsl:variable name="section">
|
4178
|
-
<xsl:
|
4247
|
+
<xsl:choose>
|
4248
|
+
<xsl:when test="@type = 'section-title'"/>
|
4249
|
+
<xsl:otherwise>
|
4250
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4251
|
+
</xsl:otherwise>
|
4252
|
+
</xsl:choose>
|
4179
4253
|
</xsl:variable>
|
4180
4254
|
|
4181
|
-
<xsl:variable name="type"
|
4255
|
+
<xsl:variable name="type"><xsl:value-of select="@type"/></xsl:variable>
|
4182
4256
|
|
4183
4257
|
<xsl:variable name="display">
|
4184
4258
|
<xsl:choose>
|
@@ -4195,7 +4269,16 @@
|
|
4195
4269
|
<xsl:variable name="title">
|
4196
4270
|
<xsl:choose>
|
4197
4271
|
<xsl:when test="*[local-name() = 'tab']">
|
4198
|
-
<xsl:
|
4272
|
+
<xsl:choose>
|
4273
|
+
<xsl:when test="@type = 'section-title'">
|
4274
|
+
<xsl:value-of select="*[local-name() = 'tab'][1]/preceding-sibling::node()"/>
|
4275
|
+
<xsl:text>: </xsl:text>
|
4276
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
4277
|
+
</xsl:when>
|
4278
|
+
<xsl:otherwise>
|
4279
|
+
<xsl:copy-of select="*[local-name() = 'tab'][1]/following-sibling::node()"/>
|
4280
|
+
</xsl:otherwise>
|
4281
|
+
</xsl:choose>
|
4199
4282
|
</xsl:when>
|
4200
4283
|
<xsl:otherwise>
|
4201
4284
|
<xsl:copy-of select="node()"/>
|
@@ -5775,7 +5858,7 @@
|
|
5775
5858
|
</fo:inline>
|
5776
5859
|
</xsl:template><xsl:template match="@language">
|
5777
5860
|
<xsl:copy-of select="."/>
|
5778
|
-
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title']" priority="4">
|
5861
|
+
</xsl:template><xsl:template match="*[local-name() = 'p'][@type = 'floating-title' or @type = 'section-title']" priority="4">
|
5779
5862
|
<xsl:call-template name="title"/>
|
5780
5863
|
</xsl:template><xsl:template match="*[local-name() = 'admonition']">
|
5781
5864
|
|
@@ -5834,27 +5917,17 @@
|
|
5834
5917
|
<xsl:variable name="month" select="substring($date, 6, 2)"/>
|
5835
5918
|
<xsl:variable name="day" select="substring($date, 9, 2)"/>
|
5836
5919
|
<xsl:variable name="monthStr">
|
5837
|
-
<xsl:
|
5838
|
-
<xsl:
|
5839
|
-
<xsl:
|
5840
|
-
|
5841
|
-
<xsl:when test="$month = '04'">april</xsl:when>
|
5842
|
-
<xsl:when test="$month = '05'">may</xsl:when>
|
5843
|
-
<xsl:when test="$month = '06'">june</xsl:when>
|
5844
|
-
<xsl:when test="$month = '07'">july</xsl:when>
|
5845
|
-
<xsl:when test="$month = '08'">august</xsl:when>
|
5846
|
-
<xsl:when test="$month = '09'">september</xsl:when>
|
5847
|
-
<xsl:when test="$month = '10'">october</xsl:when>
|
5848
|
-
<xsl:when test="$month = '11'">november</xsl:when>
|
5849
|
-
<xsl:when test="$month = '12'">december</xsl:when>
|
5850
|
-
</xsl:choose>
|
5920
|
+
<xsl:call-template name="getMonthByNum">
|
5921
|
+
<xsl:with-param name="num" select="$month"/>
|
5922
|
+
<xsl:with-param name="lowercase" select="'true'"/>
|
5923
|
+
</xsl:call-template>
|
5851
5924
|
</xsl:variable>
|
5852
5925
|
<xsl:variable name="monthStr_localized">
|
5853
5926
|
<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>
|
5854
5927
|
</xsl:variable>
|
5855
5928
|
<xsl:variable name="result">
|
5856
5929
|
<xsl:choose>
|
5857
|
-
<xsl:when test="$format = 'ddMMyyyy'">
|
5930
|
+
<xsl:when test="$format = 'ddMMyyyy'"> <!-- convert date from format 2007-04-01 to 1 April 2007 -->
|
5858
5931
|
<xsl:if test="$day != ''"><xsl:value-of select="number($day)"/></xsl:if>
|
5859
5932
|
<xsl:text> </xsl:text>
|
5860
5933
|
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ' , $year))"/>
|
@@ -5867,11 +5940,57 @@
|
|
5867
5940
|
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $year))"/>
|
5868
5941
|
</xsl:when>
|
5869
5942
|
<xsl:otherwise>
|
5870
|
-
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/>
|
5943
|
+
<xsl:value-of select="normalize-space(concat($monthStr_localized, ' ', $day, ', ' , $year))"/> <!-- January 01, 2022 -->
|
5871
5944
|
</xsl:otherwise>
|
5872
5945
|
</xsl:choose>
|
5873
5946
|
</xsl:variable>
|
5874
5947
|
<xsl:value-of select="$result"/>
|
5948
|
+
</xsl:template><xsl:template name="getMonthByNum">
|
5949
|
+
<xsl:param name="num"/>
|
5950
|
+
<xsl:param name="lang">en</xsl:param>
|
5951
|
+
<xsl:param name="lowercase">false</xsl:param> <!-- return 'january' instead of 'January' -->
|
5952
|
+
<xsl:variable name="monthStr_">
|
5953
|
+
<xsl:choose>
|
5954
|
+
<xsl:when test="$lang = 'fr'">
|
5955
|
+
<xsl:choose>
|
5956
|
+
<xsl:when test="$num = '01'">Janvier</xsl:when>
|
5957
|
+
<xsl:when test="$num = '02'">Février</xsl:when>
|
5958
|
+
<xsl:when test="$num = '03'">Mars</xsl:when>
|
5959
|
+
<xsl:when test="$num = '04'">Avril</xsl:when>
|
5960
|
+
<xsl:when test="$num = '05'">Mai</xsl:when>
|
5961
|
+
<xsl:when test="$num = '06'">Juin</xsl:when>
|
5962
|
+
<xsl:when test="$num = '07'">Juillet</xsl:when>
|
5963
|
+
<xsl:when test="$num = '08'">Août</xsl:when>
|
5964
|
+
<xsl:when test="$num = '09'">Septembre</xsl:when>
|
5965
|
+
<xsl:when test="$num = '10'">Octobre</xsl:when>
|
5966
|
+
<xsl:when test="$num = '11'">Novembre</xsl:when>
|
5967
|
+
<xsl:when test="$num = '12'">Décembre</xsl:when>
|
5968
|
+
</xsl:choose>
|
5969
|
+
</xsl:when>
|
5970
|
+
<xsl:otherwise>
|
5971
|
+
<xsl:choose>
|
5972
|
+
<xsl:when test="$num = '01'">January</xsl:when>
|
5973
|
+
<xsl:when test="$num = '02'">February</xsl:when>
|
5974
|
+
<xsl:when test="$num = '03'">March</xsl:when>
|
5975
|
+
<xsl:when test="$num = '04'">April</xsl:when>
|
5976
|
+
<xsl:when test="$num = '05'">May</xsl:when>
|
5977
|
+
<xsl:when test="$num = '06'">June</xsl:when>
|
5978
|
+
<xsl:when test="$num = '07'">July</xsl:when>
|
5979
|
+
<xsl:when test="$num = '08'">August</xsl:when>
|
5980
|
+
<xsl:when test="$num = '09'">September</xsl:when>
|
5981
|
+
<xsl:when test="$num = '10'">October</xsl:when>
|
5982
|
+
<xsl:when test="$num = '11'">November</xsl:when>
|
5983
|
+
<xsl:when test="$num = '12'">December</xsl:when>
|
5984
|
+
</xsl:choose>
|
5985
|
+
</xsl:otherwise>
|
5986
|
+
</xsl:choose>
|
5987
|
+
</xsl:variable>
|
5988
|
+
<xsl:choose>
|
5989
|
+
<xsl:when test="normalize-space($lowercase) = 'true'">
|
5990
|
+
<xsl:value-of select="java:toLowerCase(java:java.lang.String.new($monthStr_))"/>
|
5991
|
+
</xsl:when>
|
5992
|
+
<xsl:otherwise><xsl:value-of select="$monthStr_"/></xsl:otherwise>
|
5993
|
+
</xsl:choose>
|
5875
5994
|
</xsl:template><xsl:template name="insertKeywords">
|
5876
5995
|
<xsl:param name="sorting" select="'true'"/>
|
5877
5996
|
<xsl:param name="charAtEnd" select="'.'"/>
|
@@ -6332,6 +6451,25 @@
|
|
6332
6451
|
</xsl:otherwise>
|
6333
6452
|
</xsl:choose>
|
6334
6453
|
</xsl:if>
|
6454
|
+
</xsl:template><xsl:template name="number-to-ordinal">
|
6455
|
+
<xsl:param name="number"/>
|
6456
|
+
<xsl:param name="curr_lang"/>
|
6457
|
+
<xsl:choose>
|
6458
|
+
<xsl:when test="$curr_lang = 'fr'">
|
6459
|
+
<xsl:choose>
|
6460
|
+
<xsl:when test="$number = '1'">re</xsl:when>
|
6461
|
+
<xsl:otherwise>e</xsl:otherwise>
|
6462
|
+
</xsl:choose>
|
6463
|
+
</xsl:when>
|
6464
|
+
<xsl:otherwise>
|
6465
|
+
<xsl:choose>
|
6466
|
+
<xsl:when test="$number = 1">st</xsl:when>
|
6467
|
+
<xsl:when test="$number = 2">nd</xsl:when>
|
6468
|
+
<xsl:when test="$number = 3">rd</xsl:when>
|
6469
|
+
<xsl:otherwise>th</xsl:otherwise>
|
6470
|
+
</xsl:choose>
|
6471
|
+
</xsl:otherwise>
|
6472
|
+
</xsl:choose>
|
6335
6473
|
</xsl:template><xsl:template name="setAltText">
|
6336
6474
|
<xsl:param name="value"/>
|
6337
6475
|
<xsl:attribute name="fox:alt-text">
|
@@ -627,53 +627,54 @@ nav #toc {
|
|
627
627
|
#toggle {
|
628
628
|
display: none; } }
|
629
629
|
|
630
|
-
#toc ul, #toc > ul
|
630
|
+
#toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
|
631
631
|
margin: 0;
|
632
632
|
padding: 0;
|
633
633
|
list-style: none; }
|
634
|
-
#toc ul li a, #toc > ul
|
634
|
+
#toc ul li a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul li a {
|
635
635
|
padding: 5px 10px; }
|
636
|
-
#toc ul a, #toc > ul
|
636
|
+
#toc ul a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a {
|
637
637
|
color: #485094;
|
638
638
|
text-decoration: none;
|
639
639
|
display: block; }
|
640
|
-
#toc ul a:hover, #toc > ul
|
640
|
+
#toc ul a:hover, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul a:hover {
|
641
641
|
box-shadow: none;
|
642
642
|
color: white; }
|
643
643
|
|
644
|
-
#toc .h2, #toc > ul
|
644
|
+
#toc .h2, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h2 {
|
645
645
|
padding-left: 30px; }
|
646
646
|
|
647
|
-
#toc .h3, #toc > ul
|
647
|
+
#toc .h3, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .h3 {
|
648
648
|
padding-left: 50px; }
|
649
649
|
|
650
|
-
#toc .toc-active, #toc li:hover, #toc > ul
|
650
|
+
#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 {
|
651
651
|
background: #1d1d1d;
|
652
652
|
box-shadow: inset -5px 0px 10px -5px #1d1d1d !important; }
|
653
|
-
#toc .toc-active a, #toc li:hover a, #toc > ul
|
653
|
+
#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 {
|
654
654
|
color: white; }
|
655
655
|
|
656
656
|
@media print {
|
657
|
-
#toc .toc-active, #toc li:hover, #toc > ul
|
657
|
+
#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 {
|
658
658
|
background: white;
|
659
659
|
box-shadow: none !important; }
|
660
|
-
#toc .toc-active a, #toc > ul
|
660
|
+
#toc .toc-active a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) .toc-active a {
|
661
661
|
color: #485094; }
|
662
|
-
#toc li:hover a, #toc > ul
|
662
|
+
#toc li:hover a, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:hover a {
|
663
663
|
color: black; } }
|
664
664
|
|
665
|
-
#toc ul, #toc > ul
|
665
|
+
#toc ul, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) ul {
|
666
666
|
margin-bottom: 0.25em; }
|
667
667
|
|
668
|
-
#toc li, #toc > ul
|
668
|
+
#toc li, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li {
|
669
669
|
list-style-type: none; }
|
670
|
-
#toc li:before, #toc > ul
|
670
|
+
#toc li:before, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) li:before {
|
671
671
|
content: " " !important;
|
672
672
|
display: none; }
|
673
673
|
|
674
|
-
#toc > ul
|
674
|
+
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
675
675
|
margin-top: 0;
|
676
|
-
margin-bottom: 0;
|
676
|
+
margin-bottom: 0;
|
677
|
+
font-size: 100%; }
|
677
678
|
|
678
679
|
.rule {
|
679
680
|
width: 100%;
|
@@ -56,7 +56,7 @@ nav {
|
|
56
56
|
$colorFg: white);
|
57
57
|
}
|
58
58
|
|
59
|
-
#toc, #toc > ul
|
59
|
+
#toc, #toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
60
60
|
@include toc($colorLink: #485094, $colorLinkActiveBg: #1d1d1d, $colorLinkActiveFg: white);
|
61
61
|
|
62
62
|
ul {
|
@@ -73,9 +73,10 @@ nav {
|
|
73
73
|
}
|
74
74
|
}
|
75
75
|
|
76
|
-
#toc > ul
|
76
|
+
#toc > ul :is(.h1, .h2, .h3, .h4, .h5, .h6) {
|
77
77
|
margin-top: 0;
|
78
78
|
margin-bottom: 0;
|
79
|
+
font-size: 100%;
|
79
80
|
}
|
80
81
|
|
81
82
|
.rule {
|
data/lib/metanorma/cc/biblio.rng
CHANGED
data/lib/metanorma/cc/isodoc.rng
CHANGED
@@ -32,6 +32,56 @@
|
|
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>
|
72
|
+
<define name="bibitem">
|
73
|
+
<element name="bibitem">
|
74
|
+
<attribute name="id">
|
75
|
+
<data type="ID"/>
|
76
|
+
</attribute>
|
77
|
+
<optional>
|
78
|
+
<attribute name="hidden">
|
79
|
+
<data type="boolean"/>
|
80
|
+
</attribute>
|
81
|
+
</optional>
|
82
|
+
<ref name="BibliographicItem"/>
|
83
|
+
</element>
|
84
|
+
</define>
|
35
85
|
<define name="section-title">
|
36
86
|
<element name="title">
|
37
87
|
<zeroOrMore>
|
@@ -690,6 +740,7 @@
|
|
690
740
|
<ref name="terms"/>
|
691
741
|
<ref name="term-clause"/>
|
692
742
|
<ref name="definitions"/>
|
743
|
+
<ref name="floating-title"/>
|
693
744
|
</choice>
|
694
745
|
</oneOrMore>
|
695
746
|
</element>
|
@@ -1013,6 +1064,26 @@
|
|
1013
1064
|
</zeroOrMore>
|
1014
1065
|
</element>
|
1015
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>
|
1016
1087
|
<define name="pagebreak">
|
1017
1088
|
<element name="pagebreak">
|
1018
1089
|
<optional>
|
@@ -1680,6 +1751,7 @@
|
|
1680
1751
|
<ref name="clause-subsection"/>
|
1681
1752
|
<ref name="terms"/>
|
1682
1753
|
<ref name="definitions"/>
|
1754
|
+
<ref name="floating-title"/>
|
1683
1755
|
</choice>
|
1684
1756
|
</oneOrMore>
|
1685
1757
|
</choice>
|
@@ -1722,6 +1794,7 @@
|
|
1722
1794
|
<ref name="terms"/>
|
1723
1795
|
<ref name="definitions"/>
|
1724
1796
|
<ref name="references"/>
|
1797
|
+
<ref name="floating-title"/>
|
1725
1798
|
</choice>
|
1726
1799
|
</zeroOrMore>
|
1727
1800
|
</group>
|
@@ -2200,7 +2273,18 @@
|
|
2200
2273
|
<ref name="MultilingualRenderingType"/>
|
2201
2274
|
</attribute>
|
2202
2275
|
</optional>
|
2203
|
-
<
|
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>
|
2204
2288
|
</element>
|
2205
2289
|
</define>
|
2206
2290
|
<define name="termsource">
|
@@ -2534,4 +2618,17 @@
|
|
2534
2618
|
</oneOrMore>
|
2535
2619
|
</element>
|
2536
2620
|
</define>
|
2621
|
+
<define name="floating-title">
|
2622
|
+
<element name="floating-title">
|
2623
|
+
<attribute name="id">
|
2624
|
+
<data type="ID"/>
|
2625
|
+
</attribute>
|
2626
|
+
<attribute name="depth">
|
2627
|
+
<data type="int"/>
|
2628
|
+
</attribute>
|
2629
|
+
<zeroOrMore>
|
2630
|
+
<ref name="TextElement"/>
|
2631
|
+
</zeroOrMore>
|
2632
|
+
</element>
|
2633
|
+
</define>
|
2537
2634
|
</grammar>
|
data/lib/metanorma/cc/version.rb
CHANGED
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: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|