3 Copyright 2002-2004 The Apache Software Foundation or its licensors,
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
10 http://www.apache.org/licenses/LICENSE-2.0
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
18 <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
21 <title>The Apache Forrest xdocs document-v1.3 DTD</title>
22 <notice>The content of this document doesn't make any sense at all.</notice>
23 <abstract>This is a demonstration document using all possible elements in
24 the current Apache Forrest xdocs <code>document-v13.dtd</code>
29 This is a demonstration document using all possible elements in the
30 current Apache Forrest xdocs <code>document-v13.dtd</code>
31 (See the <link href="#changes">DTD changes</link> section at the bottom.)
34 <title>Sample Content</title>
35 <p><strong>Hint:</strong> See the xml source to see how the various
36 elements are used and see the
37 <!-- FOR-321 workaround
38 <link href="ext:dtd-docs">DTD reference documentation</link>.
40 <link href="http://forrest.apache.org/docs/dtd-docs.html">DTD reference documentation</link>.
42 <section id="block-inline">
43 <title>Block and inline elements</title>
44 <p>This is a simple paragraph. Most documents contain a fair amount of
45 paragraphs. Paragraphs are called <code><p></code>.</p>
46 <p xml:space="preserve"
47 >With the <code><p xml:space="preserve"></code> attribute, you can declare
48 that whitespace should be preserved, without implying it is in any other
51 This next paragraph has a class attribute of 'quote'. CSS can
52 be used to present this <code><p class='quote'></code> in
53 a different style than the other paragraphs. The handling of
54 this quoted paragraph is defined in the <extra-css>
55 element in the skinconf.xml.
58 Anyway, like I was sayin', shrimp is the fruit of the sea. You can
59 barbecue it, boil it, broil it, bake it, sautee it. Dey's uh,
60 shrimp-kabobs, shrimp creole, shrimp gumbo. Pan fried, deep fried,
61 stir-fried. There's pineapple shrimp, lemon shrimp, coconut shrimp,
62 pepper shrimp, shrimp soup, shrimp stew, shrimp salad, shrimp and
63 potatoes, shrimp burger, shrimp sandwich. That- that's about it.
65 <p>A number of in-line elements are available in the DTD, we will show them
66 inside an unordered list (<code><ul></code>):</p>
68 <li>Here is a simple list item (<code><li></code>).</li>
69 <li>Have you seen the use of the <code><code></code> element in the
71 <li>Also, we have <code><sub></code> and <code><sup></code>
72 elements to show content <sup>above</sup> or <sub>below</sub> the text
74 <li>There is a facility to <em>emphasize</em> certain words using the
75 <code><em></code> <strong><code><strong></code></strong>
78 <icon height="22" width="26" src="../images/icon.png" alt="feather"/>
79 <code><icon></code>s too.</li>
80 <li>Another possibility is the <code><img></code> element:
81 <img src="../images/icon.png" alt="another feather" height="22" width="26"/>,
82 which offers the ability to refer to an image map.</li>
83 <li>We have elements for hyperlinking:
85 <dt><code><link href="faq.html"></code></dt>
87 <link href="faq.html" title="Example of a document via link">link</link>
88 to another document. As per normal, this will open the new document
89 in the same browser window.</dd>
91 <dt><code><link href="#section"></code></dt>
93 <link href="#section" title="Example of a document via local anchor">link</link>
94 to the named anchor in the current document.
97 <dt><code><link href="faq.html#forrest"></code></dt>
99 <link href="faq.html#forrest" title="Example of a document via link and anchor">link</link>
100 to another document and go to the named anchor. This will open
101 the new document in the same browser window.
104 <dt><code><jump href="faq.html"></code></dt>
106 <jump href="faq.html" title="Example of a document via jump">jump</jump>
107 to another document and optionally go to a named
108 <jump href="faq.html#forrest" title="Example of a document via jump to anchor">anchor</jump>
109 within that document. This will open the new document in the same
110 browser window. So what is the difference between link and jump?
111 The jump behaves differently, in that it will replace any frames
112 in the current window.
113 This is the equivalent of
114 <code><a ... target="_top"></code>
117 <dt><code><fork href="faq.html"></code></dt>
119 <fork href="faq.html" title="Example of a document via fork">fork</fork>
120 your webbrowser to another document. This will open the document
121 in a new, unnamed browser window.
122 This is the equivalent of
123 <code><a ... target="_blank"></code>
127 <li>Oh, by the way, a definition list <code><dl></code> was used inside
128 the previous list item. We could put another
130 <li>unordered list</li>
131 <li>inside the list item</li>
134 <caption>A sample nested table</caption>
135 <tr><td>Or even tables.. </td><td>
136 <table><tr><td>inside tables..</td></tr></table>
138 <tr><td>or inside lists, but I believe this liberty gets quickly quite
139 hairy as you see.</td></tr>
143 <p>So far for the in-line elements, let's look at some paragraph-level
145 <fixme author="SN">The <code><fixme></code> element is used for stuff
146 which still needs work. Mind the <code>author</code> attribute!</fixme>
147 <note>Use the <code><note></code> element to draw attention to something, e.g. ...The <code><code></code> element is used when the author can't
148 express himself clearly using normal sentences ;-)</note>
149 <warning>Sleep deprivation can be the result of being involved in an open
150 source project. (a.k.a. the <code><warning></code> element).
152 <note label="Important">If you want your own labels for notes and
153 warnings, specify them using the <code>label</code> attribute.
155 <p>Apart from unordered lists, we have ordered lists too, of course.</p>
159 <li>This should be 3 if my math is still OK.</li>
163 <section id="presentations">
164 <title>Various presentation formats</title>
166 <p>This sample document, written in document-v13 XML can be presented
167 via Forrest in a number of different formats. The links in the
168 following list show this document in each of the currently available
171 <p>Each of the formats can be made available as a link near the top of
172 the page. Actual placement of those links depends on the skin
173 currently in use. Those links are enabled in the skinconf.xml via the
174 <disable-XXX-link> elements in the skinconf.xml</p>
178 <th>Presentation Format</th>
182 <th>skinconf.xml Element</th>
186 <td><link href="document-v13.html">HTML</link></td>
188 <td>This document in HTML format. </td>
190 <td>Always generated by default. Cannot be turned off.</td>
194 <td><link href="document-v13.xml">XML</link></td>
196 <td>This document in its raw XML format.</td>
198 <td><disable-xml-link>. By default, set to true, meaning
199 that this link will not be shown.</td>
203 <td><link href="document-v13.pdf">PDF</link></td>
205 <td>This document as Adobe PDF</td>
207 <td><disable-pdf-link>. By default, set to false, meaning
208 that this link will be shown.</td>
214 <td><p>This document as straight text.</p>
215 <p>For additional information see the Forrest text-output
218 <td><disable-txt-link>. By default, set to true, meaning
219 that this link will not be shown.</td>
225 <td><p>This document as Perl POD (Plain Old Documentation). Text
226 with minimal formatting directives. If on a *nix system with perl
227 installed, see "man perlpod".</p>
228 <p>For additional information see the Forrest pod-output
231 <td><disable-pod-link>. By default, set to true, meaning
232 that this link will not be shown.</td>
236 <section id="section">
237 <title>Using sections</title>
238 <p>You can use sections to put some structure in your document. For some
239 strange historical reason, the section title is an attribute of the
240 <code><section></code> element.</p>
242 <section id="sub-section">
243 <title>Sections, the sequel</title>
244 <p>Just some second section.</p>
245 <section id="sub-sub-section">
246 <title>Section 2.1</title>
247 <p>Which contains a subsection (2.1).</p>
251 <section id="source">
252 <title>Showing preformatted source code</title>
253 <p>Enough about these sections. Let's have a look at more interesting
254 elements, <code><source></code> for instance:</p>
256 // This example is from the book _Java in a Nutshell_ by David Flanagan.
257 // Written by David Flanagan. Copyright (c) 1996 O'Reilly & Associates.
258 // You may study, use, modify, and distribute this example for any purpose.
259 // This example is provided WITHOUT WARRANTY either expressed or implied.
261 import java.applet.*; // Don't forget these import statements!
264 public class FirstApplet extends Applet {
265 // This method displays the applet.
266 // The Graphics class is how you do all drawing in Java.
267 public void paint(Graphics g) {
268 g.drawString("Hello World", 25, 50);
271 <p>CDATA sections are used within
272 <code><source></code> elements so that you can write pointy
273 brackets without needing to escape them with messy
274 <code>&lt;</code> entities ...
281 <p>Please take care to still use a sensible line-length within your
286 <title>Using tables</title>
287 <p>And now for a table:</p>
289 <caption>Table caption</caption>
291 <th>heading cell 1</th>
292 <th>heading cell 2</th>
293 <th>heading cell 3</th>
297 <td colspan="2">this data cell spans two columns</td>
301 Tables can be nested:
316 <ul><li>and can include most other elements</li><li>such as lists</li></ul>
322 <anchor id="second-figure-anchor"/>
323 <section id="figure">
324 <title>Using figures</title>
325 <p>And a <code><figure></code> to end all of this.
326 Note that this can also be implemented with an
327 <code><img></code> element.
329 <figure src="../images/project.png" alt="The fine Forrest logo" width="220" height="65"/>
333 <section id="changes">
334 <title>DTD changes</title>
336 <!-- FOR-321 workaround
337 <link href="ext:dtd-docs">DTD reference documentation</link>.
339 <link href="http://forrest.apache.org/docs/dtd-docs.html">DTD reference documentation</link>.
341 <section id="changes-13">
342 <title>Changes since document-v12</title>
344 All v1.2 docs will work fine as v1.3 DTD. The main change is the
345 addition of a @class attribute to every element, which enables the
346 "extra-css" section in the skinconf to be put to good use.
349 <section id="changes-12">
350 <title>Changes since document-v11</title>
352 doc-v12 enhances doc-v11 by relaxing various restrictions that were
353 found to be unnecessary.
357 Links ((link|jump|fork) and inline elements (br|img|icon|acronym) are
358 allowed inside title.
361 Paragraphs (p|source|note|warning|fixme), table and figure|anchor are
365 Paragraphs (p|source|note|warning|fixme), lists (ol|ul|dl), table,
366 figure|anchor are allowed inside definition lists (dd) and tables (td
371 (strong|em|code|sub|sup|br|img|icon|acronym|link|jump|fork) is
372 allowed in strong and em.
379 <legal>This is a legal notice, so it is <strong>important</strong>.</legal>