<?xml version="1.0" encoding="EUC-JP"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY % kent SYSTEM "../../momonga.ent">
%kent;
]>
<article id="index" lang="en">
 <articleinfo>
  <title>&moshort;-Document-HOWTO</title>
  
  <authorgroup>
   <author>
    <othername>Momonga Project</othername>
   </author>
   <author>
    <othername>Kondara Project</othername>
   </author>
  </authorgroup>


    <abstract>
      <para>
A guide how to write &moshort; documents.
      </para>
    </abstract>

    <revhistory>
     <revision>
        <revnumber>0.4</revnumber>
        <date>Mon Mar 5 2004</date>
        <authorinitials>&muradaikan;</authorinitials>
        <revremark>- English translation upto Japanese version 1.11</revremark>
     </revision>
     <revision>
        <revnumber>0.3</revnumber>
        <date>Sun Aug 3 2003</date>
        <authorinitials>&muradaikan;</authorinitials>
        <revremark>- English translation upto Japanese version 1.10</revremark>
      </revision>

<revision>
 <revnumber>0.2</revnumber>
 <date>Mon Jul  8  2002</date>
 <authorinitials>tamo</authorinitials>
 <revremark>- www/docs -&gt; docs
- trivials (see cvs diff. hehehe)
- sorry i didnt see ja-version</revremark>
</revision>
     <revision>
        <revnumber>0.1</revnumber>
        <date>Fri May  8  2002</date>
        <authorinitials>&muradaikan;</authorinitials>
        <revremark>- English translation from Japanese version 0.6.</revremark>
      </revision>

    </revhistory>
  </articleinfo>

  <sect1 id="hajimeni">
    <title>Introduction</title>
    <para>
     &moproject; employs subversion to maintain our web site contents. In doing so, it
allows us to create the most up to date contents at hand and put it on &moproject; web sever.
    </para>

    <para>
    To commit to &moproject; web site contents svn repository, you need to have an account at
&moproject;. So if you would like to contribute to &moproject; web site
publishing, please read <ulink url="http://www.momonga-linux.org/project.html.ja">Participating in Momonga Project</ulink>apply for your account. 
    </para>

    <para>
    The contents of &moproject; web site under http://www.momonga-linux.org/docs/ can be retrieved by command <command>anonymous svn</command>.
    </para>
  </sect1>

 <sect1 id="document_licence_on_mop">
  <title>&moproject; Document License</title>

  <para>
   &moproject; Document License is defined as below.
  </para>

  <sect2 id="licence">
   <title>New Document created at the &moproject;</title>

   <variablelist>

    <varlistentry>
     <term>License</term>
     <listitem>
      <para>
       The distribution license for all the documents created at the &moproject;
       is subject to the Open Publication License (OPL), excluding License
       Option A and B.
      </para>
      <para>
       For details on the OPL, refer to
       <ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>.
       Japanese version of the OPL draft version 1.0 by Mr. Masayuki Hatta is available at
       <ulink url="http://www.opensource.jp/openpub/">http://www.opensource.jp/openpub/</ulink>.
      </para>
     </listitem>
    </varlistentry>
    <varlistentry>
     <term>Author</term>
     <listitem>
      <para>
       The author of the documents created at the &moproject; should be &moproject;
       and the names of the writers for the first version and revisions shall be
       stated in the revision history.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </sect2>

  <sect2 id="ignore_licence">
   <title>Documents created outside the &moproject; </title>

   <para>
    It is the case that an original document exists and the license is defined
    by the original. In such case the priority is given to the original license.
    (Example: translation, etc.)
   </para>
   <para>
    However, the original license may prohibit the &moproject; to manage or revise
    the original document. In such case the &moproject; will not handle the document. For dealing with such document, if we ever come across one, we will draw a conclusion after discussing in the Members Mailing List.
   </para>
  </sect2>
  <sect2 id="indicate_of_licence">
   <title>License Notation</title>

   <sect3 id="under-docsdir">
    <title>Manuals and HOWTOs in www/docs</title>

    <para>
     In order to notate the license on the documents, such as manuals and HOWTOs,
     in www/docs, we add a section, exemption from responsibility and copyright, 
     and stipulate the license there.
    </para>
   <para>
    For a concrete document contents, please refer to <xref linkend="disclaimer_and_copyright"/> in this document. This example is the case for the OPL.
    </para>
   </sect3>
   <sect3 id="in-wwwdir">
    <title>Files other than the above</title>

    <para>
     Add a line to the file as follows:
    </para>

    <programlisting>
     Copyright (c) 2002 Momonga Project. All Rights Reserved.
    </programlisting>

    <para>
     For HTML files, a template is available and recommended to use.
    </para>
   </sect3>
  </sect2>
 </sect1>

  <sect1 id="kankyou">
    <title>Setting up your environment</title>
    <sect2 id="svn">
      <title>svn repository</title>
      <para>
      First, let's start from applying for an account to write documents at 
      &moproject;. Please refer to <ulink url="&mosaba;/project.html.en">
      project.html.en</ulink>.
      </para>
      <para>
      Once you get your account, <command>checkout</command> the contents 
      available from &mosaba;. You will be asked for your passphrase, so 
      enter your passphrase and press Enter key. Then your checkout starts.
        <screen>
