metanorma-iho 1.4.7 → 1.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a0c8836fe444ec765c6b42245525c7c2c80c90446fd1baa6f15f3f1e091727e
4
- data.tar.gz: 628ae6e520fbb9a24ee27f7bf8afa26fcbf3787e1bcabcfa749913490c013785
3
+ metadata.gz: 37838753ccb42360d67701723963b3e5d5957a73c1a71abf0c1149c3bad8861d
4
+ data.tar.gz: 0cfdf014198b9904fcc7d6b51c2a1e6cf3d94256b162e38c6a458cf0489e45ce
5
5
  SHA512:
6
- metadata.gz: b20740508b1bfe4d3490cc002ea8e37a9f4f8bd19bdef518e2bc14173e5f095e3027ea6d74699171a6f5e753a6902993f25d0208a08481dce1d7c9e9b88e7016
7
- data.tar.gz: 12feb28601377b2e7446d2b3015d8020a3ebfe5b514cfa89ca9ca6fbc809c12446b679dff96ccb6da6aea663893bcf90f78a8ac3eb94d866be850b885a0c3655
6
+ metadata.gz: f9cb469ec176a7908eb76e9a6bfdb010e3f17544ceec55a7d5d713e7fe055970f8248ac94a6ae766831346a56930adadea32b2962d1e7c4d0372ffab0cf8c723
7
+ data.tar.gz: 6ac616303ba3b2519394a7fdb0f1ff3e3110bc70ae45d0f937be5c01d866d1e0087ba00b420a0b74e235a7d8b74453138880401c009f146276072f17aa9eeb4f
@@ -247,7 +247,7 @@
247
247
 
248
248
  <xsl:for-each select="xalan:nodeset($current_document)">
249
249
 
250
- <xsl:call-template name="cover-page"/>
250
+ <xsl:call-template name="cover-pages"/>
251
251
 
252
252
  <xsl:call-template name="inner-cover-page"/>
253
253
 
@@ -1295,8 +1295,12 @@
1295
1295
  <xsl:variable name="root_element">metanorma</xsl:variable>
1296
1296
 
1297
1297
  <!---examples: 2013, 2024 -->
1298
+ <!-- TO DO: delete -->
1298
1299
  <xsl:variable name="document_scheme" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:document-scheme)"/>
1299
1300
 
1301
+ <!-- string, not node. Will be evaluated via xalan:evaluate -->
1302
+ <xsl:variable name="bibdataContextNode">/mn:metanorma/mn:bibdata</xsl:variable>
1303
+
1300
1304
  <!-- external parameters -->
1301
1305
  <xsl:param name="svg_images"/> <!-- svg images array -->
1302
1306
  <xsl:variable name="images" select="document($svg_images)"/>
@@ -2491,6 +2495,7 @@
2491
2495
  <xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
2492
2496
  <xsl:if test="$add_continue = 'true'"> role="NonStruct"</xsl:if><!-- the condition 'xsl:if' to prevent the attribute role for math -->
2493
2497
  <xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
2498
+ <xsl:if test="starts-with(., 'mn:')"> xmlns:mn="<xsl:value-of select="$namespace_full"/>"</xsl:if>
2494
2499
  <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
2495
2500
  <xsl:if test="$debug = 'true'">
2496
2501
  <xsl:message>&lt;<xsl:value-of select="."/>&gt;</xsl:message>
@@ -2981,6 +2986,102 @@
2981
2986
  </xsl:element>
2982
2987
  </xsl:template>
2983
2988
 
