<?xml version="1.0" encoding="UTF-8"?>

<!--
  - Licensed to the Apache Software Foundation (ASF) under one or more
  - contributor license agreements.  See the NOTICE file distributed with
  - this work for additional information regarding copyright ownership.
  - The ASF licenses this file to You under the Apache License, Version 2.0
  - (the "License"); you may not use this file except in compliance with
  - the License.  You may obtain a copy of the License at
  -
  -     http://www.apache.org/licenses/LICENSE-2.0
  -
  - Unless required by applicable law or agreed to in writing, software
  - distributed under the License is distributed on an "AS IS" BASIS,
  - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  - See the License for the specific language governing permissions and
  - limitations under the License.
  -
  - $Id$
  -->

<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.3//EN" "document-v13.dtd">

<!--
  - Version: $Revision$ $Date$
  - Author: Vladimir R. Bossicard (vladimir@apache.org)
  -->
<document>
  <header>
    <title>Documentation: How to contribute</title>
    <version>$Revision$</version>
    <authors>
      <person name="Vladimir R. Bossicard" email="vladimir@apache.org"/>
      <person name="Vadim Gritsenko" email="vgritsenko@apache.org"/>
    </authors>
  </header>

  <body>
    <section>
      <title>General rules</title>
      <p>
        Writing the documentation is a team effort so let's first set some
        basic rules to prevent a mess:
      </p>

      <ul>
        <li>Keep consistent indentation!</li>
        <li>
          If you write a complete document or participate substantially to one,
          please add your name to the <code>&lt;header&gt;&lt;authors&gt;</code>
          list.
        </li>
        <li>
          If you only contribute partially to the document (correcting errors),
          please add your name to the <code>Author:</code> list.
        </li>
      </ul>

      <note>
        If you know an Open Source XML beautifier that can be used in our build
        process, please drop <link href="mailto:vladimir@apache.org">me</link>
        a line!
      </note>
    </section>

    <section>
      <title>Using Forrest</title>

      <p>
        The Xindice website and documentation are generated using the <link
        href="http://xml.apache.org/forrest">Forrest</link> tool (currently,
        it s built using upcoming Forrest 0.8 version). If you are new to
        Forrest, please read the <link
        href="http://xml.apache.org/forrest/your-project.html">Using
        Forrest</link> guide to get you started. After you install Forrest,
        you can start editing Xindice documentation by following these simple
        steps:
      </p>

      <ul>
        <li>
          Start Forrest up by invoking <code>forrest run</code> from the
          xml-xindice repository.
        </li>

        <li>
          Forrest automatically loads required plugins, prepares
          <code>build/tmp</code> and <code>build/webapp</code> directories,
          and starts web application serving contents of
          <code>src/documentation/content/xdocs</code> files as a live
          website. Once Forrest starts everything up, you will see lines similar to:
          <source>
  22:50:44.242 EVENT  Apache Cocoon 2.2.0-dev is up and ready.
  22:50:44.246 EVENT  Started SocketListener on 0.0.0.0:8888
  22:50:44.246 EVENT  Started org.mortbay.jetty.Server@42a80d
          </source>
        </li>

        <li>
          Now you can open up <link href="http://localhost:8888">localhost:8888</link>
          and edit the source from the <code>src/documentation/content/xdocs</code>
          folder.
        </li>
      </ul>

      <p>
        Have fun!
      </p>

    </section>
  </body>
</document>
