Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

296 lines
11 KiB

  1. package ActivePerl::DocTools::TOC::RDF;
  2. use strict;
  3. use warnings;
  4. use base ('ActivePerl::DocTools::TOC');
  5. my $_section=1; #section identifier
  6. my $_subsection=0;
  7. # constructs the simpler methods
  8. sub text {
  9. my ($text) = join '', map { "$_\n" } @_;
  10. return sub { $text };
  11. }
  12. #my @begin_subhead = ("<nc:subheadings>","<rdf:Seq>");
  13. my @begin_subhead = (" ");
  14. #*end_subhead = text("</rdf:Seq>","</nc:subheadings>");
  15. #*end_subhead = text(" </rdf:Seq>", " </nc:subheadings>", "</rdf:Description>");
  16. *end_subhead = text (" ");
  17. *boilerplate = text(<<HERE);
  18. <?xml version="1.0"?>
  19. <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  20. xmlns:nc="http://home.netscape.com/NC-rdf#"
  21. xmlns:kc="http://www.activestate.com/KC-rdf#">
  22. <rdf:Description about="urn:root">
  23. <nc:subheadings>
  24. <rdf:Seq>
  25. <rdf:li>
  26. <rdf:Description ID="ActivePerl-doc-top" nc:name="ActivePerl Documentation" nc:link="ActivePerl/perlmain.html">
  27. <nc:subheadings>
  28. <rdf:Seq>
  29. <rdf:li>
  30. <rdf:Description ID="ActivePerl-GS" nc:name="Getting Started"/>
  31. <rdf:Description ID="ActivePerl-IN" nc:name="Install Notes"/>
  32. <rdf:Description ID="ActivePerl-AC" nc:name="ActivePerl Components"/>
  33. <rdf:Description ID="ActivePerl-AF" nc:name="ActivePerl FAQ"/>
  34. <rdf:Description ID="ActivePerl-WS" nc:name="Windows Scripting"/>
  35. <rdf:Description ID="ActivePerl-1" nc:name="Core Perl"/>
  36. <rdf:Description ID="ActivePerl-2" nc:name="Pragmas"/>
  37. <rdf:Description ID="ActivePerl-3" nc:name="Libraries"/>
  38. </rdf:li>
  39. </rdf:Seq>
  40. </nc:subheadings>
  41. </rdf:Description>
  42. </rdf:li>
  43. </rdf:Seq>
  44. </nc:subheadings>
  45. </rdf:Description>
  46. <rdf:Description about="#ActivePerl-GS" nc:name="Getting Started">
  47. <nc:subheadings>
  48. <rdf:Seq>
  49. <rdf:li>
  50. <rdf:Description nc:name="Welcome To ActivePerl" nc:link="ActivePerl/perlmain.html"/>
  51. <rdf:Description nc:name="Release Notes" nc:link="ActivePerl/RELEASE.html"/>
  52. <rdf:Description nc:name="Readme" nc:link="ActivePerl/readme.html"/>
  53. <rdf:Description nc:name="ActivePerl Change Log" nc:link="ActivePerl/CHANGES.html"/>
  54. </rdf:li>
  55. </rdf:Seq>
  56. </nc:subheadings>
  57. </rdf:Description>
  58. <rdf:Description about="#ActivePerl-IN" nc:name="Install Notes">
  59. <nc:subheadings>
  60. <rdf:Seq>
  61. <rdf:li>
  62. <rdf:Description nc:name="Linux" nc:link="ActivePerl/faq/Linux/Install.html"/>
  63. <rdf:Description nc:name="Solaris" nc:link="ActivePerl/faq/Solaris/Install.html"/>
  64. <rdf:Description nc:name="Windows" nc:link="ActivePerl/faq/Windows/Install.html"/>
  65. </rdf:li>
  66. </rdf:Seq>
  67. </nc:subheadings>
  68. </rdf:Description>
  69. <rdf:Description about="#ActivePerl-AF" nc:name="ActivePerl FAQ">
  70. <nc:subheadings>
  71. <rdf:Seq>
  72. <rdf:li>
  73. <rdf:Description nc:name="Introduction" nc:link="ActivePerl/faq/ActivePerl-faq.html"/>
  74. <rdf:Description nc:name="Availability &amp; Install" nc:link="ActivePerl/faq/ActivePerl-faq1.html"/>
  75. <rdf:Description nc:name="Availability &amp; Install" nc:link="ActivePerl/faq/ActivePerl-faq1.html"/>
  76. <rdf:Description nc:name="Using PPM" nc:link="ActivePerl/faq/ActivePerl-faq2.html"/>
  77. <rdf:Description nc:name="Docs &amp; Support" nc:link="ActivePerl/faq/ActivePerl-faq3.html"/>
  78. </rdf:li>
  79. </rdf:Seq>
  80. </nc:subheadings>
  81. </rdf:Description>
  82. HERE
  83. *header = text(<<HEAR);
  84. HEAR
  85. # *before_pods = text("<!-- Core Perl Documentation -->",@begin_subhead);
  86. sub before_pods {
  87. my ($self, $file) = @_;
  88. return
  89. " <rdf:Description about=\"#ActivePerl-$_section\">\n".
  90. " <nc:subheadings>\n".
  91. " <rdf:Seq>\n";
  92. }
  93. #*pod_separator = text(" <rdf:li>"," </rdf:li>");
  94. *pod_separator = sub { $_subsection++; return
  95. " <rdf:li>\n".
  96. " <rdf:Description ID=\"ActivePerl-$_section-$_subsection\"\n".
  97. " nc:name=\" \"/>\n".
  98. " </rdf:li>\n";
  99. };
  100. sub pod {
  101. my ($self, $file) = @_;
  102. return
  103. " <rdf:li>\n".
  104. rdf_li_desc($file, 'Perl/' . $self->{'podz'}->{"Pod::$file"}).
  105. " </rdf:Description>\n".
  106. " </rdf:li>\n";
  107. };
  108. sub rdf_li_desc {
  109. my ($name, $link) = @_;
  110. $_subsection++;
  111. my $str =
  112. " <rdf:Description ID=\"ActivePerl-$_section-$_subsection\"\n".
  113. " nc:name=\"$name\"\n".
  114. " nc:link=\"$link\">\n";
  115. return $str;
  116. };
  117. #*after_pods = \&end_subhead;
  118. sub after_pods {
  119. $_section++;
  120. return
  121. " </rdf:Seq>\n".
  122. " </nc:subheadings>\n".
  123. "</rdf:Description>\n";
  124. }
  125. #*before_pragmas = text("<!-- Pragmas -->",@begin_subhead);
  126. sub before_pragmas {
  127. return
  128. " <rdf:Description about=\"#ActivePerl-$_section\">\n".
  129. " <nc:subheadings>\n".
  130. " <rdf:Seq>\n";
  131. }
  132. sub pragma {
  133. my ($self, $file) = @_;
  134. return
  135. " <rdf:li>\n".
  136. rdf_li_desc($file, 'Perl/' . $self->{'pragmaz'}->{$file}).
  137. " </rdf:Description>\n".
  138. " </rdf:li>\n";
  139. };
  140. #*after_pragmas = \&end_subhead;
  141. sub after_pragmas {
  142. $_section++;
  143. return
  144. " </rdf:Seq>\n".
  145. " </nc:subheadings>\n".
  146. "</rdf:Description>\n";
  147. }
  148. #*before_libraries = text("<!-- Libraries -->",@begin_subhead);
  149. sub before_libraries {
  150. return
  151. " <rdf:Description about=\"#ActivePerl-$_section\">\n".
  152. " <nc:subheadings>\n".
  153. " <rdf:Seq>\n";
  154. }
  155. #*library_indent_open = text(@begin_subhead);
  156. #*library_indent_close = \&end_subhead;
  157. sub library_indent_open {
  158. return
  159. " <nc:subheadings>\n".
  160. " <rdf:Seq>\n";
  161. }
  162. sub library_indent_close {
  163. return
  164. " </rdf:Description>\n".
  165. " </rdf:li>\n".
  166. " </rdf:Seq>\n".
  167. " </nc:subheadings>\n".
  168. " </rdf:Description>\n".
  169. " </rdf:li>\n";
  170. }
  171. sub library_indent_same {
  172. return
  173. " </rdf:Description>\n".
  174. " </rdf:li>\n";
  175. }
  176. sub library {
  177. my ($self, $file, $showfile) = @_;
  178. return
  179. " <rdf:li>\n".
  180. rdf_li_desc($showfile, 'Perl/' . $self->{'filez'}->{$file});
  181. }
  182. sub library_container {
  183. my ($self, $file, $showfile) = @_;
  184. return
  185. " <rdf:li>\n".
  186. " <rdf:Description nc:name=\"$showfile\">\n";
  187. }
  188. #*after_libraries = \&end_subhead;
  189. sub after_libraries {
  190. $_section++;
  191. return
  192. " </rdf:Seq>\n".
  193. " </nc:subheadings>\n".
  194. "</rdf:Description>\n";
  195. }
  196. *footer = text("</rdf:RDF>");
  197. __END__
  198. =head1 NAME
  199. ActivePerl::DocTools::TOC::RDF - Perl extension for Documentation TOC Generation in RDF
  200. =head1 SYNOPSIS
  201. use ActivePerl::DocTools::TOC::RDF();
  202. my $foo = ActivePerl::DocTools::TOC::RDF->new();
  203. print $x->TOC();
  204. =head1 DESCRIPTION
  205. Generates an RDF file. Uses the base class ActivePerl::DocTools::TOC.
  206. =head2 EXPORTS
  207. Nothing.
  208. =head1 AUTHOR
  209. Neil Kandalgaonkar, NeilK@ActiveState.com
  210. =head1 SEE ALSO
  211. L<ActivePerl::DocTools::TOC>
  212. =cut
  213. <img src="images/folder.gif" width="15" height="13" alt="*"> ActivePerl Components<br>
  214. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Components/Descriptions.html">Overview</a><br>
  215. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/ActivePerl-faq2.html">PPM</a><br>
  216. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/folder.gif" width="15" height="13" alt="*"> Windows Specifics<br>
  217. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="site/lib/Win32/OLE/Browser/Browser.html" target="_blank">OLE Browser</a><br>
  218. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Components/Windows/PerlScript.html">PerlScript</a><br>
  219. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="../eg/IEExamples/index.htm">PerlScript Examples</a><br>
  220. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Components/Windows/PerlISAPI.html">Perl for ISAPI</a><br>
  221. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="site/lib/Pod/PerlEz.html">PerlEz</a><br>
  222. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/folder.gif" width="15" height="13" alt="*"> Windows Specifics<br>
  223. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq2.html">Perl for ISAPI</a><br>
  224. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq4.html">Windows 9X/NT/2000</a><br>
  225. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq5.html">Quirks</a><br>
  226. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq6.html">Web Server Config</a><br>
  227. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq7.html">Web programming</a><br>
  228. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq8.html">Programming</a><br>
  229. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq9.html">Modules &amp; Samples</a><br>
  230. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq10.html">Embedding &amp; Extending</a><br>
  231. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="faq/Windows/ActivePerl-Winfaq12.html">Using OLE with Perl</a><br>
  232. <img src="images/folder.gif" width="15" height="13" alt="*"> Windows Scripting<br>
  233. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Windows/ActiveServerPages.html">Active Server Pages</a><br>
  234. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Windows/WindowsScriptHost.html">Windows Script Host</a><br>
  235. &nbsp;&nbsp;&nbsp;&nbsp;<img src="images/page.gif" width="12" height="15" alt="*"> <a href="Windows/WindowsScriptComponents.html">Windows Script Components</a><br>