2989
+ <xsl:template name="cover-pages">
2990
+ <xsl:param name="num"/>
2991
+ <xsl:call-template name="cover-page">
2992
+ <xsl:with-param name="num" select="$num"/>
2993
+ </xsl:call-template>
2994
+ </xsl:template>
2995
+
2996
+ <!-- insert cover page image -->
2997
+ <!-- background cover image -->
2998
+ <xsl:template name="insertBackgroundPageImage">
2999
+ <xsl:param name="number">1</xsl:param>
3000
+ <xsl:param name="name">coverpage-image</xsl:param>
3001
+ <xsl:param name="suffix"/>
3002
+ <xsl:variable name="num" select="number($number)"/>
3003
+ <!-- background image -->
3004
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
3005
+ <fo:block>
3006
+ <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image[$num]">
3007
+
3008
+ <xsl:call-template name="insertPageImage"/>
3009
+
3010
+ </xsl:for-each>
3011
+ </fo:block>
3012
+ </fo:block-container>
3013
+ </xsl:template>
3014
+
3015
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
3016
+ <xsl:template name="insertCoverPageFullImage">
3017
+ <xsl:param name="name">coverpage-image</xsl:param>
3018
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
3019
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
3020
+ <fo:flow flow-name="xsl-region-body">
3021
+ <xsl:call-template name="insertBackgroundPageImage">
3022
+ <xsl:with-param name="number" select="position()"/>
3023
+ </xsl:call-template>
3024
+ </fo:flow>
3025
+ </fo:page-sequence>
3026
+ </xsl:for-each>
3027
+ </xsl:template>
3028
+
3029
+ <xsl:template name="insertPageImage">
3030
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
3031
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
3032
+ <xsl:choose>
3033
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
3034
+ <fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
3035
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
3036
+ <xsl:call-template name="getSVG"/>
3037
+ </fo:instream-foreign-object>
3038
+ </xsl:when>
3039
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
3040
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
3041
+ </xsl:when>
3042
+ <xsl:otherwise> <!-- bitmap image -->
3043
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
3044
+ <xsl:if test="$coverimage_src != ''">
3045
+ <xsl:variable name="coverpage">
3046
+ <xsl:call-template name="getImageURL">
3047
+ <xsl:with-param name="src" select="$coverimage_src"/>
3048
+ </xsl:call-template>
3049
+ </xsl:variable>
3050
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
3051
+ </xsl:if>
3052
+ </xsl:otherwise>
3053
+ </xsl:choose>
3054
+ </xsl:template>
3055
+
3056
+ <xsl:template name="getImageURL">
3057
+ <xsl:param name="src"/>
3058
+ <xsl:choose>
3059
+ <xsl:when test="starts-with($src, 'data:image')">
3060
+ <xsl:value-of select="$src"/>
3061
+ </xsl:when>
3062
+ <xsl:otherwise>
3063
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
3064
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
3065
+ </xsl:otherwise>
3066
+ </xsl:choose>
3067
+ </xsl:template>
3068
+
3069
+ <xsl:template name="getSVG">
3070
+ <xsl:choose>
3071
+ <xsl:when test="*[local-name() = 'svg']">
3072
+ <xsl:apply-templates select="*[local-name() = 'svg']" mode="svg_update"/>
3073
+ </xsl:when>
3074
+ <xsl:otherwise>
3075
+ <xsl:variable name="svg_content" select="document(@src)"/>
3076
+ <xsl:for-each select="xalan:nodeset($svg_content)/node()">
3077
+ <xsl:apply-templates select="." mode="svg_update"/>
3078
+ </xsl:for-each>
3079
+ </xsl:otherwise>
3080
+ </xsl:choose>
3081
+ </xsl:template>
3082
+
3083
+ <!-- END: insert cover page image -->
3084
+
2984
3085
  <!-- boilerplate sections styles -->
2985
3086
  <xsl:attribute-set name="copyright-statement-style">
2986
3087
  </xsl:attribute-set> <!-- copyright-statement-style -->
@@ -3705,11 +3806,11 @@
3705
3806
  <fo:block role="SKIP">
3706
3807
  <fo:table width="100%" table-layout="fixed" role="SKIP">
3707
3808
  <xsl:copy-of select="@id"/>
3708
- <fo:table-column column-width="8%"/>
3709
- <fo:table-column column-width="92%"/>
3710
- <fo:table-body role="SKIP">
3711
- <xsl:apply-templates/>
3712
- </fo:table-body>
3809
+ <fo:table-column column-width="8%"/>
3810
+ <fo:table-column column-width="92%"/>
3811
+ <fo:table-body role="SKIP">
3812
+ <xsl:apply-templates/>
3813
+ </fo:table-body>
3713
3814
  </fo:table>
3714
3815
  </fo:block>
3715
3816
  </xsl:template>
@@ -10478,6 +10579,17 @@
10478
10579
  <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mnx:item[4]"/></xsl:attribute>
10479
10580
  </xsl:template>
