lib/docbookrx/docbook_visitor.rb
# transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
def visit_chapter node
    if node == node.document.root
      @adjoin_next = true
      process_section node do
        append_line ':compat-mode:' if @compat_mode
        append_line ':doctype: book'
        append_line ':sectnums:'
        append_line ':toc: left'
        append_line ':icons: font'
        append_line ':experimental:'
        append_line %(:idprefix: #{@idprefix}).rstrip unless @idprefix == '_'
        append_line %(:idseparator: #{@idseparator}).rstrip unless @idseparator == '_'
        append_line %(:sourcedir: .) unless @attributes.key? 'sourcedir'
        @attributes.each do |name, val|
          append_line %(:#{name}: #{val}).rstrip
        end
      end
    else
      process_section node
    end
  end
def visit_chapter node if node == node . document . root @adjoin_next = true process_section node do append_line ':compat-mode:' if @compat_mode append_line ':doctype: book' append_line ':sectnums:' append_line ':toc: left' append_line ':icons: font' append_line ':experimental:' append_line %(:idprefix: #{@idprefix}) . rstrip unless @idprefix == '_' append_line %(:idseparator: #{@idseparator}) . rstrip unless @idseparator == '_' append_line %(:sourcedir: .) unless @attributes . key? 'sourcedir' @attributes . each do | name , val | append_line %(:#{name}: #{val}) . rstrip end end else process_section node end end
transfer node type constants from Nokogiri
transfer node type constants from Nokogiri
# treat document with <chapter> root element as books
node
<not_specific>