PageRenderTime 21ms CodeModel.GetById 18ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

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