metanorma-cc 2.0.4 → 2.0.7
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 +428 -97
- data/lib/isodoc/cc/html/wordstyle.css +20 -0
- data/lib/isodoc/cc/html/wordstyle.scss +19 -0
- data/lib/metanorma/cc/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e03855ceedb587dd377335bd4d13945ac4bcbcf8fef6676d8e4cd91ce20a2d04
|
4
|
+
data.tar.gz: c64f52e63bed46a65c852e9dd21b4ddd38e8a828529d645645f1b53c7cefb92b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbfabc84c6c9db02d89a591d12cf7d01d95f90c5037fa5e363a0bc24d19ae81e2e6025b60975519f673a57c00b67c7638d0c4a8056e747d61b0210c9f332fd0c
|
7
|
+
data.tar.gz: 1fb644c1b338180a6515181c55f53c4186fd99564d7378e833bdd1812566930e9248aa3cc446b5eb0c19c75365e59733d3af543b2f63f9a682da478e22e7aa4b
|
@@ -20,12 +20,14 @@
|
|
20
20
|
<xsl:value-of select="/csd:csd-standard/csd:bibdata/csd:copyright/csd:from"/>
|
21
21
|
</xsl:variable>
|
22
22
|
|
23
|
-
<xsl:variable name="
|
23
|
+
<xsl:variable name="contents_">
|
24
24
|
<contents>
|
25
25
|
<xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
|
26
26
|
<xsl:call-template name="processMainSectionsDefault_Contents"/>
|
27
|
+
<xsl:call-template name="processTablesFigures_Contents"/>
|
27
28
|
</contents>
|
28
29
|
</xsl:variable>
|
30
|
+
<xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
|
29
31
|
|
30
32
|
|
31
33
|
<xsl:template match="/">
|
@@ -190,7 +192,7 @@
|
|
190
192
|
<xsl:if test="$debug = 'true'">
|
191
193
|
<xsl:text disable-output-escaping="yes"><!--</xsl:text>
|
192
194
|
DEBUG
|
193
|
-
contents=<xsl:copy-of select="
|
195
|
+
contents=<xsl:copy-of select="$contents"/>
|
194
196
|
<xsl:text disable-output-escaping="yes">--></xsl:text>
|
195
197
|
</xsl:if>
|
196
198
|
|
@@ -224,14 +226,13 @@
|
|
224
226
|
</xsl:variable>
|
225
227
|
<fo:block font-size="14pt" margin-bottom="15.5pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
|
226
228
|
|
227
|
-
<xsl:for-each select="
|
229
|
+
<xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
|
228
230
|
|
229
231
|
<fo:block role="TOCI">
|
230
232
|
<xsl:if test="@level = 1">
|
231
233
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
232
234
|
</xsl:if>
|
233
235
|
|
234
|
-
|
235
236
|
<fo:list-block>
|
236
237
|
<xsl:attribute name="provisional-distance-between-starts">
|
237
238
|
<xsl:choose>
|
@@ -261,6 +262,27 @@
|
|
261
262
|
</fo:list-block>
|
262
263
|
</fo:block>
|
263
264
|
</xsl:for-each>
|
265
|
+
|
266
|
+
<!-- List of Tables -->
|
267
|
+
<xsl:if test="$contents//tables/table">
|
268
|
+
<xsl:call-template name="insertListOf_Title">
|
269
|
+
<xsl:with-param name="title" select="$title-list-tables"/>
|
270
|
+
</xsl:call-template>
|
271
|
+
<xsl:for-each select="$contents//tables/table">
|
272
|
+
<xsl:call-template name="insertListOf_Item"/>
|
273
|
+
</xsl:for-each>
|
274
|
+
</xsl:if>
|
275
|
+
|
276
|
+
<!-- List of Figures -->
|
277
|
+
<xsl:if test="$contents//figures/figure">
|
278
|
+
<xsl:call-template name="insertListOf_Title">
|
279
|
+
<xsl:with-param name="title" select="$title-list-figures"/>
|
280
|
+
</xsl:call-template>
|
281
|
+
<xsl:for-each select="$contents//figures/figure">
|
282
|
+
<xsl:call-template name="insertListOf_Item"/>
|
283
|
+
</xsl:for-each>
|
284
|
+
</xsl:if>
|
285
|
+
|
264
286
|
</fo:block>
|
265
287
|
</fo:block-container>
|
266
288
|
|
@@ -294,6 +316,40 @@
|
|
294
316
|
</fo:root>
|
295
317
|
</xsl:template>
|
296
318
|
|
319
|
+
<xsl:template name="insertListOf_Title">
|
320
|
+
<xsl:param name="title"/>
|
321
|
+
<fo:block role="TOCI" margin-top="6pt" keep-with-next="always">
|
322
|
+
<xsl:value-of select="$title"/>
|
323
|
+
</fo:block>
|
324
|
+
</xsl:template>
|
325
|
+
|
326
|
+
<xsl:template name="insertListOf_Item">
|
327
|
+
<fo:block role="TOCI">
|
328
|
+
<fo:list-block provisional-distance-between-starts="8mm">
|
329
|
+
<fo:list-item>
|
330
|
+
<fo:list-item-label end-indent="label-end()">
|
331
|
+
<fo:block/>
|
332
|
+
</fo:list-item-label>
|
333
|
+
<fo:list-item-body start-indent="body-start()">
|
334
|
+
<fo:block text-align-last="justify" margin-left="12mm" text-indent="-12mm">
|
335
|
+
<fo:basic-link internal-destination="{@id}">
|
336
|
+
<xsl:call-template name="setAltText">
|
337
|
+
<xsl:with-param name="value" select="@alt-text"/>
|
338
|
+
</xsl:call-template>
|
339
|
+
<xsl:apply-templates select="." mode="contents"/>
|
340
|
+
<fo:inline keep-together.within-line="always">
|
341
|
+
<fo:leader leader-pattern="dots"/>
|
342
|
+
<fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
|
343
|
+
</fo:inline>
|
344
|
+
</fo:basic-link>
|
345
|
+
</fo:block>
|
346
|
+
</fo:list-item-body>
|
347
|
+
</fo:list-item>
|
348
|
+
</fo:list-block>
|
349
|
+
</fo:block>
|
350
|
+
</xsl:template>
|
351
|
+
|
352
|
+
|
297
353
|
<xsl:template match="node()">
|
298
354
|
<xsl:apply-templates/>
|
299
355
|
</xsl:template>
|
@@ -550,7 +606,7 @@
|
|
550
606
|
<xsl:text>Contents</xsl:text>
|
551
607
|
|
552
608
|
</title-toc>
|
553
|
-
|
609
|
+
|
554
610
|
<title-descriptors lang="en">Descriptors</title-descriptors>
|
555
611
|
|
556
612
|
<title-part lang="en">
|
@@ -586,7 +642,31 @@
|
|
586
642
|
<title-continued lang="en">(continued)</title-continued>
|
587
643
|
<title-continued lang="fr">(continué)</title-continued>
|
588
644
|
|
589
|
-
</xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="
|
645
|
+
</xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="title-list-tables">
|
646
|
+
<xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
|
647
|
+
<xsl:value-of select="$toc_table_title"/>
|
648
|
+
<xsl:if test="normalize-space($toc_table_title) = ''">
|
649
|
+
<xsl:call-template name="getTitle">
|
650
|
+
<xsl:with-param name="name" select="'title-list-tables'"/>
|
651
|
+
</xsl:call-template>
|
652
|
+
</xsl:if>
|
653
|
+
</xsl:variable><xsl:variable name="title-list-figures">
|
654
|
+
<xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
|
655
|
+
<xsl:value-of select="$toc_figure_title"/>
|
656
|
+
<xsl:if test="normalize-space($toc_figure_title) = ''">
|
657
|
+
<xsl:call-template name="getTitle">
|
658
|
+
<xsl:with-param name="name" select="'title-list-figures'"/>
|
659
|
+
</xsl:call-template>
|
660
|
+
</xsl:if>
|
661
|
+
</xsl:variable><xsl:variable name="title-list-recommendations">
|
662
|
+
<xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
|
663
|
+
<xsl:value-of select="$toc_requirement_title"/>
|
664
|
+
<xsl:if test="normalize-space($toc_requirement_title) = ''">
|
665
|
+
<xsl:call-template name="getTitle">
|
666
|
+
<xsl:with-param name="name" select="'title-list-recommendations'"/>
|
667
|
+
</xsl:call-template>
|
668
|
+
</xsl:if>
|
669
|
+
</xsl:variable><xsl:variable name="bibdata">
|
590
670
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
|
591
671
|
<xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
|
592
672
|
</xsl:variable><xsl:variable name="linebreak">
</xsl:variable><xsl:variable name="tab_zh"> </xsl:variable><xsl:variable name="non_breaking_hyphen">‑</xsl:variable><xsl:variable name="thin_space"> </xsl:variable><xsl:variable name="zero_width_space"></xsl:variable><xsl:variable name="en_dash">–</xsl:variable><xsl:template name="getTitle">
|
@@ -1790,6 +1870,30 @@
|
|
1790
1870
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1791
1871
|
<xsl:apply-templates select="." mode="contents"/>
|
1792
1872
|
</xsl:for-each>
|
1873
|
+
</xsl:template><xsl:template name="processTablesFigures_Contents">
|
1874
|
+
<xsl:param name="always"/>
|
1875
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
1876
|
+
<xsl:call-template name="processTables_Contents"/>
|
1877
|
+
</xsl:if>
|
1878
|
+
<xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
|
1879
|
+
<xsl:call-template name="processFigures_Contents"/>
|
1880
|
+
</xsl:if>
|
1881
|
+
</xsl:template><xsl:template name="processTables_Contents">
|
1882
|
+
<tables>
|
1883
|
+
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
1884
|
+
<table id="{@id}" alt-text="{*[local-name() = 'name']}">
|
1885
|
+
<xsl:copy-of select="*[local-name() = 'name']"/>
|
1886
|
+
</table>
|
1887
|
+
</xsl:for-each>
|
1888
|
+
</tables>
|
1889
|
+
</xsl:template><xsl:template name="processFigures_Contents">
|
1890
|
+
<figures>
|
1891
|
+
<xsl:for-each select="//*[local-name() = 'figure'][@id and *[local-name() = 'name'] and not(@unnumbered = 'true') and normalize-space(@id) != ''] | //*[@id and starts-with(*[local-name() = 'name'], 'Figure ') and normalize-space(@id) != '']">
|
1892
|
+
<figure id="{@id}" alt-text="{*[local-name() = 'name']}">
|
1893
|
+
<xsl:copy-of select="*[local-name() = 'name']"/>
|
1894
|
+
</figure>
|
1895
|
+
</xsl:for-each>
|
1896
|
+
</figures>
|
1793
1897
|
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
1794
1898
|
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
1795
1899
|
<xsl:sort select="@displayorder" data-type="number"/>
|
@@ -1811,8 +1915,27 @@
|
|
1811
1915
|
<xsl:sort select="@displayorder" data-type="number"/>
|
1812
1916
|
<xsl:apply-templates select="."/>
|
1813
1917
|
</xsl:for-each>
|
1814
|
-
</xsl:template><xsl:template match="text()">
|
1815
|
-
<xsl:
|
1918
|
+
</xsl:template><xsl:variable name="tag_open">###fo:inline###</xsl:variable><xsl:variable name="tag_close">###/fo:inline###</xsl:variable><xsl:template match="text()" name="text">
|
1919
|
+
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
1920
|
+
<xsl:variable name="text" select="java:replaceAll(java:java.lang.String.new(.),$regex_standard_reference,concat($tag_open,'$1',$tag_close))"/>
|
1921
|
+
<xsl:call-template name="replace_fo_inline">
|
1922
|
+
<xsl:with-param name="text" select="$text"/>
|
1923
|
+
</xsl:call-template>
|
1924
|
+
</xsl:template><xsl:template name="replace_fo_inline">
|
1925
|
+
<xsl:param name="text"/>
|
1926
|
+
<xsl:choose>
|
1927
|
+
<xsl:when test="contains($text, $tag_open)">
|
1928
|
+
<xsl:value-of select="substring-before($text, $tag_open)"/>
|
1929
|
+
<xsl:text disable-output-escaping="yes"><fo:inline keep-together.within-line="always"></xsl:text>
|
1930
|
+
<xsl:variable name="text_after" select="substring-after($text, $tag_open)"/>
|
1931
|
+
<xsl:value-of select="substring-before($text_after, $tag_close)"/>
|
1932
|
+
<xsl:text disable-output-escaping="yes"></fo:inline></xsl:text>
|
1933
|
+
<xsl:call-template name="replace_fo_inline">
|
1934
|
+
<xsl:with-param name="text" select="substring-after($text_after, $tag_close)"/>
|
1935
|
+
</xsl:call-template>
|
1936
|
+
</xsl:when>
|
1937
|
+
<xsl:otherwise><xsl:value-of select="$text"/></xsl:otherwise>
|
1938
|
+
</xsl:choose>
|
1816
1939
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
1817
1940
|
<xsl:value-of select="$linebreak"/>
|
1818
1941
|
</xsl:template><xsl:template match="*[local-name()='copyright-statement']">
|
@@ -2568,37 +2691,7 @@
|
|
2568
2691
|
|
2569
2692
|
<!-- list of footnotes to calculate actual footnotes number -->
|
2570
2693
|
<xsl:variable name="p_fn_">
|
2571
|
-
<xsl:
|
2572
|
-
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2573
|
-
<fn gen_id="{generate-id(.)}">
|
2574
|
-
<xsl:copy-of select="@*"/>
|
2575
|
-
<xsl:copy-of select="node()"/>
|
2576
|
-
</fn>
|
2577
|
-
</xsl:when>
|
2578
|
-
<xsl:otherwise>
|
2579
|
-
<!-- itetation for:
|
2580
|
-
footnotes in bibdata/title
|
2581
|
-
footnotes in bibliography
|
2582
|
-
footnotes in document's body (except table's head/body/foot and figure text)
|
2583
|
-
-->
|
2584
|
-
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2585
|
-
<fn gen_id="{generate-id(.)}">
|
2586
|
-
<xsl:copy-of select="@*"/>
|
2587
|
-
<xsl:copy-of select="node()"/>
|
2588
|
-
</fn>
|
2589
|
-
</xsl:for-each>
|
2590
|
-
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
2591
|
-
<xsl:sort select="@displayorder" data-type="number"/>
|
2592
|
-
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
2593
|
-
<!-- copy unique fn -->
|
2594
|
-
<fn gen_id="{generate-id(.)}">
|
2595
|
-
<xsl:copy-of select="@*"/>
|
2596
|
-
<xsl:copy-of select="node()"/>
|
2597
|
-
</fn>
|
2598
|
-
</xsl:for-each>
|
2599
|
-
</xsl:for-each>
|
2600
|
-
</xsl:otherwise>
|
2601
|
-
</xsl:choose>
|
2694
|
+
<xsl:call-template name="get_fn_list"/>
|
2602
2695
|
</xsl:variable>
|
2603
2696
|
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
2604
2697
|
|
@@ -2659,6 +2752,38 @@
|
|
2659
2752
|
<xsl:copy-of select="$footnote_inline"/>
|
2660
2753
|
</xsl:otherwise>
|
2661
2754
|
</xsl:choose>
|
2755
|
+
</xsl:template><xsl:template name="get_fn_list">
|
2756
|
+
<xsl:choose>
|
2757
|
+
<xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
|
2758
|
+
<fn gen_id="{generate-id(.)}">
|
2759
|
+
<xsl:copy-of select="@*"/>
|
2760
|
+
<xsl:copy-of select="node()"/>
|
2761
|
+
</fn>
|
2762
|
+
</xsl:when>
|
2763
|
+
<xsl:otherwise>
|
2764
|
+
<!-- itetation for:
|
2765
|
+
footnotes in bibdata/title
|
2766
|
+
footnotes in bibliography
|
2767
|
+
footnotes in document's body (except table's head/body/foot and figure text)
|
2768
|
+
-->
|
2769
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
|
2770
|
+
<fn gen_id="{generate-id(.)}">
|
2771
|
+
<xsl:copy-of select="@*"/>
|
2772
|
+
<xsl:copy-of select="node()"/>
|
2773
|
+
</fn>
|
2774
|
+
</xsl:for-each>
|
2775
|
+
<xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='preface']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='sections']/* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='annex'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*">
|
2776
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2777
|
+
<xsl:for-each select=".//*[local-name() = 'bibitem'][ancestor::*[local-name() = 'references']]/*[local-name() = 'note'] | .//*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure') and not(ancestor::*[local-name() = 'name'])])][generate-id(.)=generate-id(key('kfn',@reference)[1])]">
|
2778
|
+
<!-- copy unique fn -->
|
2779
|
+
<fn gen_id="{generate-id(.)}">
|
2780
|
+
<xsl:copy-of select="@*"/>
|
2781
|
+
<xsl:copy-of select="node()"/>
|
2782
|
+
</fn>
|
2783
|
+
</xsl:for-each>
|
2784
|
+
</xsl:for-each>
|
2785
|
+
</xsl:otherwise>
|
2786
|
+
</xsl:choose>
|
2662
2787
|
</xsl:template><xsl:template name="table_fn_display">
|
2663
2788
|
<xsl:variable name="references">
|
2664
2789
|
|
@@ -2830,7 +2955,7 @@
|
|
2830
2955
|
</fo:inline>
|
2831
2956
|
</xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
|
2832
2957
|
<fo:inline><xsl:value-of select="."/></fo:inline>
|
2833
|
-
</xsl:template><xsl:template match="*[local-name()='fn']
|
2958
|
+
</xsl:template><xsl:template match="*[local-name()='fn']//*[local-name()='p']">
|
2834
2959
|
<fo:inline>
|
2835
2960
|
<xsl:apply-templates/>
|
2836
2961
|
</fo:inline>
|
@@ -4516,13 +4641,14 @@
|
|
4516
4641
|
<xsl:apply-templates mode="bookmarks"/>
|
4517
4642
|
</xsl:template><xsl:template name="addBookmarks">
|
4518
4643
|
<xsl:param name="contents"/>
|
4519
|
-
<xsl:
|
4644
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
4645
|
+
<xsl:if test="$contents_nodes//item">
|
4520
4646
|
<fo:bookmark-tree>
|
4521
4647
|
<xsl:choose>
|
4522
|
-
<xsl:when test="
|
4648
|
+
<xsl:when test="$contents_nodes/doc">
|
4523
4649
|
<xsl:choose>
|
4524
|
-
<xsl:when test="count(
|
4525
|
-
<xsl:for-each select="
|
4650
|
+
<xsl:when test="count($contents_nodes/doc) > 1">
|
4651
|
+
<xsl:for-each select="$contents_nodes/doc">
|
4526
4652
|
<fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
|
4527
4653
|
<xsl:if test="@bundle = 'true'">
|
4528
4654
|
<xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
|
@@ -4573,7 +4699,7 @@
|
|
4573
4699
|
</xsl:for-each>
|
4574
4700
|
</xsl:when>
|
4575
4701
|
<xsl:otherwise>
|
4576
|
-
<xsl:for-each select="
|
4702
|
+
<xsl:for-each select="$contents_nodes/doc">
|
4577
4703
|
|
4578
4704
|
<xsl:apply-templates select="contents/item" mode="bookmark"/>
|
4579
4705
|
|
@@ -4591,25 +4717,36 @@
|
|
4591
4717
|
</xsl:choose>
|
4592
4718
|
</xsl:when>
|
4593
4719
|
<xsl:otherwise>
|
4594
|
-
<xsl:apply-templates select="
|
4720
|
+
<xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
|
4721
|
+
|
4722
|
+
<xsl:call-template name="insertFigureBookmarks">
|
4723
|
+
<xsl:with-param name="contents" select="$contents_nodes/contents"/>
|
4724
|
+
</xsl:call-template>
|
4725
|
+
|
4726
|
+
<xsl:call-template name="insertTableBookmarks">
|
4727
|
+
<xsl:with-param name="contents" select="$contents_nodes/contents"/>
|
4728
|
+
<xsl:with-param name="lang" select="@lang"/>
|
4729
|
+
</xsl:call-template>
|
4730
|
+
|
4595
4731
|
</xsl:otherwise>
|
4596
4732
|
</xsl:choose>
|
4597
4733
|
|
4734
|
+
|
4598
4735
|
|
4599
4736
|
|
4600
4737
|
|
4601
4738
|
|
4602
|
-
|
4603
|
-
|
4739
|
+
|
4604
4740
|
|
4605
4741
|
</fo:bookmark-tree>
|
4606
4742
|
</xsl:if>
|
4607
4743
|
</xsl:template><xsl:template name="insertFigureBookmarks">
|
4608
4744
|
<xsl:param name="contents"/>
|
4609
|
-
<xsl:
|
4610
|
-
|
4745
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
4746
|
+
<xsl:if test="$contents_nodes/figure">
|
4747
|
+
<fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
|
4611
4748
|
<fo:bookmark-title>Figures</fo:bookmark-title>
|
4612
|
-
<xsl:for-each select="
|
4749
|
+
<xsl:for-each select="$contents_nodes/figure">
|
4613
4750
|
<fo:bookmark internal-destination="{@id}">
|
4614
4751
|
<fo:bookmark-title>
|
4615
4752
|
<xsl:value-of select="normalize-space(title)"/>
|
@@ -4618,18 +4755,40 @@
|
|
4618
4755
|
</xsl:for-each>
|
4619
4756
|
</fo:bookmark>
|
4620
4757
|
</xsl:if>
|
4758
|
+
|
4759
|
+
|
4760
|
+
<xsl:if test="$contents_nodes//figures/figure">
|
4761
|
+
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
4762
|
+
|
4763
|
+
|
4764
|
+
|
4765
|
+
<xsl:variable name="bookmark-title">
|
4766
|
+
|
4767
|
+
<xsl:value-of select="$title-list-figures"/>
|
4768
|
+
|
4769
|
+
</xsl:variable>
|
4770
|
+
<fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
|
4771
|
+
<xsl:for-each select="$contents_nodes//figures/figure">
|
4772
|
+
<fo:bookmark internal-destination="{@id}">
|
4773
|
+
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
4774
|
+
</fo:bookmark>
|
4775
|
+
</xsl:for-each>
|
4776
|
+
</fo:bookmark>
|
4777
|
+
</xsl:if>
|
4778
|
+
|
4621
4779
|
</xsl:template><xsl:template name="insertTableBookmarks">
|
4622
4780
|
<xsl:param name="contents"/>
|
4623
4781
|
<xsl:param name="lang"/>
|
4624
|
-
<xsl:
|
4625
|
-
|
4782
|
+
<xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
|
4783
|
+
<xsl:if test="$contents_nodes/table">
|
4784
|
+
<fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
|
4626
4785
|
<fo:bookmark-title>
|
4627
4786
|
<xsl:choose>
|
4628
4787
|
<xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
|
4629
4788
|
<xsl:otherwise>Tables</xsl:otherwise>
|
4630
4789
|
</xsl:choose>
|
4631
4790
|
</fo:bookmark-title>
|
4632
|
-
<xsl:for-each select="
|
4791
|
+
<xsl:for-each select="$contents_nodes/table">
|
4633
4792
|
<fo:bookmark internal-destination="{@id}">
|
4634
4793
|
<fo:bookmark-title>
|
4635
4794
|
<xsl:value-of select="normalize-space(title)"/>
|
@@ -4638,6 +4797,29 @@
|
|
4638
4797
|
</xsl:for-each>
|
4639
4798
|
</fo:bookmark>
|
4640
4799
|
</xsl:if>
|
4800
|
+
|
4801
|
+
|
4802
|
+
<xsl:if test="$contents_nodes//tables/table">
|
4803
|
+
<fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
|
4804
|
+
|
4805
|
+
|
4806
|
+
|
4807
|
+
<xsl:variable name="bookmark-title">
|
4808
|
+
|
4809
|
+
<xsl:value-of select="$title-list-tables"/>
|
4810
|
+
|
4811
|
+
</xsl:variable>
|
4812
|
+
|
4813
|
+
<fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
|
4814
|
+
|
4815
|
+
<xsl:for-each select="$contents_nodes//tables/table">
|
4816
|
+
<fo:bookmark internal-destination="{@id}">
|
4817
|
+
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
4818
|
+
</fo:bookmark>
|
4819
|
+
</xsl:for-each>
|
4820
|
+
</fo:bookmark>
|
4821
|
+
</xsl:if>
|
4822
|
+
|
4641
4823
|
</xsl:template><xsl:template name="getLangVersion">
|
4642
4824
|
<xsl:param name="lang"/>
|
4643
4825
|
<xsl:param name="doctype" select="''"/>
|
@@ -4862,7 +5044,51 @@
|
|
4862
5044
|
<xsl:with-param name="text" select="$text_step1"/>
|
4863
5045
|
</xsl:call-template>
|
4864
5046
|
</xsl:variable>
|
4865
|
-
|
5047
|
+
|
5048
|
+
<!-- <xsl:value-of select="$text_step2"/> -->
|
5049
|
+
|
5050
|
+
<!-- add zero-width space after space -->
|
5051
|
+
<xsl:variable name="text_step3" select="java:replaceAll(java:java.lang.String.new($text_step2),' ',' ')"/>
|
5052
|
+
|
5053
|
+
<!-- split text by zero-width space -->
|
5054
|
+
<xsl:variable name="text_step4">
|
5055
|
+
<xsl:call-template name="split">
|
5056
|
+
<xsl:with-param name="pText" select="$text_step3"/>
|
5057
|
+
<xsl:with-param name="sep" select="$zero_width_space"/>
|
5058
|
+
<xsl:with-param name="normalize-space">false</xsl:with-param>
|
5059
|
+
<xsl:with-param name="keep_sep">true</xsl:with-param>
|
5060
|
+
</xsl:call-template>
|
5061
|
+
</xsl:variable>
|
5062
|
+
|
5063
|
+
<xsl:for-each select="xalan:nodeset($text_step4)/item">
|
5064
|
+
<xsl:choose>
|
5065
|
+
<xsl:when test="string-length() > 30"> <!-- word with length more than 30 will be interspersed with zero-width space -->
|
5066
|
+
<xsl:call-template name="interspers">
|
5067
|
+
<xsl:with-param name="str" select="."/>
|
5068
|
+
</xsl:call-template>
|
5069
|
+
</xsl:when>
|
5070
|
+
<xsl:otherwise>
|
5071
|
+
<xsl:value-of select="."/>
|
5072
|
+
</xsl:otherwise>
|
5073
|
+
</xsl:choose>
|
5074
|
+
</xsl:for-each>
|
5075
|
+
|
5076
|
+
</xsl:template><xsl:template name="interspers">
|
5077
|
+
<xsl:param name="str"/>
|
5078
|
+
<xsl:param name="char" select="$zero_width_space"/>
|
5079
|
+
<xsl:if test="$str != ''">
|
5080
|
+
<xsl:value-of select="substring($str, 1, 1)"/>
|
5081
|
+
|
5082
|
+
<xsl:variable name="next_char" select="substring($str, 2, 1)"/>
|
5083
|
+
<xsl:if test="not(contains(concat(' -.:=_— ', $char), $next_char))">
|
5084
|
+
<xsl:value-of select="$char"/>
|
5085
|
+
</xsl:if>
|
5086
|
+
|
5087
|
+
<xsl:call-template name="interspers">
|
5088
|
+
<xsl:with-param name="str" select="substring($str, 2)"/>
|
5089
|
+
<xsl:with-param name="char" select="$char"/>
|
5090
|
+
</xsl:call-template>
|
5091
|
+
</xsl:if>
|
4866
5092
|
</xsl:template><xsl:template match="*" mode="syntax_highlight">
|
4867
5093
|
<xsl:apply-templates mode="syntax_highlight"/>
|
4868
5094
|
</xsl:template><xsl:variable name="syntax_highlight_styles_">
|
@@ -5294,6 +5520,8 @@
|
|
5294
5520
|
</xsl:otherwise>
|
5295
5521
|
</xsl:choose> -->
|
5296
5522
|
</fo:block>
|
5523
|
+
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
|
5524
|
+
<xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
|
5297
5525
|
</xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
|
5298
5526
|
<xsl:if test="normalize-space() != ''">
|
5299
5527
|
<xsl:value-of select="."/>
|
@@ -5328,7 +5556,8 @@
|
|
5328
5556
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5329
5557
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/text()">
|
5330
5558
|
<xsl:if test="normalize-space() != ''">
|
5331
|
-
<xsl:value-of select="."/>
|
5559
|
+
<!-- <xsl:value-of select="."/> -->
|
5560
|
+
<xsl:call-template name="text"/>
|
5332
5561
|
</xsl:if>
|
5333
5562
|
</xsl:template><xsl:template match="*[local-name() = 'quote']">
|
5334
5563
|
<fo:block-container margin-left="0mm">
|
@@ -5368,26 +5597,24 @@
|
|
5368
5597
|
</xsl:template><xsl:template match="*[local-name() = 'author']">
|
5369
5598
|
<xsl:text>— </xsl:text>
|
5370
5599
|
<xsl:apply-templates/>
|
5371
|
-
</xsl:template><xsl:variable name="
|
5600
|
+
</xsl:template><xsl:variable name="bibitems_">
|
5601
|
+
<xsl:for-each select="//*[local-name() = 'bibitem']">
|
5602
|
+
<xsl:copy-of select="."/>
|
5603
|
+
</xsl:for-each>
|
5604
|
+
</xsl:variable><xsl:variable name="bibitems" select="xalan:nodeset($bibitems_)"/><xsl:variable name="bibitems_hidden_">
|
5372
5605
|
<xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
|
5373
5606
|
<xsl:copy-of select="."/>
|
5374
5607
|
</xsl:for-each>
|
5375
|
-
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']
|
5608
|
+
<xsl:for-each select="//*[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']">
|
5376
5609
|
<xsl:copy-of select="."/>
|
5377
5610
|
</xsl:for-each>
|
5378
|
-
</xsl:variable><xsl:variable name="
|
5379
|
-
|
5380
|
-
<xsl:variable name="
|
5381
|
-
|
5382
|
-
<!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
|
5383
|
-
<xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
|
5384
|
-
<xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
|
5385
|
-
<xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
|
5386
|
-
</xsl:choose>
|
5387
|
-
</xsl:variable>
|
5388
|
-
|
5611
|
+
</xsl:variable><xsl:variable name="bibitems_hidden" select="xalan:nodeset($bibitems_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
|
5612
|
+
<xsl:variable name="current_bibitemid" select="@bibitemid"/>
|
5613
|
+
<!-- <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/> -->
|
5614
|
+
<xsl:variable name="external-destination" select="normalize-space($bibitems/*[local-name() ='bibitem'][@id = $current_bibitemid]/*[local-name() = 'uri'][@type = 'citation'])"/>
|
5389
5615
|
<xsl:choose>
|
5390
|
-
<xsl:when test="
|
5616
|
+
<!-- <xsl:when test="$external-destination != '' or not(key('bibitems_hidden', $current_bibitemid))"> --> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
|
5617
|
+
<xsl:when test="$external-destination != '' or not($bibitems_hidden/*[local-name() ='bibitem'][@id = $current_bibitemid])"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link (internal to the bibitem or external) -->
|
5391
5618
|
<fo:inline xsl:use-attribute-sets="eref-style">
|
5392
5619
|
<xsl:if test="@type = 'footnote'">
|
5393
5620
|
<xsl:attribute name="keep-together.within-line">always</xsl:attribute>
|
@@ -5401,8 +5628,8 @@
|
|
5401
5628
|
<xsl:variable name="text" select="normalize-space()"/>
|
5402
5629
|
|
5403
5630
|
|
5404
|
-
|
5405
|
-
<fo:basic-link
|
5631
|
+
|
5632
|
+
<fo:basic-link fox:alt-text="{@citeas}">
|
5406
5633
|
<xsl:if test="normalize-space(@citeas) = ''">
|
5407
5634
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
|
5408
5635
|
</xsl:if>
|
@@ -5415,14 +5642,21 @@
|
|
5415
5642
|
|
5416
5643
|
</xsl:if>
|
5417
5644
|
|
5418
|
-
|
5645
|
+
<xsl:choose>
|
5646
|
+
<xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
|
5647
|
+
<xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
|
5648
|
+
</xsl:when>
|
5649
|
+
<xsl:otherwise>
|
5650
|
+
<xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
5651
|
+
</xsl:otherwise>
|
5652
|
+
</xsl:choose>
|
5419
5653
|
|
5420
5654
|
<xsl:apply-templates/>
|
5421
5655
|
</fo:basic-link>
|
5422
|
-
|
5656
|
+
|
5423
5657
|
</fo:inline>
|
5424
5658
|
</xsl:when>
|
5425
|
-
<xsl:otherwise>
|
5659
|
+
<xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
|
5426
5660
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
5427
5661
|
</xsl:otherwise>
|
5428
5662
|
</xsl:choose>
|
@@ -6158,6 +6392,24 @@
|
|
6158
6392
|
<xsl:apply-templates/>
|
6159
6393
|
</fo:inline>
|
6160
6394
|
</xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
|
6395
|
+
|
6396
|
+
<!-- list of footnotes to calculate actual footnotes number -->
|
6397
|
+
<xsl:variable name="p_fn_">
|
6398
|
+
<xsl:call-template name="get_fn_list"/>
|
6399
|
+
</xsl:variable>
|
6400
|
+
<xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
|
6401
|
+
<xsl:variable name="gen_id" select="generate-id(.)"/>
|
6402
|
+
<xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
|
6403
|
+
<!-- fn sequence number in document -->
|
6404
|
+
<xsl:variable name="current_fn_number">
|
6405
|
+
<xsl:choose>
|
6406
|
+
<xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
|
6407
|
+
<xsl:otherwise>
|
6408
|
+
<!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
|
6409
|
+
<xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
|
6410
|
+
</xsl:otherwise>
|
6411
|
+
</xsl:choose>
|
6412
|
+
</xsl:variable>
|
6161
6413
|
<fo:footnote>
|
6162
6414
|
<xsl:variable name="number">
|
6163
6415
|
|
@@ -6166,22 +6418,26 @@
|
|
6166
6418
|
<xsl:number level="any" count="*[local-name() = 'references'][preceding-sibling::*[local-name() = 'references']]//*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
|
6167
6419
|
</xsl:when>
|
6168
6420
|
<xsl:otherwise>
|
6169
|
-
<xsl:
|
6421
|
+
<xsl:value-of select="$current_fn_number"/>
|
6170
6422
|
</xsl:otherwise>
|
6171
6423
|
</xsl:choose>
|
6172
6424
|
|
6173
6425
|
</xsl:variable>
|
6426
|
+
|
6427
|
+
<xsl:variable name="current_fn_number_text">
|
6428
|
+
<xsl:value-of select="$number"/>
|
6429
|
+
|
6430
|
+
</xsl:variable>
|
6431
|
+
|
6174
6432
|
<fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
|
6175
|
-
<fo:basic-link internal-destination="{
|
6176
|
-
<xsl:value-of select="$
|
6177
|
-
|
6433
|
+
<fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
|
6434
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
6178
6435
|
</fo:basic-link>
|
6179
6436
|
</fo:inline>
|
6180
6437
|
<fo:footnote-body>
|
6181
6438
|
<fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
|
6182
|
-
<fo:inline id="{
|
6183
|
-
<xsl:value-of select="$
|
6184
|
-
|
6439
|
+
<fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
|
6440
|
+
<xsl:value-of select="$current_fn_number_text"/>
|
6185
6441
|
</fo:inline>
|
6186
6442
|
<xsl:apply-templates/>
|
6187
6443
|
</fo:block>
|
@@ -6421,6 +6677,78 @@
|
|
6421
6677
|
<xsl:apply-templates/>
|
6422
6678
|
</fo:block>
|
6423
6679
|
|
6680
|
+
</xsl:template><xsl:template match="@*|node()" mode="update_xml_step1">
|
6681
|
+
<xsl:copy>
|
6682
|
+
<xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
|
6683
|
+
</xsl:copy>
|
6684
|
+
</xsl:template><xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
|
6685
|
+
<xsl:copy>
|
6686
|
+
<xsl:copy-of select="@*"/>
|
6687
|
+
|
6688
|
+
<xsl:variable name="nodes_preface_">
|
6689
|
+
<xsl:for-each select="*">
|
6690
|
+
<node id="{@id}"/>
|
6691
|
+
</xsl:for-each>
|
6692
|
+
</xsl:variable>
|
6693
|
+
<xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
|
6694
|
+
|
6695
|
+
<xsl:for-each select="*">
|
6696
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
6697
|
+
|
6698
|
+
<!-- process Section's title -->
|
6699
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
6700
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
6701
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
|
6702
|
+
</xsl:if>
|
6703
|
+
|
6704
|
+
<xsl:choose>
|
6705
|
+
<xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
|
6706
|
+
<xsl:otherwise>
|
6707
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
6708
|
+
</xsl:otherwise>
|
6709
|
+
</xsl:choose>
|
6710
|
+
|
6711
|
+
</xsl:for-each>
|
6712
|
+
</xsl:copy>
|
6713
|
+
</xsl:template><xsl:template match="*[local-name() = 'sections']" mode="update_xml_step1">
|
6714
|
+
<xsl:copy>
|
6715
|
+
<xsl:copy-of select="@*"/>
|
6716
|
+
|
6717
|
+
<xsl:variable name="nodes_sections_">
|
6718
|
+
<xsl:for-each select="*">
|
6719
|
+
<node id="{@id}"/>
|
6720
|
+
</xsl:for-each>
|
6721
|
+
</xsl:variable>
|
6722
|
+
<xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
|
6723
|
+
|
6724
|
+
<!-- move section 'Normative references' inside 'sections' -->
|
6725
|
+
<xsl:for-each select="* | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='references'][@normative='true'] | ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][@normative='true']]">
|
6726
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
6727
|
+
|
6728
|
+
<!-- process Section's title -->
|
6729
|
+
<xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
|
6730
|
+
<xsl:if test="$preceding-sibling_id != ''">
|
6731
|
+
<xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
|
6732
|
+
</xsl:if>
|
6733
|
+
|
6734
|
+
<xsl:choose>
|
6735
|
+
<xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
|
6736
|
+
<xsl:otherwise>
|
6737
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
6738
|
+
</xsl:otherwise>
|
6739
|
+
</xsl:choose>
|
6740
|
+
|
6741
|
+
</xsl:for-each>
|
6742
|
+
</xsl:copy>
|
6743
|
+
</xsl:template><xsl:template match="*[local-name() = 'bibliography']" mode="update_xml_step1">
|
6744
|
+
<xsl:copy>
|
6745
|
+
<xsl:copy-of select="@*"/>
|
6746
|
+
<!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
|
6747
|
+
<xsl:for-each select="*[not(@normative='true') and not(*[@normative='true'])]">
|
6748
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
6749
|
+
<xsl:apply-templates select="." mode="update_xml_step1"/>
|
6750
|
+
</xsl:for-each>
|
6751
|
+
</xsl:copy>
|
6424
6752
|
</xsl:template><xsl:template name="convertDate">
|
6425
6753
|
<xsl:param name="date"/>
|
6426
6754
|
<xsl:param name="format" select="'short'"/>
|
@@ -6665,22 +6993,25 @@
|
|
6665
6993
|
<xsl:param name="pText" select="."/>
|
6666
6994
|
<xsl:param name="sep" select="','"/>
|
6667
6995
|
<xsl:param name="normalize-space" select="'true'"/>
|
6996
|
+
<xsl:param name="keep_sep" select="'false'"/>
|
6668
6997
|
<xsl:if test="string-length($pText) >0">
|
6669
|
-
|
6670
|
-
|
6671
|
-
|
6672
|
-
|
6673
|
-
|
6674
|
-
|
6675
|
-
|
6676
|
-
|
6677
|
-
|
6678
|
-
|
6679
|
-
|
6680
|
-
<xsl:
|
6681
|
-
|
6682
|
-
|
6683
|
-
|
6998
|
+
<item>
|
6999
|
+
<xsl:choose>
|
7000
|
+
<xsl:when test="$normalize-space = 'true'">
|
7001
|
+
<xsl:value-of select="normalize-space(substring-before(concat($pText, $sep), $sep))"/>
|
7002
|
+
</xsl:when>
|
7003
|
+
<xsl:otherwise>
|
7004
|
+
<xsl:value-of select="substring-before(concat($pText, $sep), $sep)"/>
|
7005
|
+
</xsl:otherwise>
|
7006
|
+
</xsl:choose>
|
7007
|
+
</item>
|
7008
|
+
<xsl:if test="$keep_sep = 'true' and contains($pText, $sep)"><item><xsl:value-of select="$sep"/></item></xsl:if>
|
7009
|
+
<xsl:call-template name="split">
|
7010
|
+
<xsl:with-param name="pText" select="substring-after($pText, $sep)"/>
|
7011
|
+
<xsl:with-param name="sep" select="$sep"/>
|
7012
|
+
<xsl:with-param name="normalize-space" select="$normalize-space"/>
|
7013
|
+
<xsl:with-param name="keep_sep" select="$keep_sep"/>
|
7014
|
+
</xsl:call-template>
|
6684
7015
|
</xsl:if>
|
6685
7016
|
</xsl:template><xsl:template name="getDocumentId">
|
6686
7017
|
<xsl:call-template name="getLang"/><xsl:value-of select="//*[local-name() = 'p'][1]/@id"/>
|
@@ -844,6 +844,26 @@ p.Tablebody, li.Tablebody, div.Tablebody {
|
|
844
844
|
mso-bidi-font-family: {{bodyfont}};
|
845
845
|
mso-ansi-language: EN-GB; }
|
846
846
|
|
847
|
+
p.TOCTitle, li.TOCTitle, div.TOCTitle {
|
848
|
+
mso-style-name: "TOC Title";
|
849
|
+
mso-style-unhide: no;
|
850
|
+
margin-top: 0in;
|
851
|
+
margin-right: 0in;
|
852
|
+
margin-bottom: {{normalfontsize}};
|
853
|
+
margin-left: 0in;
|
854
|
+
text-align: left;
|
855
|
+
page-break-after: avoid;
|
856
|
+
mso-pagination: none;
|
857
|
+
mso-hyphenate: none;
|
858
|
+
mso-layout-grid-align: none;
|
859
|
+
font-size: {{normalfontsize}};
|
860
|
+
mso-bidi-font-size: 10.0pt;
|
861
|
+
font-weight: bold;
|
862
|
+
font-family: {{headerfont}};
|
863
|
+
mso-fareast-font-family: {{headerfont}};
|
864
|
+
mso-bidi-font-family: {{headerfont}};
|
865
|
+
mso-fareast-language: EN-US; }
|
866
|
+
|
847
867
|
/* Page Definitions */
|
848
868
|
@page {
|
849
869
|
size: 612.0pt 792.0pt;
|
@@ -793,6 +793,25 @@ p.Tablebody, li.Tablebody, div.Tablebody
|
|
793
793
|
mso-fareast-font-family:$bodyfont;
|
794
794
|
mso-bidi-font-family:$bodyfont;
|
795
795
|
mso-ansi-language:EN-GB;}
|
796
|
+
p.TOCTitle, li.TOCTitle, div.TOCTitle
|
797
|
+
{mso-style-name:"TOC Title";
|
798
|
+
mso-style-unhide:no;
|
799
|
+
margin-top:0in;
|
800
|
+
margin-right:0in;
|
801
|
+
margin-bottom:$normalfontsize;
|
802
|
+
margin-left:0in;
|
803
|
+
text-align:left;
|
804
|
+
page-break-after:avoid;
|
805
|
+
mso-pagination:none;
|
806
|
+
mso-hyphenate:none;
|
807
|
+
mso-layout-grid-align:none;
|
808
|
+
font-size:$normalfontsize;
|
809
|
+
mso-bidi-font-size:10.0pt;
|
810
|
+
font-weight:bold;
|
811
|
+
font-family:$headerfont;
|
812
|
+
mso-fareast-font-family:$headerfont;
|
813
|
+
mso-bidi-font-family:$headerfont;
|
814
|
+
mso-fareast-language:EN-US;}
|
796
815
|
|
797
816
|
|
798
817
|
/* Page Definitions */
|
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.7
|
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-
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -250,7 +250,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
250
250
|
- !ruby/object:Gem::Version
|
251
251
|
version: '0'
|
252
252
|
requirements: []
|
253
|
-
rubygems_version: 3.
|
253
|
+
rubygems_version: 3.3.9
|
254
254
|
signing_key:
|
255
255
|
specification_version: 4
|
256
256
|
summary: metanorma-cc lets you write CalConnect standards in AsciiDoc.
|