metanorma-iho 0.7.2 → 0.7.4

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: dc3ce0e821ab3854c519838c72a4ee34a1b0c90234c80e612a8420e0301eb36d
4
- data.tar.gz: df2b0c2467b822618caef15fb9354dc86b5149563dc921927543f85c0c73022b
3
+ metadata.gz: d32cbaa857fe5083ce8d434831b7f9124205fafe7401c244f8034ae90004aa81
4
+ data.tar.gz: d3b34abd94dfbbb636fbc07d86565faabaaa6a5c179ee773f32e275dfa7ce21a
5
5
  SHA512:
6
- metadata.gz: 963a17e0a8d7ad5ee3b411f6f32c06952d52d5dd3ce732fc13abcb8bb092f7d9419a80758f2cba12716fbcba5e3d285a4bc4fa58155e636328fb20f3cf89c7c2
7
- data.tar.gz: 3484aca4a58553675ac2568597a773a724f8e97b3e3d4cab8b00c6ee49e1a2f7a4e594390878708c41b226a261cc592c26153f5ba02043142f14c30c8012a5cb
6
+ metadata.gz: ac677f15e9b347f9c436d1e5d2ad0aadd6b876b67625f79b8d028be3f60e1681bb54e52f26f7b499f473eefa7bbc567a659db76f6b90e030b8c2142e7f690869
7
+ data.tar.gz: 0e1978eac7b0cf129df8d90a357f4679e0b2f927b1059847ed1a9fa3b70314d4d58119f1de845720534ea52f85ca77ff43cbcc1cf46e956715504d45c5558f92
@@ -892,14 +892,14 @@
892
892
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
893
893
 
894
894
  <!--
895
- <misc-container>
895
+ <metanorma-extension>
896
896
  <presentation-metadata>
897
897
  <papersize>letter</papersize>
898
898
  </presentation-metadata>
899
- </misc-container>
899
+ </metanorma-extension>
900
900
  -->
901
901
 
902
- <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'])))"/>
902
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
903
903
  <xsl:variable name="papersize_width_">
904
904
  <xsl:choose>
905
905
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -1016,7 +1016,7 @@
1016
1016
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
1017
1017
 
1018
1018
  <xsl:variable name="title-list-tables">
1019
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
1019
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
1020
1020
  <xsl:value-of select="$toc_table_title"/>
1021
1021
  <xsl:if test="normalize-space($toc_table_title) = ''">
1022
1022
  <xsl:call-template name="getTitle">
@@ -1026,7 +1026,7 @@
1026
1026
  </xsl:variable>
1027
1027
 
1028
1028
  <xsl:variable name="title-list-figures">
1029
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
1029
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
1030
1030
  <xsl:value-of select="$toc_figure_title"/>
1031
1031
  <xsl:if test="normalize-space($toc_figure_title) = ''">
1032
1032
  <xsl:call-template name="getTitle">
@@ -1036,7 +1036,7 @@
1036
1036
  </xsl:variable>
1037
1037
 
1038
1038
  <xsl:variable name="title-list-recommendations">
1039
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
1039
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
1040
1040
  <xsl:value-of select="$toc_requirement_title"/>
1041
1041
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
1042
1042
  <xsl:call-template name="getTitle">
@@ -1108,7 +1108,7 @@
1108
1108
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
1109
1109
 
1110
1110
  <xsl:variable name="additional_fonts_">
1111
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
1111
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
1112
1112
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
1113
1113
  </xsl:for-each>
1114
1114
  </xsl:variable>
@@ -2208,10 +2208,10 @@
2208
2208
 
2209
2209
  <xsl:template name="processTablesFigures_Contents">
2210
2210
  <xsl:param name="always"/>
2211
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2211
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2212
2212
  <xsl:call-template name="processTables_Contents"/>
2213
2213
  </xsl:if>
2214
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2214
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2215
2215
  <xsl:call-template name="processFigures_Contents"/>
