metanorma-iho 0.3.11 → 0.3.12
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/asciidoctor/iho/isodoc.rng +9 -0
- data/lib/isodoc/iho/iho.specification.xsl +154 -8
- data/lib/isodoc/iho/iho.standard.xsl +154 -8
- data/lib/metanorma/iho/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7b6b833965c1758caf9d20458ed0499be837ceae838a8139bee476cf15920906
|
|
4
|
+
data.tar.gz: dd218ba7b36aaa36808a66e48e3a1ad578375727f3d44afb754ea1dae7caf8ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 88ec07b6e69a19789703461088015b12206417a931aa635e8754950422cc2d2a119668743435aad26f484c2ebce03da7fdbd79acc728c4e8872e95f84b82b666
|
|
7
|
+
data.tar.gz: 4596e11076947e1d35116f32d9f4cb396ff7c54ea9796663783ca40e56ebff1257061717ee7e30959ba7c93c35887613a6c5de67a6d61c4410be1717cc0cdecf
|
|
@@ -1036,6 +1036,7 @@
|
|
|
1036
1036
|
<ref name="svgmap"/>
|
|
1037
1037
|
<ref name="inputform"/>
|
|
1038
1038
|
<ref name="toc"/>
|
|
1039
|
+
<ref name="passthrough"/>
|
|
1039
1040
|
</choice>
|
|
1040
1041
|
</define>
|
|
1041
1042
|
<define name="toc">
|
|
@@ -1043,6 +1044,14 @@
|
|
|
1043
1044
|
<ref name="ul"/>
|
|
1044
1045
|
</element>
|
|
1045
1046
|
</define>
|
|
1047
|
+
<define name="passthrough">
|
|
1048
|
+
<element name="passthrough">
|
|
1049
|
+
<optional>
|
|
1050
|
+
<attribute name="formats"/>
|
|
1051
|
+
</optional>
|
|
1052
|
+
<text/>
|
|
1053
|
+
</element>
|
|
1054
|
+
</define>
|
|
1046
1055
|
<define name="inputform">
|
|
1047
1056
|
<element name="form">
|
|
1048
1057
|
<attribute name="id">
|
|
@@ -1524,13 +1524,20 @@
|
|
|
1524
1524
|
|
|
1525
1525
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
|
1526
1526
|
|
|
1527
|
-
</xsl:attribute-set><xsl:
|
|
1527
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
|
1528
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
|
1529
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
|
1528
1530
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1529
1531
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1530
1532
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1531
1533
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1532
1534
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1533
|
-
</xsl:template><xsl:template name="
|
|
1535
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1536
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1537
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1538
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1539
|
+
</xsl:for-each>
|
|
1540
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
|
1534
1541
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1535
1542
|
|
|
1536
1543
|
<!-- Normative references -->
|
|
@@ -1543,13 +1550,33 @@
|
|
|
1543
1550
|
<!-- Bibliography -->
|
|
1544
1551
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
|
1545
1552
|
|
|
1546
|
-
</xsl:template><xsl:template name="
|
|
1553
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1554
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1555
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1556
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1557
|
+
</xsl:for-each>
|
|
1558
|
+
|
|
1559
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1560
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1561
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1562
|
+
</xsl:for-each>
|
|
1563
|
+
|
|
1564
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1565
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1566
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1567
|
+
</xsl:for-each>
|
|
1568
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
|
1547
1569
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1548
1570
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1549
1571
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1550
1572
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1551
1573
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1552
|
-
</xsl:template><xsl:template name="
|
|
1574
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1575
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1576
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1577
|
+
<xsl:apply-templates select="."/>
|
|
1578
|
+
</xsl:for-each>
|
|
1579
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
|
1553
1580
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1554
1581
|
|
|
1555
1582
|
<!-- Normative references -->
|
|
@@ -1561,6 +1588,22 @@
|
|
|
1561
1588
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1562
1589
|
<!-- Bibliography -->
|
|
1563
1590
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1591
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1592
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1593
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1594
|
+
<xsl:apply-templates select="."/>
|
|
1595
|
+
|
|
1596
|
+
</xsl:for-each>
|
|
1597
|
+
|
|
1598
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1599
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1600
|
+
<xsl:apply-templates select="."/>
|
|
1601
|
+
</xsl:for-each>
|
|
1602
|
+
|
|
1603
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1604
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1605
|
+
<xsl:apply-templates select="."/>
|
|
1606
|
+
</xsl:for-each>
|
|
1564
1607
|
</xsl:template><xsl:template match="text()">
|
|
1565
1608
|
<xsl:value-of select="."/>
|
|
1566
1609
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
@@ -4078,6 +4121,13 @@
|
|
|
4078
4121
|
</xsl:attribute>
|
|
4079
4122
|
<xsl:apply-templates mode="svg_update"/>
|
|
4080
4123
|
</xsl:copy>
|
|
4124
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
|
4125
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
4126
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
|
4127
|
+
<xsl:call-template name="image_svg">
|
|
4128
|
+
<xsl:with-param name="name" select="$name"/>
|
|
4129
|
+
</xsl:call-template>
|
|
4130
|
+
</xsl:for-each>
|
|
4081
4131
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
4082
4132
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
4083
4133
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
@@ -4182,7 +4232,7 @@
|
|
|
4182
4232
|
</fo:basic-link>
|
|
4183
4233
|
</fo:block>
|
|
4184
4234
|
</fo:block-container>
|
|
4185
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4235
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4186
4236
|
<xsl:apply-templates mode="contents"/>
|
|
4187
4237
|
<xsl:text> </xsl:text>
|
|
4188
4238
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
|
@@ -4862,14 +4912,15 @@
|
|
|
4862
4912
|
</xsl:if>
|
|
4863
4913
|
</xsl:template><xsl:variable name="localized.source">
|
|
4864
4914
|
<xsl:call-template name="getLocalizedString">
|
|
4865
|
-
|
|
4866
|
-
|
|
4915
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
|
4916
|
+
</xsl:call-template>
|
|
4867
4917
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
|
4868
4918
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
4869
4919
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
4870
4920
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
4871
4921
|
</xsl:if>
|
|
4872
4922
|
|
|
4923
|
+
|
|
4873
4924
|
<fo:inline>
|
|
4874
4925
|
|
|
4875
4926
|
|
|
@@ -4877,6 +4928,7 @@
|
|
|
4877
4928
|
|
|
4878
4929
|
|
|
4879
4930
|
|
|
4931
|
+
|
|
4880
4932
|
<xsl:call-template name="getTitle">
|
|
4881
4933
|
<xsl:with-param name="name" select="'title-source'"/>
|
|
4882
4934
|
</xsl:call-template>
|
|
@@ -4888,6 +4940,7 @@
|
|
|
4888
4940
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
4889
4941
|
<xsl:apply-templates/>
|
|
4890
4942
|
</fo:inline>
|
|
4943
|
+
|
|
4891
4944
|
</fo:basic-link>
|
|
4892
4945
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
|
4893
4946
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
@@ -4954,6 +5007,9 @@
|
|
|
4954
5007
|
|
|
4955
5008
|
</xsl:if>
|
|
4956
5009
|
|
|
5010
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
|
5011
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
|
5012
|
+
|
|
4957
5013
|
|
|
4958
5014
|
|
|
4959
5015
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
@@ -4969,7 +5025,9 @@
|
|
|
4969
5025
|
|
|
4970
5026
|
|
|
4971
5027
|
</xsl:if>
|
|
4972
|
-
|
|
5028
|
+
|
|
5029
|
+
|
|
5030
|
+
|
|
4973
5031
|
<xsl:apply-templates/>
|
|
4974
5032
|
</fo:basic-link>
|
|
4975
5033
|
|
|
@@ -5571,9 +5629,97 @@
|
|
|
5571
5629
|
<fo:block-container border="1pt solid black" width="50%">
|
|
5572
5630
|
<fo:block> </fo:block>
|
|
5573
5631
|
</fo:block-container>
|
|
5632
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
|
5633
|
+
<xsl:param name="colwidths"/>
|
|
5634
|
+
<xsl:variable name="colwidths_">
|
|
5635
|
+
<xsl:choose>
|
|
5636
|
+
<xsl:when test="not($colwidths)">
|
|
5637
|
+
<xsl:variable name="toc_table_simple">
|
|
5638
|
+
<tbody>
|
|
5639
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5640
|
+
</tbody>
|
|
5641
|
+
</xsl:variable>
|
|
5642
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
|
5643
|
+
<xsl:call-template name="calculate-column-widths">
|
|
5644
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
5645
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
|
5646
|
+
</xsl:call-template>
|
|
5647
|
+
</xsl:when>
|
|
5648
|
+
<xsl:otherwise>
|
|
5649
|
+
<xsl:copy-of select="$colwidths"/>
|
|
5650
|
+
</xsl:otherwise>
|
|
5651
|
+
</xsl:choose>
|
|
5652
|
+
</xsl:variable>
|
|
5653
|
+
<fo:block role="TOCI" space-after="16pt">
|
|
5654
|
+
<fo:table width="100%" table-layout="fixed">
|
|
5655
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
|
5656
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
5657
|
+
</xsl:for-each>
|
|
5658
|
+
<fo:table-body>
|
|
5659
|
+
<xsl:apply-templates/>
|
|
5660
|
+
</fo:table-body>
|
|
5661
|
+
</fo:table>
|
|
5662
|
+
</fo:block>
|
|
5663
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
|
5664
|
+
<fo:table-row min-height="5mm">
|
|
5665
|
+
<xsl:apply-templates/>
|
|
5666
|
+
</fo:table-row>
|
|
5667
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
|
5668
|
+
<xsl:apply-templates/>
|
|
5669
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
|
5670
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5671
|
+
<xsl:variable name="target" select="@target"/>
|
|
5672
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5673
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5674
|
+
<fo:table-cell>
|
|
5675
|
+
<fo:block>
|
|
5676
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5677
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5678
|
+
<xsl:choose>
|
|
5679
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
5680
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
|
5681
|
+
</xsl:choose>
|
|
5682
|
+
</xsl:for-each>
|
|
5683
|
+
</fo:basic-link>
|
|
5684
|
+
</fo:block>
|
|
5685
|
+
</fo:table-cell>
|
|
5686
|
+
</xsl:for-each>
|
|
5687
|
+
<!-- last column - for page numbers -->
|
|
5688
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
|
5689
|
+
<fo:block>
|
|
5690
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5691
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
|
5692
|
+
</fo:basic-link>
|
|
5693
|
+
</fo:block>
|
|
5694
|
+
</fo:table-cell>
|
|
5695
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
|
5696
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5697
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
|
5698
|
+
<tr>
|
|
5699
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5700
|
+
</tr>
|
|
5701
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
|
5702
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5703
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5704
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5705
|
+
<td>
|
|
5706
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5707
|
+
<xsl:copy-of select="."/>
|
|
5708
|
+
</xsl:for-each>
|
|
5709
|
+
</td>
|
|
5710
|
+
</xsl:for-each>
|
|
5711
|
+
<td>333</td> <!-- page number, just for fill -->
|
|
5574
5712
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
|
5575
5713
|
<fo:inline padding-right="5mm"> </fo:inline>
|
|
5576
5714
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
5715
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
|
5716
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
|
5717
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
|
5718
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
5719
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
|
5720
|
+
</svg>
|
|
5721
|
+
</fo:instream-foreign-object>
|
|
5722
|
+
</fo:inline>
|
|
5577
5723
|
</xsl:template><xsl:template name="convertDate">
|
|
5578
5724
|
<xsl:param name="date"/>
|
|
5579
5725
|
<xsl:param name="format" select="'short'"/>
|
|
@@ -1524,13 +1524,20 @@
|
|
|
1524
1524
|
|
|
1525
1525
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
|
1526
1526
|
|
|
1527
|
-
</xsl:attribute-set><xsl:
|
|
1527
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
|
1528
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
|
1529
|
+
</xsl:attribute-set><xsl:variable name="border-block-added">2.5pt solid rgb(0, 176, 80)</xsl:variable><xsl:variable name="border-block-deleted">2.5pt solid rgb(255, 0, 0)</xsl:variable><xsl:template name="OLD_processPrefaceSectionsDefault_Contents">
|
|
1528
1530
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
|
1529
1531
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
|
1530
1532
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
|
1531
1533
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
|
1532
1534
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
|
1533
|
-
</xsl:template><xsl:template name="
|
|
1535
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
|
1536
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1537
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1538
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1539
|
+
</xsl:for-each>
|
|
1540
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
|
1534
1541
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
|
1535
1542
|
|
|
1536
1543
|
<!-- Normative references -->
|
|
@@ -1543,13 +1550,33 @@
|
|
|
1543
1550
|
<!-- Bibliography -->
|
|
1544
1551
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]" mode="contents"/>
|
|
1545
1552
|
|
|
1546
|
-
</xsl:template><xsl:template name="
|
|
1553
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
|
1554
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1555
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1556
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1557
|
+
</xsl:for-each>
|
|
1558
|
+
|
|
1559
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1560
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1561
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1562
|
+
</xsl:for-each>
|
|
1563
|
+
|
|
1564
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1565
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1566
|
+
<xsl:apply-templates select="." mode="contents"/>
|
|
1567
|
+
</xsl:for-each>
|
|
1568
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
|
1547
1569
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
|
1548
1570
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
|
1549
1571
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
|
1550
1572
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
|
1551
1573
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
|
1552
|
-
</xsl:template><xsl:template name="
|
|
1574
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
|
1575
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
|
1576
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1577
|
+
<xsl:apply-templates select="."/>
|
|
1578
|
+
</xsl:for-each>
|
|
1579
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
|
1553
1580
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
|
1554
1581
|
|
|
1555
1582
|
<!-- Normative references -->
|
|
@@ -1561,6 +1588,22 @@
|
|
|
1561
1588
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
|
1562
1589
|
<!-- Bibliography -->
|
|
1563
1590
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
|
1591
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
|
1592
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
|
1593
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1594
|
+
<xsl:apply-templates select="."/>
|
|
1595
|
+
|
|
1596
|
+
</xsl:for-each>
|
|
1597
|
+
|
|
1598
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
|
1599
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1600
|
+
<xsl:apply-templates select="."/>
|
|
1601
|
+
</xsl:for-each>
|
|
1602
|
+
|
|
1603
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
|
1604
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
|
1605
|
+
<xsl:apply-templates select="."/>
|
|
1606
|
+
</xsl:for-each>
|
|
1564
1607
|
</xsl:template><xsl:template match="text()">
|
|
1565
1608
|
<xsl:value-of select="."/>
|
|
1566
1609
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
|
@@ -4078,6 +4121,13 @@
|
|
|
4078
4121
|
</xsl:attribute>
|
|
4079
4122
|
<xsl:apply-templates mode="svg_update"/>
|
|
4080
4123
|
</xsl:copy>
|
|
4124
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
|
4125
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
4126
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
|
4127
|
+
<xsl:call-template name="image_svg">
|
|
4128
|
+
<xsl:with-param name="name" select="$name"/>
|
|
4129
|
+
</xsl:call-template>
|
|
4130
|
+
</xsl:for-each>
|
|
4081
4131
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
|
4082
4132
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
|
4083
4133
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
|
@@ -4182,7 +4232,7 @@
|
|
|
4182
4232
|
</fo:basic-link>
|
|
4183
4233
|
</fo:block>
|
|
4184
4234
|
</fo:block-container>
|
|
4185
|
-
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4235
|
+
</xsl:template><xsl:template match="*[local-name() = 'emf']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name']"/><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="contents">
|
|
4186
4236
|
<xsl:apply-templates mode="contents"/>
|
|
4187
4237
|
<xsl:text> </xsl:text>
|
|
4188
4238
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'name'] | *[local-name() = 'table']/*[local-name() = 'name'] | *[local-name() = 'permission']/*[local-name() = 'name'] | *[local-name() = 'recommendation']/*[local-name() = 'name'] | *[local-name() = 'requirement']/*[local-name() = 'name']" mode="bookmarks">
|
|
@@ -4862,14 +4912,15 @@
|
|
|
4862
4912
|
</xsl:if>
|
|
4863
4913
|
</xsl:template><xsl:variable name="localized.source">
|
|
4864
4914
|
<xsl:call-template name="getLocalizedString">
|
|
4865
|
-
|
|
4866
|
-
|
|
4915
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
|
4916
|
+
</xsl:call-template>
|
|
4867
4917
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
|
4868
4918
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
4869
4919
|
<xsl:if test="normalize-space(@citeas) = ''">
|
|
4870
4920
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
|
4871
4921
|
</xsl:if>
|
|
4872
4922
|
|
|
4923
|
+
|
|
4873
4924
|
<fo:inline>
|
|
4874
4925
|
|
|
4875
4926
|
|
|
@@ -4877,6 +4928,7 @@
|
|
|
4877
4928
|
|
|
4878
4929
|
|
|
4879
4930
|
|
|
4931
|
+
|
|
4880
4932
|
<xsl:call-template name="getTitle">
|
|
4881
4933
|
<xsl:with-param name="name" select="'title-source'"/>
|
|
4882
4934
|
</xsl:call-template>
|
|
@@ -4888,6 +4940,7 @@
|
|
|
4888
4940
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
|
4889
4941
|
<xsl:apply-templates/>
|
|
4890
4942
|
</fo:inline>
|
|
4943
|
+
|
|
4891
4944
|
</fo:basic-link>
|
|
4892
4945
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
|
4893
4946
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
@@ -4954,6 +5007,9 @@
|
|
|
4954
5007
|
|
|
4955
5008
|
</xsl:if>
|
|
4956
5009
|
|
|
5010
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
|
5011
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
|
5012
|
+
|
|
4957
5013
|
|
|
4958
5014
|
|
|
4959
5015
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
|
@@ -4969,7 +5025,9 @@
|
|
|
4969
5025
|
|
|
4970
5026
|
|
|
4971
5027
|
</xsl:if>
|
|
4972
|
-
|
|
5028
|
+
|
|
5029
|
+
|
|
5030
|
+
|
|
4973
5031
|
<xsl:apply-templates/>
|
|
4974
5032
|
</fo:basic-link>
|
|
4975
5033
|
|
|
@@ -5571,9 +5629,97 @@
|
|
|
5571
5629
|
<fo:block-container border="1pt solid black" width="50%">
|
|
5572
5630
|
<fo:block> </fo:block>
|
|
5573
5631
|
</fo:block-container>
|
|
5632
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
|
5633
|
+
<xsl:param name="colwidths"/>
|
|
5634
|
+
<xsl:variable name="colwidths_">
|
|
5635
|
+
<xsl:choose>
|
|
5636
|
+
<xsl:when test="not($colwidths)">
|
|
5637
|
+
<xsl:variable name="toc_table_simple">
|
|
5638
|
+
<tbody>
|
|
5639
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5640
|
+
</tbody>
|
|
5641
|
+
</xsl:variable>
|
|
5642
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
|
5643
|
+
<xsl:call-template name="calculate-column-widths">
|
|
5644
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
|
5645
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
|
5646
|
+
</xsl:call-template>
|
|
5647
|
+
</xsl:when>
|
|
5648
|
+
<xsl:otherwise>
|
|
5649
|
+
<xsl:copy-of select="$colwidths"/>
|
|
5650
|
+
</xsl:otherwise>
|
|
5651
|
+
</xsl:choose>
|
|
5652
|
+
</xsl:variable>
|
|
5653
|
+
<fo:block role="TOCI" space-after="16pt">
|
|
5654
|
+
<fo:table width="100%" table-layout="fixed">
|
|
5655
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
|
5656
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
|
5657
|
+
</xsl:for-each>
|
|
5658
|
+
<fo:table-body>
|
|
5659
|
+
<xsl:apply-templates/>
|
|
5660
|
+
</fo:table-body>
|
|
5661
|
+
</fo:table>
|
|
5662
|
+
</fo:block>
|
|
5663
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
|
5664
|
+
<fo:table-row min-height="5mm">
|
|
5665
|
+
<xsl:apply-templates/>
|
|
5666
|
+
</fo:table-row>
|
|
5667
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
|
5668
|
+
<xsl:apply-templates/>
|
|
5669
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
|
5670
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5671
|
+
<xsl:variable name="target" select="@target"/>
|
|
5672
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5673
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5674
|
+
<fo:table-cell>
|
|
5675
|
+
<fo:block>
|
|
5676
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5677
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5678
|
+
<xsl:choose>
|
|
5679
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
|
5680
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
|
5681
|
+
</xsl:choose>
|
|
5682
|
+
</xsl:for-each>
|
|
5683
|
+
</fo:basic-link>
|
|
5684
|
+
</fo:block>
|
|
5685
|
+
</fo:table-cell>
|
|
5686
|
+
</xsl:for-each>
|
|
5687
|
+
<!-- last column - for page numbers -->
|
|
5688
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
|
5689
|
+
<fo:block>
|
|
5690
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
|
5691
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
|
5692
|
+
</fo:basic-link>
|
|
5693
|
+
</fo:block>
|
|
5694
|
+
</fo:table-cell>
|
|
5695
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
|
5696
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5697
|
+
</xsl:template><xsl:template match="*[local-name() = 'clause'][@type = 'toc']/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'clause'][not(@type = 'toc')]/*[local-name() = 'title']" mode="toc_table_width"/><xsl:template match="*[local-name() = 'li']" mode="toc_table_width">
|
|
5698
|
+
<tr>
|
|
5699
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
|
5700
|
+
</tr>
|
|
5701
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
|
5702
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
|
5703
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
|
5704
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
|
5705
|
+
<td>
|
|
5706
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
|
5707
|
+
<xsl:copy-of select="."/>
|
|
5708
|
+
</xsl:for-each>
|
|
5709
|
+
</td>
|
|
5710
|
+
</xsl:for-each>
|
|
5711
|
+
<td>333</td> <!-- page number, just for fill -->
|
|
5574
5712
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
|
5575
5713
|
<fo:inline padding-right="5mm"> </fo:inline>
|
|
5576
5714
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
|
5715
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
|
5716
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
|
5717
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
|
5718
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
|
5719
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
|
5720
|
+
</svg>
|
|
5721
|
+
</fo:instream-foreign-object>
|
|
5722
|
+
</fo:inline>
|
|
5577
5723
|
</xsl:template><xsl:template name="convertDate">
|
|
5578
5724
|
<xsl:param name="date"/>
|
|
5579
5725
|
<xsl:param name="format" select="'short'"/>
|
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.3.
|
|
4
|
+
version: 0.3.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-09-
|
|
11
|
+
date: 2021-09-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: htmlentities
|