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

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

   VERSIONS:

   0.6 Changes: 
       - changed ldap-id: attributes (dn and host) instead of CDATA
       - added simple HTML-like links <a href="xxx">yyy</a>
       - added problems element to workpackage
       - added approval attribute to stamp entity (all tags)
       - added id attribute on stamp entity
       - added depends-on attribute to workpackage
       - defaults for years and month :)

   0.7 Changes:
       - made content in teacher-comment optional
       - added comment-status attribute to teacher comment
       - added to workpage: update-freq and update-day

   0.8 Changes:
       - student-answer added to teacher comments
       - added a idref attribute to a element (experimental)
   0.8a - use 2 digits for days and month (because of Xtract)
        - require at least ONE child (or DATA) for elements + NOT: *
          (note that mixed content tags CAN'T HAVE a +)

   0.9 - audit elements for workpackages (one for each WP also ?)

   1.0 - new start 5/2000 for STAF-Fanny
   1.1 - work the specification (Vivian, 23/05/2000)
        
   Copyright: Daniel.Schneider@tecfa.unige.ch
              http://tecfa.unige.ch/tecfa-people/schneider.html

   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 and XSLT easier.

   ToDO:
   - figure how to represent dates (unix-time or humain readable)
   - Regular audit for workpackages (for each date + approval stamp ??)        
   - who does what

   OPEN THINGS for STAF-Fanny
   - ressource (CAMPUS ???)
   - analysis reports (which DTD, a DTD ? ????)
                           -->

<!-- ****************************** ENTITY Declarations ******************* -->


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


<!ENTITY % stamp '
  id ID #IMPLIED        
  creation-day NMTOKEN #IMPLIED
  creation-month (00|01|02|03|04|05|06|07|08|09|10|11|12) "07"
  creation-year (0|1999|2000|2001) "2000"
  created-by NMTOKEN #IMPLIED
  mod-day NMTOKEN #IMPLIED
  mod-month (00|01|02|03|04|05|06|07|08|09|10|11|12) "07"
  mod-year (0000|1999|2000|2001) "2000"
  mod-by NMTOKEN #IMPLIED
  version NMTOKEN #IMPLIED
  status (draft|final|obsolete) #IMPLIED
  approval (ok|not-ok|attention) #IMPLIED        
  main-author CDATA #IMPLIED
'
>

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++          -->
<!-- ****************************** The project ********************

    Main elements of the project (TOP Node)
  -->

<!ELEMENT project (info,
                  (specification)?,
                  (execution)?,
                  (results)?,
                  (resources)?
                 ) >
<!ATTLIST project %stamp; >


<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
<!-- ******************** General Information ****************************** -->

<!ELEMENT info (title, group) >

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

<!ELEMENT group (person)+>

<!ELEMENT person ( (ldap-id)?, (contact-info)? ,(misc-info)?)>
<!ATTLIST person
 id ID #IMPLIED
>

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

<!ELEMENT ldap-id EMPTY>
<!ATTLIST ldap-id 
  host          NMTOKEN #REQUIRED
  dn            CDATA #REQUIRED        
>

<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
<!-- ****************************** Specification ******************** -->

<!ELEMENT specification (main-goal,
                         objectives,
                        (stories)?,
                        (deliverables)?,
                        (workpackages)?,
                        (problems)?, 
                        (report)?,
                        (discussion)?,
                        (evaluation)?
                 )>

<!ATTLIST specification %stamp; >

<!ELEMENT main-goal (title, content, (report)?, (discussion)?)>
<!ATTLIST main %stamp; >


<!ELEMENT objectives ( (objective)+, (report)?, (discussion)? )>


<!ELEMENT objective (title, content, (report)?, (discussion)?)>
<!ATTLIST objective %stamp; >


<!ELEMENT stories ((story)+, (report)?, (discussion)?)>

<!ELEMENT story (title, content, (report)?, (discussion)?)>
<!ATTLIST story %stamp; >


<!ELEMENT deliverables ((deliverable)+, (report)?, (discussion)?)>

<!ELEMENT deliverable (title, (content)?, (report)?, (discussion)?)>
<!ATTLIST deliverable %stamp; >


<!ELEMENT workpackages ((workpackage)+, (report)?, (discussion)?, (audit)? )>
<!ATTLIST workpackages
        update-freq CDATA #FIXED "une fois par semaine"
        update-day CDATA #FIXED "jeudi"
 >


<!ELEMENT workpackage  (title, 
                       (planning)?,
                       (content)?,
                       (misc-info)?,
                       (report)?,
                       (discussion)?),
                       (audit)? >
<!ATTLIST workpackage %stamp;
          depends-on IDREF #IMPLIED
 >



<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  -->
<!-- ****************************** Execution ************************* -->

<!ELEMENT execution ( (workpackages)?,
                      (problems)?,   
                      (discussion)?,
                      (evaluation)?
 ) >

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

<!ELEMENT problems (problem)+>

<!ELEMENT problem (title, content, (solution)?, (report)?, (discussion)?)>
<!ATTLIST problem %stamp;
          problem-status (open|closed) "open"
 >


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

<!ELEMENT resources ((resource)+, (report)?, (discussion)?)>
<!ATTLIST resources %stamp; >

<!ELEMENT resource (title, content, (report)?, (discussion)?)>
<!ATTLIST resource %stamp; >


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

<!-- CHANGE THIS DKS !! -->
<!ENTITY % analysis-dtd SYSTEM 'ieeestd.dtd' >
%analysis-dtd;

<!ELEMENT results (ieeestd?, (result)+, (report)?, (discussion)?, (evaluation)?)>
<!ATTLIST results %stamp; >

<!ELEMENT result (title, content, (report)?, (discussion)?)>
<!ATTLIST result %stamp; >


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


<!ELEMENT discussion (entry)+>

<!ELEMENT entry (title, (content)?)>
<!ATTLIST entry
        %stamp;
         >

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

<!ELEMENT audit EMPTY >
<!ATTLIST audit eval (ok|attention|not-ok) "ok"
%stamp;
>


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


<!ELEMENT misc-info (#PCDATA | a)*>

<!ELEMENT content (#PCDATA | item | para | list | a)*>
<!ELEMENT solution (#PCDATA | item | para | list | a)*>
<!ELEMENT report (#PCDATA | item | para | list | a)*>

<!ELEMENT a (#PCDATA)>
<!ATTLIST a
     href        CDATA   #IMPLIED
     target      CDATA   #IMPLIED
     idref       ID      #IMPLIED
>

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

<!ELEMENT para (#PCDATA |  a)*>
<!ELEMENT item (#PCDATA |  a)*>

<!ELEMENT mark (#PCDATA)>

<!ELEMENT title (#PCDATA)>

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

<!ELEMENT planning EMPTY>
<!ATTLIST planning
  start-day NMTOKEN #REQUIRED
  start-month (00|01|02|03|04|05|06|07|08|09|10|11|12) "07"
  start-year (0|1999|2000|2001) "2000"
  end-day NMTOKEN #REQUIRED
  end-month (00|01|02|03|04|05|06|07|08|09|10|11|12) "07"
  end-year (0|1999|2000|2001) "2000"
  completion NMTOKEN #REQUIRED
  man-days NMTOKEN #REQUIRED
>


