1 require 'rdoc/generator/xml'
3 module RDoc::Generator::XML::RDF
6 <% if defined? classes and classes["description"] then %>
7 <description rd:parseType="Literal">
8 <%= classes["description"] %>
12 <% if defined? files and files["requires"] then %>
13 <% files["requires"].each do |requires| %>
14 <rd:required-file rd:name="<%= requires["name"] %>" />
15 <% end # files["requires"] %>
18 <% if defined? classes and classes["includes"] then %>
20 <% classes["includes"].each do |includes| %>
21 <included-module rd:name="<%= includes["name"] %>" />
22 <% end # includes["includes"] %>
26 <% if defined? classes and classes["sections"] then %>
27 <% classes["sections"].each do |sections| %>
28 <% if sections["attributes"] then %>
29 <% sections["attributes"].each do |attributes| %>
31 <Attribute rd:name="<%= attributes["name"] %>">
32 <% if attributes["rw"] then %>
33 <attribute-rw><%= attributes["rw"] %></attribute-rw>
35 <description rdf:parseType="Literal"><%= attributes["a_desc"] %></description>
38 <% end # sections["attributes"] %>
41 <% if sections["method_list"] then %>
42 <% sections["method_list"].each do |method_list| %>
43 <% if method_list["methods"] then %>
44 <% method_list["methods"].each do |methods| %>
46 <Method rd:name="<%= methods["name"] %>" rd:visibility="<%= methods["type"] %>"
47 rd:category="<%= methods["category"] %>" rd:id="<%= methods["aref"] %>">
48 <parameters><%= methods["params"] %></parameters>
49 <% if methods["m_desc"] then %>
50 <description rdf:parseType="Literal">
51 <%= methods["m_desc"] %>
54 <% if methods["sourcecode"] then %>
55 <source-code-listing rdf:parseType="Literal">
56 <%= methods["sourcecode"] %>
57 </source-code-listing>
61 <% end # method_list["methods"] %>
63 <% end # sections["method_list"] %>
65 <!-- end method list -->
66 <% end # classes["sections"] %>
70 ########################################################################
72 ONE_PAGE = %{<?xml version="1.0" encoding="utf-8"?>
73 <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
74 xmlns="http://pragprog.com/rdoc/rdoc.rdf#"
75 xmlns:rd="http://pragprog.com/rdoc/rdoc.rdf#">
78 <% values["files"].each do |files| %>
79 <rd:File rd:name="<%= files["short_name"] %>" rd:id="<%= files["href"] %>">
80 <path><%= files["full_path"] %></path>
81 <dtm-modified><%= files["dtm_modified"] %></dtm-modified>
84 <% end # values["files"] %>
85 <% values["classes"].each do |classes| %>
86 <<%= values["classmod"] %> rd:name="<%= classes["full_name"] %>" rd:id="<%= classes["full_name"] %>">
88 <% if classes["infiles"] then %>
90 <% classes["infiles"].each do |infiles| %>
92 <File rd:name="<%= infiles["full_path"] %>"
93 <% if infiles["full_path_url"] then %>
94 rdf:about="<%= infiles["full_path_url"] %>"
98 <% end # classes["infiles"] %>
101 <% if classes["parent"] then %>
102 <superclass><%= href classes["par_url"], classes["parent"] %></superclass>
105 } + CONTENTS_RDF + %{
106 </<%= classes["classmod"] %>>
107 <% end # values["classes"] %>