PageRenderTime 183ms CodeModel.GetById 177ms app.highlight 2ms RepoModel.GetById 1ms 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
  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
  9<question>
 10<title> What is Slacker's Docbook? </title>
 11<p> hi there </p>
 12</question>
 13
 14<indexterm><primary>Slacker's Docbook</primary>  </indexterm>
 15<indexterm><primary>Docbook/XML</primary>  </indexterm>
 16
 17<p> Slacker's Docbook is two things. </p>
 18<ol>
 19<li> A language which you can write books in </li>
 20<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>
 21</ol>
 22
 23<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>
 24
 25<p> It is much faster and easier to compose Slacker's than to use standard Docbook/XML. </p>
 26
 27<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>
 28
 29<p> Output format is controlled by easily customizable stylesheets which we have provided. </p>
 30
 31<p> The use of several Slacker's Docbook tags and directives is demonstrated below. </p>
 32
 33<p condition="textbook">
 34  This text is in a condition="textbook" element, so it only appears
 35  in the textbook version.
 36</p>
 37
 38<p c="textbook">
 39    <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>
 40</p>
 41
 42 <figure id="examplefigure">
 43 <title> A title for a figure </title>
 44 <img scale="50" src="./uml/entitymgr.png" alt="a beautiful UML diagram" />
 45 </figure>
 46
 47 <p condition="slides" >
 48 <tt>ant slides</tt> generates a slides version of the document. Like <tag>textbook</tag>, <tag>slides</tag> is another conditional name and tag.
 49 </p>
 50
 51  <ol>
 52     <li> Here is an ordered list. item.
 53     It should look familiar since it's tag is borrowed from XHTML. </li>
 54     <li>
 55       This ordered list shows you which version(s) you are reading: </li>
 56        <li condition="textbook"> You are reading textbook text. </li>
 57        <li condition="slides"> You are reading slides text.  </li>
 58        <li condition="remark"> You are also reading draft remarks. These are notes to other authors and reviewers, and some sections under construction.  </li>
 59        <li condition="solution"> Solutions to exercises </li>
 60        <li condition="instructor"> Instructor's notes </li>
 61        <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>
 62        <li condition="todo"> Make it possible to detect new conditions? Or have "all" blindly include everything?
 63        </li>
 64        <li> This listitem item appears in every version </li>
 65    </ol>
 66
 67    <p> An <b>admonition</b> is a Docbook tag with a title and an associated icon. </p>
 68
 69    <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>.
 70     </p>
 71
 72   <warning> <title> Warning </title>
 73   <p>
 74   Danger Will Robinson. Things to be careful about. </p>
 75   </warning>
 76
 77   <caution> <title> Caution </title>
 78   <p>
 79   Cautions can be dangerous to your health.
 80   They happen to be mapped to <tag>warning</tag> anyway. </p>
 81   </caution>
 82
 83  <note> <title> This is a note </title>
 84  <p>
 85   Take note of that. It's important!
 86   </p>
 87   </note>
 88
 89   <important> <title> Important </title>
 90   <p>
 91   This is actually not so important, since it's
 92   mapped to <tag>note</tag>. </p>
 93   </important>
 94
 95   <tip> <title> Tip </title> <p>
 96   This is a tip. It's very good advice. It could save you time. </p>
 97
 98   </tip>
 99
100   <question>
101   <p>
102   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>
103   </question>
104
105   <prereq>
106   <p>
107   This is inside a <tag>prereq</tag>. It's mapped to the
108   <tag>caution</tag> admonition since we are not using it.
109   </p>
110   </prereq>
111
112 <p>
113    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>
114
115 <sidebar>
116 <title> This is the title of a sidebar </title> <p>
117 This is a sidebar. Passages which elaborate further
118 ideas in the slides belong in a sidebar.  </p>
119 </sidebar>
120
121<formalpara>
122   <title> A formalpara about parabullet (<tag>pb</tag>)  </title>
123   <p>
124   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>
125 </formalpara>
126
127    <pb>
128        <li> This content is inside <tag>pb</tag>, which is short for <i>parabullet</i>. </li>
129        <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.
130        </li>
131        <li> Otherwise, the preprocessor translates each <tag>li</tag> into a <tag>listitem</tag> <tag>para</tag>
132              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>
133
134        <li> This means that unordered lists inside <tag>pb</tag>should be properly punctuated.  </li>
135        <li> <tag>li</tag> is much easier to type than <tag>listitem</tag> <tag>para</tag>.  </li>
136    </pb>
137
138
139    <ul>
140      <li> This is a regular unordered list. </li>
141      <li> It should appear always as a bullet in all versions. </li>
142    </ul>
143
144    <todo>
145      The <tag>todo</tag> element is mapped to <tag>p</tag> but also has a bold heading that says "Todo Items". </todo>
146
147      <ol>
148      <li> Add keyword-processing with hyperlinks to the
149      <a href="@docbookdoc@/ref-elements.html">Element
150      Reference Guide</a>. We have it already in the C++ textbook. </li>
151      </ol>
152
153
154    <p c="remark">
155       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>
156
157   <remark>
158         The <tag>remark</tag> tag is just shorthand for a
159         <tag>para class=&quot;remark&quot;</tag>
160     </remark>
161
162    <solution>
163       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).
164    </solution>
165
166<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.
167</p>
168
169<bridgehead> About including files </bridgehead>
170
171    <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>
172
173 <include src="impl.xml" mode="text" />
174
175   <todo> Add conditional inclusion tags for XML
176          inside proper XML comments. </todo>
177
178    <p> When including C++, you can use //start and //end comments to switch on/off inclusion. </p>
179
180    <p> In addition, c-style comments appear as callouts in the listings. </p>
181
182<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.
183 </p>
184
185    <include src="dialogs.cpp" mode="cpp" segid="menu"/>
186
187    <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.
188    </p>
189
190    <include src="sample.cpp" mode="cpp" segid="main" link="false"/>
191
192</section>