metanorma-m3aawg 2.0.4 → 2.0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,12 +16,15 @@
16
16
  <item level="1" id="Foreword" display="true">Foreword</item>
17
17
  <item id="term-script" display="false">3.2</item>
18
18
  -->
19
- <xsl:variable name="contents">
19
+ <xsl:variable name="contents_">
20
20
  <contents>
21
21
  <xsl:call-template name="processPrefaceSectionsDefault_Contents"/>
22
22
  <xsl:call-template name="processMainSectionsDefault_Contents"/>
23
+
24
+ <xsl:call-template name="processTablesFigures_Contents"/>
23
25
  </contents>
24
26
  </xsl:variable>
27
+ <xsl:variable name="contents" select="xalan:nodeset($contents_)"/>
25
28
 
26
29
  <xsl:template match="/">
27
30
  <xsl:call-template name="namespaceCheck"/>
@@ -200,7 +203,7 @@
200
203
  <xsl:if test="$debug = 'true'">
201
204
  <xsl:text disable-output-escaping="yes">&lt;!--</xsl:text>
202
205
  DEBUG
203
- contents=<xsl:copy-of select="xalan:nodeset($contents)"/>
206
+ contents=<xsl:copy-of select="$contents"/>
204
207
  <xsl:text disable-output-escaping="yes">--&gt;</xsl:text>
205
208
  </xsl:if>
206
209
 
@@ -213,7 +216,7 @@
213
216
  </xsl:variable>
214
217
  <fo:block font-size="12pt" font-weight="bold" text-decoration="underline" margin-bottom="4pt" role="H1"><xsl:value-of select="$title-toc"/></fo:block>
215
218
  <fo:block font-size="10pt" role="TOC">
216
- <xsl:for-each select="xalan:nodeset($contents)//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
219
+ <xsl:for-each select="$contents//item[@display = 'true']"><!-- [not(@level = 2 and starts-with(@section, '0'))] skip clause from preface -->
217
220
  <xsl:choose>
218
221
  <xsl:when test="@section = ''">
219
222
  <fo:table table-layout="fixed" width="100%">
@@ -290,10 +293,30 @@
290
293
  </xsl:otherwise>
291
294
 
292
295
  </xsl:choose>
296
+
297
+ </xsl:for-each>
293
298
 
299
+ <!-- List of Tables -->
300
+ <xsl:if test="$contents//tables/table">
301
+ <xsl:call-template name="insertListOf_Title">
302
+ <xsl:with-param name="title" select="$title-list-tables"/>
303
+ </xsl:call-template>
304
+ <xsl:for-each select="$contents//tables/table">
305
+ <xsl:call-template name="insertListOf_Item"/>
306
+ </xsl:for-each>
307
+ </xsl:if>
294
308
 
309
+ <!-- List of Figures -->
310
+ <xsl:if test="$contents//figures/figure">
311
+ <xsl:call-template name="insertListOf_Title">
312
+ <xsl:with-param name="title" select="$title-list-figures"/>
313
+ </xsl:call-template>
314
+ <xsl:for-each select="$contents//figures/figure">
315
+ <xsl:call-template name="insertListOf_Item"/>
316
+ </xsl:for-each>
317
+ </xsl:if>
295
318
 
296
- </xsl:for-each>
319
+
297
320
  </fo:block>
298
321
  </fo:block-container>
299
322
 
@@ -318,6 +341,49 @@
318
341
  </fo:root>
319
342
  </xsl:template>
320
343
 
