metanorma-iho 0.9.5 → 0.9.6

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: ac6b94d80ec01694cb92156d01300f4b05f795a52f8b8ac3e941114c8e804f38
4
- data.tar.gz: 89138692b96dd9f82e6362566c959f9d00fbc5a8c1e0f7e7e1f7848d830a3429
3
+ metadata.gz: 9235ece5f7a31d06148e5dd18f7979336a37bef005ae9e420c333733339f249c
4
+ data.tar.gz: 99006e2e105a07036518c427e6f755338d20733e7bfc5b3834167141ed10c09e
5
5
  SHA512:
6
- metadata.gz: 1f6f860a2276969866f9559f573890bae77027a50c9f3e399b922e66563e50a8581f4c716659acd98a8997d4702fb2a9901eadafd26acc01921df14dd9a48754
7
- data.tar.gz: cb01939da80416546f14d86b085a7b20e7159174fa6f3b300fc1474db6b13d55b8bfde07c13b2dc3739ee37109b72abc1021045490926e42f4526a8a6da2ea9b
6
+ metadata.gz: 02d66f4e533538a1cfa4b236b6c8d7f254d5c9d18fb74cd3402f9a8d8e36b004fae4b3009093dda8849481b3d8dded3deb6708ba2427721bfc366a65f98c1a58
7
+ data.tar.gz: 55eb88213a0d2dec8407fc7773171ff49bca20357aaff5973d80eac5a4db0c2ad5c33c4c49e6ec6b5ce38a96b761d3d04b537b5c64261947a9f5962dfebf3624
@@ -854,17 +854,30 @@
854
854
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
855
855
 
856
856
  <xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
857
- <xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
857
+ <xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
858
858
  <!-- Example: <tables>
859
- <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
860
- <tbody>
861
- <tr>
862
- <td id="tab-symdu_1_1">
863
- <p_len>6</p_len>
864
- <p_len>100</p_len> for 2nd paragraph
865
- <word_len>6</word_len>
866
- <word_len>20</word_len>
867
- ...
859
+ <table page-width="509103" id="table1" width_max="223561" width_min="223560">
860
+ <column width_max="39354" width_min="39354"/>
861
+ <column width_max="75394" width_min="75394"/>
862
+ <column width_max="108813" width_min="108813"/>
863
+ <tbody>
864
+ <tr>
865
+ <td width_max="39354" width_min="39354">
866
+ <p_len>39354</p_len>
867
+ <word_len>39354</word_len>
868
+ </td>
869
+
870
+ OLD:
871
+ <tables>
872
+ <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
873
+ <tbody>
874
+ <tr>
875
+ <td id="tab-symdu_1_1">
876
+ <p_len>6</p_len>
877
+ <p_len>100</p_len> for 2nd paragraph
878
+ <word_len>6</word_len>
879
+ <word_len>20</word_len>
880
+ ...
868
881
  -->
869
882
 
870
883
  <!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
@@ -1084,6 +1097,9 @@
1084
1097
  <xsl:variable name="hair_space"> </xsl:variable>
1085
1098
  <xsl:variable name="en_dash">–</xsl:variable>
1086
1099
  <xsl:variable name="em_dash">—</xsl:variable>
1100
+ <xsl:variable name="cr">&#13;</xsl:variable>
1101
+ <xsl:variable name="lf">
1102
+ </xsl:variable>
1087
1103
 
1088
1104
  <xsl:template name="getTitle">
1089
1105
  <xsl:param name="name"/>
@@ -2751,6 +2767,20 @@
2751
2767
  </xsl:for-each>
2752
2768
  </xsl:template>
2753
2769
 
2770
+ <xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
2771
+
2772
+ <xsl:template match="*[local-name()='table']" priority="2">
2773
+ <xsl:choose>
2774
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
2775
+ <xsl:call-template name="table"/>
2776
+ </xsl:when>
2777
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
2778
+ <xsl:otherwise>
2779
+ <xsl:call-template name="table"/>
2780
+ </xsl:otherwise>
2781
+ </xsl:choose>
2782
+ </xsl:template>
2783
+
2754
2784
  <xsl:template match="*[local-name()='table']" name="table">
2755
2785
 
2756
2786
  <xsl:variable name="table-preamble">
@@ -2760,9 +2790,11 @@
2760
2790
  <xsl:variable name="table">
2761
2791
 
2762
2792
  <xsl:variable name="simple-table">
2763
- <xsl:call-template name="getSimpleTable">
2764
- <xsl:with-param name="id" select="@id"/>
2765
- </xsl:call-template>
2793
+ <xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
2794
+ <xsl:call-template name="getSimpleTable">
2795
+ <xsl:with-param name="id" select="@id"/>
2796
+ </xsl:call-template>
2797
+ </xsl:if>
2766
2798
  </xsl:variable>
2767
2799
  <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
2768
2800
 
@@ -2858,9 +2890,9 @@
2858
2890
  </xsl:attribute>
2859
2891
  </xsl:for-each>
2860
2892
 
2861
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2893
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2862
2894
  <xsl:if test="$isNoteOrFnExist = 'true'">
2863
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2895
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
2864
2896
  </xsl:if>
2865
2897
 
2866
2898
  <xsl:choose>
@@ -3013,9 +3045,28 @@
3013
3045
 
3014
3046
  </fo:block>
3015
3047
 
3048
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3049
+ <xsl:if test="$continued = 'true'">
3050
+ <fo:block text-align="right">
3051
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3052
+ </fo:block>
3053
+ </xsl:if>
3054
+ <!-- </xsl:if> -->
3055
+
3016
3056
  </xsl:if>
3017
3057
  </xsl:template> <!-- table/name -->
3018
3058
 
3059
+ <!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
3060
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
3061
+ <xsl:choose>
3062
+ <xsl:when test="preceding-sibling::*[local-name() = 'br']">
3063
+ <!-- remove CR or LF at start -->
3064
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^(&#13;&#10;|&#13;|&#10;)', '')"/>
3065
+ </xsl:when>
3066
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
3067
+ </xsl:choose>
3068
+ </xsl:template>
3069
+
3019
3070
  <!-- SOURCE: ... -->
3020
3071
  <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
3021
3072
  <xsl:call-template name="termsource"/>
@@ -3426,7 +3477,7 @@
3426
3477
  <xsl:param name="colwidths"/>
3427
3478
  <xsl:param name="colgroup"/>
3428
3479
 
3429
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3480
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3430
3481
 
3431
3482
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3432
3483
 
@@ -3498,7 +3549,7 @@
3498
3549
 
3499
3550
  <xsl:apply-templates select="../*[local-name()='p']"/>
3500
3551
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3501
- <xsl:apply-templates select="../*[local-name()='note']"/>
3552
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3502
3553
  <xsl:apply-templates select="../*[local-name()='example']"/>
3503
3554
  <xsl:apply-templates select="../*[local-name()='source']"/>
3504
3555
 
@@ -3508,7 +3559,7 @@
3508
3559
 
3509
3560
  <!-- horizontal row separator -->
3510
3561
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3511
- <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3562
+ <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3512
3563
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3513
3564
 
3514
3565
  <xsl:call-template name="setBordersTableArray"/>
@@ -4173,7 +4224,20 @@
4173
4224
  <!-- Definition List -->
4174
4225
  <!-- ===================== -->
4175
4226
 
4176
- <xsl:template match="*[local-name()='dl']">
4227
+ <!-- for table auto-layout algorithm -->
4228
+ <xsl:template match="*[local-name()='dl']" priority="2">
4229
+ <xsl:choose>
4230
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
4231
+ <xsl:call-template name="dl"/>
4232
+ </xsl:when>
4233
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
4234
+ <xsl:otherwise>
4235
+ <xsl:call-template name="dl"/>
4236
+ </xsl:otherwise>
4237
+ </xsl:choose>
4238
+ </xsl:template>
4239
+
4240
+ <xsl:template match="*[local-name()='dl']" name="dl">
4177
4241
  <xsl:variable name="isAdded" select="@added"/>
4178
4242
  <xsl:variable name="isDeleted" select="@deleted"/>
4179
4243
  <!-- <dl><xsl:copy-of select="."/></dl> -->
@@ -6180,7 +6244,13 @@
6180
6244
  <xsl:value-of select="$language_current_2"/>
6181
6245
  </xsl:when>
6182
6246
  <xsl:otherwise>
6183
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
6247
+ <xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
6248
+ <xsl:choose>
6249
+ <xsl:when test="$language_current_3 != ''">
6250
+ <xsl:value-of select="$language_current_3"/>
6251
+ </xsl:when>
6252
+ <xsl:otherwise>en</xsl:otherwise>
6253
+ </xsl:choose>
6184
6254
  </xsl:otherwise>
6185
6255
  </xsl:choose>
6186
6256
  </xsl:otherwise>
@@ -7083,7 +7153,7 @@
7083
7153
  </xsl:when>
7084
7154
  <xsl:otherwise>
7085
7155
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7086
- <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7156
+ <xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
7087
7157
 
7088
7158
  <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7089
7159
  <xsl:attribute name="width">
@@ -12105,6 +12175,4 @@
12105
12175
  </xsl:if>
12106
12176
  </xsl:template>
12107
12177
 
12108
- <!-- update -->
12109
-
12110
12178
  </xsl:stylesheet>
@@ -854,17 +854,30 @@
854
854
  <xsl:param name="add_math_as_text">true</xsl:param> <!-- add math in text behind svg formula, to copy-paste formula from PDF as text -->
855
855
 
856
856
  <xsl:param name="table_if">false</xsl:param> <!-- generate extended table in IF for autolayout-algorithm -->
857
- <xsl:param name="table_widths"/> <!-- path to xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
857
+ <xsl:param name="table_widths"/> <!-- (debug: path to) xml with table's widths, generated on 1st pass, based on FOP Intermediate Format -->
858
858
  <!-- Example: <tables>
859
- <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
860
- <tbody>
861
- <tr>
862
- <td id="tab-symdu_1_1">
863
- <p_len>6</p_len>
864
- <p_len>100</p_len> for 2nd paragraph
865
- <word_len>6</word_len>
866
- <word_len>20</word_len>
867
- ...
859
+ <table page-width="509103" id="table1" width_max="223561" width_min="223560">
860
+ <column width_max="39354" width_min="39354"/>
861
+ <column width_max="75394" width_min="75394"/>
862
+ <column width_max="108813" width_min="108813"/>
863
+ <tbody>
864
+ <tr>
865
+ <td width_max="39354" width_min="39354">
866
+ <p_len>39354</p_len>
867
+ <word_len>39354</word_len>
868
+ </td>
869
+
870
+ OLD:
871
+ <tables>
872
+ <table id="table_if_tab-symdu" page-width="75"> - table id prefixed by 'table_if_' to simple search in IF
873
+ <tbody>
874
+ <tr>
875
+ <td id="tab-symdu_1_1">
876
+ <p_len>6</p_len>
877
+ <p_len>100</p_len> for 2nd paragraph
878
+ <word_len>6</word_len>
879
+ <word_len>20</word_len>
880
+ ...
868
881
  -->
869
882
 
870
883
  <!-- for command line debug: <xsl:variable name="table_widths_from_if" select="document($table_widths)"/> -->
@@ -1084,6 +1097,9 @@
1084
1097
  <xsl:variable name="hair_space"> </xsl:variable>
1085
1098
  <xsl:variable name="en_dash">–</xsl:variable>
1086
1099
  <xsl:variable name="em_dash">—</xsl:variable>
1100
+ <xsl:variable name="cr">&#13;</xsl:variable>
1101
+ <xsl:variable name="lf">
1102
+ </xsl:variable>
1087
1103
 
1088
1104
  <xsl:template name="getTitle">
1089
1105
  <xsl:param name="name"/>
@@ -2751,6 +2767,20 @@
2751
2767
  </xsl:for-each>
2752
2768
  </xsl:template>
2753
2769
 
2770
+ <xsl:param name="table_only_with_id"/><!-- Example: table1, for table auto-layout algorithm -->
2771
+
2772
+ <xsl:template match="*[local-name()='table']" priority="2">
2773
+ <xsl:choose>
2774
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
2775
+ <xsl:call-template name="table"/>
2776
+ </xsl:when>
2777
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
2778
+ <xsl:otherwise>
2779
+ <xsl:call-template name="table"/>
2780
+ </xsl:otherwise>
2781
+ </xsl:choose>
2782
+ </xsl:template>
2783
+
2754
2784
  <xsl:template match="*[local-name()='table']" name="table">
2755
2785
 
2756
2786
  <xsl:variable name="table-preamble">
@@ -2760,9 +2790,11 @@
2760
2790
  <xsl:variable name="table">
2761
2791
 
2762
2792
  <xsl:variable name="simple-table">
2763
- <xsl:call-template name="getSimpleTable">
2764
- <xsl:with-param name="id" select="@id"/>
2765
- </xsl:call-template>
2793
+ <xsl:if test="$isGenerateTableIF = 'true' and $isApplyAutolayoutAlgorithm = 'true'">
2794
+ <xsl:call-template name="getSimpleTable">
2795
+ <xsl:with-param name="id" select="@id"/>
2796
+ </xsl:call-template>
2797
+ </xsl:if>
2766
2798
  </xsl:variable>
2767
2799
  <!-- <xsl:variable name="simple-table" select="xalan:nodeset($simple-table_)"/> -->
2768
2800
 
@@ -2858,9 +2890,9 @@
2858
2890
  </xsl:attribute>
2859
2891
  </xsl:for-each>
2860
2892
 
2861
- <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2893
+ <xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'][not(@type = 'units')] or ./*[local-name()='example'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
2862
2894
  <xsl:if test="$isNoteOrFnExist = 'true'">
2863
- <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
2895
+ <xsl:attribute name="border-bottom">0pt solid black</xsl:attribute><!-- set 0pt border, because there is a separete table below for footer -->
2864
2896
  </xsl:if>
2865
2897
 
2866
2898
  <xsl:choose>
@@ -3013,9 +3045,28 @@
3013
3045
 
3014
3046
  </fo:block>
3015
3047
 
3048
+ <!-- <xsl:if test="$namespace = 'bsi' or $namespace = 'iec' or $namespace = 'iso'"> -->
3049
+ <xsl:if test="$continued = 'true'">
3050
+ <fo:block text-align="right">
3051
+ <xsl:apply-templates select="../*[local-name() = 'note'][@type = 'units']/node()"/>
3052
+ </fo:block>
3053
+ </xsl:if>
3054
+ <!-- </xsl:if> -->
3055
+
3016
3056
  </xsl:if>
3017
3057
  </xsl:template> <!-- table/name -->
3018
3058
 
3059
+ <!-- workaround solution for https://github.com/metanorma/metanorma-iso/issues/1151#issuecomment-2033087938 -->
3060
+ <xsl:template match="*[local-name()='table']/*[local-name() = 'note'][@type = 'units']/*[local-name() = 'p']/text()" priority="4">
3061
+ <xsl:choose>
3062
+ <xsl:when test="preceding-sibling::*[local-name() = 'br']">
3063
+ <!-- remove CR or LF at start -->
3064
+ <xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),'^(&#13;&#10;|&#13;|&#10;)', '')"/>
3065
+ </xsl:when>
3066
+ <xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
3067
+ </xsl:choose>
3068
+ </xsl:template>
3069
+
3019
3070
  <!-- SOURCE: ... -->
