metanorma-ribose 2.6.3 → 2.6.4
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/ribose/presentation_xml_convert.rb +22 -20
- data/lib/isodoc/ribose/ribose.standard.xsl +168 -43
- data/lib/isodoc/ribose/xref.rb +0 -33
- data/lib/metanorma/ribose/basicdoc.rng +14 -8
- data/lib/metanorma/ribose/biblio-standoc.rng +37 -7
- data/lib/metanorma/ribose/biblio.rng +30 -18
- data/lib/metanorma/ribose/isodoc.rng +115 -96
- data/lib/metanorma/ribose/relaton-ribose.rng +8 -20
- data/lib/metanorma/ribose/reqt.rng +7 -6
- data/lib/metanorma/ribose/ribose.rng +1 -34
- data/lib/metanorma/ribose/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: 4e8897efca52e1e767291848da45a957e4e8966f08993bc593bd9c5528dad235
|
4
|
+
data.tar.gz: 6bf1662b2499b88447c447f5e4695b6b948b6650cecae91db4e7f965e22bc78e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0af4b68af689ce802589951192a6c0a5c3aef24606830e209e0920b18e5ed728e6f39bd7d91bfeddc727a8e476c9934bd79e68b332293182b7f2678fe2ced7f8
|
7
|
+
data.tar.gz: 18076c7be25c2554dac9fb00a4b34eec5af2925d54e5785739a4690357b4972d74b0f6d33a70f58456010e8210d92899374526a87331b8ac00d2d642e6f1bc95
|
@@ -5,30 +5,17 @@ require "metanorma-generic"
|
|
5
5
|
module IsoDoc
|
6
6
|
module Ribose
|
7
7
|
class PresentationXMLConvert < IsoDoc::Generic::PresentationXMLConvert
|
8
|
-
# KILL
|
9
|
-
def annex1x(elem)
|
10
|
-
lbl = @xrefs.anchor(elem["id"], :label)
|
11
|
-
prefix_name(elem, "<br/><br/>", lbl, "title")
|
12
|
-
end
|
13
|
-
|
14
8
|
def annex_delim(_elem)
|
15
9
|
"<br/><br/>"
|
16
10
|
end
|
17
11
|
|
18
12
|
def middle_title(docxml); end
|
19
13
|
|
20
|
-
|
21
|
-
|
22
|
-
elem.children = l10n("<strong>#{@i18n.source}:</strong> " \
|
23
|
-
"#{to_xml(elem.children).strip}")
|
24
|
-
elem&.next_element&.name == "termsource" and elem.next = "; "
|
14
|
+
def termsource_label(elem, sources)
|
15
|
+
elem.replace(l10n("<strong>#{@i18n.source}</strong>: #{sources}"))
|
25
16
|
end
|
26
17
|
|
27
|
-
|
28
|
-
elem.replace(l10n("<strong>#{@i18n.source}</strong>: #{sources}"))
|
29
|
-
end
|
30
|
-
|
31
|
-
def designation_boldface(desgn); end
|
18
|
+
def designation_boldface(desgn); end
|
32
19
|
|
33
20
|
def preface_rearrange(doc)
|
34
21
|
preface_move(doc.xpath(ns("//preface/abstract")),
|
@@ -43,10 +30,25 @@ module IsoDoc
|
|
43
30
|
%w(), doc)
|
44
31
|
end
|
45
32
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
33
|
+
def clause(docxml)
|
34
|
+
super
|
35
|
+
docxml.xpath(ns("//executivesummary | //appendix")).each do |x|
|
36
|
+
clause1(x)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def ul_label_list(_elem)
|
41
|
+
%w(o — •)
|
42
|
+
end
|
43
|
+
|
44
|
+
def ol_label_template(_elem)
|
45
|
+
super
|
46
|
+
.merge({
|
47
|
+
alphabet: %{%<span class="fmt-label-delim">.</span>},
|
48
|
+
arabic: %{%<span class="fmt-label-delim">.</span>},
|
49
|
+
roman: %{%<span class="fmt-label-delim">.</span>},
|
50
|
+
})
|
51
|
+
end
|
50
52
|
|
51
53
|
include Init
|
52
54
|
end
|
@@ -2026,6 +2026,7 @@
|
|
2026
2026
|
</xsl:template> <!-- refine_table-style -->
|
2027
2027
|
|
2028
2028
|
<xsl:attribute-set name="table-name-style">
|
2029
|
+
<xsl:attribute name="role">Caption</xsl:attribute>
|
2029
2030
|
<xsl:attribute name="keep-with-next">always</xsl:attribute>
|
2030
2031
|
|
2031
2032
|
<xsl:attribute name="font-size">13pt</xsl:attribute>
|
@@ -2039,6 +2040,9 @@
|
|
2039
2040
|
|
2040
2041
|
<xsl:template name="refine_table-name-style">
|
2041
2042
|
<xsl:param name="continued"/>
|
2043
|
+
<xsl:if test="$continued = 'true'">
|
2044
|
+
<xsl:attribute name="role">SKIP</xsl:attribute>
|
2045
|
+
</xsl:if>
|
2042
2046
|
|
2043
2047
|
</xsl:template> <!-- refine_table-name-style -->
|
2044
2048
|
|
@@ -3869,7 +3873,7 @@
|
|
3869
3873
|
</xsl:if>
|
3870
3874
|
|
3871
3875
|
</fo:block-container>
|
3872
|
-
</xsl:variable>
|
3876
|
+
</xsl:variable> <!-- END: variable name="table" -->
|
3873
3877
|
|
3874
3878
|
<xsl:variable name="isAdded" select="@added"/>
|
3875
3879
|
<xsl:variable name="isDeleted" select="@deleted"/>
|
@@ -3879,14 +3883,14 @@
|
|
3879
3883
|
|
3880
3884
|
<!-- centered table when table name is centered (see table-name-style) -->
|
3881
3885
|
|
3882
|
-
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style">
|
3886
|
+
<fo:table table-layout="fixed" width="100%" xsl:use-attribute-sets="table-container-style" role="SKIP">
|
3883
3887
|
|
3884
3888
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
3885
3889
|
<fo:table-column column-width="{@width}"/>
|
3886
3890
|
<fo:table-column column-width="proportional-column-width(1)"/>
|
3887
|
-
<fo:table-body>
|
3888
|
-
<fo:table-row>
|
3889
|
-
<fo:table-cell column-number="2">
|
3891
|
+
<fo:table-body role="SKIP">
|
3892
|
+
<fo:table-row role="SKIP">
|
3893
|
+
<fo:table-cell column-number="2" role="SKIP">
|
3890
3894
|
<xsl:copy-of select="$table-preamble"/>
|
3891
3895
|
<fo:block role="SKIP">
|
3892
3896
|
<xsl:call-template name="setTrackChangesStyles">
|
@@ -3927,11 +3931,12 @@
|
|
3927
3931
|
|
3928
3932
|
</xsl:template>
|
3929
3933
|
|
3934
|
+
<!-- table/name-->
|
3930
3935
|
<xsl:template match="*[local-name()='table']/*[local-name() = 'name']">
|
3931
3936
|
<xsl:param name="continued"/>
|
3932
3937
|
<xsl:if test="normalize-space() != ''">
|
3933
3938
|
|
3934
|
-
<fo:block xsl:use-attribute-sets="table-name-style"
|
3939
|
+
<fo:block xsl:use-attribute-sets="table-name-style">
|
3935
3940
|
|
3936
3941
|
<xsl:call-template name="refine_table-name-style">
|
3937
3942
|
<xsl:with-param name="continued" select="$continued"/>
|
@@ -4408,7 +4413,7 @@
|
|
4408
4413
|
|
4409
4414
|
<xsl:variable name="tableWithNotesAndFootnotes">
|
4410
4415
|
|
4411
|
-
<fo:table keep-with-previous="always">
|
4416
|
+
<fo:table keep-with-previous="always" role="SKIP">
|
4412
4417
|
<xsl:for-each select="xalan:nodeset($table_attributes)/table_attributes/@*">
|
4413
4418
|
<xsl:variable name="name" select="local-name()"/>
|
4414
4419
|
<xsl:choose>
|
@@ -4439,9 +4444,9 @@
|
|
4439
4444
|
</xsl:otherwise>
|
4440
4445
|
</xsl:choose>
|
4441
4446
|
|
4442
|
-
<fo:table-body>
|
4443
|
-
<fo:table-row>
|
4444
|
-
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}">
|
4447
|
+
<fo:table-body role="SKIP">
|
4448
|
+
<fo:table-row role="SKIP">
|
4449
|
+
<fo:table-cell xsl:use-attribute-sets="table-footer-cell-style" number-columns-spanned="{$cols-count}" role="SKIP">
|
4445
4450
|
|
4446
4451
|
<xsl:call-template name="refine_table-footer-cell-style"/>
|
4447
4452
|
|
@@ -4838,6 +4843,7 @@
|
|
4838
4843
|
<!-- footnotes in text (title, bibliography, main body), not for tables, figures and names --> <!-- table's, figure's names -->
|
4839
4844
|
<!-- fn in text -->
|
4840
4845
|
<xsl:template match="*[local-name() = 'fn'][not(ancestor::*[(local-name() = 'table' or local-name() = 'figure')] and not(ancestor::*[local-name() = 'name']))]" priority="2" name="fn">
|
4846
|
+
<xsl:param name="footnote_body_from_table">false</xsl:param>
|
4841
4847
|
|
4842
4848
|
<!-- list of unique footnotes -->
|
4843
4849
|
<xsl:variable name="p_fn_">
|
@@ -4903,7 +4909,7 @@
|
|
4903
4909
|
<xsl:copy-of select="$footnote_inline"/>
|
4904
4910
|
</xsl:when>
|
4905
4911
|
<!-- <xsl:when test="$footnotes//*[local-name() = 'fmt-fn-body'][@id = $ref_id] or normalize-space(@skip_footnote_body) = 'false'"> -->
|
4906
|
-
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false'">
|
4912
|
+
<xsl:when test="$p_fn//fn[@gen_id = $gen_id] or normalize-space(@skip_footnote_body) = 'false' or $footnote_body_from_table = 'true'">
|
4907
4913
|
|
4908
4914
|
<fo:footnote xsl:use-attribute-sets="fn-style" role="SKIP">
|
4909
4915
|
<xsl:copy-of select="$footnote_inline"/>
|
@@ -5312,39 +5318,51 @@
|
|
5312
5318
|
<!-- fn reference in the table rendering (for instance, 'some text 1) some text' ) -->
|
5313
5319
|
<!-- fn --> <!-- in table --> <!-- for figure see <xsl:template match="*[local-name() = 'figure']/*[local-name() = 'fn']" priority="2"/> -->
|
5314
5320
|
<xsl:template match="*[local-name()='fn']">
|
5315
|
-
<
|
5316
|
-
|
5317
|
-
|
5321
|
+
<xsl:variable name="target" select="@target"/>
|
5322
|
+
<xsl:choose>
|
5323
|
+
<!-- case for footnotes in Requirement tables (https://github.com/metanorma/metanorma-ogc/issues/791) -->
|
5324
|
+
<xsl:when test="not(ancestor::*[local-name() = 'table'][1]/*[local-name() = 'fmt-footnote-container']/*[local-name() = 'fmt-fn-body'][@id = $target]) and $footnotes/*[local-name() = 'fmt-fn-body'][@id = $target]">
|
5325
|
+
<xsl:call-template name="fn">
|
5326
|
+
<xsl:with-param name="footnote_body_from_table">true</xsl:with-param>
|
5327
|
+
</xsl:call-template>
|
5328
|
+
</xsl:when>
|
5329
|
+
<xsl:otherwise>
|
5318
5330
|
|
5319
|
-
|
5320
|
-
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
5321
|
-
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
5322
|
-
<!-- <xsl:attribute name="internal-destination">
|
5323
|
-
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
5324
|
-
</xsl:attribute>
|
5325
|
-
</xsl:if>
|
5326
|
-
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5327
|
-
<xsl:attribute name="internal-destination">
|
5328
|
-
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
5329
|
-
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5330
|
-
</xsl:attribute>
|
5331
|
-
</xsl:if> -->
|
5332
|
-
<!-- <xsl:if test="$namespace = 'plateau'">
|
5333
|
-
<xsl:text>※</xsl:text>
|
5334
|
-
</xsl:if> -->
|
5335
|
-
<!-- <xsl:value-of select="@reference"/> -->
|
5331
|
+
<fo:inline xsl:use-attribute-sets="fn-reference-style">
|
5336
5332
|
|
5337
|
-
|
5333
|
+
<xsl:call-template name="refine_fn-reference-style"/>
|
5338
5334
|
|
5339
|
-
|
5340
|
-
<
|
5341
|
-
|
5342
|
-
|
5343
|
-
|
5344
|
-
|
5345
|
-
|
5346
|
-
|
5347
|
-
|
5335
|
+
<!-- <fo:basic-link internal-destination="{@reference}_{ancestor::*[@id][1]/@id}" fox:alt-text="footnote {@reference}"> --> <!-- @reference | ancestor::*[local-name()='clause'][1]/@id-->
|
5336
|
+
<fo:basic-link internal-destination="{@target}" fox:alt-text="footnote {@reference}">
|
5337
|
+
<!-- <xsl:if test="ancestor::*[local-name()='table'][1]/@id"> --> <!-- for footnotes in tables -->
|
5338
|
+
<!-- <xsl:attribute name="internal-destination">
|
5339
|
+
<xsl:value-of select="concat(@reference, '_', ancestor::*[local-name()='table'][1]/@id)"/>
|
5340
|
+
</xsl:attribute>
|
5341
|
+
</xsl:if>
|
5342
|
+
<xsl:if test="$namespace = 'ogc' or $namespace = 'ogc-white-paper'">
|
5343
|
+
<xsl:attribute name="internal-destination">
|
5344
|
+
<xsl:value-of select="@reference"/><xsl:text>_</xsl:text>
|
5345
|
+
<xsl:value-of select="ancestor::*[local-name()='table'][1]/@id"/>
|
5346
|
+
</xsl:attribute>
|
5347
|
+
</xsl:if> -->
|
5348
|
+
<!-- <xsl:if test="$namespace = 'plateau'">
|
5349
|
+
<xsl:text>※</xsl:text>
|
5350
|
+
</xsl:if> -->
|
5351
|
+
<!-- <xsl:value-of select="@reference"/> -->
|
5352
|
+
|
5353
|
+
<xsl:value-of select="normalize-space(*[local-name() = 'fmt-fn-label'])"/>
|
5354
|
+
|
5355
|
+
<!-- <xsl:if test="$namespace = 'bsi'">
|
5356
|
+
<xsl:text>)</xsl:text>
|
5357
|
+
</xsl:if> -->
|
5358
|
+
<!-- commented, https://github.com/metanorma/isodoc/issues/614 -->
|
5359
|
+
<!-- <xsl:if test="$namespace = 'jis'">
|
5360
|
+
<fo:inline font-weight="normal">)</fo:inline>
|
5361
|
+
</xsl:if> -->
|
5362
|
+
</fo:basic-link>
|
5363
|
+
</fo:inline>
|
5364
|
+
</xsl:otherwise>
|
5365
|
+
</xsl:choose>
|
5348
5366
|
</xsl:template> <!-- fn -->
|
5349
5367
|
|
5350
5368
|
<!-- fn/text() -->
|
@@ -9352,6 +9370,13 @@
|
|
9352
9370
|
<xsl:apply-templates select="."/>
|
9353
9371
|
</xsl:template>
|
9354
9372
|
|
9373
|
+
<!-- prevent missing stem for table and figures in ToC -->
|
9374
|
+
<xsl:template match="*[local-name() = 'name' or local-name() = 'fmt-name']//*[local-name() = 'stem']" mode="contents">
|
9375
|
+
<xsl:if test="not(following-sibling::*[1][local-name() = 'fmt-stem'])">
|
9376
|
+
<xsl:apply-templates select="."/>
|
9377
|
+
</xsl:if>
|
9378
|
+
</xsl:template>
|
9379
|
+
|
9355
9380
|
<xsl:template match="*[local-name() = 'references'][@hidden='true']" mode="contents" priority="3"/>
|
9356
9381
|
|
9357
9382
|
<xsl:template match="*[local-name() = 'references']/*[local-name() = 'bibitem']" mode="contents"/>
|
@@ -9575,7 +9600,8 @@
|
|
9575
9600
|
|
9576
9601
|
<xsl:for-each select="$contents_nodes//tables/table">
|
9577
9602
|
<fo:bookmark internal-destination="{@id}">
|
9578
|
-
<fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title>
|
9603
|
+
<!-- <fo:bookmark-title><xsl:value-of select="normalize-space(.)"/></fo:bookmark-title> -->
|
9604
|
+
<fo:bookmark-title><xsl:apply-templates mode="bookmark_clean"/></fo:bookmark-title>
|
9579
9605
|
</fo:bookmark>
|
9580
9606
|
</xsl:for-each>
|
9581
9607
|
</fo:bookmark>
|
@@ -9584,6 +9610,26 @@
|
|
9584
9610
|
</xsl:template> <!-- insertTableBookmarks -->
|
9585
9611
|
<!-- End Bookmarks -->
|
9586
9612
|
|
9613
|
+
<!-- ============================ -->
|
9614
|
+
<!-- mode="bookmark_clean" -->
|
9615
|
+
<!-- ============================ -->
|
9616
|
+
<xsl:template match="node()" mode="bookmark_clean">
|
9617
|
+
<xsl:apply-templates select="node()" mode="bookmark_clean"/>
|
9618
|
+
</xsl:template>
|
9619
|
+
|
9620
|
+
<xsl:template match="text()" mode="bookmark_clean">
|
9621
|
+
<xsl:value-of select="."/>
|
9622
|
+
</xsl:template>
|
9623
|
+
|
9624
|
+
<xsl:template match="*[local-name() = 'math']" mode="bookmark_clean">
|
9625
|
+
<xsl:value-of select="normalize-space(.)"/>
|
9626
|
+
</xsl:template>
|
9627
|
+
|
9628
|
+
<xsl:template match="*[local-name() = 'asciimath']" mode="bookmark_clean"/>
|
9629
|
+
<!-- ============================ -->
|
9630
|
+
<!-- END: mode="bookmark_clean" -->
|
9631
|
+
<!-- ============================ -->
|
9632
|
+
|
9587
9633
|
<xsl:template name="getLangVersion">
|
9588
9634
|
<xsl:param name="lang"/>
|
9589
9635
|
<xsl:param name="doctype" select="''"/>
|
@@ -11595,9 +11641,15 @@
|
|
11595
11641
|
<xsl:when test="local-name(..) = 'ul'">
|
11596
11642
|
<xsl:choose>
|
11597
11643
|
<xsl:when test="normalize-space($processing_instruction_type) = 'simple'"/>
|
11644
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
11645
|
+
<xsl:when test="@label"><xsl:value-of select="@label"/></xsl:when>
|
11598
11646
|
<xsl:otherwise><xsl:call-template name="setULLabel"/></xsl:otherwise>
|
11599
11647
|
</xsl:choose>
|
11600
11648
|
</xsl:when>
|
11649
|
+
<!-- https://github.com/metanorma/isodoc/issues/675 -->
|
11650
|
+
<xsl:when test="local-name(..) = 'ol' and @label and @full = 'true'"> <!-- @full added in the template li/fmt-name -->
|
11651
|
+
<xsl:value-of select="@label"/>
|
11652
|
+
</xsl:when>
|
11601
11653
|
<xsl:when test="local-name(..) = 'ol' and @label"> <!-- for ordered lists 'ol', and if there is @label, for instance label="1.1.2" -->
|
11602
11654
|
|
11603
11655
|
<xsl:variable name="type" select="../@type"/>
|
@@ -11722,7 +11774,7 @@
|
|
11722
11774
|
|
11723
11775
|
</xsl:otherwise>
|
11724
11776
|
</xsl:choose>
|
11725
|
-
</xsl:template>
|
11777
|
+
</xsl:template> <!-- getListItemFormat -->
|
11726
11778
|
|
11727
11779
|
<xsl:template match="*[local-name() = 'ul'] | *[local-name() = 'ol']">
|
11728
11780
|
<xsl:param name="indent">0</xsl:param>
|
@@ -11854,6 +11906,11 @@
|
|
11854
11906
|
|
11855
11907
|
<xsl:call-template name="refine_list-item-label-style"/>
|
11856
11908
|
|
11909
|
+
<xsl:if test="local-name(..) = 'ul'">
|
11910
|
+
<xsl:variable name="li_label" select="@label"/>
|
11911
|
+
<xsl:copy-of select="$ul_labels//label[. = $li_label]/@*[not(local-name() = 'level')]"/>
|
11912
|
+
</xsl:if>
|
11913
|
+
|
11857
11914
|
<!-- if 'p' contains all text in 'add' first and last elements in first p are 'add' -->
|
11858
11915
|
<xsl:if test="*[1][count(node()[normalize-space() != '']) = 1 and *[local-name() = 'add']]">
|
11859
11916
|
<xsl:call-template name="append_add-style"/>
|
@@ -13247,6 +13304,16 @@
|
|
13247
13304
|
</xsl:choose>
|
13248
13305
|
</xsl:template>
|
13249
13306
|
|
13307
|
+
<!-- li/fmt-name -->
|
13308
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_step1">
|
13309
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
13310
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
13311
|
+
</xsl:template>
|
13312
|
+
<xsl:template match="*[local-name() = 'li']/*[local-name() = 'fmt-name']" priority="2" mode="update_xml_pres">
|
13313
|
+
<xsl:attribute name="label"><xsl:value-of select="."/></xsl:attribute>
|
13314
|
+
<xsl:attribute name="full">true</xsl:attribute>
|
13315
|
+
</xsl:template>
|
13316
|
+
|
13250
13317
|
<xsl:template match="*[local-name() = 'fmt-preferred']"/>
|
13251
13318
|
<xsl:template match="*[local-name() = 'fmt-preferred'][*[local-name() = 'p']]" mode="update_xml_step1">
|
13252
13319
|
<xsl:apply-templates mode="update_xml_step1"/>
|
@@ -14061,6 +14128,64 @@
|
|
14061
14128
|
<fo:inline xml:lang="none"><xsl:value-of select="."/></fo:inline>
|
14062
14129
|
</xsl:template>
|
14063
14130
|
|
14131
|
+
<!-- ===================================== -->
|
14132
|
+
<!-- ===================================== -->
|
14133
|
+
<!-- Ruby text (CJK languages) rendering -->
|
14134
|
+
<!-- ===================================== -->
|
14135
|
+
<!-- ===================================== -->
|
14136
|
+
<xsl:template match="*[local-name() = 'ruby']">
|
14137
|
+
<fo:inline-container text-indent="0mm" last-line-end-indent="0mm">
|
14138
|
+
<xsl:if test="not(ancestor::*[local-name() = 'ruby'])">
|
14139
|
+
<xsl:attribute name="alignment-baseline">central</xsl:attribute>
|
14140
|
+
</xsl:if>
|
14141
|
+
<xsl:variable name="rt_text" select="*[local-name() = 'rt']"/>
|
14142
|
+
<xsl:variable name="rb_text" select=".//*[local-name() = 'rb'][not(*[local-name() = 'ruby'])]"/>
|
14143
|
+
<!-- Example: width="2em" -->
|
14144
|
+
<xsl:variable name="text_rt_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rt_text, $font_main, 6)"/>
|
14145
|
+
<xsl:variable name="text_rb_width" select="java:org.metanorma.fop.Util.getStringWidthByFontSize($rb_text, $font_main, 10)"/>
|
14146
|
+
<xsl:variable name="text_width">
|
14147
|
+
<xsl:choose>
|
14148
|
+
<xsl:when test="$text_rt_width >= $text_rb_width"><xsl:value-of select="$text_rt_width"/></xsl:when>
|
14149
|
+
<xsl:otherwise><xsl:value-of select="$text_rb_width"/></xsl:otherwise>
|
14150
|
+
</xsl:choose>
|
14151
|
+
</xsl:variable>
|
14152
|
+
<xsl:attribute name="width"><xsl:value-of select="$text_width div 10"/>em</xsl:attribute>
|
14153
|
+
|
14154
|
+
<xsl:choose>
|
14155
|
+
<xsl:when test="ancestor::*[local-name() = 'ruby']">
|
14156
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
14157
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
14158
|
+
</xsl:when>
|
14159
|
+
<xsl:otherwise>
|
14160
|
+
<xsl:apply-templates select="*[local-name() = 'rt']"/>
|
14161
|
+
<xsl:apply-templates select="*[local-name() = 'rb']"/>
|
14162
|
+
</xsl:otherwise>
|
14163
|
+
</xsl:choose>
|
14164
|
+
|
14165
|
+
<xsl:apply-templates select="node()[not(local-name() = 'rt') and not(local-name() = 'rb')]"/>
|
14166
|
+
</fo:inline-container>
|
14167
|
+
</xsl:template>
|
14168
|
+
|
14169
|
+
<xsl:template match="*[local-name() = 'rb']">
|
14170
|
+
<fo:block line-height="1em" text-align="center"><xsl:apply-templates/></fo:block>
|
14171
|
+
</xsl:template>
|
14172
|
+
|
14173
|
+
<xsl:template match="*[local-name() = 'rt']">
|
14174
|
+
<fo:block font-size="0.5em" text-align="center" line-height="1.2em" space-before="-1.4em" space-before.conditionality="retain"> <!-- -->
|
14175
|
+
<xsl:if test="ancestor::*[local-name() = 'ruby'][last()]//*[local-name() = 'ruby'] or ancestor::*[local-name() = 'rb']">
|
14176
|
+
<xsl:attribute name="space-before">0em</xsl:attribute>
|
14177
|
+
</xsl:if>
|
14178
|
+
<xsl:apply-templates/>
|
14179
|
+
</fo:block>
|
14180
|
+
|
14181
|
+
</xsl:template>
|
14182
|
+
|
14183
|
+
<!-- ===================================== -->
|
14184
|
+
<!-- ===================================== -->
|
14185
|
+
<!-- END: Ruby text (CJK languages) rendering -->
|
14186
|
+
<!-- ===================================== -->
|
14187
|
+
<!-- ===================================== -->
|
14188
|
+
|
14064
14189
|
<xsl:template name="printEdition">
|
14065
14190
|
<xsl:variable name="edition_i18n" select="normalize-space((//*[local-name() = 'metanorma'])[1]/*[local-name() = 'bibdata']/*[local-name() = 'edition'][normalize-space(@language) != ''])"/>
|
14066
14191
|
|
data/lib/isodoc/ribose/xref.rb
CHANGED
@@ -6,14 +6,6 @@ module IsoDoc
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class Xref < IsoDoc::Generic::Xref
|
9
|
-
# KILL
|
10
|
-
def annex_name_lblx(clause, num)
|
11
|
-
obl = l10n("(#{@labels['inform_annex']})")
|
12
|
-
clause["obligation"] == "normative" and
|
13
|
-
obl = l10n("(#{@labels['norm_annex']})")
|
14
|
-
l10n("#{@labels['annex']} #{num}<br/>#{obl}")
|
15
|
-
end
|
16
|
-
|
17
9
|
def initial_anchor_names(doc)
|
18
10
|
super
|
19
11
|
if blank?(@parse_settings) || @parse_settings[:clauses]
|
@@ -29,18 +21,6 @@ module IsoDoc
|
|
29
21
|
end
|
30
22
|
end
|
31
23
|
|
32
|
-
# KILL
|
33
|
-
def section_names1x(clause, num, level)
|
34
|
-
@anchors[clause["id"]] =
|
35
|
-
{ label: num, level: level, xref: num }
|
36
|
-
# subclauses are not prefixed with "Clause"
|
37
|
-
i = Counter.new(0, prefix: num)
|
38
|
-
clause.xpath(ns("./clause | ./terms | ./term | ./definitions | " \
|
39
|
-
"./references")).each do |c|
|
40
|
-
section_names1(c, i.increment(c).print, level + 1)
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
24
|
# subclauses are not prefixed with "Clause"
|
45
25
|
# retaining subtype for the semantics
|
46
26
|
def section_name_anchors(clause, num, level)
|
@@ -58,24 +38,11 @@ module IsoDoc
|
|
58
38
|
end
|
59
39
|
|
60
40
|
# we can reference 0-number clauses in introduction
|
61
|
-
# # KILL
|
62
|
-
def introduction_namesx(clause)
|
63
|
-
clause.nil? and return
|
64
|
-
clause.at(ns("./clause")) and
|
65
|
-
@anchors[clause["id"]] = { label: "0", level: 1, type: "clause",
|
66
|
-
xref: clause.at(ns("./title"))&.text }
|
67
|
-
i = Counter.new(0, prefix: "0")
|
68
|
-
clause.xpath(ns("./clause")).each do |c|
|
69
|
-
section_names1(c, i.increment(c).print, 2)
|
70
|
-
end
|
71
|
-
end
|
72
|
-
# we can reference 0-number clauses in introduction
|
73
41
|
def introduction_names(clause)
|
74
42
|
clause.nil? and return
|
75
43
|
clause.at(ns("./clause")) and
|
76
44
|
@anchors[clause["id"]] = { label: nil, level: 1, type: "clause",
|
77
45
|
xref: clause.at(ns("./title"))&.text }
|
78
|
-
#i = Counter.new(0, prefix: "0")
|
79
46
|
i = Counter.new(0)
|
80
47
|
clause.xpath(ns("./clause")).each do |c|
|
81
48
|
section_names1(c, semx(clause, "0"), i.increment(c).print, 2)
|
@@ -1701,16 +1701,22 @@ which can be bookmarks as well as block or section references</a:documentation>
|
|
1701
1701
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as a footnote.
|
1702
1702
|
The target of a footnote is the location it is embedded in within the text</a:documentation>
|
1703
1703
|
<element name="fn">
|
1704
|
-
<
|
1705
|
-
|
1706
|
-
</attribute>
|
1707
|
-
<oneOrMore>
|
1708
|
-
<ref name="paragraph">
|
1709
|
-
<a:documentation>The content of the footnote</a:documentation>
|
1710
|
-
</ref>
|
1711
|
-
</oneOrMore>
|
1704
|
+
<ref name="FnAttributes"/>
|
1705
|
+
<ref name="FnBody"/>
|
1712
1706
|
</element>
|
1713
1707
|
</define>
|
1708
|
+
<define name="FnBody">
|
1709
|
+
<oneOrMore>
|
1710
|
+
<ref name="paragraph">
|
1711
|
+
<a:documentation>The content of the footnote</a:documentation>
|
1712
|
+
</ref>
|
1713
|
+
</oneOrMore>
|
1714
|
+
</define>
|
1715
|
+
<define name="FnAttributes">
|
1716
|
+
<attribute name="reference">
|
1717
|
+
<a:documentation>The number of the footnote, used to identify it visually</a:documentation>
|
1718
|
+
</attribute>
|
1719
|
+
</define>
|
1714
1720
|
<define name="callout">
|
1715
1721
|
<a:documentation>Inline reference to a paragraph or paragraphs, appearing as annotation of source code</a:documentation>
|
1716
1722
|
<element name="callout">
|
@@ -1,13 +1,14 @@
|
|
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">
|
3
|
-
<!--
|
4
|
-
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
5
|
-
of relaton
|
6
|
-
|
7
|
-
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
8
|
-
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
9
|
-
-->
|
10
3
|
<include href="biblio.rng">
|
4
|
+
<!-- ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix -->
|
5
|
+
<!--
|
6
|
+
Add-ons to biblio.rnc for standoc model: defines the extension point BibDataExtensionType
|
7
|
+
of relaton
|
8
|
+
|
9
|
+
Specialisations as for biblio.rnc. Extension point can be redefined completely for a flavour of standoc
|
10
|
+
(SDO); but other elements in Bibdata can only be extended (more specialised vocabularies for Bibdata)
|
11
|
+
-->
|
11
12
|
<define name="BibData">
|
12
13
|
<a:documentation>The bibliographic description of a standardisation document</a:documentation>
|
13
14
|
<ref name="StandardBibliographicItem"/>
|
@@ -91,6 +92,9 @@ a standards definition organization</a:documentation>
|
|
91
92
|
<a:documentation>Representation of the identifier for the standardisation document, giving its individual semantic components</a:documentation>
|
92
93
|
</ref>
|
93
94
|
</zeroOrMore>
|
95
|
+
<ref name="DocumentImages">
|
96
|
+
<a:documentation>Coverpage and other images to be rendered with document</a:documentation>
|
97
|
+
</ref>
|
94
98
|
</define>
|
95
99
|
<define name="doctype">
|
96
100
|
<a:documentation>Classification of the standardisation document</a:documentation>
|
@@ -268,6 +272,32 @@ and not those document components</a:documentation>
|
|
268
272
|
</optional>
|
269
273
|
</element>
|
270
274
|
</define>
|
275
|
+
<define name="DocumentImages">
|
276
|
+
<zeroOrMore>
|
277
|
+
<element name="coverpage-image">
|
278
|
+
<a:documentation>Images to be displayed on the coverpage of the document</a:documentation>
|
279
|
+
<ref name="image-no-id"/>
|
280
|
+
</element>
|
281
|
+
</zeroOrMore>
|
282
|
+
<zeroOrMore>
|
283
|
+
<element name="innercoverpage-image">
|
284
|
+
<a:documentation>Images to be displayed on the inner coverpage of the document</a:documentation>
|
285
|
+
<ref name="image-no-id"/>
|
286
|
+
</element>
|
287
|
+
</zeroOrMore>
|
288
|
+
<zeroOrMore>
|
289
|
+
<element name="tocside-image">
|
290
|
+
<a:documentation>Images to be displayed on the Table of Contents page of the document</a:documentation>
|
291
|
+
<ref name="image-no-id"/>
|
292
|
+
</element>
|
293
|
+
</zeroOrMore>
|
294
|
+
<zeroOrMore>
|
295
|
+
<element name="backpage-image">
|
296
|
+
<a:documentation>Images to be displayed on the backpage of the document</a:documentation>
|
297
|
+
<ref name="image-no-id"/>
|
298
|
+
</element>
|
299
|
+
</zeroOrMore>
|
300
|
+
</define>
|
271
301
|
<define name="StandardBibliographicItem">
|
272
302
|
<ref name="BibliographicItem"/>
|
273
303
|
<zeroOrMore>
|
@@ -1,23 +1,25 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!--
|
3
|
-
instantiations of this grammar may replace leaf strings
|
4
|
-
with more elaborated types; e.g. title (text) replaced with
|
5
|
-
title-main, title-intro, title-part; type replaced with
|
6
|
-
enum.
|
7
|
-
|
8
|
-
some renaming at leaf nodes is permissible
|
9
|
-
|
10
|
-
obligations can change both from optional to mandatory,
|
11
|
-
and from mandatory to optional; optional elements may
|
12
|
-
be omitted; freely positioned alternatives may be replaced
|
13
|
-
with strict ordering
|
14
|
-
|
15
|
-
DO NOT introduce a namespace here. We do not want a distinct namespace
|
16
|
-
for these elements, and a distinct namespace for any grammar inheriting
|
17
|
-
these elements; we just want one namespace for any child grammars
|
18
|
-
of this.
|
19
|
-
-->
|
20
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
|
+
<!--
|
4
|
+
ALERT: we cannot have comments on root element, as they intervene with https://github.com/metanorma/metanorma/issues/437 fix
|
5
|
+
|
6
|
+
Instantiations of this grammar may replace leaf strings
|
7
|
+
with more elaborated types; e.g. title (text) replaced with
|
8
|
+
title-main, title-intro, title-part; type replaced with
|
9
|
+
enum.
|
10
|
+
|
11
|
+
Some renaming at leaf nodes is permissible
|
12
|
+
|
13
|
+
Obligations can change both from optional to mandatory,
|
14
|
+
and from mandatory to optional; optional elements may
|
15
|
+
be omitted; freely positioned alternatives may be replaced
|
16
|
+
with strict ordering
|
17
|
+
|
18
|
+
DO NOT introduce a namespace here. We do not want a distinct namespace
|
19
|
+
for these elements, and a distinct namespace for any grammar inheriting
|
20
|
+
these elements; we just want one namespace for any child grammars
|
21
|
+
of this.
|
22
|
+
-->
|
21
23
|
<!--
|
22
24
|
https://www.myintervals.com/blog/2009/05/20/iso-8601-date-validation-that-doesnt-suck/
|
23
25
|
iso8601date = xsd:string { pattern = "([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?" }
|
@@ -1241,6 +1243,11 @@ Refer to `BibliographicItem` for definitions</a:documentation>
|
|
1241
1243
|
</define>
|
1242
1244
|
<define name="formattedref">
|
1243
1245
|
<element name="formattedref">
|
1246
|
+
<optional>
|
1247
|
+
<attribute name="format">
|
1248
|
+
<a:documentation>format of formatted reference; Metanorma assumes references are formatted as Metanorma XML</a:documentation>
|
1249
|
+
</attribute>
|
1250
|
+
</optional>
|
1244
1251
|
<oneOrMore>
|
1245
1252
|
<ref name="TextElement"/>
|
1246
1253
|
</oneOrMore>
|
@@ -1812,6 +1819,11 @@ May be used to differentiate rendering of notes in bibliographies</a:documentati
|
|
1812
1819
|
<a:documentation>Abstract of bibliographic item</a:documentation>
|
1813
1820
|
<element name="abstract">
|
1814
1821
|
<ref name="LocalizedStringAttributes"/>
|
1822
|
+
<optional>
|
1823
|
+
<attribute name="format">
|
1824
|
+
<a:documentation>What format the formatted abstract is in. In Metanorma, assumed to be Metanorma XML</a:documentation>
|
1825
|
+
</attribute>
|
1826
|
+
</optional>
|
1815
1827
|
<choice>
|
1816
1828
|
<oneOrMore>
|
1817
1829
|
<ref name="BasicBlockNoId">
|
@@ -1,24 +1,27 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!--
|
3
|
-
instantiations of this grammar may replace leaf strings
|
4
|
-
with more elaborated types; e.g. title (text) replaced with
|
5
|
-
title-main, title-intro, title-part; type replaced with
|
6
|
-
enum.
|
7
|
-
|
8
|
-
some renaming at leaf nodes is permissible
|
9
|
-
|
10
|
-
obligations can change both from optional to mandatory,
|
11
|
-
and from mandatory to optional; optional elements may
|
12
|
-
be omitted; freely positioned alternatives may be replaced
|
13
|
-
with strict ordering
|
14
|
-
|
15
|
-
DO NOT introduce a namespace here. We do not want a distinct namespace
|
16
|
-
for these elements, and a distinct namespace for any grammar inheriting
|
17
|
-
these elements; we just want one namespace for any child grammars
|
18
|
-
of this.
|
19
|
-
-->
|
20
|
-
<!-- VERSION v2.0.2 -->
|
21
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.0.3 -->
|
4
|
+
|
5
|
+
<!--
|
6
|
+
ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437
|
7
|
+
|
8
|
+
instantiations of this grammar may replace leaf strings
|
9
|
+
with more elaborated types; e.g. title (text) replaced with
|
10
|
+
title-main, title-intro, title-part; type replaced with
|
11
|
+
enum.
|
12
|
+
|
13
|
+
some renaming at leaf nodes is permissible
|
14
|
+
|
15
|
+
obligations can change both from optional to mandatory,
|
16
|
+
and from mandatory to optional; optional elements may
|
17
|
+
be omitted; freely positioned alternatives may be replaced
|
18
|
+
with strict ordering
|
19
|
+
|
20
|
+
DO NOT introduce a namespace here. We do not want a distinct namespace
|
21
|
+
for these elements, and a distinct namespace for any grammar inheriting
|
22
|
+
these elements; we just want one namespace for any child grammars
|
23
|
+
of this.
|
24
|
+
-->
|
22
25
|
<include href="reqt.rng"/>
|
23
26
|
<include href="basicdoc.rng">
|
24
27
|
<define name="amend">
|
@@ -33,15 +36,6 @@
|
|
33
36
|
</zeroOrMore>
|
34
37
|
</element>
|
35
38
|
</define>
|
36
|
-
<define name="fn" combine="interleave">
|
37
|
-
<optional>
|
38
|
-
<attribute name="hiddenref">
|
39
|
-
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
40
|
-
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
41
|
-
<data type="boolean"/>
|
42
|
-
</attribute>
|
43
|
-
</optional>
|
44
|
-
</define>
|
45
39
|
<define name="index-primary">
|
46
40
|
<element name="primary">
|
47
41
|
<oneOrMore>
|
@@ -423,20 +417,12 @@ normative or informative references, some split references into sections organiz
|
|
423
417
|
</oneOrMore>
|
424
418
|
</choice>
|
425
419
|
</define>
|
426
|
-
<define name="TdAttributes" combine="interleave">
|
427
|
-
<attribute name="style">
|
428
|
-
<a:documentation>CSS style: only background-color supported</a:documentation>
|
429
|
-
</attribute>
|
430
|
-
</define>
|
431
|
-
<define name="ThAttributes" combine="interleave">
|
432
|
-
<attribute name="style">
|
433
|
-
<a:documentation>CSS style: only background-color supported</a:documentation>
|
434
|
-
</attribute>
|
435
|
-
</define>
|
436
420
|
<define name="TrAttributes">
|
437
|
-
<
|
438
|
-
<
|
439
|
-
|
421
|
+
<optional>
|
422
|
+
<attribute name="style">
|
423
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
424
|
+
</attribute>
|
425
|
+
</optional>
|
440
426
|
</define>
|
441
427
|
<define name="table-note">
|
442
428
|
<element name="note">
|
@@ -500,6 +486,22 @@ gives an explicit page orientation</a:documentation>
|
|
500
486
|
</define>
|
501
487
|
</include>
|
502
488
|
<!-- end overrides -->
|
489
|
+
<define name="FnAttributes" combine="interleave">
|
490
|
+
<optional>
|
491
|
+
<attribute name="hiddenref">
|
492
|
+
<a:documentation>If true, number the footnote as normal, but suppress display of the footnote reference in the document body.
|
493
|
+
This is done if the footnote reference is already presented in some other form, e.g. within a figure image.</a:documentation>
|
494
|
+
<data type="boolean"/>
|
495
|
+
</attribute>
|
496
|
+
</optional>
|
497
|
+
</define>
|
498
|
+
<define name="TdAttributes" combine="interleave">
|
499
|
+
<optional>
|
500
|
+
<attribute name="style">
|
501
|
+
<a:documentation>CSS style: only background-color supported</a:documentation>
|
502
|
+
</attribute>
|
503
|
+
</optional>
|
504
|
+
</define>
|
503
505
|
<define name="NumberingAttributes" combine="interleave">
|
504
506
|
<optional>
|
505
507
|
<attribute name="number">
|
@@ -678,6 +680,13 @@ titlecase, or lowercase</a:documentation>
|
|
678
680
|
</attribute>
|
679
681
|
</optional>
|
680
682
|
</define>
|
683
|
+
<define name="Basic-Section-Attributes" combine="interleave">
|
684
|
+
<optional>
|
685
|
+
<attribute name="obligation">
|
686
|
+
<ref name="ObligationType"/>
|
687
|
+
</attribute>
|
688
|
+
</optional>
|
689
|
+
</define>
|
681
690
|
<define name="ObligationType">
|
682
691
|
<a:documentation>The force of a clause in a standard document: whether it has normative or informative effect</a:documentation>
|
683
692
|
<choice>
|
@@ -1192,13 +1201,6 @@ numbers</a:documentation>
|
|
1192
1201
|
</attribute>
|
1193
1202
|
</optional>
|
1194
1203
|
</define>
|
1195
|
-
<define name="Basic-Section-Attributes" combine="interleave">
|
1196
|
-
<optional>
|
1197
|
-
<attribute name="obligation">
|
1198
|
-
<ref name="ObligationType"/>
|
1199
|
-
</attribute>
|
1200
|
-
</optional>
|
1201
|
-
</define>
|
1202
1204
|
<define name="reference-clause">
|
1203
1205
|
<a:documentation>References clause with recursive nesting</a:documentation>
|
1204
1206
|
<element name="clause">
|
@@ -1239,7 +1241,7 @@ numbers</a:documentation>
|
|
1239
1241
|
</choice>
|
1240
1242
|
</attribute>
|
1241
1243
|
<attribute name="flavor">
|
1242
|
-
<a:documentation>Metanorma flavor, indicating SDO whose
|
1244
|
+
<a:documentation>Metanorma flavor, indicating SDO whose requirements the realisation aligns to</a:documentation>
|
1243
1245
|
</attribute>
|
1244
1246
|
</define>
|
1245
1247
|
<define name="standard-document">
|
@@ -1249,6 +1251,11 @@ numbers</a:documentation>
|
|
1249
1251
|
<ref name="bibdata">
|
1250
1252
|
<a:documentation>Bibliographic description of the document itself, expressed in the Relaton model</a:documentation>
|
1251
1253
|
</ref>
|
1254
|
+
<zeroOrMore>
|
1255
|
+
<ref name="termdocsource">
|
1256
|
+
<a:documentation>Source for term definitions in the document</a:documentation>
|
1257
|
+
</ref>
|
1258
|
+
</zeroOrMore>
|
1252
1259
|
<optional>
|
1253
1260
|
<ref name="misccontainer">
|
1254
1261
|
<a:documentation>Extension point for extraneous elements that need to be added to standards document as data</a:documentation>
|
@@ -1259,34 +1266,7 @@ numbers</a:documentation>
|
|
1259
1266
|
<a:documentation>Front matter that is repeated at the start of documents issued from an SDO, with content not specific to the document</a:documentation>
|
1260
1267
|
</ref>
|
1261
1268
|
</optional>
|
1262
|
-
<
|
1263
|
-
<ref name="preface">
|
1264
|
-
<a:documentation>Prefatory sections</a:documentation>
|
1265
|
-
</ref>
|
1266
|
-
</optional>
|
1267
|
-
<ref name="sections">
|
1268
|
-
<a:documentation>Main body of document</a:documentation>
|
1269
|
-
</ref>
|
1270
|
-
<zeroOrMore>
|
1271
|
-
<ref name="annex">
|
1272
|
-
<a:documentation>Annex sections</a:documentation>
|
1273
|
-
</ref>
|
1274
|
-
</zeroOrMore>
|
1275
|
-
<optional>
|
1276
|
-
<ref name="bibliography">
|
1277
|
-
<a:documentation>Bibliographic sections</a:documentation>
|
1278
|
-
</ref>
|
1279
|
-
</optional>
|
1280
|
-
<zeroOrMore>
|
1281
|
-
<ref name="indexsect">
|
1282
|
-
<a:documentation>Index of the document</a:documentation>
|
1283
|
-
</ref>
|
1284
|
-
</zeroOrMore>
|
1285
|
-
<optional>
|
1286
|
-
<ref name="colophon">
|
1287
|
-
<a:documentation>Colophon or postface material</a:documentation>
|
1288
|
-
</ref>
|
1289
|
-
</optional>
|
1269
|
+
<ref name="DocumentBody"/>
|
1290
1270
|
<optional>
|
1291
1271
|
<ref name="review-container">
|
1292
1272
|
<a:documentation>Annotations to the document</a:documentation>
|
@@ -1294,6 +1274,36 @@ numbers</a:documentation>
|
|
1294
1274
|
</optional>
|
1295
1275
|
</element>
|
1296
1276
|
</define>
|
1277
|
+
<define name="DocumentBody">
|
1278
|
+
<optional>
|
1279
|
+
<ref name="preface">
|
1280
|
+
<a:documentation>Prefatory sections</a:documentation>
|
1281
|
+
</ref>
|
1282
|
+
</optional>
|
1283
|
+
<ref name="sections">
|
1284
|
+
<a:documentation>Main body of document</a:documentation>
|
1285
|
+
</ref>
|
1286
|
+
<zeroOrMore>
|
1287
|
+
<ref name="annex">
|
1288
|
+
<a:documentation>Annex sections</a:documentation>
|
1289
|
+
</ref>
|
1290
|
+
</zeroOrMore>
|
1291
|
+
<optional>
|
1292
|
+
<ref name="bibliography">
|
1293
|
+
<a:documentation>Bibliographic sections</a:documentation>
|
1294
|
+
</ref>
|
1295
|
+
</optional>
|
1296
|
+
<zeroOrMore>
|
1297
|
+
<ref name="indexsect">
|
1298
|
+
<a:documentation>Index of the document</a:documentation>
|
1299
|
+
</ref>
|
1300
|
+
</zeroOrMore>
|
1301
|
+
<optional>
|
1302
|
+
<ref name="colophon">
|
1303
|
+
<a:documentation>Colophon or postface material</a:documentation>
|
1304
|
+
</ref>
|
1305
|
+
</optional>
|
1306
|
+
</define>
|
1297
1307
|
<define name="misccontainer">
|
1298
1308
|
<a:documentation>Elements added to metanorma-extension are open-ended, and constitute source data</a:documentation>
|
1299
1309
|
<element name="metanorma-extension">
|
@@ -1608,9 +1618,7 @@ used in document amendments</a:documentation>
|
|
1608
1618
|
<define name="term">
|
1609
1619
|
<a:documentation>Terminology entry with its definition</a:documentation>
|
1610
1620
|
<element name="term">
|
1611
|
-
<ref name="
|
1612
|
-
<ref name="LocalizedStringAttributes"/>
|
1613
|
-
<ref name="BlockAttributes"/>
|
1621
|
+
<ref name="TermAttributes"/>
|
1614
1622
|
<oneOrMore>
|
1615
1623
|
<ref name="preferred">
|
1616
1624
|
<a:documentation>One or more names under which the term being defined is canonically known</a:documentation>
|
@@ -1662,6 +1670,11 @@ used in document amendments</a:documentation>
|
|
1662
1670
|
</ref>
|
1663
1671
|
</element>
|
1664
1672
|
</define>
|
1673
|
+
<define name="TermAttributes">
|
1674
|
+
<ref name="OptionalId"/>
|
1675
|
+
<ref name="LocalizedStringAttributes"/>
|
1676
|
+
<ref name="BlockAttributes"/>
|
1677
|
+
</define>
|
1665
1678
|
<define name="preferred">
|
1666
1679
|
<element name="preferred">
|
1667
1680
|
<ref name="Designation"/>
|
@@ -2323,26 +2336,32 @@ links within an SVG file, so that the SVG file can hyperlink to anchors within t
|
|
2323
2336
|
</element>
|
2324
2337
|
</define>
|
2325
2338
|
<define name="ul_li">
|
2326
|
-
<a:documentation>
|
2339
|
+
<a:documentation>Unordered list item for standards documents</a:documentation>
|
2327
2340
|
<element name="li">
|
2328
2341
|
<ref name="OptionalId"/>
|
2329
|
-
<
|
2330
|
-
|
2331
|
-
<a:documentation>Include a checkbox for the list item</a:documentation>
|
2332
|
-
<data type="boolean"/>
|
2333
|
-
</attribute>
|
2334
|
-
</optional>
|
2335
|
-
<optional>
|
2336
|
-
<attribute name="checkedcheckbox">
|
2337
|
-
<a:documentation>Check the checkbox for the list item</a:documentation>
|
2338
|
-
<data type="boolean"/>
|
2339
|
-
</attribute>
|
2340
|
-
</optional>
|
2341
|
-
<oneOrMore>
|
2342
|
-
<ref name="BasicBlock"/>
|
2343
|
-
</oneOrMore>
|
2342
|
+
<ref name="UlLiAttributes"/>
|
2343
|
+
<ref name="UlLiBody"/>
|
2344
2344
|
</element>
|
2345
2345
|
</define>
|
2346
|
+
<define name="UlLiBody">
|
2347
|
+
<oneOrMore>
|
2348
|
+
<ref name="BasicBlock"/>
|
2349
|
+
</oneOrMore>
|
2350
|
+
</define>
|
2351
|
+
<define name="UlLiAttributes">
|
2352
|
+
<optional>
|
2353
|
+
<attribute name="uncheckedcheckbox">
|
2354
|
+
<a:documentation>Include a checkbox for the list item</a:documentation>
|
2355
|
+
<data type="boolean"/>
|
2356
|
+
</attribute>
|
2357
|
+
</optional>
|
2358
|
+
<optional>
|
2359
|
+
<attribute name="checkedcheckbox">
|
2360
|
+
<a:documentation>Check the checkbox for the list item</a:documentation>
|
2361
|
+
<data type="boolean"/>
|
2362
|
+
</attribute>
|
2363
|
+
</optional>
|
2364
|
+
</define>
|
2346
2365
|
<define name="floating-title">
|
2347
2366
|
<a:documentation>A floating title, outside of the clause hierarchy of the document</a:documentation>
|
2348
2367
|
<element name="floating-title">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<grammar xmlns="http://relaxng.org/ns/structure/1.0">
|
2
|
+
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
|
3
3
|
<include href="biblio-standoc.rng">
|
4
4
|
<define name="DocumentType">
|
5
5
|
<choice>
|
@@ -20,26 +20,14 @@
|
|
20
20
|
</oneOrMore>
|
21
21
|
</element>
|
22
22
|
</define>
|
23
|
-
<define name="BibDataExtensionType">
|
24
|
-
<optional>
|
25
|
-
<attribute name="schema-version"/>
|
26
|
-
</optional>
|
27
|
-
<optional>
|
28
|
-
<ref name="doctype"/>
|
29
|
-
</optional>
|
30
|
-
<optional>
|
31
|
-
<ref name="docsubtype"/>
|
32
|
-
</optional>
|
33
|
-
<ref name="flavor"/>
|
34
|
-
<ref name="editorialgroup"/>
|
35
|
-
<zeroOrMore>
|
36
|
-
<ref name="ics"/>
|
37
|
-
</zeroOrMore>
|
38
|
-
<optional>
|
39
|
-
<ref name="security"/>
|
40
|
-
</optional>
|
41
|
-
</define>
|
42
23
|
</include>
|
24
|
+
<define name="BibDataExtensionType" combine="interleave">
|
25
|
+
<optional>
|
26
|
+
<ref name="security">
|
27
|
+
<a:documentation>Security level classification. For example, "confidential", "client confidential"</a:documentation>
|
28
|
+
</ref>
|
29
|
+
</optional>
|
30
|
+
</define>
|
43
31
|
<define name="committee">
|
44
32
|
<element name="committee">
|
45
33
|
<attribute name="type">
|
@@ -1,5 +1,11 @@
|
|
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
|
+
<define name="requirement">
|
4
|
+
<element name="requirement">
|
5
|
+
<ref name="RequirementType"/>
|
6
|
+
</element>
|
7
|
+
</define>
|
8
|
+
<!-- ALERT: cannot have root comments, because of https://github.com/metanorma/metanorma/issues/437 -->
|
3
9
|
<!--
|
4
10
|
Presupposes isodoc.rnc, is included in it
|
5
11
|
include "isodoc.rnc" { }
|
@@ -7,14 +13,9 @@
|
|
7
13
|
This is the Metanorma default provisions model; it is overridden by other provisions models,
|
8
14
|
such as Modspec
|
9
15
|
-->
|
10
|
-
<define name="
|
16
|
+
<define name="recommendation">
|
11
17
|
<a:documentation>Specification of an attribute of a subject that is required.
|
12
18
|
NOTE: A requirement can contain other requirements</a:documentation>
|
13
|
-
<element name="requirement">
|
14
|
-
<ref name="RequirementType"/>
|
15
|
-
</element>
|
16
|
-
</define>
|
17
|
-
<define name="recommendation">
|
18
19
|
<a:documentation>Specification of an attribute of a subject that is recommended</a:documentation>
|
19
20
|
<element name="recommendation">
|
20
21
|
<ref name="RequirementType"/>
|
@@ -1,38 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<grammar ns='https://www.metanorma.org/ns/standoc' xmlns="http://relaxng.org/ns/structure/1.0">
|
3
|
-
<!--
|
4
|
-
VERSION v1.2.1
|
5
|
-
Currently we inherit from a namespaced grammar, isostandard. Until we inherit from isodoc,
|
6
|
-
we cannot have a new default namespace: we will end up with a grammar with two different
|
7
|
-
namespaces, one for isostandard and one for csand additions. And we do not want that.
|
8
|
-
-->
|
9
3
|
<include href="relaton-ribose.rng"/>
|
10
|
-
<include href="isodoc.rng"
|
11
|
-
<define name="standard-document">
|
12
|
-
<element name="metanorma">
|
13
|
-
<ref name="Root-Attributes"/>
|
14
|
-
<ref name="bibdata"/>
|
15
|
-
<zeroOrMore>
|
16
|
-
<ref name="termdocsource"/>
|
17
|
-
</zeroOrMore>
|
18
|
-
<optional>
|
19
|
-
<ref name="misccontainer"/>
|
20
|
-
</optional>
|
21
|
-
<optional>
|
22
|
-
<ref name="boilerplate"/>
|
23
|
-
</optional>
|
24
|
-
<ref name="preface"/>
|
25
|
-
<oneOrMore>
|
26
|
-
<ref name="sections"/>
|
27
|
-
</oneOrMore>
|
28
|
-
<zeroOrMore>
|
29
|
-
<ref name="annex"/>
|
30
|
-
</zeroOrMore>
|
31
|
-
<ref name="bibliography"/>
|
32
|
-
<zeroOrMore>
|
33
|
-
<ref name="indexsect"/>
|
34
|
-
</zeroOrMore>
|
35
|
-
</element>
|
36
|
-
</define>
|
37
|
-
</include>
|
4
|
+
<include href="isodoc.rng"/>
|
38
5
|
</grammar>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: metanorma-ribose
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.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: 2025-
|
11
|
+
date: 2025-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: metanorma-generic
|