metanorma-bipm 2.5.3 → 2.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -5213,7 +5213,8 @@
5213
5213
  </xsl:choose>
5214
5214
  </xsl:variable>
5215
5215
  <xsl:variable name="current_fn_number_text">
5216
- <xsl:value-of select="$current_fn_number"/>
5216
+
5217
+ <xsl:value-of select="$current_fn_number"/>
5217
5218
 
5218
5219
  </xsl:variable>
5219
5220
 
@@ -5249,8 +5250,10 @@
5249
5250
 
5250
5251
  <xsl:call-template name="insert_basic_link">
5251
5252
  <xsl:with-param name="element">
5252
- <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}" role="Lbl">
5253
- <xsl:copy-of select="$current_fn_number_text"/>
5253
+ <fo:basic-link internal-destination="{$ref_id}" fox:alt-text="footnote {$current_fn_number}"> <!-- note: role="Lbl" removed in https://github.com/metanorma/mn2pdf/issues/291 -->
5254
+ <fo:inline role="Lbl"> <!-- need for https://github.com/metanorma/metanorma-iso/issues/1003 -->
5255
+ <xsl:copy-of select="$current_fn_number_text"/>
5256
+ </fo:inline>
5254
5257
  </fo:basic-link>
5255
5258
  </xsl:with-param>
5256
5259
  </xsl:call-template>
@@ -5531,7 +5534,7 @@
5531
5534
 
5532
5535
  <xsl:call-template name="refine_fn-reference-style"/>
5533
5536
 
5534
- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="{@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
5537
+ <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
5535
5538
  <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> <!-- for footnotes in tables -->
5536
5539
  <xsl:attribute name="internal-destination">
5537
5540
  <xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
@@ -6546,9 +6549,19 @@
6546
6549
  </fo:inline>
6547
6550
  </xsl:template>
6548
6551
 
6549
- <xsl:template match="text()[ancestor::*[local-name()='smallcap']]">
6552
+ <xsl:template match="text()[ancestor::*[local-name()='smallcap']]" name="smallcaps">
6553
+ <xsl:param name="txt"/>
6550
6554
  <!-- <xsl:variable name="text" select="normalize-space(.)"/> --> <!-- https://github.com/metanorma/metanorma-iso/issues/1115 -->
6551
- <xsl:variable name="text" select="."/>
6555
+ <xsl:variable name="text">
6556
+ <xsl:choose>
6557
+ <xsl:when test="$txt != ''">
6558
+ <xsl:value-of select="$txt"/>
6559
+ </xsl:when>
6560
+ <xsl:otherwise>
6561
+ <xsl:value-of select="."/>
6562
+ </xsl:otherwise>
6563
+ </xsl:choose>
6564
+ </xsl:variable>
6552
6565
  <xsl:variable name="ratio_">
6553
6566
  0.75
6554
6567
  </xsl:variable>
@@ -8001,9 +8014,12 @@
8001
8014
  <xsl:apply-templates/>
8002
8015
  </xsl:when>
8003
8016
  <xsl:otherwise>
8017
+ <xsl:variable name="alt_text">
8018
+ <xsl:call-template name="getAltText"/>
8019
+ </xsl:variable>
8004
8020
  <xsl:call-template name="insert_basic_link">
8005
8021
  <xsl:with-param name="element">
8006
- <fo:basic-link external-destination="{$target}" fox:alt-text="{$target}">
8022
+ <fo:basic-link external-destination="{$target}" fox:alt-text="{$alt_text}">
8007
8023
  <xsl:if test="$isLinkToEmbeddedFile = 'true'">
8008
8024
  <xsl:attribute name="role">Annot</xsl:attribute>
8009
8025
  </xsl:if>
@@ -8030,6 +8046,14 @@
8030
8046
  </fo:inline>
8031
8047
  </xsl:template> <!-- link -->
8032
8048
 
