<!-- DTD for DSML             -->
<!-- Last updated: 1999-11-30 -->

<!ENTITY % distinguished-name "CDATA">
<!ENTITY % uri-ref "CDATA"> <!-- [URI]#XPointer -->
<!ENTITY % oid "#PCDATA">

<!ELEMENT dsml (directory-schema?,directory-entries?)>
<!ATTLIST dsml
  complete (true|false) "true"
>

<!-- SCHEMA -->
<!ELEMENT directory-schema (class|attribute-type)*>

<!-- element types common to class and attribute-type -->
<!ELEMENT name (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT object-identifier (%oid;)>

<!ELEMENT class (name+,description?,object-identifier?, attribute*)>
<!ATTLIST class
  id        ID           #REQUIRED
  superior  %uri-ref;    #IMPLIED
  obsolete  (true|false) "false"
  type      (structural|abstract|auxiliary)  #REQUIRED
>

<!ELEMENT attribute EMPTY>
<!ATTLIST attribute
  ref       %uri-ref;  #REQUIRED
  required  (true|false)  #REQUIRED
>

<!ELEMENT attribute-type
  ( name+,
    description?,
    object-identifier?,
    syntax?,
    equality?,
    ordering?,
    substring? )>

<!ATTLIST attribute-type
  id                ID        #REQUIRED
  superior          %uri-ref; #IMPLIED
  obsolete          (true|false) "false"
  single-value      (true|false) "false"
  user-modification (true|false) "true"
>

<!ELEMENT syntax    (%oid;)>
<!ELEMENT equality  (%oid;)>
<!ELEMENT ordering  (%oid;)>
<!ELEMENT substring (%oid;)>

<!-- ENTRIES -->
<!ELEMENT directory-entries (entry*)>

<!ELEMENT entry (objectclass*,attr*)>
<!-- minimum occur for objectclass and attr are zero to allow for
     an entry that only expresses objectclasses or non-objectclass
     directory attributes -->
<!ATTLIST entry
  dn  %distinguished-name;  #REQUIRED
>

<!ELEMENT objectclass (oc-value+)>
<!ATTLIST objectclass
  ref    %uri-ref; #IMPLIED
>

<!ELEMENT oc-value (#PCDATA)>
<!ATTLIST oc-value
  ref    %uri-ref; #IMPLIED
>

<!ELEMENT attr (value+)>
<!ATTLIST attr
  name  CDATA     #REQUIRED
  ref   %uri-ref; #IMPLIED
>

<!ELEMENT value (#PCDATA)>
<!ATTLIST value
  encoding CDATA "base64"
>
