From 0dc342de848a642ecce8db697b8fecd83a63e117 Mon Sep 17 00:00:00 2001 From: yugui Date: Mon, 25 Aug 2008 15:02:05 +0000 Subject: added tag v1_9_0_4 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_9_0_4@18845 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- trunk/lib/rdoc/generator/xml/xml.rb | 111 ++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 trunk/lib/rdoc/generator/xml/xml.rb (limited to 'trunk/lib/rdoc/generator/xml/xml.rb') diff --git a/trunk/lib/rdoc/generator/xml/xml.rb b/trunk/lib/rdoc/generator/xml/xml.rb new file mode 100644 index 0000000000..ffb1329c4e --- /dev/null +++ b/trunk/lib/rdoc/generator/xml/xml.rb @@ -0,0 +1,111 @@ +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["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 + %{ + > +<% end # values["classes"] %> + + +} + +end -- cgit v1.2.3