metanorma-ieee 1.6.0 → 1.6.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/ieee/ieee.amendment.xsl +25 -24
- data/lib/isodoc/ieee/ieee.standard.xsl +25 -24
- data/lib/isodoc/ieee/metadata.rb +2 -3
- data/lib/isodoc/ieee/presentation_bibitem.rb +1 -3
- data/lib/metanorma/ieee/biblio.rng +18 -8
- data/lib/metanorma/ieee/front.rb +45 -23
- data/lib/metanorma/ieee/isodoc.rng +27 -10
- data/lib/metanorma/ieee/validate_section.rb +3 -3
- data/lib/metanorma/ieee/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: aca7cddda83247276902cf2d29952fe430450ecb02220fd743d74646293a494a
|
|
4
|
+
data.tar.gz: 00f548b9f73bbc82bd537d76c1941ab2151394b4b97588d70c4e2bc8c8d48bbe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9effc81230faf5a2252d556da0ceac4864fd72dde95bea3a6310fe8c42897a8d82c2e2a163b040cad6ee34ee29a082d4fefc72268939b7a759eb5b0e7a669dec
|
|
7
|
+
data.tar.gz: dd183da8cad2eb8e7f63961b718af3f4986943ec2cc2d7f22e6d64769ba0c2b027163f224ade70c744b4d75dabbf8f60fd78dda1ee588001b370aaaf14d8ee73
|
|
@@ -2272,22 +2272,6 @@
|
|
|
2272
2272
|
<!-- title -->
|
|
2273
2273
|
<!-- ====== -->
|
|
2274
2274
|
|
|
2275
|
-
<!-- <xsl:template match="mn:annex/mn:title">
|
|
2276
|
-
<fo:block font-size="16pt" text-align="center" margin-bottom="48pt" keep-with-next="always">
|
|
2277
|
-
<xsl:apply-templates />
|
|
2278
|
-
</fo:block>
|
|
2279
|
-
</xsl:template> -->
|
|
2280
|
-
|
|
2281
|
-
<!-- Bibliography -->
|
|
2282
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
|
|
2283
|
-
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
|
2284
|
-
|
|
2285
|
-
<xsl:call-template name="refine_references-non-normative-title-style"/>
|
|
2286
|
-
|
|
2287
|
-
<xsl:apply-templates/>
|
|
2288
|
-
</fo:block>
|
|
2289
|
-
</xsl:template>
|
|
2290
|
-
|
|
2291
2275
|
<!-- <xsl:template match="mn:fmt-title[@inline-header = 'true'][following-sibling::*[1][self::mn:p] or following-sibling::*[1][self::mn:clause] or not(following-sibling::*)]" priority="3"> -->
|
|
2292
2276
|
<xsl:template match="mn:fmt-title[../@inline-header = 'true'][following-sibling::*[1][self::mn:p] or following-sibling::*[1][self::mn:clause] or not(following-sibling::*)]" priority="3">
|
|
2293
2277
|
<fo:block>
|
|
@@ -2358,7 +2342,7 @@
|
|
|
2358
2342
|
</xsl:variable>
|
|
2359
2343
|
|
|
2360
2344
|
<xsl:choose>
|
|
2361
|
-
<xsl:when test="string-length($section) != 0 and $element-name = 'fo:block' and ($current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report')">
|
|
2345
|
+
<xsl:when test="string-length($section) != 0 and $element-name = 'fo:block' and ($current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report') and not(parent::mn:references[not(@normative='true')])">
|
|
2362
2346
|
<fo:list-block>
|
|
2363
2347
|
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
2364
2348
|
|
|
@@ -4982,7 +4966,7 @@
|
|
|
4982
4966
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
4983
4967
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
|
4984
4968
|
|
|
4985
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
4969
|
+
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() > 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
4986
4970
|
|
|
4987
4971
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
4988
4972
|
|
|
@@ -13937,16 +13921,17 @@
|
|
|
13937
13921
|
<!-- END Admonition -->
|
|
13938
13922
|
<!-- ================ -->
|
|
13939
13923
|
|
|
13940
|
-
<xsl:attribute-set name="
|
|
13924
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
13941
13925
|
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
13942
13926
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13943
13927
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
13928
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
13944
13929
|
<xsl:attribute name="margin-bottom">36pt</xsl:attribute>
|
|
13945
13930
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13946
13931
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13947
13932
|
</xsl:attribute-set>
|
|
13948
13933
|
|
|
13949
|
-
<xsl:template name="
|
|
13934
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
13950
13935
|
</xsl:template>
|
|
13951
13936
|
|
|
13952
13937
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -16027,6 +16012,9 @@
|
|
|
16027
16012
|
<!-- ===================================== -->
|
|
16028
16013
|
|
|
16029
16014
|
<xsl:attribute-set name="annex-title-style">
|
|
16015
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
16016
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
16017
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
|
16030
16018
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
16031
16019
|
|
|
16032
16020
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -16162,9 +16150,6 @@
|
|
|
16162
16150
|
<xsl:if test="ancestor::mn:acknowledgements">
|
|
16163
16151
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
16164
16152
|
</xsl:if>
|
|
16165
|
-
<xsl:if test="ancestor::mn:annex">
|
|
16166
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
16167
|
-
</xsl:if>
|
|
16168
16153
|
<xsl:if test="not(following-sibling::*[1][self::mn:clause])">
|
|
16169
16154
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
16170
16155
|
</xsl:if>
|
|
@@ -16172,6 +16157,12 @@
|
|
|
16172
16157
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
16173
16158
|
</xsl:if>
|
|
16174
16159
|
</xsl:if>
|
|
16160
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
16161
|
+
<xsl:variable name="annex_title_styles">
|
|
16162
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
16163
|
+
</xsl:variable>
|
|
16164
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
16165
|
+
</xsl:if>
|
|
16175
16166
|
<xsl:if test="$level >= 2">
|
|
16176
16167
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
16177
16168
|
</xsl:if>
|
|
@@ -16190,6 +16181,13 @@
|
|
|
16190
16181
|
<xsl:attribute name="space-before"><xsl:value-of select="$space_before"/></xsl:attribute>
|
|
16191
16182
|
<xsl:if test="ancestor::mn:introduction"><xsl:attribute name="margin-top"><xsl:value-of select="$space_before"/></xsl:attribute></xsl:if>
|
|
16192
16183
|
|
|
16184
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
16185
|
+
<xsl:variable name="bibliography_title_styles">
|
|
16186
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
16187
|
+
</xsl:variable>
|
|
16188
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
16189
|
+
</xsl:if>
|
|
16190
|
+
|
|
16193
16191
|
<xsl:if test="@type = 'floating-title' or @type = 'section-title'">
|
|
16194
16192
|
<xsl:copy-of select="@id"/>
|
|
16195
16193
|
</xsl:if>
|
|
@@ -16198,9 +16196,12 @@
|
|
|
16198
16196
|
</xsl:template> <!-- refine_title-style -->
|
|
16199
16197
|
|
|
16200
16198
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
16199
|
+
<xsl:param name="num"/>
|
|
16201
16200
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
16202
16201
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
16203
|
-
<xsl:apply-templates select="."
|
|
16202
|
+
<xsl:apply-templates select=".">
|
|
16203
|
+
<xsl:with-param name="num" select="$num"/>
|
|
16204
|
+
</xsl:apply-templates>
|
|
16204
16205
|
</xsl:for-each>
|
|
16205
16206
|
</xsl:template>
|
|
16206
16207
|
|
|
@@ -2272,22 +2272,6 @@
|
|
|
2272
2272
|
<!-- title -->
|
|
2273
2273
|
<!-- ====== -->
|
|
2274
2274
|
|
|
2275
|
-
<!-- <xsl:template match="mn:annex/mn:title">
|
|
2276
|
-
<fo:block font-size="16pt" text-align="center" margin-bottom="48pt" keep-with-next="always">
|
|
2277
|
-
<xsl:apply-templates />
|
|
2278
|
-
</fo:block>
|
|
2279
|
-
</xsl:template> -->
|
|
2280
|
-
|
|
2281
|
-
<!-- Bibliography -->
|
|
2282
|
-
<xsl:template match="mn:references[not(@normative='true')]/mn:fmt-title">
|
|
2283
|
-
<fo:block xsl:use-attribute-sets="references-non-normative-title-style">
|
|
2284
|
-
|
|
2285
|
-
<xsl:call-template name="refine_references-non-normative-title-style"/>
|
|
2286
|
-
|
|
2287
|
-
<xsl:apply-templates/>
|
|
2288
|
-
</fo:block>
|
|
2289
|
-
</xsl:template>
|
|
2290
|
-
|
|
2291
2275
|
<!-- <xsl:template match="mn:fmt-title[@inline-header = 'true'][following-sibling::*[1][self::mn:p] or following-sibling::*[1][self::mn:clause] or not(following-sibling::*)]" priority="3"> -->
|
|
2292
2276
|
<xsl:template match="mn:fmt-title[../@inline-header = 'true'][following-sibling::*[1][self::mn:p] or following-sibling::*[1][self::mn:clause] or not(following-sibling::*)]" priority="3">
|
|
2293
2277
|
<fo:block>
|
|
@@ -2358,7 +2342,7 @@
|
|
|
2358
2342
|
</xsl:variable>
|
|
2359
2343
|
|
|
2360
2344
|
<xsl:choose>
|
|
2361
|
-
<xsl:when test="string-length($section) != 0 and $element-name = 'fo:block' and ($current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report')">
|
|
2345
|
+
<xsl:when test="string-length($section) != 0 and $element-name = 'fo:block' and ($current_template = 'whitepaper' or $current_template = 'icap-whitepaper' or $current_template = 'industry-connection-report') and not(parent::mn:references[not(@normative='true')])">
|
|
2362
2346
|
<fo:list-block>
|
|
2363
2347
|
<xsl:copy-of select="xalan:nodeset($title_styles)/styles/@*"/>
|
|
2364
2348
|
|
|
@@ -4982,7 +4966,7 @@
|
|
|
4982
4966
|
<xsl:variable name="non_white_space">[^\s\u3000-\u9FFF]</xsl:variable>
|
|
4983
4967
|
<xsl:variable name="regex_dots_units">((\b((<xsl:value-of select="$non_white_space"/>{1,3}\.<xsl:value-of select="$non_white_space"/>+)|(<xsl:value-of select="$non_white_space"/>+\.<xsl:value-of select="$non_white_space"/>{1,3}))\b)|(\.<xsl:value-of select="$non_white_space"/>{1,3})\b)</xsl:variable>
|
|
4984
4968
|
|
|
4985
|
-
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
4969
|
+
<xsl:template match="text()[not(ancestor::mn:bibdata or ancestor::mn:fmt-link[not(contains(normalize-space(),' '))] or ancestor::mn:sourcecode or (ancestor::mn:tt and ancestor::mn:table and string-length() > 20) or ancestor::*[local-name() = 'math'] or ancestor::*[local-name() = 'svg'] or ancestor::mn:name or ancestor::mn:fmt-name or starts-with(., 'http://') or starts-with(., 'https://') or starts-with(., 'www.') or normalize-space() = '' )]" name="keep_together_standard_number" mode="update_xml_enclose_keep-together_within-line">
|
|
4986
4970
|
|
|
4987
4971
|
<xsl:variable name="parent" select="local-name(..)"/>
|
|
4988
4972
|
|
|
@@ -13937,16 +13921,17 @@
|
|
|
13937
13921
|
<!-- END Admonition -->
|
|
13938
13922
|
<!-- ================ -->
|
|
13939
13923
|
|
|
13940
|
-
<xsl:attribute-set name="
|
|
13924
|
+
<xsl:attribute-set name="bibliography-title-style">
|
|
13941
13925
|
<xsl:attribute name="font-size">16pt</xsl:attribute>
|
|
13942
13926
|
<xsl:attribute name="font-weight">bold</xsl:attribute>
|
|
13943
13927
|
<xsl:attribute name="margin-top">6pt</xsl:attribute>
|
|
13928
|
+
<xsl:attribute name="space-before">0pt</xsl:attribute>
|
|
13944
13929
|
<xsl:attribute name="margin-bottom">36pt</xsl:attribute>
|
|
13945
13930
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
13946
13931
|
<xsl:attribute name="role">H1</xsl:attribute>
|
|
13947
13932
|
</xsl:attribute-set>
|
|
13948
13933
|
|
|
13949
|
-
<xsl:template name="
|
|
13934
|
+
<xsl:template name="refine_bibliography-title-style">
|
|
13950
13935
|
</xsl:template>
|
|
13951
13936
|
|
|
13952
13937
|
<!-- bibitem in Normative References (references/@normative="true") -->
|
|
@@ -16027,6 +16012,9 @@
|
|
|
16027
16012
|
<!-- ===================================== -->
|
|
16028
16013
|
|
|
16029
16014
|
<xsl:attribute-set name="annex-title-style">
|
|
16015
|
+
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
|
16016
|
+
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
16017
|
+
<xsl:attribute name="margin-bottom">24pt</xsl:attribute>
|
|
16030
16018
|
</xsl:attribute-set> <!-- annex-title-style -->
|
|
16031
16019
|
|
|
16032
16020
|
<xsl:template name="refine_annex-title-style">
|
|
@@ -16162,9 +16150,6 @@
|
|
|
16162
16150
|
<xsl:if test="ancestor::mn:acknowledgements">
|
|
16163
16151
|
<xsl:attribute name="font-size">11pt</xsl:attribute>
|
|
16164
16152
|
</xsl:if>
|
|
16165
|
-
<xsl:if test="ancestor::mn:annex">
|
|
16166
|
-
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
|
16167
|
-
</xsl:if>
|
|
16168
16153
|
<xsl:if test="not(following-sibling::*[1][self::mn:clause])">
|
|
16169
16154
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
16170
16155
|
</xsl:if>
|
|
@@ -16172,6 +16157,12 @@
|
|
|
16172
16157
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
16173
16158
|
</xsl:if>
|
|
16174
16159
|
</xsl:if>
|
|
16160
|
+
<xsl:if test="parent::mn:annex"><!-- Annex title -->
|
|
16161
|
+
<xsl:variable name="annex_title_styles">
|
|
16162
|
+
<styles xsl:use-attribute-sets="annex-title-style"><xsl:call-template name="refine_annex-title-style"/></styles>
|
|
16163
|
+
</xsl:variable>
|
|
16164
|
+
<xsl:copy-of select="xalan:nodeset($annex_title_styles)/styles/@*"/>
|
|
16165
|
+
</xsl:if>
|
|
16175
16166
|
<xsl:if test="$level >= 2">
|
|
16176
16167
|
<xsl:attribute name="margin-bottom">12pt</xsl:attribute>
|
|
16177
16168
|
</xsl:if>
|
|
@@ -16190,6 +16181,13 @@
|
|
|
16190
16181
|
<xsl:attribute name="space-before"><xsl:value-of select="$space_before"/></xsl:attribute>
|
|
16191
16182
|
<xsl:if test="ancestor::mn:introduction"><xsl:attribute name="margin-top"><xsl:value-of select="$space_before"/></xsl:attribute></xsl:if>
|
|
16192
16183
|
|
|
16184
|
+
<xsl:if test="parent::mn:references[not(@normative='true')]"><!-- Bibliography section title -->
|
|
16185
|
+
<xsl:variable name="bibliography_title_styles">
|
|
16186
|
+
<styles xsl:use-attribute-sets="bibliography-title-style"><xsl:call-template name="refine_bibliography-title-style"/></styles>
|
|
16187
|
+
</xsl:variable>
|
|
16188
|
+
<xsl:copy-of select="xalan:nodeset($bibliography_title_styles)/styles/@*"/>
|
|
16189
|
+
</xsl:if>
|
|
16190
|
+
|
|
16193
16191
|
<xsl:if test="@type = 'floating-title' or @type = 'section-title'">
|
|
16194
16192
|
<xsl:copy-of select="@id"/>
|
|
16195
16193
|
</xsl:if>
|
|
@@ -16198,9 +16196,12 @@
|
|
|
16198
16196
|
</xsl:template> <!-- refine_title-style -->
|
|
16199
16197
|
|
|
16200
16198
|
<xsl:template name="processPrefaceSectionsDefault">
|
|
16199
|
+
<xsl:param name="num"/>
|
|
16201
16200
|
<xsl:for-each select="/*/mn:preface/*[not(self::mn:note or self::mn:admonition)]">
|
|
16202
16201
|
<xsl:sort select="@displayorder" data-type="number"/>
|
|
16203
|
-
<xsl:apply-templates select="."
|
|
16202
|
+
<xsl:apply-templates select=".">
|
|
16203
|
+
<xsl:with-param name="num" select="$num"/>
|
|
16204
|
+
</xsl:apply-templates>
|
|
16204
16205
|
</xsl:for-each>
|
|
16205
16206
|
</xsl:template>
|
|
16206
16207
|
|
data/lib/isodoc/ieee/metadata.rb
CHANGED
|
@@ -7,10 +7,9 @@ module IsoDoc
|
|
|
7
7
|
def initialize(lang, script, i18n, fonts_options = {})
|
|
8
8
|
super
|
|
9
9
|
@metadata[:ieee_sasb_approveddate] = "<Date Approved>"
|
|
10
|
-
logos
|
|
11
10
|
end
|
|
12
11
|
|
|
13
|
-
def
|
|
12
|
+
def images(_isoxml, _out)
|
|
14
13
|
here = File.join(File.dirname(__FILE__), "html")
|
|
15
14
|
suffix = ".emz"
|
|
16
15
|
@icap and suffix = "_icap.emz"
|
|
@@ -143,7 +142,7 @@ module IsoDoc
|
|
|
143
142
|
d = isoxml.at(ns("//bibdata/ext/subdoctype"))
|
|
144
143
|
@icap = d&.text&.downcase == "icap"
|
|
145
144
|
@icr = d&.text&.downcase == "industry-connection-report"
|
|
146
|
-
|
|
145
|
+
images(isoxml, nil)
|
|
147
146
|
end
|
|
148
147
|
|
|
149
148
|
def ddMMMyyyy(isodate)
|
|
@@ -30,7 +30,7 @@ module IsoDoc
|
|
|
30
30
|
def author_date(xml, renderings)
|
|
31
31
|
author_date?(xml) or return
|
|
32
32
|
cit = renderings[xml["id"]][:citation][:author_date]
|
|
33
|
-
xml << "<docidentifier type='
|
|
33
|
+
xml << "<docidentifier type='author-date'>#{cit}</docidentifier>"
|
|
34
34
|
xml.at(ns("./biblio-tag"))&.remove
|
|
35
35
|
xml << "<biblio-tag>#{cit}, </biblio-tag>"
|
|
36
36
|
end
|
|
@@ -48,8 +48,6 @@ module IsoDoc
|
|
|
48
48
|
def creatornames(bib)
|
|
49
49
|
::Relaton::Render::Ieee::General
|
|
50
50
|
.new(language: @lang, i18nhash: @i18n.get,
|
|
51
|
-
# template: { (bib["type"] || "misc").to_sym =>
|
|
52
|
-
# "{{ creatornames }}" },
|
|
53
51
|
template: "{{ creatornames }}",
|
|
54
52
|
extenttemplate: { (bib["type"] || "misc").to_sym => "{{page}}" },
|
|
55
53
|
sizetemplate: { (bib["type"] || "misc").to_sym => "{{data}}" })
|
|
@@ -466,11 +466,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
466
466
|
<a:documentation>Contact information for the organization, including address, phone number, and email</a:documentation>
|
|
467
467
|
</ref>
|
|
468
468
|
</optional>
|
|
469
|
-
<
|
|
469
|
+
<zeroOrMore>
|
|
470
470
|
<ref name="logo">
|
|
471
471
|
<a:documentation>A logo for the organization</a:documentation>
|
|
472
472
|
</ref>
|
|
473
|
-
</
|
|
473
|
+
</zeroOrMore>
|
|
474
474
|
</define>
|
|
475
475
|
<define name="orgname">
|
|
476
476
|
<element name="name">
|
|
@@ -502,6 +502,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
502
502
|
</define>
|
|
503
503
|
<define name="logo">
|
|
504
504
|
<element name="logo">
|
|
505
|
+
<optional>
|
|
506
|
+
<attribute name="type">
|
|
507
|
+
<a:documentation>The type of logo</a:documentation>
|
|
508
|
+
</attribute>
|
|
509
|
+
</optional>
|
|
505
510
|
<ref name="image-no-id"/>
|
|
506
511
|
</element>
|
|
507
512
|
</define>
|
|
@@ -513,6 +518,11 @@ Editorial and advisory groups are represented as consecutive subdivisions of the
|
|
|
513
518
|
<a:documentation>Description of what is being depicted</a:documentation>
|
|
514
519
|
</attribute>
|
|
515
520
|
</optional>
|
|
521
|
+
<optional>
|
|
522
|
+
<attribute name="type">
|
|
523
|
+
<a:documentation>Description of what kind of depiction this</a:documentation>
|
|
524
|
+
</attribute>
|
|
525
|
+
</optional>
|
|
516
526
|
<zeroOrMore>
|
|
517
527
|
<ref name="image-no-id">
|
|
518
528
|
<a:documentation>A visual depiction of the bibliographic item</a:documentation>
|
|
@@ -690,7 +700,7 @@ Examples include GRID, LEI, CrossRef, and Ringgold</a:documentation>
|
|
|
690
700
|
<define name="CitationType">
|
|
691
701
|
<attribute name="bibitemid">
|
|
692
702
|
<a:documentation>Bibliographic item that the citation applies to, referenced as the anchor of a bibliographic description</a:documentation>
|
|
693
|
-
<
|
|
703
|
+
<ref name="IdRefType"/>
|
|
694
704
|
</attribute>
|
|
695
705
|
<choice>
|
|
696
706
|
<zeroOrMore>
|
|
@@ -1236,9 +1246,9 @@ Refer to `BibliographicItem` for definitions</a:documentation>
|
|
|
1236
1246
|
<optional>
|
|
1237
1247
|
<ref name="validity"/>
|
|
1238
1248
|
</optional>
|
|
1239
|
-
<
|
|
1249
|
+
<zeroOrMore>
|
|
1240
1250
|
<ref name="depiction"/>
|
|
1241
|
-
</
|
|
1251
|
+
</zeroOrMore>
|
|
1242
1252
|
</define>
|
|
1243
1253
|
<define name="btitle">
|
|
1244
1254
|
<a:documentation>A title of a bibliographic item, associated with a type of title</a:documentation>
|
|
@@ -1296,17 +1306,17 @@ for which this claim of validity is made, if applicable</a:documentation>
|
|
|
1296
1306
|
</define>
|
|
1297
1307
|
<define name="validityBegins">
|
|
1298
1308
|
<element name="validityBegins">
|
|
1299
|
-
<ref name="
|
|
1309
|
+
<ref name="ISO8601DateTime"/>
|
|
1300
1310
|
</element>
|
|
1301
1311
|
</define>
|
|
1302
1312
|
<define name="validityEnds">
|
|
1303
1313
|
<element name="validityEnds">
|
|
1304
|
-
<ref name="
|
|
1314
|
+
<ref name="ISO8601DateTime"/>
|
|
1305
1315
|
</element>
|
|
1306
1316
|
</define>
|
|
1307
1317
|
<define name="validityRevision">
|
|
1308
1318
|
<element name="revision">
|
|
1309
|
-
<ref name="
|
|
1319
|
+
<ref name="ISO8601DateTime"/>
|
|
1310
1320
|
</element>
|
|
1311
1321
|
</define>
|
|
1312
1322
|
<define name="TypedTitleString">
|
data/lib/metanorma/ieee/front.rb
CHANGED
|
@@ -52,22 +52,32 @@ module Metanorma
|
|
|
52
52
|
end
|
|
53
53
|
|
|
54
54
|
def metadata_other_id(node, xml)
|
|
55
|
-
a = node.attr("isbn-pdf") and
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
55
|
+
# a = node.attr("isbn-pdf") and
|
|
56
|
+
add_noko_elem(xml, "docidentifier", node.attr("isbn-pdf"),
|
|
57
|
+
type: "ISBN", scope: "PDF")
|
|
58
|
+
# xml.docidentifier a, type: "ISBN", scope: "PDF"
|
|
59
|
+
# a = node.attr("isbn-print") and
|
|
60
|
+
# xml.docidentifier a, type: "ISBN", scope: "print"
|
|
61
|
+
add_noko_elem(xml, "docidentifier", node.attr("isbn-print"),
|
|
62
|
+
type: "ISBN", scope: "print")
|
|
63
|
+
add_noko_elem(xml, "docnumber", node.attr("docnumber"))
|
|
64
|
+
# xml.docnumber node.attr("docnumber")
|
|
60
65
|
end
|
|
61
66
|
|
|
62
67
|
def metadata_id(node, xml)
|
|
63
68
|
if id = node.attr("docidentifier")
|
|
64
|
-
xml.docidentifier id, **attr_code(type: "IEEE", primary: "true")
|
|
69
|
+
# xml.docidentifier id, **attr_code(type: "IEEE", primary: "true")
|
|
70
|
+
add_noko_elem(xml, "docidentifier", id, type: "IEEE", primary: "true")
|
|
65
71
|
else ieee_id(node, xml)
|
|
66
72
|
end
|
|
67
|
-
id = node.attr("stdid-pdf") and
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
# id = node.attr("stdid-pdf") and
|
|
74
|
+
# xml.docidentifier id, type: "IEEE", scope: "PDF"
|
|
75
|
+
add_noko_elem(xml, "docidentifier", node.attr("stdid-pdf"),
|
|
76
|
+
type: "IEEE", scope: "PDF")
|
|
77
|
+
# id = node.attr("stdid-print") and
|
|
78
|
+
# xml.docidentifier id, type: "IEEE", scope: "print"
|
|
79
|
+
add_noko_elem(xml, "docidentifier", node.attr("stdid-print"),
|
|
80
|
+
type: "IEEE", scope: "print")
|
|
71
81
|
end
|
|
72
82
|
|
|
73
83
|
def ieee_id(node, xml)
|
|
@@ -128,8 +138,11 @@ module Metanorma
|
|
|
128
138
|
end
|
|
129
139
|
|
|
130
140
|
def ieee_id_out(xml, params)
|
|
131
|
-
id = pubid_select(params).create(**params)
|
|
132
|
-
xml.docidentifier id.to_s, type: "IEEE", primary: "true"
|
|
141
|
+
# id = pubid_select(params).create(**params)
|
|
142
|
+
# xml.docidentifier id.to_s, type: "IEEE", primary: "true"
|
|
143
|
+
add_noko_elem(xml, "docidentifier",
|
|
144
|
+
pubid_select(params).create(**params).to_s,
|
|
145
|
+
type: "IEEE", primary: "true")
|
|
133
146
|
end
|
|
134
147
|
|
|
135
148
|
def pubid_select(_params)
|
|
@@ -148,7 +161,8 @@ module Metanorma
|
|
|
148
161
|
status = node.attr("status") || node.attr("docstage") ||
|
|
149
162
|
(node.attr("version") || node.attr("draft") ? "draft" : "approved")
|
|
150
163
|
xml.status do |s|
|
|
151
|
-
s
|
|
164
|
+
add_noko_elem(s, "stage", status)
|
|
165
|
+
# s.stage status
|
|
152
166
|
end
|
|
153
167
|
end
|
|
154
168
|
|
|
@@ -157,7 +171,8 @@ module Metanorma
|
|
|
157
171
|
end
|
|
158
172
|
|
|
159
173
|
def metadata_subdoctype(node, xml)
|
|
160
|
-
xml.subdoctype (node.attr("docsubtype") || "document")
|
|
174
|
+
# xml.subdoctype (node.attr("docsubtype") || "document")
|
|
175
|
+
add_noko_elem(xml, "subdoctype", node.attr("docsubtype") || "document")
|
|
161
176
|
end
|
|
162
177
|
|
|
163
178
|
def org_abbrev
|
|
@@ -172,25 +187,32 @@ module Metanorma
|
|
|
172
187
|
|
|
173
188
|
def metadata_ext(node, xml)
|
|
174
189
|
super
|
|
175
|
-
|
|
190
|
+
add_noko_elem(xml, "trial_use", node.attr("trial-use"))
|
|
176
191
|
program(node, xml)
|
|
177
192
|
end
|
|
178
193
|
|
|
179
194
|
def program(node, xml)
|
|
180
|
-
|
|
195
|
+
add_noko_elem(xml, "program", node.attr("program"))
|
|
181
196
|
end
|
|
182
197
|
|
|
183
198
|
def structured_id(node, xml)
|
|
184
199
|
node.attr("docnumber") or return
|
|
185
200
|
xml.structuredidentifier do |i|
|
|
186
|
-
i
|
|
187
|
-
i.
|
|
201
|
+
add_noko_elem(i, "docnumber", node.attr("docnumber"))
|
|
202
|
+
# i.docnumber node.attr("docnumber")
|
|
203
|
+
add_noko_elem(i, "agency", "IEEE")
|
|
204
|
+
# i.agency "IEEE"
|
|
188
205
|
i.class_ doctype(node)
|
|
189
|
-
|
|
190
|
-
a =
|
|
191
|
-
|
|
192
|
-
a = node
|
|
193
|
-
|
|
206
|
+
add_noko_elem(i, "edition", node.attr("edition"))
|
|
207
|
+
# a = node.attr("edition") and i.edition a
|
|
208
|
+
add_noko_elem(i, "version", metadata_version_value(node))
|
|
209
|
+
# a = metadata_version_value(node) and i.version a
|
|
210
|
+
add_noko_elem(i, "amendment", node.attr("amendment-number"))
|
|
211
|
+
# a = node.attr("amendment-number") and i.amendment a
|
|
212
|
+
add_noko_elem(i, "corrigendum", node.attr("corrigendum-number"))
|
|
213
|
+
# a = node.attr("corrigendum-number") and i.corrigendum a
|
|
214
|
+
add_noko_elem(i, "year", node.attr("copyright-year"))
|
|
215
|
+
# a = node.attr("copyright-year") and i.year a
|
|
194
216
|
end
|
|
195
217
|
end
|
|
196
218
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<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">
|
|
3
|
-
<!-- VERSION v2.1.
|
|
3
|
+
<!-- VERSION v2.1.5 -->
|
|
4
4
|
|
|
5
5
|
<!--
|
|
6
6
|
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
|
@@ -905,15 +905,32 @@ titlecase, or lowercase</a:documentation>
|
|
|
905
905
|
</element>
|
|
906
906
|
</define>
|
|
907
907
|
<define name="image" combine="choice">
|
|
908
|
-
<
|
|
909
|
-
<
|
|
910
|
-
|
|
911
|
-
<
|
|
912
|
-
|
|
913
|
-
<
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
908
|
+
<choice>
|
|
909
|
+
<element name="image">
|
|
910
|
+
<ref name="RequiredId"/>
|
|
911
|
+
<ref name="ImageAttributes"/>
|
|
912
|
+
<optional>
|
|
913
|
+
<element name="svg">
|
|
914
|
+
<a:documentation>Allow svg in image/svg, for consistency</a:documentation>
|
|
915
|
+
<oneOrMore>
|
|
916
|
+
<choice>
|
|
917
|
+
<text/>
|
|
918
|
+
<ref name="AnyElement"/>
|
|
919
|
+
</choice>
|
|
920
|
+
</oneOrMore>
|
|
921
|
+
</element>
|
|
922
|
+
</optional>
|
|
923
|
+
</element>
|
|
924
|
+
<element name="svg">
|
|
925
|
+
<a:documentation>Add svg mark up to image</a:documentation>
|
|
926
|
+
<oneOrMore>
|
|
927
|
+
<choice>
|
|
928
|
+
<text/>
|
|
929
|
+
<ref name="AnyElement"/>
|
|
930
|
+
</choice>
|
|
931
|
+
</oneOrMore>
|
|
932
|
+
</element>
|
|
933
|
+
</choice>
|
|
917
934
|
</define>
|
|
918
935
|
<define name="ParagraphFnBody" combine="interleave">
|
|
919
936
|
<ref name="BlockSource">
|
|
@@ -50,10 +50,10 @@ module Metanorma
|
|
|
50
50
|
].freeze
|
|
51
51
|
|
|
52
52
|
SECTIONS_XPATH =
|
|
53
|
-
"//preface/abstract | //sections/terms |
|
|
53
|
+
"//preface/abstract | //sections/terms | //annex | "\
|
|
54
54
|
"//sections/definitions | //sections/clause | "\
|
|
55
|
-
"//references[not(parent::clause)] | "\
|
|
56
|
-
"//clause[descendant::references][not(parent::clause)]".freeze
|
|
55
|
+
"//references[not(parent::clause)][not(ancestor::boilerplate)] | "\
|
|
56
|
+
"//clause[descendant::references][not(parent::clause)][not(ancestor::boilerplate)]".freeze
|
|
57
57
|
|
|
58
58
|
def sections_sequence_validate(root)
|
|
59
59
|
names, n = sections_sequence_validate_start(root)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: metanorma-ieee
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.6.
|
|
4
|
+
version: 1.6.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: 2025-
|
|
11
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: metanorma-standoc
|