<!-- $Date: 2005/01/04 18:52:29 $
    
Overview:  doctype to describe custom ressources<br/>
Version:   0.1.0<br/>
Copyright: 2005 (c) Ingo Schramm<br/>
License:   GNU LGPL<br/>
Public ID: -//Ister.ORG//XRDL Ressource Directory Language//EN<br/>
System ID: http://xml.ister.org/dtd/xrdl/xrdl.dtd<br/>

XRDL Ressource Directory Language is a lightweight document type to
describe ressources in a directory structure. Containers may be nested
to any level, metadata may be added to describe a container. Each
container may have any number of entries and entries may have any
number of parameters with single or compound values.

XRDL was made to provide a generic document type for configuration
files - but may be useful for other purposes as well.

@root   descriptor
@title  XRDL Ressource Directory Language
@hidden This document includes DTDDoc documentation.
-->

<!-- Open an XRDL document.
%
<descriptor>
  <meta></meta>
  <container>
    <container></container>
    <entry></entry>
  <container>
</descriptor>
%
-->
<!ELEMENT descriptor (meta?, container?)>

<!-- 
@attr xmlns      define the default namespace
@attr xmlns:xrdl define the namespace of XRDL Ressource Directory Language
-->
<!ATTLIST descriptor
  xmlns      CDATA "http://xml.ister.org/dtd/xrdl/"
  xmlns:xrdl CDATA "http://xml.ister.org/dtd/xrdl/">


<!-- Add meta data to a node.
%
<meta>
  <type>configuration</type>
  <name>dummy.conf</name>
  <vendor>Ister.ORG</vendor>
  <description>
    This descriptor defines configuration data
    for an instance of java class Dummy.
  </description>
  <class>org.ister.javax.dummy.Dummy</class>
</meta>
%

With the <code>&lt;meta&gt;</code> tag one may not only define meta
data for the whole descriptor. Using this tag one can add such data to
nearly any type of ressource node (with the one exception of
<code>&lt;element&gt;</code>).
%
<container name="application">
  <meta>
    <description>
      Configuration data for the whole application.
    </description>
  </meta>
</container>
%

Note: To add custom meta data to a <code>&lt;meta&gt;</code> section you
may use one or more <code>&lt;element&gt;</code> tags.
--> 
<!ELEMENT meta
(type?, name?, vendor?, description?, class*, element*)>


<!-- Specify a custom type of the ressource.
%
<meta>
  <type>directory service</type>
</meta>
%
-->
<!ELEMENT type (#PCDATA)>


<!-- Specify a custom name of the ressource.
%
<meta>
  <name>office branch</name>
</meta>
%
-->
<!ELEMENT name (#PCDATA)>


<!-- Specify a vendor related to the ressource.
%
<meta>
  <vendor>Ister.ORG</vendor>
</meta>
%
-->
<!ELEMENT vendor (#PCDATA) >


<!-- Specify a class related to the ressource.

One or more classes may be bound to the description.
%
<meta>
  <class name="XRDLScanner" type="java">org.ister.xml.sax.XRDL</class>
  <class name="XRDLScanner" type="php">IsterXMLSaxXRDL</class>
</meta>
%
-->
<!ELEMENT class (#PCDATA)>

<!--
@attr comment write a short comment
@attr id      specify a unique id
@attr name    specify a custom name of the node
@attr type    specify a custom type of the node
-->
<!ATTLIST class
  comment CDATA #IMPLIED
  id      ID    #IMPLIED
  name    CDATA #IMPLIED
  type    CDATA #IMPLIED>


<!-- Give an extended description of the enclosing element.
%
  <meta>
    <description>
      The more you write the more your users will love you.
    </description>
  </meta>
%
-->
<!ELEMENT description (#PCDATA)>



<!-- Add a container to the descriptor.

A container may contain other containers or any number of
entries. Think of a file system and considder a container to be a
folder and an entry to be a file.
%
<container type="dir" name="root">
  <container type="dir" name="home">
    <container type="dir" name="luser">
      <entry>
        <param type="file"/>
        <value type="string">
          <element>.profile</element>
        </value>
      <entry>
    </container>
  </container>
</container>
%
-->
<!ELEMENT container (meta?, container*, entry*)>

<!--
@attr comment write a short comment
@attr id      specify a unique id
@attr name    specify a custom name of the node
@attr type    specify a custom type of the node
-->
<!ATTLIST container
  comment CDATA #IMPLIED
  id      ID    #IMPLIED
  name    CDATA #IMPLIED
  type    CDATA #IMPLIED>


<!-- An entry in a container.

An entry may contain parameters and values or simple elements. Also
meta data can be defined for a single entry.
%
<entry>
  <meta>
    <description>list</description>
  </meta>
  <element>1</element>
  <element>2</element>
</entry>
<entry>
  <meta>
    <description>map</description>
  </meta>
  <value name="a"><element>1</element></value>
  <value name="b"><element>2</element></value>
</entry>
<entry>
  <meta>
    <description>definition</description>
  </meta>
  <param name="a"/>
  <value><element>1</element></value>
</entry>
<entry>
  <meta>
    <description>definition with default</description>
  </meta>
  <param name="a"/>
  <value type="default"><element>1</element></value>
  <value type="custom"><element>22</element></value>
</entry>
%
-->
<!ELEMENT entry (meta?, ((param?, value?) | element* ) )>

<!--
@attr comment write a short comment
@attr id      specify a unique id
@attr name    specify a custom name of the node
@attr type    specify a custom type of the node
-->
<!ATTLIST entry
  comment CDATA #IMPLIED
  id      ID    #IMPLIED
  name    CDATA #IMPLIED
  type    CDATA #IMPLIED>


<!-- Define a single parameter.

Note that a <code>&lt;param&gt;</code> can only have an assigned value
if it is followed by a <code>&lt;value&gt;</code>.
%
<entry>
  <param name="c"/>
  <value><element>0</element></value>
</entry>
%
-->
<!ELEMENT param (meta?, element*)>

<!--
@attr comment write a short comment
@attr id      specify a unique id
@attr name    specify a custom name of the node
@attr type    specify a custom type of the node
-->
<!ATTLIST param
  comment CDATA #IMPLIED
  id      ID    #IMPLIED
  name    CDATA #IMPLIED
  type    CDATA #IMPLIED>


<!-- Define a custom value.
%
<entry>
  <param name="c"/>
  <value><element>0</element></value>
</entry>
%
-->
<!ELEMENT value (meta?, element*)>

<!--
@attr comment write a short comment
@attr id      specify a unique id
@attr name    specify a custom name of the node
@attr type    specify a custom type of the node
-->
<!ATTLIST value
  comment CDATA #IMPLIED
  id      ID    #IMPLIED
  name    CDATA #IMPLIED
  type    CDATA #IMPLIED>


<!-- Store an atom of information.
%  
<value>
  <element>omega</element>
</value>
%
-->
<!ELEMENT element (#PCDATA)>

<!--
@attr comment write a short comment
@attr id      specify a unique id
@attr name    specify a custom name of the node
@attr type    specify a custom type of the node
-->
<!ATTLIST element
  comment CDATA #IMPLIED
  id      ID    #IMPLIED
  name    CDATA #IMPLIED
  type    CDATA #IMPLIED>