344
+ <xsl:template name="insertListOf_Title">
345
+ <xsl:param name="title"/>
346
+ <fo:table table-layout="fixed" width="100%">
347
+ <fo:table-column column-width="180mm"/>
348
+ <fo:table-body>
349
+ <fo:table-row height="6mm">
350
+ <fo:table-cell>
351
+ <fo:block role="TOCI" font-weight="bold">
352
+ <xsl:value-of select="$title"/>
353
+ </fo:block>
354
+ </fo:table-cell>
355
+ </fo:table-row>
356
+ </fo:table-body>
357
+ </fo:table>
358
+ </xsl:template>
359
+
360
+ <xsl:template name="insertListOf_Item">
361
+ <fo:table table-layout="fixed" width="100%">
362
+ <fo:table-column column-width="5mm"/>
363
+ <fo:table-column column-width="175mm"/>
364
+ <fo:table-body>
365
+ <fo:table-row height="6mm">
366
+ <fo:table-cell>
367
+ <fo:block> </fo:block>
368
+ </fo:table-cell>
369
+ <fo:table-cell>
370
+ <fo:block text-align-last="justify" role="TOCI" font-weight="bold">
371
+ <fo:basic-link internal-destination="{@id}">
372
+ <xsl:call-template name="setAltText">
373
+ <xsl:with-param name="value" select="@alt-text"/>
374
+ </xsl:call-template>
375
+ <xsl:apply-templates select="." mode="contents"/><xsl:text> </xsl:text>
376
+ <fo:inline keep-together.within-line="always">
377
+ <fo:leader font-weight="normal" leader-pattern="dots"/>
378
+ <fo:inline><fo:page-number-citation ref-id="{@id}"/></fo:inline>
379
+ </fo:inline>
380
+ </fo:basic-link>
381
+ </fo:block>
382
+ </fo:table-cell>
383
+ </fo:table-row>
384
+ </fo:table-body>
385
+ </fo:table>
386
+ </xsl:template>
321
387
 
322
388
  <xsl:template match="m3d:boilerplate//m3d:p" priority="2">
323
389
  <fo:block font-size="11pt" margin-bottom="12pt">
@@ -594,7 +660,7 @@
594
660
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAjUAAAA8CAYAAACehUt5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA99pVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVud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pOjVnMND+1qKFmae8wFgtsG2gHDly5KgAVF5e/pvffrJtf4yoCUBDsrlDD0jZnqdqAtAEtE9GzVJS12NpxxuqwnCspk7vvSewQplRk4CGffKrpLu4WsU2xFMqfgTkuIS+hrErAGQ7eV+RpBtsgMaRI0eOqpNswmSFMlscf1yDdZ5rqVfsk3NFkMJL4HkmbZYabCMMUYsM4wNDz3VFkKzUrNShVr7FUOZ9NShw35f64SwWk60P1I2fJiwW9gDQlGR1cGTSNv0gbYKhLrYvh9WWD5peZ3C5fFLqB3dI7HfDm2YPzqkkhzFChQ+bC2gOAdpwAOpSxzYdOXJUW8m8/VQPKGr7yVHdJbgdKy+GwcowwKvGOsCgFnZZy2jfUtv7DMAXtgDYy4dHFM5Yakzw/AsXBTBqhR3AXAaFzOI7nKfc9pMjR44KTNh+cmc/OaqTRBCxpIbrgO2dVXWoz6DF+ZLJkSNHjuodOZduR44cOXLkyJEDNY4cOXLkyJEjR7WF/O2nDbnvXd9oIzfEjhw5cuTI0W8L1CAA0DauOxw5clQA6khe84PrCkeOHBWS/l+AAQACYD7v73Ou8wAAAABJRU5ErkJggg==</xsl:text>
595
661
  </xsl:variable>
596
662
 
597
- <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">
663
+ <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">
598
664
  <xsl:call-template name="getLang"/>
599
665
  </xsl:variable><xsl:variable name="pageWidth_">
600
666
  215.9
@@ -640,7 +706,7 @@
640
706
  <xsl:text>Contents</xsl:text>
641
707
 
642
708
  </title-toc>
643
-
709
+
644
710
  <title-descriptors lang="en">Descriptors</title-descriptors>
645
711
 
646
712
  <title-part lang="en">
@@ -676,7 +742,31 @@
676
742
  <title-continued lang="en">(continued)</title-continued>
677
743
  <title-continued lang="fr">(continué)</title-continued>
678
744
 
