<?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.
-->
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V2.0//EN" "http://forrest.apache.org/dtd/document-v20.dtd">
<document>
  <header>
    <title>Welcome to the org.apache.forrest.plugin.internal.NoteTaking Plugin</title>
  </header>
  <body>
    <section id="overview">
      <title>Apache Forrest - org.apache.forrest.plugin.internal.NoteTaking Plugin</title>
      <p>
        Provides features that facilitate the creation of a study aid package
        with Forrest.
      </p>
      <warning>
        This plugin will only work with a Views enabled site.
      </warning>
      <note>
        This plugin will only work when Forrest is running in dynamic mode.
      </note>
    </section>
    <section>
      <title>Adding a Notes Section</title>
      <p>
        A notes section is provided by a contract called
        <code>content-noteTaking</code>. See the
        <a href="/ls.contracts.project.html">contract documentation</a> for an
        example of how to include this contract in your pages.
      </p>
    </section>
    <section>
      <title>Configuration</title>
      <p>
        As can be seen above, the physical representation of the notes field is
        controlled by the contract definition in your structurer file. In
        addition, There are various non-visual aspects of this plugin can be
        configured by the site designer. The table below lists the properties
        that may be configured and their defaults. To change a property add it
        to your <code>forrest.properties.xml</code> file.
      </p>
      <table>
        <tr>
          <th>Property Name</th>
          <th>Description</th>
          <th>Default</th>
        </tr>
        <tr>
          <td>noteTaking.repository.URL</td>
          <td>The URL of the repository for notes. It should end with a '/'.</td>
          <td>PLUGIN_DIR/src/notes</td>
        </tr>
        <tr>
          <td>noteTaking.filename</td>
          <td>The name of the file that will contain notes.</td>
          <td>notes.xml</td>
        </tr>
      </table>
      <warning>
        Defaults are not currently implemented. They are waiting on
        <a href="http://issues.apache.org/jira/browse/FOR-739">this issue</a>.
        However, the forrest.properties.xml file is present in the plugin
        directory and will should start working once the above issue is
        resolved. In the meantime, projects should define the above properties.
      </warning>
    </section>
    <section>
      <title>Notes File</title>
      <p>
        All notes are kept in a single notes file. This file has the following
        structure:
      </p>
      <source>
<![CDATA[
<notes>
  <path>
    <to>
      <page>
        <pageName>
          <notes>The notes</notes>
        </pageName>
        <anotherPage>
          <notes>Some other notes</notes>
        </anotherPage>
      </page>
    </to>
  </path>
</notes>
      ]]>
      </source>
    </section>
  </body>
</document>