3020
3071
  <xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
3021
3072
  <xsl:call-template name="termsource"/>
@@ -3426,7 +3477,7 @@
3426
3477
  <xsl:param name="colwidths"/>
3427
3478
  <xsl:param name="colgroup"/>
3428
3479
 
3429
- <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3480
+ <xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source'] or ../*[local-name()='p']"/>
3430
3481
 
3431
3482
  <xsl:variable name="isNoteOrFnExistShowAfterTable">
3432
3483
 
@@ -3498,7 +3549,7 @@
3498
3549
 
3499
3550
  <xsl:apply-templates select="../*[local-name()='p']"/>
3500
3551
  <xsl:apply-templates select="../*[local-name()='dl']"/>
3501
- <xsl:apply-templates select="../*[local-name()='note']"/>
3552
+ <xsl:apply-templates select="../*[local-name()='note'][not(@type = 'units')]"/>
3502
3553
  <xsl:apply-templates select="../*[local-name()='example']"/>
3503
3554
  <xsl:apply-templates select="../*[local-name()='source']"/>
3504
3555
 
@@ -3508,7 +3559,7 @@
3508
3559
 
3509
3560
  <!-- horizontal row separator -->
3510
3561
  <xsl:if test="normalize-space($isDisplayRowSeparator) = 'true'">
3511
- <xsl:if test="(../*[local-name()='note'] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3562
+ <xsl:if test="(../*[local-name()='note'][not(@type = 'units')] or ../*[local-name()='example']) and normalize-space($table_fn_block) != ''">
3512
3563
  <fo:block-container border-top="0.5pt solid black" padding-left="1mm" padding-right="1mm">
