metanorma-ogc 2.5.7 → 2.5.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/isodoc/ogc/html/htmlstyle.css +63 -0
- data/lib/isodoc/ogc/html/htmlstyle.scss +11 -0
- data/lib/isodoc/ogc/html_convert.rb +11 -0
- data/lib/isodoc/ogc/i18n-en.yaml +1 -0
- data/lib/isodoc/ogc/ogc.abstract-specification-topic.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.best-practice.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.change-request-supporting-document.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.community-practice.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.community-standard.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.discussion-paper.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.draft-standard.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.engineering-report.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.other.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.policy.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.reference-model.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.release-notes.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.standard.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.test-suite.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.user-guide.xsl +1262 -878
- data/lib/isodoc/ogc/ogc.white-paper.xsl +1262 -878
- data/lib/isodoc/ogc/presentation_xml_convert.rb +7 -0
- data/lib/isodoc/ogc/xref.rb +41 -3
- data/lib/metanorma/ogc/basicdoc.rng +840 -419
- data/lib/metanorma/ogc/biblio.rng +26 -27
- data/lib/metanorma/ogc/converter.rb +1 -1
- data/lib/metanorma/ogc/isodoc.rng +351 -510
- data/lib/metanorma/ogc/version.rb +1 -1
- metadata +3 -3
@@ -186,6 +186,13 @@ module IsoDoc
|
|
186
186
|
elem << " <span class='AdmittedLabel'>#{@i18n.admitted}</span>"
|
187
187
|
end
|
188
188
|
|
189
|
+
def source_label(elem)
|
190
|
+
labelled_ancestor(elem) and return
|
191
|
+
lbl = @xrefs.anchor(elem["id"], :label, false) or return
|
192
|
+
prefix_name(elem, block_delim,
|
193
|
+
l10n("#{lower2cap @i18n.sourcecode} #{lbl}"), "name")
|
194
|
+
end
|
195
|
+
|
189
196
|
include Init
|
190
197
|
end
|
191
198
|
end
|
data/lib/isodoc/ogc/xref.rb
CHANGED
@@ -19,8 +19,6 @@ module IsoDoc
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
# ["//preface/abstract", "//preface/clause[@type = 'executivesummary']", "//preface/clause[@type = 'keywords']", "//foreword", "//preface/clause[@type = 'security']", "//preface/clause[@type = 'submitting_orgs']", "//submitters", "//introduction"]
|
23
|
-
|
24
22
|
def middle_section_asset_names(doc)
|
25
23
|
middle_sections =
|
26
24
|
"//clause[@type = 'scope' or @type = 'conformance'] | //foreword | " \
|
@@ -80,7 +78,8 @@ module IsoDoc
|
|
80
78
|
@anchors[ref["id"]] = { xref: "#{@anchors[ref['id']][:xref]} (draft)" }
|
81
79
|
end
|
82
80
|
|
83
|
-
def sequential_permission_body(id, block, label, klass, model,
|
81
|
+
def sequential_permission_body(id, block, label, klass, model,
|
82
|
+
container: false)
|
84
83
|
@anchors[block["id"]] = model.postprocess_anchor_struct(
|
85
84
|
block, anchor_struct(id, container ? block : nil,
|
86
85
|
label, klass, block["unnumbered"])
|
@@ -90,6 +89,45 @@ module IsoDoc
|
|
90
89
|
n[:klass], false)
|
91
90
|
end
|
92
91
|
end
|
92
|
+
|
93
|
+
FIGURE_NO_CLASS = ".//figure[not(@class)]".freeze
|
94
|
+
|
95
|
+
LISTING = <<~XPATH.freeze
|
96
|
+
.//figure[@class = 'pseudocode'] | .//sourcecode[not(ancestor::example)]
|
97
|
+
XPATH
|
98
|
+
|
99
|
+
def sequential_asset_names(clause, container: false)
|
100
|
+
super
|
101
|
+
sequential_sourcecode_names(clause, container: container)
|
102
|
+
end
|
103
|
+
|
104
|
+
def sequential_sourcecode_names(clause, container: false)
|
105
|
+
c = Counter.new
|
106
|
+
clause.xpath(ns(LISTING)).noblank.each do |t|
|
107
|
+
c.increment(t)
|
108
|
+
@anchors[t["id"]] = anchor_struct(
|
109
|
+
c.print, container ? t : nil,
|
110
|
+
@labels["sourcecode"], "sourcecode",
|
111
|
+
t["unnumbered"]
|
112
|
+
)
|
113
|
+
end
|
114
|
+
end
|
115
|
+
|
116
|
+
def hierarchical_asset_names(clause, num)
|
117
|
+
super
|
118
|
+
hierarchical_sourcecode_names(clause, num)
|
119
|
+
end
|
120
|
+
|
121
|
+
def hierarchical_sourcecode_names(clause, num)
|
122
|
+
c = Counter.new
|
123
|
+
clause.xpath(ns(LISTING)).noblank.each do |t|
|
124
|
+
c.increment(t)
|
125
|
+
label = "#{num}#{hiersep}#{c.print}"
|
126
|
+
@anchors[t["id"]] =
|
127
|
+
anchor_struct(label, nil, @labels["sourcecode"],
|
128
|
+
"sourcecode", t["unnumbered"])
|
129
|
+
end
|
130
|
+
end
|
93
131
|
end
|
94
132
|
end
|
95
133
|
end
|