8049
+ <xsl:template name="getAltText">
8050
+ <xsl:choose>
8051
+ <xsl:when test="normalize-space(.) = ''"><xsl:value-of select="@target"/></xsl:when>
8052
+ <xsl:otherwise><xsl:value-of select="normalize-space(translate(normalize-space(), ' —', ' -'))"/></xsl:otherwise>
8053
+ <!-- <xsl:otherwise><xsl:value-of select="@target"/></xsl:otherwise> -->
8054
+ </xsl:choose>
8055
+ </xsl:template>
8056
+
8033
8057
  <!-- ======================== -->
8034
8058
  <!-- Appendix processing -->
8035
8059
  <!-- ======================== -->
@@ -8060,7 +8084,7 @@
8060
8084
  <xsl:template match="*[local-name() = 'callout']">
8061
8085
  <xsl:choose>
8062
8086
  <xsl:when test="normalize-space(@target) = ''">&lt;<xsl:apply-templates/>&gt;</xsl:when>
8063
- <xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link></xsl:otherwise>
8087
+ <xsl:otherwise><fo:basic-link internal-destination="{@target}" fox:alt-text="{normalize-space()}">&lt;<xsl:apply-templates/>&gt;</fo:basic-link></xsl:otherwise>
8064
8088
  </xsl:choose>
8065
8089
  </xsl:template>
8066
8090
 
@@ -8089,7 +8113,10 @@
8089
8113
  <xsl:template match="*[local-name() = 'xref']">
8090
8114
  <xsl:call-template name="insert_basic_link">
8091
8115
  <xsl:with-param name="element">
8092
- <fo:basic-link internal-destination="{@target}" fox:alt-text="{@target}" xsl:use-attribute-sets="xref-style">
8116
+ <xsl:variable name="alt_text">
8117
+ <xsl:call-template name="getAltText"/>
8118
+ </xsl:variable>
8119
+ <fo:basic-link internal-destination="{@target}" fox:alt-text="{$alt_text}" xsl:use-attribute-sets="xref-style">
8093
8120
  <xsl:if test="string-length(normalize-space()) &lt; 30 and not(contains(normalize-space(), 'http://')) and not(contains(normalize-space(), 'https://')) and not(ancestor::*[local-name() = 'table' or local-name() = 'dl'])">
8094
8121
  <xsl:attribute name="keep-together.within-line">always</xsl:attribute>
8095
8122
  </xsl:if>
@@ -10570,12 +10597,14 @@
10570
10597
 
10571
10598
  <xsl:when test="contains(normalize-space($fo_element), 'list')">
10572
10599
 
10573
- <xsl:variable name="provisional_distance_between_starts">
10600
+ <xsl:variable name="provisional_distance_between_starts_">
10574
10601
  7
10575
10602
  </xsl:variable>
10576
- <xsl:variable name="indent">
10603
+ <xsl:variable name="provisional_distance_between_starts" select="normalize-space($provisional_distance_between_starts_)"/>
10604
+ <xsl:variable name="indent_">
10577
10605
  0
10578
10606
  </xsl:variable>
10607
+ <xsl:variable name="indent" select="normalize-space($indent_)"/>
10579
10608
 
10580
10609
  <fo:list-block provisional-distance-between-starts="{$provisional_distance_between_starts}mm">
10581
10610
  <fo:list-item>
@@ -11309,14 +11338,17 @@
11309
11338
  </xsl:when>
11310
11339
  <xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
11311
11340
 
11312
- <xsl:variable name="label">
11341
+ <xsl:variable name="type" select="../@type"/>
11313
11342
 
11314
- <xsl:variable name="type" select="../@type"/>
11343
+ <xsl:variable name="label">
11315
11344
 
11316
11345
  <xsl:variable name="style_prefix_">
11317
11346
  <xsl:if test="$type = 'roman'">
11318
11347
  <!-- Example: (i) -->
11319
11348
  </xsl:if>