10480
10581
 
10582
+ <xsl:template match="*[local-name() = 'text' or local-name() = 'g']/@font-family[. = 'sans-serif']" mode="svg_update">
10583
+ <xsl:attribute name="font-family">Arial
10584
+ </xsl:attribute>
10585
+ </xsl:template>
10586
+ <xsl:template match="*[local-name() = 'text' or local-name() = 'g']/@font-family[. = 'serif']" mode="svg_update">
10587
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
10588
+ </xsl:template>
10589
+ <xsl:template match="*[local-name() = 'text' or local-name() = 'g']/@font-family[. = 'monospace']" mode="svg_update">
10590
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
10591
+ </xsl:template>
10592
+
10481
10593
  <!-- ============== -->
10482
10594
  <!-- END: svg_update -->
10483
10595
  <!-- ============== -->
@@ -13432,7 +13544,8 @@
13432
13544
 
13433
13545
  <xsl:template match="mnx:item/text()" mode="bookmarks"/>
13434
13546
 
13435
- <xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]" mode="bookmarks"/>
13547
+ <!-- <xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]" mode="bookmarks"/> -->
13548
+ <xsl:template match="*[local-name() = 'add'][starts-with(., 'ace-tag_')]" mode="bookmarks"/>
13436
13549
 
13437
13550
  <!-- Bookmarks -->
13438
13551
  <xsl:template name="addBookmarks">
@@ -15742,9 +15855,10 @@
15742
15855
  </xsl:template>
15743
15856
 
15744
15857
  <xsl:template name="getDoctype">
15858
+ <xsl:variable name="contextNode" select="xalan:evaluate($bibdataContextNode)"/>
15745
15859
  <xsl:variable name="doctype_alias" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias)"/>
15746
15860
  <xsl:value-of select="$doctype_alias"/>
15747
- <xsl:if test="$doctype_alias = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/></xsl:if>
15861
+ <xsl:if test="$doctype_alias = ''"><xsl:value-of select="$contextNode/mn:ext/mn:doctype[not(@language) or @language = '']"/></xsl:if>
15748
15862
  </xsl:template>
15749
15863
 
15750
15864
  <xsl:template name="getDoctypeTitle">
@@ -16007,95 +16121,6 @@
16007
16121
  </xsl:if>
16008
16122
  </xsl:template>
16009
16123
 
16010
- <!-- insert cover page image -->
16011
- <!-- background cover image -->
16012
- <xsl:template name="insertBackgroundPageImage">
16013
- <xsl:param name="number">1</xsl:param>
16014
- <xsl:param name="name">coverpage-image</xsl:param>
16015
- <xsl:param name="suffix"/>
16016
- <xsl:variable name="num" select="number($number)"/>
16017
- <!-- background image -->
16018
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
16019
- <fo:block>
16020
- <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image[$num]">
16021
-
16022
- <xsl:call-template name="insertPageImage"/>
16023
-
16024
- </xsl:for-each>
16025
- </fo:block>
16026
- </fo:block-container>
16027
- </xsl:template>
16028
-
16029
- <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
16030
- <xsl:template name="insertCoverPageFullImage">
16031
- <xsl:param name="name">coverpage-image</xsl:param>
16032
- <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
16033
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
16034
- <fo:flow flow-name="xsl-region-body">
16035
- <xsl:call-template name="insertBackgroundPageImage">
16036
- <xsl:with-param name="number" select="position()"/>
16037
- </xsl:call-template>
16038
- </fo:flow>
16039
- </fo:page-sequence>
16040
- </xsl:for-each>
16041
- </xsl:template>
16042
-
16043
- <xsl:template name="insertPageImage">
16044
- <xsl:param name="svg_content_height" select="$pageHeight"/>
16045
- <xsl:param name="bitmap_width" select="$pageWidth"/>
16046
- <xsl:choose>
16047
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16048
- <fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
16049
- <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
16050
- <xsl:call-template name="getSVG"/>
16051
- </fo:instream-foreign-object>
16052
- </xsl:when>
16053
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16054
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
16055
- </xsl:when>
16056
- <xsl:otherwise> <!-- bitmap image -->
16057
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16058
- <xsl:if test="$coverimage_src != ''">
16059
- <xsl:variable name="coverpage">
16060
- <xsl:call-template name="getImageURL">
16061
- <xsl:with-param name="src" select="$coverimage_src"/>
16062
- </xsl:call-template>
16063
- </xsl:variable>
16064
- <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
16065
- </xsl:if>
16066
- </xsl:otherwise>
16067
- </xsl:choose>
16068
- </xsl:template>
16069
-
16070
- <xsl:template name="getImageURL">
16071
- <xsl:param name="src"/>
16072
- <xsl:choose>
16073
- <xsl:when test="starts-with($src, 'data:image')">
16074
- <xsl:value-of select="$src"/>
16075
- </xsl:when>
16076
- <xsl:otherwise>
16077
- <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
16078
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
16079
- </xsl:otherwise>
16080
- </xsl:choose>
16081
- </xsl:template>
16082
-
16083
- <xsl:template name="getSVG">
16084
- <xsl:choose>
16085
- <xsl:when test="*[local-name() = 'svg']">
16086
- <xsl:apply-templates select="*[local-name() = 'svg']" mode="svg_update"/>
16087
- </xsl:when>
16088
- <xsl:otherwise>
16089
- <xsl:variable name="svg_content" select="document(@src)"/>
16090
- <xsl:for-each select="xalan:nodeset($svg_content)/node()">
16091
- <xsl:apply-templates select="." mode="svg_update"/>
16092
- </xsl:for-each>
16093
- </xsl:otherwise>
16094
- </xsl:choose>
16095
- </xsl:template>
16096
-
16097
- <!-- END: insert cover page image -->
16098
-
16099
16124
  <!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
