metanorma-iho 1.0.13 → 1.0.15
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 +176 -13
- data/lib/isodoc/iho/iho.standard.xsl +176 -13
- data/lib/isodoc/iho/presentation_xml_convert.rb +27 -0
- data/lib/metanorma/iho/biblio.rng +15 -9
- data/lib/metanorma/iho/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0561e6cbb1ff1586a4e0e3c5143cc7c87c48c7c5c5a7c230ab938f4f1141850f
|
4
|
+
data.tar.gz: a7a70da3cdb547116274144edb2494698522f268d9e4f129dec48a2e9603c3a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6660e7a259bb87be6c1256d35497929c920b9978b87e98ef9a275ef937b0f5ace36218c45a38d24b3d360d48d7bc2e3640a2882aac06a4ed67e524d3dc2b08ca
|
7
|
+
data.tar.gz: a45059fd657f642c498f44c3f647d6ecb084356d8362c90b7a7ce1099a9c5e205801200fea6bcfcfed715798aaf0c70476514f58153622aebc8ce2dca7c6658a
|
@@ -883,8 +883,21 @@
|
|
883
883
|
|
884
884
|
<!-- <xsl:strip-space elements="iho:xref"/> -->
|
885
885
|
|
886
|
-
<xsl:variable name="
|
887
|
-
|
886
|
+
<xsl:variable name="namespace_full_">
|
887
|
+
<xsl:choose>
|
888
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
889
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
890
|
+
</xsl:choose>
|
891
|
+
</xsl:variable>
|
892
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
893
|
+
|
894
|
+
<xsl:variable name="root_element_">
|
895
|
+
<xsl:choose>
|
896
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
897
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
898
|
+
</xsl:choose>
|
899
|
+
</xsl:variable>
|
900
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
888
901
|
|
889
902
|
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
890
903
|
|
@@ -2053,6 +2066,9 @@
|
|
2053
2066
|
|
2054
2067
|
</xsl:attribute-set>
|
2055
2068
|
|
2069
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
2070
|
+
</xsl:attribute-set>
|
2071
|
+
|
2056
2072
|
<xsl:attribute-set name="definition-style">
|
2057
2073
|
|
2058
2074
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -4292,7 +4308,9 @@
|
|
4292
4308
|
<xsl:with-param name="element">
|
4293
4309
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
4294
4310
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
4311
|
+
|
4295
4312
|
<xsl:copy-of select="$current_fn_number_text"/>
|
4313
|
+
|
4296
4314
|
</fo:inline>
|
4297
4315
|
</fo:basic-link>
|
4298
4316
|
</xsl:with-param>
|
@@ -4311,8 +4329,7 @@
|
|
4311
4329
|
|
4312
4330
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
4313
4331
|
|
4314
|
-
<
|
4315
|
-
|
4332
|
+
<xsl:variable name="fn_block">
|
4316
4333
|
<xsl:call-template name="refine_fn-body-style"/>
|
4317
4334
|
|
4318
4335
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -4320,9 +4337,15 @@
|
|
4320
4337
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
4321
4338
|
|
4322
4339
|
<xsl:value-of select="$current_fn_number_text"/>
|
4340
|
+
|
4323
4341
|
</fo:inline>
|
4324
4342
|
<xsl:apply-templates/>
|
4325
|
-
</
|
4343
|
+
</xsl:variable>
|
4344
|
+
|
4345
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
4346
|
+
<xsl:copy-of select="$fn_block"/>
|
4347
|
+
</fo:block>
|
4348
|
+
|
4326
4349
|
</fo:block-container>
|
4327
4350
|
</fo:footnote-body>
|
4328
4351
|
</fo:footnote>
|
@@ -5715,6 +5738,12 @@
|
|
5715
5738
|
</xsl:if>
|
5716
5739
|
</xsl:template>
|
5717
5740
|
|
5741
|
+
<xsl:template match="*[local-name()='strike']">
|
5742
|
+
<fo:inline text-decoration="line-through">
|
5743
|
+
<xsl:apply-templates/>
|
5744
|
+
</fo:inline>
|
5745
|
+
</xsl:template>
|
5746
|
+
|
5718
5747
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
5719
5748
|
<fo:block break-after="page"/>
|
5720
5749
|
<fo:block> </fo:block>
|
@@ -10427,14 +10456,17 @@
|
|
10427
10456
|
</fo:block>
|
10428
10457
|
</xsl:template>
|
10429
10458
|
|
10430
|
-
<xsl:template match="*[local-name() = 'domain']">
|
10459
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
10431
10460
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
10432
10461
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
10433
10462
|
<xsl:text> </xsl:text> -->
|
10434
|
-
<xsl:if test="not(@hidden = 'true')">
|
10463
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
10435
10464
|
<xsl:apply-templates/>
|
10436
10465
|
</xsl:if>
|
10437
|
-
</xsl:template>
|
10466
|
+
</xsl:template> -->
|
10467
|
+
|
10468
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
10469
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
10438
10470
|
|
10439
10471
|
<xsl:template match="*[local-name() = 'admitted']">
|
10440
10472
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -10449,9 +10481,11 @@
|
|
10449
10481
|
</xsl:template>
|
10450
10482
|
|
10451
10483
|
<xsl:template name="setStyle_preferred">
|
10452
|
-
|
10453
|
-
|
10454
|
-
|
10484
|
+
|
10485
|
+
<xsl:if test="*[local-name() = 'strong']">
|
10486
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
10487
|
+
</xsl:if>
|
10488
|
+
|
10455
10489
|
</xsl:template>
|
10456
10490
|
|
10457
10491
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -10461,6 +10495,17 @@
|
|
10461
10495
|
</xsl:template>
|
10462
10496
|
<!-- End Preferred, admitted, deprecated -->
|
10463
10497
|
|
10498
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
10499
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
10500
|
+
<xsl:apply-templates/>
|
10501
|
+
</fo:block>
|
10502
|
+
</xsl:template>
|
10503
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
10504
|
+
<fo:block>
|
10505
|
+
<xsl:apply-templates/>
|
10506
|
+
</fo:block>
|
10507
|
+
</xsl:template>
|
10508
|
+
|
10464
10509
|
<!-- ========== -->
|
10465
10510
|
<!-- definition -->
|
10466
10511
|
<!-- ========== -->
|
@@ -11361,6 +11406,7 @@
|
|
11361
11406
|
|
11362
11407
|
<!-- Normative references -->
|
11363
11408
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
11409
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11364
11410
|
|
11365
11411
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-normative-list-style">
|
11366
11412
|
|
@@ -12082,7 +12128,8 @@
|
|
12082
12128
|
<!-- add @id - first element with @id plus '_element_name' -->
|
12083
12129
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
12084
12130
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
12085
|
-
<xsl:
|
12131
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
12132
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
12086
12133
|
</xsl:if>
|
12087
12134
|
</xsl:template>
|
12088
12135
|
|
@@ -12139,6 +12186,31 @@
|
|
12139
12186
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
12140
12187
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
12141
12188
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
12189
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
12190
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
12191
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
12192
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
12193
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
12194
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
12195
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
12196
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
12197
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
12198
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
12199
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
12200
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
12201
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
12202
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
12203
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
12204
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
12205
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
12206
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
12207
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
12208
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
12209
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
12210
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
12211
|
+
|
12212
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
12213
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
12142
12214
|
|
12143
12215
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
12144
12216
|
<xsl:copy>
|
@@ -12183,6 +12255,94 @@
|
|
12183
12255
|
</xsl:element>
|
12184
12256
|
</xsl:template>
|
12185
12257
|
|
12258
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
12259
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
12260
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12261
|
+
</xsl:template>
|
12262
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
12263
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
12264
|
+
<xsl:copy-of select="@*"/>
|
12265
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12266
|
+
</xsl:element>
|
12267
|
+
</xsl:template>
|
12268
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
12269
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12270
|
+
</xsl:template>
|
12271
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
12272
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
12273
|
+
<xsl:copy-of select="@*"/>
|
12274
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12275
|
+
</xsl:element>
|
12276
|
+
</xsl:template>
|
12277
|
+
|
12278
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
12279
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
12280
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12281
|
+
</xsl:template>
|
12282
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
12283
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
12284
|
+
<xsl:copy-of select="@*"/>
|
12285
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12286
|
+
</xsl:element>
|
12287
|
+
</xsl:template>
|
12288
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
12289
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12290
|
+
</xsl:template>
|
12291
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
12292
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
12293
|
+
<xsl:copy-of select="@*"/>
|
12294
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12295
|
+
</xsl:element>
|
12296
|
+
</xsl:template>
|
12297
|
+
|
12298
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
12299
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
12300
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12301
|
+
</xsl:template>
|
12302
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
12303
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
12304
|
+
<xsl:copy-of select="@*"/>
|
12305
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12306
|
+
</xsl:element>
|
12307
|
+
</xsl:template>
|
12308
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
12309
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12310
|
+
</xsl:template>
|
12311
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
12312
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
12313
|
+
<xsl:copy-of select="@*"/>
|
12314
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12315
|
+
</xsl:element>
|
12316
|
+
</xsl:template>
|
12317
|
+
|
12318
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
12319
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
12320
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
12321
|
+
<xsl:copy-of select="@*"/>
|
12322
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12323
|
+
</xsl:element>
|
12324
|
+
</xsl:template>
|
12325
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
12326
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
12327
|
+
<xsl:copy-of select="@*"/>
|
12328
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12329
|
+
</xsl:element>
|
12330
|
+
</xsl:template>
|
12331
|
+
|
12332
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
12333
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
12334
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
12335
|
+
<xsl:copy-of select="@*"/>
|
12336
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12337
|
+
</xsl:element>
|
12338
|
+
</xsl:template>
|
12339
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
12340
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
12341
|
+
<xsl:copy-of select="@*"/>
|
12342
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12343
|
+
</xsl:element>
|
12344
|
+
</xsl:template>
|
12345
|
+
|
12186
12346
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
12187
12347
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12188
12348
|
</xsl:template>
|
@@ -13314,7 +13474,7 @@
|
|
13314
13474
|
</xsl:template>
|
13315
13475
|
|
13316
13476
|
<xsl:template name="namespaceCheck">
|
13317
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
13477
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
13318
13478
|
<xsl:variable name="XSLNS">
|
13319
13479
|
|
13320
13480
|
<xsl:value-of select="document('')//*/namespace::iho"/>
|
@@ -13404,6 +13564,9 @@
|
|
13404
13564
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
13405
13565
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13406
13566
|
</xsl:when>
|
13567
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
13568
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13569
|
+
</xsl:when>
|
13407
13570
|
<xsl:when test="$formatted = 'true'">
|
13408
13571
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13409
13572
|
</xsl:when>
|
@@ -883,8 +883,21 @@
|
|
883
883
|
|
884
884
|
<!-- <xsl:strip-space elements="iho:xref"/> -->
|
885
885
|
|
886
|
-
<xsl:variable name="
|
887
|
-
|
886
|
+
<xsl:variable name="namespace_full_">
|
887
|
+
<xsl:choose>
|
888
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="namespace-uri(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
889
|
+
<xsl:otherwise><xsl:value-of select="namespace-uri(/*)"/></xsl:otherwise><!-- example: https://www.metanorma.org/ns/iso -->
|
890
|
+
</xsl:choose>
|
891
|
+
</xsl:variable>
|
892
|
+
<xsl:variable name="namespace_full" select="normalize-space($namespace_full_)"/>
|
893
|
+
|
894
|
+
<xsl:variable name="root_element_">
|
895
|
+
<xsl:choose>
|
896
|
+
<xsl:when test="local-name(/*) = 'metanorma-collection'"><xsl:value-of select="local-name(//*[contains(local-name(), '-standard')][1])"/></xsl:when>
|
897
|
+
<xsl:otherwise><xsl:value-of select="local-name(/*)"/></xsl:otherwise><!-- example: iso-standard -->
|
898
|
+
</xsl:choose>
|
899
|
+
</xsl:variable>
|
900
|
+
<xsl:variable name="root_element" select="normalize-space($root_element_)"/>
|
888
901
|
|
889
902
|
<xsl:variable name="document_scheme" select="normalize-space(//*[contains(local-name(), '-standard')]/*[local-name() = 'metanorma-extension']/*[local-name() = 'presentation-metadata'][*[local-name() = 'name'] = 'document-scheme']/*[local-name() = 'value'])"/>
|
890
903
|
|
@@ -2053,6 +2066,9 @@
|
|
2053
2066
|
|
2054
2067
|
</xsl:attribute-set>
|
2055
2068
|
|
2069
|
+
<xsl:attribute-set name="related-block-style" use-attribute-sets="preferred-block-style">
|
2070
|
+
</xsl:attribute-set>
|
2071
|
+
|
2056
2072
|
<xsl:attribute-set name="definition-style">
|
2057
2073
|
|
2058
2074
|
<xsl:attribute name="margin-bottom">6pt</xsl:attribute>
|
@@ -4292,7 +4308,9 @@
|
|
4292
4308
|
<xsl:with-param name="element">
|
4293
4309
|
<fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
|
4294
4310
|
<fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
|
4311
|
+
|
4295
4312
|
<xsl:copy-of select="$current_fn_number_text"/>
|
4313
|
+
|
4296
4314
|
</fo:inline>
|
4297
4315
|
</fo:basic-link>
|
4298
4316
|
</xsl:with-param>
|
@@ -4311,8 +4329,7 @@
|
|
4311
4329
|
|
4312
4330
|
<fo:block-container xsl:use-attribute-sets="fn-container-body-style" role="SKIP">
|
4313
4331
|
|
4314
|
-
<
|
4315
|
-
|
4332
|
+
<xsl:variable name="fn_block">
|
4316
4333
|
<xsl:call-template name="refine_fn-body-style"/>
|
4317
4334
|
|
4318
4335
|
<fo:inline id="{$ref_id}" xsl:use-attribute-sets="fn-body-num-style" role="Lbl">
|
@@ -4320,9 +4337,15 @@
|
|
4320
4337
|
<xsl:call-template name="refine_fn-body-num-style"/>
|
4321
4338
|
|
4322
4339
|
<xsl:value-of select="$current_fn_number_text"/>
|
4340
|
+
|
4323
4341
|
</fo:inline>
|
4324
4342
|
<xsl:apply-templates/>
|
4325
|
-
</
|
4343
|
+
</xsl:variable>
|
4344
|
+
|
4345
|
+
<fo:block xsl:use-attribute-sets="fn-body-style" role="SKIP">
|
4346
|
+
<xsl:copy-of select="$fn_block"/>
|
4347
|
+
</fo:block>
|
4348
|
+
|
4326
4349
|
</fo:block-container>
|
4327
4350
|
</fo:footnote-body>
|
4328
4351
|
</fo:footnote>
|
@@ -5715,6 +5738,12 @@
|
|
5715
5738
|
</xsl:if>
|
5716
5739
|
</xsl:template>
|
5717
5740
|
|
5741
|
+
<xsl:template match="*[local-name()='strike']">
|
5742
|
+
<fo:inline text-decoration="line-through">
|
5743
|
+
<xsl:apply-templates/>
|
5744
|
+
</fo:inline>
|
5745
|
+
</xsl:template>
|
5746
|
+
|
5718
5747
|
<xsl:template match="*[local-name() = 'pagebreak']">
|
5719
5748
|
<fo:block break-after="page"/>
|
5720
5749
|
<fo:block> </fo:block>
|
@@ -10427,14 +10456,17 @@
|
|
10427
10456
|
</fo:block>
|
10428
10457
|
</xsl:template>
|
10429
10458
|
|
10430
|
-
<xsl:template match="*[local-name() = 'domain']">
|
10459
|
+
<!-- <xsl:template match="*[local-name() = 'domain']"> -->
|
10431
10460
|
<!-- https://github.com/metanorma/isodoc/issues/607
|
10432
10461
|
<fo:inline xsl:use-attribute-sets="domain-style"><<xsl:apply-templates/>></fo:inline>
|
10433
10462
|
<xsl:text> </xsl:text> -->
|
10434
|
-
<xsl:if test="not(@hidden = 'true')">
|
10463
|
+
<!-- <xsl:if test="not(@hidden = 'true')">
|
10435
10464
|
<xsl:apply-templates/>
|
10436
10465
|
</xsl:if>
|
10437
|
-
</xsl:template>
|
10466
|
+
</xsl:template> -->
|
10467
|
+
|
10468
|
+
<!-- https://github.com/metanorma/isodoc/issues/632#issuecomment-2567163931 -->
|
10469
|
+
<xsl:template match="*[local-name() = 'domain']"/>
|
10438
10470
|
|
10439
10471
|
<xsl:template match="*[local-name() = 'admitted']">
|
10440
10472
|
<fo:block xsl:use-attribute-sets="admitted-style">
|
@@ -10449,9 +10481,11 @@
|
|
10449
10481
|
</xsl:template>
|
10450
10482
|
|
10451
10483
|
<xsl:template name="setStyle_preferred">
|
10452
|
-
|
10453
|
-
|
10454
|
-
|
10484
|
+
|
10485
|
+
<xsl:if test="*[local-name() = 'strong']">
|
10486
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
10487
|
+
</xsl:if>
|
10488
|
+
|
10455
10489
|
</xsl:template>
|
10456
10490
|
|
10457
10491
|
<!-- regarding ISO 10241-1:2011, If there is more than one preferred term, each preferred term follows the previous one on a new line. -->
|
@@ -10461,6 +10495,17 @@
|
|
10461
10495
|
</xsl:template>
|
10462
10496
|
<!-- End Preferred, admitted, deprecated -->
|
10463
10497
|
|
10498
|
+
<xsl:template match="*[local-name() = 'fmt-related']">
|
10499
|
+
<fo:block role="SKIP" xsl:use-attribute-sets="related-block-style">
|
10500
|
+
<xsl:apply-templates/>
|
10501
|
+
</fo:block>
|
10502
|
+
</xsl:template>
|
10503
|
+
<xsl:template match="*[local-name() = 'fmt-related']/*[local-name() = 'p']" priority="4">
|
10504
|
+
<fo:block>
|
10505
|
+
<xsl:apply-templates/>
|
10506
|
+
</fo:block>
|
10507
|
+
</xsl:template>
|
10508
|
+
|
10464
10509
|
<!-- ========== -->
|
10465
10510
|
<!-- definition -->
|
10466
10511
|
<!-- ========== -->
|
@@ -11361,6 +11406,7 @@
|
|
11361
11406
|
|
11362
11407
|
<!-- Normative references -->
|
11363
11408
|
<xsl:template match="*[local-name() = 'references'][@normative='true']/*[local-name() = 'bibitem']" name="bibitem" priority="2">
|
11409
|
+
<xsl:param name="skip" select="normalize-space(preceding-sibling::*[1][local-name() = 'bibitem'] and 1 = 1)"/> <!-- current bibiitem is non-first -->
|
11364
11410
|
|
11365
11411
|
<fo:list-block id="{@id}" xsl:use-attribute-sets="bibitem-normative-list-style">
|
11366
11412
|
|
@@ -12082,7 +12128,8 @@
|
|
12082
12128
|
<!-- add @id - first element with @id plus '_element_name' -->
|
12083
12129
|
<xsl:variable name="prefix_id_" select="(.//*[@id])[1]/@id"/>
|
12084
12130
|
<xsl:variable name="prefix_id"><xsl:value-of select="$prefix_id_"/><xsl:if test="normalize-space($prefix_id_) = ''"><xsl:value-of select="generate-id()"/></xsl:if></xsl:variable>
|
12085
|
-
<xsl:
|
12131
|
+
<xsl:variable name="document_suffix" select="ancestor::*[contains(local-name(), '-standard')]/@document_suffix"/>
|
12132
|
+
<xsl:attribute name="id"><xsl:value-of select="concat($prefix_id, '_', local-name(), '_', $document_suffix)"/></xsl:attribute>
|
12086
12133
|
</xsl:if>
|
12087
12134
|
</xsl:template>
|
12088
12135
|
|
@@ -12139,6 +12186,31 @@
|
|
12139
12186
|
<xsl:template match="*[local-name() = 'name'][following-sibling::*[1][local-name() = 'fmt-name']]" mode="update_xml_pres"/>
|
12140
12187
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_step1"/>
|
12141
12188
|
<xsl:template match="*[local-name() = 'section-title'][following-sibling::*[1][local-name() = 'p'][@type = 'section-title' or @type = 'floating-title']]" mode="update_xml_pres"/>
|
12189
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_step1"/> -->
|
12190
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_step1"/>
|
12191
|
+
<!-- <xsl:template match="*[local-name() = 'preferred'][following-sibling::*[not(local-name() = 'preferred')][1][local-name() = 'fmt-preferred']]" mode="update_xml_pres"/> -->
|
12192
|
+
<xsl:template match="*[local-name() = 'preferred']" mode="update_xml_pres"/>
|
12193
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_step1"/> -->
|
12194
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_step1"/>
|
12195
|
+
<!-- <xsl:template match="*[local-name() = 'admitted'][following-sibling::*[not(local-name() = 'admitted')][1][local-name() = 'fmt-admitted']]" mode="update_xml_pres"/> -->
|
12196
|
+
<xsl:template match="*[local-name() = 'admitted']" mode="update_xml_pres"/>
|
12197
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_step1"/> -->
|
12198
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_step1"/>
|
12199
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_step1"/>
|
12200
|
+
<!-- <xsl:template match="*[local-name() = 'deprecates'][following-sibling::*[not(local-name() = 'deprecates')][1][local-name() = 'fmt-deprecates']]" mode="update_xml_pres"/> -->
|
12201
|
+
<xsl:template match="*[local-name() = 'deprecates']" mode="update_xml_pres"/>
|
12202
|
+
<xsl:template match="*[local-name() = 'related']" mode="update_xml_pres"/>
|
12203
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_step1"/> -->
|
12204
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_step1"/>
|
12205
|
+
<!-- <xsl:template match="*[local-name() = 'definition'][following-sibling::*[1][local-name() = 'fmt-definition']]" mode="update_xml_pres"/> -->
|
12206
|
+
<xsl:template match="*[local-name() = 'definition']" mode="update_xml_pres"/>
|
12207
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_step1"/> -->
|
12208
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_step1"/>
|
12209
|
+
<!-- <xsl:template match="*[local-name() = 'termsource'][following-sibling::*[1][local-name() = 'fmt-termsource']]" mode="update_xml_pres"/> -->
|
12210
|
+
<xsl:template match="*[local-name() = 'termsource']" mode="update_xml_pres"/>
|
12211
|
+
|
12212
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_step1"/>
|
12213
|
+
<xsl:template match="*[local-name() = 'term'][@unnumbered = 'true'][not(.//*[starts-with(local-name(), 'fmt-')])]" mode="update_xml_pres"/>
|
12142
12214
|
|
12143
12215
|
<xsl:template match="*[local-name() = 'p'][@type = 'section-title' or @type = 'floating-title'][preceding-sibling::*[1][local-name() = 'section-title']]" mode="update_xml_step1">
|
12144
12216
|
<xsl:copy>
|
@@ -12183,6 +12255,94 @@
|
|
12183
12255
|
</xsl:element>
|
12184
12256
|
</xsl:template>
|
12185
12257
|
|
12258
|
+
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
12259
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
12260
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12261
|
+
</xsl:template>
|
12262
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_step1">
|
12263
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
12264
|
+
<xsl:copy-of select="@*"/>
|
12265
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12266
|
+
</xsl:element>
|
12267
|
+
</xsl:template>
|
12268
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_pres">
|
12269
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12270
|
+
</xsl:template>
|
12271
|
+
<xsl:template match="*[local-name() = 'fmt-preferred'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-preferred']/*[local-name() = 'p']" mode="update_xml_pres">
|
12272
|
+
<xsl:element name="preferred" namespace="{$namespace_full}">
|
12273
|
+
<xsl:copy-of select="@*"/>
|
12274
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12275
|
+
</xsl:element>
|
12276
|
+
</xsl:template>
|
12277
|
+
|
12278
|
+
<xsl:template match="*[local-name() = 'fmt-admitted']"/>
|
12279
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_step1">
|
12280
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12281
|
+
</xsl:template>
|
12282
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_step1">
|
12283
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
12284
|
+
<xsl:copy-of select="@*"/>
|
12285
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12286
|
+
</xsl:element>
|
12287
|
+
</xsl:template>
|
12288
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][*[local-name() = 'p']]" mode="update_xml_pres">
|
12289
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12290
|
+
</xsl:template>
|
12291
|
+
<xsl:template match="*[local-name() = 'fmt-admitted'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-admitted']/*[local-name() = 'p']" mode="update_xml_pres">
|
12292
|
+
<xsl:element name="admitted" namespace="{$namespace_full}">
|
12293
|
+
<xsl:copy-of select="@*"/>
|
12294
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12295
|
+
</xsl:element>
|
12296
|
+
</xsl:template>
|
12297
|
+
|
12298
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates']"/>
|
12299
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_step1">
|
12300
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12301
|
+
</xsl:template>
|
12302
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_step1">
|
12303
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
12304
|
+
<xsl:copy-of select="@*"/>
|
12305
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12306
|
+
</xsl:element>
|
12307
|
+
</xsl:template>
|
12308
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][*[local-name() = 'p']]" mode="update_xml_pres">
|
12309
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12310
|
+
</xsl:template>
|
12311
|
+
<xsl:template match="*[local-name() = 'fmt-deprecates'][not(*[local-name() = 'p'])] | *[local-name() = 'fmt-deprecates']/*[local-name() = 'p']" mode="update_xml_pres">
|
12312
|
+
<xsl:element name="deprecates" namespace="{$namespace_full}">
|
12313
|
+
<xsl:copy-of select="@*"/>
|
12314
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12315
|
+
</xsl:element>
|
12316
|
+
</xsl:template>
|
12317
|
+
|
12318
|
+
<xsl:template match="*[local-name() = 'fmt-definition']"/>
|
12319
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_step1">
|
12320
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
12321
|
+
<xsl:copy-of select="@*"/>
|
12322
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12323
|
+
</xsl:element>
|
12324
|
+
</xsl:template>
|
12325
|
+
<xsl:template match="*[local-name() = 'fmt-definition']" mode="update_xml_pres">
|
12326
|
+
<xsl:element name="definition" namespace="{$namespace_full}">
|
12327
|
+
<xsl:copy-of select="@*"/>
|
12328
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12329
|
+
</xsl:element>
|
12330
|
+
</xsl:template>
|
12331
|
+
|
12332
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']"/>
|
12333
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_step1">
|
12334
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
12335
|
+
<xsl:copy-of select="@*"/>
|
12336
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
12337
|
+
</xsl:element>
|
12338
|
+
</xsl:template>
|
12339
|
+
<xsl:template match="*[local-name() = 'fmt-termsource']" mode="update_xml_pres">
|
12340
|
+
<xsl:element name="termsource" namespace="{$namespace_full}">
|
12341
|
+
<xsl:copy-of select="@*"/>
|
12342
|
+
<xsl:apply-templates mode="update_xml_pres"/>
|
12343
|
+
</xsl:element>
|
12344
|
+
</xsl:template>
|
12345
|
+
|
12186
12346
|
<xsl:template match="*[local-name() = 'span'][ @class = 'fmt-caption-label' or @class = 'fmt-element-name' or @class = 'fmt-caption-delim' or @class = 'fmt-autonum-delim']" mode="update_xml_step1" priority="3">
|
12187
12347
|
<xsl:apply-templates mode="update_xml_step1"/>
|
12188
12348
|
</xsl:template>
|
@@ -13314,7 +13474,7 @@
|
|
13314
13474
|
</xsl:template>
|
13315
13475
|
|
13316
13476
|
<xsl:template name="namespaceCheck">
|
13317
|
-
<xsl:variable name="documentNS" select="namespace-uri(/*)
|
13477
|
+
<xsl:variable name="documentNS" select="$namespace_full"/> <!-- namespace-uri(/*) -->
|
13318
13478
|
<xsl:variable name="XSLNS">
|
13319
13479
|
|
13320
13480
|
<xsl:value-of select="document('')//*/namespace::iho"/>
|
@@ -13404,6 +13564,9 @@
|
|
13404
13564
|
<xsl:when test="$formatted = 'true' and string-length($bibdata_updated) != ''">
|
13405
13565
|
<xsl:apply-templates select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13406
13566
|
</xsl:when>
|
13567
|
+
<xsl:when test="string-length($bibdata_updated) != ''">
|
13568
|
+
<xsl:value-of select="xalan:nodeset($bibdata_updated)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13569
|
+
</xsl:when>
|
13407
13570
|
<xsl:when test="$formatted = 'true'">
|
13408
13571
|
<xsl:apply-templates select="xalan:nodeset($bibdata)//*[local-name() = 'localized-string'][@key = $key and @language = $curr_lang]"/>
|
13409
13572
|
</xsl:when>
|
@@ -124,6 +124,7 @@ _bib)
|
|
124
124
|
|
125
125
|
def term1(elem); end
|
126
126
|
|
127
|
+
# KILL
|
127
128
|
def termsource1(elem)
|
128
129
|
elem.parent.nil? and return
|
129
130
|
while elem&.next_element&.name == "termsource"
|
@@ -135,6 +136,32 @@ _bib)
|
|
135
136
|
defn.elements.last << s
|
136
137
|
end
|
137
138
|
|
139
|
+
def termsource1(elem)
|
140
|
+
elem.parent.nil? and return
|
141
|
+
super
|
142
|
+
end
|
143
|
+
|
144
|
+
def termsource_label(elem, sources)
|
145
|
+
elem.at("./ancestor::xmlns:term") or return
|
146
|
+
elem.replace(l10n("[#{sources}]"))
|
147
|
+
end
|
148
|
+
|
149
|
+
def termcleanup(docxml)
|
150
|
+
collapse_term docxml
|
151
|
+
super
|
152
|
+
end
|
153
|
+
|
154
|
+
def collapse_term(docxml)
|
155
|
+
docxml.xpath(ns("//term")).each { |t| collapse_term1(t) }
|
156
|
+
end
|
157
|
+
|
158
|
+
def collapse_term1(term)
|
159
|
+
defn = term.at(ns("./fmt-definition")) or return
|
160
|
+
source = term.at(ns("./fmt-termsource")) or return
|
161
|
+
defn.elements.last << source.children
|
162
|
+
source.remove
|
163
|
+
end
|
164
|
+
|
138
165
|
def clausedelim
|
139
166
|
""
|
140
167
|
end
|
@@ -267,11 +267,11 @@ Detailed in https://www.relaton.org/model/creator/</a:documentation>
|
|
267
267
|
<a:documentation>An identifier of the person according to an international identifier scheme</a:documentation>
|
268
268
|
</ref>
|
269
269
|
</zeroOrMore>
|
270
|
-
<
|
270
|
+
<optional>
|
271
271
|
<ref name="contact">
|
272
272
|
<a:documentation>Contact information for the person, including URI, address, phone number, and email</a:documentation>
|
273
273
|
</ref>
|
274
|
-
</
|
274
|
+
</optional>
|
275
275
|
</element>
|
276
276
|
</define>
|
277
277
|
<define name="fullname">
|
@@ -454,11 +454,11 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
454
454
|
<a:documentation>An identifier of the organization according to an international identifier scheme</a:documentation>
|
455
455
|
</ref>
|
456
456
|
</zeroOrMore>
|
457
|
-
<
|
457
|
+
<optional>
|
458
458
|
<ref name="contact">
|
459
459
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
460
460
|
</ref>
|
461
|
-
</
|
461
|
+
</optional>
|
462
462
|
<optional>
|
463
463
|
<ref name="logo">
|
464
464
|
<a:documentation>A logo for the organization</a:documentation>
|
@@ -540,12 +540,18 @@ real names (if the person is named with a pseudonym or user name); previous lega
|
|
540
540
|
<!-- TODO may change -->
|
541
541
|
<define name="contact">
|
542
542
|
<a:documentation>Contact information for a person or organization</a:documentation>
|
543
|
-
<
|
543
|
+
<zeroOrMore>
|
544
544
|
<ref name="address"/>
|
545
|
+
</zeroOrMore>
|
546
|
+
<zeroOrMore>
|
545
547
|
<ref name="phone"/>
|
548
|
+
</zeroOrMore>
|
549
|
+
<zeroOrMore>
|
546
550
|
<ref name="email"/>
|
551
|
+
</zeroOrMore>
|
552
|
+
<zeroOrMore>
|
547
553
|
<ref name="uri"/>
|
548
|
-
</
|
554
|
+
</zeroOrMore>
|
549
555
|
</define>
|
550
556
|
<define name="phone">
|
551
557
|
<a:documentation>The phone number associated with a person or organization</a:documentation>
|
@@ -1271,17 +1277,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
1271
1277
|
</define>
|
1272
1278
|
<define name="validityBegins">
|
1273
1279
|
<element name="validityBegins">
|
1274
|
-
<ref name="
|
1280
|
+
<ref name="ISO8601Date"/>
|
1275
1281
|
</element>
|
1276
1282
|
</define>
|
1277
1283
|
<define name="validityEnds">
|
1278
1284
|
<element name="validityEnds">
|
1279
|
-
<ref name="
|
1285
|
+
<ref name="ISO8601Date"/>
|
1280
1286
|
</element>
|
1281
1287
|
</define>
|
1282
1288
|
<define name="validityRevision">
|
1283
1289
|
<element name="revision">
|
1284
|
-
<ref name="
|
1290
|
+
<ref name="ISO8601Date"/>
|
1285
1291
|
</element>
|
1286
1292
|
</define>
|
1287
1293
|
<define name="TypedTitleString">
|
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.0.
|
4
|
+
version: 1.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|
@@ -245,7 +245,7 @@ homepage: https://github.com/metanorma/metanorma-iho
|
|
245
245
|
licenses:
|
246
246
|
- BSD-2-Clause
|
247
247
|
metadata: {}
|
248
|
-
post_install_message:
|
248
|
+
post_install_message:
|
249
249
|
rdoc_options: []
|
250
250
|
require_paths:
|
251
251
|
- lib
|
@@ -261,7 +261,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
261
261
|
version: '0'
|
262
262
|
requirements: []
|
263
263
|
rubygems_version: 3.3.27
|
264
|
-
signing_key:
|
264
|
+
signing_key:
|
265
265
|
specification_version: 4
|
266
266
|
summary: metanorma-iho lets you write IHO in AsciiDoc.
|
267
267
|
test_files: []
|