PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/bundles/plugins-trunk/XML/test_data/import_schema/network.xml

#
XML | 192 lines | 144 code | 48 blank | 0 comment | 0 complexity | 3a9c6987fae41bc312086d30d4b179f9 MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <section id="styletest" c="remark"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:noNamespaceSchemaLocation='http://slackerdoc.tigris.org/xsd/slackerdoc.xsd'>
  4. <title> Stylesheet Test </title>
  5. <abstract> <p>
  6. This file is an example that uses all Slacker document elements, and a subset of common/popular elements from the <a href="@docbookdoc@/part2.html">Docbook</a> language. It's also a testcase for the scripts and stylesheets. </p>
  7. </abstract>
  8. <question>
  9. <title> What is Slacker's Docbook? </title>
  10. <p> hi there </p>
  11. </question>
  12. <indexterm><primary>Slacker's Docbook</primary> </indexterm>
  13. <indexterm><primary>Docbook/XML</primary> </indexterm>
  14. <p> Slacker's Docbook is two things. </p>
  15. <ol>
  16. <li> A language which you can write books in </li>
  17. <li> A set of scripts and files which convert from Slacker's Docbook (the language) into Docbook/XML, and later to other file formats such as HTML, PDF, LaTex. </li>
  18. </ol>
  19. <p> Most of the non-Docbook tags added to Slacker's Docbook will be familiar to anyone who has edited an HTML page, since they were taken from HTML. </p>
  20. <p> It is much faster and easier to compose Slacker's than to use standard Docbook/XML. </p>
  21. <p> The scripts are organized and deployed by <a href="http://ant.apache.org"> Apache Ant,</a> an open source, cross platform, Java-based build tool.</p>
  22. <p> Output format is controlled by easily customizable stylesheets which we have provided. </p>
  23. <p> The use of several Slacker's Docbook tags and directives is demonstrated below. </p>
  24. <p condition="textbook">
  25. This text is in a condition="textbook" element, so it only appears
  26. in the textbook version.
  27. </p>
  28. <p c="textbook">
  29. <tt>ant bookhtml</tt> or <tt>ant pdf</tt> both generate versions that include textbook elements. An alternate way of describing textbook conditionals is with the <tag>textbook</tag> tag. This is equivalent to a <tag>p condition="textbook"</tag>
  30. </p>
  31. <figure id="examplefigure">
  32. <title> A title for a figure </title>
  33. <img scale="50" src="./uml/entitymgr.png" alt="a beautiful UML diagram" />
  34. </figure>
  35. <p condition="slides" >
  36. <tt>ant slides</tt> generates a slides version of the document. Like <tag>textbook</tag>, <tag>slides</tag> is another conditional name and tag.
  37. </p>
  38. <ol>
  39. <li> Here is an ordered list. item.
  40. It should look familiar since it's tag is borrowed from XHTML. </li>
  41. <li>
  42. This ordered list shows you which version(s) you are reading: </li>
  43. <li condition="textbook"> You are reading textbook text. </li>
  44. <li condition="slides"> You are reading slides text. </li>
  45. <li condition="remark"> You are also reading draft remarks. These are notes to other authors and reviewers, and some sections under construction. </li>
  46. <li condition="solution"> Solutions to exercises </li>
  47. <li condition="instructor"> Instructor's notes </li>
  48. <li condition="junk"> This is a junk tag. It shouldn't appear at all since I haven't defined it as a condition in the script yet.</li>
  49. <li condition="todo"> Make it possible to detect new conditions? Or have "all" blindly include everything?
  50. </li>
  51. <li> This listitem item appears in every version </li>
  52. </ol>
  53. <p> An <b>admonition</b> is a Docbook tag with a title and an associated icon. </p>
  54. <p> Here are the available admonitions. The original Docbook admonitions are all supported in Slacker's Docbook; however, we have added two new tags: <tag>prereq</tag> and <tag>question</tag>.
  55. </p>
  56. <warning> <title> Warning </title>
  57. <p>
  58. Danger Will Robinson. Things to be careful about. </p>
  59. </warning>
  60. <caution> <title> Caution </title>
  61. <p>
  62. Cautions can be dangerous to your health.
  63. They happen to be mapped to <tag>warning</tag> anyway. </p>
  64. </caution>
  65. <note> <title> This is a note </title>
  66. <p>
  67. Take note of that. It's important!
  68. </p>
  69. </note>
  70. <important> <title> Important </title>
  71. <p>
  72. This is actually not so important, since it's
  73. mapped to <tag>note</tag>. </p>
  74. </important>
  75. <tip> <title> Tip </title> <p>
  76. This is a tip. It's very good advice. It could save you time. </p>
  77. </tip>
  78. <question>
  79. <p>
  80. The Docbook meaning of <tag>question</tag> remains the same if it appears inside a <tag>qandaset</tag>. However, if it appears where a other admonitions are allowed, <tag>question</tag> is mapped to the docbook <tt>important</tt> admonition. </p>
  81. </question>
  82. <prereq>
  83. <p>
  84. This is inside a <tag>prereq</tag>. It's mapped to the
  85. <tag>caution</tag> admonition since we are not using it.
  86. </p>
  87. </prereq>
  88. <p>
  89. The glyphs are taken from Bobco fonts, with copyrights held by the <a href="http://www.subgenius.com/">Subgenius Foundation</a> <footnote><para> Praise Bob! </para></footnote>.</p>
  90. <sidebar>
  91. <title> This is the title of a sidebar </title> <p>
  92. This is a sidebar. Passages which elaborate further
  93. ideas in the slides belong in a sidebar. </p>
  94. </sidebar>
  95. <formalpara>
  96. <title> A formalpara about parabullet (<tag>pb</tag>) </title>
  97. <p>
  98. This is a <tag>formalpara</tag> which is discussing the parabullet that follows. parabullets are very interesting because they are rendered quite differently depending on which version you are generating. In order to simultaneously write bullet-text for the slides version and paragraph text in the book version without repeating yourself, mark each paragraph as a <tag>pb</tag>, marking up each major idea in it as an <tag>li</tag>. </p>
  99. </formalpara>
  100. <pb>
  101. <li> This content is inside <tag>pb</tag>, which is short for <i>parabullet</i>. </li>
  102. <li> When a <tag>pb</tag> is encountered, and condition['slides'] is not true, we translate <tag>pb</tag> into <tag>para</tag>, stripping all <tag>li</tag>s.
  103. </li>
  104. <li> Otherwise, the preprocessor translates each <tag>li</tag> into a <tag>listitem</tag> <tag>para</tag>
  105. and the <tag>pb</tag> maps to an <tag>unorderedlist</tag>. They appear as bullets in the slides version and paragraphs in the textbook. </li>
  106. <li> This means that unordered lists inside <tag>pb</tag>should be properly punctuated. </li>
  107. <li> <tag>li</tag> is much easier to type than <tag>listitem</tag> <tag>para</tag>. </li>
  108. </pb>
  109. <ul>
  110. <li> This is a regular unordered list. </li>
  111. <li> It should appear always as a bullet in all versions. </li>
  112. </ul>
  113. <todo>
  114. The <tag>todo</tag> element is mapped to <tag>p</tag> but also has a bold heading that says "Todo Items". </todo>
  115. <ol>
  116. <li> Add keyword-processing with hyperlinks to the
  117. <a href="@docbookdoc@/ref-elements.html">Element
  118. Reference Guide</a>. We have it already in the C++ textbook. </li>
  119. </ol>
  120. <p c="remark">
  121. This is a paragraph marked conditionally with remark, but using the abbreviated c= attribuite. Since it is a remark, it should only be visible in the development version, and is styled for remark. </p>
  122. <remark>
  123. The <tag>remark</tag> tag is just shorthand for a
  124. <tag>para class=&quot;remark&quot;</tag>
  125. </remark>
  126. <solution>
  127. We have a solution tag which creates a formalpara with a "solution" title, and wraps around whatever needs to be part of the solution. Content between solution tags can easily be excluded from a particular target if you want to control the time and place of its release (e.g., to students).
  128. </solution>
  129. <p condition="remark"> <tt>ant dev</tt> Generates the HTML "development" version which contains every conditional included in the output, highlighted in different colors as specified in the css file.
  130. </p>
  131. <bridgehead> About including files </bridgehead>
  132. <p> We can include xml files as <tt>mode="text"</tt> (the default for all files which do not have a .cpp or .h suffix). It does simple line-wrap. </p>
  133. <include src="impl.xml" mode="text" />
  134. <todo> Add conditional inclusion tags for XML
  135. inside proper XML comments. </todo>
  136. <p> When including C++, you can use //start and //end comments to switch on/off inclusion. </p>
  137. <p> In addition, c-style comments appear as callouts in the listings. </p>
  138. <p> Click on filename, or the "link" icon below the included code to see the original file before processing. Notice we only see a small piece.
  139. </p>
  140. <include src="dialogs.cpp" mode="cpp" segid="menu"/>
  141. <p> In this next example, there is no link, and in fact, the included file has restricted permissions, so you should not be able to see it even if you guessed at its url.
  142. </p>
  143. <include src="sample.cpp" mode="cpp" segid="main" link="false"/>
  144. </section>