16100
16125
  <xsl:variable name="regex_ja_spec_half_width_">
16101
16126
  \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
@@ -247,7 +247,7 @@
247
247
 
248
248
  <xsl:for-each select="xalan:nodeset($current_document)">
249
249
 
250
- <xsl:call-template name="cover-page"/>
250
+ <xsl:call-template name="cover-pages"/>
251
251
 
252
252
  <xsl:call-template name="inner-cover-page"/>
253
253
 
@@ -1295,8 +1295,12 @@
1295
1295
  <xsl:variable name="root_element">metanorma</xsl:variable>
1296
1296
 
1297
1297
  <!---examples: 2013, 2024 -->
1298
+ <!-- TO DO: delete -->
1298
1299
  <xsl:variable name="document_scheme" select="normalize-space(//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:document-scheme)"/>
1299
1300
 
1301
+ <!-- string, not node. Will be evaluated via xalan:evaluate -->
1302
+ <xsl:variable name="bibdataContextNode">/mn:metanorma/mn:bibdata</xsl:variable>
1303
+
1300
1304
  <!-- external parameters -->
1301
1305
  <xsl:param name="svg_images"/> <!-- svg images array -->
1302
1306
  <xsl:variable name="images" select="document($svg_images)"/>
@@ -2491,6 +2495,7 @@
2491
2495
  <xsl:if test="position() = 1 and $add_continue = 'true'"> continue="true"</xsl:if>
2492
2496
  <xsl:if test="$add_continue = 'true'"> role="NonStruct"</xsl:if><!-- the condition 'xsl:if' to prevent the attribute role for math -->
2493
2497
  <xsl:if test="position() = 1 and $xmlns != ''"> xmlns="<xsl:value-of select="$xmlns"/>"</xsl:if>
2498
+ <xsl:if test="starts-with(., 'mn:')"> xmlns:mn="<xsl:value-of select="$namespace_full"/>"</xsl:if>
2494
2499
  <xsl:text disable-output-escaping="yes">&gt;</xsl:text>
2495
2500
  <xsl:if test="$debug = 'true'">
2496
2501
  <xsl:message>&lt;<xsl:value-of select="."/>&gt;</xsl:message>
@@ -2981,6 +2986,102 @@
2981
2986
  </xsl:element>
2982
2987
  </xsl:template>
2983
2988
 
