Project Guidelines

Dag-Erling Smørgrav

January 19th, 2002

Table of Contents

1. Introduction
2. General guidelines
2.1. English style
2.2. XML style
3. Source code
3.1. Language
3.2. Coding style
4. Internal documentation
5. External documentation
6. Project web site

This article describes the Convention Database project's guidelines and standards for source code and documentation.

This document is a work in progress!

All human-written XML documents shall be encoded in ISO-8859-1 and have complete XML and document-type declarations. If the document uses untypable characters (such as © or —), the corresponding XHTML entities should be imported into the document as shown below:

<?xml version="1.0" encoding="iso-8859-1"?>
  "" [
  <!ENTITY % HTMLlat1
    PUBLIC "-//W3C//ENTITIES Latin 1 for XHTML//EN"
  <!ENTITY % HTMLspecial
    PUBLIC "-//W3C//ENTITIES Special for XHTML//EN"
  <!ENTITY % HTMLsymbol
    PUBLIC "-//W3C//ENTITIES Symbols for XHTML//EN"

Note that long tags are wrapped, and the continuation lines are intented two spaces to the right of the opening angle bracket.

The header shall be followed by an XML comment including a copyright declaration and the RCS Id string:

   - Copyright (c) 2002 The Glasgow Worldcon 2005.  All rights reserved.
   - $Id$

Element and attribute names shall be written in lower-case. Elements shall begin one line below and two spaces to the right of their parent element. Elements that contain text nodes (other than ignorable whitespace) shall be block-formatted, with the fill column set to 70. Important logical blocks such as sections, paragraphs and list items shall be separated from their siblings by a single blank line.

    <pubdate>January 19th, 2002</pubdate>
    <title>Sample Article</title>
      <holder>The Glasgow Worldcon 2005</holder>

  <section id="section">
    <title id="section.title">A section</title>

    <para>A paragraph.</para>

    <para>Another paragraph with a link to <link

  <section id="othersection">
    <title id="othersection.title">Another

    <para>Lorem ipsum dolor sit amet, consectetuer adipiscing elit,
      sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna
      aliquam erat volutpat.</para>

Machine-generated XML documents that are intended for web publication shall follow the same rules as human-written documents. Other machine-generated XML documents shall be encoded in UTF-8, and contain as little whitespace as possible in order to conserve memory, storage space and bandwidth.

The source code for all deployed systems shall be fully annotated with Javadoc comments conforming to the conventions outlined in [Javadoc].

External documentation (whitepapers, manuals and the like) is maintained in a separate doc directory in the CVS tree. All external documentation shall be written in DocBook XSL (DTD version 4.1.2 or newer, stylesheet version 1.48 or newer).

Efforts shall be made to avoid deprecated constructs such as <artheader> (use <articleinfo> ) and <sectN> (use <section> .)

The authoritative DocBook reference is [Walsh1999], which is also available online [DocBook].

The project's web pages are maintained in a separate www directory in the CVS tree. All HTML documents must be valid XHTML 1.0 Transitional.



[Walsh1999] Norman Walsh and Leonard Muellner. Copyright © 1999 O'Reilly & Associates, Inc.. 1-56592-580-7. O'Reilly & Associates, Inc.. DocBook: The Definitive Guide .