679
- </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="bibdata">
745
+ </xsl:variable><xsl:variable name="titles" select="xalan:nodeset($titles_)"/><xsl:variable name="title-list-tables">
746
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
747
+ <xsl:value-of select="$toc_table_title"/>
748
+ <xsl:if test="normalize-space($toc_table_title) = ''">
749
+ <xsl:call-template name="getTitle">
750
+ <xsl:with-param name="name" select="'title-list-tables'"/>
751
+ </xsl:call-template>
752
+ </xsl:if>
753
+ </xsl:variable><xsl:variable name="title-list-figures">
754
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
755
+ <xsl:value-of select="$toc_figure_title"/>
756
+ <xsl:if test="normalize-space($toc_figure_title) = ''">
757
+ <xsl:call-template name="getTitle">
758
+ <xsl:with-param name="name" select="'title-list-figures'"/>
759
+ </xsl:call-template>
760
+ </xsl:if>
761
+ </xsl:variable><xsl:variable name="title-list-recommendations">
762
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
763
+ <xsl:value-of select="$toc_requirement_title"/>
764
+ <xsl:if test="normalize-space($toc_requirement_title) = ''">
765
+ <xsl:call-template name="getTitle">
766
+ <xsl:with-param name="name" select="'title-list-recommendations'"/>
767
+ </xsl:call-template>
768
+ </xsl:if>
769
+ </xsl:variable><xsl:variable name="bibdata">
680
770
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']"/>
681
771
  <xsl:copy-of select="//*[contains(local-name(), '-standard')]/*[local-name() = 'localized-strings']"/>
682
772
  </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">
@@ -1880,6 +1970,30 @@
1880
1970
  <xsl:sort select="@displayorder" data-type="number"/>
1881
1971
  <xsl:apply-templates select="." mode="contents"/>
1882
1972
  </xsl:for-each>
1973
+ </xsl:template><xsl:template name="processTablesFigures_Contents">
1974
+ <xsl:param name="always"/>
1975
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
1976
+ <xsl:call-template name="processTables_Contents"/>
1977
+ </xsl:if>
1978
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
1979
+ <xsl:call-template name="processFigures_Contents"/>
1980
+ </xsl:if>
1981
+ </xsl:template><xsl:template name="processTables_Contents">
1982
+ <tables>
1983
+ <xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
1984
+ <table id="{@id}" alt-text="{*[local-name() = 'name']}">
1985
+ <xsl:copy-of select="*[local-name() = 'name']"/>
1986
+ </table>
1987
+ </xsl:for-each>
1988
+ </tables>
1989
+ </xsl:template><xsl:template name="processFigures_Contents">
1990
+ <figures>
1991
+ <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) != '']">
1992
+ <figure id="{@id}" alt-text="{*[local-name() = 'name']}">
1993
+ <xsl:copy-of select="*[local-name() = 'name']"/>
1994
+ </figure>
1995
+ </xsl:for-each>
1996
+ </figures>
1883
1997
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
1884
1998
  <xsl:for-each select="/*/*[local-name()='preface']/*">
1885
1999
  <xsl:sort select="@displayorder" data-type="number"/>
@@ -2664,37 +2778,7 @@
2664
2778
 
2665
2779
  <!-- list of footnotes to calculate actual footnotes number -->
2666
2780
  <xsl:variable name="p_fn_">
2667
- <xsl:choose>
2668
- <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2669
- <fn gen_id="{generate-id(.)}">
2670
- <xsl:copy-of select="@*"/>
2671
- <xsl:copy-of select="node()"/>
2672
- </fn>
2673
- </xsl:when>
2674
- <xsl:otherwise>
2675
- <!-- itetation for:
2676
- footnotes in bibdata/title
2677
- footnotes in bibliography
2678
- footnotes in document's body (except table's head/body/foot and figure text)
2679
- -->
2680
- <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2681
- <fn gen_id="{generate-id(.)}">
2682
- <xsl:copy-of select="@*"/>
2683
- <xsl:copy-of select="node()"/>
2684
- </fn>
2685
- </xsl:for-each>
2686
- <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']/*">
2687
- <xsl:sort select="@displayorder" data-type="number"/>
2688
- <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])]">
2689
- <!-- copy unique fn -->
2690
- <fn gen_id="{generate-id(.)}">
2691
- <xsl:copy-of select="@*"/>
2692
- <xsl:copy-of select="node()"/>
2693
- </fn>
2694
- </xsl:for-each>
2695
- </xsl:for-each>
2696
- </xsl:otherwise>
2697
- </xsl:choose>
2781
+ <xsl:call-template name="get_fn_list"/>
2698
2782
  </xsl:variable>
2699
2783
  <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
2700
2784
 
@@ -2755,6 +2839,38 @@
2755
2839
  <xsl:copy-of select="$footnote_inline"/>
2756
2840
  </xsl:otherwise>
2757
2841
  </xsl:choose>
2842
+ </xsl:template><xsl:template name="get_fn_list">
2843
+ <xsl:choose>
2844
+ <xsl:when test="@current_fn_number"> <!-- for BSI, footnote reference number calculated already -->
2845
+ <fn gen_id="{generate-id(.)}">
2846
+ <xsl:copy-of select="@*"/>
2847
+ <xsl:copy-of select="node()"/>
2848
+ </fn>
2849
+ </xsl:when>
2850
+ <xsl:otherwise>
2851
+ <!-- itetation for:
2852
+ footnotes in bibdata/title
2853
+ footnotes in bibliography
2854
+ footnotes in document's body (except table's head/body/foot and figure text)
2855
+ -->
2856
+ <xsl:for-each select="ancestor::*[contains(local-name(), '-standard')]/*[local-name() = 'bibdata']/*[local-name() = 'note'][@type='title-footnote']">
2857
+ <fn gen_id="{generate-id(.)}">
2858
+ <xsl:copy-of select="@*"/>
2859
+ <xsl:copy-of select="node()"/>
2860
+ </fn>
2861
+ </xsl:for-each>
2862
+ <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']/*">
2863
+ <xsl:sort select="@displayorder" data-type="number"/>
2864
+ <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])]">
2865
+ <!-- copy unique fn -->
2866
+ <fn gen_id="{generate-id(.)}">
2867
+ <xsl:copy-of select="@*"/>
2868
+ <xsl:copy-of select="node()"/>
2869
+ </fn>
2870
+ </xsl:for-each>
2871
+ </xsl:for-each>
2872
+ </xsl:otherwise>
2873
+ </xsl:choose>
2758
2874
  </xsl:template><xsl:template name="table_fn_display">
2759
2875
  <xsl:variable name="references">
2760
2876
 
@@ -2926,7 +3042,7 @@
2926
3042
  </fo:inline>
2927
3043
  </xsl:template><xsl:template match="*[local-name()='fn']/text()[normalize-space() != '']">
2928
3044
  <fo:inline><xsl:value-of select="."/></fo:inline>
2929
- </xsl:template><xsl:template match="*[local-name()='fn']/*[local-name()='p']">
3045
+ </xsl:template><xsl:template match="*[local-name()='fn']//*[local-name()='p']">
2930
3046
  <fo:inline>
2931
3047
  <xsl:apply-templates/>
2932
3048
  </fo:inline>
@@ -4623,13 +4739,14 @@
4623
4739
  <xsl:apply-templates mode="bookmarks"/>
4624
4740
  </xsl:template><xsl:template name="addBookmarks">
4625
4741
  <xsl:param name="contents"/>
4626
- <xsl:if test="xalan:nodeset($contents)//item">
4742
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4743
+ <xsl:if test="$contents_nodes//item">
4627
4744
  <fo:bookmark-tree>
4628
4745
  <xsl:choose>
4629
- <xsl:when test="xalan:nodeset($contents)/doc">
4746
+ <xsl:when test="$contents_nodes/doc">
4630
4747
  <xsl:choose>
4631
- <xsl:when test="count(xalan:nodeset($contents)/doc) &gt; 1">
4632
- <xsl:for-each select="xalan:nodeset($contents)/doc">
4748
+ <xsl:when test="count($contents_nodes/doc) &gt; 1">
4749
+ <xsl:for-each select="$contents_nodes/doc">
4633
4750
  <fo:bookmark internal-destination="{contents/item[1]/@id}" starting-state="hide">
4634
4751
  <xsl:if test="@bundle = 'true'">
4635
4752
  <xsl:attribute name="internal-destination"><xsl:value-of select="@firstpage_id"/></xsl:attribute>
@@ -4680,7 +4797,7 @@
4680
4797
  </xsl:for-each>
4681
4798
  </xsl:when>
4682
4799
  <xsl:otherwise>
4683
- <xsl:for-each select="xalan:nodeset($contents)/doc">
4800
+ <xsl:for-each select="$contents_nodes/doc">
4684
4801
 
4685
4802
  <xsl:apply-templates select="contents/item" mode="bookmark"/>
4686
4803
 
@@ -4698,25 +4815,36 @@
4698
4815
  </xsl:choose>
4699
4816
  </xsl:when>
4700
4817
  <xsl:otherwise>
