metanorma-un 0.8.4 → 0.8.5

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: 5ac4adba52174fc7226d97f9c8a0afad7ac4d05c65b707b1aa4e169f6587d852
4
- data.tar.gz: 0fd140c9e0047fb2e0d1f82525a2f5a2604f23be0ea0f04339fcc03674189bee
3
+ metadata.gz: a200d0c0bcb461376a98c15b5f3a1799557d2f7c543c2ccd5486b8353fcb8c3e
4
+ data.tar.gz: a057c3044c90876917a4d884034776c40ecf7edccb93149c8aea2be28838b91d
5
5
  SHA512:
6
- metadata.gz: 61390463399b2a5739fa5be940069cd86eedd454abaedcb6546e98f7250251766a8ba3114a88428d0fb92023e2372015469f47c722e41090b08611b434be6021
7
- data.tar.gz: 61625f92fd2fd73efb7ef5b3298d097e2a952407dd2d5c9b38b0ebc8fea50d6549baba9df2c11c598971ac5e52be02bf53b8dd4a687143e4a605595eda8ce7ce
6
+ metadata.gz: d840b475ad673d5a1f994995e7996c7834f356f4a37e7655cdbb9821f697d13221c07cae29c50c0ef1fa6ba471fdae2254964c631e38f7d37089be8a94f4812f
7
+ data.tar.gz: 18a01fe3f32d1ecf1d87273cffe8dee6d2a47c3859abd503b8fdbb91c7cc06573ae23525011c5ffa83bb8eafab344909744488097f9ea5620a11024e646de1ce
@@ -828,6 +828,26 @@ p.Tablebody, li.Tablebody, div.Tablebody {
828
828
  mso-bidi-font-family: {{bodyfont}};
829
829
  mso-ansi-language: EN-GB; }
830
830
 
831
+ p.TOCTitle, li.TOCTitle, div.TOCTitle {
832
+ mso-style-name: "TOC Title";
833
+ mso-style-unhide: no;
834
+ margin-top: 0in;
835
+ margin-right: 0in;
836
+ margin-bottom: {{normalfontsize}};
837
+ margin-left: 0in;
838
+ text-align: left;
839
+ page-break-after: avoid;
840
+ mso-pagination: none;
841
+ mso-hyphenate: none;
842
+ mso-layout-grid-align: none;
843
+ font-size: {{normalfontsize}};
844
+ mso-bidi-font-size: 10.0pt;
845
+ font-weight: bold;
846
+ font-family: {{headerfont}};
847
+ mso-fareast-font-family: {{headerfont}};
848
+ mso-bidi-font-family: {{headerfont}};
849
+ mso-fareast-language: EN-US; }
850
+
831
851
  /* Page Definitions */
832
852
  @page {
833
853
  size: 612.0pt 792.0pt;
@@ -776,6 +776,25 @@ p.Tablebody, li.Tablebody, div.Tablebody
776
776
  mso-fareast-font-family:$bodyfont;
777
777
  mso-bidi-font-family:$bodyfont;
778
778
  mso-ansi-language:EN-GB;}
779
+ p.TOCTitle, li.TOCTitle, div.TOCTitle
780
+ {mso-style-name:"TOC Title";
781
+ mso-style-unhide:no;
782
+ margin-top:0in;
783
+ margin-right:0in;
784
+ margin-bottom:$normalfontsize;
785
+ margin-left:0in;
786
+ text-align:left;
787
+ page-break-after:avoid;
788
+ mso-pagination:none;
789
+ mso-hyphenate:none;
790
+ mso-layout-grid-align:none;
791
+ font-size:$normalfontsize;
792
+ mso-bidi-font-size:10.0pt;
793
+ font-weight:bold;
794
+ font-family:$headerfont;
795
+ mso-fareast-font-family:$headerfont;
796
+ mso-bidi-font-family:$headerfont;
797
+ mso-fareast-language:EN-US;}
779
798
 
780
799
 
781
800
  /* Page Definitions */
@@ -10,7 +10,7 @@
10
10
 
