class IsoDoc::NIST::Xref
Constants
- SECTIONS_XPATH
Public Instance Methods
annex_name_lbl(clause, num)
click to toggle source
# File lib/isodoc/nist/xref.rb, line 58 def annex_name_lbl(clause, num) l10n("<strong>#{@labels['annex']} #{num}</strong>") end
back_anchor_names(docxml)
click to toggle source
# File lib/isodoc/nist/xref.rb, line 30 def back_anchor_names(docxml) i = Counter.new("@") docxml.xpath(ns("//annex")).each do |c| i.increment(c) annex_names(c, i.print) end docxml.xpath(ns("//bibliography/clause | "\ "//bibliography/references")).each do |b| preface_names(b) end docxml.xpath(ns("//bibitem[not(ancestor::bibitem)]")).each do |ref| reference_names(ref) end end
clause_names(docxml, sect_num)
click to toggle source
# File lib/isodoc/nist/xref.rb, line 51 def clause_names(docxml, sect_num) q = "//xmlns:sections/child::*" docxml.xpath(q).each do |c| section_names(c, sect_num, 1) end end
hiersep()
click to toggle source
# File lib/isodoc/nist/xref.rb, line 62 def hiersep "-" end
initial_anchor_names(d)
click to toggle source
# File lib/isodoc/nist/xref.rb, line 16 def initial_anchor_names(d) d.xpath("//xmlns:boilerplate/child::* | //xmlns:preface/child::*").each do |c| preface_names(c) end @in_execsummary = true hierarchical_asset_names(d.xpath("//xmlns:executivesummary"), "ES") @in_execsummary = false c = Counter.new clause_names(d, c) middle_section_asset_names(d) termnote_anchor_names(d) termexample_anchor_names(d) end
middle_section_asset_names(d)
click to toggle source
# File lib/isodoc/nist/xref.rb, line 45 def middle_section_asset_names(d) middle_sections = "//xmlns:preface/child::*[not(self::xmlns:executivesummary)] | "\ "//xmlns:sections/child::*" sequential_asset_names(d.xpath(middle_sections)) end