$ <command>svn co svn+ssh://<replaceable>your_account</replaceable>@svn.momonga-linux.org/home/snvroot/svnroot_docs/trunk/docs</command>
Enter passphrase for key '/home/hoge/.ssh/id_rsa':
$ <command>svn co svn+ssh://<replaceable>your_account</replaceable>@svn.momonga-linux.org/home/svnroot/svnroot_www/trunk/www</command>
Enter passphrase for key '/home/hoge/.ssh/id_rsa':
       </screen>
<!--
        <note>
          <title>CVS_RSH</title>
          <para>
	  The above command uses rsh to communicate with the server, but on the cvs
server side the port for rsh is closed. So let cvs to use ssh by <command>export
CVS_RSH=ssh</command>.
          </para>
        </note>
-->
      </para>
      <para>
      Or, you can use <command>anonymous svn</command> to checkout the docs contents.
        <screen>
         $ <command>svn co svn://anonsvn.momonga-linux.org/svnroot_docs/trunk</command>
        </screen>
        <note>
          <title>About anonymous svn</title>
	    <para>
	    Using anonymous svn wouldn't let you commit your editing result. 
            Please apply for your own account if you want to commit.
	    </para>
        </note>
      </para>
      <para>
      Doing either of the above operation will create directories, <filename
class="directory">docs</filename> and <filename class="directory">www</filename>,
under the current directory.
      Let's call these directories "docs" and "www" directories from here onwards 
      in this document.
      </para>
    </sect2>

    <sect2 id="conoreidemoaru">
      <title>Required Packages</title>
      <para>
      The following lists packages required to edit &mosaba; contents:
          <programlisting>
          libxml2-devel<co id="libxml2-devel"/>
          libxslt<co id="libxslt"/>
          docbook-style-xsl<co id="stylexsl"/>
          docbook-dtds<co id="dtds"/>
          xml-common<co id="xml-common"/>
          scrollkeeper
          </programlisting>
          <calloutlist>
            <callout arearefs="libxml2-devel">
              <para>
	      Required for documents under www directory.
              </para>
            </callout>
            <callout arearefs="libxslt">
              <para>
	      Required for documents under docs directory.
	      Confirmed to work with libxslt-1.0.5-2k or later version.
              </para>
            </callout>
            <callout arearefs="stylexsl">
              <para>
	      Required for documents under docs directory.
	      Must be docbook-style-xsl-1.45-4k or later version.
              </para>
            </callout>
            <callout arearefs="dtds">
              <para>
	      Necessary for documents under docs directory.
              </para>
            </callout>
            <callout arearefs="xml-common">
              <para>
               Necessary for documents under docs directory.
              </para>
            </callout>
          </calloutlist>
      </para>
      <para>
      &molong; 1.0 or later contains all of these packages ready for use.
      </para>
    </sect2>

    <sect2 id="make">
      <title>Doing make of the contents</title>
      <para>
       Use <filename>Makefile</filename> in both docs and www directory.
      </para>

    <sect3 id="wwwdir">
     <title>www directory</title>

    <para>
     In www directory do 
    </para>
    
    <screen>
     $ <command>make</command>
    </screen>
    <para>
     to create <link linkend="announce">Automatic creation of Documents related to 
     Announcement</link>.
    </para>
   </sect3>
   <sect3 id="docsdir">
    <title>docs directory</title>

    <para>
     A Makefile is not there if you svn checkout docs directory for the first time.
     In docs directory, run a script <filename>autogen.sh</filename> to create a Makefile.
    </para>

    <screen>
      $ <command>./autogen.sh</command>
    </screen>

    <para>
     After that, do <command>make</command>.
     When a new document is added, in order to add the new document entry, run 
     <filename>autogen.sh</filename> and then <command>make</command>.
    </para>
   </sect3>
  </sect2>
 </sect1>

  <sect1 id="www_root">
    <title>Directories other than docs</title>
    <para>
    Directory contents under docs are written in a format called "DocBook"
    and files like <ulink url="&mosaba;/docs/Document-HOWTO/C/index.html">html file 
    that you can see with a browser</ulink> are converted from DocBook to html.
    </para>
    <para>
    About DocBook format we will explain further in <xref linkend="docbook"/>,
    so here we explain other contents that are not covered there.
    </para>
    <sect2 id="announce">
      <title>Documents related to Announcements</title>
      <para>
      Documents related to &mosaba; announcement are the files that are to
      be updated every time &moproject; makes a new announcement. 
      Currently such files are :
        <literallayout>
         announcement.html.en
         announcement.html.ja
         index.html.ja
         index.html.en
         momonga.rdf
        </literallayout>