11
11
  <xsl:variable name="debug">false</xsl:variable>
12
12
 
13
- <xsl:variable name="contents">
13
+ <xsl:variable name="contents_">
14
14
  <contents>
15
15
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
16
16
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
@@ -20,9 +20,11 @@
20
20
  <xsl:apply-templates select="/un:un-standard/un:sections/*" mode="contents"/>
21
21
  <xsl:apply-templates select="/un:un-standard/un:annex" mode="contents"/>
22
22
  <xsl:apply-templates select="/un:un-standard/un:bibliography/un:references" mode="contents"/>
23
+
24
+ <xsl:call-template name="processTablesFigures_Contents"/>
23
25
  </contents>
24
26
  </xsl:variable>
25
-
27
+ <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
26
28
 
27
29
  <xsl:variable name="title" select="/un:un-standard/un:bibdata/un:title[@language = 'en' and @type = 'main']"/>
28
30
 
@@ -276,7 +278,7 @@
276
278
  <xsl:if test="$debug = 'true'">
277
279
  <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
278
280
  DEBUG
279
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
281
+ contents=<xsl:copy-of select="$contents"/>
280
282
  <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
281
283
  </xsl:if>
282
284
 
@@ -825,7 +827,7 @@
825
827
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDE0IDc5LjE1Njc5NywgMjAxNC8wOC8yMC0wOTo1MzowMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4w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k/ABIcq6S4AN1w2JO8n5WfQ24WU8ynKdVem8l80QzUwx2y0exd1OefiZp2SwkH7fIApxnIhHgN/uwSnK9rHMGlTzW27fbttd6WZ4vyOjg6GU1zf67RY5eXlZTt37mz3PliWCaHL5ubmlm7QhsvK9sMi/W48Holu2rQxfTIvEVlcrPTjqe4EZ7CgwBdra9uSmtcPt6eta6FynHEJKYGv2Jd90s86AQpAwNJsRuT5xUAHrKK4IkCd9g6NQAQPIi8vz4f5o72tANZVgO/GMpe59RvrtQvt7JMQLS0dAyI9sst1m7uTuL28gqwJBqfh8pTaWOTqTIvSblYxVtTe2RnbvHlzg/fsEofcLK4oasda9edCs9An49viDe3tm3sS2YHA/gAL39Le/tU2lGFS0mphWYsBlhI432690j5UQnnB0DjXjuv/Pkr/knwu5fQOx46PR+RzPKz5FG+vOtVFmJn08mQq/ix17K4bM722kS3f8O0J0IOnwddK6jo7zqrx5f7EdckzAOrK/5erFeIorlh4YH/pthHXfac7449A8DVAaRXYTgUQ4wdj/xgw8ytFk7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO8nXeWcqW3QOHeLyryF/Q4L3BoEhzW+fOO0A12vewbTZxj6/yWeCqz4J31WY1ny3/F6UYkeY68LIzhtsxa8myZailU1K6HlxN/x9kjcPp+HcBBgAS2JZd+kqHSQAAAABJRU5ErkJggg==</xsl:text>
826
828
  </xsl:variable>
827
829
 
828
- <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:variable name="lang">
830
+ <xsl:param name="svg_images"/><xsl:variable name="images" select="document($svg_images)"/><xsl:param name="basepath"/><xsl:param name="external_index"/><xsl:param name="syntax-highlight">false</xsl:param><xsl:key name="bibitems" match="*[local-name() = 'bibitem']" use="@id"/><xsl:key name="bibitems_hidden" match="*[local-name() = 'bibitem'][@hidden='true'] | *[local-name() = 'references'][@hidden='true']//*[local-name() = 'bibitem']" use="@id"/><xsl:variable name="lang">
829
831
  <xsl:call-template name="getLang"/>
830
832
  </xsl:variable><xsl:variable name="pageWidth_">
831
833
  210
@@ -869,7 +871,7 @@
869
871
  <xsl:text>Contents</xsl:text>
870
872
 
871
873
  </title-toc>
872
-
874
+
873
875
  <title-descriptors lang="en">Descriptors</title-descriptors>