11349
+ <xsl:if test="$type = 'alphabet'">
11350
+
11351
+ </xsl:if>
11320
11352
  </xsl:variable>
11321
11353
  <xsl:variable name="style_prefix" select="normalize-space($style_prefix_)"/>
11322
11354
 
@@ -11342,13 +11374,15 @@
11342
11374
  <xsl:if test="$style_prefix != '' and not(starts-with(@label, $style_prefix))">
11343
11375
  <xsl:value-of select="$style_prefix"/>
11344
11376
  </xsl:if>
11377
+
11345
11378
  <xsl:value-of select="@label"/>
11379
+
11346
11380
  <xsl:if test="not(java:endsWith(java:java.lang.String.new(@label),$style_suffix))">
11347
11381
  <xsl:value-of select="$style_suffix"/>
11348
11382
  </xsl:if>
11349
11383
  </xsl:variable>
11350
11384
 
11351
- <xsl:value-of select="normalize-space($label)"/>
11385
+ <xsl:value-of select="normalize-space($label)"/>
11352
11386
 
11353
11387
  </xsl:when>
11354
11388
  <xsl:otherwise> <!-- for ordered lists 'ol' -->
@@ -13553,7 +13587,8 @@
13553
13587
  <xsl:variable name="description" select="normalize-space($bibitem_attachment/*[local-name() = 'formattedref'])"/>
13554
13588
  <xsl:variable name="filename" select="java:org.metanorma.fop.Util.getFilenameFromPath(@name)"/>
13555
13589
  <!-- Todo: need update -->
13556
- <xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
13590
+ <xsl:variable name="afrelationship" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
13591
+ <xsl:variable name="volatile" select="normalize-space($bibitem_attachment//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
13557
13592
 
13558
13593
  <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" filename="{$filename}" link-as-file-annotation="true">
13559
13594
  <xsl:attribute name="src">
@@ -13574,6 +13609,9 @@
13574
13609
  <xsl:if test="$afrelationship != ''">
13575
13610
  <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
13576
13611
  </xsl:if>
13612
+ <xsl:if test="$volatile != ''">
13613
+ <xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
13614
+ </xsl:if>
13577
13615
  </pdf:embedded-file>
13578
13616
  </xsl:for-each>
13579
13617
  <!-- references to external attachments (no binary-encoded within the Metanorma XML file) -->
@@ -13584,14 +13622,18 @@
13584
13622
  <xsl:variable name="url" select="concat('url(file:///',$basepath, $attachment_path, ')')"/>
13585
13623
  <xsl:variable name="description" select="normalize-space(*[local-name() = 'formattedref'])"/>
13586
13624
  <!-- Todo: need update -->
13587
- <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'span'][@class = 'pdf-AFRelationship'])"/>
13625
+ <xsl:variable name="afrelationship" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-AFRelationship'])"/>
13626
+ <xsl:variable name="volatile" select="normalize-space(.//*[local-name() = 'classification'][@type = 'pdf-volatile'])"/>
13588
13627
  <pdf:embedded-file xmlns:pdf="http://xmlgraphics.apache.org/fop/extensions/pdf" src="{$url}" filename="{$attachment_name}" link-as-file-annotation="true">
13589
13628
  <xsl:if test="$description != ''">
13590
13629
  <xsl:attribute name="description"><xsl:value-of select="$description"/></xsl:attribute>
13591
13630
  </xsl:if>
13592
13631
  <xsl:if test="$afrelationship != ''">
13593
- <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
13594
- </xsl:if>
13632
+ <xsl:attribute name="afrelationship"><xsl:value-of select="$afrelationship"/></xsl:attribute>
13633
+ </xsl:if>
13634
+ <xsl:if test="$volatile != ''">
13635
+ <xsl:attribute name="volatile"><xsl:value-of select="$volatile"/></xsl:attribute>
13636
+ </xsl:if>
13595
13637
  </pdf:embedded-file>
13596
13638
  </xsl:for-each>
