metanorma-iho 0.7.7 → 0.7.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/iho/iho.specification.xsl +81 -13
- data/lib/isodoc/iho/iho.standard.xsl +81 -13
- data/lib/metanorma/iho/isodoc.rng +29 -7
- 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: 0e7cc94d7e8f9683e2b6188ea75dc4f404e762cab848878e511369a3aa741fd9
|
4
|
+
data.tar.gz: baf518a1ee8054dd032220bd45425a80619c594bb50d0b79db6d043de7aad0c3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f0bbf1cb754794a8782e1963ef20ff1eaf435389692ff453138c48403d9947bfb21e031ea5908f0bdf19b11bebd81bb980d49406e6d8e2ed3efde627b0ae36c
|
7
|
+
data.tar.gz: 58c891f65f1d4299c81c7806c80a214d24976eed99d65450e9f462effe62aca48f46468b31f6f760797cda5133a94ae71f6a06116624dce24e102b1bf7edcf70
|
@@ -1520,11 +1520,17 @@
|
|
1520
1520
|
<!-- ========================== -->
|
1521
1521
|
<!-- Definition's list styles -->
|
1522
1522
|
<!-- ========================== -->
|
1523
|
+
|
1524
|
+
<xsl:attribute-set name="dl-block-style">
|
1525
|
+
|
1526
|
+
</xsl:attribute-set>
|
1527
|
+
|
1523
1528
|
<xsl:attribute-set name="dt-row-style">
|
1524
1529
|
|
1525
1530
|
</xsl:attribute-set>
|
1526
1531
|
|
1527
1532
|
<xsl:attribute-set name="dt-cell-style">
|
1533
|
+
|
1528
1534
|
</xsl:attribute-set>
|
1529
1535
|
|
1530
1536
|
<xsl:attribute-set name="dt-block-style">
|
@@ -1544,6 +1550,7 @@
|
|
1544
1550
|
|
1545
1551
|
<xsl:attribute-set name="dd-cell-style">
|
1546
1552
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
1553
|
+
|
1547
1554
|
</xsl:attribute-set>
|
1548
1555
|
|
1549
1556
|
<!-- ========================== -->
|
@@ -1684,6 +1691,10 @@
|
|
1684
1691
|
|
1685
1692
|
</xsl:attribute-set>
|
1686
1693
|
|
1694
|
+
<xsl:attribute-set name="figure-source-style">
|
1695
|
+
|
1696
|
+
</xsl:attribute-set>
|
1697
|
+
|
1687
1698
|
<!-- Formula's styles -->
|
1688
1699
|
<xsl:attribute-set name="formula-style">
|
1689
1700
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -2223,7 +2234,7 @@
|
|
2223
2234
|
|
2224
2235
|
<xsl:template name="processTables_Contents">
|
2225
2236
|
<tables>
|
2226
|
-
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
2237
|
+
<xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
2227
2238
|
<table id="{@id}" alt-text="{*[local-name() = 'name']}">
|
2228
2239
|
<xsl:copy-of select="*[local-name() = 'name']"/>
|
2229
2240
|
</table>
|
@@ -2567,7 +2578,7 @@
|
|
2567
2578
|
</xsl:attribute>
|
2568
2579
|
</xsl:for-each>
|
2569
2580
|
|
2570
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2581
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2571
2582
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2572
2583
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2573
2584
|
</xsl:if>
|
@@ -2611,7 +2622,7 @@
|
|
2611
2622
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2612
2623
|
</xsl:when>
|
2613
2624
|
<xsl:otherwise>
|
2614
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note and dl which render separaterely -->
|
2625
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
2615
2626
|
</xsl:otherwise>
|
2616
2627
|
</xsl:choose>
|
2617
2628
|
|
@@ -2715,6 +2726,11 @@
|
|
2715
2726
|
</xsl:if>
|
2716
2727
|
</xsl:template> <!-- table/name -->
|
2717
2728
|
|
2729
|
+
<!-- SOURCE: ... -->
|
2730
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
2731
|
+
<xsl:call-template name="termsource"/>
|
2732
|
+
</xsl:template>
|
2733
|
+
|
2718
2734
|
<xsl:template name="calculate-columns-numbers">
|
2719
2735
|
<xsl:param name="table-row"/>
|
2720
2736
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
@@ -3071,7 +3087,7 @@
|
|
3071
3087
|
</fo:table-header>
|
3072
3088
|
</xsl:template> <!-- thead -->
|
3073
3089
|
|
3074
|
-
<!-- template is using for iso, jcgm, bsi only -->
|
3090
|
+
<!-- template is using for iec, iso, jcgm, bsi only -->
|
3075
3091
|
<xsl:template name="table-header-title">
|
3076
3092
|
<xsl:param name="cols-count"/>
|
3077
3093
|
<!-- row for title -->
|
@@ -3114,7 +3130,7 @@
|
|
3114
3130
|
<xsl:param name="colwidths"/>
|
3115
3131
|
<xsl:param name="colgroup"/>
|
3116
3132
|
|
3117
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3133
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
3118
3134
|
|
3119
3135
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3120
3136
|
|
@@ -3184,6 +3200,7 @@
|
|
3184
3200
|
|
3185
3201
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3186
3202
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3203
|
+
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3187
3204
|
|
3188
3205
|
<xsl:variable name="isDisplayRowSeparator">
|
3189
3206
|
|
@@ -3816,7 +3833,7 @@
|
|
3816
3833
|
<xsl:variable name="isAdded" select="@added"/>
|
3817
3834
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3818
3835
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
3819
|
-
<fo:block-container>
|
3836
|
+
<fo:block-container xsl:use-attribute-sets="dl-block-style">
|
3820
3837
|
|
3821
3838
|
<xsl:call-template name="setBlockSpanAll"/>
|
3822
3839
|
|
@@ -3824,6 +3841,18 @@
|
|
3824
3841
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3825
3842
|
</xsl:if>
|
3826
3843
|
|
3844
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']">
|
3845
|
+
<!-- set font-size as sourcecode font-size -->
|
3846
|
+
<xsl:variable name="sourcecode_attributes">
|
3847
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
3848
|
+
</xsl:variable>
|
3849
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@font-size">
|
3850
|
+
<xsl:attribute name="{local-name()}">
|
3851
|
+
<xsl:value-of select="."/>
|
3852
|
+
</xsl:attribute>
|
3853
|
+
</xsl:for-each>
|
3854
|
+
</xsl:if>
|
3855
|
+
|
3827
3856
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3828
3857
|
<xsl:attribute name="margin-left">
|
3829
3858
|
<xsl:choose>
|
@@ -4263,6 +4292,7 @@
|
|
4263
4292
|
<xsl:param name="split_keep-within-line"/>
|
4264
4293
|
|
4265
4294
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
4295
|
+
|
4266
4296
|
<xsl:call-template name="insert_dt_cell">
|
4267
4297
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
4268
4298
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -4284,6 +4314,7 @@
|
|
4284
4314
|
<!-- border is mandatory, to calculate real width -->
|
4285
4315
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4286
4316
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4317
|
+
|
4287
4318
|
</xsl:if>
|
4288
4319
|
|
4289
4320
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
@@ -4798,6 +4829,7 @@
|
|
4798
4829
|
<fo:inline>
|
4799
4830
|
<xsl:for-each select="$styles/style">
|
4800
4831
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
4832
|
+
|
4801
4833
|
</xsl:for-each>
|
4802
4834
|
<xsl:apply-templates/>
|
4803
4835
|
</fo:inline>
|
@@ -6297,6 +6329,13 @@
|
|
6297
6329
|
</fo:block>
|
6298
6330
|
</xsl:template>
|
6299
6331
|
|
6332
|
+
<!-- SOURCE: ... -->
|
6333
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
6334
|
+
|
6335
|
+
<xsl:call-template name="termsource"/>
|
6336
|
+
|
6337
|
+
</xsl:template>
|
6338
|
+
|
6300
6339
|
<xsl:template match="*[local-name() = 'image']">
|
6301
6340
|
<xsl:variable name="isAdded" select="../@added"/>
|
6302
6341
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
@@ -7427,9 +7466,11 @@
|
|
7427
7466
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7428
7467
|
</xsl:if>
|
7429
7468
|
|
7430
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7469
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name' or local-name() = 'dl')]"/>
|
7431
7470
|
</fo:block>
|
7432
7471
|
|
7472
|
+
<xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
|
7473
|
+
|
7433
7474
|
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
|
7434
7475
|
|
7435
7476
|
</fo:block-container>
|
@@ -7461,11 +7502,22 @@
|
|
7461
7502
|
<!-- add sourcecode highlighting -->
|
7462
7503
|
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
7463
7504
|
<xsl:variable name="class" select="@class"/>
|
7505
|
+
|
7506
|
+
<!-- Example: <1> -->
|
7507
|
+
<xsl:variable name="is_callout">
|
7508
|
+
<xsl:if test="parent::*[local-name() = 'dt']">
|
7509
|
+
<xsl:variable name="dt_id" select="../@id"/>
|
7510
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']//*[local-name() = 'callout'][@target = $dt_id]">true</xsl:if>
|
7511
|
+
</xsl:if>
|
7512
|
+
</xsl:variable>
|
7513
|
+
|
7464
7514
|
<xsl:choose>
|
7465
7515
|
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
7466
7516
|
<fo:inline>
|
7467
7517
|
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
7518
|
+
<xsl:if test="$is_callout = 'true'"><</xsl:if>
|
7468
7519
|
<xsl:apply-templates/>
|
7520
|
+
<xsl:if test="$is_callout = 'true'">></xsl:if>
|
7469
7521
|
</fo:inline>
|
7470
7522
|
</xsl:when>
|
7471
7523
|
<xsl:otherwise>
|
@@ -7889,6 +7941,10 @@
|
|
7889
7941
|
</fo:block>
|
7890
7942
|
</xsl:template>
|
7891
7943
|
|
7944
|
+
<xsl:template match="*[local-name() = 'div']">
|
7945
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
7946
|
+
</xsl:template>
|
7947
|
+
|
7892
7948
|
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
|
7893
7949
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
7894
7950
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
@@ -8584,13 +8640,8 @@
|
|
8584
8640
|
</xsl:template>
|
8585
8641
|
|
8586
8642
|
<xsl:template match="*[local-name() = 'deprecates']">
|
8587
|
-
<xsl:variable name="title-deprecated">
|
8588
|
-
<xsl:call-template name="getLocalizedString">
|
8589
|
-
<xsl:with-param name="key">deprecated</xsl:with-param>
|
8590
|
-
</xsl:call-template>
|
8591
|
-
</xsl:variable>
|
8592
8643
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
8593
|
-
<xsl:
|
8644
|
+
<xsl:apply-templates/>
|
8594
8645
|
</fo:block>
|
8595
8646
|
</xsl:template>
|
8596
8647
|
|
@@ -9814,6 +9865,23 @@
|
|
9814
9865
|
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step1">
|
9815
9866
|
<xsl:copy-of select="."/>
|
9816
9867
|
</xsl:template>
|
9868
|
+
|
9869
|
+
<!-- add @id, redundant for table auto-layout algorithm -->
|
9870
|
+
<xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
9871
|
+
<xsl:copy>
|
9872
|
+
<xsl:copy-of select="@*"/>
|
9873
|
+
<xsl:call-template name="add_id"/>
|
9874
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
9875
|
+
</xsl:copy>
|
9876
|
+
</xsl:template>
|
9877
|
+
|
9878
|
+
<xsl:template name="add_id">
|
9879
|
+
<xsl:if test="not(@id)">
|
9880
|
+
<!-- add @id - first element with @id plus '_element_name' -->
|
9881
|
+
<xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
|
9882
|
+
</xsl:if>
|
9883
|
+
</xsl:template>
|
9884
|
+
|
9817
9885
|
<!-- =========================================================================== -->
|
9818
9886
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9819
9887
|
<!-- =========================================================================== -->
|
@@ -1520,11 +1520,17 @@
|
|
1520
1520
|
<!-- ========================== -->
|
1521
1521
|
<!-- Definition's list styles -->
|
1522
1522
|
<!-- ========================== -->
|
1523
|
+
|
1524
|
+
<xsl:attribute-set name="dl-block-style">
|
1525
|
+
|
1526
|
+
</xsl:attribute-set>
|
1527
|
+
|
1523
1528
|
<xsl:attribute-set name="dt-row-style">
|
1524
1529
|
|
1525
1530
|
</xsl:attribute-set>
|
1526
1531
|
|
1527
1532
|
<xsl:attribute-set name="dt-cell-style">
|
1533
|
+
|
1528
1534
|
</xsl:attribute-set>
|
1529
1535
|
|
1530
1536
|
<xsl:attribute-set name="dt-block-style">
|
@@ -1544,6 +1550,7 @@
|
|
1544
1550
|
|
1545
1551
|
<xsl:attribute-set name="dd-cell-style">
|
1546
1552
|
<xsl:attribute name="padding-left">2mm</xsl:attribute>
|
1553
|
+
|
1547
1554
|
</xsl:attribute-set>
|
1548
1555
|
|
1549
1556
|
<!-- ========================== -->
|
@@ -1684,6 +1691,10 @@
|
|
1684
1691
|
|
1685
1692
|
</xsl:attribute-set>
|
1686
1693
|
|
1694
|
+
<xsl:attribute-set name="figure-source-style">
|
1695
|
+
|
1696
|
+
</xsl:attribute-set>
|
1697
|
+
|
1687
1698
|
<!-- Formula's styles -->
|
1688
1699
|
<xsl:attribute-set name="formula-style">
|
1689
1700
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
@@ -2223,7 +2234,7 @@
|
|
2223
2234
|
|
2224
2235
|
<xsl:template name="processTables_Contents">
|
2225
2236
|
<tables>
|
2226
|
-
<xsl:for-each select="//*[local-name() = 'table'][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
2237
|
+
<xsl:for-each select="//*[local-name() = 'table'][not(ancestor::*[local-name() = 'metanorma-extension'])][@id and *[local-name() = 'name'] and normalize-space(@id) != '']">
|
2227
2238
|
<table id="{@id}" alt-text="{*[local-name() = 'name']}">
|
2228
2239
|
<xsl:copy-of select="*[local-name() = 'name']"/>
|
2229
2240
|
</table>
|
@@ -2567,7 +2578,7 @@
|
|
2567
2578
|
</xsl:attribute>
|
2568
2579
|
</xsl:for-each>
|
2569
2580
|
|
2570
|
-
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name']"/>
|
2581
|
+
<xsl:variable name="isNoteOrFnExist" select="./*[local-name()='note'] or .//*[local-name()='fn'][local-name(..) != 'name'] or ./*[local-name()='source']"/>
|
2571
2582
|
<xsl:if test="$isNoteOrFnExist = 'true'">
|
2572
2583
|
<xsl:attribute name="border-bottom">0pt solid black</xsl:attribute> <!-- set 0pt border, because there is a separete table below for footer -->
|
2573
2584
|
</xsl:if>
|
@@ -2611,7 +2622,7 @@
|
|
2611
2622
|
<xsl:apply-templates select="*[local-name()='thead']" mode="process_tbody"/>
|
2612
2623
|
</xsl:when>
|
2613
2624
|
<xsl:otherwise>
|
2614
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note and dl which render separaterely -->
|
2625
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note') and not(local-name() = 'dl') and not(local-name() = 'source') and not(local-name() = 'thead') and not(local-name() = 'tfoot')]"/> <!-- process all table' elements, except name, header, footer, note, source and dl which render separaterely -->
|
2615
2626
|
</xsl:otherwise>
|
2616
2627
|
</xsl:choose>
|
2617
2628
|
|
@@ -2715,6 +2726,11 @@
|
|
2715
2726
|
</xsl:if>
|
2716
2727
|
</xsl:template> <!-- table/name -->
|
2717
2728
|
|
2729
|
+
<!-- SOURCE: ... -->
|
2730
|
+
<xsl:template match="*[local-name()='table']/*[local-name() = 'source']" priority="2">
|
2731
|
+
<xsl:call-template name="termsource"/>
|
2732
|
+
</xsl:template>
|
2733
|
+
|
2718
2734
|
<xsl:template name="calculate-columns-numbers">
|
2719
2735
|
<xsl:param name="table-row"/>
|
2720
2736
|
<xsl:variable name="columns-count" select="count($table-row/*)"/>
|
@@ -3071,7 +3087,7 @@
|
|
3071
3087
|
</fo:table-header>
|
3072
3088
|
</xsl:template> <!-- thead -->
|
3073
3089
|
|
3074
|
-
<!-- template is using for iso, jcgm, bsi only -->
|
3090
|
+
<!-- template is using for iec, iso, jcgm, bsi only -->
|
3075
3091
|
<xsl:template name="table-header-title">
|
3076
3092
|
<xsl:param name="cols-count"/>
|
3077
3093
|
<!-- row for title -->
|
@@ -3114,7 +3130,7 @@
|
|
3114
3130
|
<xsl:param name="colwidths"/>
|
3115
3131
|
<xsl:param name="colgroup"/>
|
3116
3132
|
|
3117
|
-
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name']"/>
|
3133
|
+
<xsl:variable name="isNoteOrFnExist" select="../*[local-name()='note'] or ../*[local-name()='dl'] or ..//*[local-name()='fn'][local-name(..) != 'name'] or ../*[local-name()='source']"/>
|
3118
3134
|
|
3119
3135
|
<xsl:variable name="isNoteOrFnExistShowAfterTable">
|
3120
3136
|
|
@@ -3184,6 +3200,7 @@
|
|
3184
3200
|
|
3185
3201
|
<xsl:apply-templates select="../*[local-name()='dl']"/>
|
3186
3202
|
<xsl:apply-templates select="../*[local-name()='note']"/>
|
3203
|
+
<xsl:apply-templates select="../*[local-name()='source']"/>
|
3187
3204
|
|
3188
3205
|
<xsl:variable name="isDisplayRowSeparator">
|
3189
3206
|
|
@@ -3816,7 +3833,7 @@
|
|
3816
3833
|
<xsl:variable name="isAdded" select="@added"/>
|
3817
3834
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3818
3835
|
<!-- <dl><xsl:copy-of select="."/></dl> -->
|
3819
|
-
<fo:block-container>
|
3836
|
+
<fo:block-container xsl:use-attribute-sets="dl-block-style">
|
3820
3837
|
|
3821
3838
|
<xsl:call-template name="setBlockSpanAll"/>
|
3822
3839
|
|
@@ -3824,6 +3841,18 @@
|
|
3824
3841
|
<xsl:attribute name="margin-left">0mm</xsl:attribute>
|
3825
3842
|
</xsl:if>
|
3826
3843
|
|
3844
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']">
|
3845
|
+
<!-- set font-size as sourcecode font-size -->
|
3846
|
+
<xsl:variable name="sourcecode_attributes">
|
3847
|
+
<xsl:call-template name="get_sourcecode_attributes"/>
|
3848
|
+
</xsl:variable>
|
3849
|
+
<xsl:for-each select="xalan:nodeset($sourcecode_attributes)/sourcecode_attributes/@font-size">
|
3850
|
+
<xsl:attribute name="{local-name()}">
|
3851
|
+
<xsl:value-of select="."/>
|
3852
|
+
</xsl:attribute>
|
3853
|
+
</xsl:for-each>
|
3854
|
+
</xsl:if>
|
3855
|
+
|
3827
3856
|
<xsl:if test="parent::*[local-name() = 'note']">
|
3828
3857
|
<xsl:attribute name="margin-left">
|
3829
3858
|
<xsl:choose>
|
@@ -4263,6 +4292,7 @@
|
|
4263
4292
|
<xsl:param name="split_keep-within-line"/>
|
4264
4293
|
|
4265
4294
|
<fo:table-row xsl:use-attribute-sets="dt-row-style">
|
4295
|
+
|
4266
4296
|
<xsl:call-template name="insert_dt_cell">
|
4267
4297
|
<xsl:with-param name="key_iso" select="$key_iso"/>
|
4268
4298
|
<xsl:with-param name="split_keep-within-line" select="$split_keep-within-line"/>
|
@@ -4284,6 +4314,7 @@
|
|
4284
4314
|
<!-- border is mandatory, to calculate real width -->
|
4285
4315
|
<xsl:attribute name="border">0.1pt solid black</xsl:attribute>
|
4286
4316
|
<xsl:attribute name="text-align">left</xsl:attribute>
|
4317
|
+
|
4287
4318
|
</xsl:if>
|
4288
4319
|
|
4289
4320
|
<fo:block xsl:use-attribute-sets="dt-block-style">
|
@@ -4798,6 +4829,7 @@
|
|
4798
4829
|
<fo:inline>
|
4799
4830
|
<xsl:for-each select="$styles/style">
|
4800
4831
|
<xsl:attribute name="{@name}"><xsl:value-of select="."/></xsl:attribute>
|
4832
|
+
|
4801
4833
|
</xsl:for-each>
|
4802
4834
|
<xsl:apply-templates/>
|
4803
4835
|
</fo:inline>
|
@@ -6297,6 +6329,13 @@
|
|
6297
6329
|
</fo:block>
|
6298
6330
|
</xsl:template>
|
6299
6331
|
|
6332
|
+
<!-- SOURCE: ... -->
|
6333
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'source']" priority="2">
|
6334
|
+
|
6335
|
+
<xsl:call-template name="termsource"/>
|
6336
|
+
|
6337
|
+
</xsl:template>
|
6338
|
+
|
6300
6339
|
<xsl:template match="*[local-name() = 'image']">
|
6301
6340
|
<xsl:variable name="isAdded" select="../@added"/>
|
6302
6341
|
<xsl:variable name="isDeleted" select="../@deleted"/>
|
@@ -7427,9 +7466,11 @@
|
|
7427
7466
|
<xsl:attribute name="margin-bottom">0pt</xsl:attribute>
|
7428
7467
|
</xsl:if>
|
7429
7468
|
|
7430
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7469
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name' or local-name() = 'dl')]"/>
|
7431
7470
|
</fo:block>
|
7432
7471
|
|
7472
|
+
<xsl:apply-templates select="*[local-name() = 'dl']"/> <!-- Key table -->
|
7473
|
+
|
7433
7474
|
<xsl:apply-templates select="*[local-name()='name']"/> <!-- show sourcecode's name AFTER content -->
|
7434
7475
|
|
7435
7476
|
</fo:block-container>
|
@@ -7461,11 +7502,22 @@
|
|
7461
7502
|
<!-- add sourcecode highlighting -->
|
7462
7503
|
<xsl:template match="*[local-name()='sourcecode']//*[local-name()='span'][@class]" priority="2">
|
7463
7504
|
<xsl:variable name="class" select="@class"/>
|
7505
|
+
|
7506
|
+
<!-- Example: <1> -->
|
7507
|
+
<xsl:variable name="is_callout">
|
7508
|
+
<xsl:if test="parent::*[local-name() = 'dt']">
|
7509
|
+
<xsl:variable name="dt_id" select="../@id"/>
|
7510
|
+
<xsl:if test="ancestor::*[local-name() = 'sourcecode']//*[local-name() = 'callout'][@target = $dt_id]">true</xsl:if>
|
7511
|
+
</xsl:if>
|
7512
|
+
</xsl:variable>
|
7513
|
+
|
7464
7514
|
<xsl:choose>
|
7465
7515
|
<xsl:when test="$sourcecode_css//class[@name = $class]">
|
7466
7516
|
<fo:inline>
|
7467
7517
|
<xsl:apply-templates select="$sourcecode_css//class[@name = $class]" mode="css"/>
|
7518
|
+
<xsl:if test="$is_callout = 'true'"><</xsl:if>
|
7468
7519
|
<xsl:apply-templates/>
|
7520
|
+
<xsl:if test="$is_callout = 'true'">></xsl:if>
|
7469
7521
|
</fo:inline>
|
7470
7522
|
</xsl:when>
|
7471
7523
|
<xsl:otherwise>
|
@@ -7889,6 +7941,10 @@
|
|
7889
7941
|
</fo:block>
|
7890
7942
|
</xsl:template>
|
7891
7943
|
|
7944
|
+
<xsl:template match="*[local-name() = 'div']">
|
7945
|
+
<fo:block><xsl:apply-templates/></fo:block>
|
7946
|
+
</xsl:template>
|
7947
|
+
|
7892
7948
|
<xsl:template match="*[local-name() = 'inherit'] | *[local-name() = 'component'][@class = 'inherit'] | *[local-name() = 'div'][@type = 'requirement-inherit'] | *[local-name() = 'div'][@type = 'recommendation-inherit'] | *[local-name() = 'div'][@type = 'permission-inherit']">
|
7893
7949
|
<fo:block xsl:use-attribute-sets="inherit-style">
|
7894
7950
|
<xsl:text>Dependency </xsl:text><xsl:apply-templates/>
|
@@ -8584,13 +8640,8 @@
|
|
8584
8640
|
</xsl:template>
|
8585
8641
|
|
8586
8642
|
<xsl:template match="*[local-name() = 'deprecates']">
|
8587
|
-
<xsl:variable name="title-deprecated">
|
8588
|
-
<xsl:call-template name="getLocalizedString">
|
8589
|
-
<xsl:with-param name="key">deprecated</xsl:with-param>
|
8590
|
-
</xsl:call-template>
|
8591
|
-
</xsl:variable>
|
8592
8643
|
<fo:block xsl:use-attribute-sets="deprecates-style">
|
8593
|
-
<xsl:
|
8644
|
+
<xsl:apply-templates/>
|
8594
8645
|
</fo:block>
|
8595
8646
|
</xsl:template>
|
8596
8647
|
|
@@ -9814,6 +9865,23 @@
|
|
9814
9865
|
<xsl:template match="*[local-name() = 'stem'] | *[local-name() = 'image']" mode="update_xml_step1">
|
9815
9866
|
<xsl:copy-of select="."/>
|
9816
9867
|
</xsl:template>
|
9868
|
+
|
9869
|
+
<!-- add @id, redundant for table auto-layout algorithm -->
|
9870
|
+
<xsl:template match="*[local-name() = 'dl' or local-name() = 'table'][not(@id)]" mode="update_xml_step1">
|
9871
|
+
<xsl:copy>
|
9872
|
+
<xsl:copy-of select="@*"/>
|
9873
|
+
<xsl:call-template name="add_id"/>
|
9874
|
+
<xsl:apply-templates mode="update_xml_step1"/>
|
9875
|
+
</xsl:copy>
|
9876
|
+
</xsl:template>
|
9877
|
+
|
9878
|
+
<xsl:template name="add_id">
|
9879
|
+
<xsl:if test="not(@id)">
|
9880
|
+
<!-- add @id - first element with @id plus '_element_name' -->
|
9881
|
+
<xsl:attribute name="id"><xsl:value-of select="(.//*[@id])[1]/@id"/>_<xsl:value-of select="local-name()"/></xsl:attribute>
|
9882
|
+
</xsl:if>
|
9883
|
+
</xsl:template>
|
9884
|
+
|
9817
9885
|
<!-- =========================================================================== -->
|
9818
9886
|
<!-- END STEP1: Re-order elements in 'preface', 'sections' based on @displayorder -->
|
9819
9887
|
<!-- =========================================================================== -->
|
@@ -382,6 +382,9 @@
|
|
382
382
|
<optional>
|
383
383
|
<ref name="dl"/>
|
384
384
|
</optional>
|
385
|
+
<optional>
|
386
|
+
<ref name="source"/>
|
387
|
+
</optional>
|
385
388
|
</element>
|
386
389
|
</define>
|
387
390
|
<define name="figure">
|
@@ -404,9 +407,6 @@
|
|
404
407
|
<attribute name="class"/>
|
405
408
|
</optional>
|
406
409
|
<ref name="BlockAttributes"/>
|
407
|
-
<optional>
|
408
|
-
<ref name="source"/>
|
409
|
-
</optional>
|
410
410
|
<optional>
|
411
411
|
<ref name="tname"/>
|
412
412
|
</optional>
|
@@ -431,6 +431,20 @@
|
|
431
431
|
<zeroOrMore>
|
432
432
|
<ref name="note"/>
|
433
433
|
</zeroOrMore>
|
434
|
+
<optional>
|
435
|
+
<ref name="source"/>
|
436
|
+
</optional>
|
437
|
+
</element>
|
438
|
+
</define>
|
439
|
+
<define name="source">
|
440
|
+
<element name="source">
|
441
|
+
<attribute name="status">
|
442
|
+
<ref name="SourceStatusType"/>
|
443
|
+
</attribute>
|
444
|
+
<ref name="origin"/>
|
445
|
+
<optional>
|
446
|
+
<ref name="modification"/>
|
447
|
+
</optional>
|
434
448
|
</element>
|
435
449
|
</define>
|
436
450
|
<define name="sourcecode">
|
@@ -2099,10 +2113,7 @@
|
|
2099
2113
|
<define name="termsource">
|
2100
2114
|
<element name="termsource">
|
2101
2115
|
<attribute name="status">
|
2102
|
-
<
|
2103
|
-
<value>identical</value>
|
2104
|
-
<value>modified</value>
|
2105
|
-
</choice>
|
2116
|
+
<ref name="SourceStatusType"/>
|
2106
2117
|
</attribute>
|
2107
2118
|
<attribute name="type">
|
2108
2119
|
<choice>
|
@@ -2116,6 +2127,17 @@
|
|
2116
2127
|
</optional>
|
2117
2128
|
</element>
|
2118
2129
|
</define>
|
2130
|
+
<define name="SourceStatusType">
|
2131
|
+
<choice>
|
2132
|
+
<value>identical</value>
|
2133
|
+
<value>modified</value>
|
2134
|
+
<value>restyled</value>
|
2135
|
+
<value>context-added</value>
|
2136
|
+
<value>generalisation</value>
|
2137
|
+
<value>specialisation</value>
|
2138
|
+
<value>unspecified</value>
|
2139
|
+
</choice>
|
2140
|
+
</define>
|
2119
2141
|
<define name="origin">
|
2120
2142
|
<element name="origin">
|
2121
2143
|
<choice>
|
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.4.
|
30
|
+
spec.add_dependency "metanorma-generic", "~> 2.4.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.7.
|
4
|
+
version: 0.7.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-10 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.4.
|
19
|
+
version: 2.4.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.4.
|
26
|
+
version: 2.4.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: debug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|