874
876
 
875
877
  <title-part lang="en">
@@ -905,7 +907,31 @@
905
907
  <title-continued lang="en">(continued)</title-continued>
906
908
  <title-continued lang="fr">(continué)</title-continued>
907
909
 
908
- </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
910
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="title-list-tables">
911
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
912
+ <xsl:value-of select="$toc_table_title"/>
913
+ <xsl:if test="normalize-space($toc_table_title) = ''">
914
+ <xsl:call-template name="getTitle">
915
+ <xsl:with-param name="name" select="'title-list-tables'"/>
916
+ </xsl:call-template>
917
+ </xsl:if>
918
+ </xsl:variable><xsl:variable name="title-list-figures">
919
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
920
+ <xsl:value-of select="$toc_figure_title"/>
921
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
922
+ <xsl:call-template name="getTitle">
923
+ <xsl:with-param name="name" select="'title-list-figures'"/>
924
+ </xsl:call-template>
925
+ </xsl:if>
926
+ </xsl:variable><xsl:variable name="title-list-recommendations">
927
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
928
+ <xsl:value-of select="$toc_requirement_title"/>
929
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
930
+ <xsl:call-template name="getTitle">
931
+ <xsl:with-param name="name" select="'title-list-recommendations'"/>
932
+ </xsl:call-template>
933
+ </xsl:if>
934
+ </xsl:variable><xsl:variable name="bibdata">
909
935
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
910
936
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
911
937
  </xsl:variable><xsl:variable name="linebreak">&#8232;</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">
@@ -2117,6 +2143,30 @@
2117
2143
  <xsl:sort select="@displayorder" data-type="number"/>
2118
2144
  <xsl:apply-templates select="." mode="contents"/>
2119
2145
  </xsl:for-each>
2146
+ </xsl:template><xsl:template name="processTablesFigures_Contents">
2147
+ <xsl:param name="always"/>
2148
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2149
+ <xsl:call-template name="processTables_Contents"/>
2150
+ </xsl:if>
2151
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2152
+ <xsl:call-template name="processFigures_Contents"/>
2153
+ </xsl:if>
2154
+ </xsl:template><xsl:template name="processTables_Contents">
2155
+ <tables>
2156
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
2157
+ <table id="{@id}" alt-text="{*[local-name() = 'name']}">
2158
+ <xsl:copy-of select="*[local-name() = 'name']"/>
2159
+ </table>
2160
+ </xsl:for-each>
2161
+ </tables>
2162
+ </xsl:template><xsl:template name="processFigures_Contents">
2163
+ <figures>
2164
+ <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) != '']">
2165
+ <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
2166
+ <xsl:copy-of select="*[local-name() = 'name']"/>
2167
+ </figure>
2168
+ </xsl:for-each>
2169
+ </figures>
2120
2170
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2121
2171
  <xsl:for-each select="/*/*[local-name()='preface']/*">
2122
2172
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2905,37 +2955,7 @@
2905
2955
 
2906
2956
  <!-- list of footnotes to calculate actual footnotes number -->
2907
2957
  <xsl:variable name="p_fn_">
2908
- <xsl:choose>
2909
- <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2910
- <fn gen_id="{generate-id(.)}">
2911
- <xsl:copy-of select="@*"/>
2912
- <xsl:copy-of select="node()"/>
2913
- </fn>
2914
- </xsl:when>
2915
- <xsl:otherwise>
2916
- <!-- itetation for:
2917
- footnotes in bibdata/title
2918
- footnotes in bibliography
2919
- footnotes in document's body (except table's head/body/foot and figure text)
2920
- -->
2921
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2922
- <fn gen_id="{generate-id(.)}">
2923
- <xsl:copy-of select="@*"/>
2924
- <xsl:copy-of select="node()"/>
2925
- </fn>
2926
- </xsl:for-each>
2927
- <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']/*">
2928
- <xsl:sort select="@displayorder" data-type="number"/>
2929
- <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])]">
2930
- <!-- copy unique fn -->
2931
- <fn gen_id="{generate-id(.)}">
2932
- <xsl:copy-of select="@*"/>
2933
- <xsl:copy-of select="node()"/>
2934
- </fn>
2935
- </xsl:for-each>
2936
- </xsl:for-each>
2937
- </xsl:otherwise>
2938
- </xsl:choose>
2958
+ <xsl:call-template name="get_fn_list"/>
2939
2959
  </xsl:variable>
