2008-01-13 06:13:37 +03:00
|
|
|
require 'rdoc/generator/xml'
|
2003-12-01 10:12:49 +03:00
|
|
|
|
2008-01-13 06:13:37 +03:00
|
|
|
module RDoc::Generator::XML::XML
|
2008-01-13 06:02:49 +03:00
|
|
|
|
|
|
|
CONTENTS_XML = <<-EOF
|
2008-01-07 13:40:50 +03:00
|
|
|
<% if defined? classes and classes["description"] then %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<description>
|
2008-01-07 13:40:50 +03:00
|
|
|
<%= classes["description"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</description>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<contents>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% if defined? files and files["requires"] then %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<required-file-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% files["requires"].each do |requires| %>
|
|
|
|
<required-file name="<%= requires["name"] %>"
|
2008-01-13 06:02:49 +03:00
|
|
|
<% if requires["aref"] then %>
|
2008-01-07 13:40:50 +03:00
|
|
|
href="<%= requires["aref"] %>"
|
|
|
|
<% end %>
|
2003-12-01 10:12:49 +03:00
|
|
|
/>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# files["requires"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</required-file-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
|
|
|
<% if defined? classes and classes["sections"] then %>
|
|
|
|
<% classes["sections"].each do |sections| %>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% if sections["constants"] then %>
|
|
|
|
<constant-list>
|
|
|
|
<% sections["constants"].each do |constant| %>
|
|
|
|
<constant name="<%= constant["name"] %>">
|
|
|
|
<% if constant["value"] then %>
|
|
|
|
<value><%= constant["value"] %></value>
|
|
|
|
<% end %>
|
|
|
|
<description><%= constant["a_desc"] %></description>
|
|
|
|
</constant>
|
|
|
|
<% end %><%# sections["constants"] %>
|
|
|
|
</constant-list>
|
|
|
|
<% end %>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% if sections["attributes"] then %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<attribute-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% sections["attributes"].each do |attributes| %>
|
|
|
|
<attribute name="<%= attributes["name"] %>">
|
|
|
|
<% if attributes["rw"] then %>
|
|
|
|
<attribute-rw><%= attributes["rw"] %></attribute-rw>
|
|
|
|
<% end %>
|
|
|
|
<description><%= attributes["a_desc"] %></description>
|
2003-12-01 10:12:49 +03:00
|
|
|
</attribute>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# sections["attributes"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</attribute-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
|
|
|
<% if sections["method_list"] then %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<method-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% sections["method_list"].each do |method_list| %>
|
|
|
|
<% if method_list["methods"] then %>
|
|
|
|
<% method_list["methods"].each do |methods| %>
|
|
|
|
<method name="<%= methods["name"] %>" type="<%= methods["type"] %>" category="<%= methods["category"] %>" id="<%= methods["aref"] %>">
|
|
|
|
<parameters><%= methods["params"] %></parameters>
|
|
|
|
<% if methods["m_desc"] then %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<description>
|
2008-01-07 13:40:50 +03:00
|
|
|
<%= methods["m_desc"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</description>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
|
|
|
<% if methods["sourcecode"] then %>
|
2003-12-01 10:12:49 +03:00
|
|
|
<source-code-listing>
|
2008-01-07 13:40:50 +03:00
|
|
|
<%= methods["sourcecode"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</source-code-listing>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</method>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# method_list["methods"] %>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# sections["method_list"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</method-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# classes["sections"] %>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
|
|
|
<% if defined? classes and classes["includes"] then %>
|
|
|
|
<included-module-list>
|
|
|
|
<% classes["includes"].each do |includes| %>
|
|
|
|
<included-module name="<%= includes["name"] %>"
|
|
|
|
<% if includes["aref"] then %>
|
|
|
|
href="<%= includes["aref"] %>"
|
|
|
|
<% end %>
|
|
|
|
/>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# classes["includes"] %>
|
2008-01-07 13:40:50 +03:00
|
|
|
</included-module-list>
|
|
|
|
<% end %>
|
|
|
|
</contents>
|
2008-01-13 06:02:49 +03:00
|
|
|
EOF
|
2003-12-01 10:12:49 +03:00
|
|
|
|
2008-01-13 06:02:49 +03:00
|
|
|
ONE_PAGE = %{<?xml version="1.0" encoding="utf-8"?>
|
2003-12-01 10:12:49 +03:00
|
|
|
<rdoc>
|
|
|
|
<file-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% values["files"].each do |files| %>
|
|
|
|
<file name="<%= files["short_name"] %>" id="<%= files["href"] %>">
|
2003-12-01 10:12:49 +03:00
|
|
|
<file-info>
|
2008-01-07 13:40:50 +03:00
|
|
|
<path><%= files["full_path"] %></path>
|
|
|
|
<dtm-modified><%= files["dtm_modified"] %></dtm-modified>
|
2003-12-01 10:12:49 +03:00
|
|
|
</file-info>
|
|
|
|
} + CONTENTS_XML + %{
|
|
|
|
</file>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# values["files"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</file-list>
|
|
|
|
<class-module-list>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% values["classes"].each do |classes| %>
|
|
|
|
<<%= classes["classmod"] %> name="<%= classes["full_name"] %>" id="<%= classes["full_name"] %>">
|
2003-12-01 10:12:49 +03:00
|
|
|
<classmod-info>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% if classes["infiles"] then %>
|
2008-01-13 06:02:49 +03:00
|
|
|
<infiles>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% classes["infiles"].each do |infiles| %>
|
|
|
|
<infile><%= href infiles["full_path_url"], infiles["full_path"] %></infile>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# classes["infiles"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</infiles>
|
2008-01-07 13:40:50 +03:00
|
|
|
<% end %>
|
|
|
|
<% if classes["parent"] then %>
|
|
|
|
<superclass><%= href classes["par_url"], classes["parent"] %></superclass>
|
|
|
|
<% end %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</classmod-info>
|
|
|
|
} + CONTENTS_XML + %{
|
2008-01-07 13:40:50 +03:00
|
|
|
</<%= classes["classmod"] %>>
|
2008-09-25 06:43:03 +04:00
|
|
|
<% end %><%# values["classes"] %>
|
2003-12-01 10:12:49 +03:00
|
|
|
</class-module-list>
|
|
|
|
</rdoc>
|
|
|
|
}
|
|
|
|
|
|
|
|
end
|