Class: IsoDoc::Ribose::Xref
- Inherits:
-
Generic::Xref
- Object
- Generic::Xref
- IsoDoc::Ribose::Xref
- Defined in:
- lib/isodoc/ribose/xref.rb
Instance Method Summary collapse
- #annex_name_lbl(clause, num) ⇒ Object
- #initial_anchor_names(d) ⇒ Object
- #section_names1(clause, num, level) ⇒ Object
Instance Method Details
#annex_name_lbl(clause, num) ⇒ Object
6 7 8 9 10 |
# File 'lib/isodoc/ribose/xref.rb', line 6 def annex_name_lbl(clause, num) obl = l10n("(#{@labels['inform_annex']})") obl = l10n("(#{@labels['norm_annex']})") if clause["obligation"] == "normative" l10n("#{@labels['annex']} #{num}<br/>#{obl}") end |
#initial_anchor_names(d) ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/isodoc/ribose/xref.rb', line 12 def initial_anchor_names(d) preface_names(d.at(ns("//executivesummary"))) super sequential_asset_names( d.xpath(ns("//preface/abstract | //foreword | //introduction | "\ "//preface/clause | //acknowledgements | //executivesummary"))) end |
#section_names1(clause, num, level) ⇒ Object
20 21 22 23 24 25 26 27 28 |
# File 'lib/isodoc/ribose/xref.rb', line 20 def section_names1(clause, num, level) @anchors[clause["id"]] = { label: num, level: level, xref: num } # subclauses are not prefixed with "Clause" clause.xpath(ns("./clause | ./terms | ./term | ./definitions | ./references")). each_with_index do |c, i| section_names1(c, "#{num}.#{i + 1}", level + 1) end end |