2940
2960
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
2941
2961
 
@@ -2996,6 +3016,38 @@
2996
3016
  <xsl:copy-of select="$footnote_inline"/>
2997
3017
  </xsl:otherwise>
2998
3018
  </xsl:choose>
3019
+ </xsl:template><xsl:template name="get_fn_list">
3020
+ <xsl:choose>
3021
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
3022
+ <fn gen_id="{generate-id(.)}">
3023
+ <xsl:copy-of select="@*"/>
3024
+ <xsl:copy-of select="node()"/>
3025
+ </fn>
3026
+ </xsl:when>
3027
+ <xsl:otherwise>
3028
+ <!-- itetation for:
3029
+ footnotes in bibdata/title
3030
+ footnotes in bibliography
3031
+ footnotes in document's body (except table's head/body/foot and figure text)
3032
+ -->
3033
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
3034
+ <fn gen_id="{generate-id(.)}">
3035
+ <xsl:copy-of select="@*"/>
3036
+ <xsl:copy-of select="node()"/>
3037
+ </fn>
3038
+ </xsl:for-each>
3039
+ <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']/*">
3040
+ <xsl:sort select="@displayorder" data-type="number"/>
3041
+ <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])]">
3042
+ <!-- copy unique fn -->
3043
+ <fn gen_id="{generate-id(.)}">
3044
+ <xsl:copy-of select="@*"/>
3045
+ <xsl:copy-of select="node()"/>
3046
+ </fn>
3047
+ </xsl:for-each>
3048
+ </xsl:for-each>
3049
+ </xsl:otherwise>
3050
+ </xsl:choose>
2999
3051
  </xsl:template><xsl:template name="table_fn_display">
3000
3052
  <xsl:variable name="references">
3001
3053
 
@@ -3167,7 +3219,7 @@
3167
3219
  </fo:inline>
3168
3220
  </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
3169
3221
  <fo:inline><xsl:value-of select="."/></fo:inline>
3170
- </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
3222
+ </xsl:template><xsl:template match="*[local-name()='fn']//*[local-name()='p']">
3171
3223
  <fo:inline>
3172
3224
  <xsl:apply-templates/>
3173
3225
  </fo:inline>
@@ -4871,13 +4923,14 @@
4871
4923
  <xsl:apply-templates mode="bookmarks"/>
4872
4924
  </xsl:template><xsl:template name="addBookmarks">
4873
4925
  <xsl:param name="contents"/>
4874
- <xsl:if test="xalan:nodeset($contents)//item">
4926
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4927
+ <xsl:if test="$contents_nodes//item">
4875
4928
  <fo:bookmark-tree>
4876
4929
  <xsl:choose>
4877
- <xsl:when test="xalan:nodeset($contents)/doc">
4930
+ <xsl:when test="$contents_nodes/doc">
4878
4931
  <xsl:choose>
4879
- <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
4880
- <xsl:for-each select="xalan:nodeset($contents)/doc">
4932
+ <xsl:when test="count($contents_nodes/doc) &gt; 1">
4933
+ <xsl:for-each select="$contents_nodes/doc">
4881
4934
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
4882
4935
  <xsl:if test="@bundle = 'true'">
4883
4936
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
@@ -4928,7 +4981,7 @@
4928
4981
  </xsl:for-each>
4929
4982
  </xsl:when>
4930
4983
  <xsl:otherwise>
4931
- <xsl:for-each select="xalan:nodeset($contents)/doc">
4984
+ <xsl:for-each select="$contents_nodes/doc">
4932
4985
 
4933
4986
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4934
4987
 
@@ -4946,25 +4999,36 @@
4946
4999
  </xsl:choose>
