PageRenderTime 46ms CodeModel.GetById 42ms app.highlight 2ms RepoModel.GetById 0ms app.codeStats 0ms

/tools/Ruby/lib/ruby/1.8/rdoc/generators/template/xml/xml.rb

http://github.com/agross/netopenspace
Ruby | 112 lines | 104 code | 7 blank | 1 comment | 0 complexity | 0651f40607b2929b748d961e20e8e1be MD5 | raw file
  1module RDoc
  2module Page
  3
  4
  5
  6CONTENTS_XML = %{
  7IF:description
  8    <description>
  9%description%
 10    </description>
 11ENDIF:description
 12    <contents>
 13IF:requires
 14      <required-file-list>
 15START:requires
 16         <required-file name="%name%"
 17IF:aref 
 18                        href="%aref%"
 19ENDIF:aref
 20         />
 21END:requires
 22      </required-file-list>
 23ENDIF:requires
 24IF:attributes
 25      <attribute-list>
 26START:attributes
 27        <attribute name="%name%">
 28IF:rw
 29          <attribute-rw>%rw%</attribute-rw>
 30ENDIF:rw
 31          <description>%a_desc%</description>
 32        </attribute>
 33END:attributes
 34      </attribute-list>
 35ENDIF:attributes
 36IF:includes
 37      <included-module-list>
 38START:includes
 39        <included-module name="%name%"
 40IF:aref
 41                         href="%aref%"
 42ENDIF:aref
 43        />
 44END:includes
 45      </included-module-list>
 46ENDIF:includes
 47IF:method_list
 48      <method-list>
 49START:method_list
 50IF:methods
 51START:methods
 52        <method name="%name%" type="%type%" category="%category%" id="%aref%">
 53          <parameters>%params%</parameters>
 54IF:m_desc
 55          <description>
 56%m_desc%
 57          </description>
 58ENDIF:m_desc
 59IF:sourcecode
 60          <source-code-listing>
 61%sourcecode%
 62          </source-code-listing>
 63ENDIF:sourcecode
 64        </method>
 65END:methods
 66ENDIF:methods
 67END:method_list
 68      </method-list>
 69ENDIF:method_list
 70     </contents>
 71}
 72
 73########################################################################
 74
 75ONE_PAGE = %{<?xml version="1.0" encoding="utf-8"?>
 76<rdoc>
 77<file-list>
 78START:files
 79  <file name="%short_name%" id="%href%">
 80    <file-info>
 81      <path>%full_path%</path>
 82      <dtm-modified>%dtm_modified%</dtm-modified>
 83    </file-info>
 84} + CONTENTS_XML + %{
 85  </file>
 86END:files
 87</file-list>
 88<class-module-list>
 89START:classes
 90  <%classmod% name="%full_name%" id="%full_name%">
 91    <classmod-info>
 92IF:infiles
 93      <infiles>      
 94START:infiles
 95        <infile>HREF:full_path_url:full_path:</infile>
 96END:infiles
 97      </infiles>
 98ENDIF:infiles
 99IF:parent
100     <superclass>HREF:par_url:parent:</superclass>
101ENDIF:parent
102    </classmod-info>
103} + CONTENTS_XML + %{
104  </%classmod%>
105END:classes
106</class-module-list>
107</rdoc>
108}
109
110
111end
112end