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.

doc.xml 10KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. Licensed to the Apache Software Foundation (ASF) under one or more
  4. contributor license agreements. See the NOTICE file distributed with
  5. this work for additional information regarding copyright ownership.
  6. The ASF licenses this file to You under the Apache License, Version 2.0
  7. (the "License"); you may not use this file except in compliance with
  8. the License. You may obtain a copy of the License at
  9. http://www.apache.org/licenses/LICENSE-2.0
  10. Unless required by applicable law or agreed to in writing, software
  11. distributed under the License is distributed on an "AS IS" BASIS,
  12. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. See the License for the specific language governing permissions and
  14. limitations under the License.
  15. -->
  16. <!-- $Id$ -->
  17. <!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "http://forrest.apache.org/dtd/document-v13.dtd">
  18. <document>
  19. <header>
  20. <title>FOP Development: Managing Documentation</title>
  21. <version>$Revision$</version>
  22. </header>
  23. <body>
  24. <section id="general">
  25. <title>General Information</title>
  26. <p>All raw documentation content is managed in the FOP SVN repository.
  27. Updates should be committed to the repository, then the repository files are used to generate usable output.
  28. The remaining discussions on this page assume that the SVN repository is the starting place for processing.
  29. The path to the documentation is src/documentation/content/xdocs.</p>
  30. <note>All documentation is maintained on the trunk.
  31. Although we are currently maintaining two sets of code (trunk and maintenance), there is only one set of documentation.
  32. Most of the user and developer doc is common to the two environments, and differences are highlighted where necessary.
  33. The major exception to this rule is the design doc, which currently exclusively pertains to the trunk (redesign).
  34. Maintenance branch releases either copy the trunk content to the maintenance branch or use the trunk content directly for doc builds.</note>
  35. <p>Basic documents are stored in XML files, and use DTDs provided by Apache Forrest.</p>
  36. </section>
  37. <section id="design">
  38. <title>Design Principles</title>
  39. <p>These principles are not written in stone, but reflect the current philosophy, and are documented here primarily to help achieve consistency. These principles should be changed if better or more practical ones are found, but they should probably be discussed and changed by common consent.</p>
  40. <section id="where">
  41. <title>Where</title>
  42. <ul>
  43. <li>To the extent possible, keep user content separate from developer content, primarily so the user doesn't have to filter out technical information.</li>
  44. <li>To the extent possible, try to document a topic exactly once, in the place the user is most likely to look for it, then link to that from other locations as appropriate. This is somewhat contrary to the principle above, which should be applied as a higher priority.</li>
  45. </ul>
  46. </section>
  47. <section id="design-when">
  48. <title>When</title>
  49. <p>The documentation and the product are in a constant state of change, and there is some difficulty in deciding what product state the website content should reflect. The current thinking is that the website should reflect the current state of the repository code branch from which releases are made. Features or other documentation that applies to unreleased code should be marked in such a way within the content that the user can determine whether and how it applies to the version they are using. For example, "Feature xyz is first available in Release n.nn.n".</p>
  50. <p>Other approaches were considered, but all seemed to have significantly higher costs both to the users and the developers. From the user's standpoint, the choice is either that they potentially have to look multiple places to get the information they need (which was rejected), or they have to filter out an occasional feature that is in code available subsequent to their release (which was accepted).</p>
  51. </section>
  52. </section>
  53. <section id="web">
  54. <title>Website</title>
  55. <section id="web-background">
  56. <title>Background</title>
  57. <p>The FOP web site and documentation are generated using <link href="http://forrest.apache.org">Apache Forrest</link>.</p>
  58. <p>The following table summarizes the flow of data to the FOP website in chronological order:</p>
  59. <table>
  60. <tr>
  61. <th>Process</th>
  62. <th>Output</th>
  63. <th>State</th>
  64. <th>View(s)</th>
  65. </tr>
  66. <tr>
  67. <td>Developer commits code to FOP repository.</td>
  68. <td>FOP repository (SVN)</td>
  69. <td>Raw XML and other content</td>
  70. <td><link href="http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/documentation/content/xdocs/">in SVN</link></td>
  71. </tr>
  72. <tr>
  73. <td>Developer builds and uploads documentation using ForrestBot.</td>
  74. <td>/www/xmlgraphics.apache.org/fop on people.apache.org</td>
  75. <td>sync-ready</td>
  76. <td>n/a</td>
  77. </tr>
  78. <tr>
  79. <td>Cron job runs rsync to synchronize the website with the real web server (runs every few hours).</td>
  80. <td>Infrastructure knows. :-)</td>
  81. <td>web-ready</td>
  82. <td><link href="http://xmlgraphics.apache.org/fop">FOP Web Site</link></td>
  83. </tr>
  84. </table>
  85. <note>Server-side ForrestBot is currently not available for website publishing. We use it locally and with manual invocation.</note>
  86. </section>
  87. <section id="web-forrestbot-publish">
  88. <title>ForrestBot "publish" Step-by-Step</title>
  89. <p>
  90. We're using ForrestBot for build and deploy the FOP website. ForrestBot comes with Apache Forrest 0.7.
  91. The root directory of your FOP checkout contains the file "publish.xml" which is an Ant build file
  92. that manages the build and the deployment of the FOP website. Please look into this file for
  93. further instructions to set up ForrestBot on your machine. Basically, we're simply running ForrestBot
  94. manually by typing "ant -f publish.xml" once we're happy with our changes to the site.
  95. Step-by-step instructions for the deployment process again:
  96. </p>
  97. <note>
  98. Please make sure you use Forrest from the Trunk (revision 632959 or later) for the time being. You will need
  99. to download it directly from SVN:
  100. <link href="http://svn.apache.org/repos/asf/forrest/trunk">http://svn.apache.org/repos/asf/forrest/trunk</link>
  101. </note>
  102. <ul>
  103. <li>Modify the sources of the website and check locally with Forrest (run "forrest run" or just "forrest").</li>
  104. <li>
  105. Once you're satisfied, run "ant -f publish.xml" to do a clean build of the website. If the build
  106. runs without problems, the website will be uploaded as a whole using SVN to the
  107. <link href="https://svn.apache.org/repos/asf/xmlgraphics/site/deploy/fop/">website staging directory in SVN</link>.
  108. </li>
  109. <li>
  110. Then log into people.apache.org using SSH, go to the /www/xmlgraphics.apache.org
  111. directory and run "svn up".
  112. </li>
  113. <li>
  114. Wait for the next rsync cycle and check your changes in the live site.
  115. (Sorry, no manual rsync available ATM)
  116. </li>
  117. </ul>
  118. <p>
  119. The reason for putting the generated website in the SVN repository: The infrastructure
  120. people want to be able to restore the websites themselves in case of a crash.
  121. </p>
  122. </section>
  123. <section id="web-local-forrest">
  124. <title>Using a Local Forrest</title>
  125. <p>To use a local Forrest (during website development, not for deployment):</p>
  126. <ul>
  127. <li><link href="http://forrest.apache.org/mirrors.cgi#closest">download</link> latest the Forrest release (currently Forrest 0.7)</li>
  128. <li>set environment variable FORREST_HOME=~/apache-forrest-0.7 where ~ is the directory where Forrest is installed
  129. (see <link href="http://forrest.apache.org/docs/your-project.html">http://forrest.apache.org/docs/your-project.html</link> for details)</li>
  130. <li>set environment variable PATH=$PATH:$FORREST_HOME/bin</li>
  131. <li>cd to your local FOP checkout</li>
  132. <li>update your local FOP checkout (svn update)</li>
  133. <li>run forrest(.bat), which will build the web-site documents in xml-fop/build/site.</li>
  134. </ul>
  135. <note>
  136. You can use "forrest run" to start a local web server. That improves development speed as you
  137. can simply refresh in the browser after a change.
  138. </note>
  139. </section>
  140. <section id="distribution">
  141. <title>Updating Distribution Files</title>
  142. <p>
  143. The Apache distribution system mirrors distributions around the world. Since it uses
  144. <link href="http://httpd.apache.org/">Apache httpd</link> Module
  145. <link href="http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#headername">mod_autoindex</link>
  146. you also need to manually update the HEADER.html &amp; READER.html files on
  147. <code>people.apache.org</code> in
  148. <code>/www/www.apache.org/dist/xmlgraphics/fop/</code>.
  149. </p>
  150. <p>
  151. Please be careful when doing stuff like that.
  152. </p>
  153. </section>
  154. <section id="delete">
  155. <title>Deleting Documentation Files</title>
  156. <p>
  157. ForrestBot simply uploads the whole generated site. It doesn't delete obsolete files. You
  158. can do that manually in the /www/xmlgraphics.apache.org/fop folder on cvs.apache.org. Be careful
  159. when doing stuff like that.
  160. </p>
  161. <note>
  162. Please make sure you always have <strong>group rw permissions on all files</strong> under the /www directory!
  163. </note>
  164. </section>
  165. </section>
  166. </body>
  167. </document>