<!--
================================================================================
registry.stanford.edu/xml/person/2.0/Person.dtd
version 2.0, 09/06/11

DTD for the Stanford University Registry Person

Copyright 2002/2004 by the Board of Trustees of Stanford University
================================================================================
01/23/2023 hrt
    - Added stf_special_current_gpa and stf_special_cumulated_gpa under student_info
03/19/2020 nataliew
    - Added leavestatus leavenote
11/13/2019 nataliew
    - Added ordcid, xorcid
09/06/11 asingh3
	- Added student_info and birthstate tag.
	- Changed version from 1.2 to 2.0. 1.2 is used by person_xmldoc
	  and other apps and those apps cannot serve student_info data.
12/12/06 molive
   - Dropped <itu> phone element support in <telephone>
12/04/06 madhug
   - added Emergency Contact elements and associated attributes
06/21/05 molive
   - Add <nval> to name prefix and suffix elements
   - Add attribute "effective" to affiliation
05/16/05 molive
   - Add address type "billing"
05/13/05 molive
   - Changing default visibility "none" to REQUIRED
02/02/05
   - Add "stanfordenddate" to Person root element
12/10/04
   - Remove "instance" as a supported attribute in office phone/address
12/06/04 lmcrae
   - added missing "officemobile" phone and "xcardid" identifier
11/29/04 lmcrae
   - took "print" out of where codes for visibility
11/09/04 lmcrae
   - add missing "homemail" address type
11/05/04 lmcrae
   - Fix typo in <profile> declaration
   - addmissing "secondary" email type
11/03/04 lmcrae
   - All type codes reset to earlier simpler forms (and maint log cleaned up)
   - Deleted "print=yes|no" from faculty titles.  The printablity of the forms
     is not selectable.  Rather we use the long form for Stanford.Who, the
     short form (if present, else long) for the printed directory.
   - Add missing profile element to replace dropped <extension type="profile">
   - Add visibility to <title>.  Like <name>, this is currently slaved to the
     overall listing visbility.
   - Drop type=directory from title, since we don't have one.
11/01/04 lmcrae
   - Add missing <location> at document level
   - Affnums back in affiliated data, but not as IDREFs
   - Dropped unused ENTITY declarations
10/26/04 lmcrae
   - Make <place type=home> and <place type=work> solely derived data.  This means
     <location> is moved from the home place to the person level.  This resolves
     a conflict between input and output rules.
10/24/04 lmcrae
   - Dropped <extension> element.  It's a catch-all table and things we use
     from it should be expressed as distinct elements (e.g., title, image).
   - Dropped <source> element.  We don't publish source-specific data.
   - Dropped housekeeping (updated, updated_by, update_source, update_comment).
     They were to be part of a complete "system" person that was not implemented.
10/16/04 lmcrae
   - Eliminate "source" attribute from name, identifier and privgroup elements.
     It was not consistently applied to all elements and is not input or output.
   - Dropped "label" attribute from address, telephone, email and url. An
     unimplemented feature that should probably be a sub-element if/when we do it.
   - Add identifier types xunivid and xprincipal; delete type general (which
     should all be xprincipals and xrefids)
   - Dropped "homefax" as telephone type (not supported)
12/11/03 molive
   - Add PCDATA to Person element contents and converted from a sequenced
     list to an or'd list
   - Add xrefid and regid to <idetifier> type constraint
   - Add 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
================================================================================
-->

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

<!ELEMENT Person (#PCDATA | name | title | biodemo | address | telephone | email | url
                  | location | place | affiliation | identifier | privgroup | profile | student_info
                  | emergency_contact | visibility | image | leavestatus | leavenote)*>
<!ATTLIST Person
     name               CDATA #REQUIRED
     refid              CDATA #IMPLIED
     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) #REQUIRED
     source             CDATA #REQUIRED
     stanfordenddate    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               (display | full | other | preferred | previous | registered) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
     sourceval          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)>
<!ATTLIST prefix
     nval               CDATA #IMPLIED
>

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

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

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

