Module: IsoDoc::Function::Terms

Included in:
Common
Defined in:
lib/isodoc/function/terms.rb

Instance Method Summary collapse

Instance Method Details

#admitted_term_parse(node, out) ⇒ Object



28
29
30
31
32
33
34
35
36
37
# File 'lib/isodoc/function/terms.rb', line 28

def admitted_term_parse(node, out)
          node.children.each do |c|
    if c.name == "p"
      out.p class: "AltTerms", style: "text-align:left;" do |p|
        c.children.each { |c1| parse(c1, p) }
      end
    else parse(c, out)
    end
  end
end

#definition_parse(node, out) ⇒ Object



4
5
6
# File 'lib/isodoc/function/terms.rb', line 4

def definition_parse(node, out)
  node.children.each { |n| parse(n, out) }
end

#deprecated_term_parse(node, out) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/isodoc/function/terms.rb', line 15

def deprecated_term_parse(node, out)
  node.children.each do |c|
    if c.name == "p"
      out.p class: "DeprecatedTerms", style: "text-align:left;" do |p|
        c.children.each { |c1| parse(c1, p) }
      end
    else parse(c, out)
    end
  end
end

#modification_parse(node, out) ⇒ Object



8
9
10
11
# File 'lib/isodoc/function/terms.rb', line 8

def modification_parse(node, out)
  para = node.at(ns("./p"))
  para.children.each { |n| parse(n, out) }
end

#semx_admitted_term_parse(node, out) ⇒ Object



26
# File 'lib/isodoc/function/terms.rb', line 26

def semx_admitted_term_parse(node, out); end

#semx_deprecated_term_parse(node, out) ⇒ Object



13
# File 'lib/isodoc/function/terms.rb', line 13

def semx_deprecated_term_parse(node, out); end


41
# File 'lib/isodoc/function/terms.rb', line 41

def semx_related_parse(node, out); end

#semx_term_parse(node, out) ⇒ Object



39
# File 'lib/isodoc/function/terms.rb', line 39

def semx_term_parse(node, out); end

#semx_termref_parse(node, out) ⇒ Object



77
# File 'lib/isodoc/function/terms.rb', line 77

def semx_termref_parse(node, out); end

#term_parse(node, out) ⇒ Object



43
44
45
46
47
48
49
50
51
52
# File 'lib/isodoc/function/terms.rb', line 43

def term_parse(node, out)
  node.children.each do |c|
    if c.name == "p"
      out.p class: "Terms", style: "text-align:left;" do |p|
        c.children.each { |c1| parse(c1, p) }
      end
    else parse(c, out)
    end
  end
end

#termdef_parse(node, out) ⇒ Object



87
88
89
90
91
92
93
# File 'lib/isodoc/function/terms.rb', line 87

def termdef_parse(node, out)
  name = node.at(ns("./fmt-name"))&.remove
  out.p class: "TermNum", id: node["id"] do |p|
    name&.children&.each { |n| parse(n, p) }
  end
  node.children.each { |n| parse(n, out) }
end

#termdocsource_parse(_node, _out) ⇒ Object



95
# File 'lib/isodoc/function/terms.rb', line 95

def termdocsource_parse(_node, _out); end

#termdomain_parse(node, out) ⇒ Object



85
# File 'lib/isodoc/function/terms.rb', line 85

def termdomain_parse(node, out); end

#termnote_p_classObject



54
55
56
# File 'lib/isodoc/function/terms.rb', line 54

def termnote_p_class
  nil
end

#termnote_parse(node, out) ⇒ Object



58
59
60
61
62
63
64
# File 'lib/isodoc/function/terms.rb', line 58

def termnote_parse(node, out)
  para = block_body_first_elem(node)
  out.div **note_attrs(node) do |div|
    termnote_parse1(node, para, div)
    para&.xpath("./following-sibling::*")&.each { |n| parse(n, div) }
  end
end

#termnote_parse1(node, para, div) ⇒ Object



66
67
68
69
70
71
72
73
74
75
# File 'lib/isodoc/function/terms.rb', line 66

def termnote_parse1(node, para, div)
  div.p **attr_code(class: termnote_p_class) do |p|
    name = node.at(ns("./fmt-name")) and
      p.span class: "termnote_label" do |s|
        children_parse(name, s)
      end
    para&.name == "p" and children_parse(para, p)
  end
  para&.name != "p" and parse(para, div)
end

#termref_parse(node, out) ⇒ Object



79
80
81
82
83
# File 'lib/isodoc/function/terms.rb', line 79

def termref_parse(node, out)
  out.p do |p|
    node.children.each { |n| parse(n, p) }
  end
end