2989
+ <xsl:template name="cover-pages">
2990
+ <xsl:param name="num"/>
2991
+ <xsl:call-template name="cover-page">
2992
+ <xsl:with-param name="num" select="$num"/>
2993
+ </xsl:call-template>
2994
+ </xsl:template>
2995
+
2996
+ <!-- insert cover page image -->
2997
+ <!-- background cover image -->
2998
+ <xsl:template name="insertBackgroundPageImage">
2999
+ <xsl:param name="number">1</xsl:param>
3000
+ <xsl:param name="name">coverpage-image</xsl:param>
3001
+ <xsl:param name="suffix"/>
3002
+ <xsl:variable name="num" select="number($number)"/>
3003
+ <!-- background image -->
3004
+ <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
3005
+ <fo:block>
3006
+ <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image[$num]">
3007
+
3008
+ <xsl:call-template name="insertPageImage"/>
3009
+
3010
+ </xsl:for-each>
3011
+ </fo:block>
3012
+ </fo:block-container>
3013
+ </xsl:template>
3014
+
3015
+ <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
3016
+ <xsl:template name="insertCoverPageFullImage">
3017
+ <xsl:param name="name">coverpage-image</xsl:param>
3018
+ <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
3019
+ <fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
3020
+ <fo:flow flow-name="xsl-region-body">
3021
+ <xsl:call-template name="insertBackgroundPageImage">
3022
+ <xsl:with-param name="number" select="position()"/>
3023
+ </xsl:call-template>
3024
+ </fo:flow>
3025
+ </fo:page-sequence>
3026
+ </xsl:for-each>
3027
+ </xsl:template>
3028
+
3029
+ <xsl:template name="insertPageImage">
3030
+ <xsl:param name="svg_content_height" select="$pageHeight"/>
3031
+ <xsl:param name="bitmap_width" select="$pageWidth"/>
3032
+ <xsl:choose>
3033
+ <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
3034
+ <fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
3035
+ <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
3036
+ <xsl:call-template name="getSVG"/>
3037
+ </fo:instream-foreign-object>
3038
+ </xsl:when>
3039
+ <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
3040
+ <fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
3041
+ </xsl:when>
3042
+ <xsl:otherwise> <!-- bitmap image -->
3043
+ <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
3044
+ <xsl:if test="$coverimage_src != ''">
3045
+ <xsl:variable name="coverpage">
3046
+ <xsl:call-template name="getImageURL">
3047
+ <xsl:with-param name="src" select="$coverimage_src"/>
3048
+ </xsl:call-template>
3049
+ </xsl:variable>
3050
+ <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
3051
+ </xsl:if>
3052
+ </xsl:otherwise>
3053
+ </xsl:choose>
3054
+ </xsl:template>
3055
+
3056
+ <xsl:template name="getImageURL">
3057
+ <xsl:param name="src"/>
3058
+ <xsl:choose>
3059
+ <xsl:when test="starts-with($src, 'data:image')">
3060
+ <xsl:value-of select="$src"/>
3061
+ </xsl:when>
3062
+ <xsl:otherwise>
3063
+ <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
3064
+ <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
3065
+ </xsl:otherwise>
3066
+ </xsl:choose>
3067
+ </xsl:template>
3068
+
3069
+ <xsl:template name="getSVG">
3070
+ <xsl:choose>
3071
+ <xsl:when test="*[local-name() = 'svg']">
3072
+ <xsl:apply-templates select="*[local-name() = 'svg']" mode="svg_update"/>
3073
+ </xsl:when>
3074
+ <xsl:otherwise>
3075
+ <xsl:variable name="svg_content" select="document(@src)"/>
3076
+ <xsl:for-each select="xalan:nodeset($svg_content)/node()">
3077
+ <xsl:apply-templates select="." mode="svg_update"/>
3078
+ </xsl:for-each>
3079
+ </xsl:otherwise>
3080
+ </xsl:choose>
3081
+ </xsl:template>
3082
+
3083
+ <!-- END: insert cover page image -->
3084
+
2984
3085
  <!-- boilerplate sections styles -->
2985
3086
  <xsl:attribute-set name="copyright-statement-style">
2986
3087
  </xsl:attribute-set> <!-- copyright-statement-style -->
@@ -3705,11 +3806,11 @@
3705
3806
  <fo:block role="SKIP">
3706
3807
  <fo:table width="100%" table-layout="fixed" role="SKIP">
3707
3808
  <xsl:copy-of select="@id"/>
