metanorma-un 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -14,7 +14,7 @@
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"/>
17
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
17
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition']" mode="contents"/>
18
18
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
19
19
 
20
20
  <xsl:apply-templates select="/un:un-standard/un:sections/*" mode="contents"/>
@@ -289,10 +289,10 @@
289
289
  </xsl:if>
290
290
 
291
291
  <!-- Preface Pages (except Abstract, that showed in Summary on cover page`) -->
292
- <xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract')]">
292
+ <xsl:if test="/un:un-standard/un:preface/*[not(local-name() = 'abstract' or local-name() != 'note' or local-name() != 'admonition')]">
293
293
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
294
294
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
295
- <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
295
+ <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements' and local-name() != 'note' and local-name() != 'admonition']"/>
296
296
  <xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
297
297
  <fo:block break-after="page"/>
298
298
  </xsl:if>
@@ -682,86 +682,8 @@
682
682
  </fo:block-container>
683
683
  </xsl:template>
684
684
 
685
- <!-- Examples:
686
- [b-ASM] b-ASM, http://www.eecs.umich.edu/gasm/ (accessed 20 March 2018).
687
- [b-Börger & Stärk] b-Börger & Stärk, Börger, E., and Stärk, R. S. (2003), Abstract State Machines: A Method for High-Level System Design and Analysis, Springer-Verlag.
688
- -->
689
- <xsl:template match="un:annex//un:bibitem">
690
- <fo:block id="{@id}" margin-top="6pt" margin-left="12mm" text-indent="-12mm">
691
- <xsl:if test="un:formattedref">
692
- <xsl:choose>
693
- <xsl:when test="un:docidentifier[@type = 'metanorma']">
694
- <xsl:attribute name="margin-left">0</xsl:attribute>
695
- <xsl:attribute name="text-indent">0</xsl:attribute>
696
- <xsl:attribute name="margin-bottom">12pt</xsl:attribute>
697
- <!-- create list -->
698
- <fo:list-block>
699
- <fo:list-item>
700
- <fo:list-item-label end-indent="label-end()">
701
- <fo:block>
702
- <xsl:apply-templates select="un:docidentifier[@type = 'metanorma']" mode="process"/>
703
- </fo:block>
704
- </fo:list-item-label>
705
- <fo:list-item-body start-indent="body-start()">
706
- <fo:block margin-left="3mm">
707
- <xsl:apply-templates select="un:formattedref"/>
708
- </fo:block>
709
- </fo:list-item-body>
710
- </fo:list-item>
711
- </fo:list-block>
712
- </xsl:when>
713
- <xsl:otherwise>
714
- <xsl:apply-templates select="un:formattedref"/>
715
- <xsl:apply-templates select="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process"/>
716
- </xsl:otherwise>
717
- </xsl:choose>
718
- </xsl:if>
719
- <xsl:if test="un:title">
720
- <xsl:for-each select="un:contributor">
721
- <xsl:value-of select="un:organization/un:name"/>
722
- <xsl:if test="position() != last()">, </xsl:if>
723
- </xsl:for-each>
724
- <xsl:text> (</xsl:text>
725
- <xsl:variable name="date">
726
- <xsl:choose>
727
- <xsl:when test="un:date[@type='issued']">
728
- <xsl:value-of select="un:date[@type='issued']/un:on"/>
729
- </xsl:when>
730
- <xsl:otherwise>
731
- <xsl:value-of select="un:date/un:on"/>
732
- </xsl:otherwise>
733
- </xsl:choose>
734
- </xsl:variable>
735
- <xsl:value-of select="$date"/>
736
- <xsl:text>) </xsl:text>
737
- <fo:inline font-style="italic"><xsl:value-of select="un:title"/></fo:inline>
738
- <xsl:if test="un:contributor[un:role/@type='publisher']/un:organization/un:name">
739
- <xsl:text> (</xsl:text><xsl:value-of select="un:contributor[un:role/@type='publisher']/un:organization/un:name"/><xsl:text>)</xsl:text>
740
- </xsl:if>
741
- <xsl:text>, </xsl:text>
742
- <xsl:value-of select="$date"/>
743
- <xsl:text>. </xsl:text>
744
- <xsl:value-of select="un:docidentifier"/>
745
- <xsl:value-of select="$linebreak"/>
746
- <xsl:value-of select="un:uri"/>
747
- </xsl:if>
748
- </fo:block>
749
- </xsl:template>
750
-
751
- <xsl:template match="un:annex//un:bibitem//un:formattedref">
752
- <xsl:apply-templates/>
753
- </xsl:template>
754
-
755
- <xsl:template match="un:docidentifier[@type = 'metanorma' or @type = 'metanorma-ordinal']" mode="process">
756
- <xsl:apply-templates/>
757
- </xsl:template>
758
- <xsl:template match="un:docidentifier[(@type != 'metanorma' and @type != 'metanorma-ordinal') or not(@type)]" mode="process">
759
- <xsl:text> [</xsl:text><xsl:apply-templates/><xsl:text>]</xsl:text>
760
- </xsl:template>
761
- <xsl:template match="un:docidentifier"/>
762
685
 
763
686
 
764
-
765
687
  <xsl:template match="un:dl" priority="2">
766
688
  <fo:block-container margin-left="0mm">
767
689
  <xsl:if test="parent::*[local-name() = 'note']">
@@ -836,14 +758,41 @@
836
758
  <xsl:text>iVBORw0KGgoAAAANSUhEUgAAAJkAAAAmCAYAAADXwDkaAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA+lpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5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7xSqrdd135+AIqVLd+k6ICjZETxZhgY8HLnv3VGvTZa/+9kz/qlzuHctP4A89UE73L1sCJO8nXeWcqW3QOHeLyryF/Q4L3BoEhzW+fOO0A12vewbTZxj6/yWeCqz4J31WY1ny3/F6UYkeY68LIzhtsxa8myZailU1K6HlxN/x9kjcPp+HcBBgAS2JZd+kqHSQAAAABJRU5ErkJggg==</xsl:text>
837
759
  </xsl:variable>
838
760
 
839
- <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:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
761
+ <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:param name="add_math_as_text">true</xsl:param><xsl:param name="table_if">false</xsl:param><xsl:param name="table_widths"/><xsl:variable name="table_widths_from_if" select="xalan:nodeset($table_widths)"/><xsl:variable name="table_widths_from_if_calculated_">
762
+ <xsl:for-each select="$table_widths_from_if//table">
763
+ <xsl:copy>
764
+ <xsl:copy-of select="@*"/>
765
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm"/>
766
+ </xsl:copy>
767
+ </xsl:for-each>
768
+ </xsl:variable><xsl:variable name="table_widths_from_if_calculated" select="xalan:nodeset($table_widths_from_if_calculated_)"/><xsl:param name="table_if_debug">false</xsl:param><xsl:variable name="isGenerateTableIF_">
840
769
  false
841
770
  </xsl:variable><xsl:variable name="isGenerateTableIF" select="normalize-space($isGenerateTableIF_)"/><xsl:variable name="lang">
842
771
  <xsl:call-template name="getLang"/>
843
- </xsl:variable><xsl:variable name="pageWidth_">
844
- 210
772
+ </xsl:variable><xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/><xsl:variable name="papersize_width_">
773
+ <xsl:choose>
774
+ <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
775
+ <xsl:when test="$papersize = 'a4'">210</xsl:when>
776
+ </xsl:choose>
777
+ </xsl:variable><xsl:variable name="papersize_width" select="normalize-space($papersize_width_)"/><xsl:variable name="papersize_height_">
778
+ <xsl:choose>
779
+ <xsl:when test="$papersize = 'letter'">279.4</xsl:when>
780
+ <xsl:when test="$papersize = 'a4'">297</xsl:when>
781
+ </xsl:choose>
782
+ </xsl:variable><xsl:variable name="papersize_height" select="normalize-space($papersize_height_)"/><xsl:variable name="pageWidth_">
783
+ <xsl:choose>
784
+ <xsl:when test="$papersize_width != ''"><xsl:value-of select="$papersize_width"/></xsl:when>
785
+ <xsl:otherwise>
786
+ 210
787
+ </xsl:otherwise>
788
+ </xsl:choose>
845
789
  </xsl:variable><xsl:variable name="pageWidth" select="normalize-space($pageWidth_)"/><xsl:variable name="pageHeight_">
846
- 297
790
+ <xsl:choose>
791
+ <xsl:when test="$papersize_height != ''"><xsl:value-of select="$papersize_height"/></xsl:when>
792
+ <xsl:otherwise>
793
+ 297
794
+ </xsl:otherwise>
795
+ </xsl:choose>
847
796
  </xsl:variable><xsl:variable name="pageHeight" select="normalize-space($pageHeight_)"/><xsl:variable name="marginLeftRight1_">
848
797
  40
849
798
  </xsl:variable><xsl:variable name="marginLeftRight1" select="normalize-space($marginLeftRight1_)"/><xsl:variable name="marginLeftRight2_">
@@ -1426,6 +1375,25 @@
1426
1375
 
1427
1376
 
1428
1377
 
1378
+ </xsl:attribute-set><xsl:attribute-set name="dl-name-style">
1379
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1380
+ <xsl:attribute name="margin-bottom">6pt</xsl:attribute>
1381
+
1382
+
1383
+
1384
+
1385
+
1386
+
1387
+
1388
+
1389
+
1390
+
1391
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1392
+
1393
+
1394
+
1395
+
1396
+
1429
1397
  </xsl:attribute-set><xsl:attribute-set name="dd-cell-style">
1430
1398
  <xsl:attribute name="padding-left">2mm</xsl:attribute>
1431
1399
  </xsl:attribute-set><xsl:attribute-set name="appendix-style">
@@ -1722,6 +1690,24 @@
1722
1690
  <xsl:attribute name="margin-left">-8mm</xsl:attribute>
1723
1691
 
1724
1692
 
1693
+ </xsl:attribute-set><xsl:attribute-set name="list-name-style">
1694
+ <xsl:attribute name="keep-with-next">always</xsl:attribute>
1695
+
1696
+
1697
+
1698
+
1699
+
1700
+
1701
+
1702
+
1703
+
1704
+
1705
+ <xsl:attribute name="font-weight">normal</xsl:attribute>
1706
+
1707
+
1708
+
1709
+
1710
+
1725
1711
  </xsl:attribute-set><xsl:attribute-set name="list-item-style">
1726
1712
 
1727
1713
 
@@ -2122,13 +2108,13 @@
2122
2108
 
2123
2109
  </xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:variable name="ace_tag">ace-tag_</xsl:variable><xsl:template name="processPrefaceSectionsDefault_Contents">
2124
2110
  <xsl:variable name="nodes_preface_">
2125
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2111
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2126
2112
  <node id="{@id}"/>
2127
2113
  </xsl:for-each>
2128
2114
  </xsl:variable>
2129
2115
  <xsl:variable name="nodes_preface" select="xalan:nodeset($nodes_preface_)"/>
2130
2116
 
2131
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2117
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2132
2118
  <xsl:sort select="@displayorder" data-type="number"/>
2133
2119
 
2134
2120
  <!-- process Section's title -->
@@ -2194,7 +2180,7 @@
2194
2180
  </xsl:for-each>
2195
2181
  </figures>
2196
2182
  </xsl:template><xsl:template name="processPrefaceSectionsDefault">
2197
- <xsl:for-each select="/*/*[local-name()='preface']/*">
2183
+ <xsl:for-each select="/*/*[local-name()='preface']/*[not(local-name() = 'note' or local-name() = 'admonition')]">
2198
2184
  <xsl:sort select="@displayorder" data-type="number"/>
2199
2185
  <xsl:apply-templates select="."/>
2200
2186
  </xsl:for-each>
@@ -2807,8 +2793,9 @@
2807
2793
  <xsl:value-of select="translate($math_text, ' ', '#')"/><!-- mathml images as one 'word' without spaces -->
2808
2794
  </xsl:if>
2809
2795
  </xsl:template><xsl:template name="calculate-column-widths-autolayout-algorithm">
2810
- <xsl:param name="table"/>
2811
- <xsl:param name="if">false</xsl:param> <!-- via intermediate format -->
2796
+ <xsl:param name="parent_table_page-width"/> <!-- for nested tables, in re-calculate step -->
2797
+
2798
+ <!-- via intermediate format -->
2812
2799
 
2813
2800
  <!-- The algorithm uses two passes through the table data and scales linearly with the size of the table -->
2814
2801
 
@@ -2819,9 +2806,8 @@
2819
2806
  <!-- get current table id -->
2820
2807
  <xsl:variable name="table_id" select="@id"/>
2821
2808
  <!-- find table by id in the file 'table_widths' -->
2822
- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2823
- <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/>
2824
-
2809
+ <!-- <xsl:variable name="table-if_" select="$table_widths_from_if//table[@id = $table_id]"/>
2810
+ <xsl:variable name="table-if" select="xalan:nodeset($table-if_)"/> -->
2825
2811
 
2826
2812
  <!-- table='<xsl:copy-of select="$table"/>' -->
2827
2813
  <!-- table_id='<xsl:value-of select="$table_id"/>\ -->
@@ -2829,24 +2815,13 @@
2829
2815
  <!-- table_widths_from_if='<xsl:copy-of select="$table_widths_from_if"/>' -->
2830
2816
 
2831
2817
  <xsl:variable name="table_with_cell_widths_">
2832
- <xsl:choose>
2833
- <xsl:when test="$if = 'true' and normalize-space($table-if) != ''"> <!-- if we read column's width from IF and there is table in IF -->
2834
-
2835
- <!-- Example: <column>10</column>
2836
- <column>11</column>
2837
- -->
2838
- <xsl:apply-templates select="$table-if" mode="determine_cell_widths-if"/>
2839
- </xsl:when>
2840
- <xsl:otherwise>
2841
- <xsl:apply-templates select="xalan:nodeset($table)" mode="determine_cell_widths"/>
2842
- </xsl:otherwise>
2843
- </xsl:choose>
2818
+ <xsl:apply-templates select="." mode="determine_cell_widths-if"/> <!-- read column's width from IF -->
2844
2819
  </xsl:variable>
2845
2820
  <xsl:variable name="table_with_cell_widths" select="xalan:nodeset($table_with_cell_widths_)"/>
2846
2821
 
2847
- <xsl:if test="$table_if_debug = 'true'">
2822
+ <!-- <xsl:if test="$table_if_debug = 'true'">
2848
2823
  <xsl:copy-of select="$table_with_cell_widths"/>
2849
- </xsl:if>
2824
+ </xsl:if> -->
2850
2825
 
2851
2826
 
2852
2827
  <!-- The minimum and maximum cell widths are then used to determine the corresponding minimum and maximum widths for the columns. -->
@@ -2892,8 +2867,12 @@
2892
2867
 
2893
2868
  <xsl:variable name="page_width">
2894
2869
  <xsl:choose>
2895
- <xsl:when test="$if = 'true'"><xsl:value-of select="$table-if/@page-width"/></xsl:when>
2896
- <xsl:otherwise>75</xsl:otherwise>
2870
+ <xsl:when test="$parent_table_page-width != ''">
2871
+ <xsl:value-of select="$parent_table_page-width"/>
2872
+ </xsl:when>
2873
+ <xsl:otherwise>
2874
+ <xsl:value-of select="@page-width"/>
2875
+ </xsl:otherwise>
2897
2876
  </xsl:choose>
2898
2877
  </xsl:variable>
2899
2878
 
@@ -2901,9 +2880,6 @@
2901
2880
  <table_width>
2902
2881
  <xsl:copy-of select="$table_widths"/>
2903
2882
  </table_width>
2904
- <!-- <debug>$table_widths/@width_min=<xsl:value-of select="$table_widths/table/@width_min"/></debug>
2905
- <debug>$table_widths/@width_max=<xsl:value-of select="$table_widths/table/@width_max"/></debug>
2906
- -->
2907
2883
  <debug>$page_width=<xsl:value-of select="$page_width"/></debug>
2908
2884
  </xsl:if>
2909
2885
 
@@ -2914,11 +2890,11 @@
2914
2890
  <xsl:when test="$table_widths/table/@width_min &gt;= $page_width and 1 = 2"> <!-- this condition isn't working see case 3 below -->
2915
2891
  <!-- call old algorithm -->
2916
2892
  <case1/>
2917
- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
2893
+ <!-- <xsl:variable name="cols-count" select="count(xalan:nodeset($table)/*/tr[1]/td)"/>
2918
2894
  <xsl:call-template name="calculate-column-widths-proportional">
2919
2895
  <xsl:with-param name="cols-count" select="$cols-count"/>
2920
2896
  <xsl:with-param name="table" select="$table"/>
2921
- </xsl:call-template>
2897
+ </xsl:call-template> -->
2922
2898
  </xsl:when>
2923
2899
  <!-- 2. The maximum table width fits within the available space. In this case, set the columns to their maximum widths. -->
2924
2900
  <xsl:when test="$table_widths/table/@width_max &lt;= $page_width">
@@ -2962,95 +2938,49 @@
2962
2938
  <xsl:otherwise><unknown_case/></xsl:otherwise>
2963
2939
  </xsl:choose>
2964
2940
 
2941
+ </xsl:template><xsl:template name="get-calculated-column-widths-autolayout-algorithm">
2965
2942
 
2966
- </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths">
2967
- <xsl:copy>
2968
- <xsl:apply-templates select="@*|node()" mode="determine_cell_widths"/>
2969
- </xsl:copy>
2970
- </xsl:template><xsl:template match="td | th" mode="determine_cell_widths">
2971
- <xsl:copy>
2972
- <xsl:copy-of select="@*"/>
2943
+ <!-- if nested 'dl' or 'table' -->
2944
+ <xsl:variable name="parent_table_id" select="normalize-space(ancestor::*[local-name() = 'table' or local-name() = 'dl'][1]/@id)"/>
2945
+ <parent_table_id><xsl:value-of select="$parent_table_id"/></parent_table_id>
2973
2946
 
2974
- <!-- The maximum width is given by the widest line. -->
2975
- <xsl:variable name="widths_max">
2976
- <xsl:for-each select=".//*[local-name() = 'p']">
2977
- <xsl:call-template name="add_width"/>
2978
- </xsl:for-each>
2979
- <xsl:if test="not(*[local-name() = 'p'])">
2980
- <xsl:call-template name="add_width"/>
2981
- </xsl:if>
2982
- </xsl:variable>
2983
- <xsl:variable name="width_max">
2984
- <xsl:for-each select="xalan:nodeset($widths_max)//width">
2985
- <xsl:sort select="." data-type="number" order="descending"/>
2986
- <xsl:if test="position() = 1"><xsl:value-of select="."/></xsl:if>
2987
- </xsl:for-each>
2988
- </xsl:variable>
2989
- <xsl:attribute name="width_max">
2990
- <xsl:value-of select="$width_max"/>
2991
- </xsl:attribute>
2947
+ <parent_element><xsl:value-of select="local-name(..)"/></parent_element>
2992
2948
 
2993
- <!-- The minimum width is given by the widest text element (word, image, etc.) -->
2994
- <!-- To do: image width -->
2995
- <xsl:variable name="td_text">
2996
- <xsl:apply-templates select="." mode="td_text"/>
2997
- </xsl:variable>
2998
- <xsl:variable name="words">
2999
- <xsl:variable name="string_with_added_zerospaces">
3000
- <xsl:call-template name="add-zero-spaces-java">
3001
- <xsl:with-param name="text" select="$td_text"/>
3002
- </xsl:call-template>
2949
+ <xsl:variable name="parent_table_page-width_">
2950
+ <xsl:if test="$parent_table_id != ''">
2951
+ <!-- determine column number in the parent table -->
2952
+ <xsl:variable name="parent_table_column_number">
2953
+ <xsl:choose>
2954
+ <xsl:when test="parent::*[local-name() = 'dd']">2</xsl:when>
2955
+ <xsl:otherwise> <!-- parent is table -->
2956
+ <xsl:value-of select="count(ancestor::*[local-name() = 'td'][1]/preceding-sibling::*[local-name() = 'td']) + 1"/>
2957
+ </xsl:otherwise>
2958
+ </xsl:choose>
3003
2959
  </xsl:variable>
3004
- <xsl:call-template name="tokenize">
3005
- <xsl:with-param name="text" select="normalize-space(translate($string_with_added_zerospaces, '​­', ' '))"/> <!-- replace zero-width-space and soft-hyphen to space -->
3006
- </xsl:call-template>
3007
- </xsl:variable>
3008
-
3009
- <xsl:variable name="max_word_length">
3010
- <xsl:call-template name="max_length">
3011
- <xsl:with-param name="words" select="xalan:nodeset($words)"/>
3012
- </xsl:call-template>
3013
- </xsl:variable>
3014
- <xsl:variable name="width_min">
3015
- <xsl:value-of select="$max_word_length"/>
3016
- </xsl:variable>
3017
- <xsl:attribute name="width_min">
3018
- <xsl:value-of select="$width_min"/>
3019
- </xsl:attribute>
3020
- <!-- width_max="1" width_min="1.5"> --> <!-- see 'tokenize' template, multiply 1.5 for all latin capitals -->
3021
- <xsl:if test="$width_min &gt; $width_max">
3022
- <xsl:attribute name="width_max">
3023
- <xsl:value-of select="$width_min"/>
3024
- </xsl:attribute>
3025
- </xsl:if>
3026
- <xsl:if test="$width_min = 0">
3027
- <xsl:attribute name="width_min">1</xsl:attribute>
2960
+ <!-- find table by id in the file 'table_widths' and get all Nth `<column>...</column> -->
2961
+ <xsl:value-of select="$table_widths_from_if_calculated//table[@id = $parent_table_id]/column[number($parent_table_column_number)]"/>
3028
2962
  </xsl:if>
3029
-
3030
- <xsl:apply-templates select="node()" mode="determine_cell_widths"/>
3031
-
3032
- </xsl:copy>
3033
- </xsl:template><xsl:template name="add_width">
3034
- <xsl:variable name="p_text"><xsl:apply-templates select="." mode="td_text"/></xsl:variable>
3035
- <xsl:variable name="p_text_len_" select="string-length(normalize-space($p_text))"/>
3036
-
3037
- <xsl:variable name="p_text_len">
3038
- <xsl:choose>
3039
- <xsl:when test="normalize-space(translate($p_text, concat($upper,'0123456789'), '')) = ''"> <!-- english word in CAPITAL letters -->
3040
- <xsl:value-of select="$p_text_len_ * 1.5"/>
3041
- </xsl:when>
3042
- <xsl:otherwise><xsl:value-of select="$p_text_len_"/></xsl:otherwise>
3043
- </xsl:choose>
3044
2963
  </xsl:variable>
2964
+ <xsl:variable name="parent_table_page-width" select="normalize-space($parent_table_page-width_)"/>
3045
2965
 
3046
- <xsl:variable name="math_addon_text">
3047
- <xsl:for-each select=".//*[local-name() = 'math']">
3048
- <xsl:apply-templates mode="td_text"/>
3049
- </xsl:for-each>
3050
- </xsl:variable>
3051
- <xsl:variable name="math_addon_length" select="string-length(normalize-space($math_addon_text)) * 0.2"/> <!-- plus 20% -->
2966
+ <!-- get current table id -->
2967
+ <xsl:variable name="table_id" select="@id"/>
2968
+
2969
+ <xsl:choose>
2970
+ <xsl:when test="$parent_table_id = '' or $parent_table_page-width = ''">
2971
+ <!-- find table by id in the file 'table_widths' and get all `<column>...</column> -->
2972
+ <xsl:copy-of select="$table_widths_from_if_calculated//table[@id = $table_id]/node()"/>
2973
+ </xsl:when>
2974
+ <xsl:otherwise>
2975
+ <!-- recalculate columns width based on parent table width -->
2976
+ <xsl:for-each select="$table_widths_from_if//table[@id = $table_id]">
2977
+ <xsl:call-template name="calculate-column-widths-autolayout-algorithm">
2978
+ <xsl:with-param name="parent_table_page-width" select="$parent_table_page-width"/> <!-- padding-left = 2mm = 50000-->
2979
+ </xsl:call-template>
2980
+ </xsl:for-each>
2981
+ </xsl:otherwise>
2982
+ </xsl:choose>
3052
2983
 
3053
- <width><xsl:value-of select="$p_text_len + $math_addon_length"/></width>
3054
2984
  </xsl:template><xsl:template match="@*|node()" mode="determine_cell_widths-if">
3055
2985
  <xsl:copy>
3056
2986
  <xsl:apply-templates select="@*|node()" mode="determine_cell_widths-if"/>
@@ -3836,11 +3766,19 @@
3836
3766
 
3837
3767
 
3838
3768
 
3769
+
3770
+ <xsl:if test="ancestor::*[local-name() = 'dd' or local-name() = 'td']">
3771
+ <xsl:attribute name="margin-top">0</xsl:attribute>
3772
+ </xsl:if>
3773
+
3839
3774
  <fo:block>
3840
3775
 
3841
3776
 
3842
3777
 
3843
3778
 
3779
+ <xsl:apply-templates select="*[local-name() = 'name']">
3780
+ <xsl:with-param name="process">true</xsl:with-param>
3781
+ </xsl:apply-templates>
3844
3782
 
3845
3783
  <xsl:if test="$isGenerateTableIF = 'true'">
3846
3784
  <!-- to determine start of table -->
@@ -3863,6 +3801,7 @@
3863
3801
  </xsl:choose>
3864
3802
 
3865
3803
 
3804
+
3866
3805
  <xsl:choose>
3867
3806
  <xsl:when test="$isGenerateTableIF = 'true'">
3868
3807
  <!-- generate IF for table widths -->
@@ -3991,6 +3930,18 @@
3991
3930
  </xsl:if> <!-- END: a few components -->
3992
3931
  </fo:block-container>
3993
3932
  </fo:block-container>
3933
+
3934
+ <xsl:if test="$isGenerateTableIF = 'true'"> <!-- process nested 'dl' -->
3935
+ <xsl:apply-templates select="*[local-name() = 'dd']/*[local-name() = 'dl']"/>
3936
+ </xsl:if>
3937
+
3938
+ </xsl:template><xsl:template match="*[local-name() = 'dl']/*[local-name() = 'name']">
3939
+ <xsl:param name="process">false</xsl:param>
3940
+ <xsl:if test="$process = 'true'">
3941
+ <fo:block xsl:use-attribute-sets="dl-name-style">
3942
+ <xsl:apply-templates/>
3943
+ </fo:block>
3944
+ </xsl:if>
3994
3945
  </xsl:template><xsl:template name="setColumnWidth_dl">
3995
3946
  <xsl:param name="colwidths"/>
3996
3947
  <xsl:param name="maxlength_dt"/>
@@ -3999,6 +3950,11 @@
3999
3950
  <!-- <colwidths><xsl:copy-of select="$colwidths"/></colwidths> -->
4000
3951
 
4001
3952
  <xsl:choose>
3953
+ <xsl:when test="xalan:nodeset($colwidths)/autolayout">
3954
+ <xsl:call-template name="insertTableColumnWidth">
3955
+ <xsl:with-param name="colwidths" select="$colwidths"/>
3956
+ </xsl:call-template>
3957
+ </xsl:when>
4002
3958
  <xsl:when test="ancestor::*[local-name()='dl']"><!-- second level, i.e. inlined table -->
4003
3959
  <fo:table-column column-width="50%"/>
4004
3960
  <fo:table-column column-width="50%"/>
@@ -4251,12 +4207,24 @@
4251
4207
  </td>
4252
4208
  <td>
4253
4209
 
4254
- <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()"/>
4210
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/node()[not(local-name() = 'dl')]"/>
4211
+
4212
+ <!-- get paragraphs from nested 'dl' -->
4213
+ <xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'dl']" mode="dl_if_nested"/>
4214
+
4255
4215
 
4256
4216
  </td>
4257
4217
  </tr>
4258
4218
 
4259
- </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='em']">
4219
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if"/><xsl:template match="*[local-name()='dl']" mode="dl_if_nested">
4220
+ <xsl:for-each select="*[local-name() = 'dt']">
4221
+ <p>
4222
+ <xsl:copy-of select="node()"/>
4223
+ <xsl:text> </xsl:text>
4224
+ <xsl:copy-of select="following-sibling::*[local-name()='dd'][1]/*[local-name() = 'p']/node()"/>
4225
+ </p>
4226
+ </xsl:for-each>
4227
+ </xsl:template><xsl:template match="*[local-name()='dd']" mode="dl_if_nested"/><xsl:template match="*[local-name()='em']">
4260
4228
  <fo:inline font-style="italic">
4261
4229
  <xsl:apply-templates/>
4262
4230
  </fo:inline>
@@ -4287,7 +4255,7 @@
4287
4255
 
4288
4256
 
4289
4257
 
4290
-
4258
+ <!-- 10 -->
4291
4259
 
4292
4260
 
4293
4261
 
@@ -6325,7 +6293,7 @@
6325
6293
 
6326
6294
 
6327
6295
 
6328
-
6296
+ <!-- 9 -->
6329
6297
 
6330
6298
 
6331
6299
 
@@ -6409,7 +6377,7 @@
6409
6377
  <xsl:for-each select="xalan:nodeset($text_step4)/node()">
6410
6378
  <xsl:choose>
6411
6379
  <xsl:when test="local-name() = 'interspers'"> <!-- word with length more than 30 will be interspersed with zero-width space -->
6412
- <xsl:call-template name="interspers">
6380
+ <xsl:call-template name="interspers-java">
6413
6381
  <xsl:with-param name="str" select="."/>
6414
6382
  </xsl:call-template>
6415
6383
  </xsl:when>
@@ -6459,6 +6427,10 @@
6459
6427
  <xsl:with-param name="char" select="$char"/>
6460
6428
  </xsl:call-template>
6461
6429
  </xsl:if>
6430
+ </xsl:template><xsl:template name="interspers-java">
6431
+ <xsl:param name="str"/>
6432
+ <xsl:param name="char" select="$zero_width_space"/>
6433
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new($str),'([^ -.:=_—])',concat('$1', $char))"/> <!-- insert $char after each char excep space, - . : = _ etc. -->
6462
6434
  </xsl:template><xsl:template match="*" mode="syntax_highlight">
6463
6435
  <xsl:apply-templates mode="syntax_highlight"/>
6464
6436
  </xsl:template><xsl:variable name="syntax_highlight_styles_">
@@ -7418,6 +7390,11 @@
7418
7390
  </xsl:otherwise>
7419
7391
  </xsl:choose>
7420
7392
  </xsl:template><xsl:template match="*[local-name()='ul'] | *[local-name()='ol']" mode="list" name="list">
7393
+
7394
+ <xsl:apply-templates select="*[local-name() = 'name']">
7395
+ <xsl:with-param name="process">true</xsl:with-param>
7396
+ </xsl:apply-templates>
7397
+
7421
7398
  <fo:list-block xsl:use-attribute-sets="list-style">
7422
7399
 
7423
7400
 
@@ -7428,12 +7405,23 @@
7428
7405
 
7429
7406
 
7430
7407
 
7408
+ <xsl:if test="*[local-name() = 'name']">
7409
+ <xsl:attribute name="margin-top">0pt</xsl:attribute>
7410
+ </xsl:if>
7411
+
7431
7412
  <xsl:apply-templates select="node()[not(local-name() = 'note')]"/>
7432
7413
  </fo:list-block>
7433
7414
  <!-- <xsl:for-each select="./iho:note">
7434
7415
  <xsl:call-template name="note"/>
7435
7416
  </xsl:for-each> -->
7436
7417
  <xsl:apply-templates select="./*[local-name() = 'note']"/>
7418
+ </xsl:template><xsl:template match="*[local-name() = 'ol' or local-name() = 'ul']/*[local-name() = 'name']">
7419
+ <xsl:param name="process">false</xsl:param>
7420
+ <xsl:if test="$process = 'true'">
7421
+ <fo:block xsl:use-attribute-sets="list-name-style">
7422
+ <xsl:apply-templates/>
7423
+ </fo:block>
7424
+ </xsl:if>
7437
7425
  </xsl:template><xsl:template match="*[local-name()='li']">
7438
7426
  <fo:list-item xsl:use-attribute-sets="list-item-style">
7439
7427
  <xsl:copy-of select="@id"/>
@@ -7711,22 +7699,11 @@
7711
7699
  </xsl:template><xsl:template name="processBibitem">
7712
7700
 
7713
7701
 
7702
+ <!-- start UNECE bibitem processing -->
7714
7703
  <fo:inline padding-right="5mm">[<xsl:value-of select="un:docidentifier"/>]</fo:inline><xsl:value-of select="un:docidentifier"/>
7715
- <xsl:if test="un:title">
7716
- <fo:inline font-style="italic">
7717
- <xsl:text>, </xsl:text>
7718
- <xsl:choose>
7719
- <xsl:when test="un:title[@type = 'main' and @language = 'en']">
7720
- <xsl:apply-templates select="un:title[@type = 'main' and @language = 'en']"/>
7721
- </xsl:when>
7722
- <xsl:otherwise>
7723
- <xsl:apply-templates select="un:title"/>
7724
- </xsl:otherwise>
7725
- </xsl:choose>
7726
- </fo:inline>
7727
- </xsl:if>
7704
+ <xsl:text> </xsl:text>
7728
7705
  <xsl:apply-templates select="un:formattedref"/>
7729
-
7706
+ <!-- END UNECE bibitem processing -->
7730
7707
 
7731
7708
  </xsl:template><xsl:template name="processBibitemDocId">
7732
7709
  <xsl:variable name="_doc_ident" select="*[local-name() = 'docidentifier'][not(@type = 'DOI' or @type = 'metanorma' or @type = 'metanorma-ordinal' or @type = 'ISSN' or @type = 'ISBN' or @type = 'rfc-anchor')]"/>
@@ -8051,25 +8028,32 @@
8051
8028
  </fo:block-container>
8052
8029
 
8053
8030
  </xsl:template><xsl:template name="displayAdmonitionName">
8054
-
8031
+ <xsl:param name="sep"/> <!-- Example: ' - ' -->
8032
+ <!-- <xsl:choose>
8033
+ <xsl:when test="$namespace = 'nist-cswp' or $namespace = 'nist-sp'">
8034
+ <xsl:choose>
8035
+ <xsl:when test="@type='important'"><xsl:apply-templates select="@type"/></xsl:when>
8036
+ <xsl:otherwise>
8037
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8038
+ </xsl:otherwise>
8039
+ </xsl:choose>
8040
+ </xsl:when>
8041
+ <xsl:otherwise>
8055
8042
  <xsl:apply-templates select="*[local-name() = 'name']"/>
8056
8043
  <xsl:if test="not(*[local-name() = 'name'])">
8057
8044
  <xsl:apply-templates select="@type"/>
8058
8045
  </xsl:if>
8059
-
8060
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8061
- <xsl:apply-templates/>
8062
- </xsl:template><xsl:template match="*[local-name() = 'admonition']/@type">
8063
- <xsl:variable name="admonition_type_">
8064
- <xsl:call-template name="getLocalizedString">
8065
- <xsl:with-param name="key">admonition.<xsl:value-of select="."/></xsl:with-param>
8066
- </xsl:call-template>
8046
+ </xsl:otherwise>
8047
+ </xsl:choose> -->
8048
+ <xsl:variable name="name">
8049
+ <xsl:apply-templates select="*[local-name() = 'name']"/>
8067
8050
  </xsl:variable>
8068
- <xsl:variable name="admonition_type" select="normalize-space(java:toUpperCase(java:java.lang.String.new($admonition_type_)))"/>
8069
- <xsl:value-of select="$admonition_type"/>
8070
- <xsl:if test="$admonition_type = ''">
8071
- <xsl:value-of select="java:toUpperCase(java:java.lang.String.new(.))"/>
8051
+ <xsl:copy-of select="$name"/>
8052
+ <xsl:if test="normalize-space($name) != ''">
8053
+ <xsl:value-of select="$sep"/>
8072
8054
  </xsl:if>
8055
+ </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'name']">
8056
+ <xsl:apply-templates/>
8073
8057
  </xsl:template><xsl:template match="*[local-name() = 'admonition']/*[local-name() = 'p']">
8074
8058
 
8075
8059
  <fo:block xsl:use-attribute-sets="admonition-p-style">