Method: IsoDoc::Function::XrefGen#note_anchor_names

Defined in:
lib/isodoc/function/xref_gen.rb

#note_anchor_names(sections) ⇒ Object



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/isodoc/function/xref_gen.rb', line 52

def note_anchor_names(sections)
  sections.each do |s|
    notes = s.xpath(CHILD_NOTES_XPATH)
    notes.each_with_index do |n, i|
      next if @anchors[n["id"]]
      next if n["id"].nil? || n["id"].empty?
      idx = notes.size == 1 ? "" : " #{i + 1}"
      @anchors[n["id"]] = anchor_struct(idx, n, @note_xref_lbl, "note")
    end
    note_anchor_names(s.xpath(ns("./clause | ./appendix")))
  end
end