class Asciidoctor::DocBook45::DocumentTemplate

def docinfo

def docinfo
  <<-EOF
  <% if has_header? && !notitle %>
  #{tag 'title', '@header.name'}
  <% end %>
  <% if attr? :revdate %>
  <date><%= attr :revdate %></date>
  <% else %>
  <date><%= attr :docdate %></date>
  <% end %>
  <% if has_header? %>
  <% if attr? :author %>
  <author>
    #{tag 'firstname', :firstname}
    #{tag 'othername', :middlename}
    #{tag 'surname', :lastname}
    #{tag 'email', :email}
  </author>
  #{tag 'authorinitials', :authorinitials}
  <% end %>
  <% if (attr? :revnumber) || (attr? :revremark) %>
  <revhistory>
    #{tag 'revision', :revnumber}
    #{tag 'date', :revdate}
    #{tag 'authorinitials', :authorinitials}
    #{tag 'revremark', :revremark}
  </revhistory>
  <% end %>
  <% end %>
  EOF
end