2216
2216
  </xsl:if>
2217
2217
  </xsl:template>
@@ -2540,6 +2540,8 @@
2540
2540
 
2541
2541
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2542
2542
 
2543
+ <xsl:call-template name="setBordersTableArray"/>
2544
+
2543
2545
  </xsl:element>
2544
2546
  </xsl:variable>
2545
2547
 
@@ -2684,6 +2686,10 @@
2684
2686
 
2685
2687
  </xsl:template>
2686
2688
 
2689
+ <xsl:template name="setBordersTableArray">
2690
+
2691
+ </xsl:template>
2692
+
2687
2693
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2688
2694
  <xsl:param name="continued"/>
2689
2695
  <xsl:if test="normalize-space() != ''">
@@ -3158,6 +3164,8 @@
3158
3164
  <fo:table-row>
3159
3165
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3160
3166
 
3167
+ <xsl:call-template name="setBordersTableArray"/>
3168
+
3161
3169
  <!-- fn will be processed inside 'note' processing -->
3162
3170
 
3163
3171
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -3279,6 +3287,8 @@
3279
3287
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
3280
3288
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
3281
3289
 
3290
+ <xsl:call-template name="setBordersTableArray"/>
3291
+
3282
3292
  <xsl:call-template name="setTableRowAttributes"/>
3283
3293
 
3284
3294
  <xsl:apply-templates/>
@@ -3302,6 +3312,8 @@
3302
3312
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3303
3313
  </xsl:if>
3304
3314
 
3315
+ <xsl:call-template name="setBordersTableArray"/>
3316
+
3305
3317
  <xsl:call-template name="setTableRowAttributes"/>
3306
3318
  <xsl:apply-templates/>
3307
3319
  </fo:table-row>
@@ -3321,6 +3333,8 @@
3321
3333
  <xsl:with-param name="default">center</xsl:with-param>
3322
3334
  </xsl:call-template>
3323
3335
 
3336
+ <xsl:call-template name="setBordersTableArray"/>
3337
+
3324
3338
  <xsl:if test="$lang = 'ar'">
3325
3339
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3326
3340
  </xsl:if>
@@ -3373,6 +3387,8 @@
3373
3387
 
3374
3388
  <!-- bsi -->
3375
3389
 
3390
+ <xsl:call-template name="setBordersTableArray"/>
3391
+
3376
3392
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
3377
3393
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3378
3394
  </xsl:if>
@@ -7081,7 +7097,7 @@
7081
7097
  <!-- sourcecode -->
7082
7098
  <!-- =============== -->
7083
7099
 
7084
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
7100
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
7085
7101
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
7086
7102
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
7087
7103
 
@@ -9140,8 +9156,8 @@
9140
9156
 
9141
9157
  <xsl:variable name="toc_level">
9142
9158
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
9143
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
9144
- <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
9159
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
9160
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
9145
9161
  <xsl:choose>
9146
9162
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
9147
9163
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -10130,6 +10146,7 @@
10130
10146
  <xsl:choose>
10131
10147
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
10132
10148
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
10149
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
10133
10150
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
10134
10151
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
10135
10152
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
@@ -892,14 +892,14 @@
892
892
  BUT DON'T put any another conditions together with $namespace = '...' (such conditions will be ignored). For another conditions, please use nested xsl:if or xsl:choose -->
893
893
 
894
894
  <!--
895
- <misc-container>
895
+ <metanorma-extension>
896
896
  <presentation-metadata>
897
897
  <papersize>letter</papersize>
898
898
  </presentation-metadata>
899
- </misc-container>
899
+ </metanorma-extension>
900
900
  -->
901
901
 
902
- <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'])))"/>
902
+ <xsl:variable name="papersize" select="java:toLowerCase(java:java.lang.String.new(normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata']/*[local-name() = 'papersize'])))"/>
903
903
  <xsl:variable name="papersize_width_">
904
904
  <xsl:choose>
