<?xml version="1.0" ?>

<!--
A XML document SiteGenerator reads as "site.xml" must conform this DTD.
You describe "site.xml" structure of your site.
-->

<!-- Root element -->
<!ELEMENT site (base,contents)>
<!--
Basic information of your site.
A required attribute "url" is base url of your site.
A required attribute "outputdir" is path to directory to HTML documents generated by SiteGenerator.
A reauired attribute "inputdir" is path to directory to XML documents. SiteGenerator reads XML documents under this directory to generate HTML documents.
-->
  <!ELEMENT base (title,description,webMaster, navigator?,robots?)>
    <!ATTLIST base url CDATA #REQUIRED>
    <!ATTLIST base outputdir CDATA #REQUIRED>
    <!ATTLIST base inputdir CDATA #REQUIRED>
    <!-- Title of your site -->
    <!ELEMENT title (#PCDATA)>
    <!-- Description about your site -->
    <!ELEMENT description (#PCDATA)>
    <!-- Information of web master of your site(Perhaps yourself) -->
    <!ELEMENT webMaster (name,mail)>
        <!-- Name of web master -->
	<!ELEMENT name (#PCDATA)>
        <!-- E-Mail address of web master -->
	<!ELEMENT mail (#PCDATA)>
    <!-- Information of navigator part-->
    <!ELEMENT navigator EMPTY>
        <!-- Position of navigator part.
             beforeMain : before main part(default).
             afterMain : after main part.
        -->
        <!ATTLIST navigator position CDATA "beforeMain">

  <!--
  Contents information of your site.
  SiteGenerator generates navigator part for all HTML document from these information.
  Many elements has attribute "id" and "dir". These data used by SiteGenerator to check directory structure and name.
  Many elements has child elements "name". SiteGenerator uses contents of these nodes as link name.
  The element "contents" can have one or no element "top".
  The element "contents" can have some or no element "diary".
  The element "contents" can have some or no element "feature".
  The element "contents" can have some or no element "siteImport".
  SiteGenerator will reflect order of elements "top", "diary", "feature", "siteImport" to navigator part.
  -->
  <!ELEMENT contents (top|diary|feature|siteImport)*>
    <!-- Information of top page. -->
    <!ELEMENT top (name,robots?)>
      <!ATTLIST top id ID #REQUIRED>
      <!ATTLIST top dir CDATA #REQUIRED>
    <!-- Information of diary. -->
    <!ELEMENT diary (name,robots?)>
      <!ATTLIST diary id ID #REQUIRED>
      <!ATTLIST diary dir CDATA #REQUIRED>
    <!-- Information of contents independent SiteGenerator. -->
    <!ELEMENT siteImport (name,robots?)>
      <!ATTLIST siteImport id ID #REQUIRED>
      <!ATTLIST siteImport dir CDATA #REQUIRED>
    <!--
    Information of categories suite.
    You can add categorized items to your site,
    and SiteGenerator scan and generate using this information.
    -->
    <!ELEMENT feature (name,robots?,category+)>
      <!ATTLIST feature id ID #REQUIRED>
      <!ATTLIST feature dir CDATA #REQUIRED>
      <!-- Category information -->
      <!ELEMENT category (name,summery,subCategory+)>
            <!ATTLIST category id ID #REQUIRED>
	    <!ATTLIST category dir CDATA #REQUIRED>
            <!-- Subcateagory information -->
	    <!ELEMENT subCategory (name,summery)>
	    	    <!ATTLIST subCategory id ID #REQUIRED>
		    <!ATTLIST subCategory dir CDATA #REQUIRED>

<!-- Common elements -->
<!ELEMENT name (#PCDATA)>
<!ELEMENT summery (#PCDATA)>

<!-- Specification of META tag.
In base element, this element means site range rule.
In top, siteImport, diary, feature element, this means local rule.
Local rule has priority over site range rule.
If there are not site range rule nor local rule,
all switch are setted to "no".
-->
<!ELEMENT robots EMPTY>
    <!-- index or noindex switch.
         yes noindex
         no index
    <!ATTLIST robots noIndex CDATA #IMPLIED>
    <!-- follow or nofollow switch.
         yes nofollow
         no follow
    -->
    <!ATTLIST robots noFollow CDATA #IMPLIED>
    <!-- archive or noarchive switch.
         yes noarchive
         no archive
    -->
    <!ATTLIST robots noArchive CDATA #IMPLIED>

