<?xml encoding="ISO-8859-1"?>

<!--
   DTD for student project management - DRAFT !!

   Copyright: Daniel.Schneider@tecfa.unige.ch
   This DTD and associated programs will be released under GPL or
   as freeware.

   Design rationale:
   - Should allow simple student project management (all of simple systems,
     texts, and research projects)
   - Should allow student-teacher interaction
   - Should be more or less human readable
   - I went for a rather hierachical tree, e.g. specficiationS instead of
     (specification)+ because I have the feeling that this will make tool
     programming easier.

   ToDO:
   - figure how to represent dates (unix-time or humain readable)
   - who does what
   - URLs, e.g. for the home page
                           -->

<!-- ****************************** ENTITY Declarations ******************* 
   ... these are used as macros to make the code more tight
  -->

<!ENTITY % date "
  day CDATA #REQUIRED
  month CDATA #REQUIRED
  year CDATA #REQUIRED
">

<!ENTITY % stamp "
  creation-day NMTOKEN #REQUIRED
  creation-month NMTOKEN #REQUIRED
  creation-year NMTOKEN #REQUIRED
  created-by NMTOKEN #REQUIRED
  mod-day NMTOKEN #REQUIRED
  mod-month NMTOKEN #REQUIRED
  mod-year NMTOKEN #REQUIRED
  mod-by NMTOKEN #REQUIRED
  version NMTOKEN #REQUIRED
  status (draft|final|revised) #REQUIRED
  main-author CDATA #REQUIRED
"
>

<!-- ****************************** The project ********************

    Main elements of the project (TOP Node)

    specifications: Can have several
  -->

<!ELEMENT project (title, (planning), group, (specifications), (problems), (resources), (misc-info), (results), (after-thoughts), (teacher-comments) )>
<!ATTLIST project %stamp; >


<!-- ****************************** Group and Persons ******************** -->

<!ELEMENT group (person)*>

<!ELEMENT person ( (ldap-id), (contact-info) ,(misc-info))>

<!ELEMENT contact-info EMPTY>
<!ATTLIST contact-info
  first-name          	CDATA #REQUIRED
  family-name          	CDATA #REQUIRED
  middle-initial 	CDATA #REQUIRED
  role                  (student|worker|supervisor|consultant|other) #REQUIRED
  home-url              CDATA #REQUIRED
  work-url              CDATA #REQUIRED
  email          	CDATA #REQUIRED
  %stamp;
>

<!ELEMENT ldap-id (#PCDATA)>

<!-- ****************************** Specifications ******************** -->

<!ELEMENT specifications ((specification)+, (misc-info), (after-thoughts), (teacher-comments))>
<!ATTLIST specifications %stamp; >

<!ELEMENT specification (main-goal, objectives, (context), (workpackages), (stories), (resources), (deliverables), (problems), (after-thoughts), (teacher-comments) )>
<!ATTLIST specification %stamp; >


<!ELEMENT main-goal (title, content, (after-thoughts), (teacher-comments))>
<!ATTLIST main %stamp; >


<!ELEMENT objectives ( (goal)+, (misc-info), (after-thoughts), (teacher-comments) )>
<!ATTLIST objectives %stamp; >


<!ELEMENT goal (title, content, (after-thoughts), (teacher-comments))>
<!ATTLIST goal %stamp; >


<!ELEMENT context (#PCDATA)>
<!ATTLIST context %stamp; >


<!ELEMENT workpackages ((workpackage)+, (misc-info), (after-thoughts), (teacher-comments))>
<!ATTLIST workpackages %stamp; >


<!ELEMENT workpackage (title, (planning), content, (misc-info), (after-thoughts), (teacher-comments))>
<!ATTLIST workpackage %stamp; >


<!ELEMENT stories ((story)+, (after-thoughts), (teacher-comments))>
<!ATTLIST stories %stamp; >

<!ELEMENT story (title, content, (after-thoughts), (teacher-comments))>
<!ATTLIST story %stamp; >

<!ELEMENT deliverables ((deliverable)+, (after-thoughts), (teacher-comments))>
<!ATTLIST deliverables %stamp; >


<!ELEMENT deliverable (title, content, (after-thoughts), (teacher-comments))>
<!ATTLIST deliverable %stamp; >


<!-- ****************************** Problem ******************** -->

<!ELEMENT problems ((problem)+, (misc-info), (after-thoughts), (teacher-comments))>
<!ATTLIST problems %stamp; >


<!ELEMENT problem (title, content, (solution), (after-thoughts), (teacher-comments))>
<!ATTLIST problem %stamp; >


<!-- ****************************** Resources ********************
 Resources are people, articles, etc. used to produce something
 -->


<!ELEMENT resources ((resource)+, (after-thoughts), (teacher-comments))>
<!ATTLIST resources %stamp; >

<!ELEMENT resource (title, content, (after-thoughts), (teacher-comments))>
<!ATTLIST resource %stamp; >


<!-- ****************************** Results ******************** -->

<!ELEMENT results ((result)+, (after-thoughts), (teacher-comments))>
<!ATTLIST results %stamp; >

<!ELEMENT result (title, content, (after-thoughts), (teacher-comments))>
<!ATTLIST result %stamp; >


<!-- ****************************** Evaluation ******************** -->


<!ELEMENT teacher-comments ((teacher-comment | evaluation)+, (after-thoughts))>
<!ATTLIST teacher-comments %stamp; >

<!ELEMENT teacher-comment (title, content)>
<!ATTLIST teacher-comment %stamp; >

<!ELEMENT evaluation (title, content, mark)>
<!ATTLIST evaluation %stamp; >

<!-- ****************************** Common Items ******************** -->

<!ELEMENT misc-info (#PCDATA)>

<!ELEMENT content (item | para | list)+>
<!ELEMENT solution (item | para | list)+>
<!ELEMENT after-thoughts (item | para | list)+>

<!ELEMENT list (item)+>
<!ATTLIST list type (ul|ol) #REQUIRED>

<!ELEMENT para (#PCDATA)>
<!ELEMENT item (#PCDATA)>


<!ELEMENT mark (#PCDATA)>

<!ELEMENT title (#PCDATA)>

<!-- ******************************* Planning ********************* -->

<!ELEMENT planning EMPTY>
<!ATTLIST planning
  start-day NMTOKEN #REQUIRED
  start-month NMTOKEN #REQUIRED
  start-year NMTOKEN #REQUIRED
  end-day NMTOKEN #REQUIRED
  end-month NMTOKEN #REQUIRED
  end-year NMTOKEN #REQUIRED
  completion NMTOKEN #REQUIRED
  man-days NMTOKEN #REQUIRED
>



