<!--
================================================================================
registry.stanford.edu/Person.dtd
version 1.1c, 10/17/04

DTD for the Stanford University Registry Person

Copyright  2002 by the Board of Trustees of Stanford University
================================================================================
10/16/04 lmcrae  1) Eliminate "source" attribute from name, identifier and privgroup
                 elements.  It was not consistently applied to all elements and
                 is not input or output in any current docs.
                 2) Dropped "label" attribute from address, telephone, email and url.
                 An unimplemented feature that should probably be a sub-element
                 if/when we do it.
                 3) Updated source list in <source> element to full 10/2004 set.
                 4) Add identifier types xunivid and xprincipal; delete types
                 other and general (which should all be xprincipals and xrefids)
                 5) Dropped "homefax" as telephone type (not supported)
                 6) Drropped "office" and telephone type (now officephone)
12/11/03 molive  Added PCDATA to Person element contents and converted
                 from a sequenced list to an or'd list
                 Added xrefid and regid to <idetifier> type constraint
                 Added print attribute to <title>
07/05/03 lmcrae  Fixes for <organization> and <department>; add
                 <email> as a member of <affiliation>
06/25/03 lmcrae  Add "title" element
06/08/03 lmcrae  Add "affdata" element
06/07/03 lmcrae  Add "permanent" and "local" address/phone types
03/20/03 lmcrae  v1.1 changes:
    Drop outer <organization>, add standard inner <organization> reference.
    Add <relation> and <person> within <affiliation>
    Add <nval> for names and identifiers
    Add affnum attribute to all affiliated data
    Add instance attribute to <address> and <phone>
    Add <itu> phone element to <telephone>
    Drop <identifiers> and <privgroups> elements
08/09/02 mnguyen  Add general type to <identifier>
08/07/02 mnguyen  Changed relationship attribute to implied
08/05/02 mnguyen  Add place element to <affiliation>
08/05/02 mnguyen  Add ??? element to <address>; office type to <telephone>
07/18/02 lmcrae   Add visibility and housekeeping attributes to <image>
06/07/02 mnguyen  Add 'image' element
05/02/01 cjurney  Remove 'container' elements, added place, source, organization
04/03/01 cjurney  Add <location>
12/04/01 cjurney  Add 'card' attribute to header
================================================================================
-->

<!-- +++++++++++++++++++++++++ Entity Declarations +++++++++++++++++++++++++ -->

<!ENTITY housekeeping '
   updated              CDATA #IMPLIED
   updated_by           CDATA #IMPLIED
   update_source        CDATA #IMPLIED
   update_comment       CDATA #IMPLIED'
>

<!ENTITY visibility 'visibility (none | private | stanford | world) "none"'>

<!-- +++++++++++++++++++++++++ Person +++++++++++++++++++++++++ -->

<!ELEMENT Person (#PCDATA | name | title | biodemo | address | telephone | email | url | place |
                  affiliation | identifier | privgroup | extension | source | visibility | image)*>
<!ATTLIST Person
     name               CDATA #REQUIRED
     regid              CDATA #IMPLIED
     sunetid            CDATA #IMPLIED
     univid             CDATA #IMPLIED
     card               CDATA #IMPLIED
     relationship       (faculty | student | staff | affiliate | hospital | registry)  #IMPLIED
     listing            (none | private | stanford | world) "none"
     source             CDATA #REQUIRED
     refid              CDATA #IMPLIED
>

<!-- A Person document must have at least one of regid, sunetid, univid or source+refid when used
for data exchange with the Registry -->

<!-- +++++++++++++++++++++++++ Names +++++++++++++++++++++++++ -->

