metanorma-iec 1.3.11 → 1.3.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/asciidoctor/iec/isodoc.rng +9 -0
- data/lib/isodoc/iec/iec.international-standard.xsl +154 -8
- data/lib/metanorma/iec/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: 2f456bfade78154eea4e64af8c86bcaa2f6f5b5392a19d931be4e1de386fb138
|
4
|
+
data.tar.gz: fbbae56036a4c7179fc100775cc04a9ccc07d53c6b7826b91169c229001d8d3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62f2abd80f747ffbef1e4517e31bfbc1d926fc4dd9e0c883d4a8b57c8a35b3fc8d0f9d0b8e4a14f481ccc756b62cc379083a6b6570762cb3c7c37f6f50c8cf41
|
7
|
+
data.tar.gz: 153770b971964def76a96541a9c81135b342caaff0330085df0acf8080a84701f9c6aad8f127efcd204bdd64914e0cb51ae4b77e7940ab9dd4a8b9b274315a64
|
@@ -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">
|
@@ -3049,13 +3049,20 @@
|
|
3049
3049
|
|
3050
3050
|
</xsl:attribute-set><xsl:attribute-set name="list-style">
|
3051
3051
|
|
3052
|
-
</xsl:attribute-set><xsl:
|
3052
|
+
</xsl:attribute-set><xsl:attribute-set name="toc-style">
|
3053
|
+
<xsl:attribute name="line-height">135%</xsl:attribute>
|
3054
|
+
</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">
|
3053
3055
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']" mode="contents"/>
|
3054
3056
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']" mode="contents"/>
|
3055
3057
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']" mode="contents"/>
|
3056
3058
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']" mode="contents"/>
|
3057
3059
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']" mode="contents"/>
|
3058
|
-
</xsl:template><xsl:template name="
|
3060
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault_Contents">
|
3061
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3062
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3063
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3064
|
+
</xsl:for-each>
|
3065
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault_Contents">
|
3059
3066
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']" mode="contents"/>
|
3060
3067
|
|
3061
3068
|
<!-- Normative references -->
|
@@ -3068,13 +3075,33 @@
|
|
3068
3075
|
<!-- Bibliography -->
|
3069
3076
|
<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"/>
|
3070
3077
|
|
3071
|
-
</xsl:template><xsl:template name="
|
3078
|
+
</xsl:template><xsl:template name="processMainSectionsDefault_Contents">
|
3079
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3080
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3081
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3082
|
+
</xsl:for-each>
|
3083
|
+
|
3084
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3085
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3086
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3087
|
+
</xsl:for-each>
|
3088
|
+
|
3089
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3090
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3091
|
+
<xsl:apply-templates select="." mode="contents"/>
|
3092
|
+
</xsl:for-each>
|
3093
|
+
</xsl:template><xsl:template name="OLD_processPrefaceSectionsDefault">
|
3072
3094
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='abstract']"/>
|
3073
3095
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='foreword']"/>
|
3074
3096
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='introduction']"/>
|
3075
3097
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name() != 'abstract' and local-name() != 'foreword' and local-name() != 'introduction' and local-name() != 'acknowledgements']"/>
|
3076
3098
|
<xsl:apply-templates select="/*/*[local-name()='preface']/*[local-name()='acknowledgements']"/>
|
3077
|
-
</xsl:template><xsl:template name="
|
3099
|
+
</xsl:template><xsl:template name="processPrefaceSectionsDefault">
|
3100
|
+
<xsl:for-each select="/*/*[local-name()='preface']/*">
|
3101
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3102
|
+
<xsl:apply-templates select="."/>
|
3103
|
+
</xsl:for-each>
|
3104
|
+
</xsl:template><xsl:template name="OLD_processMainSectionsDefault">
|
3078
3105
|
<xsl:apply-templates select="/*/*[local-name()='sections']/*[local-name()='clause'][@type='scope']"/>
|
3079
3106
|
|
3080
3107
|
<!-- Normative references -->
|
@@ -3086,6 +3113,22 @@
|
|
3086
3113
|
<xsl:apply-templates select="/*/*[local-name()='annex']"/>
|
3087
3114
|
<!-- Bibliography -->
|
3088
3115
|
<xsl:apply-templates select="/*/*[local-name()='bibliography']/*[local-name()='references'][not(@normative='true')]"/>
|
3116
|
+
</xsl:template><xsl:template name="processMainSectionsDefault">
|
3117
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3118
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3119
|
+
<xsl:apply-templates select="."/>
|
3120
|
+
|
3121
|
+
</xsl:for-each>
|
3122
|
+
|
3123
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3124
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3125
|
+
<xsl:apply-templates select="."/>
|
3126
|
+
</xsl:for-each>
|
3127
|
+
|
3128
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3129
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3130
|
+
<xsl:apply-templates select="."/>
|
3131
|
+
</xsl:for-each>
|
3089
3132
|
</xsl:template><xsl:template match="text()">
|
3090
3133
|
<xsl:value-of select="."/>
|
3091
3134
|
</xsl:template><xsl:template match="*[local-name()='br']">
|
@@ -5685,6 +5728,13 @@
|
|
5685
5728
|
</xsl:attribute>
|
5686
5729
|
<xsl:apply-templates mode="svg_update"/>
|
5687
5730
|
</xsl:copy>
|
5731
|
+
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
5732
|
+
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
5733
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
5734
|
+
<xsl:call-template name="image_svg">
|
5735
|
+
<xsl:with-param name="name" select="$name"/>
|
5736
|
+
</xsl:call-template>
|
5737
|
+
</xsl:for-each>
|
5688
5738
|
</xsl:template><xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
5689
5739
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
5690
5740
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -5789,7 +5839,7 @@
|
|
5789
5839
|
</fo:basic-link>
|
5790
5840
|
</fo:block>
|
5791
5841
|
</fo:block-container>
|
5792
|
-
</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">
|
5842
|
+
</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">
|
5793
5843
|
<xsl:apply-templates mode="contents"/>
|
5794
5844
|
<xsl:text> </xsl:text>
|
5795
5845
|
</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">
|
@@ -6469,14 +6519,15 @@
|
|
6469
6519
|
</xsl:if>
|
6470
6520
|
</xsl:template><xsl:variable name="localized.source">
|
6471
6521
|
<xsl:call-template name="getLocalizedString">
|
6472
|
-
|
6473
|
-
|
6522
|
+
<xsl:with-param name="key">source</xsl:with-param>
|
6523
|
+
</xsl:call-template>
|
6474
6524
|
</xsl:variable><xsl:template match="*[local-name() = 'origin']">
|
6475
6525
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
6476
6526
|
<xsl:if test="normalize-space(@citeas) = ''">
|
6477
6527
|
<xsl:attribute name="fox:alt-text"><xsl:value-of select="@bibitemid"/></xsl:attribute>
|
6478
6528
|
</xsl:if>
|
6479
6529
|
|
6530
|
+
|
6480
6531
|
<fo:inline>
|
6481
6532
|
|
6482
6533
|
|
@@ -6484,6 +6535,7 @@
|
|
6484
6535
|
|
6485
6536
|
|
6486
6537
|
|
6538
|
+
|
6487
6539
|
<xsl:call-template name="getTitle">
|
6488
6540
|
<xsl:with-param name="name" select="'title-source'"/>
|
6489
6541
|
</xsl:call-template>
|
@@ -6495,6 +6547,7 @@
|
|
6495
6547
|
<fo:inline xsl:use-attribute-sets="origin-style">
|
6496
6548
|
<xsl:apply-templates/>
|
6497
6549
|
</fo:inline>
|
6550
|
+
|
6498
6551
|
</fo:basic-link>
|
6499
6552
|
</xsl:template><xsl:template match="*[local-name() = 'modification']/*[local-name() = 'p']">
|
6500
6553
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
@@ -6561,6 +6614,9 @@
|
|
6561
6614
|
|
6562
6615
|
</xsl:if>
|
6563
6616
|
|
6617
|
+
<xsl:variable name="citeas" select="java:replaceAll(java:java.lang.String.new(@citeas),'^\[?(.+?)\]?$','$1')"/> <!-- remove leading and trailing brackets -->
|
6618
|
+
<xsl:variable name="text" select="normalize-space()"/>
|
6619
|
+
|
6564
6620
|
|
6565
6621
|
|
6566
6622
|
<fo:basic-link internal-destination="{@bibitemid}" fox:alt-text="{@citeas}">
|
@@ -6573,7 +6629,9 @@
|
|
6573
6629
|
|
6574
6630
|
|
6575
6631
|
</xsl:if>
|
6576
|
-
|
6632
|
+
|
6633
|
+
|
6634
|
+
|
6577
6635
|
<xsl:apply-templates/>
|
6578
6636
|
</fo:basic-link>
|
6579
6637
|
|
@@ -7077,9 +7135,97 @@
|
|
7077
7135
|
<fo:block-container border="1pt solid black" width="50%">
|
7078
7136
|
<fo:block> </fo:block>
|
7079
7137
|
</fo:block-container>
|
7138
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']">
|
7139
|
+
<xsl:param name="colwidths"/>
|
7140
|
+
<xsl:variable name="colwidths_">
|
7141
|
+
<xsl:choose>
|
7142
|
+
<xsl:when test="not($colwidths)">
|
7143
|
+
<xsl:variable name="toc_table_simple">
|
7144
|
+
<tbody>
|
7145
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7146
|
+
</tbody>
|
7147
|
+
</xsl:variable>
|
7148
|
+
<xsl:variable name="cols-count" select="count(xalan:nodeset($toc_table_simple)/*/tr[1]/td)"/>
|
7149
|
+
<xsl:call-template name="calculate-column-widths">
|
7150
|
+
<xsl:with-param name="cols-count" select="$cols-count"/>
|
7151
|
+
<xsl:with-param name="table" select="$toc_table_simple"/>
|
7152
|
+
</xsl:call-template>
|
7153
|
+
</xsl:when>
|
7154
|
+
<xsl:otherwise>
|
7155
|
+
<xsl:copy-of select="$colwidths"/>
|
7156
|
+
</xsl:otherwise>
|
7157
|
+
</xsl:choose>
|
7158
|
+
</xsl:variable>
|
7159
|
+
<fo:block role="TOCI" space-after="16pt">
|
7160
|
+
<fo:table width="100%" table-layout="fixed">
|
7161
|
+
<xsl:for-each select="xalan:nodeset($colwidths_)/column">
|
7162
|
+
<fo:table-column column-width="proportional-column-width({.})"/>
|
7163
|
+
</xsl:for-each>
|
7164
|
+
<fo:table-body>
|
7165
|
+
<xsl:apply-templates/>
|
7166
|
+
</fo:table-body>
|
7167
|
+
</fo:table>
|
7168
|
+
</fo:block>
|
7169
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']">
|
7170
|
+
<fo:table-row min-height="5mm">
|
7171
|
+
<xsl:apply-templates/>
|
7172
|
+
</fo:table-row>
|
7173
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'li']/*[local-name() = 'p']">
|
7174
|
+
<xsl:apply-templates/>
|
7175
|
+
</xsl:template><xsl:template match="*[local-name() = 'toc']//*[local-name() = 'xref']" priority="3">
|
7176
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7177
|
+
<xsl:variable name="target" select="@target"/>
|
7178
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7179
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7180
|
+
<fo:table-cell>
|
7181
|
+
<fo:block>
|
7182
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7183
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7184
|
+
<xsl:choose>
|
7185
|
+
<xsl:when test="self::text()"><xsl:value-of select="."/></xsl:when>
|
7186
|
+
<xsl:otherwise><xsl:apply-templates select="."/></xsl:otherwise>
|
7187
|
+
</xsl:choose>
|
7188
|
+
</xsl:for-each>
|
7189
|
+
</fo:basic-link>
|
7190
|
+
</fo:block>
|
7191
|
+
</fo:table-cell>
|
7192
|
+
</xsl:for-each>
|
7193
|
+
<!-- last column - for page numbers -->
|
7194
|
+
<fo:table-cell text-align="right" font-size="10pt" font-weight="bold" font-family="Arial">
|
7195
|
+
<fo:block>
|
7196
|
+
<fo:basic-link internal-destination="{$target}" fox:alt-text="{.}">
|
7197
|
+
<fo:page-number-citation ref-id="{$target}"/>
|
7198
|
+
</fo:basic-link>
|
7199
|
+
</fo:block>
|
7200
|
+
</fo:table-cell>
|
7201
|
+
</xsl:template><xsl:template match="*" mode="toc_table_width">
|
7202
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7203
|
+
</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">
|
7204
|
+
<tr>
|
7205
|
+
<xsl:apply-templates mode="toc_table_width"/>
|
7206
|
+
</tr>
|
7207
|
+
</xsl:template><xsl:template match="*[local-name() = 'xref']" mode="toc_table_width">
|
7208
|
+
<!-- <xref target="cgpm9th1948r6">1.6.3<tab/>“9th CGPM, 1948:<tab/>decision to establish the SI”</xref> -->
|
7209
|
+
<xsl:for-each select="*[local-name() = 'tab']">
|
7210
|
+
<xsl:variable name="current_id" select="generate-id()"/>
|
7211
|
+
<td>
|
7212
|
+
<xsl:for-each select="following-sibling::node()[not(self::*[local-name() = 'tab']) and preceding-sibling::*[local-name() = 'tab'][1][generate-id() = $current_id]]">
|
7213
|
+
<xsl:copy-of select="."/>
|
7214
|
+
</xsl:for-each>
|
7215
|
+
</td>
|
7216
|
+
</xsl:for-each>
|
7217
|
+
<td>333</td> <!-- page number, just for fill -->
|
7080
7218
|
</xsl:template><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']"/><xsl:template match="*[local-name() = 'variant-title'][@type = 'sub']" mode="subtitle">
|
7081
7219
|
<fo:inline padding-right="5mm"> </fo:inline>
|
7082
7220
|
<fo:inline><xsl:apply-templates/></fo:inline>
|
7221
|
+
</xsl:template><xsl:template match="*[local-name() = 'blacksquare']" name="blacksquare">
|
7222
|
+
<fo:inline padding-right="2.5mm" baseline-shift="5%">
|
7223
|
+
<fo:instream-foreign-object content-height="2mm" content-width="2mm" fox:alt-text="Quad">
|
7224
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" viewBox="0 0 2 2">
|
7225
|
+
<rect x="0" y="0" width="2" height="2" fill="black"/>
|
7226
|
+
</svg>
|
7227
|
+
</fo:instream-foreign-object>
|
7228
|
+
</fo:inline>
|
7083
7229
|
</xsl:template><xsl:template name="convertDate">
|
7084
7230
|
<xsl:param name="date"/>
|
7085
7231
|
<xsl:param name="format" select="'short'"/>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-iec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ribose Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
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: metanorma-iso
|