metanorma-iho 1.3.3 → 1.3.4
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 +4 -4
- data/lib/isodoc/iho/iho.specification.xsl +95 -8
- data/lib/isodoc/iho/iho.standard.xsl +95 -8
- data/lib/metanorma/iho/version.rb +1 -1
- data/lib/relaton/render/parse.rb +2 -2
- data/metanorma-iho.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67d26a49db3a631da937a8c41a27bab1a5c1d362782c64fb8fa6f4bffca43b39
|
|
4
|
+
data.tar.gz: e5e18568b953cd5371594a0b006ff7c954f3a1c250fa8214f15ea851b04c8f1a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 553a976f9584e5053cf0766555664635461604c8d2d20d31d1adf41b2d84148ebde6f75986bca2c0de7ede0d7eb5cf153507399157cda50ed1cc971b09fbf7f9
|
|
7
|
+
data.tar.gz: 6973c5a41295fb8cdb05210faf0c134c90742d3cf47c46d06a5e3b4fccbda17b0e3e157e1e330388790631987535ffc870aeeba99ee75e068f1d3bee0fc9ad26
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
|
6
6
|
|
|
7
|
+
<xsl:key name="kid" match="*" use="@id"/>
|
|
8
|
+
|
|
7
9
|
<xsl:variable name="debug">false</xsl:variable>
|
|
8
10
|
|
|
9
11
|
<!-- Example:
|
|
@@ -713,6 +715,7 @@
|
|
|
713
715
|
<xsl:param name="num"/>
|
|
714
716
|
<!-- Table of Contents -->
|
|
715
717
|
<fo:block>
|
|
718
|
+
<xsl:copy-of select="@id"/>
|
|
716
719
|
|
|
717
720
|
<xsl:apply-templates/>
|
|
718
721
|
|
|
@@ -951,6 +954,7 @@
|
|
|
951
954
|
<xsl:apply-templates/>
|
|
952
955
|
</xsl:when>
|
|
953
956
|
<xsl:otherwise>
|
|
957
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
954
958
|
<fo:block>
|
|
955
959
|
<xsl:call-template name="setId"/>
|
|
956
960
|
<xsl:call-template name="addReviewHelper"/>
|
|
@@ -969,6 +973,8 @@
|
|
|
969
973
|
</xsl:choose>
|
|
970
974
|
</xsl:variable>
|
|
971
975
|
|
|
976
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
977
|
+
|
|
972
978
|
<xsl:variable name="title_styles">
|
|
973
979
|
<styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
|
|
974
980
|
</xsl:variable>
|
|
@@ -976,6 +982,8 @@
|
|
|
976
982
|
<xsl:element name="{$element-name}">
|
|
977
983
|
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
978
984
|
|
|
985
|
+
<xsl:call-template name="setIDforNamedDestinationInline"/>
|
|
986
|
+
|
|
979
987
|
<xsl:apply-templates/>
|
|
980
988
|
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
981
989
|
</xsl:element>
|
|
@@ -1000,6 +1008,7 @@
|
|
|
1000
1008
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
1001
1009
|
</xsl:choose>
|
|
1002
1010
|
</xsl:variable>
|
|
1011
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1003
1012
|
|
|
1004
1013
|
<xsl:variable name="p_styles">
|
|
1005
1014
|
<styles xsl:use-attribute-sets="p-style">
|
|
@@ -2048,6 +2057,46 @@
|
|
|
2048
2057
|
</xsl:template>
|
|
2049
2058
|
|
|
2050
2059
|
<xsl:template name="addNamedDestinationAttribute">
|
|
2060
|
+
<xsl:variable name="docnum"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
2061
|
+
<xsl:variable name="caption_label" select="translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2062
|
+
|
|
2063
|
+
<xsl:variable name="named_dest_">
|
|
2064
|
+
<xsl:choose>
|
|
2065
|
+
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
2066
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
2067
|
+
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
2068
|
+
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
2069
|
+
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
2070
|
+
</xsl:when>
|
|
2071
|
+
<xsl:when test="$caption_label = '' and parent::mn:introduction">
|
|
2072
|
+
<xsl:variable name="introduction_number"><xsl:number count="mn:introduction" level="any"/></xsl:variable>
|
|
2073
|
+
<xsl:if test="$introduction_number = 1">Introduction</xsl:if>
|
|
2074
|
+
</xsl:when>
|
|
2075
|
+
<xsl:when test="$caption_label = ''"/>
|
|
2076
|
+
<xsl:when test="../@unnumbered = 'true'"/>
|
|
2077
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
2078
|
+
<!-- 1.1 in Appendix 1 -->
|
|
2079
|
+
<xsl:otherwise>
|
|
2080
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
2081
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2082
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
2083
|
+
</xsl:if>
|
|
2084
|
+
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
2085
|
+
<xsl:value-of select="$caption_label"/>
|
|
2086
|
+
</xsl:otherwise>
|
|
2087
|
+
</xsl:choose>
|
|
2088
|
+
</xsl:variable>
|
|
2089
|
+
<xsl:variable name="named_dest" select="normalize-space($named_dest_)"/>
|
|
2090
|
+
<xsl:if test="$named_dest != ''">
|
|
2091
|
+
<xsl:variable name="named_dest_doc_">
|
|
2092
|
+
<xsl:value-of select="$named_dest"/>
|
|
2093
|
+
<xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
|
|
2094
|
+
</xsl:variable>
|
|
2095
|
+
<xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
|
|
2096
|
+
<xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
|
|
2097
|
+
<xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
|
|
2098
|
+
</xsl:if>
|
|
2099
|
+
</xsl:if>
|
|
2051
2100
|
</xsl:template>
|
|
2052
2101
|
|
|
2053
2102
|
<xsl:template match="mn:fmt-name" mode="update_xml_step1">
|
|
@@ -2980,9 +3029,11 @@
|
|
|
2980
3029
|
</xsl:template>
|
|
2981
3030
|
|
|
2982
3031
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
3032
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
2983
3033
|
<xsl:param name="margin"/>
|
|
2984
3034
|
<!-- process in the template 'paragraph' -->
|
|
2985
3035
|
<xsl:call-template name="paragraph">
|
|
3036
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
2986
3037
|
<xsl:with-param name="margin" select="$margin"/>
|
|
2987
3038
|
</xsl:call-template>
|
|
2988
3039
|
</xsl:template>
|
|
@@ -9377,7 +9428,12 @@
|
|
|
9377
9428
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
9378
9429
|
<xsl:call-template name="setNamedDestination"/>
|
|
9379
9430
|
<fo:block id="{@id}">
|
|
9380
|
-
<
|
|
9431
|
+
<fo:block role="SKIP">
|
|
9432
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
9433
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
9434
|
+
</xsl:for-each>
|
|
9435
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
9436
|
+
</fo:block>
|
|
9381
9437
|
</fo:block>
|
|
9382
9438
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
9383
9439
|
</xsl:template>
|
|
@@ -11950,7 +12006,7 @@
|
|
|
11950
12006
|
</xsl:variable>
|
|
11951
12007
|
|
|
11952
12008
|
<xsl:template name="index-pages">
|
|
11953
|
-
<xsl:
|
|
12009
|
+
<xsl:param name="num"/>
|
|
11954
12010
|
|
|
11955
12011
|
<xsl:variable name="docid">
|
|
11956
12012
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -13894,6 +13950,15 @@
|
|
|
13894
13950
|
</xsl:if>
|
|
13895
13951
|
</xsl:template>
|
|
13896
13952
|
|
|
13953
|
+
<!-- debug templates -->
|
|
13954
|
+
<xsl:template name="debug_contents">
|
|
13955
|
+
<xsl:if test="$debug = 'true'">
|
|
13956
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
13957
|
+
<xsl:copy-of select="$contents"/>
|
|
13958
|
+
</redirect:write>
|
|
13959
|
+
</xsl:if>
|
|
13960
|
+
</xsl:template>
|
|
13961
|
+
|
|
13897
13962
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
13898
13963
|
<xsl:param name="num"/>
|
|
13899
13964
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -15102,14 +15167,18 @@
|
|
|
15102
15167
|
</xsl:template>
|
|
15103
15168
|
|
|
15104
15169
|
<xsl:template name="setIDforNamedDestination">
|
|
15105
|
-
<xsl:if test="
|
|
15106
|
-
<xsl:
|
|
15170
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
15171
|
+
<xsl:if test="@named_dest">
|
|
15172
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
15173
|
+
</xsl:if>
|
|
15107
15174
|
</xsl:if>
|
|
15108
15175
|
</xsl:template>
|
|
15109
15176
|
|
|
15110
15177
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
15111
|
-
<xsl:if test="
|
|
15112
|
-
<
|
|
15178
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
15179
|
+
<xsl:if test="@named_dest">
|
|
15180
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
15181
|
+
</xsl:if>
|
|
15113
15182
|
</xsl:if>
|
|
15114
15183
|
</xsl:template>
|
|
15115
15184
|
|
|
@@ -15119,7 +15188,7 @@
|
|
|
15119
15188
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
15120
15189
|
<fox:destination internal-destination="{@id}"/>
|
|
15121
15190
|
</xsl:if>
|
|
15122
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
15191
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
15123
15192
|
<xsl:if test="@named_dest">
|
|
15124
15193
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
15125
15194
|
</xsl:if>
|
|
@@ -15127,6 +15196,12 @@
|
|
|
15127
15196
|
</xsl:if>
|
|
15128
15197
|
</xsl:template>
|
|
15129
15198
|
|
|
15199
|
+
<xsl:template name="copyParagraphId">
|
|
15200
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
15201
|
+
<xsl:copy-of select="@id"/>
|
|
15202
|
+
</xsl:if>
|
|
15203
|
+
</xsl:template>
|
|
15204
|
+
|
|
15130
15205
|
<xsl:template name="add-letter-spacing">
|
|
15131
15206
|
<xsl:param name="text"/>
|
|
15132
15207
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -15349,7 +15424,7 @@
|
|
|
15349
15424
|
<xsl:template name="insertCoverPageFullImage">
|
|
15350
15425
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
15351
15426
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
15352
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
15427
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
15353
15428
|
<fo:flow flow-name="xsl-region-body">
|
|
15354
15429
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
15355
15430
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -15813,6 +15888,18 @@
|
|
|
15813
15888
|
</xsl:attribute>
|
|
15814
15889
|
</xsl:template>
|
|
15815
15890
|
|
|
15891
|
+
<xsl:template name="insert_firstpage_id">
|
|
15892
|
+
<xsl:param name="num"/>
|
|
15893
|
+
<fo:wrapper role="artifact">
|
|
15894
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
15895
|
+
<xsl:if test="$num = 1">
|
|
15896
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
15897
|
+
</xsl:if>
|
|
15898
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
15899
|
+
</fo:block-container>
|
|
15900
|
+
</fo:wrapper>
|
|
15901
|
+
</xsl:template>
|
|
15902
|
+
|
|
15816
15903
|
<xsl:template name="getCharByCodePoint">
|
|
15817
15904
|
<xsl:param name="codepoint"/>
|
|
15818
15905
|
<xsl:param name="radix">16</xsl:param>
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
<xsl:key name="kfn" match="mn:fn[not(ancestor::*[self::mn:table or self::mn:figure or self::mn:localized-strings] and not(ancestor::mn:fmt-name))]" use="@reference"/>
|
|
6
6
|
|
|
7
|
+
<xsl:key name="kid" match="*" use="@id"/>
|
|
8
|
+
|
|
7
9
|
<xsl:variable name="debug">false</xsl:variable>
|
|
8
10
|
|
|
9
11
|
<!-- Example:
|
|
@@ -713,6 +715,7 @@
|
|
|
713
715
|
<xsl:param name="num"/>
|
|
714
716
|
<!-- Table of Contents -->
|
|
715
717
|
<fo:block>
|
|
718
|
+
<xsl:copy-of select="@id"/>
|
|
716
719
|
|
|
717
720
|
<xsl:apply-templates/>
|
|
718
721
|
|
|
@@ -951,6 +954,7 @@
|
|
|
951
954
|
<xsl:apply-templates/>
|
|
952
955
|
</xsl:when>
|
|
953
956
|
<xsl:otherwise>
|
|
957
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
954
958
|
<fo:block>
|
|
955
959
|
<xsl:call-template name="setId"/>
|
|
956
960
|
<xsl:call-template name="addReviewHelper"/>
|
|
@@ -969,6 +973,8 @@
|
|
|
969
973
|
</xsl:choose>
|
|
970
974
|
</xsl:variable>
|
|
971
975
|
|
|
976
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
977
|
+
|
|
972
978
|
<xsl:variable name="title_styles">
|
|
973
979
|
<styles xsl:use-attribute-sets="title-style"><xsl:call-template name="refine_title-style"/></styles>
|
|
974
980
|
</xsl:variable>
|
|
@@ -976,6 +982,8 @@
|
|
|
976
982
|
<xsl:element name="{$element-name}">
|
|
977
983
|
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
978
984
|
|
|
985
|
+
<xsl:call-template name="setIDforNamedDestinationInline"/>
|
|
986
|
+
|
|
979
987
|
<xsl:apply-templates/>
|
|
980
988
|
<xsl:apply-templates select="following-sibling::*[1][mn:variant-title][@type = 'sub']" mode="subtitle"/>
|
|
981
989
|
</xsl:element>
|
|
@@ -1000,6 +1008,7 @@
|
|
|
1000
1008
|
<xsl:otherwise>fo:block</xsl:otherwise>
|
|
1001
1009
|
</xsl:choose>
|
|
1002
1010
|
</xsl:variable>
|
|
1011
|
+
<xsl:call-template name="setNamedDestination"/>
|
|
1003
1012
|
|
|
1004
1013
|
<xsl:variable name="p_styles">
|
|
1005
1014
|
<styles xsl:use-attribute-sets="p-style">
|
|
@@ -2048,6 +2057,46 @@
|
|
|
2048
2057
|
</xsl:template>
|
|
2049
2058
|
|
|
2050
2059
|
<xsl:template name="addNamedDestinationAttribute">
|
|
2060
|
+
<xsl:variable name="docnum"><xsl:number level="any" count="mn:metanorma"/></xsl:variable>
|
|
2061
|
+
<xsl:variable name="caption_label" select="translate(normalize-space(.//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2062
|
+
|
|
2063
|
+
<xsl:variable name="named_dest_">
|
|
2064
|
+
<xsl:choose>
|
|
2065
|
+
<xsl:when test="count(ancestor::mn:figure) > 1"/> <!-- prevent id 'a)' -->
|
|
2066
|
+
<xsl:when test="ancestor::mn:note or ancestor::mn:example or ancestor::mn:termnote or ancestor::mn:termexample or ancestor::mn:admonition"/>
|
|
2067
|
+
<xsl:when test="$caption_label = '' and parent::mn:foreword">
|
|
2068
|
+
<xsl:variable name="foreword_number"><xsl:number count="mn:foreword" level="any"/></xsl:variable>
|
|
2069
|
+
<xsl:if test="$foreword_number = 1">Foreword</xsl:if>
|
|
2070
|
+
</xsl:when>
|
|
2071
|
+
<xsl:when test="$caption_label = '' and parent::mn:introduction">
|
|
2072
|
+
<xsl:variable name="introduction_number"><xsl:number count="mn:introduction" level="any"/></xsl:variable>
|
|
2073
|
+
<xsl:if test="$introduction_number = 1">Introduction</xsl:if>
|
|
2074
|
+
</xsl:when>
|
|
2075
|
+
<xsl:when test="$caption_label = ''"/>
|
|
2076
|
+
<xsl:when test="../@unnumbered = 'true'"/>
|
|
2077
|
+
<xsl:when test="normalize-space(java:matches(java:java.lang.String.new($caption_label), '[\x21-\xFF]+')) = 'false'"/>
|
|
2078
|
+
<!-- 1.1 in Appendix 1 -->
|
|
2079
|
+
<xsl:otherwise>
|
|
2080
|
+
<xsl:if test="ancestor::mn:annex and string(number(substring($caption_label, 1, 1))) != 'NaN'">
|
|
2081
|
+
<xsl:variable name="annex_caption_label" select="translate(normalize-space(ancestor::mn:annex[1]/mn:fmt-title//mn:span[@class = 'fmt-caption-label']), ' ()', '')"/>
|
|
2082
|
+
<xsl:value-of select="concat($annex_caption_label, '_')"/>
|
|
2083
|
+
</xsl:if>
|
|
2084
|
+
<xsl:if test="parent::mn:formula">Formula</xsl:if>
|
|
2085
|
+
<xsl:value-of select="$caption_label"/>
|
|
2086
|
+
</xsl:otherwise>
|
|
2087
|
+
</xsl:choose>
|
|
2088
|
+
</xsl:variable>
|
|
2089
|
+
<xsl:variable name="named_dest" select="normalize-space($named_dest_)"/>
|
|
2090
|
+
<xsl:if test="$named_dest != ''">
|
|
2091
|
+
<xsl:variable name="named_dest_doc_">
|
|
2092
|
+
<xsl:value-of select="$named_dest"/>
|
|
2093
|
+
<xsl:if test="$docnum != '1'">_<xsl:value-of select="$docnum"/></xsl:if>
|
|
2094
|
+
</xsl:variable>
|
|
2095
|
+
<xsl:variable name="named_dest_doc" select="normalize-space($named_dest_doc_)"/>
|
|
2096
|
+
<xsl:if test="not(key('kid', $named_dest_doc))"> <!-- if element with id '$named_dest_doc' doesn't exist in the document -->
|
|
2097
|
+
<xsl:attribute name="named_dest"><xsl:value-of select="normalize-space($named_dest_doc)"/></xsl:attribute>
|
|
2098
|
+
</xsl:if>
|
|
2099
|
+
</xsl:if>
|
|
2051
2100
|
</xsl:template>
|
|
2052
2101
|
|
|
2053
2102
|
<xsl:template match="mn:fmt-name" mode="update_xml_step1">
|
|
@@ -2980,9 +3029,11 @@
|
|
|
2980
3029
|
</xsl:template>
|
|
2981
3030
|
|
|
2982
3031
|
<xsl:template match="mn:feedback-statement//mn:p">
|
|
3032
|
+
<xsl:param name="skip_id">false</xsl:param>
|
|
2983
3033
|
<xsl:param name="margin"/>
|
|
2984
3034
|
<!-- process in the template 'paragraph' -->
|
|
2985
3035
|
<xsl:call-template name="paragraph">
|
|
3036
|
+
<xsl:with-param name="skip_id" select="$skip_id"/>
|
|
2986
3037
|
<xsl:with-param name="margin" select="$margin"/>
|
|
2987
3038
|
</xsl:call-template>
|
|
2988
3039
|
</xsl:template>
|
|
@@ -9377,7 +9428,12 @@
|
|
|
9377
9428
|
<xsl:template match="mn:figure[@class = 'pseudocode']">
|
|
9378
9429
|
<xsl:call-template name="setNamedDestination"/>
|
|
9379
9430
|
<fo:block id="{@id}">
|
|
9380
|
-
<
|
|
9431
|
+
<fo:block role="SKIP">
|
|
9432
|
+
<xsl:for-each select="mn:fmt-name"> <!-- set context -->
|
|
9433
|
+
<xsl:call-template name="setIDforNamedDestination"/>
|
|
9434
|
+
</xsl:for-each>
|
|
9435
|
+
<xsl:apply-templates select="node()[not(self::mn:fmt-name)]"/>
|
|
9436
|
+
</fo:block>
|
|
9381
9437
|
</fo:block>
|
|
9382
9438
|
<xsl:apply-templates select="mn:fmt-name"/>
|
|
9383
9439
|
</xsl:template>
|
|
@@ -11950,7 +12006,7 @@
|
|
|
11950
12006
|
</xsl:variable>
|
|
11951
12007
|
|
|
11952
12008
|
<xsl:template name="index-pages">
|
|
11953
|
-
<xsl:
|
|
12009
|
+
<xsl:param name="num"/>
|
|
11954
12010
|
|
|
11955
12011
|
<xsl:variable name="docid">
|
|
11956
12012
|
<xsl:call-template name="getDocumentId"/>
|
|
@@ -13894,6 +13950,15 @@
|
|
|
13894
13950
|
</xsl:if>
|
|
13895
13951
|
</xsl:template>
|
|
13896
13952
|
|
|
13953
|
+
<!-- debug templates -->
|
|
13954
|
+
<xsl:template name="debug_contents">
|
|
13955
|
+
<xsl:if test="$debug = 'true'">
|
|
13956
|
+
<redirect:write file="contents_.xml"> <!-- {java:getTime(java:java.util.Date.new())} -->
|
|
13957
|
+
<xsl:copy-of select="$contents"/>
|
|
13958
|
+
</redirect:write>
|
|
13959
|
+
</xsl:if>
|
|
13960
|
+
</xsl:template>
|
|
13961
|
+
|
|
13897
13962
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
13898
13963
|
<xsl:param name="num"/>
|
|
13899
13964
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
@@ -15102,14 +15167,18 @@
|
|
|
15102
15167
|
</xsl:template>
|
|
15103
15168
|
|
|
15104
15169
|
<xsl:template name="setIDforNamedDestination">
|
|
15105
|
-
<xsl:if test="
|
|
15106
|
-
<xsl:
|
|
15170
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
15171
|
+
<xsl:if test="@named_dest">
|
|
15172
|
+
<xsl:attribute name="id"><xsl:value-of select="@named_dest"/></xsl:attribute>
|
|
15173
|
+
</xsl:if>
|
|
15107
15174
|
</xsl:if>
|
|
15108
15175
|
</xsl:template>
|
|
15109
15176
|
|
|
15110
15177
|
<xsl:template name="setIDforNamedDestinationInline">
|
|
15111
|
-
<xsl:if test="
|
|
15112
|
-
<
|
|
15178
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
|
15179
|
+
<xsl:if test="@named_dest">
|
|
15180
|
+
<fo:inline><xsl:call-template name="setIDforNamedDestination"/></fo:inline>
|
|
15181
|
+
</xsl:if>
|
|
15113
15182
|
</xsl:if>
|
|
15114
15183
|
</xsl:template>
|
|
15115
15184
|
|
|
@@ -15119,7 +15188,7 @@
|
|
|
15119
15188
|
<xsl:if test="@id and normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
15120
15189
|
<fox:destination internal-destination="{@id}"/>
|
|
15121
15190
|
</xsl:if>
|
|
15122
|
-
<xsl:for-each select=". | mn:fmt-title | mn:fmt-name">
|
|
15191
|
+
<xsl:for-each select=". | mn:fmt-title[1] | mn:fmt-name[1]">
|
|
15123
15192
|
<xsl:if test="@named_dest">
|
|
15124
15193
|
<fox:destination internal-destination="{@named_dest}"/>
|
|
15125
15194
|
</xsl:if>
|
|
@@ -15127,6 +15196,12 @@
|
|
|
15127
15196
|
</xsl:if>
|
|
15128
15197
|
</xsl:template>
|
|
15129
15198
|
|
|
15199
|
+
<xsl:template name="copyParagraphId">
|
|
15200
|
+
<xsl:if test="normalize-space(java:matches(java:java.lang.String.new(@id), '_[0-9a-z]{8}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{4}-[0-9a-z]{12}.*')) = 'false'">
|
|
15201
|
+
<xsl:copy-of select="@id"/>
|
|
15202
|
+
</xsl:if>
|
|
15203
|
+
</xsl:template>
|
|
15204
|
+
|
|
15130
15205
|
<xsl:template name="add-letter-spacing">
|
|
15131
15206
|
<xsl:param name="text"/>
|
|
15132
15207
|
<xsl:param name="letter-spacing" select="'0.15'"/>
|
|
@@ -15349,7 +15424,7 @@
|
|
|
15349
15424
|
<xsl:template name="insertCoverPageFullImage">
|
|
15350
15425
|
<xsl:param name="name">coverpage-image</xsl:param>
|
|
15351
15426
|
<xsl:for-each select="//mn:metanorma/mn:metanorma-extension/mn:presentation-metadata/*[local-name() = $name][1]/mn:image">
|
|
15352
|
-
<fo:page-sequence master-reference="cover-page" force-page-count="no-force">
|
|
15427
|
+
<fo:page-sequence master-reference="cover-page" force-page-count="no-force" initial-page-number="1">
|
|
15353
15428
|
<fo:flow flow-name="xsl-region-body">
|
|
15354
15429
|
<xsl:call-template name="insertBackgroundPageImage">
|
|
15355
15430
|
<xsl:with-param name="number" select="position()"/>
|
|
@@ -15813,6 +15888,18 @@
|
|
|
15813
15888
|
</xsl:attribute>
|
|
15814
15889
|
</xsl:template>
|
|
15815
15890
|
|
|
15891
|
+
<xsl:template name="insert_firstpage_id">
|
|
15892
|
+
<xsl:param name="num"/>
|
|
15893
|
+
<fo:wrapper role="artifact">
|
|
15894
|
+
<fo:block-container absolute-position="fixed" top="1mm">
|
|
15895
|
+
<xsl:if test="$num = 1">
|
|
15896
|
+
<xsl:attribute name="id">firstpage_id_0</xsl:attribute>
|
|
15897
|
+
</xsl:if>
|
|
15898
|
+
<fo:block id="firstpage_id_{$num}" role="SKIP"> </fo:block>
|
|
15899
|
+
</fo:block-container>
|
|
15900
|
+
</fo:wrapper>
|
|
15901
|
+
</xsl:template>
|
|
15902
|
+
|
|
15816
15903
|
<xsl:template name="getCharByCodePoint">
|
|
15817
15904
|
<xsl:param name="codepoint"/>
|
|
15818
15905
|
<xsl:param name="radix">16</xsl:param>
|
data/lib/relaton/render/parse.rb
CHANGED
|
@@ -5,9 +5,9 @@ module Relaton
|
|
|
5
5
|
def uri(doc)
|
|
6
6
|
uri = nil
|
|
7
7
|
%w(src).each do |t|
|
|
8
|
-
uri = doc.
|
|
8
|
+
uri = Array(doc.source).detect { |u| u.type == t } and break
|
|
9
9
|
end
|
|
10
|
-
uri ||= doc.
|
|
10
|
+
uri ||= Array(doc.source).first
|
|
11
11
|
return nil unless uri
|
|
12
12
|
|
|
13
13
|
uri.content.to_s
|
data/metanorma-iho.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
|
27
27
|
spec.require_paths = ["lib"]
|
|
28
28
|
spec.required_ruby_version = Gem::Requirement.new(">= 3.1.0")
|
|
29
29
|
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 3.3.
|
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 3.3.3"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "debug"
|
|
33
33
|
spec.add_development_dependency "equivalent-xml", "~> 0.6"
|
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.3.
|
|
4
|
+
version: 1.3.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: 2026-
|
|
11
|
+
date: 2026-04-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-generic
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.3.
|
|
19
|
+
version: 3.3.3
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.3.
|
|
26
|
+
version: 3.3.3
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: debug
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|