13597
13639
  </xsl:if>
@@ -13638,10 +13680,31 @@
13638
13680
  <xsl:value-of select="$level_total - 2"/>
13639
13681
  </xsl:when>
13640
13682
  <xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'title']">
13641
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/>
13683
+ <!-- determine 'depth' depends on upper clause with title/@depth -->
13684
+ <!-- <xsl:message>title=<xsl:value-of select="."/></xsl:message> -->
13685
+ <xsl:variable name="clause_with_depth_depth" select="ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/*[local-name() = 'title']/@depth"/>
13686
+ <!-- <xsl:message>clause_with_depth_depth=<xsl:value-of select="$clause_with_depth_depth"/></xsl:message> -->
13687
+ <xsl:variable name="clause_with_depth_level" select="count(ancestor::*[local-name() = 'clause'][*[local-name() = 'title']/@depth][1]/ancestor::*)"/>
13688
+ <!-- <xsl:message>clause_with_depth_level=<xsl:value-of select="$clause_with_depth_level"/></xsl:message> -->
13689
+ <xsl:variable name="curr_level" select="count(ancestor::*) - 1"/>
13690
+ <!-- <xsl:message>curr_level=<xsl:value-of select="$curr_level"/></xsl:message> -->
13691
+ <!-- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][2]/*[local-name() = 'title']/@depth)"/> -->
13692
+ <xsl:variable name="curr_clause_depth" select="number($clause_with_depth_depth) + (number($curr_level) - number($clause_with_depth_level)) "/>
13693
+ <!-- <xsl:message>curr_clause_depth=<xsl:value-of select="$curr_clause_depth"/></xsl:message> -->
13642
13694
  <xsl:choose>
13643
- <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13644
- <xsl:value-of select="number($upper_clause_depth + 1)"/>
13695
+ <xsl:when test="string(number($curr_clause_depth)) != 'NaN'">
13696
+ <xsl:value-of select="number($curr_clause_depth)"/>
13697
+ </xsl:when>
13698
+ <xsl:otherwise>
13699
+ <xsl:value-of select="$level_total - 2"/>
13700
+ </xsl:otherwise>
13701
+ </xsl:choose>
13702
+ </xsl:when>
13703
+ <xsl:when test="ancestor::*[local-name() = 'sections'] and self::*[local-name() = 'name'] and parent::*[local-name() = 'term']">
13704
+ <xsl:variable name="upper_terms_depth" select="normalize-space(ancestor::*[local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
13705
+ <xsl:choose>
13706
+ <xsl:when test="string(number($upper_terms_depth)) != 'NaN'">
13707
+ <xsl:value-of select="number($upper_terms_depth + 1)"/>
13645
13708
  </xsl:when>
13646
13709
  <xsl:otherwise>
13647
13710
  <xsl:value-of select="$level_total - 2"/>
@@ -13649,7 +13712,7 @@
13649
13712
  </xsl:choose>
13650
13713
  </xsl:when>
13651
13714
  <xsl:when test="ancestor::*[local-name() = 'sections']">
13652
- <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause'][1]/*[local-name() = 'title']/@depth)"/>
13715
+ <xsl:variable name="upper_clause_depth" select="normalize-space(ancestor::*[local-name() = 'clause' or local-name() = 'terms'][1]/*[local-name() = 'title']/@depth)"/>
13653
13716
  <xsl:choose>
13654
13717
  <xsl:when test="string(number($upper_clause_depth)) != 'NaN'">
13655
13718
  <xsl:value-of select="number($upper_clause_depth + 1)"/>
@@ -1,10 +1,10 @@
1
1
  require "isodoc"
2
2
 
3
3
  module IsoDoc
4
- module BIPM
4
+ module Bipm
5
5
  class Metadata < IsoDoc::Generic::Metadata
6
6
  def configuration
7
- Metanorma::BIPM.configuration
7
+ Metanorma::Bipm.configuration
8
8
  end
9
9
 
10
10
  SI_ASPECT = %w(A_e_deltanu A_e cd_Kcd_h_deltanu cd_Kcd full K_k_deltanu
@@ -3,7 +3,7 @@ require "metanorma-generic"
3
3
  require_relative "base_convert"
4
4
 
5
5
  module IsoDoc
6
- module BIPM
6
+ module Bipm
7
7
  class PdfConvert < IsoDoc::Generic::PdfConvert
8
8
  def initialize(options)
9
9
  super
@@ -1,5 +1,5 @@
1
1
  module IsoDoc
2
- module BIPM
2
+ module Bipm
3
3
  class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
4
4
  def middle_title(docxml)
5
5
  @jcgm or return nil
@@ -8,7 +8,7 @@ require_relative "../../relaton/render/general"
8
8
  require_relative "presentation_blocks"
9
9
 
10
10
  module IsoDoc
11
- module BIPM
11
+ module Bipm
12
12
  class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
13
13
  def convert1(docxml, filename, dir)
14
14
  @jcgm = docxml&.at(ns("//bibdata/ext/editorialgroup/committee/" \
@@ -1,5 +1,5 @@
1
1
  module IsoDoc
2
- module BIPM
2
+ module Bipm
3
3
  class Counter < IsoDoc::XrefGen::Counter
4
4
  end
5
5
 
data/lib/isodoc/bipm.rb CHANGED
@@ -4,6 +4,6 @@ require "isodoc/bipm/pdf_convert"
4
4
  require "isodoc/bipm/presentation_xml_convert"
5
5
 
6
6
  module IsoDoc
7
- module BIPM
7
+ module Bipm
8
8
  end
9
9
  end
@@ -72,6 +72,9 @@ standards defining organization, and that is rendered in a distinct manner</a:do
72
72
  from other documents in the same doctype</a:documentation>
73
73
  </ref>
74
74
  </optional>
75
+ <ref name="flavor">
76
+ <a:documentation>Flavour of Metanorma used to process this document</a:documentation>
77
+ </ref>
75
78
  <optional>
76
79
  <ref name="editorialgroup">
77
80
  <a:documentation>Groups associated with the production of the standards document, typically within
@@ -113,6 +116,16 @@ a standards definition organization</a:documentation>
113
116
  <define name="DocumentSubtype">
114
117
  <text/>
115
118
  </define>
119
+ <define name="flavor">
120
+ <element name="flavor">
121
+ <ref name="MetanormaFlavor"/>
122
+ </element>
123
+ </define>
124
+ <define name="MetanormaFlavor">
125
+ <a:documentation>This is in fact an enum, as of this writing: standoc iso generic ietf ieee itu nist ogc csa cc iho ribose jis iec bsi bipm plateau.
126
+ However we prefer not to hardcode it, given ongoing extension.</a:documentation>
127
+ <text/>
128
+ </define>
116
129
  <define name="editorialgroup">
117
130
  <a:documentation>A group associated with the production of the standards document, typically within
118
131
  a standards definition organization</a:documentation>
@@ -1382,18 +1382,7 @@ Applies whether the resource has already been created or not, and whether it is
1382
1382
  <define name="bdate">
1383
1383
  <a:documentation>Significant date in the lifecycle of the bibliographic item, including its production and its access</a:documentation>
1384
1384
  <element name="date">
1385
- <attribute name="type">
1386
- <a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
1387
- <choice>
1388
- <ref name="BibliographicDateType"/>
1389
- <text/>
1390
- </choice>
1391
- </attribute>
1392
- <optional>
1393
- <attribute name="text">
1394
- <a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
1395
- </attribute>
1396
- </optional>
1385
+ <ref name="bDateAttributes"/>
1397
1386
  <optional>
1398
1387
  <choice>
1399
1388
  <group>
@@ -1416,6 +1405,20 @@ Applies whether the resource has already been created or not, and whether it is
1416
1405
  </optional>
1417
1406
  </element>
1418
1407
  </define>
1408
+ <define name="bDateAttributes">
1409
+ <attribute name="type">
1410
+ <a:documentation>The phase of the production of or access to a bibliographic item</a:documentation>
1411
+ <choice>
1412
+ <ref name="BibliographicDateType"/>
1413
+ <text/>
1414
+ </choice>
1415
+ </attribute>
1416
+ <optional>
1417
+ <attribute name="text">
1418
+ <a:documentation>An optional textual description of the date, especially when a Gregorian date is not applicable</a:documentation>
1419
+ </attribute>
1420
+ </optional>
1421
+ </define>
1419
1422
  <define name="docidentifier">
1420
1423
  <a:documentation>An identifier of a bibliographic item in an international standard scheme</a:documentation>
1421
1424
  <element name="docidentifier">
@@ -1884,6 +1887,10 @@ Detailed in https://www.relaton.org/model/relations/</a:documentation>
1884
1887
  <value>hasAnnotation</value>
1885
1888
  <value>draftOf</value>
1886
1889
  <value>hasDraft</value>
1890
+ <value>preliminaryDraftOf</value>
1891
+ <value>hasPreliminaryDraft</value>
1892
+ <value>revisionDraftOf</value>
1893
+ <value>hasRevisionDraft</value>
1887
1894
  <value>editionOf</value>
1888
1895
  <value>hasEdition</value>
1889
1896
  <value>updates</value>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module BIPM
2
+ module Bipm
3
3
  class Converter < Metanorma::Generic::Converter
4
4
  def boilerplate_file(_xmldoc)
5
5
  if @jcgm
@@ -4,12 +4,12 @@ require_relative "front"
4
4
  require_relative "cleanup"
5
5
 
6
6
  module Metanorma
7
- module BIPM
7
+ module Bipm
8
8
  class Converter < Metanorma::Generic::Converter
9
9
  register_for "bipm"
10
10
 
11
11
  def configuration
12
- Metanorma::BIPM.configuration
12
+ Metanorma::Bipm.configuration
13
13
  end
14
14
 
15
15
  def org_name_long
@@ -112,19 +112,19 @@ module Metanorma
112
112
  end
113
113
 
114
114
  def html_converter(node)
115
- IsoDoc::BIPM::HtmlConvert.new(html_extract_attributes(node))
115
+ IsoDoc::Bipm::HtmlConvert.new(html_extract_attributes(node))
116
116
  end
117
117
 
118
118
  def presentation_xml_converter(node)
119
- IsoDoc::BIPM::PresentationXMLConvert
119
+ IsoDoc::Bipm::PresentationXMLConvert
120
120
  .new(html_extract_attributes(node)
121
- .merge(output_formats: ::Metanorma::BIPM::Processor.new
121
+ .merge(output_formats: ::Metanorma::Bipm::Processor.new
122
122
  .output_formats))
123
123
  end
124
124
 
125
125
  def pdf_converter(node)
126
126
  node.attr("no-pdf") and return nil
127
- IsoDoc::BIPM::PdfConvert.new(pdf_extract_attributes(node))
127
+ IsoDoc::Bipm::PdfConvert.new(pdf_extract_attributes(node))
128
128
  end
129
129
  end
130
130
  end
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module BIPM
2
+ module Bipm
3
3
  class Converter < Metanorma::Generic::Converter
4
4
  def metadata_committee(node, xml)
5
5
  return unless node.attr("committee-en") || node.attr("committee-fr")
@@ -1,10 +1,10 @@
1
1
  require "metanorma/processor"
2
2
 
3
3
  module Metanorma
4
- module BIPM
4
+ module Bipm
5
5
  class Processor < Metanorma::Generic::Processor
6
6
  def configuration
7
- Metanorma::BIPM.configuration
7
+ Metanorma::Bipm.configuration
8
8
  end
9
9
 
10
10
  def output_formats
@@ -15,20 +15,20 @@ module Metanorma
15
15
  end
16
16
 
17
17
  def version
18
- "Metanorma::BIPM #{Metanorma::BIPM::VERSION}"
18
+ "Metanorma::Bipm #{Metanorma::Bipm::VERSION}"
19
19
  end
20
20
 
21
21
  def output(isodoc_node, inname, outname, format, options = {})
22
22
  options_preprocess(options)
23
23
  case format
24
24
  when :html
25
- IsoDoc::BIPM::HtmlConvert.new(options)
25
+ IsoDoc::Bipm::HtmlConvert.new(options)
26
26
  .convert(inname, isodoc_node, nil, outname)
27
27
  when :presentation
28
- IsoDoc::BIPM::PresentationXMLConvert.new(options)
28
+ IsoDoc::Bipm::PresentationXMLConvert.new(options)
29
29
  .convert(inname, isodoc_node, nil, outname)
30
30
  when :pdf
31
- IsoDoc::BIPM::PdfConvert.new(options)
31
+ IsoDoc::Bipm::PdfConvert.new(options)
32
32
  .convert(inname, isodoc_node, nil, outname)
33
33
  else
34
34
  super
@@ -54,6 +54,7 @@
54
54
  <optional>
55
55
  <ref name="docsubtype"/>
56
56
  </optional>
57
+ <ref name="flavor"/>
57
58
  <ref name="editorialgroup"/>
58
59
  <optional>
59
60
  <ref name="comment-period"/>
@@ -1,5 +1,5 @@
1
1
  module Metanorma
2
- module BIPM
3
- VERSION = "2.5.3".freeze
2
+ module Bipm
3
+ VERSION = "2.5.4".freeze
4
4
  end
5
5
  end
@@ -4,7 +4,7 @@ require "metanorma/bipm/processor"
4
4
  require "metanorma/bipm/converter"
5
5
 
6
6
  module Metanorma
7
- module BIPM
7
+ module Bipm
8
8
  def self.fonts_used
9
9
  {
10
10
  html: ["Times New Roman", "STIX", "Courier New"],
@@ -37,4 +37,4 @@ module Metanorma
37
37
  configure {}
38
38
  end
39
39
  end
40
- Metanorma::Registry.instance.register(Metanorma::BIPM::Processor)
40
+ Metanorma::Registry.instance.register(Metanorma::Bipm::Processor)
@@ -7,5 +7,5 @@ require "asciidoctor" unless defined? Asciidoctor::Converter
7
7
 
8
8
  if defined? Metanorma::Registry
9
9
  require_relative "metanorma/bipm"
10
- Metanorma::Registry.instance.register(Metanorma::BIPM::Processor)
10
+ Metanorma::Registry.instance.register(Metanorma::Bipm::Processor)
11
11
  end
@@ -2,7 +2,7 @@ require "relaton-render"
2
2
 
3
3
  module Relaton
4
4
  module Render
5
- module BIPM
5
+ module Bipm
6
6
  class General < ::Relaton::Render::IsoDoc::General
7
7
  def config_loc
8
8
  YAML.load_file(File.join(File.dirname(__FILE__), "config.yml"))
@@ -1,6 +1,6 @@
1
1
  module Relaton
2
2
  module Render
3
- module BIPM
3
+ module Bipm
4
4
  class Parse < ::Relaton::Render::Parse
5
5
  def simple_or_host_xml2hash(doc, host)
6
6
  ret = super
@@ -4,7 +4,7 @@ require "metanorma/bipm/version"
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = "metanorma-bipm"
7
- spec.version = Metanorma::BIPM::VERSION
7
+ spec.version = Metanorma::Bipm::VERSION
8
8
  spec.authors = ["Ribose Inc."]
9
9
  spec.email = ["open.source@ribose.com"]
10
10
 
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.5.3
4
+ version: 2.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-30 00:00:00.000000000 Z
11
+ date: 2024-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: metanorma-generic