4947
5000
  </xsl:when>
4948
5001
  <xsl:otherwise>
4949
- <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
5002
+ <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
5003
+
5004
+ <xsl:call-template name="insertFigureBookmarks">
5005
+ <xsl:with-param name="contents" select="$contents_nodes/contents"/>
5006
+ </xsl:call-template>
5007
+
5008
+ <xsl:call-template name="insertTableBookmarks">
5009
+ <xsl:with-param name="contents" select="$contents_nodes/contents"/>
5010
+ <xsl:with-param name="lang" select="@lang"/>
5011
+ </xsl:call-template>
5012
+
4950
5013
  </xsl:otherwise>
4951
5014
  </xsl:choose>
4952
5015
 
5016
+
4953
5017
 
4954
5018
 
4955
5019
 
4956
5020
 
4957
-
4958
-
5021
+
4959
5022
 
4960
5023
  </fo:bookmark-tree>
4961
5024
  </xsl:if>
4962
5025
  </xsl:template><xsl:template name="insertFigureBookmarks">
4963
5026
  <xsl:param name="contents"/>
4964
- <xsl:if test="xalan:nodeset($contents)/figure">
4965
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
5027
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
5028
+ <xsl:if test="$contents_nodes/figure">
5029
+ <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
4966
5030
  <fo:bookmark-title>Figures</fo:bookmark-title>
4967
- <xsl:for-each select="xalan:nodeset($contents)/figure">
5031
+ <xsl:for-each select="$contents_nodes/figure">
4968
5032
  <fo:bookmark internal-destination="{@id}">
4969
5033
  <fo:bookmark-title>
4970
5034
  <xsl:value-of select="normalize-space(title)"/>
@@ -4973,18 +5037,40 @@
4973
5037
  </xsl:for-each>
4974
5038
  </fo:bookmark>
4975
5039
  </xsl:if>
5040
+
5041
+
5042
+ <xsl:if test="$contents_nodes//figures/figure">
5043
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
5044
+
5045
+
5046
+
5047
+ <xsl:variable name="bookmark-title">
5048
+
5049
+ <xsl:value-of select="$title-list-figures"/>
5050
+
5051
+ </xsl:variable>
5052
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
5053
+ <xsl:for-each select="$contents_nodes//figures/figure">
5054
+ <fo:bookmark internal-destination="{@id}">
5055
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
5056
+ </fo:bookmark>
5057
+ </xsl:for-each>
5058
+ </fo:bookmark>
5059
+ </xsl:if>
5060
+
4976
5061
  </xsl:template><xsl:template name="insertTableBookmarks">
4977
5062
  <xsl:param name="contents"/>
4978
5063
  <xsl:param name="lang"/>
4979
- <xsl:if test="xalan:nodeset($contents)/table">
4980
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
5064
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
5065
+ <xsl:if test="$contents_nodes/table">
5066
+ <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
4981
5067
  <fo:bookmark-title>
4982
5068
  <xsl:choose>
4983
5069
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
4984
5070
  <xsl:otherwise>Tables</xsl:otherwise>
4985
5071
  </xsl:choose>
4986
5072
  </fo:bookmark-title>
4987
- <xsl:for-each select="xalan:nodeset($contents)/table">
5073
+ <xsl:for-each select="$contents_nodes/table">
4988
5074
  <fo:bookmark internal-destination="{@id}">
4989
5075
  <fo:bookmark-title>
4990
5076
  <xsl:value-of select="normalize-space(title)"/>
@@ -4993,6 +5079,29 @@
4993
5079
  </xsl:for-each>
4994
5080
  </fo:bookmark>
4995
5081
  </xsl:if>