3708
- <fo:table-column column-width="8%"/>
3709
- <fo:table-column column-width="92%"/>
3710
- <fo:table-body role="SKIP">
3711
- <xsl:apply-templates/>
3712
- </fo:table-body>
3809
+ <fo:table-column column-width="8%"/>
3810
+ <fo:table-column column-width="92%"/>
3811
+ <fo:table-body role="SKIP">
3812
+ <xsl:apply-templates/>
3813
+ </fo:table-body>
3713
3814
  </fo:table>
3714
3815
  </fo:block>
3715
3816
  </xsl:template>
@@ -10478,6 +10579,17 @@
10478
10579
  <xsl:attribute name="{$att_name}-opacity"><xsl:value-of select="$components/mnx:item[4]"/></xsl:attribute>
10479
10580
  </xsl:template>
10480
10581
 
10582
+ <xsl:template match="*[local-name() = 'text' or local-name() = 'g']/@font-family[. = 'sans-serif']" mode="svg_update">
10583
+ <xsl:attribute name="font-family">Arial
10584
+ </xsl:attribute>
10585
+ </xsl:template>
10586
+ <xsl:template match="*[local-name() = 'text' or local-name() = 'g']/@font-family[. = 'serif']" mode="svg_update">
10587
+ <xsl:attribute name="font-family">Times New Roman</xsl:attribute>
10588
+ </xsl:template>
10589
+ <xsl:template match="*[local-name() = 'text' or local-name() = 'g']/@font-family[. = 'monospace']" mode="svg_update">
10590
+ <xsl:attribute name="font-family">Courier New</xsl:attribute>
10591
+ </xsl:template>
10592
+
10481
10593
  <!-- ============== -->
10482
10594
  <!-- END: svg_update -->
10483
10595
  <!-- ============== -->
@@ -13432,7 +13544,8 @@
13432
13544
 
13433
13545
  <xsl:template match="mnx:item/text()" mode="bookmarks"/>
13434
13546
 
13435
- <xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]" mode="bookmarks"/>
13547
+ <!-- <xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]" mode="bookmarks"/> -->
13548
+ <xsl:template match="*[local-name() = 'add'][starts-with(., 'ace-tag_')]" mode="bookmarks"/>
13436
13549
 
13437
13550
  <!-- Bookmarks -->
13438
13551
  <xsl:template name="addBookmarks">
@@ -15742,9 +15855,10 @@
15742
15855
  </xsl:template>
15743
15856
 
15744
15857
  <xsl:template name="getDoctype">
15858
+ <xsl:variable name="contextNode" select="xalan:evaluate($bibdataContextNode)"/>
15745
15859
  <xsl:variable name="doctype_alias" select="normalize-space(/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/mn:doctype-alias)"/>
15746
15860
  <xsl:value-of select="$doctype_alias"/>
15747
- <xsl:if test="$doctype_alias = ''"><xsl:value-of select="/mn:metanorma/mn:bibdata/mn:ext/mn:doctype[not(@language) or @language = '']"/></xsl:if>
15861
+ <xsl:if test="$doctype_alias = ''"><xsl:value-of select="$contextNode/mn:ext/mn:doctype[not(@language) or @language = '']"/></xsl:if>
15748
15862
  </xsl:template>
15749
15863
 
15750
15864
  <xsl:template name="getDoctypeTitle">
@@ -16007,95 +16121,6 @@
16007
16121
  </xsl:if>
16008
16122
  </xsl:template>
16009
16123
 