905
905
  <xsl:when test="$papersize = 'letter'">215.9</xsl:when>
@@ -1016,7 +1016,7 @@
1016
1016
  <xsl:variable name="titles" select="xalan:nodeset($titles_)"/>
1017
1017
 
1018
1018
  <xsl:variable name="title-list-tables">
1019
- <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
1019
+ <xsl:variable name="toc_table_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']"/>
1020
1020
  <xsl:value-of select="$toc_table_title"/>
1021
1021
  <xsl:if test="normalize-space($toc_table_title) = ''">
1022
1022
  <xsl:call-template name="getTitle">
@@ -1026,7 +1026,7 @@
1026
1026
  </xsl:variable>
1027
1027
 
1028
1028
  <xsl:variable name="title-list-figures">
1029
- <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
1029
+ <xsl:variable name="toc_figure_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']"/>
1030
1030
  <xsl:value-of select="$toc_figure_title"/>
1031
1031
  <xsl:if test="normalize-space($toc_figure_title) = ''">
1032
1032
  <xsl:call-template name="getTitle">
@@ -1036,7 +1036,7 @@
1036
1036
  </xsl:variable>
1037
1037
 
1038
1038
  <xsl:variable name="title-list-recommendations">
1039
- <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
1039
+ <xsl:variable name="toc_requirement_title" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='requirement']/*[local-name() = 'title']"/>
1040
1040
  <xsl:value-of select="$toc_requirement_title"/>
1041
1041
  <xsl:if test="normalize-space($toc_requirement_title) = ''">
1042
1042
  <xsl:call-template name="getTitle">
@@ -1108,7 +1108,7 @@
1108
1108
  <xsl:variable name="root-style_" select="xalan:nodeset($root-style)"/>
1109
1109
 
1110
1110
  <xsl:variable name="additional_fonts_">
1111
- <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
1111
+ <xsl:for-each select="//*[contains(local-name(), '-standard')][1]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value'] | //*[contains(local-name(), '-standard')][1]/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'fonts']/*[local-name() = 'value']">
1112
1112
  <xsl:value-of select="."/><xsl:if test="position() != last()">, </xsl:if>
1113
1113
  </xsl:for-each>
1114
1114
  </xsl:variable>
@@ -2208,10 +2208,10 @@
2208
2208
 
2209
2209
  <xsl:template name="processTablesFigures_Contents">
2210
2210
  <xsl:param name="always"/>
2211
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2211
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='table']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2212
2212
  <xsl:call-template name="processTables_Contents"/>
2213
2213
  </xsl:if>
2214
- <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2214
+ <xsl:if test="(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'toc'][@type='figure']/*[local-name() = 'title']) or normalize-space($always) = 'true'">
2215
2215
  <xsl:call-template name="processFigures_Contents"/>
2216
2216
  </xsl:if>
2217
2217
  </xsl:template>
@@ -2540,6 +2540,8 @@
2540
2540
 
2541
2541
  <xsl:attribute name="width"><xsl:value-of select="normalize-space($table_width)"/></xsl:attribute>
2542
2542
 
2543
+ <xsl:call-template name="setBordersTableArray"/>
2544
+
2543
2545
  </xsl:element>
2544
2546
  </xsl:variable>
2545
2547
 
@@ -2684,6 +2686,10 @@
2684
2686
 
2685
2687
  </xsl:template>
2686
2688
 
2689
+ <xsl:template name="setBordersTableArray">
2690
+
2691
+ </xsl:template>
2692
+
2687
2693
  <xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
2688
2694
  <xsl:param name="continued"/>
2689
2695
  <xsl:if test="normalize-space() != ''">
@@ -3158,6 +3164,8 @@
3158
3164
  <fo:table-row>
3159
3165
  <fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
3160
3166
 
3167
+ <xsl:call-template name="setBordersTableArray"/>
3168
+
3161
3169
  <!-- fn will be processed inside 'note' processing -->
3162
3170
 
3163
3171
  <!-- for BSI (not PAS) display Notes before footnotes -->
@@ -3279,6 +3287,8 @@
3279
3287
  <xsl:template match="*[local-name()='thead']/*[local-name()='tr']" priority="2">
3280
3288
  <fo:table-row xsl:use-attribute-sets="table-header-row-style">
3281
3289
 
3290
+ <xsl:call-template name="setBordersTableArray"/>
3291
+
3282
3292
  <xsl:call-template name="setTableRowAttributes"/>
3283
3293
 
3284
3294
  <xsl:apply-templates/>
@@ -3302,6 +3312,8 @@
3302
3312
  <xsl:attribute name="keep-with-next">always</xsl:attribute>
3303
3313
  </xsl:if>
3304
3314
 
3315
+ <xsl:call-template name="setBordersTableArray"/>
3316
+
3305
3317
  <xsl:call-template name="setTableRowAttributes"/>
3306
3318
  <xsl:apply-templates/>
3307
3319
  </fo:table-row>
@@ -3321,6 +3333,8 @@
3321
3333
  <xsl:with-param name="default">center</xsl:with-param>
3322
3334
  </xsl:call-template>
3323
3335
 
3336
+ <xsl:call-template name="setBordersTableArray"/>
3337
+
3324
3338
  <xsl:if test="$lang = 'ar'">
3325
3339
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3326
3340
  </xsl:if>
@@ -3373,6 +3387,8 @@
3373
3387
 
3374
3388
  <!-- bsi -->
3375
3389
 
3390
+ <xsl:call-template name="setBordersTableArray"/>
3391
+
3376
3392
  <xsl:if test=".//*[local-name() = 'table']"> <!-- if there is nested table -->
3377
3393
  <xsl:attribute name="padding-right">1mm</xsl:attribute>
3378
3394
  </xsl:if>
@@ -7081,7 +7097,7 @@
7081
7097
  <!-- sourcecode -->
7082
7098
  <!-- =============== -->
7083
7099
 
7084
- <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'misc-container']/*[local-name() = 'source-highlighter-css']"/>
7100
+ <xsl:variable name="source-highlighter-css_" select="//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'source-highlighter-css']"/>
7085
7101
  <xsl:variable name="sourcecode_css_" select="java:org.metanorma.fop.Util.parseCSS($source-highlighter-css_)"/>
7086
7102
  <xsl:variable name="sourcecode_css" select="xalan:nodeset($sourcecode_css_)"/>
7087
7103
 
@@ -9140,8 +9156,8 @@
9140
9156
 
9141
9157
  <xsl:variable name="toc_level">
9142
9158
  <!-- https://www.metanorma.org/author/ref/document-attributes/ -->
9143
- <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
9144
- <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'misc-container']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
9159
+ <xsl:variable name="htmltoclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'HTML TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- :htmltoclevels Number of table of contents levels to render in HTML/PDF output; used to override :toclevels:-->
9160
+ <xsl:variable name="toclevels" select="normalize-space(//*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name']/text() = 'TOC Heading Levels']/*[local-name() = 'value'])"/> <!-- Number of table of contents levels to render -->
9145
9161
  <xsl:choose>
9146
9162
  <xsl:when test="$htmltoclevels != ''"><xsl:value-of select="number($htmltoclevels)"/></xsl:when> <!-- if there is value in xml -->
9147
9163
  <xsl:when test="$toclevels != ''"><xsl:value-of select="number($toclevels)"/></xsl:when> <!-- if there is value in xml -->
@@ -10130,6 +10146,7 @@
10130
10146
  <xsl:choose>
10131
10147
  <xsl:when test="$lang = 'ar' and $align = 'left'">start</xsl:when>
10132
10148
  <xsl:when test="$lang = 'ar' and $align = 'right'">end</xsl:when>
10149
+ <xsl:when test="$align = 'justified'">justify</xsl:when>
10133
10150
  <xsl:when test="$align != '' and not($align = 'indent')"><xsl:value-of select="$align"/></xsl:when>
10134
10151
  <xsl:when test="ancestor::*[local-name() = 'td']/@align"><xsl:value-of select="ancestor::*[local-name() = 'td']/@align"/></xsl:when>
10135
10152
  <xsl:when test="ancestor::*[local-name() = 'th']/@align"><xsl:value-of select="ancestor::*[local-name() = 'th']/@align"/></xsl:when>
@@ -522,7 +522,6 @@
522
522
  <value>tip</value>
523
523
  <value>important</value>
524
524
  <value>caution</value>
525
- <value>statement</value>
526
525
  </choice>
527
526
  </define>
528
527
  <define name="figure">
@@ -1316,7 +1316,7 @@
1316
1316
  <value>commentaryOf</value>
1317
1317
  <value>hasCommentary</value>
1318
1318
  <value>related</value>
1319
- <value>complements</value>
1319
+ <value>hasComplement</value>
1320
1320
  <value>complementOf</value>
1321
1321
  <value>obsoletes</value>
1322
1322
  <value>obsoletedBy</value>
@@ -3,9 +3,6 @@ require "metanorma/generic/converter"
3
3
 
4
4
  module Metanorma
5
5
  module IHO
6
- # A {Converter} implementation that generates RSD output, and a document
7
- # schema encapsulation of the document for validation
8
- #
9
6
  class Converter < Metanorma::Generic::Converter
10
7
  XML_ROOT_TAG = "iho-standard".freeze
11
8
  XML_NAMESPACE = "https://www.metanorma.org/ns/iho".freeze
@@ -19,7 +16,7 @@ module Metanorma
19
16
  end
20
17
 
21
18
  def appendix_parse(attrs, xml, node)
22
- attrs["inline-header".to_sym] = node.option? "inline-header"
19
+ attrs[:"inline-header"] = node.option? "inline-header"
23
20
  set_obligation(attrs, node)
24
21
  xml.appendix **attr_code(attrs) do |xml_section|
25
22
  xml_section.title { |name| name << node.title }
@@ -37,7 +34,7 @@ module Metanorma
37
34
 
38
35
  def metadata_series(node, xml)
39
36
  series = node.attr("series") or return
40
- xml.series **{ type: "main" } do |s|
37
+ xml.series type: "main" do |s|
41
38
  s.title SERIESNAME[series.to_sym] || "N/A"
42
39
  s.abbreviation series
43
40
  end
@@ -89,6 +86,16 @@ module Metanorma
89
86
  end
90
87
  end
91
88
 
89
+ def metadata_version(node, xml)
90
+ if node.attr("edition-major")
91
+ ed = node.attr("edition-major")
92
+ e1 = node.attr("edition-minor") and ed += ".#{e1}"
93
+ (e2 = node.attr("edition-patch")) && e1 and ed += ".#{e2}"
94
+ node.set_attribute("edition", ed)
95
+ end
96
+ super
97
+ end
98
+
92
99
  def configuration
93
100
  Metanorma::IHO.configuration
94
101
  end
@@ -66,6 +66,7 @@
66
66
  <value>caution</value>
67
67
  <value>statement</value>
68
68
  <value>editorial</value>
69
+ <value>box</value>
69
70
  </choice>
70
71
  </define>
71
72
  <define name="index">
@@ -1580,7 +1581,7 @@
1580
1581
  </element>
1581
1582
  </define>
1582
1583
  <define name="misccontainer">
1583
- <element name="misc-container">
1584
+ <element name="metanorma-extension">
1584
1585
  <oneOrMore>
1585
1586
  <ref name="AnyElement"/>
1586
1587
  </oneOrMore>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module IHO
3
- VERSION = "0.7.2".freeze
3
+ VERSION = "0.7.4".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.7.2
4
+ version: 0.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-30 00:00:00.000000000 Z
11
+ date: 2023-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic