Module: IsoDoc::IEEE::BaseConvert
- Included in:
- HtmlConvert, WordConvert
- Defined in:
- lib/isodoc/ieee/base_convert.rb
Instance Method Summary collapse
- #clause_attrs(node) ⇒ Object
- #middle_clause(_docxml = nil) ⇒ Object
- #para_attrs(node) ⇒ Object
- #scope(isoxml, out, num) ⇒ Object
Instance Method Details
#clause_attrs(node) ⇒ Object
7 8 9 |
# File 'lib/isodoc/ieee/base_convert.rb', line 7 def clause_attrs(node) { id: node["id"], type: node["type"] } end |
#middle_clause(_docxml = nil) ⇒ Object
23 24 25 26 |
# File 'lib/isodoc/ieee/base_convert.rb', line 23 def middle_clause(_docxml = nil) "//clause[parent::sections][not(@type = 'overview')]"\ "[not(descendant::terms)]" end |
#para_attrs(node) ⇒ Object
28 29 30 |
# File 'lib/isodoc/ieee/base_convert.rb', line 28 def para_attrs(node) super.merge(type: node["type"]) end |
#scope(isoxml, out, num) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/isodoc/ieee/base_convert.rb', line 11 def scope(isoxml, out, num) f = isoxml.at(ns("//clause[@type = 'overview']")) or return num out.div **attr_code(id: f["id"]) do |div| num = num + 1 clause_name(num, f&.at(ns("./title")), div, nil) f.elements.each do |e| parse(e, div) unless e.name == "title" end end num end |