16010
- <!-- insert cover page image -->
16011
- <!-- background cover image -->
16012
- <xsl:template name="insertBackgroundPageImage">
16013
- <xsl:param name="number">1</xsl:param>
16014
- <xsl:param name="name">coverpage-image</xsl:param>
16015
- <xsl:param name="suffix"/>
16016
- <xsl:variable name="num" select="number($number)"/>
16017
- <!-- background image -->
16018
- <fo:block-container absolute-position="fixed" left="0mm" top="0mm" font-size="0" id="__internal_layout__coverpage{$suffix}_{$name}_{$number}_{generate-id()}">
16019
- <fo:block>
16020
- <xsl:for-each select="/mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image[$num]">
16021
-
16022
- <xsl:call-template name="insertPageImage"/>
16023
-
16024
- </xsl:for-each>
16025
- </fo:block>
16026
- </fo:block-container>
16027
- </xsl:template>
16028
-
16029
- <!-- for https://github.com/metanorma/mn-native-pdf/issues/845 -->
16030
- <xsl:template name="insertCoverPageFullImage">
16031
- <xsl:param name="name">coverpage-image</xsl:param>
16032
- <xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
16033
- <fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
16034
- <fo:flow flow-name="xsl-region-body">
16035
- <xsl:call-template name="insertBackgroundPageImage">
16036
- <xsl:with-param name="number" select="position()"/>
16037
- </xsl:call-template>
16038
- </fo:flow>
16039
- </fo:page-sequence>
16040
- </xsl:for-each>
16041
- </xsl:template>
16042
-
16043
- <xsl:template name="insertPageImage">
16044
- <xsl:param name="svg_content_height" select="$pageHeight"/>
16045
- <xsl:param name="bitmap_width" select="$pageWidth"/>
16046
- <xsl:choose>
16047
- <xsl:when test="*[local-name() = 'svg'] or java:endsWith(java:java.lang.String.new(@src), '.svg')">
16048
- <fo:instream-foreign-object fox:alt-text="Image Front" fox:placement="Block">
16049
- <xsl:attribute name="content-height"><xsl:value-of select="$svg_content_height"/>mm</xsl:attribute>
16050
- <xsl:call-template name="getSVG"/>
16051
- </fo:instream-foreign-object>
16052
- </xsl:when>
16053
- <xsl:when test="starts-with(@src, 'data:application/pdf;base64')">
16054
- <fo:external-graphic src="{@src}" fox:alt-text="Image Front" fox:placement="Block"/>
16055
- </xsl:when>
16056
- <xsl:otherwise> <!-- bitmap image -->
16057
- <xsl:variable name="coverimage_src" select="normalize-space(@src)"/>
16058
- <xsl:if test="$coverimage_src != ''">
16059
- <xsl:variable name="coverpage">
16060
- <xsl:call-template name="getImageURL">
16061
- <xsl:with-param name="src" select="$coverimage_src"/>
16062
- </xsl:call-template>
16063
- </xsl:variable>
16064
- <fo:external-graphic src="{$coverpage}" width="{$bitmap_width}mm" content-height="scale-to-fit" scaling="uniform" fox:alt-text="Image Front" fox:placement="Block"/>
16065
- </xsl:if>
16066
- </xsl:otherwise>
16067
- </xsl:choose>
16068
- </xsl:template>
16069
-
16070
- <xsl:template name="getImageURL">
16071
- <xsl:param name="src"/>
16072
- <xsl:choose>
16073
- <xsl:when test="starts-with($src, 'data:image')">
16074
- <xsl:value-of select="$src"/>
16075
- </xsl:when>
16076
- <xsl:otherwise>
16077
- <xsl:variable name="src_external"><xsl:call-template name="getImageSrcExternal"/></xsl:variable>
16078
- <xsl:value-of select="concat('url(file:///', $src_external, ')')"/>
16079
- </xsl:otherwise>
16080
- </xsl:choose>
16081
- </xsl:template>
16082
-
16083
- <xsl:template name="getSVG">
16084
- <xsl:choose>
16085
- <xsl:when test="*[local-name() = 'svg']">
16086
- <xsl:apply-templates select="*[local-name() = 'svg']" mode="svg_update"/>
16087
- </xsl:when>
16088
- <xsl:otherwise>
16089
- <xsl:variable name="svg_content" select="document(@src)"/>
16090
- <xsl:for-each select="xalan:nodeset($svg_content)/node()">
16091
- <xsl:apply-templates select="." mode="svg_update"/>
16092
- </xsl:for-each>
16093
- </xsl:otherwise>
16094
- </xsl:choose>
16095
- </xsl:template>
16096
-
16097
- <!-- END: insert cover page image -->
16098
-
16099
16124
  <!-- https://github.com/metanorma/docs/blob/main/109.adoc -->
16100
16125
  <xsl:variable name="regex_ja_spec_half_width_">
