# File lib/asciidoctor/backends/docbook45.rb, line 53 def docinfo <<-EOF <% unless notitle %><%= has_header? ? template.title_tags(@header.title) : %(<title>\#{attr 'untitled-label'}</title>) %><% end if attr? :revdate %> <date><%= attr :revdate %></date><% else %> <date><%= attr :docdate %></date><% end if has_header? if attr? :author if (attr :authorcount).to_i < 2 %> #{author} #{tag 'authorinitials', :authorinitials}<% else %> <authorgroup><% (1..((attr :authorcount).to_i)).each do |idx| %> #{author true}<% end %> </authorgroup><% end end if (attr? :revnumber) || (attr? :revremark) %> <revhistory> <revision> #{tag 'revnumber', :revnumber} #{tag 'date', :revdate} #{tag 'authorinitials', :authorinitials} #{tag 'revremark', :revremark} </revision> </revhistory><% end %> <%= docinfo %> #{tag 'orgname', :orgname}<% end %> EOF end
# File lib/asciidoctor/backends/docbook45.rb, line 101 def template @template ||= @eruby.new <<-EOF <%#encoding:UTF-8%><?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE <%= doctype %> PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"><% if attr? :toc %> <?asciidoc-toc?><% end if attr? :numbered %> <?asciidoc-numbered?><% end if doctype == 'book' %> <book<% unless attr? :noxmlns %> xmlns="http://docbook.org/ns/docbook"<% end %><% unless attr? :nolang %> lang="<%= attr :lang, 'en' %>"<% end %>> <bookinfo> #{docinfo} </bookinfo> <%= content %><%= (docinfo_content = docinfo :footer).empty? ? nil : %( \#{docinfo_content}) %> </book><% else %> <article<% unless attr? :noxmlns %> xmlns="http://docbook.org/ns/docbook"<% end %><% unless attr? :nolang %> lang="<%= attr :lang, 'en' %>"<% end %>> <articleinfo> #{docinfo} </articleinfo> <%= content %><%= (docinfo_content = docinfo :footer).empty? ? nil : %( \#{docinfo_content}) %> </article><% end %> EOF end