metanorma-iho 0.9.0 → 0.9.2
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 +103 -16
- data/lib/isodoc/iho/iho.standard.xsl +103 -16
- data/lib/metanorma/iho/basicdoc.rng +3 -0
- data/lib/metanorma/iho/isodoc.rng +4 -1
- data/lib/metanorma/iho/version.rb +1 -1
- 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: 0240fc0c1d870d0b31ef54d36f29b6bfa56de1874540d7f1d5987dd032a665eb
|
4
|
+
data.tar.gz: c229c3681aa0630c8ac3304ec54314652640465f1d3acaf532bc72d393b0bd2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d919916a3e7cca4b9a074e55b2d43e58e19d7f24ead704468a8e76761ab3d1a72ac303354019acd3868cf6a1b1e8ddd9290e62e747f390681544bd7aa915dfcf
|
7
|
+
data.tar.gz: 0ae84f1f4b86f685cf504be996c72add22eba009a10b199c97f28515ae197f0010b9bb26fc0bc836326dfd0f0c3be351b2a7fcfbe257e55fd6eb426e85f354ca
|
@@ -1359,6 +1359,10 @@
|
|
1359
1359
|
|
1360
1360
|
</xsl:attribute-set>
|
1361
1361
|
|
1362
|
+
<xsl:template name="refine_termexample-style">
|
1363
|
+
|
1364
|
+
</xsl:template>
|
1365
|
+
|
1362
1366
|
<xsl:attribute-set name="example-style">
|
1363
1367
|
|
1364
1368
|
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
@@ -2480,6 +2484,36 @@
|
|
2480
2484
|
</xsl:for-each>
|
2481
2485
|
</xsl:template>
|
2482
2486
|
|
2487
|
+
<xsl:template name="processMainSectionsDefault_flatxml">
|
2488
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2489
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2490
|
+
<xsl:variable name="flatxml">
|
2491
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2492
|
+
</xsl:variable>
|
2493
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2494
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2495
|
+
|
2496
|
+
</xsl:for-each>
|
2497
|
+
|
2498
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2499
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2500
|
+
<xsl:variable name="flatxml">
|
2501
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2502
|
+
</xsl:variable>
|
2503
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2504
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2505
|
+
</xsl:for-each>
|
2506
|
+
|
2507
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2508
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2509
|
+
<xsl:variable name="flatxml">
|
2510
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2511
|
+
</xsl:variable>
|
2512
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2513
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2514
|
+
</xsl:for-each>
|
2515
|
+
</xsl:template>
|
2516
|
+
|
2483
2517
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
2484
2518
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
2485
2519
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
@@ -2606,7 +2640,9 @@
|
|
2606
2640
|
</xsl:template> <!-- license-statement/p -->
|
2607
2641
|
|
2608
2642
|
<xsl:template match="*[local-name()='legal-statement']">
|
2643
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
2609
2644
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2645
|
+
|
2610
2646
|
<xsl:apply-templates/>
|
2611
2647
|
</fo:block>
|
2612
2648
|
</xsl:template> <!-- legal-statement -->
|
@@ -4559,13 +4595,13 @@
|
|
4559
4595
|
<tr>
|
4560
4596
|
<td>
|
4561
4597
|
<xsl:attribute name="id">
|
4562
|
-
<xsl:value-of select="concat($id,'
|
4598
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
|
4563
4599
|
</xsl:attribute>
|
4564
4600
|
<xsl:apply-templates/>
|
4565
4601
|
</td>
|
4566
4602
|
<td>
|
4567
4603
|
<xsl:attribute name="id">
|
4568
|
-
<xsl:value-of select="concat($id,'
|
4604
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
|
4569
4605
|
</xsl:attribute>
|
4570
4606
|
|
4571
4607
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
@@ -4875,13 +4911,14 @@
|
|
4875
4911
|
<!-- ================= -->
|
4876
4912
|
<!-- Added,deleted text -->
|
4877
4913
|
<!-- ================= -->
|
4878
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
4914
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
4879
4915
|
<xsl:param name="skip">true</xsl:param>
|
4880
4916
|
<xsl:param name="block">false</xsl:param>
|
4881
4917
|
<xsl:param name="type"/>
|
4882
4918
|
<xsl:param name="text-align"/>
|
4883
4919
|
<xsl:choose>
|
4884
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
4920
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
4921
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4885
4922
|
<xsl:choose>
|
4886
4923
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4887
4924
|
<xsl:otherwise>
|
@@ -4889,12 +4926,32 @@
|
|
4889
4926
|
<xsl:call-template name="insertTag">
|
4890
4927
|
<xsl:with-param name="type">
|
4891
4928
|
<xsl:choose>
|
4929
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
4930
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
4892
4931
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4893
4932
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4894
4933
|
</xsl:choose>
|
4895
4934
|
</xsl:with-param>
|
4896
|
-
<xsl:with-param name="kind"
|
4897
|
-
|
4935
|
+
<xsl:with-param name="kind">
|
4936
|
+
<xsl:choose>
|
4937
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4938
|
+
<xsl:value-of select="text()"/>
|
4939
|
+
</xsl:when>
|
4940
|
+
<xsl:otherwise>
|
4941
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4942
|
+
</xsl:otherwise>
|
4943
|
+
</xsl:choose>
|
4944
|
+
</xsl:with-param>
|
4945
|
+
<xsl:with-param name="value">
|
4946
|
+
<xsl:choose>
|
4947
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4948
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
4949
|
+
</xsl:when>
|
4950
|
+
<xsl:otherwise>
|
4951
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4952
|
+
</xsl:otherwise>
|
4953
|
+
</xsl:choose>
|
4954
|
+
</xsl:with-param>
|
4898
4955
|
</xsl:call-template>
|
4899
4956
|
</xsl:variable>
|
4900
4957
|
<xsl:choose>
|
@@ -5225,6 +5282,10 @@
|
|
5225
5282
|
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5226
5283
|
</xsl:template>
|
5227
5284
|
|
5285
|
+
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
5286
|
+
<xsl:value-of select="."/>
|
5287
|
+
</xsl:template>
|
5288
|
+
|
5228
5289
|
<!-- ========================= -->
|
5229
5290
|
<!-- END Rich text formatting -->
|
5230
5291
|
<!-- ========================= -->
|
@@ -5855,7 +5916,7 @@
|
|
5855
5916
|
</xsl:choose>
|
5856
5917
|
</xsl:variable>
|
5857
5918
|
<xsl:attribute name="id">
|
5858
|
-
<xsl:value-of select="concat($id,'
|
5919
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
|
5859
5920
|
</xsl:attribute>
|
5860
5921
|
|
5861
5922
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -5863,7 +5924,7 @@
|
|
5863
5924
|
<xsl:copy-of select="@*"/>
|
5864
5925
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
5865
5926
|
<xsl:attribute name="id">
|
5866
|
-
<xsl:value-of select="concat($id,'
|
5927
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
5867
5928
|
</xsl:attribute>
|
5868
5929
|
|
5869
5930
|
<!-- <xsl:copy-of select="node()" /> -->
|
@@ -5927,7 +5988,7 @@
|
|
5927
5988
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
5928
5989
|
<xsl:copy>
|
5929
5990
|
<xsl:attribute name="id">
|
5930
|
-
<xsl:value-of select="concat($id,'
|
5991
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
5931
5992
|
</xsl:attribute>
|
5932
5993
|
<xsl:copy-of select="node()"/>
|
5933
5994
|
</xsl:copy>
|
@@ -7171,11 +7232,17 @@
|
|
7171
7232
|
</xsl:when>
|
7172
7233
|
<xsl:otherwise>
|
7173
7234
|
|
7235
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7236
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7237
|
+
|
7174
7238
|
<xsl:variable name="element">
|
7175
7239
|
<xsl:choose>
|
7176
7240
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
7177
7241
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7178
7242
|
</xsl:when>
|
7243
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7244
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7245
|
+
</xsl:when>
|
7179
7246
|
<xsl:otherwise>
|
7180
7247
|
<fo:block xsl:use-attribute-sets="image-style">
|
7181
7248
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -7191,10 +7258,24 @@
|
|
7191
7258
|
<xsl:copy-of select="@*"/>
|
7192
7259
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
7193
7260
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
7194
|
-
|
7195
|
-
|
7196
|
-
|
7197
|
-
|
7261
|
+
|
7262
|
+
<xsl:choose>
|
7263
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7264
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7265
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7266
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7267
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7268
|
+
</xsl:if>
|
7269
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7270
|
+
</xsl:when>
|
7271
|
+
<xsl:otherwise>
|
7272
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7273
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7274
|
+
</xsl:if>
|
7275
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7276
|
+
</xsl:otherwise>
|
7277
|
+
</xsl:choose>
|
7278
|
+
|
7198
7279
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7199
7280
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7200
7281
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -8709,7 +8790,7 @@
|
|
8709
8790
|
<!-- ====== -->
|
8710
8791
|
<xsl:template match="*[local-name() = 'termexample']">
|
8711
8792
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
8712
|
-
|
8793
|
+
<xsl:call-template name="refine_termexample-style"/>
|
8713
8794
|
<xsl:call-template name="setBlockSpanAll"/>
|
8714
8795
|
|
8715
8796
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
@@ -9394,13 +9475,19 @@
|
|
9394
9475
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9395
9476
|
</xsl:when>
|
9396
9477
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9397
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9478
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9479
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9480
|
+
</xsl:when>
|
9481
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9398
9482
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9399
9483
|
</xsl:when>
|
9400
9484
|
</xsl:choose>
|
9401
9485
|
|
9402
9486
|
</xsl:template>
|
9403
9487
|
|
9488
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9489
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9490
|
+
|
9404
9491
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9405
9492
|
<!-- 0xA0 to space replacement -->
|
9406
9493
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -11009,7 +11096,7 @@
|
|
11009
11096
|
|
11010
11097
|
<xsl:template name="printEdition">
|
11011
11098
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
11012
|
-
|
11099
|
+
|
11013
11100
|
<xsl:choose>
|
11014
11101
|
<xsl:when test="$edition_i18n != ''">
|
11015
11102
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
@@ -1359,6 +1359,10 @@
|
|
1359
1359
|
|
1360
1360
|
</xsl:attribute-set>
|
1361
1361
|
|
1362
|
+
<xsl:template name="refine_termexample-style">
|
1363
|
+
|
1364
|
+
</xsl:template>
|
1365
|
+
|
1362
1366
|
<xsl:attribute-set name="example-style">
|
1363
1367
|
|
1364
1368
|
<!-- <xsl:attribute name="font-size">11pt</xsl:attribute> -->
|
@@ -2480,6 +2484,36 @@
|
|
2480
2484
|
</xsl:for-each>
|
2481
2485
|
</xsl:template>
|
2482
2486
|
|
2487
|
+
<xsl:template name="processMainSectionsDefault_flatxml">
|
2488
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
2489
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2490
|
+
<xsl:variable name="flatxml">
|
2491
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2492
|
+
</xsl:variable>
|
2493
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2494
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2495
|
+
|
2496
|
+
</xsl:for-each>
|
2497
|
+
|
2498
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
2499
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2500
|
+
<xsl:variable name="flatxml">
|
2501
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2502
|
+
</xsl:variable>
|
2503
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2504
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2505
|
+
</xsl:for-each>
|
2506
|
+
|
2507
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
2508
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
2509
|
+
<xsl:variable name="flatxml">
|
2510
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
2511
|
+
</xsl:variable>
|
2512
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
2513
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
2514
|
+
</xsl:for-each>
|
2515
|
+
</xsl:template>
|
2516
|
+
|
2483
2517
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
2484
2518
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
2485
2519
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
@@ -2606,7 +2640,9 @@
|
|
2606
2640
|
</xsl:template> <!-- license-statement/p -->
|
2607
2641
|
|
2608
2642
|
<xsl:template match="*[local-name()='legal-statement']">
|
2643
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
2609
2644
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
2645
|
+
|
2610
2646
|
<xsl:apply-templates/>
|
2611
2647
|
</fo:block>
|
2612
2648
|
</xsl:template> <!-- legal-statement -->
|
@@ -4559,13 +4595,13 @@
|
|
4559
4595
|
<tr>
|
4560
4596
|
<td>
|
4561
4597
|
<xsl:attribute name="id">
|
4562
|
-
<xsl:value-of select="concat($id,'
|
4598
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
|
4563
4599
|
</xsl:attribute>
|
4564
4600
|
<xsl:apply-templates/>
|
4565
4601
|
</td>
|
4566
4602
|
<td>
|
4567
4603
|
<xsl:attribute name="id">
|
4568
|
-
<xsl:value-of select="concat($id,'
|
4604
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
|
4569
4605
|
</xsl:attribute>
|
4570
4606
|
|
4571
4607
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
@@ -4875,13 +4911,14 @@
|
|
4875
4911
|
<!-- ================= -->
|
4876
4912
|
<!-- Added,deleted text -->
|
4877
4913
|
<!-- ================= -->
|
4878
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
4914
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
4879
4915
|
<xsl:param name="skip">true</xsl:param>
|
4880
4916
|
<xsl:param name="block">false</xsl:param>
|
4881
4917
|
<xsl:param name="type"/>
|
4882
4918
|
<xsl:param name="text-align"/>
|
4883
4919
|
<xsl:choose>
|
4884
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
4920
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
4921
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
4885
4922
|
<xsl:choose>
|
4886
4923
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
4887
4924
|
<xsl:otherwise>
|
@@ -4889,12 +4926,32 @@
|
|
4889
4926
|
<xsl:call-template name="insertTag">
|
4890
4927
|
<xsl:with-param name="type">
|
4891
4928
|
<xsl:choose>
|
4929
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
4930
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
4892
4931
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
4893
4932
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
4894
4933
|
</xsl:choose>
|
4895
4934
|
</xsl:with-param>
|
4896
|
-
<xsl:with-param name="kind"
|
4897
|
-
|
4935
|
+
<xsl:with-param name="kind">
|
4936
|
+
<xsl:choose>
|
4937
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4938
|
+
<xsl:value-of select="text()"/>
|
4939
|
+
</xsl:when>
|
4940
|
+
<xsl:otherwise>
|
4941
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
4942
|
+
</xsl:otherwise>
|
4943
|
+
</xsl:choose>
|
4944
|
+
</xsl:with-param>
|
4945
|
+
<xsl:with-param name="value">
|
4946
|
+
<xsl:choose>
|
4947
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
4948
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
4949
|
+
</xsl:when>
|
4950
|
+
<xsl:otherwise>
|
4951
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
4952
|
+
</xsl:otherwise>
|
4953
|
+
</xsl:choose>
|
4954
|
+
</xsl:with-param>
|
4898
4955
|
</xsl:call-template>
|
4899
4956
|
</xsl:variable>
|
4900
4957
|
<xsl:choose>
|
@@ -5225,6 +5282,10 @@
|
|
5225
5282
|
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
5226
5283
|
</xsl:template>
|
5227
5284
|
|
5285
|
+
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
5286
|
+
<xsl:value-of select="."/>
|
5287
|
+
</xsl:template>
|
5288
|
+
|
5228
5289
|
<!-- ========================= -->
|
5229
5290
|
<!-- END Rich text formatting -->
|
5230
5291
|
<!-- ========================= -->
|
@@ -5855,7 +5916,7 @@
|
|
5855
5916
|
</xsl:choose>
|
5856
5917
|
</xsl:variable>
|
5857
5918
|
<xsl:attribute name="id">
|
5858
|
-
<xsl:value-of select="concat($id,'
|
5919
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
|
5859
5920
|
</xsl:attribute>
|
5860
5921
|
|
5861
5922
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -5863,7 +5924,7 @@
|
|
5863
5924
|
<xsl:copy-of select="@*"/>
|
5864
5925
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
5865
5926
|
<xsl:attribute name="id">
|
5866
|
-
<xsl:value-of select="concat($id,'
|
5927
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
5867
5928
|
</xsl:attribute>
|
5868
5929
|
|
5869
5930
|
<!-- <xsl:copy-of select="node()" /> -->
|
@@ -5927,7 +5988,7 @@
|
|
5927
5988
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
5928
5989
|
<xsl:copy>
|
5929
5990
|
<xsl:attribute name="id">
|
5930
|
-
<xsl:value-of select="concat($id,'
|
5991
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
5931
5992
|
</xsl:attribute>
|
5932
5993
|
<xsl:copy-of select="node()"/>
|
5933
5994
|
</xsl:copy>
|
@@ -7171,11 +7232,17 @@
|
|
7171
7232
|
</xsl:when>
|
7172
7233
|
<xsl:otherwise>
|
7173
7234
|
|
7235
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
7236
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
7237
|
+
|
7174
7238
|
<xsl:variable name="element">
|
7175
7239
|
<xsl:choose>
|
7176
7240
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
7177
7241
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7178
7242
|
</xsl:when>
|
7243
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
7244
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7245
|
+
</xsl:when>
|
7179
7246
|
<xsl:otherwise>
|
7180
7247
|
<fo:block xsl:use-attribute-sets="image-style">
|
7181
7248
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -7191,10 +7258,24 @@
|
|
7191
7258
|
<xsl:copy-of select="@*"/>
|
7192
7259
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
7193
7260
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
7194
|
-
|
7195
|
-
|
7196
|
-
|
7197
|
-
|
7261
|
+
|
7262
|
+
<xsl:choose>
|
7263
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
7264
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
7265
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
7266
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
7267
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
7268
|
+
</xsl:if>
|
7269
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
7270
|
+
</xsl:when>
|
7271
|
+
<xsl:otherwise>
|
7272
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7273
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7274
|
+
</xsl:if>
|
7275
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7276
|
+
</xsl:otherwise>
|
7277
|
+
</xsl:choose>
|
7278
|
+
|
7198
7279
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7199
7280
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7200
7281
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -8709,7 +8790,7 @@
|
|
8709
8790
|
<!-- ====== -->
|
8710
8791
|
<xsl:template match="*[local-name() = 'termexample']">
|
8711
8792
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
8712
|
-
|
8793
|
+
<xsl:call-template name="refine_termexample-style"/>
|
8713
8794
|
<xsl:call-template name="setBlockSpanAll"/>
|
8714
8795
|
|
8715
8796
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
@@ -9394,13 +9475,19 @@
|
|
9394
9475
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9395
9476
|
</xsl:when>
|
9396
9477
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
9397
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9478
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
9479
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9480
|
+
</xsl:when>
|
9481
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
9398
9482
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
9399
9483
|
</xsl:when>
|
9400
9484
|
</xsl:choose>
|
9401
9485
|
|
9402
9486
|
</xsl:template>
|
9403
9487
|
|
9488
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
9489
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
9490
|
+
|
9404
9491
|
<xsl:template match="*[local-name() = 'name']/text()">
|
9405
9492
|
<!-- 0xA0 to space replacement -->
|
9406
9493
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -11009,7 +11096,7 @@
|
|
11009
11096
|
|
11010
11097
|
<xsl:template name="printEdition">
|
11011
11098
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
11012
|
-
|
11099
|
+
|
11013
11100
|
<xsl:choose>
|
11014
11101
|
<xsl:when test="$edition_i18n != ''">
|
11015
11102
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
@@ -17,7 +17,7 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.
|
20
|
+
<!-- VERSION v1.3.0 -->
|
21
21
|
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
@@ -146,6 +146,9 @@
|
|
146
146
|
<data type="boolean"/>
|
147
147
|
</attribute>
|
148
148
|
</optional>
|
149
|
+
<optional>
|
150
|
+
<attribute name="style"/>
|
151
|
+
</optional>
|
149
152
|
<oneOrMore>
|
150
153
|
<ref name="PureTextElement"/>
|
151
154
|
</oneOrMore>
|
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(">= 2.7.0")
|
29
29
|
|
30
|
-
spec.add_dependency "metanorma-generic", "~> 2.6.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.6.1"
|
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: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-02-19 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: 2.6.
|
19
|
+
version: 2.6.1
|
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: 2.6.
|
26
|
+
version: 2.6.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|