4701
- <xsl:apply-templates select="xalan:nodeset($contents)/contents/item" mode="bookmark"/>
4818
+ <xsl:apply-templates select="$contents_nodes/contents/item" mode="bookmark"/>
4819
+
4820
+ <xsl:call-template name="insertFigureBookmarks">
4821
+ <xsl:with-param name="contents" select="$contents_nodes/contents"/>
4822
+ </xsl:call-template>
4823
+
4824
+ <xsl:call-template name="insertTableBookmarks">
4825
+ <xsl:with-param name="contents" select="$contents_nodes/contents"/>
4826
+ <xsl:with-param name="lang" select="@lang"/>
4827
+ </xsl:call-template>
4828
+
4702
4829
  </xsl:otherwise>
4703
4830
  </xsl:choose>
4704
4831
 
4832
+
4705
4833
 
4706
4834
 
4707
4835
 
4708
4836
 
4709
-
4710
-
4837
+
4711
4838
 
4712
4839
  </fo:bookmark-tree>
4713
4840
  </xsl:if>
4714
4841
  </xsl:template><xsl:template name="insertFigureBookmarks">
4715
4842
  <xsl:param name="contents"/>
4716
- <xsl:if test="xalan:nodeset($contents)/figure">
4717
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/figure[1]/@id}" starting-state="hide">
4843
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4844
+ <xsl:if test="$contents_nodes/figure">
4845
+ <fo:bookmark internal-destination="{$contents_nodes/figure[1]/@id}" starting-state="hide">
4718
4846
  <fo:bookmark-title>Figures</fo:bookmark-title>
4719
- <xsl:for-each select="xalan:nodeset($contents)/figure">
4847
+ <xsl:for-each select="$contents_nodes/figure">
4720
4848
  <fo:bookmark internal-destination="{@id}">
4721
4849
  <fo:bookmark-title>
4722
4850
  <xsl:value-of select="normalize-space(title)"/>
@@ -4725,18 +4853,40 @@
4725
4853
  </xsl:for-each>
4726
4854
  </fo:bookmark>
4727
4855
  </xsl:if>
4856
+
4857
+
4858
+ <xsl:if test="$contents_nodes//figures/figure">
4859
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
4860
+
4861
+
4862
+
4863
+ <xsl:variable name="bookmark-title">
4864
+
4865
+ <xsl:value-of select="$title-list-figures"/>
4866
+
4867
+ </xsl:variable>
4868
+ <fo:bookmark-title><xsl:value-of select="normalize-space($bookmark-title)"/></fo:bookmark-title>
4869
+ <xsl:for-each select="$contents_nodes//figures/figure">
4870
+ <fo:bookmark internal-destination="{@id}">
4871
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
4872
+ </fo:bookmark>
4873
+ </xsl:for-each>
4874
+ </fo:bookmark>
4875
+ </xsl:if>
4876
+
4728
4877
  </xsl:template><xsl:template name="insertTableBookmarks">
4729
4878
  <xsl:param name="contents"/>
4730
4879
  <xsl:param name="lang"/>
4731
- <xsl:if test="xalan:nodeset($contents)/table">
4732
- <fo:bookmark internal-destination="{xalan:nodeset($contents)/table[1]/@id}" starting-state="hide">
4880
+ <xsl:variable name="contents_nodes" select="xalan:nodeset($contents)"/>
4881
+ <xsl:if test="$contents_nodes/table">
4882
+ <fo:bookmark internal-destination="{$contents_nodes/table[1]/@id}" starting-state="hide">
4733
4883
  <fo:bookmark-title>
4734
4884
  <xsl:choose>
4735
4885
  <xsl:when test="$lang = 'fr'">Tableaux</xsl:when>
4736
4886
  <xsl:otherwise>Tables</xsl:otherwise>
4737
4887
  </xsl:choose>
4738
4888
  </fo:bookmark-title>
4739
- <xsl:for-each select="xalan:nodeset($contents)/table">
4889
+ <xsl:for-each select="$contents_nodes/table">
4740
4890
  <fo:bookmark internal-destination="{@id}">
4741
4891
  <fo:bookmark-title>
4742
4892
  <xsl:value-of select="normalize-space(title)"/>
@@ -4745,6 +4895,29 @@
4745
4895
  </xsl:for-each>
4746
4896
  </fo:bookmark>
4747
4897
  </xsl:if>