3513
3564
 
3514
3565
  <xsl:call-template name="setBordersTableArray"/>
@@ -4173,7 +4224,20 @@
4173
4224
  <!-- Definition List -->
4174
4225
  <!-- ===================== -->
4175
4226
 
4176
- <xsl:template match="*[local-name()='dl']">
4227
+ <!-- for table auto-layout algorithm -->
4228
+ <xsl:template match="*[local-name()='dl']" priority="2">
4229
+ <xsl:choose>
4230
+ <xsl:when test="$table_only_with_id != '' and @id = $table_only_with_id">
4231
+ <xsl:call-template name="dl"/>
4232
+ </xsl:when>
4233
+ <xsl:when test="$table_only_with_id != ''"><fo:block/><!-- to prevent empty fo:block-container --></xsl:when>
4234
+ <xsl:otherwise>
4235
+ <xsl:call-template name="dl"/>
4236
+ </xsl:otherwise>
4237
+ </xsl:choose>
4238
+ </xsl:template>
4239
+
4240
+ <xsl:template match="*[local-name()='dl']" name="dl">
4177
4241
  <xsl:variable name="isAdded" select="@added"/>
4178
4242
  <xsl:variable name="isDeleted" select="@deleted"/>
4179
4243
  <!-- <dl><xsl:copy-of select="."/></dl> -->
@@ -6180,7 +6244,13 @@
6180
6244
  <xsl:value-of select="$language_current_2"/>
6181
6245
  </xsl:when>
6182
6246
  <xsl:otherwise>
6183
- <xsl:value-of select="//*[local-name()='bibdata']//*[local-name()='language']"/>
6247
+ <xsl:variable name="language_current_3" select="normalize-space(//*[local-name()='bibdata']//*[local-name()='language'])"/>
6248
+ <xsl:choose>
6249
+ <xsl:when test="$language_current_3 != ''">
6250
+ <xsl:value-of select="$language_current_3"/>
6251
+ </xsl:when>
6252
+ <xsl:otherwise>en</xsl:otherwise>
6253
+ </xsl:choose>
6184
6254
  </xsl:otherwise>
6185
6255
  </xsl:choose>
6186
6256
  </xsl:otherwise>
@@ -7083,7 +7153,7 @@
7083
7153
  </xsl:when>
7084
7154
  <xsl:otherwise>
7085
7155
  <fo:external-graphic src="{$src}" fox:alt-text="Image {@alt}" xsl:use-attribute-sets="image-graphic-style">
7086
- <xsl:if test="not(@mimetype = 'image/svg+xml') and ../*[local-name() = 'name'] and not(ancestor::*[local-name() = 'table'])">
7156
+ <xsl:if test="not(@mimetype = 'image/svg+xml') and (../*[local-name() = 'name'] or parent::*[local-name() = 'figure'][@unnumbered = 'true']) and not(ancestor::*[local-name() = 'table'])">
7087
7157
 
7088
7158
  <xsl:if test="@width != '' and @width != 'auto' and @width != 'text-width' and @width != 'full-page-width' and @width != 'narrow'">
7089
7159
  <xsl:attribute name="width">
@@ -12105,6 +12175,4 @@
12105
12175
  </xsl:if>
12106
12176
  </xsl:template>
12107
12177
 
12108
- <!-- update -->
12109
-
12110
12178
  </xsl:stylesheet>
@@ -20,20 +20,6 @@ module IsoDoc
20
20
  section_break(body)
21
21
  end
22
22
 
23
- # def make_body2(body, docxml)
24
- # body.div **{ class: "WordSection2" } do |div2|
25
- # boilerplate docxml, div2
26
- # preface_block docxml, div2
27
- # abstract docxml, div2
28
- # foreword docxml, div2
29
- # introduction docxml, div2
30
- # preface docxml, div2
31
- # acknowledgements docxml, div2
32
- # div2.p { |p| p << "&nbsp;" } # placeholder
33
- # end
34
- # section_break(body)
35
- # end
36
-
37
23
  def authority_cleanup(docxml)
38
24
  super
39
25
  docxml.xpath("//div[@class = 'boilerplate-feedback']/p").each do |p|
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.9.5".freeze
3
+ VERSION = "0.9.6".freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metanorma-iho
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.5
4
+ version: 0.9.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-25 00:00:00.000000000 Z
11
+ date: 2024-04-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic