forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject cvs commit: xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/subdir book-sample.xml index.xml
Date Sat, 19 Jul 2003 11:12:24 GMT
jefft       2003/07/19 04:12:24

  Modified:    src/resources/fresh-site/src/documentation/content/xdocs
                        site.xml tabs.xml
  Added:       src/resources/fresh-site/src/documentation/content/xdocs/samples
                        ehtml-sample.ehtml faq.xml ihtml-sample.ihtml
                        sample.xml sample2.xml wiki-sample.cwiki
                        book-sample.xml index.xml
  Removed:     src/resources/fresh-site/src/documentation/content/xdocs
                        book-sample.xml ehtml-sample.ehtml faq.xml
                        ihtml-sample.ihtml sample.xml sample2.xml
                        book-sample.xml index.xml
  - Make root directory of sample site less cluttered.  All samples are now in
    samples/ directory
  - Use @tab menu system
  Revision  Changes    Path
  1.15      +10 -7     xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/site.xml
  Index: site.xml
  RCS file: /home/cvs/xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- site.xml	26 Apr 2003 12:23:14 -0000	1.14
  +++ site.xml	19 Jul 2003 11:12:23 -0000	1.15
  @@ -14,10 +14,15 @@
   See for more info
  -<site label="MyProj" href="" xmlns="">
  +<site label="MyProj" href="" xmlns="" tab="">
     <about label="About">
       <index label="Index" href="index.html"/>
  +    <changes label="Changes" href="changes.html"/>
  +    <todo label="Todo" href="todo.html"/>
  +  </about>
  +  <samples label="Samples" href="samples/" tab="samples">
       <sample label="Sample page" href="sample.html">
         <top href="#top"/>
         <section href="#section"/>
  @@ -27,13 +32,11 @@
       <sample-ihtml label="Sample ihtml page" href="ihtml-sample.html"/>
       <sample-ehtml label="Sample ehtml page" href="ehtml-sample.html"/>
       <faq label="FAQ" href="faq.html"/>
  -    <changes label="Changes" href="changes.html"/>
  -    <todo label="Todo" href="todo.html"/>
  -  </about>
  +    <subdir label="Subdir" href="subdir/">
  +      <index label="Index" href="index.html"/>
  +    </subdir>
  +  </samples>
  -  <subdir label="Subdir" href="subdir/">
  -    <index label="Index" href="index.html"/>
  -  </subdir>
       < href="">
  1.4       +3 -1      xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/tabs.xml
  Index: tabs.xml
  RCS file: /home/cvs/xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/tabs.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- tabs.xml	9 May 2003 03:16:43 -0000	1.3
  +++ tabs.xml	19 Jul 2003 11:12:23 -0000	1.4
  @@ -11,9 +11,11 @@
       @indexfile gets appended to @dir if the tab is selected. Defaults to 'index.html'
       @href is not modified unless it is root-relative and obviously specifies a
       directory (ends in '/'), in which case /index.html will be added
  +    If @id's are present, site.xml entries with a matching @tab will be in that tab.
  -  <tab label="Home" dir="" indexfile="index.html"/>
  +  <tab id="" label="Home" dir="" indexfile="index.html"/>
  +  <tab id="samples" label="Samples" dir="samples" indexfile="sample.html"/>
     <!-- Add new tabs here, eg:
     <tab label="How-Tos" dir="community/howto/"/>
     <tab label="XML Site" dir="xml-site/"/>
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/ehtml-sample.ehtml
  Index: ehtml-sample.ehtml
  <?xml version="1.0"?>
    <!-- Note: no head element or external CSS refs.  Elements outside the body are ignored
      <h1>Sample HTML page</h1>
        This HTML page body is copied across directly from
        <tt>src/documentation/content/xdocs</tt>. Only the menus and tabs are
        by Forrest.
        Using raw HTML like this is not recommended, because the advantages of
        separating content from presentation are lost.  In particular, Forrest
        can't generate PDFs of this page.
        Still, there are many cases when the Forrest DTD isn't sufficient, such as
        when you want to embed applets, <a href="javascript:alert('Opened with        
        <table cellpadding="5">
          <tr bgcolor="#aaffff">
                  <td bgcolor="#ffffaa">within</td>
                  <td bgcolor="ffaaff">tables</td>
        HTML Forms:
          <select name="skin">
            <option value="krysalis-site">krysalis-site</option>
            <option value="forrest-site">forrest-site</option>
          <input type="submit" value="Change Skin (temporarily, in the webapp)"/>
        and other HTML <blink>delights</blink>
        You can still take advantage of Forrest's <a href="">site:
linking</a>, eg
        <a href="site:index">&lt;a href="site:index"&gt;</a>
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/faq.xml
  Index: faq.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE faqs PUBLIC "-//APACHE//DTD FAQ V1.2//EN" "dtd/faq-v12.dtd">
  <faqs title="Frequently Asked Questions">
    <part id="docs">
      <faq id="forrest">
          How can I help write documentation?
            This project uses <link href="ext:forrest">Apache Forrest</link> to
            generate documentation from XML.  Please download a copy of Forrest,
            which can be used to <link
              href="ext:forrest/validation">validate</link>, <link
              href="ext:forrest/webapp">develop</link> and render a project site.
      <!-- More faqs or parts here -->
    <!-- More faqs or parts here -->
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/ihtml-sample.ihtml
  Index: ihtml-sample.ihtml
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  <h1>Test iHTML page</h1>
  <p> 		This HTML is used to render the page instead of using the Forrest
  XML DTD directly.</p>
  <p>All linked-to pages, like <a href="../test2.html">this one</a>, are
  		also available. 		</p>
  <hr> 		[<a href="index.html">Index</a>] 	
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/sample.xml
  Index: sample.xml
  <?xml version="1.0"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd">
      <title>The document-v1.2 DTD</title> 
      <authors><person name="Jeff Turner" email=""/> 
      <notice>This document doesn't make any sense at all.</notice> 
      <abstract>A nonsense document using all possible elements in the current
        <title>Sample Content</title>
        <p>This is a simple paragraph. Most documents contain a fair amount of
          paragraphs. Paragraphs are called <code>&lt;p&gt;</code>.</p>

        <p xml:space="preserve"
          >With the <code>&lt;p xml:space="preserve"&gt;</code> attribute,
you can declare
          that whitespace should    be   preserved, without implying it is in any other
          way special.</p>
        <p>A number of in-line elements are available in the DTD, we will show them
          inside an unordered list (<code>&lt;ul&gt;</code>):</p>

          <li>Here is a simple list item (<code>&lt;li&gt;</code>).</li>

          <li>Have you seen the use of the <code>&lt;code&gt;</code>
element in the
            previous item?</li> 
          <li>Also, we have <code>&lt;sub&gt;</code> and <code>&lt;sup&gt;</code>
            elements to show content <sup>above</sup> or <sub>below</sub>
the text
          <li>There is a facility to <em>emphasize</em> certain words using
            <code>&lt;em&gt;</code> <strong><code>&lt;strong&gt;</code></strong>
          <li>We can use
            <icon height="22" width="26" src="images/icon.png" alt="feather"/>
            <code>&lt;icon&gt;</code>s, too.</li> 
          <li>Another possibility is the <code>&lt;img&gt;</code>
            <img src="images/icon.png" alt="another feather" height="22" width="26"/>,
            which offers the ability to refer to an image map.</li> 
          <li>We have elements for hyperlinking: 
              <dt><code>&lt;link href="faq.html"&gt;</code></dt>

              <dd>Use this to
                <link href="faq.html" title="Example of a document via link">link</link>
                to another document. As per normal, this will open the new document
                in the same browser window.</dd> 
              <dt><code>&lt;link href="#section"&gt;</code></dt>

              <dd>Use this to
                <link href="#section" title="Example of a document via local anchor">link</link>
                to the named anchor in the current document.
              <dt><code>&lt;link href="faq.html#forrest"&gt;</code></dt>

              <dd>Use this to
                <link href="faq.html#forrest" title="Example of a document via link and
                to another document and go to the named anchor. This will open
                the new document in the same browser window.
              <dt><code>&lt;jump href="faq.html"&gt;</code></dt>

              <dd>Use this to
                <jump href="faq.html" title="Example of a document via jump">jump</jump>
                to another document and optionally go to a named
                <jump href="faq.html#forrest" title="Example of a document via jump to
                within that document. This will open the new document in the same
                browser window. So what is the difference between link and jump?
                The jump behaves differently, in that it will replace any frames
                in the current window.
                This is the equivalent of
                <code>&lt;a ... target="_top"&gt;</code>
              <dt><code>&lt;fork href="faq.html"&gt;</code></dt>

              <dd>Use this to
                <fork href="faq.html" title="Example of a document via fork">fork</fork>
                your webbrowser to another document. This will open the document
                in a new, unnamed browser window.
                This is the equivalent of
                <code>&lt;a ... target="_blank"&gt;</code>
          <li>Oh, by the way, a definition list <code>&lt;dl&gt;</code>
was used inside
            the previous list item. We could put another 
              <li>unordered list</li> 
              <li>inside the list item</li> 
              <caption>A sample nested table</caption>
              <tr><td>Or even tables.. </td><td>
                  <table><tr><td>inside tables..</td></tr></table>
              <tr><td>or inside lists, but I believe this liberty gets quickly
                  hairy as you see.</td></tr>
        <p>So far for the in-line elements, let's look at some paragraph-level
        <fixme author="SN">The <code>&lt;fixme&gt;</code> element
is used for stuff
          which still needs work. Mind the <code>author</code> attribute!</fixme>

        <note>Use the <code>&lt;note&gt;</code> element to draw
attention to something, e.g. ...The <code>&lt;code&gt;</code> element
is used when the author can't
          express himself clearly using normal sentences ;-)</note>
        <warning>Sleep deprivation can be the result of being involved in an open
          source project. (a.k.a. the <code>&lt;warning&gt;</code> element).</warning>

        <p>Apart from unordered lists, we have ordered lists too, of course.</p>

          <li>Item 1</li> 
          <li>Item 2</li> 
          <li>This should be 3 if my math is still OK.</li> 
        <anchor id="section"/>
          <title>Using sections</title>
          <p>You can use sections to put some structure in your document. For some
            strange historical reason, the section title is an attribute of the
            <code>&lt;section&gt;</code> element.</p> 
          <title>Sections, the sequel</title>
          <p>Just some second section.</p> 
            <title>Section 2.1</title>
            <p>Which contains a subsection (2.1).</p> 
        <anchor id="source"/>
          <title>Showing preformatted source code</title> 
          <p>Enough about these sections. Let's have a look at more interesting
            elements, <code>&lt;source&gt;</code> for instance:</p>

          <source>// This example is from the book _Java in a Nutshell_ by David Flanagan.
            // Written by David Flanagan.  Copyright (c) 1996 O'Reilly &amp; Associates.
            // You may study, use, modify, and distribute this example for any purpose.
            // This example is provided WITHOUT WARRANTY either expressed or implied.
            import java.applet.*;    // Don't forget these import statements!
            import java.awt.*;
            public class FirstApplet extends Applet {
            // This method displays the applet.
            // The Graphics class is how you do all drawing in Java.
            public void paint(Graphics g) {
            g.drawString("Hello World", 25, 50);
          <p>Please take care to still use a sensible line-length within your
            source elements.</p>
        <section id="table">
          <title>Using tables</title>
          <p>And now for a table:</p>
            <caption>Table caption</caption> 
              <th>heading cell</th> 
              <th>heading cell</th> 
              <td>data cell</td> 
              <td>data cell</td> 
          <p>Not much of attributes with <code>&lt;table&gt;</code>,
if you ask me.</p>
        <anchor id="second-figure-anchor"/>
        <section id="figure"> 
          <title>Using figures</title>
          <p>And a figure to end all of this.</p>
          <figure src="images/project-logo.gif" alt="project logo" width="220" height="65"/>
        <title>Changes since <link href="site:document-v11">document-v11</link></title>
          doc-v12 enhances doc-v11 by relaxing various restrictions that were
          found to be unnecessary.
            Links ((link|jump|fork) and inline elements (br|img|icon|acronym) are
            allowed inside title.
            Paragraphs (p|source|note|warning|fixme), table and figure|anchor are
            allowed inside li.
            Paragraphs (p|source|note|warning|fixme), lists (ol|ul|dl), table,
            figure|anchor are allowed inside definition lists (dd) and tables (td
            and dh).
              Inline content
              (strong|em|code|sub|sup|br|img|icon|acronym|link|jump|fork) is
              allowed in strong and em.
      <legal>© 2002 Apache Forrest</legal> 
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/sample2.xml
  Index: sample2.xml
  <?xml version="1.0"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd">
      <title>More samples</title> 
      <authors><person name="Steven Noels" email=""/> 
          You can include raw HTML, PDFs, plain-text, and other files in Forrest
          output by placing them in <code>src/documentation/content</code> and
          they will be copied over automatically. You can then link to them as
          normal, e.g.
          <link href="../hello.pdf">&lt;link href="hello.pdf"/&gt;</link>
          <link href="../test1.html">&lt;link href="test1.html/&gt;</link>
          You can also have sub-directories such as 
          <code>src/documentation/content/connectors</code> which reflects your
          <code>xdocs/connectors</code> tree. The raw files will then end up
          beside your documents.
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/wiki-sample.cwiki
  Index: wiki-sample.cwiki
  !!!Forrest's Wiki Support
  Forrest now has partial support for documentation in Wiki format, thanks to the
  [Chaperon parser|]. Wiki is a simple text format that can
  be learned in minutes. This page provides an overview of the syntax that
  Forrest supports, namely a subset of that used by the [Cocoon
  !Quick reference
  ----       = Make a horizontal ruler. Extra '-' is ignored.
  \\         = force a line break, \\\=force line break and clear.
  [link]     = creates a hyperlink to an internal WikiPage called 'Link'.
  [this is also a link] = creates a hyperlink to an internal WikiPage called
  [click here|link] = creates a hyperlink to an internal WikiPage called
  'Link', but displays the text 'click here' to the
  user instead of 'Link'.
  [1]        = Makes a reference to a footnote numbered 1.
  [#1]       = Marks the footnote number 1.
  [[link]    = creates text '[link]'.
  !heading   = small heading with text 'heading'
  !!heading  = medium heading with text 'heading'
  !!!heading = large heading with text 'heading'
  ''text''   = prints 'text' in italic.
  __text__   = prints 'text' in bold.
  {{text}}   = prints 'text' in monospaced font.
  * text     = makes a bulleted list item with 'text'
  # text     = makes a numbered list item with 'text'
  ;term:ex   = makes a definition for 'term' with the explanation 'ex'
  !Writing text
  You don't need to know anything about the Wiki text formatting rules to use
  Wiki.  Just write normal text, and then use an empty line to mark a paragraph.
  It's just like writing an email.
  The link can also be a direct URL starting with http:, ftp:, mailto:, https:, or news:,
in which case the link points to
  an external entity. For example, to point at the home page, use [[],
which becomes
  [] or [[Java home page|], which becomes [Java home
  To add a new page you just create a link to it from somewhere else. After all, there isn't
much point in having a page
  if you can't access it! You'll then see a small question mark after the page name when you
return to that page. Then
  click on it and you have created a new page!
  It's allowed to use almost any kind of characters inside a [[WikiName], as long
  as they are letters or numbers.
  Note also that this Wiki can be configured to support standard CamelCase linking (if it's
supported, the word CamelCase
  should be a link).  It's off by default, but if your friendly administrator has turned it
on, then well, CamelCase all
  you want =).
  !Adding pictures
  For security reasons uploading images is not permitted, but you can embed
  any image in the wiki code by putting the image available somewhere on the web in one of
the allowed formats, and then
  just linking to it.
  For example, this is an inlined PNG image: [].
  If you specify a link text ([[this one here|]) it becomes
  the ALT text for those who either can't or don't want to view images.
  !Bulleted lists
  Use an asterisk (*) in the first column to make bulleted lists. Use more asterisks for deeper
indentation. For example:
  * One
  * Two
  * Three
  ** Three.One
  * One
  * Two
  * Three
  ** Three.One
  !Numbered lists
  Just like with bulleted lists, but use a hash (#) instead of the asterisk. Like this:
  # One
  # Two
  # Three
  ## Three.One
  # One
  # Two
  # Three
  ## Three.One
  If you want to write the list item on multiple lines, just add one or more spaces on the
next line and the line will be
  automatically added to the
  previous item.  If this sounds complicated, edit this page for an example, below.
  * This is a single-line item.
  * This is actually a multi-line item.
    We continue the second sentence on a line on a line of its own.
    We might as well do a third line while we're at it...
    Notice, however, as all these sentences get put inside a single item!
  * The third line is again a single-line item for your convinience.
  !Definition lists and comments
  A simple way to make definition lists is to use the ';:' -construct:
  ;__Construct__:''Something you use to do something with''
  Another nice use for the ';:' is that you can use it to comment shortly on other people's
text, by having an empty
  'term' in the definition, like this:
  ;:''Comment here.''
  Which would be seen as
  ;:''Comment here.''
  !Text effects
  You may use __bold__ text or ''italic'' text, by using two underscores (_) and two single
quotes ('), respectively. If
  you're on a Windows computer, make sure that you are using the correct quote sign, as there
is one that looks the same,
  but really isn't.
  !Preformatted text
  If you want to add preformatted text (like code) just use three consecutive braces ({) to
open a block, and three
  consecutive braces (}) to close a block. Edit this page for an example.
  You can do simple tables by using using pipe signs ('|').  Use double pipe
  signs to start the heading of a table, and single pipe signs to then
  write the rows of the table.  End with a line that is not a table.
  For example:
  || Heading 1 || Heading 2
  | ''Gobble'' | Bar
  | [[Main]     | [[SandBox]
  gives you the following table.  Note how you can use links also inside tables.
  || Heading 1 || Heading 2
  | ''Gobble'' | Bar
  | [[Main]     | [[SandBox]
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/subdir/book-sample.xml
  Index: book-sample.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE book PUBLIC "-//APACHE//DTD Cocoon Documentation Book V1.0//EN" "book-cocoon-v10.dtd">
  <!-- Sample book.xml file.  If this file is renamed to 'book.xml', it will be
  used to define the menu in this subdirectory, instead of that generated from
  site.xml. -->
  <book software="MyProj"
    copyright="@year@ The Apache Software Foundation"
    <menu label="About">
      <menu-item label="Index" href="site:index"/>
      <menu-item label="Sample page" href="site:sample"/>
      <menu-item label="Sample ihtml page" href="site:sample-ihtml"/>
      <menu-item label="Sample ehtml page" href="site:sample-ehtml"/>
      <menu-item label="FAQ" href="site:faq"/>
      <menu-item label="Changes" href="site:changes"/>
      <menu-item label="Todo" href="site:todo"/>
    <menu label="Subdir">
      <menu-item label="index" href="site:subdir/index"/>
  1.1                  xml-forrest/src/resources/fresh-site/src/documentation/content/xdocs/samples/subdir/index.xml
  Index: index.xml
  <?xml version="1.0" encoding="UTF-8"?>
  <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.2//EN" "document-v12.dtd">
        <title>Apache Incubator Project</title>
          <person name="Joe Bloggs" email="" />
         <title>A subdirectory</title>
         <p>This was generated from a subdirectory.</p>
         <p>When creating new subdirectories, remember that each <em>must</em>
           have a book.xml file</p>

View raw message