metanorma-bipm 2.2.3 → 2.2.5
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/bipm/bipm.brochure.xsl +147 -49
- data/lib/isodoc/bipm/bipm.guide.xsl +147 -49
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +147 -49
- data/lib/isodoc/bipm/bipm.rapport.xsl +147 -49
- data/lib/isodoc/bipm/html/htmlstyle.css +4 -0
- data/lib/isodoc/bipm/html/htmlstyle.scss +6 -0
- data/lib/isodoc/bipm/i18n-en.yaml +1 -1
- data/lib/isodoc/bipm/jcgm.standard.xsl +134 -45
- data/lib/isodoc/bipm/presentation_xml_convert.rb +3 -3
- data/lib/metanorma/bipm/basicdoc.rng +0 -1
- data/lib/metanorma/bipm/biblio.rng +11 -1
- data/lib/metanorma/bipm/front.rb +3 -3
- data/lib/metanorma/bipm/isodoc.rng +11 -0
- data/lib/metanorma/bipm/version.rb +1 -1
- metadata +2 -2
@@ -3486,7 +3486,7 @@
|
|
3486
3486
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
3487
3487
|
|
3488
3488
|
<xsl:choose>
|
3489
|
-
<xsl:when test="@width">
|
3489
|
+
<xsl:when test="@width and @width != 'full-page-width' and @width != 'text-width'">
|
3490
3490
|
|
3491
3491
|
<!-- centered table when table name is centered (see table-name-style) -->
|
3492
3492
|
|
@@ -3813,6 +3813,7 @@
|
|
3813
3813
|
This makes columns with large differences between minimum and maximum widths wider than columns with smaller differences. -->
|
3814
3814
|
<xsl:when test="(@width_max > $page_width and @width_min < $page_width) or (@width_min >= $page_width)">
|
3815
3815
|
<!-- difference between the available space and the minimum table width -->
|
3816
|
+
<_width_min><xsl:value-of select="@width_min"/></_width_min>
|
3816
3817
|
<xsl:variable name="W" select="$page_width - @width_min"/>
|
3817
3818
|
<W><xsl:value-of select="$W"/></W>
|
3818
3819
|
<!-- difference between maximum and minimum width of the table -->
|
@@ -4502,17 +4503,20 @@
|
|
4502
4503
|
<xsl:for-each select="xalan:nodeset($references)//fn">
|
4503
4504
|
<xsl:variable name="reference" select="@reference"/>
|
4504
4505
|
<xsl:if test="not(preceding-sibling::*[@reference = $reference])"> <!-- only unique reference puts in note-->
|
4505
|
-
<fo:block xsl:use-attribute-sets="table-fn-style">
|
4506
4506
|
|
4507
|
-
|
4507
|
+
<fo:block xsl:use-attribute-sets="table-fn-style">
|
4508
4508
|
|
4509
|
-
|
4509
|
+
<fo:inline id="{@id}" xsl:use-attribute-sets="table-fn-number-style">
|
4510
|
+
|
4511
|
+
<xsl:value-of select="@reference"/>
|
4512
|
+
|
4513
|
+
</fo:inline>
|
4514
|
+
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4515
|
+
<xsl:copy-of select="./node()"/>
|
4516
|
+
</fo:inline>
|
4517
|
+
|
4518
|
+
</fo:block>
|
4510
4519
|
|
4511
|
-
</fo:inline>
|
4512
|
-
<fo:inline xsl:use-attribute-sets="table-fn-body-style">
|
4513
|
-
<xsl:copy-of select="./node()"/>
|
4514
|
-
</fo:inline>
|
4515
|
-
</fo:block>
|
4516
4520
|
</xsl:if>
|
4517
4521
|
</xsl:for-each>
|
4518
4522
|
</xsl:template>
|
@@ -4711,7 +4715,7 @@
|
|
4711
4715
|
|
4712
4716
|
<xsl:variable name="key_iso">
|
4713
4717
|
|
4714
|
-
<xsl:if test="$parent = 'figure' or $parent = 'formula'">true</xsl:if>
|
4718
|
+
<xsl:if test="$parent = 'figure' or $parent = 'formula' or ../@key = 'true'">true</xsl:if>
|
4715
4719
|
<!-- and (not(../@class) or ../@class !='pseudocode') -->
|
4716
4720
|
</xsl:variable>
|
4717
4721
|
|
@@ -5470,12 +5474,12 @@
|
|
5470
5474
|
<xsl:param name="value"/>
|
5471
5475
|
<xsl:variable name="add_width" select="string-length($value) * 20"/>
|
5472
5476
|
<xsl:variable name="maxwidth" select="60 + $add_width"/>
|
5473
|
-
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-
|
5474
|
-
<xsl:attribute name="height">5mm</xsl:attribute>
|
5477
|
+
<fo:instream-foreign-object fox:alt-text="OpeningTag" baseline-shift="-10%"><!-- alignment-baseline="middle" -->
|
5478
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute> <!-- 5mm -->
|
5475
5479
|
<xsl:attribute name="content-width">100%</xsl:attribute>
|
5476
5480
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
5477
5481
|
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
5478
|
-
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
5482
|
+
<!-- <svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
5479
5483
|
<g>
|
5480
5484
|
<xsl:if test="$type = 'closing' or $type = 'end'">
|
5481
5485
|
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
@@ -5489,6 +5493,27 @@
|
|
5489
5493
|
</xsl:if>
|
5490
5494
|
<xsl:value-of select="$kind"/><tspan dy="10" font-size="30pt"><xsl:value-of select="$value"/></tspan>
|
5491
5495
|
</text>
|
5496
|
+
</svg> -->
|
5497
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="{$maxwidth + 32}" height="80">
|
5498
|
+
<g>
|
5499
|
+
<xsl:if test="$type = 'closing' or $type = 'end'">
|
5500
|
+
<xsl:attribute name="transform">scale(-1 1) translate(-<xsl:value-of select="$maxwidth + 32"/>,0)</xsl:attribute>
|
5501
|
+
</xsl:if>
|
5502
|
+
<polyline points="0,2.5 {$maxwidth},2.5 {$maxwidth + 20},40 {$maxwidth},77.5 0,77.5" stroke="black" stroke-width="5" fill="white"/>
|
5503
|
+
<line x1="9.5" y1="0" x2="9.5" y2="80" stroke="black" stroke-width="19"/>
|
5504
|
+
</g>
|
5505
|
+
<xsl:variable name="text_x">
|
5506
|
+
<xsl:choose>
|
5507
|
+
<xsl:when test="$type = 'closing' or $type = 'end'">28</xsl:when>
|
5508
|
+
<xsl:otherwise>22</xsl:otherwise>
|
5509
|
+
</xsl:choose>
|
5510
|
+
</xsl:variable>
|
5511
|
+
<text font-family="Arial" x="{$text_x}" y="50" font-size="40pt">
|
5512
|
+
<xsl:value-of select="$kind"/>
|
5513
|
+
</text>
|
5514
|
+
<text font-family="Arial" x="{$text_x + 33}" y="65" font-size="38pt">
|
5515
|
+
<xsl:value-of select="$value"/>
|
5516
|
+
</text>
|
5492
5517
|
</svg>
|
5493
5518
|
</fo:instream-foreign-object>
|
5494
5519
|
</xsl:template>
|
@@ -5743,18 +5768,20 @@
|
|
5743
5768
|
|
5744
5769
|
<xsl:template name="add-zero-spaces-java">
|
5745
5770
|
<xsl:param name="text" select="."/>
|
5746
|
-
<!-- add zero-width space (#x200B) after characters: dash, dot,
|
5747
|
-
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(
|
5771
|
+
<!-- add zero-width space (#x200B) after characters: dash, dot, equal, underscore, em dash, thin space, arrow right -->
|
5772
|
+
<xsl:variable name="text1" select="java:replaceAll(java:java.lang.String.new($text),'(-|\.|=|_|—| |→)','$1')"/>
|
5773
|
+
<!-- add zero-width space (#x200B) after characters: colon, if there aren't digits after -->
|
5774
|
+
<xsl:variable name="text2" select="java:replaceAll(java:java.lang.String.new($text1),'(:)(\D)','$1$2')"/>
|
5748
5775
|
<!-- add zero-width space (#x200B) after characters: 'great than' -->
|
5749
|
-
<xsl:variable name="
|
5776
|
+
<xsl:variable name="text3" select="java:replaceAll(java:java.lang.String.new($text2), '(\u003e)(?!\u003e)', '$1')"/><!-- negative lookahead: 'great than' not followed by 'great than' -->
|
5750
5777
|
<!-- add zero-width space (#x200B) before characters: 'less than' -->
|
5751
|
-
<xsl:variable name="
|
5778
|
+
<xsl:variable name="text4" select="java:replaceAll(java:java.lang.String.new($text3), '(?<!\u003c)(\u003c)', '$1')"/> <!-- (?<!\u003c)(\u003c) --> <!-- negative lookbehind: 'less than' not preceeded by 'less than' -->
|
5752
5779
|
<!-- add zero-width space (#x200B) before character: { -->
|
5753
|
-
<xsl:variable name="
|
5780
|
+
<xsl:variable name="text5" select="java:replaceAll(java:java.lang.String.new($text4), '(?<!\W)(\{)', '$1')"/> <!-- negative lookbehind: '{' not preceeded by 'punctuation char' -->
|
5754
5781
|
<!-- add zero-width space (#x200B) after character: , -->
|
5755
|
-
<xsl:variable name="
|
5782
|
+
<xsl:variable name="text6" select="java:replaceAll(java:java.lang.String.new($text5), '(\,)(?!\d)', '$1')"/> <!-- negative lookahead: ',' not followed by digit -->
|
5756
5783
|
|
5757
|
-
<xsl:value-of select="$
|
5784
|
+
<xsl:value-of select="$text6"/>
|
5758
5785
|
</xsl:template>
|
5759
5786
|
|
5760
5787
|
<xsl:template name="add-zero-spaces-link-java">
|
@@ -5763,7 +5790,9 @@
|
|
5763
5790
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$1')"/> <!-- http://. https:// or www. -->
|
5764
5791
|
<xsl:variable name="url_continue" select="java:replaceAll(java:java.lang.String.new($text), $regex_url_start, '$2')"/>
|
5765
5792
|
<!-- add zero-width space (#x200B) after characters: dash, dot, colon, equal, underscore, em dash, thin space -->
|
5766
|
-
<xsl:
|
5793
|
+
<xsl:variable name="url" select="java:replaceAll(java:java.lang.String.new($url_continue),'(-|\.|:|=|_|—| |,|/)','$1')"/>
|
5794
|
+
<!-- remove zero-width space at the end -->
|
5795
|
+
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($url), '$', '')"/>
|
5767
5796
|
</xsl:template>
|
5768
5797
|
|
5769
5798
|
<!-- add zero space after dash character (for table's entries) -->
|
@@ -5900,7 +5929,7 @@
|
|
5900
5929
|
</xsl:copy>
|
5901
5930
|
</xsl:template>
|
5902
5931
|
|
5903
|
-
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode'])]" mode="table-without-br">
|
5932
|
+
<xsl:template match="*[local-name()='th' or local-name() = 'td'][not(*[local-name()='br']) and not(*[local-name()='p']) and not(*[local-name()='sourcecode']) and not(*[local-name()='ul']) and not(*[local-name()='ol'])]" mode="table-without-br">
|
5904
5933
|
<xsl:copy>
|
5905
5934
|
<xsl:copy-of select="@*"/>
|
5906
5935
|
<p>
|
@@ -5976,6 +6005,14 @@
|
|
5976
6005
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new($text),' {2,}',' ')"/>
|
5977
6006
|
</xsl:template>
|
5978
6007
|
|
6008
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']//*[local-name() = 'ol' or local-name() = 'ul']" mode="table-without-br">
|
6009
|
+
<xsl:apply-templates mode="table-without-br"/>
|
6010
|
+
</xsl:template>
|
6011
|
+
|
6012
|
+
<xsl:template match="*[local-name()='th' or local-name()='td']//*[local-name() = 'li']" mode="table-without-br">
|
6013
|
+
<xsl:apply-templates mode="table-without-br"/>
|
6014
|
+
</xsl:template>
|
6015
|
+
|
5979
6016
|
<!-- mode="table-without-br" -->
|
5980
6017
|
<!-- ================================== -->
|
5981
6018
|
<!-- END: Step 0. replace <br/> to <p>...</p> -->
|
@@ -6796,7 +6833,7 @@
|
|
6796
6833
|
|
6797
6834
|
<fo:block-container id="{@id}" xsl:use-attribute-sets="note-style">
|
6798
6835
|
|
6799
|
-
<fo:block-container margin-left="0mm">
|
6836
|
+
<fo:block-container margin-left="0mm" margin-right="0mm">
|
6800
6837
|
|
6801
6838
|
<fo:block>
|
6802
6839
|
|
@@ -6972,11 +7009,14 @@
|
|
6972
7009
|
<xsl:with-param name="isDeleted" select="$isDeleted"/>
|
6973
7010
|
</xsl:call-template>
|
6974
7011
|
|
7012
|
+
<!-- Example: Dimensions in millimeters -->
|
7013
|
+
<xsl:apply-templates select="*[local-name() = 'note'][@type = 'units']"/>
|
7014
|
+
|
6975
7015
|
<fo:block xsl:use-attribute-sets="figure-style">
|
6976
|
-
<xsl:apply-templates select="node()[not(local-name() = 'name')]"/>
|
7016
|
+
<xsl:apply-templates select="node()[not(local-name() = 'name') and not(local-name() = 'note' and @type = 'units')]"/>
|
6977
7017
|
</fo:block>
|
6978
7018
|
<xsl:call-template name="fn_display_figure"/>
|
6979
|
-
<xsl:for-each select="*[local-name() = 'note']">
|
7019
|
+
<xsl:for-each select="*[local-name() = 'note'][not(@type = 'units')]">
|
6980
7020
|
<xsl:call-template name="note"/>
|
6981
7021
|
</xsl:for-each>
|
6982
7022
|
|
@@ -7233,24 +7273,47 @@
|
|
7233
7273
|
|
7234
7274
|
</xsl:when>
|
7235
7275
|
<xsl:otherwise>
|
7236
|
-
|
7237
|
-
|
7238
|
-
|
7239
|
-
<xsl:
|
7240
|
-
|
7241
|
-
|
7242
|
-
<xsl:
|
7243
|
-
|
7244
|
-
|
7245
|
-
|
7246
|
-
|
7247
|
-
|
7248
|
-
|
7249
|
-
|
7250
|
-
|
7251
|
-
|
7252
|
-
|
7253
|
-
|
7276
|
+
|
7277
|
+
<xsl:variable name="element">
|
7278
|
+
<xsl:choose>
|
7279
|
+
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
7280
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
7281
|
+
</xsl:when>
|
7282
|
+
<xsl:otherwise>
|
7283
|
+
<fo:block xsl:use-attribute-sets="image-style">
|
7284
|
+
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
7285
|
+
<xsl:attribute name="text-align">left</xsl:attribute>
|
7286
|
+
</xsl:if>
|
7287
|
+
</fo:block>
|
7288
|
+
</xsl:otherwise>
|
7289
|
+
</xsl:choose>
|
7290
|
+
</xsl:variable>
|
7291
|
+
|
7292
|
+
<xsl:for-each select="xalan:nodeset($element)/*">
|
7293
|
+
<xsl:copy>
|
7294
|
+
<xsl:copy-of select="@*"/>
|
7295
|
+
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
7296
|
+
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
7297
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
7298
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
7299
|
+
</xsl:if>
|
7300
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
7301
|
+
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
7302
|
+
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
7303
|
+
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
7304
|
+
<!-- effective height 297 - 27.4 - 13 = 256.6 -->
|
7305
|
+
<!-- effective width 210 - 12.5 - 25 = 172.5 -->
|
7306
|
+
<!-- effective height / width = 1.48, 1.4 - with title -->
|
7307
|
+
<xsl:if test="$svg_height > ($svg_width * 1.4)"> <!-- for images with big height -->
|
7308
|
+
<xsl:variable name="width" select="(($svg_width * 1.4) div $svg_height) * 100"/>
|
7309
|
+
<xsl:attribute name="width"><xsl:value-of select="$width"/>%</xsl:attribute>
|
7310
|
+
</xsl:if>
|
7311
|
+
<xsl:attribute name="scaling">uniform</xsl:attribute>
|
7312
|
+
<xsl:copy-of select="$svg_content"/>
|
7313
|
+
</fo:instream-foreign-object>
|
7314
|
+
<!-- </fo:block> -->
|
7315
|
+
</xsl:copy>
|
7316
|
+
</xsl:for-each>
|
7254
7317
|
</xsl:otherwise>
|
7255
7318
|
</xsl:choose>
|
7256
7319
|
</xsl:template>
|
@@ -7342,6 +7405,13 @@
|
|
7342
7405
|
</xsl:for-each>
|
7343
7406
|
</xsl:template>
|
7344
7407
|
|
7408
|
+
<!-- For the structures like: <dt><image src="" mimetype="image/svg+xml" height="" width=""><svg xmlns="http://www.w3.org/2000/svg" ... -->
|
7409
|
+
<xsl:template match="*[local-name() != 'figure']/*[local-name() = 'image'][*[local-name() = 'svg']]" priority="3">
|
7410
|
+
<xsl:for-each select="*[local-name() = 'svg']">
|
7411
|
+
<xsl:call-template name="image_svg"/>
|
7412
|
+
</xsl:for-each>
|
7413
|
+
</xsl:template>
|
7414
|
+
|
7345
7415
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'image'][@mimetype = 'image/svg+xml' and @src[not(starts-with(., 'data:image/'))]]" priority="2">
|
7346
7416
|
<xsl:variable name="svg_content" select="document(@src)"/>
|
7347
7417
|
<xsl:variable name="name" select="ancestor::*[local-name() = 'figure']/*[local-name() = 'name']"/>
|
@@ -7480,6 +7550,8 @@
|
|
7480
7550
|
<xsl:value-of select="."/>
|
7481
7551
|
</xsl:template>
|
7482
7552
|
|
7553
|
+
<xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]/text()" mode="bookmarks" priority="3"/>
|
7554
|
+
|
7483
7555
|
<xsl:template match="node()" mode="contents">
|
7484
7556
|
<xsl:apply-templates mode="contents"/>
|
7485
7557
|
</xsl:template>
|
@@ -7787,7 +7859,15 @@
|
|
7787
7859
|
<xsl:value-of select="@section"/>
|
7788
7860
|
<xsl:text> </xsl:text>
|
7789
7861
|
</xsl:if>
|
7790
|
-
<xsl:
|
7862
|
+
<xsl:variable name="title">
|
7863
|
+
<xsl:for-each select="title/node()">
|
7864
|
+
<xsl:choose>
|
7865
|
+
<xsl:when test="local-name() = 'add' and starts-with(., $ace_tag)"><!-- skip --></xsl:when>
|
7866
|
+
<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
|
7867
|
+
</xsl:choose>
|
7868
|
+
</xsl:for-each>
|
7869
|
+
</xsl:variable>
|
7870
|
+
<xsl:value-of select="normalize-space($title)"/>
|
7791
7871
|
</fo:bookmark-title>
|
7792
7872
|
<xsl:apply-templates mode="bookmark"/>
|
7793
7873
|
</fo:bookmark>
|
@@ -7813,6 +7893,12 @@
|
|
7813
7893
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/>
|
7814
7894
|
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note']"/>
|
7815
7895
|
|
7896
|
+
<xsl:template match="*[local-name() = 'figure']/*[local-name() = 'note'][@type = 'units'] | *[local-name() = 'image']/*[local-name() = 'note'][@type = 'units']" priority="2">
|
7897
|
+
<fo:block text-align="right" keep-with-next="always">
|
7898
|
+
<xsl:apply-templates/>
|
7899
|
+
</fo:block>
|
7900
|
+
</xsl:template>
|
7901
|
+
|
7816
7902
|
<!-- ====== -->
|
7817
7903
|
<!-- ====== -->
|
7818
7904
|
<xsl:template match="*[local-name() = 'title']" mode="contents_item">
|
@@ -7962,6 +8048,10 @@
|
|
7962
8048
|
</xsl:for-each>
|
7963
8049
|
</xsl:template>
|
7964
8050
|
|
8051
|
+
<xsl:template match="*[local-name() = 'add'][starts-with(., $ace_tag)]/text()" mode="contents_item" priority="2">
|
8052
|
+
<xsl:value-of select="."/>
|
8053
|
+
</xsl:template>
|
8054
|
+
|
7965
8055
|
<!-- Note: to enable the addition of character span markup with semantic styling for DIS Word output -->
|
7966
8056
|
<xsl:template match="*[local-name() = 'span']" mode="contents_item">
|
7967
8057
|
<xsl:apply-templates mode="contents_item"/>
|
@@ -10201,7 +10291,6 @@
|
|
10201
10291
|
<xsl:if test="@type = 'editorial'">
|
10202
10292
|
<xsl:attribute name="color">green</xsl:attribute>
|
10203
10293
|
<xsl:attribute name="font-weight">normal</xsl:attribute>
|
10204
|
-
|
10205
10294
|
<!-- <xsl:variable name="note-style">
|
10206
10295
|
<style xsl:use-attribute-sets="note-style"></style>
|
10207
10296
|
</xsl:variable>
|
@@ -208,14 +208,14 @@ module IsoDoc
|
|
208
208
|
elem.children = l10n("[#{@i18n.source} #{to_xml(elem.children).strip}]")
|
209
209
|
end
|
210
210
|
|
211
|
-
def norm_ref_entry_code(_ordinal, identifiers, _ids, _standard, datefn)
|
211
|
+
def norm_ref_entry_code(_ordinal, identifiers, _ids, _standard, datefn, _bib)
|
212
212
|
ret = (identifiers[0] || identifiers[1])
|
213
213
|
ret += " #{identifiers[1]}" if identifiers[0] && identifiers[1]
|
214
214
|
"#{ret}#{datefn} "
|
215
215
|
end
|
216
216
|
|
217
|
-
def biblio_ref_entry_code(ordinal, ids, _id, standard, datefn)
|
218
|
-
standard and id = nil
|
217
|
+
def biblio_ref_entry_code(ordinal, ids, _id, standard, datefn, _bib)
|
218
|
+
#standard and id = nil
|
219
219
|
ret = (ids[:ordinal] || ids[:metanorma] || "[#{ordinal}]")
|
220
220
|
if ids[:sdo]
|
221
221
|
ret = prefix_bracketed_ref(ret)
|
@@ -216,6 +216,9 @@
|
|
216
216
|
<optional>
|
217
217
|
<ref name="fullname"/>
|
218
218
|
</optional>
|
219
|
+
<zeroOrMore>
|
220
|
+
<ref name="credential"/>
|
221
|
+
</zeroOrMore>
|
219
222
|
<zeroOrMore>
|
220
223
|
<ref name="affiliation"/>
|
221
224
|
</zeroOrMore>
|
@@ -232,6 +235,11 @@
|
|
232
235
|
<ref name="FullNameType"/>
|
233
236
|
</element>
|
234
237
|
</define>
|
238
|
+
<define name="credential">
|
239
|
+
<element name="credential">
|
240
|
+
<text/>
|
241
|
+
</element>
|
242
|
+
</define>
|
235
243
|
<define name="FullNameType">
|
236
244
|
<choice>
|
237
245
|
<group>
|
@@ -305,7 +313,9 @@
|
|
305
313
|
<zeroOrMore>
|
306
314
|
<ref name="affiliationdescription"/>
|
307
315
|
</zeroOrMore>
|
308
|
-
<
|
316
|
+
<optional>
|
317
|
+
<ref name="organization"/>
|
318
|
+
</optional>
|
309
319
|
</element>
|
310
320
|
</define>
|
311
321
|
<define name="affiliationname">
|
data/lib/metanorma/bipm/front.rb
CHANGED
@@ -67,10 +67,10 @@ module Metanorma
|
|
67
67
|
end
|
68
68
|
|
69
69
|
def relation_supersedes_self1(xml, date, edition, draft)
|
70
|
-
xml.relation
|
70
|
+
xml.relation type: "supersedes" do |r|
|
71
71
|
r.bibitem do |b|
|
72
72
|
date and b.date(date,
|
73
|
-
|
73
|
+
type: edition ? "published" : "circulated")
|
74
74
|
edition and b.edition edition
|
75
75
|
draft and b.version do |v|
|
76
76
|
v.draft draft
|
@@ -85,7 +85,7 @@ module Metanorma
|
|
85
85
|
desc = role
|
86
86
|
role = "editor"
|
87
87
|
end
|
88
|
-
xml.role desc,
|
88
|
+
xml.role desc, type: role.downcase
|
89
89
|
end
|
90
90
|
|
91
91
|
def title(node, xml)
|
@@ -66,6 +66,7 @@
|
|
66
66
|
<value>caution</value>
|
67
67
|
<value>statement</value>
|
68
68
|
<value>editorial</value>
|
69
|
+
<value>box</value>
|
69
70
|
</choice>
|
70
71
|
</define>
|
71
72
|
<define name="index">
|
@@ -1577,6 +1578,9 @@
|
|
1577
1578
|
<zeroOrMore>
|
1578
1579
|
<ref name="indexsect"/>
|
1579
1580
|
</zeroOrMore>
|
1581
|
+
<optional>
|
1582
|
+
<ref name="colophon"/>
|
1583
|
+
</optional>
|
1580
1584
|
</element>
|
1581
1585
|
</define>
|
1582
1586
|
<define name="misccontainer">
|
@@ -1599,6 +1603,13 @@
|
|
1599
1603
|
</oneOrMore>
|
1600
1604
|
</element>
|
1601
1605
|
</define>
|
1606
|
+
<define name="colophon">
|
1607
|
+
<element name="colophon">
|
1608
|
+
<oneOrMore>
|
1609
|
+
<ref name="content"/>
|
1610
|
+
</oneOrMore>
|
1611
|
+
</element>
|
1612
|
+
</define>
|
1602
1613
|
<define name="foreword">
|
1603
1614
|
<element name="foreword">
|
1604
1615
|
<ref name="Content-Section"/>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-bipm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
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-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|