<!ELEMENT title (#PCDATA)>
<!ATTLIST title
     type               (faculty | facultyshort | job) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
>

<!-- +++++++++++++++++++++++++ Profile +++++++++++++++++++++++++ -->

<!ELEMENT profile (#PCDATA)>
<!ATTLIST profile
     visibility         (none | private | stanford | world) #REQUIRED
>

<!-- +++++++++++++++++++++++++ leavestatus +++++++++++++++++++++++++ -->

<!ELEMENT leavestatus (#PCDATA)>
<!ATTLIST leavestatus 
     visibility         (none | private | stanford | world) #REQUIRED
>

<!-- +++++++++++++++++++++++++ leavenote +++++++++++++++++++++++++ -->

<!ELEMENT leavenote (#PCDATA)>
<!ATTLIST leavenote
     visibility         (none | private | stanford | world) #REQUIRED
>

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

<!ELEMENT biodemo (gender?, ssn?, birthdate?, birthplace?, birthstate?, deceased?,
                   visatype?, ethnictype?, uscitizenship?)>
<!ATTLIST biodemo
     visibility         (none | private | stanford | world) #REQUIRED
>

<!ELEMENT gender        (#PCDATA)>

<!ELEMENT birthdate     (#PCDATA)>

<!ELEMENT birthplace    (#PCDATA)>

<!ELEMENT birthstate    (#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               (home | homemail | local | mail | office | permanent |
                         billing | work) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
     affnum             CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Emergency Contact Address +++++++++++++++++++++++++ -->

<!ELEMENT contact_address (#PCDATA | line | city | state | county | province | country | postalcode)* >
<!ATTLIST contact_address
        type              (primary) #REQUIRED
        visibility        (none | private | stanford | world) #REQUIRED
>

<!ELEMENT line          (#PCDATA)>

<!ELEMENT city          (#PCDATA)>

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

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

<!ELEMENT county        (#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
     visibility         (none | private | stanford | world) #REQUIRED
     code               CDATA #REQUIRED
     room               CDATA #IMPLIED
     effective          CDATA #IMPLIED
     affnum             CDATA #IMPLIED
>

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

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

<!ELEMENT telephone (#PCDATA | icc | area | number | ext)*>
<!ATTLIST telephone
     type               (home | internalpager | local | mobile
                         | office | officefax | officemobile | officepager | officeinternalpager
                         | pager | permanent | residence | work | workfax) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
     affnum             CDATA #IMPLIED
     sourceval          CDATA #IMPLIED
>

<!-- +++++++++++++++++++++++++ Emergency Contact Telephone +++++++++++++++++++++++++ -->

<!ELEMENT contact_telephone (#PCDATA | icc | area | number)*>
<!ATTLIST contact_telephone
     type              (primary | home | work | mobile) #REQUIRED
     visibility        (none | private | stanford | world) #REQUIRED
     sourceval         CDATA #IMPLIED
>

<!ELEMENT icc           (#PCDATA)>

<!ELEMENT area          (#PCDATA)>

<!ELEMENT number        (#PCDATA)>

<!ELEMENT ext           (#PCDATA)>

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

<!ELEMENT email (#PCDATA | user | host)*>
<!ATTLIST email
     type               (primary | pager | office | secondary) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
     affnum             CDATA #IMPLIED
     sourceval          CDATA #IMPLIED
>

<!ELEMENT user (#PCDATA)>

<!ELEMENT host (#PCDATA)>

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

<!ELEMENT url (#PCDATA)>
<!ATTLIST url
     type               (homepage | officehomepage) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
     affnum             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 | affdata)*>
<!ATTLIST affiliation
     organization       (stanford | sumc) "stanford"
     type               CDATA #REQUIRED
     until              CDATA #IMPLIED
     effective          CDATA #IMPLIED
     affnum             CDATA #IMPLIED
     visibility         (none | private | stanford | world) #REQUIRED
>

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

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

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

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

<!ELEMENT affdata (#PCDATA)*>
<!ATTLIST affdata
     type               CDATA #IMPLIED
     code               CDATA #IMPLIED
     affnum             CDATA #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 | other | orcid  | mobileid | smartid1 | smartid2
                        | xcardid | xprincipal | xrefid | xunivid | xregid | xorcid) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
     nval               CDATA #IMPLIED
>

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

<!ELEMENT privgroup (#PCDATA)>

<!-- +++++++++++++++++++++++++ Student Info +++++++++++++++++++++++++ -->

<!ELEMENT student_info (service_indicators?, groups?, advisors?, terms*, athlete?, cardinal_care*)>
<!ELEMENT service_indicators (service_indicator+)>
<!ELEMENT service_indicator (#PCDATA)>
<!ATTLIST service_indicator
          code CDATA #REQUIRED>

<!ELEMENT groups (group+)>
<!ELEMENT group (#PCDATA)>
<!ATTLIST group
          code CDATA #REQUIRED>

<!ELEMENT advisors (advisor+)>
<!ELEMENT advisor (role?, advisor_name?)>
<!ATTLIST advisor
          regid CDATA #REQUIRED
		  sunetid CDATA #REQUIRED
		  univid CDATA #REQUIRED>

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

<!ELEMENT advisor_name (#PCDATA)>

<!ELEMENT terms (term+)>
<!ATTLIST terms
          acad_career CDATA #REQUIRED>

<!ELEMENT term (acad_level_bot?, acad_level_eot?, acad_level_proj?, cumulated_gpa?, stf_special_current_gpa?, stf_special_cumulated_gpa?)>
<!ATTLIST term
          code CDATA #REQUIRED>

<!ELEMENT acad_level_bot (#PCDATA)>
<!ELEMENT acad_level_eot (#PCDATA)>
<!ELEMENT acad_level_proj (#PCDATA)>
<!ELEMENT cumulated_gpa (#PCDATA)>
<!ELEMENT stf_special_current_gpa (#PCDATA)>
<!ELEMENT stf_special_cumulated_gpa (#PCDATA)>

<!ELEMENT athlete (participant+)>
<!ELEMENT participant (#PCDATA)>
<!ATTLIST participant
          code CDATA #REQUIRED
          active CDATA #REQUIRED>

<!ELEMENT cardinal_care (#PCDATA)>
<!ATTLIST cardinal_care
          term CDATA #REQUIRED>

<!-- +++++++++++++++++++++++++ Emergency Contact +++++++++++++++++++++++++ -->

<!ELEMENT emergency_contact (contact_name, contact_relationship, contact_telephone*, contact_address?)>
<!ATTLIST emergency_contact
     number             CDATA #REQUIRED
     primary            (true | false) #REQUIRED
     sync_permanent     (true | false) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
>

<!-- +++++++++++++++++++++++++ Emergency Contact Name +++++++++++++++++++++++++ -->

<!ELEMENT contact_name        (#PCDATA)>

<!-- +++++++++++++++++++++++++ Emergency Contact Relationship +++++++++++++++++++++++++ -->

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

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

<!ELEMENT visibility (#PCDATA)>
<!ATTLIST visibility
     where              (online | ferpa) #REQUIRED
     what               CDATA #REQUIRED
>

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

<!ELEMENT image (#PCDATA)>
<!ATTLIST image
     type               (card) #REQUIRED
     mimetype           CDATA #REQUIRED
     encoding           (base64) #REQUIRED
     visibility         (none | private | stanford | world) #REQUIRED
>