metanorma-bipm 2.3.7 → 2.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/bipm/bipm.brochure.xsl +107 -18
- data/lib/isodoc/bipm/bipm.guide.xsl +107 -18
- data/lib/isodoc/bipm/bipm.mise-en-pratique.xsl +107 -18
- data/lib/isodoc/bipm/bipm.rapport.xsl +107 -18
- data/lib/isodoc/bipm/jcgm.standard.xsl +107 -17
- data/lib/isodoc/bipm/metadata.rb +12 -11
- data/lib/metanorma/bipm/basicdoc.rng +94 -8
- data/lib/metanorma/bipm/biblio-standoc.rng +44 -1
- data/lib/metanorma/bipm/biblio.rng +11 -0
- data/lib/metanorma/bipm/isodoc.rng +13 -64
- data/lib/metanorma/bipm/reqt.rng +0 -16
- data/lib/metanorma/bipm/version.rb +1 -1
- data/metanorma-bipm.gemspec +2 -2
- metadata +6 -6
@@ -2246,6 +2246,10 @@
|
|
2246
2246
|
|
2247
2247
|
</xsl:attribute-set>
|
2248
2248
|
|
2249
|
+
<xsl:template name="refine_termexample-style">
|
2250
|
+
|
2251
|
+
</xsl:template>
|
2252
|
+
|
2249
2253
|
<xsl:attribute-set name="example-style">
|
2250
2254
|
|
2251
2255
|
<xsl:attribute name="font-size">10pt</xsl:attribute>
|
@@ -3397,6 +3401,36 @@
|
|
3397
3401
|
</xsl:for-each>
|
3398
3402
|
</xsl:template>
|
3399
3403
|
|
3404
|
+
<xsl:template name="processMainSectionsDefault_flatxml">
|
3405
|
+
<xsl:for-each select="/*/*[local-name()='sections']/* | /*/*[local-name()='bibliography']/*[local-name()='references'][@normative='true']">
|
3406
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3407
|
+
<xsl:variable name="flatxml">
|
3408
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3409
|
+
</xsl:variable>
|
3410
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3411
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3412
|
+
|
3413
|
+
</xsl:for-each>
|
3414
|
+
|
3415
|
+
<xsl:for-each select="/*/*[local-name()='annex']">
|
3416
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3417
|
+
<xsl:variable name="flatxml">
|
3418
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3419
|
+
</xsl:variable>
|
3420
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3421
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3422
|
+
</xsl:for-each>
|
3423
|
+
|
3424
|
+
<xsl:for-each select="/*/*[local-name()='bibliography']/*[not(@normative='true')] | /*/*[local-name()='bibliography']/*[local-name()='clause'][*[local-name()='references'][not(@normative='true')]]">
|
3425
|
+
<xsl:sort select="@displayorder" data-type="number"/>
|
3426
|
+
<xsl:variable name="flatxml">
|
3427
|
+
<xsl:apply-templates select="." mode="flatxml"/>
|
3428
|
+
</xsl:variable>
|
3429
|
+
<!-- debug_flatxml='<xsl:copy-of select="$flatxml"/>' -->
|
3430
|
+
<xsl:apply-templates select="xalan:nodeset($flatxml)/*"/>
|
3431
|
+
</xsl:for-each>
|
3432
|
+
</xsl:template>
|
3433
|
+
|
3400
3434
|
<xsl:variable name="regex_standard_reference">([A-Z]{2,}(/[A-Z]{2,})* \d+(-\d+)*(:\d{4})?)</xsl:variable>
|
3401
3435
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_open">###fo:inline keep-together_within-line###</xsl:variable>
|
3402
3436
|
<xsl:variable name="tag_fo_inline_keep-together_within-line_close">###/fo:inline keep-together_within-line###</xsl:variable>
|
@@ -3523,7 +3557,9 @@
|
|
3523
3557
|
</xsl:template> <!-- license-statement/p -->
|
3524
3558
|
|
3525
3559
|
<xsl:template match="*[local-name()='legal-statement']">
|
3560
|
+
<xsl:param name="isLegacy">false</xsl:param>
|
3526
3561
|
<fo:block xsl:use-attribute-sets="legal-statement-style">
|
3562
|
+
|
3527
3563
|
<xsl:apply-templates/>
|
3528
3564
|
</fo:block>
|
3529
3565
|
</xsl:template> <!-- legal-statement -->
|
@@ -5536,13 +5572,13 @@
|
|
5536
5572
|
<tr>
|
5537
5573
|
<td>
|
5538
5574
|
<xsl:attribute name="id">
|
5539
|
-
<xsl:value-of select="concat($id,'
|
5575
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_1')"/>
|
5540
5576
|
</xsl:attribute>
|
5541
5577
|
<xsl:apply-templates/>
|
5542
5578
|
</td>
|
5543
5579
|
<td>
|
5544
5580
|
<xsl:attribute name="id">
|
5545
|
-
<xsl:value-of select="concat($id,'
|
5581
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_2')"/>
|
5546
5582
|
</xsl:attribute>
|
5547
5583
|
|
5548
5584
|
<xsl:apply-templates select="following-sibling::*[local-name()='dd'][1]">
|
@@ -5854,13 +5890,14 @@
|
|
5854
5890
|
<!-- ================= -->
|
5855
5891
|
<!-- Added,deleted text -->
|
5856
5892
|
<!-- ================= -->
|
5857
|
-
<xsl:template match="*[local-name()='add']" name="tag_add">
|
5893
|
+
<xsl:template match="*[local-name()='add'] | *[local-name() = 'change-open-tag'] | *[local-name() = 'change-close-tag']" name="tag_add">
|
5858
5894
|
<xsl:param name="skip">true</xsl:param>
|
5859
5895
|
<xsl:param name="block">false</xsl:param>
|
5860
5896
|
<xsl:param name="type"/>
|
5861
5897
|
<xsl:param name="text-align"/>
|
5862
5898
|
<xsl:choose>
|
5863
|
-
<xsl:when test="starts-with(., $ace_tag)"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start
|
5899
|
+
<xsl:when test="starts-with(., $ace_tag) or local-name() = 'change-open-tag' or local-name() = 'change-close-tag'"> <!-- examples: ace-tag_A1_start, ace-tag_A2_end, C1_start, AC_start, or
|
5900
|
+
<change-open-tag>A<sub>1</sub></change-open-tag>, <change-close-tag>A<sub>1</sub></change-close-tag> -->
|
5864
5901
|
<xsl:choose>
|
5865
5902
|
<xsl:when test="$skip = 'true' and ((local-name(../..) = 'note' and not(preceding-sibling::node())) or (local-name(..) = 'title' and preceding-sibling::node()[1][local-name() = 'tab']) or local-name(..) = 'formattedref' and not(preceding-sibling::node())) and ../node()[last()][local-name() = 'add'][starts-with(text(), $ace_tag)]"><!-- start tag displayed in template name="note" and title --></xsl:when>
|
5866
5903
|
<xsl:otherwise>
|
@@ -5868,12 +5905,32 @@
|
|
5868
5905
|
<xsl:call-template name="insertTag">
|
5869
5906
|
<xsl:with-param name="type">
|
5870
5907
|
<xsl:choose>
|
5908
|
+
<xsl:when test="local-name() = 'change-open-tag'">start</xsl:when>
|
5909
|
+
<xsl:when test="local-name() = 'change-close-tag'">end</xsl:when>
|
5871
5910
|
<xsl:when test="$type = ''"><xsl:value-of select="substring-after(substring-after(., $ace_tag), '_')"/> <!-- start or end --></xsl:when>
|
5872
5911
|
<xsl:otherwise><xsl:value-of select="$type"/></xsl:otherwise>
|
5873
5912
|
</xsl:choose>
|
5874
5913
|
</xsl:with-param>
|
5875
|
-
<xsl:with-param name="kind"
|
5876
|
-
|
5914
|
+
<xsl:with-param name="kind">
|
5915
|
+
<xsl:choose>
|
5916
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
5917
|
+
<xsl:value-of select="text()"/>
|
5918
|
+
</xsl:when>
|
5919
|
+
<xsl:otherwise>
|
5920
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 1, 1)"/> <!-- A or C -->
|
5921
|
+
</xsl:otherwise>
|
5922
|
+
</xsl:choose>
|
5923
|
+
</xsl:with-param>
|
5924
|
+
<xsl:with-param name="value">
|
5925
|
+
<xsl:choose>
|
5926
|
+
<xsl:when test="local-name() = 'change-open-tag' or local-name() = 'change-close-tag'">
|
5927
|
+
<xsl:value-of select="*[local-name() = 'sub']"/>
|
5928
|
+
</xsl:when>
|
5929
|
+
<xsl:otherwise>
|
5930
|
+
<xsl:value-of select="substring(substring-before(substring-after(., $ace_tag), '_'), 2)"/> <!-- 1, 2, C -->
|
5931
|
+
</xsl:otherwise>
|
5932
|
+
</xsl:choose>
|
5933
|
+
</xsl:with-param>
|
5877
5934
|
</xsl:call-template>
|
5878
5935
|
</xsl:variable>
|
5879
5936
|
<xsl:choose>
|
@@ -6133,6 +6190,10 @@
|
|
6133
6190
|
<fo:inline keep-with-next.within-line="always"><xsl:value-of select="."/></fo:inline>
|
6134
6191
|
</xsl:template>
|
6135
6192
|
|
6193
|
+
<xsl:template match="*[local-name() = 'span'][contains(@style, 'text-transform:none')]//text()" priority="5">
|
6194
|
+
<xsl:value-of select="."/>
|
6195
|
+
</xsl:template>
|
6196
|
+
|
6136
6197
|
<!-- ========================= -->
|
6137
6198
|
<!-- END Rich text formatting -->
|
6138
6199
|
<!-- ========================= -->
|
@@ -6763,7 +6824,7 @@
|
|
6763
6824
|
</xsl:choose>
|
6764
6825
|
</xsl:variable>
|
6765
6826
|
<xsl:attribute name="id">
|
6766
|
-
<xsl:value-of select="concat($id,'
|
6827
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_',$divide)"/>
|
6767
6828
|
</xsl:attribute>
|
6768
6829
|
|
6769
6830
|
<xsl:for-each select="*[local-name() = 'p']">
|
@@ -6771,7 +6832,7 @@
|
|
6771
6832
|
<xsl:copy-of select="@*"/>
|
6772
6833
|
<xsl:variable name="p_num" select="count(preceding-sibling::*[local-name() = 'p']) + 1"/>
|
6773
6834
|
<xsl:attribute name="id">
|
6774
|
-
<xsl:value-of select="concat($id,'
|
6835
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_p_',$p_num,'_',$divide)"/>
|
6775
6836
|
</xsl:attribute>
|
6776
6837
|
|
6777
6838
|
<!-- <xsl:copy-of select="node()" /> -->
|
@@ -6835,7 +6896,7 @@
|
|
6835
6896
|
<xsl:variable name="num" select="count(preceding-sibling::word) + 1"/>
|
6836
6897
|
<xsl:copy>
|
6837
6898
|
<xsl:attribute name="id">
|
6838
|
-
<xsl:value-of select="concat($id,'
|
6899
|
+
<xsl:value-of select="concat($id,'@',$row_number,'_',$col_number,'_word_',$num,'_',$divide)"/>
|
6839
6900
|
</xsl:attribute>
|
6840
6901
|
<xsl:copy-of select="node()"/>
|
6841
6902
|
</xsl:copy>
|
@@ -8086,11 +8147,17 @@
|
|
8086
8147
|
</xsl:when>
|
8087
8148
|
<xsl:otherwise>
|
8088
8149
|
|
8150
|
+
<xsl:variable name="image_class" select="ancestor::*[local-name() = 'image']/@class"/>
|
8151
|
+
<xsl:variable name="ancestor_table_cell" select="normalize-space(ancestor::*[local-name() = 'td'] or ancestor::*[local-name() = 'th'])"/>
|
8152
|
+
|
8089
8153
|
<xsl:variable name="element">
|
8090
8154
|
<xsl:choose>
|
8091
8155
|
<xsl:when test="ancestor::*[local-name() = 'tr'] and $isGenerateTableIF = 'true'">
|
8092
8156
|
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
8093
8157
|
</xsl:when>
|
8158
|
+
<xsl:when test="not(ancestor::*[local-name() = 'figure'])">
|
8159
|
+
<fo:inline xsl:use-attribute-sets="image-style" text-align="left"/>
|
8160
|
+
</xsl:when>
|
8094
8161
|
<xsl:otherwise>
|
8095
8162
|
<fo:block xsl:use-attribute-sets="image-style">
|
8096
8163
|
<xsl:if test="ancestor::*[local-name() = 'dt']">
|
@@ -8106,10 +8173,24 @@
|
|
8106
8173
|
<xsl:copy-of select="@*"/>
|
8107
8174
|
<!-- <fo:block xsl:use-attribute-sets="image-style"> -->
|
8108
8175
|
<fo:instream-foreign-object fox:alt-text="{$alt-text}">
|
8109
|
-
|
8110
|
-
|
8111
|
-
|
8112
|
-
|
8176
|
+
|
8177
|
+
<xsl:choose>
|
8178
|
+
<xsl:when test="$image_class = 'corrigenda-tag'">
|
8179
|
+
<xsl:attribute name="fox:alt-text">CorrigendaTag</xsl:attribute>
|
8180
|
+
<xsl:attribute name="baseline-shift">-10%</xsl:attribute>
|
8181
|
+
<xsl:if test="$ancestor_table_cell = 'true'">
|
8182
|
+
<xsl:attribute name="baseline-shift">-25%</xsl:attribute>
|
8183
|
+
</xsl:if>
|
8184
|
+
<xsl:attribute name="height">3.5mm</xsl:attribute>
|
8185
|
+
</xsl:when>
|
8186
|
+
<xsl:otherwise>
|
8187
|
+
<xsl:if test="$isGenerateTableIF = 'false'">
|
8188
|
+
<xsl:attribute name="width">100%</xsl:attribute>
|
8189
|
+
</xsl:if>
|
8190
|
+
<xsl:attribute name="content-height">100%</xsl:attribute>
|
8191
|
+
</xsl:otherwise>
|
8192
|
+
</xsl:choose>
|
8193
|
+
|
8113
8194
|
<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>
|
8114
8195
|
<xsl:variable name="svg_width" select="xalan:nodeset($svg_content)/*/@width"/>
|
8115
8196
|
<xsl:variable name="svg_height" select="xalan:nodeset($svg_content)/*/@height"/>
|
@@ -9624,7 +9705,7 @@
|
|
9624
9705
|
<!-- ====== -->
|
9625
9706
|
<xsl:template match="*[local-name() = 'termexample']">
|
9626
9707
|
<fo:block id="{@id}" xsl:use-attribute-sets="termexample-style">
|
9627
|
-
|
9708
|
+
<xsl:call-template name="refine_termexample-style"/>
|
9628
9709
|
<xsl:call-template name="setBlockSpanAll"/>
|
9629
9710
|
|
9630
9711
|
<xsl:apply-templates select="*[local-name()='name']"/>
|
@@ -10294,14 +10375,16 @@
|
|
10294
10375
|
|
10295
10376
|
<xsl:template match="*[local-name() = 'annex']">
|
10296
10377
|
<fo:block break-after="page"/>
|
10297
|
-
<fo:block
|
10378
|
+
<fo:block>
|
10298
10379
|
|
10299
10380
|
<xsl:call-template name="setBlockSpanAll"/>
|
10300
10381
|
|
10301
10382
|
<xsl:call-template name="refine_annex_style"/>
|
10302
10383
|
|
10303
10384
|
</fo:block>
|
10304
|
-
<
|
10385
|
+
<fo:block id="{@id}">
|
10386
|
+
<xsl:apply-templates/>
|
10387
|
+
</fo:block>
|
10305
10388
|
</xsl:template>
|
10306
10389
|
|
10307
10390
|
<xsl:template name="refine_annex_style">
|
@@ -10321,13 +10404,19 @@
|
|
10321
10404
|
<fo:block id="{@id}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10322
10405
|
</xsl:when>
|
10323
10406
|
<!-- if there isn't element with id 'from', then create 'bookmark' here -->
|
10324
|
-
<xsl:when test="not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10407
|
+
<xsl:when test="ancestor::*[contains(local-name(), '-standard')] and not(ancestor::*[contains(local-name(), '-standard')]//*[@id = $id_from])">
|
10408
|
+
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10409
|
+
</xsl:when>
|
10410
|
+
<xsl:when test="not(//*[@id = $id_from]) and not(preceding-sibling::*[@id = $id_from])">
|
10325
10411
|
<fo:block id="{@from}" font-size="1pt"><xsl:value-of select="$hair_space"/></fo:block>
|
10326
10412
|
</xsl:when>
|
10327
10413
|
</xsl:choose>
|
10328
10414
|
|
10329
10415
|
</xsl:template>
|
10330
10416
|
|
10417
|
+
<!-- https://github.com/metanorma/mn-samples-bsi/issues/312 -->
|
10418
|
+
<xsl:template match="*[local-name() = 'review'][@type = 'other']"/>
|
10419
|
+
|
10331
10420
|
<xsl:template match="*[local-name() = 'name']/text()">
|
10332
10421
|
<!-- 0xA0 to space replacement -->
|
10333
10422
|
<xsl:value-of select="java:replaceAll(java:java.lang.String.new(.),' ',' ')"/>
|
@@ -11942,6 +12031,7 @@
|
|
11942
12031
|
<xsl:template name="printEdition">
|
11943
12032
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[contains(local-name(), '-standard')])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
11944
12033
|
<xsl:text> </xsl:text>
|
12034
|
+
|
11945
12035
|
<xsl:choose>
|
11946
12036
|
<xsl:when test="$edition_i18n != ''">
|
11947
12037
|
<!-- Example: <edition language="fr">deuxième édition</edition> -->
|
data/lib/isodoc/bipm/metadata.rb
CHANGED
@@ -22,19 +22,19 @@ module IsoDoc
|
|
22
22
|
set(:si_aspect_paths, si_paths)
|
23
23
|
end
|
24
24
|
|
25
|
-
|
25
|
+
def title1(xml, type, lang)
|
26
|
+
xml.at(ns("//bibdata/title[@type='title-#{type}']" \
|
27
|
+
"[@language='#{lang}']"))
|
28
|
+
&.children&.to_xml || ""
|
29
|
+
end
|
26
30
|
|
27
31
|
def title(isoxml, _out)
|
28
32
|
lang1, lang2 = @lang == "fr" ? %w(fr en) : %w(en fr)
|
29
|
-
set(:doctitle,
|
30
|
-
|
31
|
-
set(:docsubtitle, @c.encode(isoxml.at(
|
32
|
-
ns("#{TITLE}[@type='title-main'][@language='#{lang2}']"))&.text || ""))
|
33
|
+
set(:doctitle, title1(isoxml, "main", lang1))
|
34
|
+
set(:docsubtitle, title1(isoxml, "main", lang2))
|
33
35
|
%w(appendix annex part subtitle provenance).each do |e|
|
34
|
-
set("#{e}title".to_sym,
|
35
|
-
|
36
|
-
set("#{e}subtitle".to_sym, @c.encode(isoxml.at(
|
37
|
-
ns("#{TITLE}[@type='title-#{e}'][@language='#{lang2}']"))&.text || ""))
|
36
|
+
set("#{e}title".to_sym, title1(isoxml, e, lang1))
|
37
|
+
set("#{e}subtitle".to_sym, title1(isoxml, e, lang2))
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
@@ -57,7 +57,7 @@ module IsoDoc
|
|
57
57
|
dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/annexid"))
|
58
58
|
dn and set(:annexid, @i18n.l10n("#{label1} #{dn.text}"))
|
59
59
|
dn and set(:annexid_alt, @i18n.l10n("#{label2} #{dn.text}"))
|
60
|
-
label1, label2
|
60
|
+
label1, label2 = @lang == "fr" ? %w(Partie Part) : %w(Part Partie)
|
61
61
|
dn = isoxml.at(ns("//bibdata/ext/structuredidentifier/part"))
|
62
62
|
dn and set(:partid, @i18n.l10n("#{label1} #{dn.text}"))
|
63
63
|
dn and set(:partid_alt, @i18n.l10n("#{label2} #{dn.text}"))
|
@@ -71,7 +71,8 @@ module IsoDoc
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def bibdate(isoxml, _out)
|
74
|
-
pubdate = isoxml
|
74
|
+
pubdate = isoxml
|
75
|
+
.at(ns("//bibdata/date[not(@format)][@type = 'published']"))
|
75
76
|
pubdate and set(:pubdate_monthyear, monthyr(pubdate.text))
|
76
77
|
end
|
77
78
|
end
|
@@ -95,8 +95,89 @@
|
|
95
95
|
<ref name="pagebreak"/>
|
96
96
|
<ref name="hr"/>
|
97
97
|
<ref name="bookmark"/>
|
98
|
+
<ref name="amend"/>
|
98
99
|
</choice>
|
99
100
|
</define>
|
101
|
+
<define name="amend">
|
102
|
+
<element name="amend">
|
103
|
+
<ref name="AmendType"/>
|
104
|
+
</element>
|
105
|
+
</define>
|
106
|
+
<define name="AmendType">
|
107
|
+
<optional>
|
108
|
+
<attribute name="id">
|
109
|
+
<data type="ID"/>
|
110
|
+
</attribute>
|
111
|
+
</optional>
|
112
|
+
<attribute name="change">
|
113
|
+
<choice>
|
114
|
+
<value>add</value>
|
115
|
+
<value>modify</value>
|
116
|
+
<value>delete</value>
|
117
|
+
<value>replace</value>
|
118
|
+
</choice>
|
119
|
+
</attribute>
|
120
|
+
<optional>
|
121
|
+
<attribute name="path"/>
|
122
|
+
</optional>
|
123
|
+
<optional>
|
124
|
+
<attribute name="path_end"/>
|
125
|
+
</optional>
|
126
|
+
<optional>
|
127
|
+
<attribute name="title"/>
|
128
|
+
</optional>
|
129
|
+
<optional>
|
130
|
+
<element name="location">
|
131
|
+
<zeroOrMore>
|
132
|
+
<choice>
|
133
|
+
<ref name="locality"/>
|
134
|
+
<ref name="localityStack"/>
|
135
|
+
</choice>
|
136
|
+
</zeroOrMore>
|
137
|
+
</element>
|
138
|
+
</optional>
|
139
|
+
<optional>
|
140
|
+
<element name="description">
|
141
|
+
<zeroOrMore>
|
142
|
+
<ref name="BasicBlock"/>
|
143
|
+
</zeroOrMore>
|
144
|
+
</element>
|
145
|
+
</optional>
|
146
|
+
<optional>
|
147
|
+
<element name="newcontent">
|
148
|
+
<optional>
|
149
|
+
<attribute name="id">
|
150
|
+
<data type="ID"/>
|
151
|
+
</attribute>
|
152
|
+
</optional>
|
153
|
+
<zeroOrMore>
|
154
|
+
<ref name="BasicBlock"/>
|
155
|
+
</zeroOrMore>
|
156
|
+
</element>
|
157
|
+
</optional>
|
158
|
+
<zeroOrMore>
|
159
|
+
<ref name="classification"/>
|
160
|
+
</zeroOrMore>
|
161
|
+
<zeroOrMore>
|
162
|
+
<ref name="contributor"/>
|
163
|
+
</zeroOrMore>
|
164
|
+
</define>
|
165
|
+
<define name="classification">
|
166
|
+
<element name="classification">
|
167
|
+
<ref name="classification_tag"/>
|
168
|
+
<ref name="classification_value"/>
|
169
|
+
</element>
|
170
|
+
</define>
|
171
|
+
<define name="classification_tag">
|
172
|
+
<element name="tag">
|
173
|
+
<text/>
|
174
|
+
</element>
|
175
|
+
</define>
|
176
|
+
<define name="classification_value">
|
177
|
+
<element name="value">
|
178
|
+
<text/>
|
179
|
+
</element>
|
180
|
+
</define>
|
100
181
|
<define name="paragraph">
|
101
182
|
<element name="p">
|
102
183
|
<ref name="ParagraphType"/>
|
@@ -163,6 +244,9 @@
|
|
163
244
|
<data type="ID"/>
|
164
245
|
</attribute>
|
165
246
|
<attribute name="reviewer"/>
|
247
|
+
<optional>
|
248
|
+
<attribute name="type"/>
|
249
|
+
</optional>
|
166
250
|
<optional>
|
167
251
|
<attribute name="date">
|
168
252
|
<data type="dateTime"/>
|
@@ -939,18 +1023,12 @@
|
|
939
1023
|
</optional>
|
940
1024
|
<optional>
|
941
1025
|
<attribute name="width">
|
942
|
-
<
|
943
|
-
<data type="int"/>
|
944
|
-
<value>auto</value>
|
945
|
-
</choice>
|
1026
|
+
<ref name="ImageSize"/>
|
946
1027
|
</attribute>
|
947
1028
|
</optional>
|
948
1029
|
<optional>
|
949
1030
|
<attribute name="height">
|
950
|
-
<
|
951
|
-
<data type="int"/>
|
952
|
-
<value>auto</value>
|
953
|
-
</choice>
|
1031
|
+
<ref name="ImageSize"/>
|
954
1032
|
</attribute>
|
955
1033
|
</optional>
|
956
1034
|
<optional>
|
@@ -965,6 +1043,14 @@
|
|
965
1043
|
</attribute>
|
966
1044
|
</optional>
|
967
1045
|
</define>
|
1046
|
+
<define name="ImageSize">
|
1047
|
+
<choice>
|
1048
|
+
<data type="string">
|
1049
|
+
<param name="pattern">\d+([.]\d+)?(%?)</param>
|
1050
|
+
</data>
|
1051
|
+
<value>auto</value>
|
1052
|
+
</choice>
|
1053
|
+
</define>
|
968
1054
|
<define name="video">
|
969
1055
|
<element name="video">
|
970
1056
|
<attribute name="id">
|
@@ -9,11 +9,42 @@
|
|
9
9
|
-->
|
10
10
|
<include href="biblio.rng">
|
11
11
|
<define name="BibData">
|
12
|
-
<ref name="
|
12
|
+
<ref name="StandardBibliographicItem"/>
|
13
13
|
<optional>
|
14
14
|
<ref name="ext"/>
|
15
15
|
</optional>
|
16
16
|
</define>
|
17
|
+
<define name="docrelation">
|
18
|
+
<element name="relation">
|
19
|
+
<attribute name="type">
|
20
|
+
<ref name="DocRelationType"/>
|
21
|
+
</attribute>
|
22
|
+
<optional>
|
23
|
+
<element name="description">
|
24
|
+
<ref name="FormattedString"/>
|
25
|
+
</element>
|
26
|
+
</optional>
|
27
|
+
<element name="bibitem">
|
28
|
+
<ref name="StandardReducedBibliographicItem"/>
|
29
|
+
</element>
|
30
|
+
<choice>
|
31
|
+
<zeroOrMore>
|
32
|
+
<ref name="locality"/>
|
33
|
+
</zeroOrMore>
|
34
|
+
<zeroOrMore>
|
35
|
+
<ref name="localityStack"/>
|
36
|
+
</zeroOrMore>
|
37
|
+
</choice>
|
38
|
+
<choice>
|
39
|
+
<zeroOrMore>
|
40
|
+
<ref name="sourceLocality"/>
|
41
|
+
</zeroOrMore>
|
42
|
+
<zeroOrMore>
|
43
|
+
<ref name="sourceLocalityStack"/>
|
44
|
+
</zeroOrMore>
|
45
|
+
</choice>
|
46
|
+
</element>
|
47
|
+
</define>
|
17
48
|
</include>
|
18
49
|
<define name="ext">
|
19
50
|
<element name="ext">
|
@@ -161,4 +192,16 @@
|
|
161
192
|
</optional>
|
162
193
|
</element>
|
163
194
|
</define>
|
195
|
+
<define name="StandardBibliographicItem">
|
196
|
+
<ref name="BibliographicItem"/>
|
197
|
+
<zeroOrMore>
|
198
|
+
<ref name="amend"/>
|
199
|
+
</zeroOrMore>
|
200
|
+
</define>
|
201
|
+
<define name="StandardReducedBibliographicItem">
|
202
|
+
<ref name="ReducedBibliographicItem"/>
|
203
|
+
<zeroOrMore>
|
204
|
+
<ref name="amend"/>
|
205
|
+
</zeroOrMore>
|
206
|
+
</define>
|
164
207
|
</grammar>
|
@@ -241,6 +241,9 @@
|
|
241
241
|
</element>
|
242
242
|
</define>
|
243
243
|
<define name="FullNameType">
|
244
|
+
<optional>
|
245
|
+
<ref name="name_abbreviation"/>
|
246
|
+
</optional>
|
244
247
|
<choice>
|
245
248
|
<group>
|
246
249
|
<zeroOrMore>
|
@@ -266,6 +269,11 @@
|
|
266
269
|
<ref name="variantname"/>
|
267
270
|
</zeroOrMore>
|
268
271
|
</define>
|
272
|
+
<define name="name_abbreviation">
|
273
|
+
<element name="abbreviation">
|
274
|
+
<ref name="LocalizedString"/>
|
275
|
+
</element>
|
276
|
+
</define>
|
269
277
|
<define name="prefix">
|
270
278
|
<element name="prefix">
|
271
279
|
<ref name="LocalizedString"/>
|
@@ -870,6 +878,9 @@
|
|
870
878
|
<optional>
|
871
879
|
<ref name="validity"/>
|
872
880
|
</optional>
|
881
|
+
<optional>
|
882
|
+
<ref name="depiction"/>
|
883
|
+
</optional>
|
873
884
|
</define>
|
874
885
|
<define name="btitle">
|
875
886
|
<element name="title">
|
@@ -17,10 +17,19 @@
|
|
17
17
|
these elements; we just want one namespace for any child grammars
|
18
18
|
of this.
|
19
19
|
-->
|
20
|
-
<!-- VERSION v1.
|
20
|
+
<!-- VERSION v1.3.0 -->
|
21
21
|
<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">
|
22
22
|
<include href="reqt.rng"/>
|
23
23
|
<include href="basicdoc.rng">
|
24
|
+
<define name="amend">
|
25
|
+
<element name="amend">
|
26
|
+
<ref name="BlockAttributes"/>
|
27
|
+
<ref name="AmendType"/>
|
28
|
+
<zeroOrMore>
|
29
|
+
<ref name="autonumber"/>
|
30
|
+
</zeroOrMore>
|
31
|
+
</element>
|
32
|
+
</define>
|
24
33
|
<define name="admonition">
|
25
34
|
<element name="admonition">
|
26
35
|
<attribute name="type">
|
@@ -137,6 +146,9 @@
|
|
137
146
|
<data type="boolean"/>
|
138
147
|
</attribute>
|
139
148
|
</optional>
|
149
|
+
<optional>
|
150
|
+
<attribute name="style"/>
|
151
|
+
</optional>
|
140
152
|
<oneOrMore>
|
141
153
|
<ref name="PureTextElement"/>
|
142
154
|
</oneOrMore>
|
@@ -2319,69 +2331,6 @@
|
|
2319
2331
|
<ref name="CitationType"/>
|
2320
2332
|
</element>
|
2321
2333
|
</define>
|
2322
|
-
<define name="amend">
|
2323
|
-
<element name="amend">
|
2324
|
-
<optional>
|
2325
|
-
<attribute name="id">
|
2326
|
-
<data type="ID"/>
|
2327
|
-
</attribute>
|
2328
|
-
</optional>
|
2329
|
-
<attribute name="change">
|
2330
|
-
<choice>
|
2331
|
-
<value>add</value>
|
2332
|
-
<value>modify</value>
|
2333
|
-
<value>delete</value>
|
2334
|
-
<value>replace</value>
|
2335
|
-
</choice>
|
2336
|
-
</attribute>
|
2337
|
-
<optional>
|
2338
|
-
<attribute name="path"/>
|
2339
|
-
</optional>
|
2340
|
-
<optional>
|
2341
|
-
<attribute name="path_end"/>
|
2342
|
-
</optional>
|
2343
|
-
<optional>
|
2344
|
-
<attribute name="title"/>
|
2345
|
-
</optional>
|
2346
|
-
<ref name="BlockAttributes"/>
|
2347
|
-
<optional>
|
2348
|
-
<element name="location">
|
2349
|
-
<zeroOrMore>
|
2350
|
-
<ref name="locality"/>
|
2351
|
-
</zeroOrMore>
|
2352
|
-
</element>
|
2353
|
-
</optional>
|
2354
|
-
<zeroOrMore>
|
2355
|
-
<ref name="autonumber"/>
|
2356
|
-
</zeroOrMore>
|
2357
|
-
<optional>
|
2358
|
-
<element name="description">
|
2359
|
-
<zeroOrMore>
|
2360
|
-
<ref name="BasicBlock"/>
|
2361
|
-
</zeroOrMore>
|
2362
|
-
</element>
|
2363
|
-
</optional>
|
2364
|
-
<optional>
|
2365
|
-
<element name="newcontent">
|
2366
|
-
<optional>
|
2367
|
-
<attribute name="id">
|
2368
|
-
<data type="ID"/>
|
2369
|
-
</attribute>
|
2370
|
-
</optional>
|
2371
|
-
<zeroOrMore>
|
2372
|
-
<ref name="BasicBlock"/>
|
2373
|
-
</zeroOrMore>
|
2374
|
-
</element>
|
2375
|
-
</optional>
|
2376
|
-
<optional>
|
2377
|
-
<element name="description">
|
2378
|
-
<zeroOrMore>
|
2379
|
-
<ref name="BasicBlock"/>
|
2380
|
-
</zeroOrMore>
|
2381
|
-
</element>
|
2382
|
-
</optional>
|
2383
|
-
</element>
|
2384
|
-
</define>
|
2385
2334
|
<define name="autonumber">
|
2386
2335
|
<element name="autonumber">
|
2387
2336
|
<attribute name="type">
|
data/lib/metanorma/bipm/reqt.rng
CHANGED
@@ -207,20 +207,4 @@
|
|
207
207
|
<value>permission</value>
|
208
208
|
</choice>
|
209
209
|
</define>
|
210
|
-
<define name="classification">
|
211
|
-
<element name="classification">
|
212
|
-
<ref name="classification_tag"/>
|
213
|
-
<ref name="classification_value"/>
|
214
|
-
</element>
|
215
|
-
</define>
|
216
|
-
<define name="classification_tag">
|
217
|
-
<element name="tag">
|
218
|
-
<text/>
|
219
|
-
</element>
|
220
|
-
</define>
|
221
|
-
<define name="classification_value">
|
222
|
-
<element name="value">
|
223
|
-
<text/>
|
224
|
-
</element>
|
225
|
-
</define>
|
226
210
|
</grammar>
|