<!ELEMENT name (#PCDATA | first | middle | last | prefix | suffix)*>
<!ATTLIST name
     type               (preferred | full | previous | other | display | registered) #REQUIRED
     visibility         (none | private | stanford | world) "none"
     sourceval          CDATA #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!ELEMENT first         (#PCDATA)>
<!ATTLIST first
     nval               CDATA #IMPLIED
>

<!ELEMENT middle        (#PCDATA)>
<!ATTLIST middle
     nval               CDATA #IMPLIED
>

<!ELEMENT last          (#PCDATA)>
<!ATTLIST last
     nval               CDATA #IMPLIED
>

<!ELEMENT prefix        (#PCDATA)>

<!ELEMENT suffix        (#PCDATA)>

<!-- #PCDATA shows assembled name in "Last, First" form -->

<!-- +++++++++++++++++++++++++ Title +++++++++++++++++++++++++ -->

<!ELEMENT title (#PCDATA)>
<!ATTLIST title
     type               (faculty | facultyshort | directory| job) #REQUIRED
     print              (yes | no) #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!--  +++++++++++++++++++++++++ Bio/Demographic data +++++++++++++++++++++++++ -->

<!ELEMENT biodemo (gender?, birthdate?, birthplace?, deceased?,
                   visatype?, ethnictype?, uscitizenship?, ssn?)>
<!ATTLIST biodemo
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!ELEMENT gender        (#PCDATA)>

<!ELEMENT birthdate     (#PCDATA)>

<!ELEMENT birthplace    (#PCDATA)>

<!ELEMENT deceased      (#PCDATA)>

<!ELEMENT visatype      (#PCDATA)>
<!ATTLIST visatype
     code               CDATA #REQUIRED
>

<!ELEMENT ethnictype    (#PCDATA)>
<!ATTLIST ethnictype
     code               CDATA #REQUIRED
>

<!ELEMENT uscitizenship (#PCDATA)>
<!ATTLIST uscitizenship
     code               CDATA #REQUIRED
>

<!ELEMENT ssn           (#PCDATA)>

<!-- +++++++++++++++++++++++++ Addresses +++++++++++++++++++++++++ -->
<!-- The Registry supports up to 4 lines of address but we limit values to 3 lines -->
<!-- of 40 characters each conform to PeopleSoft constraints. -->

<!-- Usage:  permanent, local, mail are Person/doc level elements
             home, homemail are located in <place type=home>
             work is located in <place type=work>
             office is location in <place type=office> inside <affiliation>
-->

<!ELEMENT address (#PCDATA | line | city | state | county | province | country | postalcode)*>
<!ATTLIST address
     type               (permanent | permanentaddress |
                         local | localaddress |
                         mail | mailaddress |
                         home | homemail |
                         work | workmail | officeaddress) #REQUIRED
     visibility         (none | private | stanford | world) "none"
     affnum             CDATA #IMPLIED
     instance           CDATA #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!ELEMENT line          (#PCDATA)>

<!ELEMENT city          (#PCDATA)>

<!ELEMENT state         (#PCDATA)>
<!ATTLIST state
     code               CDATA #IMPLIED
>

<!ELEMENT county        (#PCDATA)>

<!ELEMENT province      (#PCDATA)>

<!ELEMENT country       (#PCDATA)>
<!ATTLIST country
     alpha2             CDATA #IMPLIED
     alpha3             CDATA #IMPLIED
     numeric            CDATA #IMPLIED
>

<!ELEMENT postalcode    (#PCDATA)>

<!-- +++++++++++++++++++++++++ Location +++++++++++++++++++++++++ -->

<!ELEMENT location (#PCDATA)>
<!ATTLIST location
     type               (idmail | officeidmail | residence | commjack) #REQUIRED
     code               CDATA #REQUIRED
     room               CDATA #IMPLIED
     effective          CDATA #IMPLIED
     affnum             CDATA #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Telephones +++++++++++++++++++++++++ -->

<!-- Usage:  permanent, local, residence, mobile, pager are Person/doc level elements
             home is located in <place type=home>
             work, worfax are located in <place type=work>
             officefax, officephone, officepager are location in <place type=office> inside <affiliation>
-->

<!ELEMENT telephone (#PCDATA | icc | area | number | ext | itu)*>
<!ATTLIST telephone
     type               (permanent | permanentphone |
                         local | localphone |
                         mobile | mobilephone |
                         pager | residence |
                         home | work | workfax |
                         officefax | officephone | officepager |
                         officeinternalpager | officemobile) #REQUIRED
     visibility         (none | private | stanford | world) "none"
     affnum             CDATA #IMPLIED
     instance           CDATA #IMPLIED
     sourceval          CDATA #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!ELEMENT icc           (#PCDATA)>

<!ELEMENT area          (#PCDATA)>

<!ELEMENT number        (#PCDATA)>

<!ELEMENT ext           (#PCDATA)>

<!ELEMENT itu           (#PCDATA)>

<!-- +++++++++++++++++++++++++ Email +++++++++++++++++++++++++ -->

<!ELEMENT email (#PCDATA | user | host)*>
<!ATTLIST email
     type               (primary | pager | officeemail) #REQUIRED
     affnum             CDATA #IMPLIED
     visibility         (none | private | stanford | world) "none"
     sourceval          CDATA #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!ELEMENT user (#PCDATA)>

<!ELEMENT host (#PCDATA)>

<!-- +++++++++++++++++++++++++ URLs +++++++++++++++++++++++++ -->

<!ELEMENT url (#PCDATA)>
<!ATTLIST url
     type               ( homepage | officehomepage) #REQUIRED
     visibility         (none | private | stanford | world) "none"
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Place +++++++++++++++++++++++++ -->

<!ELEMENT place (location | address | telephone | email | url)*>
<!ATTLIST place
     type               (home | work | office) #REQUIRED
     affnum             CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Affiliations +++++++++++++++++++++++++ -->

<!ELEMENT affiliation (#PCDATA | department | relation | description | place | email | affdata)*>
<!ATTLIST affiliation
     organization       (stanford | sumc) "stanford"
     type               (student |
                         student:onleave |
                         student:mla |
                         student:ndo |
                         student:incoming |
                         student:contingent |
                         student:notregistered |
                         student:recent |
                         student:nonactive |
                         faculty |
                         faculty:onleave |
                         faculty:emeritus |
                         faculty:otherteaching |
                         faculty:incoming |
                         faculty:affiliate |
                         faculty:retired |
                         faculty:nonactive |
                         staff |
                         staff:academic |
                         staff:onleave |
                         staff:emeritus |
                         staff:otherteaching |
                         staff:affiliate |
                         staff:incoming |
                         staff:retired |
                         staff:student |
                         staff:nonactive |
                         affiliate |
                         affiliate:directory |
                         affiliate:courtesy |
                         affiliate:sponsored |
                         affiliate:nonactive) #REQUIRED
     until              CDATA #IMPLIED
     affnum             CDATA #IMPLIED
     visibility         (none | private | stanford | world) "none"
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- Syntax: "affiliationcode[:qualifier]", e.g., "faculty:emeritus", "staff" -->

<!ELEMENT department (#PCDATA | organization)*>
<!ATTLIST department
     affnum             IDREF #IMPLIED
     code               CDATA #IMPLIED
>

<!ELEMENT relation (#PCDATA | person)*>
<!ATTLIST relation
     type               (spouse) "spouse"
     affnum             IDREF #IMPLIED
>

<!ELEMENT description (#PCDATA)>
<!ATTLIST description
     affnum             IDREF #IMPLIED
>

<!ELEMENT affdata (#PCDATA)*>
<!ATTLIST affdata
     type               CDATA #IMPLIED
     code               CDATA #IMPLIED
     affnum             IDREF #IMPLIED
>

<!-- +++++++++++++++++++++++++ Organization +++++++++++++++++++++++++ -->

<!ELEMENT organization (#PCDATA)*>
<!ATTLIST organization
     name               CDATA #IMPLIED
     regid              CDATA #IMPLIED
     adminid            CDATA #IMPLIED
     acadid             CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Person reference +++++++++++++++++++++++++ -->

<!ELEMENT person (#PCDATA)*>
<!ATTLIST person
     name               CDATA #IMPLIED
     regid              CDATA #IMPLIED
     univid             CDATA #IMPLIED
     sunetid            CDATA #IMPLIED
>

<!--  +++++++++++++++++++++++++ Identifiers +++++++++++++++++++++++++ -->

<!ELEMENT identifier (#PCDATA)>
<!ATTLIST identifier
     type               (principal | sunetid | univid | regid | card | directory | proximity | refid |
                         xprincipal | xrefid | xunivid) #REQUIRED
     visibility         (none | private | stanford | world) "none"
     nval               CDATA #IMPLIED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Privilege Groups +++++++++++++++++++++++++ -->

<!ELEMENT privgroup (#PCDATA)>
<!ATTLIST privgroup
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Person Extensions +++++++++++++++++++++++++ -->

<!ELEMENT extension (#PCDATA)>
<!ATTLIST extension
     type               CDATA #REQUIRED
     visibility         (none | private | stanford | world) "none"
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Sources +++++++++++++++++++++++++ -->

<!-- 10/16/04: replaced this list of values
				
               (campcomm | faculty | staff | student | hospital | registry)
-->

<!ELEMENT source (name+, biodemo, identifier*)>
<!ATTLIST source
     source             ( campcomm | campuscard | faculty | hospital | idcard
                        | mla | pinnacle | registry | slac | spo | sponsorship
                        | staff | student | sunetid) #REQUIRED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Visibilities +++++++++++++++++++++++++ -->

<!ELEMENT visibility (#PCDATA)>
<!ATTLIST visibility
     where              (online | print | ferpa) #REQUIRED
     what               CDATA #REQUIRED
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++++ Image ++++++++++++++++++++++++++ -->

<!ELEMENT image (#PCDATA)>
<!ATTLIST image
     type               (card) #REQUIRED
     mimetype           CDATA #REQUIRED
     encoding           (base64) #REQUIRED
     visibility         (none | private | stanford | world) "none"
     updated            CDATA #IMPLIED
     updated_by         CDATA #IMPLIED
     update_source      CDATA #IMPLIED
     update_comment     CDATA #IMPLIED
>
