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|
        children_parse(c, 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)
  children_parse(node, 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|
        children_parse(c, 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"))
  children_parse(para, out)
end


39
40
41
42
43
# File 'lib/isodoc/function/terms.rb', line 39

def related_parse(node, out)
  out.div class: "RelatedTerms", style: "text-align:left;" do |p|
    children_parse(node, p)
  end
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


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

def semx_related_parse(node, out); end

#semx_term_parse(node, out) ⇒ Object



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

def semx_term_parse(node, out); end

#semx_termref_parse(node, out) ⇒ Object



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

def semx_termref_parse(node, out); end

#term_p_parse(node, out) ⇒ Object



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

def term_p_parse(node, out)
  out.p class: "Terms", style: "text-align:left;" do |p|
    children_parse(node, p)
  end
end

#term_parse(node, out) ⇒ Object



49
50
51
52
53
54
55
56
57
# File 'lib/isodoc/function/terms.rb', line 49

def term_parse(node, out)
  node.children.each do |c|
    if c.name == "p"
      term_p_parse(c, out)
    else
      parse(c, out)
    end
  end
end

#termdef_parse(node, out) ⇒ Object



98
99
100
101
102
103
104
# File 'lib/isodoc/function/terms.rb', line 98

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
  children_parse(node, out)
end

#termdocsource_parse(_node, _out) ⇒ Object



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

def termdocsource_parse(_node, _out); end

#termdomain_parse(node, out) ⇒ Object



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

def termdomain_parse(node, out); end

#termnote_p_classObject



65
66
67
# File 'lib/isodoc/function/terms.rb', line 65

def termnote_p_class
  nil
end

#termnote_parse(node, out) ⇒ Object



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

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



77
78
79
80
81
82
83
84
85
86
# File 'lib/isodoc/function/terms.rb', line 77

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



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

def termref_parse(node, out)
  out.p do |p|
    children_parse(node, p)
  end
end