16101
16126
  \u0028 <!-- U+0028 LEFT PARENTHESIS (() -->
@@ -61,6 +61,17 @@ module IsoDoc
61
61
  # super
62
62
  # end
63
63
 
64
+ # Resolution-style documents (IALA general-assembly resolutions and
65
+ # their kin) transcribe their content as bare blocks directly under
66
+ # <sections>, with no clause wrappers. Give those blocks their
67
+ # displayorder after the modelled sections: the top-level render
68
+ # walk in HTML, Word and PDF presupposes @displayorder on every
69
+ # element, and blocks left unordered are silently dropped from the
70
+ # output.
71
+ UNMODELLED_SECTIONS_XPATH =
72
+ "//sections/*[not(self::clause or self::terms or " \
73
+ "self::definitions or self::references or self::floating-title)]"
74
+
64
75
  def clause_order_main(docxml)
65
76
  if docxml.at(ns("//bibliography//references[@normative = 'true']")) ||
66
77
  docxml.at(ns("//sections/references[@normative = 'true']"))
@@ -69,6 +80,7 @@ module IsoDoc
69
80
  { path: "#{@klass.norm_ref_xpath} | //sections/references" },
70
81
  { path: "//sections/terms | //sections/definitions | " \
71
82
  "//sections/clause[not(@type = 'scope')]", multi: true },
83
+ { path: UNMODELLED_SECTIONS_XPATH, multi: true },
72
84
  ]
73
85
  else
74
86
  [
@@ -77,6 +89,7 @@ module IsoDoc
77
89
  "//bibliography/references[@normative = 'true'] | " \
78
90
  "//bibliography/clause[.//references[@normative = 'true']] | " \
79
91
  "//sections/clause", multi: true },
92
+ { path: UNMODELLED_SECTIONS_XPATH, multi: true },
80
93
  ]
81
94
  end
82
95
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
2
  module Iho
3
- VERSION = "1.4.7".freeze
3
+ VERSION = "1.4.9".freeze
4
4
  end
5
5
  end
data/metanorma.yml CHANGED
@@ -15,8 +15,44 @@ committees:
15
15
  full_name: Inter-Regional Coordination Committee
16
16
  - code: ihb
17
17
  full_name: International Hydrographic Bureau
18
+ - code: cbsc
19
+ full_name: Capacity Building Sub-Committee
20
+ - code: cdsc
21
+ full_name: Capacity Development Sub-Committee
22
+ - code: csbwg
23
+ full_name: Crowd-Sourced Bathymetry Working Group
24
+ - code: dcdb
25
+ full_name: IHO Data Centre for Digital Bathymetry
26
+ - code: dqwg
27
+ full_name: Data Quality Working Group
28
+ - code: encwg
29
+ full_name: ENC Standards Maintenance Working Group
30
+ - code: hdcg
31
+ full_name: Hydrographic Dictionary Content Group
32
+ - code: hswg
33
+ full_name: Hydrographic Surveys Working Group
34
+ - code: ibsc
35
+ full_name: International Board on Standards of Competence for Hydrographic Surveyors and Nautical Cartographers
36
+ - code: ienwg
37
+ full_name: IHO-European Commission Network Working Group
38
+ - code: jwg-mgi
39
+ full_name: IHO Joint Working Group on Marine Geospatial Information
18
40
  - code: ncwg
19
41
  full_name: Nautical Cartography Working Group
42
+ - code: nipwg
43
+ full_name: Nautical Information Provision Working Group
44
+ - code: s-100wg
45
+ full_name: S-100 Working Group
46
+ - code: sprwg
47
+ full_name: Strategic Plan Review Working Group
48
+ - code: tsmad
49
+ full_name: Transfer Standard Maintenance and Application Development Working Group
50
+ - code: twcwg
51
+ full_name: Tides, Water Levels and Currents Working Group
52
+ - code: wendwg
53
+ full_name: Worldwide ENC Database Working Group
54
+ - code: wwnws
55
+ full_name: Worldwide Navigational Warning Service Sub-Committee
20
56
  htmlcoverpage: lib/isodoc/iho/html/html_iho_titlepage.html
21
57
  htmlintropage: lib/isodoc/iho/html/html_iho_intro.html
22
58
  htmlstylesheet: lib/isodoc/iho/html/htmlstyle.scss
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: 1.4.7
4
+ version: 1.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-11-19 00:00:00.000000000 Z
11
+ date: 2026-11-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pubid