require 'rdoc/generator/xml'
module RDoc::Generator::XML::XML
CONTENTS_XML = <<-EOF
<% if defined? classes and classes["description"] then %>
<%= classes["description"] %>
<% end %>
<% if defined? files and files["requires"] then %>
<% files["requires"].each do |requires| %>
"
<% if requires["aref"] then %>
href="<%= requires["aref"] %>"
<% end %>
/>
<% end %><%# files["requires"] %>
<% end %>
<% if defined? classes and classes["sections"] then %>
<% classes["sections"].each do |sections| %>
<% if sections["constants"] then %>
<% sections["constants"].each do |constant| %>
">
<% if constant["value"] then %>
<%= constant["value"] %>
<% end %>
<%= constant["a_desc"] %>
<% end %><%# sections["constants"] %>
<% end %>
<% if sections["attributes"] then %>
<% sections["attributes"].each do |attributes| %>
">
<% if attributes["rw"] then %>
<%= attributes["rw"] %>
<% end %>
<%= attributes["a_desc"] %>
<% end %><%# sections["attributes"] %>
<% end %>
<% if sections["method_list"] then %>
<% sections["method_list"].each do |method_list| %>
<% if method_list["methods"] then %>
<% method_list["methods"].each do |methods| %>
" type="<%= methods["type"] %>" category="<%= methods["category"] %>" id="<%= methods["aref"] %>">
<%= methods["params"] %>
<% if methods["m_desc"] then %>
<%= methods["m_desc"] %>
<% end %>
<% if methods["sourcecode"] then %>
<%= methods["sourcecode"] %>
<% end %>
<% end %><%# method_list["methods"] %>
<% end %>
<% end %><%# sections["method_list"] %>
<% end %>
<% end %><%# classes["sections"] %>
<% end %>
<% if defined? classes and classes["includes"] then %>
<% classes["includes"].each do |includes| %>
"
<% if includes["aref"] then %>
href="<%= includes["aref"] %>"
<% end %>
/>
<% end %><%# classes["includes"] %>
<% end %>
EOF
ONE_PAGE = %{
<% values["files"].each do |files| %>
" id="<%= files["href"] %>">
<%= files["full_path"] %>
<%= files["dtm_modified"] %>
} + CONTENTS_XML + %{
<% end %><%# values["files"] %>
<% values["classes"].each do |classes| %>
<<%= classes["classmod"] %> name="<%= classes["full_name"] %>" id="<%= classes["full_name"] %>">
<% if classes["infiles"] then %>
<% classes["infiles"].each do |infiles| %>
<%= href infiles["full_path_url"], infiles["full_path"] %>
<% end %><%# classes["infiles"] %>
<% end %>
<% if classes["parent"] then %>
<%= href classes["par_url"], classes["parent"] %>
<% end %>
} + CONTENTS_XML + %{
<%= classes["classmod"] %>>
<% end %><%# values["classes"] %>
}
end