5082
+
5083
+
5084
+ <xsl:if test="$contents_nodes//tables/table">
5085
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
5086
+
5087
+
5088
+
5089
+ <xsl:variable name="bookmark-title">
5090
+
5091
+ <xsl:value-of select="$title-list-tables"/>
5092
+
5093
+ </xsl:variable>
5094
+
5095
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
5096
+
5097
+ <xsl:for-each select="$contents_nodes//tables/table">
5098
+ <fo:bookmark internal-destination="{@id}">
5099
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
5100
+ </fo:bookmark>
5101
+ </xsl:for-each>
5102
+ </fo:bookmark>
5103
+ </xsl:if>
5104
+
4996
5105
  </xsl:template><xsl:template name="getLangVersion">
4997
5106
  <xsl:param name="lang"/>
4998
5107
  <xsl:param name="doctype" select="''"/>
@@ -5653,6 +5762,8 @@
5653
5762
  </xsl:otherwise>
5654
5763
  </xsl:choose> -->
5655
5764
  </fo:block>
5765
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
5766
+ <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5656
5767
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5657
5768
  <xsl:if test="normalize-space() != ''">
5658
5769
  <xsl:value-of select="."/>
@@ -5727,26 +5838,11 @@
5727
5838
  </xsl:template><xsl:template match="*[local-name() = 'author']">
5728
5839
  <xsl:text>— </xsl:text>
5729
5840
  <xsl:apply-templates/>
5730
- </xsl:template><xsl:variable name="bibitem_hidden_">
5731
- <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
5732
- <xsl:copy-of select="."/>
5733
- </xsl:for-each>
5734
- <xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
5735
- <xsl:copy-of select="."/>
5736
- </xsl:for-each>
5737
- </xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
5738
-
5739
- <xsl:variable name="bibitemid">
5740
- <xsl:choose>
5741
- <!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
5742
- <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
5743
- <xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
5744
- <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
5745
- </xsl:choose>
5746
- </xsl:variable>
5747
-
5841
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
5842
+ <xsl:variable name="current_bibitemid" select="@bibitemid"/>
5843
+ <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/>
5748
5844
  <xsl:choose>
5749
- <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5845
+ <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) -->
5750
5846
  <fo:inline xsl:use-attribute-sets="eref-style">
5751
5847
  <xsl:if test="@type = 'footnote'">
5752
5848
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
@@ -5760,8 +5856,8 @@
5760
5856
  <xsl:variable name="text" select="normalize-space()"/>
5761
5857
 
5762
5858
 
5763
-
5764
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5859
+
5860
+ <fo:basic-link fox:alt-text="{@citeas}">
5765
5861
  <xsl:if test="normalize-space(@citeas) = ''">
5766
5862
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
5767
5863
  </xsl:if>
@@ -5773,14 +5869,21 @@
5773
5869
 
5774
5870
  </xsl:if>
5775
5871
 
5776
-
5872
+ <xsl:choose>
5873
+ <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
5874
+ <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
5875
+ </xsl:when>
5876
+ <xsl:otherwise>
5877
+ <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5878
+ </xsl:otherwise>
5879
+ </xsl:choose>
5777
5880
 
5778
5881
  <xsl:apply-templates/>
5779
5882
  </fo:basic-link>
5780
-
5883
+
5781
5884
  </fo:inline>
5782
5885
  </xsl:when>
5783
- <xsl:otherwise>
5886
+ <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
5784
5887
  <fo:inline><xsl:apply-templates/></fo:inline>
5785
5888
  </xsl:otherwise>
5786
5889
  </xsl:choose>
@@ -6479,23 +6582,45 @@
6479
6582
  <xsl:apply-templates/>
6480
6583
  </fo:inline>
6481
6584
  </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
6585
+
6586
+ <!-- list of footnotes to calculate actual footnotes number -->
6587
+ <xsl:variable name="p_fn_">
6588
+ <xsl:call-template name="get_fn_list"/>
6589
+ </xsl:variable>
6590
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
6591
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
6592
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
6593
+ <!-- fn sequence number in document -->
6594
+ <xsl:variable name="current_fn_number">
6595
+ <xsl:choose>
6596
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
6597
+ <xsl:otherwise>
6598
+ <!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
6599
+ <xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
6600
+ </xsl:otherwise>
6601
+ </xsl:choose>
6602
+ </xsl:variable>
6482
6603
  <fo:footnote>