4898
+
4899
+
4900
+ <xsl:if test="$contents_nodes//tables/table">
4901
+ <fo:bookmark internal-destination="empty_bookmark" starting-state="hide">
4902
+
4903
+
4904
+
4905
+ <xsl:variable name="bookmark-title">
4906
+
4907
+ <xsl:value-of select="$title-list-tables"/>
4908
+
4909
+ </xsl:variable>
4910
+
4911
+ <fo:bookmark-title><xsl:value-of select="$bookmark-title"/></fo:bookmark-title>
4912
+
4913
+ <xsl:for-each select="$contents_nodes//tables/table">
4914
+ <fo:bookmark internal-destination="{@id}">
4915
+ <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
4916
+ </fo:bookmark>
4917
+ </xsl:for-each>
4918
+ </fo:bookmark>
4919
+ </xsl:if>
4920
+
4748
4921
  </xsl:template><xsl:template name="getLangVersion">
4749
4922
  <xsl:param name="lang"/>
4750
4923
  <xsl:param name="doctype" select="''"/>
@@ -5401,6 +5574,8 @@
5401
5574
  </xsl:otherwise>
5402
5575
  </xsl:choose> -->
5403
5576
  </fo:block>
5577
+ </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()[starts-with(., '[SOURCE: Adapted from: ')]" priority="2">
5578
+ <xsl:text>[</xsl:text><xsl:value-of select="substring-after(., '[SOURCE: ')"/>
5404
5579
  </xsl:template><xsl:template match="*[local-name() = 'termsource']/text()">
5405
5580
  <xsl:if test="normalize-space() != ''">
5406
5581
  <xsl:value-of select="."/>
@@ -5475,26 +5650,11 @@
5475
5650
  </xsl:template><xsl:template match="*[local-name() = 'author']">
5476
5651
  <xsl:text>— </xsl:text>
5477
5652
  <xsl:apply-templates/>
5478
- </xsl:template><xsl:variable name="bibitem_hidden_">
5479
- <xsl:for-each select="//*[local-name() = 'bibitem'][@hidden='true']">
5480
- <xsl:copy-of select="."/>
5481
- </xsl:for-each>
5482
- <xsl:for-each select="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem']">
5483
- <xsl:copy-of select="."/>
5484
- </xsl:for-each>
5485
- </xsl:variable><xsl:variable name="bibitem_hidden" select="xalan:nodeset($bibitem_hidden_)"/><xsl:template match="*[local-name() = 'eref']">
5486
-
5487
- <xsl:variable name="bibitemid">
5488
- <xsl:choose>
5489
- <!-- <xsl:when test="//*[local-name() = 'bibitem'][@hidden='true' and @id = current()/@bibitemid]"></xsl:when>
5490
- <xsl:when test="//*[local-name() = 'references'][@hidden='true']/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"></xsl:when> -->
5491
- <xsl:when test="$bibitem_hidden/*[local-name() = 'bibitem'][@id = current()/@bibitemid]"/>
5492
- <xsl:otherwise><xsl:value-of select="@bibitemid"/></xsl:otherwise>
5493
- </xsl:choose>
5494
- </xsl:variable>
5495
-
5653
+ </xsl:template><xsl:template match="*[local-name() = 'eref']">
5654
+ <xsl:variable name="current_bibitemid" select="@bibitemid"/>
5655
+ <xsl:variable name="external-destination" select="normalize-space(key('bibitems', $current_bibitemid)/*[local-name() = 'uri'][@type = 'citation'])"/>
5496
5656
  <xsl:choose>
5497
- <xsl:when test="normalize-space($bibitemid) != ''"> <!-- if in the bibliography there is the item with @bibitemid (and not hidden), then create link -->
5657
+ <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) -->
5498
5658
  <fo:inline xsl:use-attribute-sets="eref-style">
5499
5659
  <xsl:if test="@type = 'footnote'">
5500
5660
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
@@ -5510,8 +5670,8 @@
5510
5670
  <xsl:variable name="text" select="normalize-space()"/>
5511
5671
 
5512
5672
 
5513
-
5514
- <fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
5673
+
5674
+ <fo:basic-link fox:alt-text="{@citeas}">
5515
5675
  <xsl:if test="normalize-space(@citeas) = ''">