<!--
        <note>
          <title>Availability in other languages</title>
          <para>
	  Korean(.ko)<footnote><para>Halting progress</para></footnote>,
          Italiano(.lt)<footnote><para>Temporary closed</para></footnote>,
          English(.en)<footnote><para>Slow update</para></footnote>,
          Japanese(.ja)<footnote><para> Practically the Originals</para></footnote>
          </para>
        </note>
-->
      </para>
      <para>
      These documents can be mechanically created once a particular announcement
      content is modified.
        <footnote>
          <para>
	  For example, something like "&molong; 1.0 RC1 is released. 
          Please wait just for a little while until they are mirrored to our ftp 
          mirror servers.".
          </para>
        </footnote>
	 To do so, edit a file <filename>announcement.<replaceable>lang</replaceable></filename> to have an announcement content.
	 From there, related files will be created.
      </para>
      <para>
      Also, parts in each html files that are not directly related to the 
      announcement,
        <footnote>
          <para>
	  For example, a list of "Contents" in <ulink url="&mosaba;/index.html.en">index.html.en</ulink>.
          </para>
        </footnote>
         are contained in <filename>filename.in</filename>.
      </para>
      <para>
      To change layout of a document or add a new contents, please edit .in file.
      </para>
    </sect2>

    <sect2 id="announcement.lang">
      <title>announcement.lang</title>
      <para>
      Here is an explanation of format in