6483
6604
  <xsl:variable name="number">
6484
6605
 
6485
- <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6606
+ <xsl:value-of select="$current_fn_number"/>
6486
6607
 
6487
6608
  </xsl:variable>
6609
+
6610
+ <xsl:variable name="current_fn_number_text">
6611
+ <xsl:value-of select="$number"/>
6612
+
6613
+ </xsl:variable>
6614
+
6488
6615
  <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
6489
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
6490
- <xsl:value-of select="$number"/>
6491
-
6616
+ <fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
6617
+ <xsl:value-of select="$current_fn_number_text"/>
6492
6618
  </fo:basic-link>
6493
6619
  </fo:inline>
6494
6620
  <fo:footnote-body>
6495
6621
  <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
6496
- <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6497
- <xsl:value-of select="$number"/>
6498
-
6622
+ <fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6623
+ <xsl:value-of select="$current_fn_number_text"/>
6499
6624
  </fo:inline>
6500
6625
  <xsl:apply-templates/>
6501
6626
  </fo:block>
@@ -6746,6 +6871,78 @@
6746
6871
  <xsl:apply-templates/>
6747
6872
  </fo:block>
6748
6873
 
6874
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_step1">
6875
+ <xsl:copy>
6876
+ <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
6877
+ </xsl:copy>
6878
+ </xsl:template><xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
6879
+ <xsl:copy>
6880
+ <xsl:copy-of select="@*"/>
6881
+
6882
+ <xsl:variable name="nodes_preface_">
6883
+ <xsl:for-each select="*">
6884
+ <node id="{@id}"/>
6885
+ </xsl:for-each>
6886
+ </xsl:variable>
6887
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
6888
+
6889
+ <xsl:for-each select="*">
6890
+ <xsl:sort select="@displayorder" data-type="number"/>
6891
+
6892
+ <!-- process Section's title -->
6893
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
6894
+ <xsl:if test="$preceding-sibling_id != ''">
6895
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
6896
+ </xsl:if>
6897
+
6898
+ <xsl:choose>
6899
+ <xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
6900
+ <xsl:otherwise>
6901
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6902
+ </xsl:otherwise>
6903
+ </xsl:choose>
6904
+
6905
+ </xsl:for-each>
6906
+ </xsl:copy>
6907
+ </xsl:template><xsl:template match="*[local-name() = 'sections']" mode="update_xml_step1">
6908
+ <xsl:copy>
6909
+ <xsl:copy-of select="@*"/>
6910
+
6911
+ <xsl:variable name="nodes_sections_">
6912
+ <xsl:for-each select="*">
6913
+ <node id="{@id}"/>
6914
+ </xsl:for-each>
6915
+ </xsl:variable>
6916
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
6917
+
6918
+ <!-- move section 'Normative references' inside 'sections' -->
6919
+ <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']]">
6920
+ <xsl:sort select="@displayorder" data-type="number"/>
6921
+
6922
+ <!-- process Section's title -->
6923
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
6924
+ <xsl:if test="$preceding-sibling_id != ''">
6925
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
6926
+ </xsl:if>
6927
+
6928
+ <xsl:choose>
6929
+ <xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
6930
+ <xsl:otherwise>
6931
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6932
+ </xsl:otherwise>
6933
+ </xsl:choose>
6934
+
6935
+ </xsl:for-each>
6936
+ </xsl:copy>
6937
+ </xsl:template><xsl:template match="*[local-name() = 'bibliography']" mode="update_xml_step1">
6938
+ <xsl:copy>
6939
+ <xsl:copy-of select="@*"/>
6940
+ <!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
6941
+ <xsl:for-each select="*[not(@normative='true') and not(*[*[@normative='true']])]">
6942
+ <xsl:sort select="@displayorder" data-type="number"/>
6943
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6944
+ </xsl:for-each>
6945
+ </xsl:copy>
6749
6946
  </xsl:template><xsl:template name="convertDate">
6750
6947
  <xsl:param name="date"/>
6751
6948
  <xsl:param name="format" select="'short'"/>