5516
5676
  <xsl:attribute name="fox:alt-text"><xsl:value-of select="."/></xsl:attribute>
5517
5677
  </xsl:if>
@@ -5521,14 +5681,21 @@
5521
5681
 
5522
5682
  </xsl:if>
5523
5683
 
5524
-
5684
+ <xsl:choose>
5685
+ <xsl:when test="$external-destination != ''"> <!-- external hyperlink -->
5686
+ <xsl:attribute name="external-destination"><xsl:value-of select="$external-destination"/></xsl:attribute>
5687
+ </xsl:when>
5688
+ <xsl:otherwise>
5689
+ <xsl:attribute name="internal-destination"><xsl:value-of select="@bibitemid"/></xsl:attribute>
5690
+ </xsl:otherwise>
5691
+ </xsl:choose>
5525
5692
 
5526
5693
  <xsl:apply-templates/>
5527
5694
  </fo:basic-link>
5528
-
5695
+
5529
5696
  </fo:inline>
5530
5697
  </xsl:when>
5531
- <xsl:otherwise>
5698
+ <xsl:otherwise> <!-- if there is key('bibitems_hidden', $current_bibitemid) -->
5532
5699
  <fo:inline><xsl:apply-templates/></fo:inline>
5533
5700
  </xsl:otherwise>
5534
5701
  </xsl:choose>
@@ -6270,23 +6437,45 @@
6270
6437
  <xsl:apply-templates/>
6271
6438
  </fo:inline>
6272
6439
  </xsl:template><xsl:template match="*[local-name() = 'bibitem']/*[local-name() = 'note']" priority="2">
6440
+
6441
+ <!-- list of footnotes to calculate actual footnotes number -->
6442
+ <xsl:variable name="p_fn_">
6443
+ <xsl:call-template name="get_fn_list"/>
6444
+ </xsl:variable>
6445
+ <xsl:variable name="p_fn" select="xalan:nodeset($p_fn_)"/>
6446
+ <xsl:variable name="gen_id" select="generate-id(.)"/>
6447
+ <xsl:variable name="lang" select="ancestor::*[contains(local-name(), '-standard')]/*[local-name()='bibdata']//*[local-name()='language'][@current = 'true']"/>
6448
+ <!-- fn sequence number in document -->
6449
+ <xsl:variable name="current_fn_number">
6450
+ <xsl:choose>
6451
+ <xsl:when test="@current_fn_number"><xsl:value-of select="@current_fn_number"/></xsl:when> <!-- for BSI -->
6452
+ <xsl:otherwise>
6453
+ <!-- <xsl:value-of select="count($p_fn//fn[@reference = $reference]/preceding-sibling::fn) + 1" /> -->
6454
+ <xsl:value-of select="count($p_fn//fn[@gen_id = $gen_id]/preceding-sibling::fn) + 1"/>
6455
+ </xsl:otherwise>
6456
+ </xsl:choose>
6457
+ </xsl:variable>
6273
6458
  <fo:footnote>
6274
6459
  <xsl:variable name="number">
6275
6460
 
6276
- <xsl:number level="any" count="*[local-name() = 'bibitem']/*[local-name() = 'note']"/>
6461
+ <xsl:value-of select="$current_fn_number"/>
6277
6462
 
6278
6463
  </xsl:variable>
6464
+
6465
+ <xsl:variable name="current_fn_number_text">
6466
+ <xsl:value-of select="$number"/>
6467
+
6468
+ </xsl:variable>
6469
+
6279
6470
  <fo:inline xsl:use-attribute-sets="bibitem-note-fn-style">
6280
- <fo:basic-link internal-destination="{generate-id()}" fox:alt-text="footnote {$number}">
6281
- <xsl:value-of select="$number"/>
6282
-
6471
+ <fo:basic-link internal-destination="{$gen_id}" fox:alt-text="footnote {$number}">
6472
+ <xsl:value-of select="$current_fn_number_text"/>
6283
6473
  </fo:basic-link>
6284
6474
  </fo:inline>
6285
6475
  <fo:footnote-body>
6286
6476
  <fo:block xsl:use-attribute-sets="bibitem-note-fn-body-style">
6287
- <fo:inline id="{generate-id()}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6288
- <xsl:value-of select="$number"/>
6289
-
6477
+ <fo:inline id="{$gen_id}" xsl:use-attribute-sets="bibitem-note-fn-number-style">
6478
+ <xsl:value-of select="$current_fn_number_text"/>
6290
6479
  </fo:inline>