<filename>announcement.<replaceable>lang</replaceable></filename>, which serves
as a source of automatic creation of html files.
        <note>
          <title>filename</title>
           <para>
            Please note that ONLY Japanese filenames, announcement.ja is not used
            but announcement.eucjp is used.
           </para>
        </note>
      </para>
      <para>
       This file is written in xml format. 
       Basically, the part that would need changing is between &lt;item&gt; 
       and &lt;/item&gt;, so we explain only this part here.
      </para>
      <para>
      One item element is for one announcement, so a task adding a new 
      announcement is equal to adding a new item element.
      </para>
      <para>
       Following is a list of tags that you can use within item element.
        <variablelist>
          <varlistentry>
            <term>account</term>
            <listitem>
              <para>
	       To identify the author of the announcement. 
               Write in your account name at &moproject;.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>key</term>
            <listitem>
              <para>
	      Key information to identify the announcement. 
              Write a character line which has only one meaning in the announcement.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>date</term>
            <listitem>
              <para>
	      Date of announcement.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>title</term>
            <listitem>
              <para>
	      Contents of the announcement.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>link</term>
            <listitem>
              <para>
	       URL linked from the announcement.
               It can be omitted and if so, no link will be made.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </para>
      <para>
       For example, here is an entry in an announcement.
        <programlisting>
         &lt;item&gt;
         &lt;account&gt;dora&lt;/account&gt;
         &lt;key&gt;momo1.0rc1&lt;/key&gt;
         &lt;date&gt;2002/07/15&lt;/date&gt;
         &lt;title&gt;&molong; 1.0 RC1 was released. Please wait just for a
         little while until they are mirrored to our ftp mirror servers.&lt;/title&gt;
         &lt;link&gt;announcement/1_0_rc1.html.en&lt;/link&gt;
         &lt;/item&gt;
        </programlisting>
         When a new announcement is added, execute <command>make</command> and
         confirm the desired result is synthesized before you do <command>
         svn commit</command>.
      </para>
    </sect2>

    <sect2 id="futuu">
      <title>Documents other than Announcement related</title>
      <para>
       Files other than announcement related documents under 
       <filename class="directory">docs</filename> are written in ordinary manner.
      </para>
      <para>
       Whether it is html or text, or even if it is pdf or flush, such file 
       should have been created in an appropriate manner to its specification, 
       so edit it like any other file of the type and do <command>svn commit</command>.
      </para>
      <para>
       To add a new html file, it is handy to create one by editing the necessary 
       portion of template.html.{ja,en}.
      </para>
    </sect2>
  </sect1>

  <sect1 id="docbook">
    <title>Files in docbook format</title>
    <para>
     DocBook format documents are stored in directory 
     <filename class="directory">docs</filename> in svn directory.
    </para>
    <para>
     For example, this document is written as 
     <filename>docs/Document-HOWTO/C/Kondara-Doucment-HOWTO.xml</filename>, 
     a DocBook file.
     To modify this document, go to<filename class="directory">docs/Document-HOWTO/C
     </filename> directory, and edit <filename>Doucment-HOWTO.xml</filename>.
    </para>
    <para>
    Documents under this directory is basically xml files written in accordance 
    with XML Document Type Definition (DTD).
    Documents that can be seen on the web site, including this one, are html files 
    created by xsl conversion from xml source files.
    </para>
    <para>
    Details about DocBook itself can be found at:
    <ulink url="http://www.linux.or.jp/JF/JFdocs/docbook-intro/index.html">Practical DocBook Guide for Beginners</ulink> (in Japanese), and
    <ulink url="http://www.linux.or.jp/JF/JFdocs/LDP-Author-Guide/index.html">LDP Author Guide</ulink>
    are available from <ulink url="http://www.linux.or.jp/JF">Linux JF Project</ulink>
    </para>

    <sect2 id="stylesheet">
      <title>DocBook style sheed</title>
      <sect3 id="stylesheet-about">
        <title>What is a style sheet?</title>
        <para>
	This document is stored in 
        <ulink url="../../Document-HOWTO/C/Document-HOWTO.xml">here</ulink> 
        but if you try to see it with a browser, things may not look right.
        </para>
          <!-- すくりーんしょっと 
        <para>
	For example, something like this:
        </para>
          -->
        <para>
         To change it in to <ulink url="../../Document-HOWTO/C/index.html">
         something like this</ulink> you need to use style sheet.
        </para>
        <para>
	 There are dsssl and xslt style sheet that DocBook can use but &moproject; 
         has chosen xslt for its simplicity in maintaing the style sheet.
        </para>

        <para>
         There are style sheet, dsssl and xslt, that you can use with DocBook.
         The &moproject; employed xslt for its simplicity for maintenace.
        </para>
        <para>
	 If an environment that can do xslt conversion is at hand, you can check 
         how it would appear once it is put on &mosaba;. Also errors in creating 
         html files can be avoided by performing a conversion at hand after 
         all the editing is complete.
        </para>
      </sect3>
      <sect3 id="kankyou-2-2">
        <title>Style sheet to use</title>
        <para>
        Style sheet that are actually used at &mosaba; are also maintained by svn 
        and committed as
          <filename>docs/docbook.xsl</filename>
          <filename>docs/onehtml.xsl</filename>
        </para>
        <para>
	 These style sheets are &quot;Drivers&quot; and style sheet itself is 
         included in a package, <filename>docbook-style-xsl-<replaceable>version</replaceable>-<replaceable>release</replaceable>m.noarch.rpm</filename>.
          <footnote>
            <para>
             Here you can take &quot;drivers&quot; as something that call and give 
             certain parameter(s) to the style sheet.
            </para>
          </footnote>
        </para>
      </sect3>
      <sect3 id="kankyou-2-4">
        <title>Try it out</title>
        <para>
         Referring to <xref linkend="docsdir"/>, create a 
         <filename>Makefile</filename>. After doing so, in <filename class="directory">docs</filename> run <command>make</command> command. 
         It will take a while to create all html files converted from xml files.
         If you want to ckeck result of, say, only one .xml file, do 
        <command>make</command> in the directory where the .xml file exist.
        </para>
        <para>
	When it is complete, under each document directory there will be
          <itemizedlist>
            <listitem>
              <para>
               <filename>index.html</filename>
              </para>
            </listitem>
            <listitem>
              <para>
               structured html files for each section that are linked from the 
               <filename>index.html</filename>
              </para>
            </listitem>
            <listitem>
              <para>
               <filename>changelog.html</filename>
              </para>
            </listitem>
            <listitem>
              <para>
               <replaceable>directory name</replaceable>_all.html
              </para>
            </listitem>
            <listitem>
              <para>
               <replaceable>directory name</replaceable>.txt
              </para>
            </listitem>
          </itemizedlist>
        </para>
      </sect3>
    </sect2>
  </sect1>

  <sect1 id="kakikata">
    <title>&molong; document manners and rules</title>
    <para>
     There are a few manners and rules that should be followed in writing &molong;
     documents as mentioned below.
    </para>
      <sect2 id="kakikata-1">
        <title>Root element of document</title>
        <para>
	Considering the amount of documents placed on &molong;, we assume "article"
        to be used for root element of a document.
        </para>
        <para>
	 docbook-style-xsl style sheet package is DocBook's a generic style sheet 
         so it should be ok to use <footnote><para>Perhaps "books"?</para></footnote> 
         but we haven't tried it on anything other than article.
        </para>
        <para>
	 Also the process to create <filename>changelog.html</filename> with 
         <filename>docbook.xsl</filename> driver is relying on article. 
         Somebody please write up  a cool code for this.
        </para>
      </sect2>
      <sect2 id="kakikata-2">
       <title>Names of files that are linked from index.html.</title>
       <para>
       Among the style sheets used for &molong; documents,<filename>docbook.xsl</filename> is set to produce individual html files for each &lt;sect1&gt;.
       In this case, a file name is created with an id character name of each &lt;sect1&gt;.
       For example, a section with the following
	 <programlisting>
          &lt;sect1 id=&quot;kakikata&quot;&gt;
         </programlisting>
	 will be created as <filename>kakikata.html</filename>.
       </para>
       <para>
       If a section has no id character is specified, 
       <filename>ar01s<replaceable>??</replaceable>.html</filename> wil be created.
       It stands for article 1 section ??.
       </para>
       <para>
        With this manner, the file name would change depending on the order of the 
        section in the article. If this section needs to be linked from other web 
        site, add id character to have a fixed file name for the link.
       </para>
       <para>
        However, avoid using &quot;changelog&quot; for id character since a style
        sheet in <filename>docbook.xsl</filename> is set to create 
        <filename>changelog.html</filename> from the contents of &lt;revhistory&gt;
        section.
       </para>
       <para>
        The same goes for anchors to &lt;sect2&gt;. If it needs to be linked from 
        other web site, put some unique id character.
       </para>
     </sect2>
     <sect2 id="kakikata-3">
       <title>Use of Entry Definition</title>
       <para>
       &molong; documents use entry definition for frequently appearing words and 
       expressions in the document.
       In the actual documents, the references from the definition is written.
       </para>
       <para>
        This may sound a bit hard to understand but in short, it means to define 
        something like &amp;lt;, often seen in html, and use it.
       </para>
       <para>
       For example, we write 
       <programlisting>
        definitions of frequently appearing expressions in the
        &amp;molong; documents.
       </programlisting>
        or something similar.
       </para>
       <para>
       The reasons behind doing this way are:
       <variablelist>
         <varlistentry>
            <term>Prevention of typographical errors</term>
            <listitem>
              <para>
              Definitions for "&amp;molong; -&gt; &molong;" can avoid an error too
              common among the "Momomga Linux". <!-- not nga but mga ;) -->
              </para>
              <para>
               Also if there is a mistake like &amp;morong; which is not defined, 
               xml parser may let you know that there is an error.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Easy to change definition reference</term>
            <listitem>
              <para>
              An entry definition like "&amp;svnsaba; -&gt; &svnsaba;" can easily 
              modified to update when your svn server for web contents is moved.
              </para>
            </listitem>
          </varlistentry>
          <varlistentry>
            <term>Easy to make</term>
            <listitem>
              <para>
	      Using a definition like "&amp;dora; -&gt; &dora;" can save you a lot 
              of typing. It can also contribute to less typograhical errors.
              </para>
              <para>
	       And things like rpm changelog go wild ... 
               It amazes me that sometimes you can't even type your own name
                right ...
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
      </para>

      <para>
       The entry definition file for &molong; document is 
       <filename>docs/momonga.ent</filename>.
       <programlisting>
        &lt;!ENTITY molong       &quot;Momonga Linux&quot;&gt;
        &lt;!ENTITY moshort      &quot;Momonga&quot;&gt;
       </programlisting>
        Definitions are made in this way so you can add up when necessary.
      </para>
    </sect2>

    <sect2 id="format_of_changes">
     <title>Format for Revision History</title>
      <para>
       Currently under discussion.
      </para>
   
      <programlisting>
       Finalized decision will be written here. :)
      </programlisting>   
    </sect2>

    <sect2 id="kakikata-5">
      <title>xmllint</title>

      <para>
       If there is a syntax error in your document, updating the actual contents of
       &mosaba; may be stopped, or &omokon; may be halted from the error when your 
       document is being created in &moshort;-Docs package(as planned).
       To avoid such a situation, perform as below to check locally before you 
       commit to svn. 
       
       <screen>
         $ <command>xmllint --noout --valid Hoge-HOWTO.xml</command>
       </screen>
      </para>
    </sect2>
  </sect1>

  <sect1 id="shinki">
    <title>Adding a new document</title>
       <para>Let's use Hoge-HOWTO as our sample here.</para>
    <sect2 id="directorynojyunbi">
      <title>Preparing a storing location</title>
      <para>
       Create a directory in the same name as the document under 
       <filename class="directory">docs</filename>.
       Then do
	<screen>
          $ <command>svn add <replaceable>new directory</replaceable></command>
        </screen>
	to put it under the control of svn.
      </para>
    <para>
    Then do <command>svn commit</command> as required.
    </para>
    </sect2>

    <sect2 id="filejyunbi">
      <title>Preparing source</title>
      <para>
       In the directory you prepared at <xref linkend="directorynojyunbi"/>, 
       create an xml file in the same name as the directory name.
        <footnote>
          <para>
           I know that there is a subtle discrepancy between <xref linkend="directorynojyunbi"/> and <xref linkend="filejyunbi"/> but hope readers can pick up what we mean ...
          </para>
        </footnote>
      </para>
      <para>
       Perhaps in creating this xml file mere copying one from another document 
       directory might be a quick fix but let me write some rules to apply at the 
       beginning of the file.
        <programlisting>
         &lt;?xml version=&quot;1.0&quot; encoding=&quot;EUC-JP&quot;?&gt;<co id="xmlsengen"/>
         &lt;!DOCTYPE article PUBLIC &quot;-//OASIS//DTD DocBook XML V4.1.2//EN&quot;<co id="doctypesengen1"/>
         &quot;http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd&quot; [<co id="doctypesengen2"/>
         &lt;!ENTITY % kent SYSTEM &quot;../../momonga.ent&quot;&gt;<co id="entityyomikomi"/>
         %kent;<co id="entityteigi"/>
         ]&gt;
         &lt;article id=&quot;index&quot; lang=&quot;ja&quot;&gt;<co id="rooteremento"/>
        </programlisting>
        <calloutlist>
          <callout arearefs="xmlsengen">
            <para>
	    A declaration that this file is an xml file. Xml has UTF-8 as default 
            encoding. When another encoding is used, it should be declared as well.
            </para>
          </callout>
          <callout arearefs="doctypesengen1">
            <para>
            A declaration to use XML DocBook DTD Version 4.1.2.
           </para>
          </callout>
          <callout arearefs="doctypesengen2">
              <para>
               URL where DTD is actually located. 
               This is mandatory since it is not DocBook sgml.
            </para>
          </callout>
          <callout arearefs="entityyomikomi">
            <para>
	    Reading in momonga.ent file.
            </para>
          </callout>
          <callout arearefs="entityteigi">
            <para>
	     Take this as a declaration to use references defined in momonga.ent 
             file.
            </para>
          </callout>
          <callout arearefs="rooteremento">
            <para>
	     This is an root element of this document,<sgmltag>article</sgmltag>. 
             From its id character the output file would be <filename>index.html</filename>.
            </para>
            <para>
             Since it is in Japanese, lang character is set as ja. 
             As a result of this, output html files would have ja as language type,
             would be encoded in EUC-JP, and have &quot;Table of Contents&quot; 
             translated to the appropriate term in the language.
            </para>
          </callout>
        </calloutlist>
      </para>
    </sect2>

    <sect2 id="omf">
    <title>Preparing a omf file</title>
    <para>
     Omf stands for Open Source Metadate Framework.
     For details, refer to <ulink url="http://www.ibiblio.org/osrt/omf/">metalab</ulink>.
    </para>

    <para>
    Create as <filename>docs/Hoge-HOWTO/C/Hoge-HOWTO-C.omf</filename>.
    Its contents should be
    <programlisting>
     &lt;?xml version="1.0" encoding="ISO-8859-1" standalone="no"?&gt;
     &lt;omf&gt;
     &lt;resource&gt;
     &lt;title&gt;
     Hoge-HOWTO
     &lt;/title&gt;
     &lt;subject&gt;
     &lt;category&gt;General|Linux|Distributions|Momonga&lt;/category&gt;
     &lt;/subject&gt;
     &lt;format mime="text/xml"/&gt;
     &lt;identifier url="Hoge-HOWTO.xml"/&gt;
     &lt;language code="C"/&gt;
     &lt;/resource&gt;
     &lt;/omf&gt;
    </programlisting>
     Something like that.
    </para>
   </sect2>

   <sect2 id="Makefile.am">
    <title>Adding Makefile.am</title>
     <para>
       In <filename>docs/Hoge-HOWTO/Makefile.am</filename>, list up directories 
       specific to available languages like below:

      <programlisting>
       SUBDIRS = C ja
      </programlisting>
     </para>

     <para>
      In <filename>docs/Hoge-HOWTO/C/Makefile.am</filename>, it should have
      something like the following:
      <programlisting>
       docname = Hoge-HOWTO
       lang = en
       omffile = Hoge-HOWTO-C.omf
       xml_ents =
        include $(top_srcdir)/xmldocs.make
       dist-hook: app-dist-hook
       figs = \
       figures/hoge1.jpg \
       figures/hoge2.png
      </programlisting>
     </para>
    </sect2>

    <sect2 id="checknew.rb">
    <title>Executing checknew.rb</title>
    <para>
    Next go to <filename class="directory">docs</filename> and do
    <screen> 
     ruby checknew.rb
    </screen>
     Then an entry for Hoge-HOWTO is added in 
     <filename>docs/configure.in</filename> and 
     <filename>docs/Makefile.am</filename>.
    </para>
   </sect2>

   <sect2 id="makedocument">
   <title>Executing make</title>
    <para>
     In <filename class="directory">docs</filename> do
    <screen>
     $ <command>./autogen.sh</command>
     $ <command>make</command>
    </screen>
     to sythesize html and txt under <filename>docs/Hoge-HOWTO/ja</filename>.
     If you confirm that there has not been any errors doing <command>make</command>
     then do <command>svn commit</command>.
    </para>
   </sect2>
  </sect1>

 <sect1 id="update_docs">
  <title>Editing the existing documents</title>

  <para>
   To edit the existing documents, do <command>svn update</command> to renew your
   repositoy up to the latest.
   When you finish editing, add your revision history according to the
   <link linkend="format_of_changes">format</link>.
  </para>

  <para>
   After that check using <link linkend="kakikata-5">xmllint</link> and if there
   is no error, do <command>svn commit</command>.
  </para>
 </sect1>

  <sect1 id="matigai">
    <title>Common mistakes</title>
    <sect2 id="matigai-1">
      <title>It's not html - part 1</title>
      <para>
       DocBok is a set of tags that mark up logical structures of documents.
       It is not designed to control appearance of the documents.
        <programlisting>
         &lt;para&gt;&lt;/para&gt;
        </programlisting>
       Suppose you thought you put a line feed doing the above. 
       Now it may be displayed as you meant it to be but on the other style sheet 
       it may use different color to recognize separate paragraphs and some may use
       sound even.
      </para>
      <para>
       With the command above, it can only inform that an empty paragraph is 
       existing there but nothing else.
      </para>
      <para>
       And come to think of it, html is also similar in that regard, originally, 
       that is.
      </para>
    </sect2>
    <sect2 id="matigai-2">
      <title>&lt;!-- is not a tag</title>
      <para>
       Comment format &lt;!-- ... --&gt; seen often in html is not a comment 
       tag which starts with &lt;!-- and ends with --&gt;.
      </para>
      <para>
       A comment is a comment and inside a comment, 
       -- should not be used as stated in the xml definition.
        <screen>
         &lt;!--
         hogehoge
         fugafuga -- buroro
         --&gt;
        </screen>
	So a comment like above is not valid.
      </para>
      <para>
       Seems it has become strange but originally here were sentences that were 
       heavily influenced by the law "xml is not sgml" ...
      </para>
    </sect2>
    <sect2 id="matigai-3">
      <title>It is not html - part 2</title>
      <para>
       In html, an empty element, e.g.,<sgmltag>br</sgmltag> tag must omit an end 
       tag but an end tag can not be omitted in xml.
      </para>
      <para>
       To rephrase it, in xhtml you must write <sgmltag>br/</sgmltag> for 
       <sgmltag>br</sgmltag>. It's the same story here.
      </para>
    </sect2>
    <sect2 id="matigai-4">
      <title>It's not html - part 3</title>
      <para>
       In html you can omit &quot;&quot; to pass a value but in xml you can not 
       omit it. Therefore,
        <programlisting>
         &lt;sect1 id=hoge&gt;
        </programlisting>
	would be a mistake.
      </para>
      <para>
      More likely, certain rules have been set for what can be omitted in html.
      A browser that can accept any kinds of syntax should be regarded as abnormal.
      </para>
    </sect2>
    <sect2 id="matigai-5">
      <title>It is not sgml.</title>
      <para>
       Xml distinguishes upper and lower case of characters in tag names.
        <programlisting>
         &lt;sect1&gt;
         ....
         &lt;/SECT1&gt;
        </programlisting>
	 Above is incorrect as setting an end tag of SECT1 without a matching 
         start tag.
      </para>
      <para>
        Weeeell, say SECT1 as a tag is not defined anywhere in the script shown,
        so it is a mistake to begin with anyway.
      </para>
    </sect2>
  </sect1> 

  <sect1 id="thanks">
  <title>Acknowledgement</title>
  <para>
   This document has been written based on OmoiKondara-HOWTO by the Kondara 
   Project with additions extended by the Momonga Project.
  </para>
  <para>
   We thank Mr. Shingo Akagaki, the author of Kondara-Document-HOWTO, also 
   the Kondara Project, and the people that maintained the documents at the 
   Kondara Project.
  </para>
 </sect1>

 <sect1 id="disclaimer_and_copyright">
  <title>Exemption of responsibility and Copyright</title>

  <para>
   This document comes with no warranty. The author of this document can not be held
   liable under any circumstances for any direct or indirect damages resutling from
   the use of this document.
  </para>

  <para>
   The copyright of this document belongs to the Momonga Project.
   The distribution license of this document is subject to the OPL, 
   (Open Publication License), excluding license option A and B.
  </para>

  <para>
   For details on the OPL, refer to
   <ulink url="http://www.opencontent.org/openpub/">http://www.opencontent.org/openpub/</ulink>.
   Japanese version of the OPL draft version 1.0 by Mr. Masayuki Hatta is available at
   <ulink url="http://www.opensource.jp/openpub/">http://www.opensource.jp/openpub/</ulink>.
  </para>

  <para>
   To redistribute this document, please retrieve the latest version from
   <ulink url="http://www.momonga-linux.org/docs/Members-HOWTO/C/">http://www.momonga-linux.org/docs/Members-HOWTO/C/</ulink>.
  </para>
 </sect1>

</article>
