Class: IsoDoc::Iec::PresentationXMLConvert
- Inherits:
-
IsoDoc::Iso::PresentationXMLConvert
- Object
- IsoDoc::Iso::PresentationXMLConvert
- IsoDoc::Iec::PresentationXMLConvert
show all
- Includes:
- Init
- Defined in:
- lib/isodoc/iec/presentation_xml_convert.rb
Instance Method Summary
collapse
Methods included from Init
#convert1, #i18n_init, #metadata_init, #xref_init
Instance Method Details
#bibdata_i18n(bib) ⇒ Object
32
33
34
35
36
37
38
39
40
41
42
|
# File 'lib/isodoc/iec/presentation_xml_convert.rb', line 32
def bibdata_i18n(bib)
fr = IsoDoc::Iec::I18n.new("fr", "Latn")
en = IsoDoc::Iec::I18n.new("en", "Latn")
[{ lang: "en", i18n: en }, { lang: "fr", i18n: fr }].each do |v|
{ doctype_dict: "./ext/doctype", stage_dict: "./status/stage",
substage_dict: "./status/substage", function_dict: "./ext/function",
horizontal_dict: "./ext/horizontal" }.each do |lbl, xpath|
hash_translate(bib, v[:i18n].get[lbl.to_s], xpath, v[:lang])
end
end
end
|
#clause(docxml) ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
|
# File 'lib/isodoc/iec/presentation_xml_convert.rb', line 7
def clause(docxml)
docxml.xpath(ns("//clause[not(ancestor::annex)] | "\
"//definitions | //references | "\
"//preface/introduction[clause]"))
.each do |f|
clause1(f)
end
docxml.xpath(ns("//terms")).each do |f|
termclause1(f)
end
end
|
#clause1(elem) ⇒ Object
27
28
29
30
|
# File 'lib/isodoc/iec/presentation_xml_convert.rb', line 27
def clause1(elem)
IsoDoc::PresentationXMLConvert.instance_method(:clause1).bind(self)
.call(elem)
end
|
#termclause1(elem) ⇒ Object
19
20
21
22
23
24
25
|
# File 'lib/isodoc/iec/presentation_xml_convert.rb', line 19
def termclause1(elem)
return clause1(elem) unless @is_iev
return if @suppressheadingnumbers || elem["unnumbered"]
lbl = @xrefs.anchor(elem["id"], :label, true) or return
prefix_name(elem, " ", "#{lbl}#{clausedelim}", "title")
end
|