6291
6480
  <xsl:apply-templates/>
6292
6481
  </fo:block>
@@ -6527,6 +6716,78 @@
6527
6716
  <!-- processing for admonition/p found in the template for 'p' -->
6528
6717
  <xsl:call-template name="paragraph"/>
6529
6718
 
6719
+ </xsl:template><xsl:template match="@*|node()" mode="update_xml_step1">
6720
+ <xsl:copy>
6721
+ <xsl:apply-templates select="@*|node()" mode="update_xml_step1"/>
6722
+ </xsl:copy>
6723
+ </xsl:template><xsl:template match="*[local-name() = 'preface']" mode="update_xml_step1">
6724
+ <xsl:copy>
6725
+ <xsl:copy-of select="@*"/>
6726
+
6727
+ <xsl:variable name="nodes_preface_">
6728
+ <xsl:for-each select="*">
6729
+ <node id="{@id}"/>
6730
+ </xsl:for-each>
6731
+ </xsl:variable>
6732
+ <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
6733
+
6734
+ <xsl:for-each select="*">
6735
+ <xsl:sort select="@displayorder" data-type="number"/>
6736
+
6737
+ <!-- process Section's title -->
6738
+ <xsl:variable name="preceding-sibling_id" select="$nodes_preface/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
6739
+ <xsl:if test="$preceding-sibling_id != ''">
6740
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
6741
+ </xsl:if>
6742
+
6743
+ <xsl:choose>
6744
+ <xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
6745
+ <xsl:otherwise>
6746
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6747
+ </xsl:otherwise>
6748
+ </xsl:choose>
6749
+
6750
+ </xsl:for-each>
6751
+ </xsl:copy>
6752
+ </xsl:template><xsl:template match="*[local-name() = 'sections']" mode="update_xml_step1">
6753
+ <xsl:copy>
6754
+ <xsl:copy-of select="@*"/>
6755
+
6756
+ <xsl:variable name="nodes_sections_">
6757
+ <xsl:for-each select="*">
6758
+ <node id="{@id}"/>
6759
+ </xsl:for-each>
6760
+ </xsl:variable>
6761
+ <xsl:variable name="nodes_sections" select="xalan:nodeset($nodes_sections_)"/>
6762
+
6763
+ <!-- move section 'Normative references' inside 'sections' -->
6764
+ <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']]">
6765
+ <xsl:sort select="@displayorder" data-type="number"/>
6766
+
6767
+ <!-- process Section's title -->
6768
+ <xsl:variable name="preceding-sibling_id" select="$nodes_sections/node[@id = current()/@id]/preceding-sibling::node[1]/@id"/>
6769
+ <xsl:if test="$preceding-sibling_id != ''">
6770
+ <xsl:apply-templates select="parent::*/*[@type = 'section-title' and @id = $preceding-sibling_id and not(@displayorder)]" mode="update_xml_step1"/>
6771
+ </xsl:if>
6772
+
6773
+ <xsl:choose>
6774
+ <xsl:when test="@type = 'section-title' and not(@displayorder)"><!-- skip, don't copy, because copied in above 'apply-templates' --></xsl:when>
6775
+ <xsl:otherwise>
6776
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6777
+ </xsl:otherwise>
6778
+ </xsl:choose>
6779
+
6780
+ </xsl:for-each>
6781
+ </xsl:copy>
6782
+ </xsl:template><xsl:template match="*[local-name() = 'bibliography']" mode="update_xml_step1">
6783
+ <xsl:copy>
6784
+ <xsl:copy-of select="@*"/>
6785
+ <!-- copy all elements from bibliography except 'Normative references' (moved to 'sections') -->
6786
+ <xsl:for-each select="*[not(@normative='true') and not(*[*[@normative='true']])]">
6787
+ <xsl:sort select="@displayorder" data-type="number"/>
6788
+ <xsl:apply-templates select="." mode="update_xml_step1"/>
6789
+ </xsl:for-each>
6790
+ </xsl:copy>
6530
6791
  </xsl:template><xsl:template name="convertDate">
6531
6792
  <xsl:param name="date"/>
6532
6793
  <xsl:param name="format" select="'short'"/>