<!-- purple.dtd ======================================================
     Public Identifier: -//Eugene Eric Kim//DTD Purple v0.2//EN
     System Identifier: http://www.eekim.com/dtds/purple.dtd

     Author: Eugene Eric Kim <eekim@eekim.com>
     URL: http://www.eekim.com/software/purple/

     Version: 0.3
     $Id: purple.dtd,v 1.5 2001/08/10 00:45:40 eekim Exp $

     Copyright (c) Eugene Eric Kim 2000-2001.  All rights reserved.
     See COPYING for licensing terms.
================================================================== -->

<!ELEMENT purple (docinfo, section*)>

<!-- ===== docinfo ===== -->
<!ELEMENT docinfo (title, author+, datecreated, datepublished,
                   version, lastsid)>
<!ELEMENT title (#PCDATA)>
<!ELEMENT author (name, email?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT email (#PCDATA)>
<!ELEMENT datecreated (#PCDATA)>
<!ELEMENT datepublished (#PCDATA)>
<!ELEMENT version (#PCDATA)>
<!ELEMENT lastnid (#PCDATA)>
<!-- ===== end docinfo ===== -->

<!-- ===== parameter entities ===== -->
<!ENTITY % augment_ids "nid NMTOKEN #IMPLIED hid CDATA #IMPLIED">
<!ENTITY % num "num CDATA #REQUIRED">
<!-- ===== end parameter entities ===== -->

<!-- ===== section ===== -->
<!ELEMENT section (h?, (p | list | example | figure | section)*)>

<!ELEMENT h (#PCDATA)>
<!-- nid and hid attributes should be #REQUIRED, but because right
     now, they are added after the XML document is created, I'm
     going to make these attributes #IMPLIED for now.  This way,
     validating XML editors won't complain when it doesn't see an
     sid or hid attribute. -->
<!ATTLIST h %augment_ids;>
<!-- For now, h, p, and item elements all have an hid attribute.
     This is computed and added by the add_id.pl program.  Eventually,
     this attribute should be unnecessary, as these hierarchical
     addresses should be computed and displayed by the appropriate
     XSLT script. -->

<!ELEMENT p (#PCDATA | b | i | link)*>
<!ATTLIST p %augment_ids;>

<!ELEMENT list (item+)>
<!ELEMENT item (#PCDATA | b | i | link)*>
<!ATTLIST item %augment_ids;>

<!ELEMENT example (listing, caption)>
<!ATTLIST example %augment_ids; %num;>
<!ELEMENT listing (#PCDATA)>
<!ELEMENT caption (#PCDATA)>

<!ELEMENT figure (image, caption)>
<!ATTLIST figure %augment_ids; %num;>

<!ELEMENT image EMPTY>
<!ATTLIST image src CDATA #REQUIRED>

<!ELEMENT link (#PCDATA)>
<!ATTLIST link href CDATA #REQUIRED>

<!ELEMENT i (#PCDATA)>

<!ELEMENT b (#PCDATA)>
<!-- ===== end section ===== -->
